diff --git a/CHANGELOG.md b/CHANGELOG.md index 12cceb86..394623f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.3.3](https://github.com/googleapis/java-language/compare/v2.3.2...v2.3.3) (2022-09-08) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.2 ([#885](https://github.com/googleapis/java-language/issues/885)) ([cd8a4d0](https://github.com/googleapis/java-language/commit/cd8a4d03904a15cd8994b73f179f5bff391c97fe)) + ## [2.3.2](https://github.com/googleapis/java-language/compare/v2.3.1...v2.3.2) (2022-08-09) diff --git a/README.md b/README.md index c36b7611..f6a8ac38 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.0.0 + 26.1.1 pom import @@ -41,7 +41,7 @@ If you are using Maven without BOM, add this to your dependencies: com.google.cloud google-cloud-language - 2.3.0 + 2.3.2 ``` @@ -49,20 +49,20 @@ If you are using Maven without BOM, add this to your dependencies: If you are using Gradle 5.x or later, add this to your dependencies: ```Groovy -implementation platform('com.google.cloud:libraries-bom:26.0.0') +implementation platform('com.google.cloud:libraries-bom:26.1.1') implementation 'com.google.cloud:google-cloud-language' ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-language:2.3.0' +implementation 'com.google.cloud:google-cloud-language:2.3.2' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-language" % "2.3.0" +libraryDependencies += "com.google.cloud" % "google-cloud-language" % "2.3.2" ``` ## Authentication diff --git a/google-cloud-language-bom/pom.xml b/google-cloud-language-bom/pom.xml index 8e7852ca..a1acd9c8 100644 --- a/google-cloud-language-bom/pom.xml +++ b/google-cloud-language-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-language-bom - 2.3.2 + 2.3.3 pom com.google.cloud @@ -52,27 +52,27 @@ com.google.cloud google-cloud-language - 2.3.2 + 2.3.3 com.google.api.grpc grpc-google-cloud-language-v1 - 2.3.2 + 2.3.3 com.google.api.grpc grpc-google-cloud-language-v1beta2 - 0.90.2 + 0.90.3 com.google.api.grpc proto-google-cloud-language-v1 - 2.3.2 + 2.3.3 com.google.api.grpc proto-google-cloud-language-v1beta2 - 0.90.2 + 0.90.3 diff --git a/google-cloud-language/pom.xml b/google-cloud-language/pom.xml index b43a8332..0cb4cf9e 100644 --- a/google-cloud-language/pom.xml +++ b/google-cloud-language/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-language - 2.3.2 + 2.3.3 jar Google Cloud Natural Language https://github.com/googleapis/java-language @@ -11,7 +11,7 @@ com.google.cloud google-cloud-language-parent - 2.3.2 + 2.3.3 google-cloud-language diff --git a/grpc-google-cloud-language-v1/pom.xml b/grpc-google-cloud-language-v1/pom.xml index 2f11ce91..f622b479 100644 --- a/grpc-google-cloud-language-v1/pom.xml +++ b/grpc-google-cloud-language-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-language-v1 - 2.3.2 + 2.3.3 grpc-google-cloud-language-v1 GRPC library for grpc-google-cloud-language-v1 com.google.cloud google-cloud-language-parent - 2.3.2 + 2.3.3 diff --git a/grpc-google-cloud-language-v1beta2/pom.xml b/grpc-google-cloud-language-v1beta2/pom.xml index 8eb27a7b..f719a69b 100644 --- a/grpc-google-cloud-language-v1beta2/pom.xml +++ b/grpc-google-cloud-language-v1beta2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-language-v1beta2 - 0.90.2 + 0.90.3 grpc-google-cloud-language-v1beta2 GRPC library for grpc-google-cloud-language-v1beta2 com.google.cloud google-cloud-language-parent - 2.3.2 + 2.3.3 diff --git a/pom.xml b/pom.xml index ee3aab6a..197b1090 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-language-parent pom - 2.3.2 + 2.3.3 Google Cloud Natural Language Parent https://github.com/googleapis/java-language @@ -61,33 +61,33 @@ com.google.api.grpc proto-google-cloud-language-v1 - 2.3.2 + 2.3.3 com.google.api.grpc proto-google-cloud-language-v1beta2 - 0.90.2 + 0.90.3 com.google.api.grpc grpc-google-cloud-language-v1 - 2.3.2 + 2.3.3 com.google.api.grpc grpc-google-cloud-language-v1beta2 - 0.90.2 + 0.90.3 com.google.cloud google-cloud-language - 2.3.2 + 2.3.3 com.google.cloud google-cloud-shared-dependencies - 3.0.1 + 3.0.2 pom import @@ -132,7 +132,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.4.0 + 3.4.1 @@ -159,7 +159,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 html diff --git a/proto-google-cloud-language-v1/pom.xml b/proto-google-cloud-language-v1/pom.xml index 726d747f..5bd65cf2 100644 --- a/proto-google-cloud-language-v1/pom.xml +++ b/proto-google-cloud-language-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-language-v1 - 2.3.2 + 2.3.3 proto-google-cloud-language-v1 PROTO library for proto-google-cloud-language-v1 com.google.cloud google-cloud-language-parent - 2.3.2 + 2.3.3 diff --git a/proto-google-cloud-language-v1beta2/pom.xml b/proto-google-cloud-language-v1beta2/pom.xml index 08789acf..b20282c7 100644 --- a/proto-google-cloud-language-v1beta2/pom.xml +++ b/proto-google-cloud-language-v1beta2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-language-v1beta2 - 0.90.2 + 0.90.3 proto-google-cloud-language-v1beta2 PROTO library for proto-google-cloud-language-v1beta2 com.google.cloud google-cloud-language-parent - 2.3.2 + 2.3.3 diff --git a/proto-google-cloud-language-v1beta2/src/main/java/com/google/cloud/language/v1beta2/LanguageServiceProto.java b/proto-google-cloud-language-v1beta2/src/main/java/com/google/cloud/language/v1beta2/LanguageServiceProto.java index 3e123f70..9a8e9ec7 100644 --- a/proto-google-cloud-language-v1beta2/src/main/java/com/google/cloud/language/v1beta2/LanguageServiceProto.java +++ b/proto-google-cloud-language-v1beta2/src/main/java/com/google/cloud/language/v1beta2/LanguageServiceProto.java @@ -136,219 +136,218 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "_service.proto\022\035google.cloud.language.v1" + "beta2\032\034google/api/annotations.proto\032\027goo" + "gle/api/client.proto\032\037google/api/field_b" - + "ehavior.proto\032\037google/protobuf/timestamp" - + ".proto\"\310\001\n\010Document\022:\n\004type\030\001 \001(\0162,.goog" - + "le.cloud.language.v1beta2.Document.Type\022" - + "\021\n\007content\030\002 \001(\tH\000\022\031\n\017gcs_content_uri\030\003 " - + "\001(\tH\000\022\020\n\010language\030\004 \001(\t\"6\n\004Type\022\024\n\020TYPE_" - + "UNSPECIFIED\020\000\022\016\n\nPLAIN_TEXT\020\001\022\010\n\004HTML\020\002B" - + "\010\n\006source\"~\n\010Sentence\0225\n\004text\030\001 \001(\0132\'.go" - + "ogle.cloud.language.v1beta2.TextSpan\022;\n\t" - + "sentiment\030\002 \001(\0132(.google.cloud.language." - + "v1beta2.Sentiment\"\223\004\n\006Entity\022\014\n\004name\030\001 \001" - + "(\t\0228\n\004type\030\002 \001(\0162*.google.cloud.language" - + ".v1beta2.Entity.Type\022E\n\010metadata\030\003 \003(\01323" - + ".google.cloud.language.v1beta2.Entity.Me" - + "tadataEntry\022\020\n\010salience\030\004 \001(\002\022>\n\010mention" - + "s\030\005 \003(\0132,.google.cloud.language.v1beta2." - + "EntityMention\022;\n\tsentiment\030\006 \001(\0132(.googl" - + "e.cloud.language.v1beta2.Sentiment\032/\n\rMe" - + "tadataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" - + "\0028\001\"\271\001\n\004Type\022\013\n\007UNKNOWN\020\000\022\n\n\006PERSON\020\001\022\014\n" - + "\010LOCATION\020\002\022\020\n\014ORGANIZATION\020\003\022\t\n\005EVENT\020\004" - + "\022\017\n\013WORK_OF_ART\020\005\022\021\n\rCONSUMER_GOOD\020\006\022\t\n\005" - + "OTHER\020\007\022\020\n\014PHONE_NUMBER\020\t\022\013\n\007ADDRESS\020\n\022\010" - + "\n\004DATE\020\013\022\n\n\006NUMBER\020\014\022\t\n\005PRICE\020\r\"\332\001\n\005Toke" - + "n\0225\n\004text\030\001 \001(\0132\'.google.cloud.language." - + "v1beta2.TextSpan\022C\n\016part_of_speech\030\002 \001(\013" - + "2+.google.cloud.language.v1beta2.PartOfS" - + "peech\022F\n\017dependency_edge\030\003 \001(\0132-.google." - + "cloud.language.v1beta2.DependencyEdge\022\r\n" - + "\005lemma\030\004 \001(\t\"-\n\tSentiment\022\021\n\tmagnitude\030\002" - + " \001(\002\022\r\n\005score\030\003 \001(\002\"\337\020\n\014PartOfSpeech\022<\n\003" - + "tag\030\001 \001(\0162/.google.cloud.language.v1beta" - + "2.PartOfSpeech.Tag\022B\n\006aspect\030\002 \001(\01622.goo" - + "gle.cloud.language.v1beta2.PartOfSpeech." - + "Aspect\022>\n\004case\030\003 \001(\01620.google.cloud.lang" - + "uage.v1beta2.PartOfSpeech.Case\022>\n\004form\030\004" - + " \001(\01620.google.cloud.language.v1beta2.Par" - + "tOfSpeech.Form\022B\n\006gender\030\005 \001(\01622.google." - + "cloud.language.v1beta2.PartOfSpeech.Gend" - + "er\022>\n\004mood\030\006 \001(\01620.google.cloud.language" - + ".v1beta2.PartOfSpeech.Mood\022B\n\006number\030\007 \001" - + "(\01622.google.cloud.language.v1beta2.PartO" - + "fSpeech.Number\022B\n\006person\030\010 \001(\01622.google." - + "cloud.language.v1beta2.PartOfSpeech.Pers" - + "on\022B\n\006proper\030\t \001(\01622.google.cloud.langua" - + "ge.v1beta2.PartOfSpeech.Proper\022L\n\013recipr" - + "ocity\030\n \001(\01627.google.cloud.language.v1be" - + "ta2.PartOfSpeech.Reciprocity\022@\n\005tense\030\013 " - + "\001(\01621.google.cloud.language.v1beta2.Part" - + "OfSpeech.Tense\022@\n\005voice\030\014 \001(\01621.google.c" - + "loud.language.v1beta2.PartOfSpeech.Voice" - + "\"\215\001\n\003Tag\022\013\n\007UNKNOWN\020\000\022\007\n\003ADJ\020\001\022\007\n\003ADP\020\002\022" - + "\007\n\003ADV\020\003\022\010\n\004CONJ\020\004\022\007\n\003DET\020\005\022\010\n\004NOUN\020\006\022\007\n" - + "\003NUM\020\007\022\010\n\004PRON\020\010\022\007\n\003PRT\020\t\022\t\n\005PUNCT\020\n\022\010\n\004" - + "VERB\020\013\022\005\n\001X\020\014\022\t\n\005AFFIX\020\r\"O\n\006Aspect\022\022\n\016AS" - + "PECT_UNKNOWN\020\000\022\016\n\nPERFECTIVE\020\001\022\020\n\014IMPERF" - + "ECTIVE\020\002\022\017\n\013PROGRESSIVE\020\003\"\370\001\n\004Case\022\020\n\014CA" - + "SE_UNKNOWN\020\000\022\016\n\nACCUSATIVE\020\001\022\r\n\tADVERBIA" - + "L\020\002\022\021\n\rCOMPLEMENTIVE\020\003\022\n\n\006DATIVE\020\004\022\014\n\010GE" - + "NITIVE\020\005\022\020\n\014INSTRUMENTAL\020\006\022\014\n\010LOCATIVE\020\007" - + "\022\016\n\nNOMINATIVE\020\010\022\013\n\007OBLIQUE\020\t\022\r\n\tPARTITI" - + "VE\020\n\022\021\n\rPREPOSITIONAL\020\013\022\022\n\016REFLEXIVE_CAS" - + "E\020\014\022\021\n\rRELATIVE_CASE\020\r\022\014\n\010VOCATIVE\020\016\"\257\001\n" - + "\004Form\022\020\n\014FORM_UNKNOWN\020\000\022\014\n\010ADNOMIAL\020\001\022\r\n" - + "\tAUXILIARY\020\002\022\022\n\016COMPLEMENTIZER\020\003\022\020\n\014FINA" - + "L_ENDING\020\004\022\n\n\006GERUND\020\005\022\n\n\006REALIS\020\006\022\014\n\010IR" - + "REALIS\020\007\022\t\n\005SHORT\020\010\022\010\n\004LONG\020\t\022\t\n\005ORDER\020\n" - + "\022\014\n\010SPECIFIC\020\013\"E\n\006Gender\022\022\n\016GENDER_UNKNO" - + "WN\020\000\022\014\n\010FEMININE\020\001\022\r\n\tMASCULINE\020\002\022\n\n\006NEU" - + "TER\020\003\"\177\n\004Mood\022\020\n\014MOOD_UNKNOWN\020\000\022\024\n\020CONDI" - + "TIONAL_MOOD\020\001\022\016\n\nIMPERATIVE\020\002\022\016\n\nINDICAT" - + "IVE\020\003\022\021\n\rINTERROGATIVE\020\004\022\013\n\007JUSSIVE\020\005\022\017\n" - + "\013SUBJUNCTIVE\020\006\"@\n\006Number\022\022\n\016NUMBER_UNKNO" - + "WN\020\000\022\014\n\010SINGULAR\020\001\022\n\n\006PLURAL\020\002\022\010\n\004DUAL\020\003" - + "\"T\n\006Person\022\022\n\016PERSON_UNKNOWN\020\000\022\t\n\005FIRST\020" - + "\001\022\n\n\006SECOND\020\002\022\t\n\005THIRD\020\003\022\024\n\020REFLEXIVE_PE" - + "RSON\020\004\"8\n\006Proper\022\022\n\016PROPER_UNKNOWN\020\000\022\n\n\006" - + "PROPER\020\001\022\016\n\nNOT_PROPER\020\002\"J\n\013Reciprocity\022" - + "\027\n\023RECIPROCITY_UNKNOWN\020\000\022\016\n\nRECIPROCAL\020\001" - + "\022\022\n\016NON_RECIPROCAL\020\002\"s\n\005Tense\022\021\n\rTENSE_U" - + "NKNOWN\020\000\022\025\n\021CONDITIONAL_TENSE\020\001\022\n\n\006FUTUR" - + "E\020\002\022\010\n\004PAST\020\003\022\013\n\007PRESENT\020\004\022\r\n\tIMPERFECT\020" - + "\005\022\016\n\nPLUPERFECT\020\006\"B\n\005Voice\022\021\n\rVOICE_UNKN" - + "OWN\020\000\022\n\n\006ACTIVE\020\001\022\r\n\tCAUSATIVE\020\002\022\013\n\007PASS" - + "IVE\020\003\"\232\010\n\016DependencyEdge\022\030\n\020head_token_i" - + "ndex\030\001 \001(\005\022B\n\005label\030\002 \001(\01623.google.cloud" - + ".language.v1beta2.DependencyEdge.Label\"\251" - + "\007\n\005Label\022\013\n\007UNKNOWN\020\000\022\n\n\006ABBREV\020\001\022\t\n\005ACO" - + "MP\020\002\022\t\n\005ADVCL\020\003\022\n\n\006ADVMOD\020\004\022\010\n\004AMOD\020\005\022\t\n" - + "\005APPOS\020\006\022\010\n\004ATTR\020\007\022\007\n\003AUX\020\010\022\013\n\007AUXPASS\020\t" - + "\022\006\n\002CC\020\n\022\t\n\005CCOMP\020\013\022\010\n\004CONJ\020\014\022\t\n\005CSUBJ\020\r" - + "\022\r\n\tCSUBJPASS\020\016\022\007\n\003DEP\020\017\022\007\n\003DET\020\020\022\r\n\tDIS" - + "COURSE\020\021\022\010\n\004DOBJ\020\022\022\010\n\004EXPL\020\023\022\014\n\010GOESWITH" - + "\020\024\022\010\n\004IOBJ\020\025\022\010\n\004MARK\020\026\022\007\n\003MWE\020\027\022\007\n\003MWV\020\030" - + "\022\007\n\003NEG\020\031\022\006\n\002NN\020\032\022\014\n\010NPADVMOD\020\033\022\t\n\005NSUBJ" - + "\020\034\022\r\n\tNSUBJPASS\020\035\022\007\n\003NUM\020\036\022\n\n\006NUMBER\020\037\022\005" - + "\n\001P\020 \022\r\n\tPARATAXIS\020!\022\013\n\007PARTMOD\020\"\022\t\n\005PCO" - + "MP\020#\022\010\n\004POBJ\020$\022\010\n\004POSS\020%\022\013\n\007POSTNEG\020&\022\013\n" - + "\007PRECOMP\020\'\022\013\n\007PRECONJ\020(\022\n\n\006PREDET\020)\022\010\n\004P" - + "REF\020*\022\010\n\004PREP\020+\022\t\n\005PRONL\020,\022\007\n\003PRT\020-\022\006\n\002P" - + "S\020.\022\014\n\010QUANTMOD\020/\022\t\n\005RCMOD\0200\022\014\n\010RCMODREL" - + "\0201\022\t\n\005RDROP\0202\022\007\n\003REF\0203\022\013\n\007REMNANT\0204\022\016\n\nR" - + "EPARANDUM\0205\022\010\n\004ROOT\0206\022\010\n\004SNUM\0207\022\010\n\004SUFF\020" - + "8\022\010\n\004TMOD\0209\022\t\n\005TOPIC\020:\022\010\n\004VMOD\020;\022\014\n\010VOCA" - + "TIVE\020<\022\t\n\005XCOMP\020=\022\n\n\006SUFFIX\020>\022\t\n\005TITLE\020?" - + "\022\014\n\010ADVPHMOD\020@\022\013\n\007AUXCAUS\020A\022\t\n\005AUXVV\020B\022\t" - + "\n\005DTMOD\020C\022\013\n\007FOREIGN\020D\022\006\n\002KW\020E\022\010\n\004LIST\020F" - + "\022\010\n\004NOMC\020G\022\014\n\010NOMCSUBJ\020H\022\020\n\014NOMCSUBJPASS" - + "\020I\022\010\n\004NUMC\020J\022\007\n\003COP\020K\022\016\n\nDISLOCATED\020L\022\007\n" - + "\003ASP\020M\022\010\n\004GMOD\020N\022\010\n\004GOBJ\020O\022\n\n\006INFMOD\020P\022\007" - + "\n\003MES\020Q\022\t\n\005NCOMP\020R\"\366\001\n\rEntityMention\0225\n\004" - + "text\030\001 \001(\0132\'.google.cloud.language.v1bet" - + "a2.TextSpan\022?\n\004type\030\002 \001(\01621.google.cloud" - + ".language.v1beta2.EntityMention.Type\022;\n\t" - + "sentiment\030\003 \001(\0132(.google.cloud.language." - + "v1beta2.Sentiment\"0\n\004Type\022\020\n\014TYPE_UNKNOW" - + "N\020\000\022\n\n\006PROPER\020\001\022\n\n\006COMMON\020\002\"1\n\010TextSpan\022" - + "\017\n\007content\030\001 \001(\t\022\024\n\014begin_offset\030\002 \001(\005\":" - + "\n\026ClassificationCategory\022\014\n\004name\030\001 \001(\t\022\022" - + "\n\nconfidence\030\002 \001(\002\"\235\001\n\027AnalyzeSentimentR" - + "equest\022>\n\010document\030\001 \001(\0132\'.google.cloud." - + "language.v1beta2.DocumentB\003\340A\002\022B\n\rencodi" - + "ng_type\030\002 \001(\0162+.google.cloud.language.v1" - + "beta2.EncodingType\"\256\001\n\030AnalyzeSentimentR" - + "esponse\022D\n\022document_sentiment\030\001 \001(\0132(.go" - + "ogle.cloud.language.v1beta2.Sentiment\022\020\n" - + "\010language\030\002 \001(\t\022:\n\tsentences\030\003 \003(\0132\'.goo" - + "gle.cloud.language.v1beta2.Sentence\"\243\001\n\035" - + "AnalyzeEntitySentimentRequest\022>\n\010documen" - + "t\030\001 \001(\0132\'.google.cloud.language.v1beta2." - + "DocumentB\003\340A\002\022B\n\rencoding_type\030\002 \001(\0162+.g" - + "oogle.cloud.language.v1beta2.EncodingTyp" - + "e\"k\n\036AnalyzeEntitySentimentResponse\0227\n\010e" - + "ntities\030\001 \003(\0132%.google.cloud.language.v1" - + "beta2.Entity\022\020\n\010language\030\002 \001(\t\"\234\001\n\026Analy" - + "zeEntitiesRequest\022>\n\010document\030\001 \001(\0132\'.go" - + "ogle.cloud.language.v1beta2.DocumentB\003\340A" - + "\002\022B\n\rencoding_type\030\002 \001(\0162+.google.cloud." - + "language.v1beta2.EncodingType\"d\n\027Analyze" - + "EntitiesResponse\0227\n\010entities\030\001 \003(\0132%.goo" - + "gle.cloud.language.v1beta2.Entity\022\020\n\010lan" - + "guage\030\002 \001(\t\"\232\001\n\024AnalyzeSyntaxRequest\022>\n\010" + + "ehavior.proto\"\310\001\n\010Document\022:\n\004type\030\001 \001(\016" + + "2,.google.cloud.language.v1beta2.Documen" + + "t.Type\022\021\n\007content\030\002 \001(\tH\000\022\031\n\017gcs_content" + + "_uri\030\003 \001(\tH\000\022\020\n\010language\030\004 \001(\t\"6\n\004Type\022\024" + + "\n\020TYPE_UNSPECIFIED\020\000\022\016\n\nPLAIN_TEXT\020\001\022\010\n\004" + + "HTML\020\002B\010\n\006source\"~\n\010Sentence\0225\n\004text\030\001 \001" + + "(\0132\'.google.cloud.language.v1beta2.TextS" + + "pan\022;\n\tsentiment\030\002 \001(\0132(.google.cloud.la" + + "nguage.v1beta2.Sentiment\"\223\004\n\006Entity\022\014\n\004n" + + "ame\030\001 \001(\t\0228\n\004type\030\002 \001(\0162*.google.cloud.l" + + "anguage.v1beta2.Entity.Type\022E\n\010metadata\030" + + "\003 \003(\01323.google.cloud.language.v1beta2.En" + + "tity.MetadataEntry\022\020\n\010salience\030\004 \001(\002\022>\n\010" + + "mentions\030\005 \003(\0132,.google.cloud.language.v" + + "1beta2.EntityMention\022;\n\tsentiment\030\006 \001(\0132" + + "(.google.cloud.language.v1beta2.Sentimen" + + "t\032/\n\rMetadataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" + + "\030\002 \001(\t:\0028\001\"\271\001\n\004Type\022\013\n\007UNKNOWN\020\000\022\n\n\006PERS" + + "ON\020\001\022\014\n\010LOCATION\020\002\022\020\n\014ORGANIZATION\020\003\022\t\n\005" + + "EVENT\020\004\022\017\n\013WORK_OF_ART\020\005\022\021\n\rCONSUMER_GOO" + + "D\020\006\022\t\n\005OTHER\020\007\022\020\n\014PHONE_NUMBER\020\t\022\013\n\007ADDR" + + "ESS\020\n\022\010\n\004DATE\020\013\022\n\n\006NUMBER\020\014\022\t\n\005PRICE\020\r\"\332" + + "\001\n\005Token\0225\n\004text\030\001 \001(\0132\'.google.cloud.la" + + "nguage.v1beta2.TextSpan\022C\n\016part_of_speec" + + "h\030\002 \001(\0132+.google.cloud.language.v1beta2." + + "PartOfSpeech\022F\n\017dependency_edge\030\003 \001(\0132-." + + "google.cloud.language.v1beta2.Dependency" + + "Edge\022\r\n\005lemma\030\004 \001(\t\"-\n\tSentiment\022\021\n\tmagn" + + "itude\030\002 \001(\002\022\r\n\005score\030\003 \001(\002\"\337\020\n\014PartOfSpe" + + "ech\022<\n\003tag\030\001 \001(\0162/.google.cloud.language" + + ".v1beta2.PartOfSpeech.Tag\022B\n\006aspect\030\002 \001(" + + "\01622.google.cloud.language.v1beta2.PartOf" + + "Speech.Aspect\022>\n\004case\030\003 \001(\01620.google.clo" + + "ud.language.v1beta2.PartOfSpeech.Case\022>\n" + + "\004form\030\004 \001(\01620.google.cloud.language.v1be" + + "ta2.PartOfSpeech.Form\022B\n\006gender\030\005 \001(\01622." + + "google.cloud.language.v1beta2.PartOfSpee" + + "ch.Gender\022>\n\004mood\030\006 \001(\01620.google.cloud.l" + + "anguage.v1beta2.PartOfSpeech.Mood\022B\n\006num" + + "ber\030\007 \001(\01622.google.cloud.language.v1beta" + + "2.PartOfSpeech.Number\022B\n\006person\030\010 \001(\01622." + + "google.cloud.language.v1beta2.PartOfSpee" + + "ch.Person\022B\n\006proper\030\t \001(\01622.google.cloud" + + ".language.v1beta2.PartOfSpeech.Proper\022L\n" + + "\013reciprocity\030\n \001(\01627.google.cloud.langua" + + "ge.v1beta2.PartOfSpeech.Reciprocity\022@\n\005t" + + "ense\030\013 \001(\01621.google.cloud.language.v1bet" + + "a2.PartOfSpeech.Tense\022@\n\005voice\030\014 \001(\01621.g" + + "oogle.cloud.language.v1beta2.PartOfSpeec" + + "h.Voice\"\215\001\n\003Tag\022\013\n\007UNKNOWN\020\000\022\007\n\003ADJ\020\001\022\007\n" + + "\003ADP\020\002\022\007\n\003ADV\020\003\022\010\n\004CONJ\020\004\022\007\n\003DET\020\005\022\010\n\004NO" + + "UN\020\006\022\007\n\003NUM\020\007\022\010\n\004PRON\020\010\022\007\n\003PRT\020\t\022\t\n\005PUNC" + + "T\020\n\022\010\n\004VERB\020\013\022\005\n\001X\020\014\022\t\n\005AFFIX\020\r\"O\n\006Aspec" + + "t\022\022\n\016ASPECT_UNKNOWN\020\000\022\016\n\nPERFECTIVE\020\001\022\020\n" + + "\014IMPERFECTIVE\020\002\022\017\n\013PROGRESSIVE\020\003\"\370\001\n\004Cas" + + "e\022\020\n\014CASE_UNKNOWN\020\000\022\016\n\nACCUSATIVE\020\001\022\r\n\tA" + + "DVERBIAL\020\002\022\021\n\rCOMPLEMENTIVE\020\003\022\n\n\006DATIVE\020" + + "\004\022\014\n\010GENITIVE\020\005\022\020\n\014INSTRUMENTAL\020\006\022\014\n\010LOC" + + "ATIVE\020\007\022\016\n\nNOMINATIVE\020\010\022\013\n\007OBLIQUE\020\t\022\r\n\t" + + "PARTITIVE\020\n\022\021\n\rPREPOSITIONAL\020\013\022\022\n\016REFLEX" + + "IVE_CASE\020\014\022\021\n\rRELATIVE_CASE\020\r\022\014\n\010VOCATIV" + + "E\020\016\"\257\001\n\004Form\022\020\n\014FORM_UNKNOWN\020\000\022\014\n\010ADNOMI" + + "AL\020\001\022\r\n\tAUXILIARY\020\002\022\022\n\016COMPLEMENTIZER\020\003\022" + + "\020\n\014FINAL_ENDING\020\004\022\n\n\006GERUND\020\005\022\n\n\006REALIS\020" + + "\006\022\014\n\010IRREALIS\020\007\022\t\n\005SHORT\020\010\022\010\n\004LONG\020\t\022\t\n\005" + + "ORDER\020\n\022\014\n\010SPECIFIC\020\013\"E\n\006Gender\022\022\n\016GENDE" + + "R_UNKNOWN\020\000\022\014\n\010FEMININE\020\001\022\r\n\tMASCULINE\020\002" + + "\022\n\n\006NEUTER\020\003\"\177\n\004Mood\022\020\n\014MOOD_UNKNOWN\020\000\022\024" + + "\n\020CONDITIONAL_MOOD\020\001\022\016\n\nIMPERATIVE\020\002\022\016\n\n" + + "INDICATIVE\020\003\022\021\n\rINTERROGATIVE\020\004\022\013\n\007JUSSI" + + "VE\020\005\022\017\n\013SUBJUNCTIVE\020\006\"@\n\006Number\022\022\n\016NUMBE" + + "R_UNKNOWN\020\000\022\014\n\010SINGULAR\020\001\022\n\n\006PLURAL\020\002\022\010\n" + + "\004DUAL\020\003\"T\n\006Person\022\022\n\016PERSON_UNKNOWN\020\000\022\t\n" + + "\005FIRST\020\001\022\n\n\006SECOND\020\002\022\t\n\005THIRD\020\003\022\024\n\020REFLE" + + "XIVE_PERSON\020\004\"8\n\006Proper\022\022\n\016PROPER_UNKNOW" + + "N\020\000\022\n\n\006PROPER\020\001\022\016\n\nNOT_PROPER\020\002\"J\n\013Recip" + + "rocity\022\027\n\023RECIPROCITY_UNKNOWN\020\000\022\016\n\nRECIP" + + "ROCAL\020\001\022\022\n\016NON_RECIPROCAL\020\002\"s\n\005Tense\022\021\n\r" + + "TENSE_UNKNOWN\020\000\022\025\n\021CONDITIONAL_TENSE\020\001\022\n" + + "\n\006FUTURE\020\002\022\010\n\004PAST\020\003\022\013\n\007PRESENT\020\004\022\r\n\tIMP" + + "ERFECT\020\005\022\016\n\nPLUPERFECT\020\006\"B\n\005Voice\022\021\n\rVOI" + + "CE_UNKNOWN\020\000\022\n\n\006ACTIVE\020\001\022\r\n\tCAUSATIVE\020\002\022" + + "\013\n\007PASSIVE\020\003\"\232\010\n\016DependencyEdge\022\030\n\020head_" + + "token_index\030\001 \001(\005\022B\n\005label\030\002 \001(\01623.googl" + + "e.cloud.language.v1beta2.DependencyEdge." + + "Label\"\251\007\n\005Label\022\013\n\007UNKNOWN\020\000\022\n\n\006ABBREV\020\001" + + "\022\t\n\005ACOMP\020\002\022\t\n\005ADVCL\020\003\022\n\n\006ADVMOD\020\004\022\010\n\004AM" + + "OD\020\005\022\t\n\005APPOS\020\006\022\010\n\004ATTR\020\007\022\007\n\003AUX\020\010\022\013\n\007AU" + + "XPASS\020\t\022\006\n\002CC\020\n\022\t\n\005CCOMP\020\013\022\010\n\004CONJ\020\014\022\t\n\005" + + "CSUBJ\020\r\022\r\n\tCSUBJPASS\020\016\022\007\n\003DEP\020\017\022\007\n\003DET\020\020" + + "\022\r\n\tDISCOURSE\020\021\022\010\n\004DOBJ\020\022\022\010\n\004EXPL\020\023\022\014\n\010G" + + "OESWITH\020\024\022\010\n\004IOBJ\020\025\022\010\n\004MARK\020\026\022\007\n\003MWE\020\027\022\007" + + "\n\003MWV\020\030\022\007\n\003NEG\020\031\022\006\n\002NN\020\032\022\014\n\010NPADVMOD\020\033\022\t" + + "\n\005NSUBJ\020\034\022\r\n\tNSUBJPASS\020\035\022\007\n\003NUM\020\036\022\n\n\006NUM" + + "BER\020\037\022\005\n\001P\020 \022\r\n\tPARATAXIS\020!\022\013\n\007PARTMOD\020\"" + + "\022\t\n\005PCOMP\020#\022\010\n\004POBJ\020$\022\010\n\004POSS\020%\022\013\n\007POSTN" + + "EG\020&\022\013\n\007PRECOMP\020\'\022\013\n\007PRECONJ\020(\022\n\n\006PREDET" + + "\020)\022\010\n\004PREF\020*\022\010\n\004PREP\020+\022\t\n\005PRONL\020,\022\007\n\003PRT" + + "\020-\022\006\n\002PS\020.\022\014\n\010QUANTMOD\020/\022\t\n\005RCMOD\0200\022\014\n\010R" + + "CMODREL\0201\022\t\n\005RDROP\0202\022\007\n\003REF\0203\022\013\n\007REMNANT" + + "\0204\022\016\n\nREPARANDUM\0205\022\010\n\004ROOT\0206\022\010\n\004SNUM\0207\022\010" + + "\n\004SUFF\0208\022\010\n\004TMOD\0209\022\t\n\005TOPIC\020:\022\010\n\004VMOD\020;\022" + + "\014\n\010VOCATIVE\020<\022\t\n\005XCOMP\020=\022\n\n\006SUFFIX\020>\022\t\n\005" + + "TITLE\020?\022\014\n\010ADVPHMOD\020@\022\013\n\007AUXCAUS\020A\022\t\n\005AU" + + "XVV\020B\022\t\n\005DTMOD\020C\022\013\n\007FOREIGN\020D\022\006\n\002KW\020E\022\010\n" + + "\004LIST\020F\022\010\n\004NOMC\020G\022\014\n\010NOMCSUBJ\020H\022\020\n\014NOMCS" + + "UBJPASS\020I\022\010\n\004NUMC\020J\022\007\n\003COP\020K\022\016\n\nDISLOCAT" + + "ED\020L\022\007\n\003ASP\020M\022\010\n\004GMOD\020N\022\010\n\004GOBJ\020O\022\n\n\006INF" + + "MOD\020P\022\007\n\003MES\020Q\022\t\n\005NCOMP\020R\"\366\001\n\rEntityMent" + + "ion\0225\n\004text\030\001 \001(\0132\'.google.cloud.languag" + + "e.v1beta2.TextSpan\022?\n\004type\030\002 \001(\01621.googl" + + "e.cloud.language.v1beta2.EntityMention.T" + + "ype\022;\n\tsentiment\030\003 \001(\0132(.google.cloud.la" + + "nguage.v1beta2.Sentiment\"0\n\004Type\022\020\n\014TYPE" + + "_UNKNOWN\020\000\022\n\n\006PROPER\020\001\022\n\n\006COMMON\020\002\"1\n\010Te" + + "xtSpan\022\017\n\007content\030\001 \001(\t\022\024\n\014begin_offset\030" + + "\002 \001(\005\":\n\026ClassificationCategory\022\014\n\004name\030" + + "\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\"\235\001\n\027AnalyzeSen" + + "timentRequest\022>\n\010document\030\001 \001(\0132\'.google" + + ".cloud.language.v1beta2.DocumentB\003\340A\002\022B\n" + + "\rencoding_type\030\002 \001(\0162+.google.cloud.lang" + + "uage.v1beta2.EncodingType\"\256\001\n\030AnalyzeSen" + + "timentResponse\022D\n\022document_sentiment\030\001 \001" + + "(\0132(.google.cloud.language.v1beta2.Senti" + + "ment\022\020\n\010language\030\002 \001(\t\022:\n\tsentences\030\003 \003(" + + "\0132\'.google.cloud.language.v1beta2.Senten" + + "ce\"\243\001\n\035AnalyzeEntitySentimentRequest\022>\n\010" + "document\030\001 \001(\0132\'.google.cloud.language.v" + "1beta2.DocumentB\003\340A\002\022B\n\rencoding_type\030\002 " + "\001(\0162+.google.cloud.language.v1beta2.Enco" - + "dingType\"\233\001\n\025AnalyzeSyntaxResponse\022:\n\tse" - + "ntences\030\001 \003(\0132\'.google.cloud.language.v1" - + "beta2.Sentence\0224\n\006tokens\030\002 \003(\0132$.google." - + "cloud.language.v1beta2.Token\022\020\n\010language" - + "\030\003 \001(\t\"U\n\023ClassifyTextRequest\022>\n\010documen" - + "t\030\001 \001(\0132\'.google.cloud.language.v1beta2." - + "DocumentB\003\340A\002\"a\n\024ClassifyTextResponse\022I\n" - + "\ncategories\030\001 \003(\01325.google.cloud.languag" - + "e.v1beta2.ClassificationCategory\"\211\003\n\023Ann" - + "otateTextRequest\022>\n\010document\030\001 \001(\0132\'.goo" - + "gle.cloud.language.v1beta2.DocumentB\003\340A\002" - + "\022R\n\010features\030\002 \001(\0132;.google.cloud.langua" - + "ge.v1beta2.AnnotateTextRequest.FeaturesB" - + "\003\340A\002\022B\n\rencoding_type\030\003 \001(\0162+.google.clo" - + "ud.language.v1beta2.EncodingType\032\231\001\n\010Fea" - + "tures\022\026\n\016extract_syntax\030\001 \001(\010\022\030\n\020extract" - + "_entities\030\002 \001(\010\022\"\n\032extract_document_sent" - + "iment\030\003 \001(\010\022 \n\030extract_entity_sentiment\030" - + "\004 \001(\010\022\025\n\rclassify_text\030\006 \001(\010\"\344\002\n\024Annotat" - + "eTextResponse\022:\n\tsentences\030\001 \003(\0132\'.googl" - + "e.cloud.language.v1beta2.Sentence\0224\n\006tok" - + "ens\030\002 \003(\0132$.google.cloud.language.v1beta" - + "2.Token\0227\n\010entities\030\003 \003(\0132%.google.cloud" - + ".language.v1beta2.Entity\022D\n\022document_sen" - + "timent\030\004 \001(\0132(.google.cloud.language.v1b" - + "eta2.Sentiment\022\020\n\010language\030\005 \001(\t\022I\n\ncate" - + "gories\030\006 \003(\01325.google.cloud.language.v1b" - + "eta2.ClassificationCategory*8\n\014EncodingT" - + "ype\022\010\n\004NONE\020\000\022\010\n\004UTF8\020\001\022\t\n\005UTF16\020\002\022\t\n\005UT" - + "F32\020\0032\212\013\n\017LanguageService\022\327\001\n\020AnalyzeSen" - + "timent\0226.google.cloud.language.v1beta2.A" - + "nalyzeSentimentRequest\0327.google.cloud.la" - + "nguage.v1beta2.AnalyzeSentimentResponse\"" - + "R\202\323\344\223\002(\"#/v1beta2/documents:analyzeSenti" - + "ment:\001*\332A\026document,encoding_type\332A\010docum" - + "ent\022\323\001\n\017AnalyzeEntities\0225.google.cloud.l" - + "anguage.v1beta2.AnalyzeEntitiesRequest\0326" - + ".google.cloud.language.v1beta2.AnalyzeEn" - + "titiesResponse\"Q\202\323\344\223\002\'\"\"/v1beta2/documen" - + "ts:analyzeEntities:\001*\332A\026document,encodin" - + "g_type\332A\010document\022\357\001\n\026AnalyzeEntitySenti" - + "ment\022<.google.cloud.language.v1beta2.Ana" - + "lyzeEntitySentimentRequest\032=.google.clou" - + "d.language.v1beta2.AnalyzeEntitySentimen" - + "tResponse\"X\202\323\344\223\002.\")/v1beta2/documents:an" - + "alyzeEntitySentiment:\001*\332A\026document,encod" - + "ing_type\332A\010document\022\313\001\n\rAnalyzeSyntax\0223." - + "google.cloud.language.v1beta2.AnalyzeSyn" - + "taxRequest\0324.google.cloud.language.v1bet" - + "a2.AnalyzeSyntaxResponse\"O\202\323\344\223\002%\" /v1bet" - + "a2/documents:analyzeSyntax:\001*\332A\026document" - + ",encoding_type\332A\010document\022\256\001\n\014ClassifyTe" - + "xt\0222.google.cloud.language.v1beta2.Class" - + "ifyTextRequest\0323.google.cloud.language.v" - + "1beta2.ClassifyTextResponse\"5\202\323\344\223\002$\"\037/v1" - + "beta2/documents:classifyText:\001*\332A\010docume" - + "nt\022\331\001\n\014AnnotateText\0222.google.cloud.langu" - + "age.v1beta2.AnnotateTextRequest\0323.google" - + ".cloud.language.v1beta2.AnnotateTextResp" - + "onse\"`\202\323\344\223\002$\"\037/v1beta2/documents:annotat" - + "eText:\001*\332A\037document,features,encoding_ty" - + "pe\332A\021document,features\032z\312A\027language.goog" - + "leapis.com\322A]https://www.googleapis.com/" - + "auth/cloud-language,https://www.googleap" - + "is.com/auth/cloud-platformB\202\001\n!com.googl" - + "e.cloud.language.v1beta2B\024LanguageServic" - + "eProtoP\001ZEgoogle.golang.org/genproto/goo" - + "gleapis/cloud/language/v1beta2;languageb" - + "\006proto3" + + "dingType\"k\n\036AnalyzeEntitySentimentRespon" + + "se\0227\n\010entities\030\001 \003(\0132%.google.cloud.lang" + + "uage.v1beta2.Entity\022\020\n\010language\030\002 \001(\t\"\234\001" + + "\n\026AnalyzeEntitiesRequest\022>\n\010document\030\001 \001" + + "(\0132\'.google.cloud.language.v1beta2.Docum" + + "entB\003\340A\002\022B\n\rencoding_type\030\002 \001(\0162+.google" + + ".cloud.language.v1beta2.EncodingType\"d\n\027" + + "AnalyzeEntitiesResponse\0227\n\010entities\030\001 \003(" + + "\0132%.google.cloud.language.v1beta2.Entity" + + "\022\020\n\010language\030\002 \001(\t\"\232\001\n\024AnalyzeSyntaxRequ" + + "est\022>\n\010document\030\001 \001(\0132\'.google.cloud.lan" + + "guage.v1beta2.DocumentB\003\340A\002\022B\n\rencoding_" + + "type\030\002 \001(\0162+.google.cloud.language.v1bet" + + "a2.EncodingType\"\233\001\n\025AnalyzeSyntaxRespons" + + "e\022:\n\tsentences\030\001 \003(\0132\'.google.cloud.lang" + + "uage.v1beta2.Sentence\0224\n\006tokens\030\002 \003(\0132$." + + "google.cloud.language.v1beta2.Token\022\020\n\010l" + + "anguage\030\003 \001(\t\"U\n\023ClassifyTextRequest\022>\n\010" + + "document\030\001 \001(\0132\'.google.cloud.language.v" + + "1beta2.DocumentB\003\340A\002\"a\n\024ClassifyTextResp" + + "onse\022I\n\ncategories\030\001 \003(\01325.google.cloud." + + "language.v1beta2.ClassificationCategory\"" + + "\211\003\n\023AnnotateTextRequest\022>\n\010document\030\001 \001(" + + "\0132\'.google.cloud.language.v1beta2.Docume" + + "ntB\003\340A\002\022R\n\010features\030\002 \001(\0132;.google.cloud" + + ".language.v1beta2.AnnotateTextRequest.Fe" + + "aturesB\003\340A\002\022B\n\rencoding_type\030\003 \001(\0162+.goo" + + "gle.cloud.language.v1beta2.EncodingType\032" + + "\231\001\n\010Features\022\026\n\016extract_syntax\030\001 \001(\010\022\030\n\020" + + "extract_entities\030\002 \001(\010\022\"\n\032extract_docume" + + "nt_sentiment\030\003 \001(\010\022 \n\030extract_entity_sen" + + "timent\030\004 \001(\010\022\025\n\rclassify_text\030\006 \001(\010\"\344\002\n\024" + + "AnnotateTextResponse\022:\n\tsentences\030\001 \003(\0132" + + "\'.google.cloud.language.v1beta2.Sentence" + + "\0224\n\006tokens\030\002 \003(\0132$.google.cloud.language" + + ".v1beta2.Token\0227\n\010entities\030\003 \003(\0132%.googl" + + "e.cloud.language.v1beta2.Entity\022D\n\022docum" + + "ent_sentiment\030\004 \001(\0132(.google.cloud.langu" + + "age.v1beta2.Sentiment\022\020\n\010language\030\005 \001(\t\022" + + "I\n\ncategories\030\006 \003(\01325.google.cloud.langu" + + "age.v1beta2.ClassificationCategory*8\n\014En" + + "codingType\022\010\n\004NONE\020\000\022\010\n\004UTF8\020\001\022\t\n\005UTF16\020" + + "\002\022\t\n\005UTF32\020\0032\212\013\n\017LanguageService\022\327\001\n\020Ana" + + "lyzeSentiment\0226.google.cloud.language.v1" + + "beta2.AnalyzeSentimentRequest\0327.google.c" + + "loud.language.v1beta2.AnalyzeSentimentRe" + + "sponse\"R\202\323\344\223\002(\"#/v1beta2/documents:analy" + + "zeSentiment:\001*\332A\026document,encoding_type\332" + + "A\010document\022\323\001\n\017AnalyzeEntities\0225.google." + + "cloud.language.v1beta2.AnalyzeEntitiesRe" + + "quest\0326.google.cloud.language.v1beta2.An" + + "alyzeEntitiesResponse\"Q\202\323\344\223\002\'\"\"/v1beta2/" + + "documents:analyzeEntities:\001*\332A\026document," + + "encoding_type\332A\010document\022\357\001\n\026AnalyzeEnti" + + "tySentiment\022<.google.cloud.language.v1be" + + "ta2.AnalyzeEntitySentimentRequest\032=.goog" + + "le.cloud.language.v1beta2.AnalyzeEntityS" + + "entimentResponse\"X\202\323\344\223\002.\")/v1beta2/docum" + + "ents:analyzeEntitySentiment:\001*\332A\026documen" + + "t,encoding_type\332A\010document\022\313\001\n\rAnalyzeSy" + + "ntax\0223.google.cloud.language.v1beta2.Ana" + + "lyzeSyntaxRequest\0324.google.cloud.languag" + + "e.v1beta2.AnalyzeSyntaxResponse\"O\202\323\344\223\002%\"" + + " /v1beta2/documents:analyzeSyntax:\001*\332A\026d" + + "ocument,encoding_type\332A\010document\022\256\001\n\014Cla" + + "ssifyText\0222.google.cloud.language.v1beta" + + "2.ClassifyTextRequest\0323.google.cloud.lan" + + "guage.v1beta2.ClassifyTextResponse\"5\202\323\344\223" + + "\002$\"\037/v1beta2/documents:classifyText:\001*\332A" + + "\010document\022\331\001\n\014AnnotateText\0222.google.clou" + + "d.language.v1beta2.AnnotateTextRequest\0323" + + ".google.cloud.language.v1beta2.AnnotateT" + + "extResponse\"`\202\323\344\223\002$\"\037/v1beta2/documents:" + + "annotateText:\001*\332A\037document,features,enco" + + "ding_type\332A\021document,features\032z\312A\027langua" + + "ge.googleapis.com\322A]https://www.googleap" + + "is.com/auth/cloud-language,https://www.g" + + "oogleapis.com/auth/cloud-platformB\202\001\n!co" + + "m.google.cloud.language.v1beta2B\024Languag" + + "eServiceProtoP\001ZEgoogle.golang.org/genpr" + + "oto/googleapis/cloud/language/v1beta2;la" + + "nguageb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -357,7 +356,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.AnnotationsProto.getDescriptor(), com.google.api.ClientProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), }); internal_static_google_cloud_language_v1beta2_Document_descriptor = getDescriptor().getMessageTypes().get(0); @@ -580,7 +578,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.AnnotationsProto.getDescriptor(); com.google.api.ClientProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-language-v1beta2/src/main/proto/google/cloud/language/v1beta2/language_service.proto b/proto-google-cloud-language-v1beta2/src/main/proto/google/cloud/language/v1beta2/language_service.proto index bd4167a3..7d77376e 100644 --- a/proto-google-cloud-language-v1beta2/src/main/proto/google/cloud/language/v1beta2/language_service.proto +++ b/proto-google-cloud-language-v1beta2/src/main/proto/google/cloud/language/v1beta2/language_service.proto @@ -20,7 +20,6 @@ package google.cloud.language.v1beta2; import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; -import "google/protobuf/timestamp.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/language/v1beta2;language"; option java_multiple_files = true; diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index ee3ad300..ad2c5a93 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-language - 2.3.0 + 2.3.2 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 1054e1e1..db48c087 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-language - 2.3.0 + 2.3.2 diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentities/AsyncAnalyzeEntities.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentities/AsyncAnalyzeEntities.java new file mode 100644 index 00000000..c5dcde02 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentities/AsyncAnalyzeEntities.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1.samples; + +// [START language_v1_generated_languageserviceclient_analyzeentities_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.language.v1.AnalyzeEntitiesRequest; +import com.google.cloud.language.v1.AnalyzeEntitiesResponse; +import com.google.cloud.language.v1.Document; +import com.google.cloud.language.v1.EncodingType; +import com.google.cloud.language.v1.LanguageServiceClient; + +public class AsyncAnalyzeEntities { + + public static void main(String[] args) throws Exception { + asyncAnalyzeEntities(); + } + + public static void asyncAnalyzeEntities() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + AnalyzeEntitiesRequest request = + AnalyzeEntitiesRequest.newBuilder() + .setDocument(Document.newBuilder().build()) + .setEncodingType(EncodingType.forNumber(0)) + .build(); + ApiFuture future = + languageServiceClient.analyzeEntitiesCallable().futureCall(request); + // Do something. + AnalyzeEntitiesResponse response = future.get(); + } + } +} +// [END language_v1_generated_languageserviceclient_analyzeentities_async] diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentities/SyncAnalyzeEntities.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentities/SyncAnalyzeEntities.java new file mode 100644 index 00000000..647da31d --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentities/SyncAnalyzeEntities.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1.samples; + +// [START language_v1_generated_languageserviceclient_analyzeentities_sync] +import com.google.cloud.language.v1.AnalyzeEntitiesRequest; +import com.google.cloud.language.v1.AnalyzeEntitiesResponse; +import com.google.cloud.language.v1.Document; +import com.google.cloud.language.v1.EncodingType; +import com.google.cloud.language.v1.LanguageServiceClient; + +public class SyncAnalyzeEntities { + + public static void main(String[] args) throws Exception { + syncAnalyzeEntities(); + } + + public static void syncAnalyzeEntities() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + AnalyzeEntitiesRequest request = + AnalyzeEntitiesRequest.newBuilder() + .setDocument(Document.newBuilder().build()) + .setEncodingType(EncodingType.forNumber(0)) + .build(); + AnalyzeEntitiesResponse response = languageServiceClient.analyzeEntities(request); + } + } +} +// [END language_v1_generated_languageserviceclient_analyzeentities_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentities/SyncAnalyzeEntitiesDocument.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentities/SyncAnalyzeEntitiesDocument.java new file mode 100644 index 00000000..6979956c --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentities/SyncAnalyzeEntitiesDocument.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1.samples; + +// [START language_v1_generated_languageserviceclient_analyzeentities_document_sync] +import com.google.cloud.language.v1.AnalyzeEntitiesResponse; +import com.google.cloud.language.v1.Document; +import com.google.cloud.language.v1.LanguageServiceClient; + +public class SyncAnalyzeEntitiesDocument { + + public static void main(String[] args) throws Exception { + syncAnalyzeEntitiesDocument(); + } + + public static void syncAnalyzeEntitiesDocument() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + Document document = Document.newBuilder().build(); + AnalyzeEntitiesResponse response = languageServiceClient.analyzeEntities(document); + } + } +} +// [END language_v1_generated_languageserviceclient_analyzeentities_document_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentities/SyncAnalyzeEntitiesDocumentEncodingtype.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentities/SyncAnalyzeEntitiesDocumentEncodingtype.java new file mode 100644 index 00000000..c0c55004 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentities/SyncAnalyzeEntitiesDocumentEncodingtype.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1.samples; + +// [START language_v1_generated_languageserviceclient_analyzeentities_documentencodingtype_sync] +import com.google.cloud.language.v1.AnalyzeEntitiesResponse; +import com.google.cloud.language.v1.Document; +import com.google.cloud.language.v1.EncodingType; +import com.google.cloud.language.v1.LanguageServiceClient; + +public class SyncAnalyzeEntitiesDocumentEncodingtype { + + public static void main(String[] args) throws Exception { + syncAnalyzeEntitiesDocumentEncodingtype(); + } + + public static void syncAnalyzeEntitiesDocumentEncodingtype() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + Document document = Document.newBuilder().build(); + EncodingType encodingType = EncodingType.forNumber(0); + AnalyzeEntitiesResponse response = + languageServiceClient.analyzeEntities(document, encodingType); + } + } +} +// [END language_v1_generated_languageserviceclient_analyzeentities_documentencodingtype_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentitysentiment/AsyncAnalyzeEntitySentiment.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentitysentiment/AsyncAnalyzeEntitySentiment.java new file mode 100644 index 00000000..0b0c3d03 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentitysentiment/AsyncAnalyzeEntitySentiment.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1.samples; + +// [START language_v1_generated_languageserviceclient_analyzeentitysentiment_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.language.v1.AnalyzeEntitySentimentRequest; +import com.google.cloud.language.v1.AnalyzeEntitySentimentResponse; +import com.google.cloud.language.v1.Document; +import com.google.cloud.language.v1.EncodingType; +import com.google.cloud.language.v1.LanguageServiceClient; + +public class AsyncAnalyzeEntitySentiment { + + public static void main(String[] args) throws Exception { + asyncAnalyzeEntitySentiment(); + } + + public static void asyncAnalyzeEntitySentiment() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + AnalyzeEntitySentimentRequest request = + AnalyzeEntitySentimentRequest.newBuilder() + .setDocument(Document.newBuilder().build()) + .setEncodingType(EncodingType.forNumber(0)) + .build(); + ApiFuture future = + languageServiceClient.analyzeEntitySentimentCallable().futureCall(request); + // Do something. + AnalyzeEntitySentimentResponse response = future.get(); + } + } +} +// [END language_v1_generated_languageserviceclient_analyzeentitysentiment_async] diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentiment.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentiment.java new file mode 100644 index 00000000..81ea2d78 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentiment.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1.samples; + +// [START language_v1_generated_languageserviceclient_analyzeentitysentiment_sync] +import com.google.cloud.language.v1.AnalyzeEntitySentimentRequest; +import com.google.cloud.language.v1.AnalyzeEntitySentimentResponse; +import com.google.cloud.language.v1.Document; +import com.google.cloud.language.v1.EncodingType; +import com.google.cloud.language.v1.LanguageServiceClient; + +public class SyncAnalyzeEntitySentiment { + + public static void main(String[] args) throws Exception { + syncAnalyzeEntitySentiment(); + } + + public static void syncAnalyzeEntitySentiment() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + AnalyzeEntitySentimentRequest request = + AnalyzeEntitySentimentRequest.newBuilder() + .setDocument(Document.newBuilder().build()) + .setEncodingType(EncodingType.forNumber(0)) + .build(); + AnalyzeEntitySentimentResponse response = + languageServiceClient.analyzeEntitySentiment(request); + } + } +} +// [END language_v1_generated_languageserviceclient_analyzeentitysentiment_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentimentDocument.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentimentDocument.java new file mode 100644 index 00000000..a5c73d8a --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentimentDocument.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1.samples; + +// [START language_v1_generated_languageserviceclient_analyzeentitysentiment_document_sync] +import com.google.cloud.language.v1.AnalyzeEntitySentimentResponse; +import com.google.cloud.language.v1.Document; +import com.google.cloud.language.v1.LanguageServiceClient; + +public class SyncAnalyzeEntitySentimentDocument { + + public static void main(String[] args) throws Exception { + syncAnalyzeEntitySentimentDocument(); + } + + public static void syncAnalyzeEntitySentimentDocument() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + Document document = Document.newBuilder().build(); + AnalyzeEntitySentimentResponse response = + languageServiceClient.analyzeEntitySentiment(document); + } + } +} +// [END language_v1_generated_languageserviceclient_analyzeentitysentiment_document_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentimentDocumentEncodingtype.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentimentDocumentEncodingtype.java new file mode 100644 index 00000000..f31ef23e --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentimentDocumentEncodingtype.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1.samples; + +// [START language_v1_generated_languageserviceclient_analyzeentitysentiment_documentencodingtype_sync] +import com.google.cloud.language.v1.AnalyzeEntitySentimentResponse; +import com.google.cloud.language.v1.Document; +import com.google.cloud.language.v1.EncodingType; +import com.google.cloud.language.v1.LanguageServiceClient; + +public class SyncAnalyzeEntitySentimentDocumentEncodingtype { + + public static void main(String[] args) throws Exception { + syncAnalyzeEntitySentimentDocumentEncodingtype(); + } + + public static void syncAnalyzeEntitySentimentDocumentEncodingtype() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + Document document = Document.newBuilder().build(); + EncodingType encodingType = EncodingType.forNumber(0); + AnalyzeEntitySentimentResponse response = + languageServiceClient.analyzeEntitySentiment(document, encodingType); + } + } +} +// [END language_v1_generated_languageserviceclient_analyzeentitysentiment_documentencodingtype_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesentiment/AsyncAnalyzeSentiment.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesentiment/AsyncAnalyzeSentiment.java new file mode 100644 index 00000000..0e5cd648 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesentiment/AsyncAnalyzeSentiment.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1.samples; + +// [START language_v1_generated_languageserviceclient_analyzesentiment_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.language.v1.AnalyzeSentimentRequest; +import com.google.cloud.language.v1.AnalyzeSentimentResponse; +import com.google.cloud.language.v1.Document; +import com.google.cloud.language.v1.EncodingType; +import com.google.cloud.language.v1.LanguageServiceClient; + +public class AsyncAnalyzeSentiment { + + public static void main(String[] args) throws Exception { + asyncAnalyzeSentiment(); + } + + public static void asyncAnalyzeSentiment() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + AnalyzeSentimentRequest request = + AnalyzeSentimentRequest.newBuilder() + .setDocument(Document.newBuilder().build()) + .setEncodingType(EncodingType.forNumber(0)) + .build(); + ApiFuture future = + languageServiceClient.analyzeSentimentCallable().futureCall(request); + // Do something. + AnalyzeSentimentResponse response = future.get(); + } + } +} +// [END language_v1_generated_languageserviceclient_analyzesentiment_async] diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesentiment/SyncAnalyzeSentiment.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesentiment/SyncAnalyzeSentiment.java new file mode 100644 index 00000000..8b19f3ee --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesentiment/SyncAnalyzeSentiment.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1.samples; + +// [START language_v1_generated_languageserviceclient_analyzesentiment_sync] +import com.google.cloud.language.v1.AnalyzeSentimentRequest; +import com.google.cloud.language.v1.AnalyzeSentimentResponse; +import com.google.cloud.language.v1.Document; +import com.google.cloud.language.v1.EncodingType; +import com.google.cloud.language.v1.LanguageServiceClient; + +public class SyncAnalyzeSentiment { + + public static void main(String[] args) throws Exception { + syncAnalyzeSentiment(); + } + + public static void syncAnalyzeSentiment() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + AnalyzeSentimentRequest request = + AnalyzeSentimentRequest.newBuilder() + .setDocument(Document.newBuilder().build()) + .setEncodingType(EncodingType.forNumber(0)) + .build(); + AnalyzeSentimentResponse response = languageServiceClient.analyzeSentiment(request); + } + } +} +// [END language_v1_generated_languageserviceclient_analyzesentiment_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesentiment/SyncAnalyzeSentimentDocument.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesentiment/SyncAnalyzeSentimentDocument.java new file mode 100644 index 00000000..faaf05a0 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesentiment/SyncAnalyzeSentimentDocument.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1.samples; + +// [START language_v1_generated_languageserviceclient_analyzesentiment_document_sync] +import com.google.cloud.language.v1.AnalyzeSentimentResponse; +import com.google.cloud.language.v1.Document; +import com.google.cloud.language.v1.LanguageServiceClient; + +public class SyncAnalyzeSentimentDocument { + + public static void main(String[] args) throws Exception { + syncAnalyzeSentimentDocument(); + } + + public static void syncAnalyzeSentimentDocument() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + Document document = Document.newBuilder().build(); + AnalyzeSentimentResponse response = languageServiceClient.analyzeSentiment(document); + } + } +} +// [END language_v1_generated_languageserviceclient_analyzesentiment_document_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesentiment/SyncAnalyzeSentimentDocumentEncodingtype.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesentiment/SyncAnalyzeSentimentDocumentEncodingtype.java new file mode 100644 index 00000000..3b2c8764 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesentiment/SyncAnalyzeSentimentDocumentEncodingtype.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1.samples; + +// [START language_v1_generated_languageserviceclient_analyzesentiment_documentencodingtype_sync] +import com.google.cloud.language.v1.AnalyzeSentimentResponse; +import com.google.cloud.language.v1.Document; +import com.google.cloud.language.v1.EncodingType; +import com.google.cloud.language.v1.LanguageServiceClient; + +public class SyncAnalyzeSentimentDocumentEncodingtype { + + public static void main(String[] args) throws Exception { + syncAnalyzeSentimentDocumentEncodingtype(); + } + + public static void syncAnalyzeSentimentDocumentEncodingtype() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + Document document = Document.newBuilder().build(); + EncodingType encodingType = EncodingType.forNumber(0); + AnalyzeSentimentResponse response = + languageServiceClient.analyzeSentiment(document, encodingType); + } + } +} +// [END language_v1_generated_languageserviceclient_analyzesentiment_documentencodingtype_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesyntax/AsyncAnalyzeSyntax.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesyntax/AsyncAnalyzeSyntax.java new file mode 100644 index 00000000..d5a7a3f5 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesyntax/AsyncAnalyzeSyntax.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1.samples; + +// [START language_v1_generated_languageserviceclient_analyzesyntax_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.language.v1.AnalyzeSyntaxRequest; +import com.google.cloud.language.v1.AnalyzeSyntaxResponse; +import com.google.cloud.language.v1.Document; +import com.google.cloud.language.v1.EncodingType; +import com.google.cloud.language.v1.LanguageServiceClient; + +public class AsyncAnalyzeSyntax { + + public static void main(String[] args) throws Exception { + asyncAnalyzeSyntax(); + } + + public static void asyncAnalyzeSyntax() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + AnalyzeSyntaxRequest request = + AnalyzeSyntaxRequest.newBuilder() + .setDocument(Document.newBuilder().build()) + .setEncodingType(EncodingType.forNumber(0)) + .build(); + ApiFuture future = + languageServiceClient.analyzeSyntaxCallable().futureCall(request); + // Do something. + AnalyzeSyntaxResponse response = future.get(); + } + } +} +// [END language_v1_generated_languageserviceclient_analyzesyntax_async] diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesyntax/SyncAnalyzeSyntax.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesyntax/SyncAnalyzeSyntax.java new file mode 100644 index 00000000..52acf866 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesyntax/SyncAnalyzeSyntax.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1.samples; + +// [START language_v1_generated_languageserviceclient_analyzesyntax_sync] +import com.google.cloud.language.v1.AnalyzeSyntaxRequest; +import com.google.cloud.language.v1.AnalyzeSyntaxResponse; +import com.google.cloud.language.v1.Document; +import com.google.cloud.language.v1.EncodingType; +import com.google.cloud.language.v1.LanguageServiceClient; + +public class SyncAnalyzeSyntax { + + public static void main(String[] args) throws Exception { + syncAnalyzeSyntax(); + } + + public static void syncAnalyzeSyntax() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + AnalyzeSyntaxRequest request = + AnalyzeSyntaxRequest.newBuilder() + .setDocument(Document.newBuilder().build()) + .setEncodingType(EncodingType.forNumber(0)) + .build(); + AnalyzeSyntaxResponse response = languageServiceClient.analyzeSyntax(request); + } + } +} +// [END language_v1_generated_languageserviceclient_analyzesyntax_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesyntax/SyncAnalyzeSyntaxDocument.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesyntax/SyncAnalyzeSyntaxDocument.java new file mode 100644 index 00000000..8fdcce26 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesyntax/SyncAnalyzeSyntaxDocument.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1.samples; + +// [START language_v1_generated_languageserviceclient_analyzesyntax_document_sync] +import com.google.cloud.language.v1.AnalyzeSyntaxResponse; +import com.google.cloud.language.v1.Document; +import com.google.cloud.language.v1.LanguageServiceClient; + +public class SyncAnalyzeSyntaxDocument { + + public static void main(String[] args) throws Exception { + syncAnalyzeSyntaxDocument(); + } + + public static void syncAnalyzeSyntaxDocument() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + Document document = Document.newBuilder().build(); + AnalyzeSyntaxResponse response = languageServiceClient.analyzeSyntax(document); + } + } +} +// [END language_v1_generated_languageserviceclient_analyzesyntax_document_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesyntax/SyncAnalyzeSyntaxDocumentEncodingtype.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesyntax/SyncAnalyzeSyntaxDocumentEncodingtype.java new file mode 100644 index 00000000..3f461876 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesyntax/SyncAnalyzeSyntaxDocumentEncodingtype.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1.samples; + +// [START language_v1_generated_languageserviceclient_analyzesyntax_documentencodingtype_sync] +import com.google.cloud.language.v1.AnalyzeSyntaxResponse; +import com.google.cloud.language.v1.Document; +import com.google.cloud.language.v1.EncodingType; +import com.google.cloud.language.v1.LanguageServiceClient; + +public class SyncAnalyzeSyntaxDocumentEncodingtype { + + public static void main(String[] args) throws Exception { + syncAnalyzeSyntaxDocumentEncodingtype(); + } + + public static void syncAnalyzeSyntaxDocumentEncodingtype() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + Document document = Document.newBuilder().build(); + EncodingType encodingType = EncodingType.forNumber(0); + AnalyzeSyntaxResponse response = languageServiceClient.analyzeSyntax(document, encodingType); + } + } +} +// [END language_v1_generated_languageserviceclient_analyzesyntax_documentencodingtype_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/annotatetext/AsyncAnnotateText.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/annotatetext/AsyncAnnotateText.java new file mode 100644 index 00000000..e68d89cd --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/annotatetext/AsyncAnnotateText.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1.samples; + +// [START language_v1_generated_languageserviceclient_annotatetext_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.language.v1.AnnotateTextRequest; +import com.google.cloud.language.v1.AnnotateTextResponse; +import com.google.cloud.language.v1.Document; +import com.google.cloud.language.v1.EncodingType; +import com.google.cloud.language.v1.LanguageServiceClient; + +public class AsyncAnnotateText { + + public static void main(String[] args) throws Exception { + asyncAnnotateText(); + } + + public static void asyncAnnotateText() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + AnnotateTextRequest request = + AnnotateTextRequest.newBuilder() + .setDocument(Document.newBuilder().build()) + .setFeatures(AnnotateTextRequest.Features.newBuilder().build()) + .setEncodingType(EncodingType.forNumber(0)) + .build(); + ApiFuture future = + languageServiceClient.annotateTextCallable().futureCall(request); + // Do something. + AnnotateTextResponse response = future.get(); + } + } +} +// [END language_v1_generated_languageserviceclient_annotatetext_async] diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/annotatetext/SyncAnnotateText.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/annotatetext/SyncAnnotateText.java new file mode 100644 index 00000000..197561c1 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/annotatetext/SyncAnnotateText.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1.samples; + +// [START language_v1_generated_languageserviceclient_annotatetext_sync] +import com.google.cloud.language.v1.AnnotateTextRequest; +import com.google.cloud.language.v1.AnnotateTextResponse; +import com.google.cloud.language.v1.Document; +import com.google.cloud.language.v1.EncodingType; +import com.google.cloud.language.v1.LanguageServiceClient; + +public class SyncAnnotateText { + + public static void main(String[] args) throws Exception { + syncAnnotateText(); + } + + public static void syncAnnotateText() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + AnnotateTextRequest request = + AnnotateTextRequest.newBuilder() + .setDocument(Document.newBuilder().build()) + .setFeatures(AnnotateTextRequest.Features.newBuilder().build()) + .setEncodingType(EncodingType.forNumber(0)) + .build(); + AnnotateTextResponse response = languageServiceClient.annotateText(request); + } + } +} +// [END language_v1_generated_languageserviceclient_annotatetext_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/annotatetext/SyncAnnotateTextDocumentAnnotatetextrequestfeatures.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/annotatetext/SyncAnnotateTextDocumentAnnotatetextrequestfeatures.java new file mode 100644 index 00000000..8415a8f0 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/annotatetext/SyncAnnotateTextDocumentAnnotatetextrequestfeatures.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1.samples; + +// [START language_v1_generated_languageserviceclient_annotatetext_documentannotatetextrequestfeatures_sync] +import com.google.cloud.language.v1.AnnotateTextRequest; +import com.google.cloud.language.v1.AnnotateTextResponse; +import com.google.cloud.language.v1.Document; +import com.google.cloud.language.v1.LanguageServiceClient; + +public class SyncAnnotateTextDocumentAnnotatetextrequestfeatures { + + public static void main(String[] args) throws Exception { + syncAnnotateTextDocumentAnnotatetextrequestfeatures(); + } + + public static void syncAnnotateTextDocumentAnnotatetextrequestfeatures() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + Document document = Document.newBuilder().build(); + AnnotateTextRequest.Features features = AnnotateTextRequest.Features.newBuilder().build(); + AnnotateTextResponse response = languageServiceClient.annotateText(document, features); + } + } +} +// [END language_v1_generated_languageserviceclient_annotatetext_documentannotatetextrequestfeatures_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/annotatetext/SyncAnnotateTextDocumentAnnotatetextrequestfeaturesEncodingtype.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/annotatetext/SyncAnnotateTextDocumentAnnotatetextrequestfeaturesEncodingtype.java new file mode 100644 index 00000000..477c4b81 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/annotatetext/SyncAnnotateTextDocumentAnnotatetextrequestfeaturesEncodingtype.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1.samples; + +// [START language_v1_generated_languageserviceclient_annotatetext_documentannotatetextrequestfeaturesencodingtype_sync] +import com.google.cloud.language.v1.AnnotateTextRequest; +import com.google.cloud.language.v1.AnnotateTextResponse; +import com.google.cloud.language.v1.Document; +import com.google.cloud.language.v1.EncodingType; +import com.google.cloud.language.v1.LanguageServiceClient; + +public class SyncAnnotateTextDocumentAnnotatetextrequestfeaturesEncodingtype { + + public static void main(String[] args) throws Exception { + syncAnnotateTextDocumentAnnotatetextrequestfeaturesEncodingtype(); + } + + public static void syncAnnotateTextDocumentAnnotatetextrequestfeaturesEncodingtype() + throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + Document document = Document.newBuilder().build(); + AnnotateTextRequest.Features features = AnnotateTextRequest.Features.newBuilder().build(); + EncodingType encodingType = EncodingType.forNumber(0); + AnnotateTextResponse response = + languageServiceClient.annotateText(document, features, encodingType); + } + } +} +// [END language_v1_generated_languageserviceclient_annotatetext_documentannotatetextrequestfeaturesencodingtype_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/classifytext/AsyncClassifyText.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/classifytext/AsyncClassifyText.java new file mode 100644 index 00000000..f32f5513 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/classifytext/AsyncClassifyText.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1.samples; + +// [START language_v1_generated_languageserviceclient_classifytext_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.language.v1.ClassifyTextRequest; +import com.google.cloud.language.v1.ClassifyTextResponse; +import com.google.cloud.language.v1.Document; +import com.google.cloud.language.v1.LanguageServiceClient; + +public class AsyncClassifyText { + + public static void main(String[] args) throws Exception { + asyncClassifyText(); + } + + public static void asyncClassifyText() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + ClassifyTextRequest request = + ClassifyTextRequest.newBuilder().setDocument(Document.newBuilder().build()).build(); + ApiFuture future = + languageServiceClient.classifyTextCallable().futureCall(request); + // Do something. + ClassifyTextResponse response = future.get(); + } + } +} +// [END language_v1_generated_languageserviceclient_classifytext_async] diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/classifytext/SyncClassifyText.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/classifytext/SyncClassifyText.java new file mode 100644 index 00000000..71cc2b42 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/classifytext/SyncClassifyText.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1.samples; + +// [START language_v1_generated_languageserviceclient_classifytext_sync] +import com.google.cloud.language.v1.ClassifyTextRequest; +import com.google.cloud.language.v1.ClassifyTextResponse; +import com.google.cloud.language.v1.Document; +import com.google.cloud.language.v1.LanguageServiceClient; + +public class SyncClassifyText { + + public static void main(String[] args) throws Exception { + syncClassifyText(); + } + + public static void syncClassifyText() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + ClassifyTextRequest request = + ClassifyTextRequest.newBuilder().setDocument(Document.newBuilder().build()).build(); + ClassifyTextResponse response = languageServiceClient.classifyText(request); + } + } +} +// [END language_v1_generated_languageserviceclient_classifytext_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/classifytext/SyncClassifyTextDocument.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/classifytext/SyncClassifyTextDocument.java new file mode 100644 index 00000000..dc264b7b --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/classifytext/SyncClassifyTextDocument.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1.samples; + +// [START language_v1_generated_languageserviceclient_classifytext_document_sync] +import com.google.cloud.language.v1.ClassifyTextResponse; +import com.google.cloud.language.v1.Document; +import com.google.cloud.language.v1.LanguageServiceClient; + +public class SyncClassifyTextDocument { + + public static void main(String[] args) throws Exception { + syncClassifyTextDocument(); + } + + public static void syncClassifyTextDocument() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + Document document = Document.newBuilder().build(); + ClassifyTextResponse response = languageServiceClient.classifyText(document); + } + } +} +// [END language_v1_generated_languageserviceclient_classifytext_document_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 00000000..5affb679 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1.samples; + +// [START language_v1_generated_languageserviceclient_create_setcredentialsprovider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.language.v1.LanguageServiceClient; +import com.google.cloud.language.v1.LanguageServiceSettings; +import com.google.cloud.language.v1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + LanguageServiceSettings languageServiceSettings = + LanguageServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + LanguageServiceClient languageServiceClient = + LanguageServiceClient.create(languageServiceSettings); + } +} +// [END language_v1_generated_languageserviceclient_create_setcredentialsprovider_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 00000000..5557835f --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1.samples; + +// [START language_v1_generated_languageserviceclient_create_setcredentialsprovider1_sync] +import com.google.cloud.language.v1.LanguageServiceClient; +import com.google.cloud.language.v1.LanguageServiceSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + LanguageServiceSettings languageServiceSettings = + LanguageServiceSettings.newBuilder() + .setTransportChannelProvider( + LanguageServiceSettings.defaultHttpJsonTransportProviderBuilder().build()) + .build(); + LanguageServiceClient languageServiceClient = + LanguageServiceClient.create(languageServiceSettings); + } +} +// [END language_v1_generated_languageserviceclient_create_setcredentialsprovider1_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/create/SyncCreateSetEndpoint.java new file mode 100644 index 00000000..e24ecbe8 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/create/SyncCreateSetEndpoint.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1.samples; + +// [START language_v1_generated_languageserviceclient_create_setendpoint_sync] +import com.google.cloud.language.v1.LanguageServiceClient; +import com.google.cloud.language.v1.LanguageServiceSettings; +import com.google.cloud.language.v1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + LanguageServiceSettings languageServiceSettings = + LanguageServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + LanguageServiceClient languageServiceClient = + LanguageServiceClient.create(languageServiceSettings); + } +} +// [END language_v1_generated_languageserviceclient_create_setendpoint_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageservicesettings/analyzesentiment/SyncAnalyzeSentiment.java b/samples/snippets/generated/com/google/cloud/language/v1/languageservicesettings/analyzesentiment/SyncAnalyzeSentiment.java new file mode 100644 index 00000000..00da3016 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageservicesettings/analyzesentiment/SyncAnalyzeSentiment.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1.samples; + +// [START language_v1_generated_languageservicesettings_analyzesentiment_sync] +import com.google.cloud.language.v1.LanguageServiceSettings; +import java.time.Duration; + +public class SyncAnalyzeSentiment { + + public static void main(String[] args) throws Exception { + syncAnalyzeSentiment(); + } + + public static void syncAnalyzeSentiment() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + LanguageServiceSettings.Builder languageServiceSettingsBuilder = + LanguageServiceSettings.newBuilder(); + languageServiceSettingsBuilder + .analyzeSentimentSettings() + .setRetrySettings( + languageServiceSettingsBuilder + .analyzeSentimentSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + LanguageServiceSettings languageServiceSettings = languageServiceSettingsBuilder.build(); + } +} +// [END language_v1_generated_languageservicesettings_analyzesentiment_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1/stub/languageservicestubsettings/analyzesentiment/SyncAnalyzeSentiment.java b/samples/snippets/generated/com/google/cloud/language/v1/stub/languageservicestubsettings/analyzesentiment/SyncAnalyzeSentiment.java new file mode 100644 index 00000000..bee72673 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1/stub/languageservicestubsettings/analyzesentiment/SyncAnalyzeSentiment.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1.stub.samples; + +// [START language_v1_generated_languageservicestubsettings_analyzesentiment_sync] +import com.google.cloud.language.v1.stub.LanguageServiceStubSettings; +import java.time.Duration; + +public class SyncAnalyzeSentiment { + + public static void main(String[] args) throws Exception { + syncAnalyzeSentiment(); + } + + public static void syncAnalyzeSentiment() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + LanguageServiceStubSettings.Builder languageServiceSettingsBuilder = + LanguageServiceStubSettings.newBuilder(); + languageServiceSettingsBuilder + .analyzeSentimentSettings() + .setRetrySettings( + languageServiceSettingsBuilder + .analyzeSentimentSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + LanguageServiceStubSettings languageServiceSettings = languageServiceSettingsBuilder.build(); + } +} +// [END language_v1_generated_languageservicestubsettings_analyzesentiment_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentities/AsyncAnalyzeEntities.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentities/AsyncAnalyzeEntities.java new file mode 100644 index 00000000..428a0a5a --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentities/AsyncAnalyzeEntities.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1beta2.samples; + +// [START language_v1beta2_generated_languageserviceclient_analyzeentities_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.language.v1beta2.AnalyzeEntitiesRequest; +import com.google.cloud.language.v1beta2.AnalyzeEntitiesResponse; +import com.google.cloud.language.v1beta2.Document; +import com.google.cloud.language.v1beta2.EncodingType; +import com.google.cloud.language.v1beta2.LanguageServiceClient; + +public class AsyncAnalyzeEntities { + + public static void main(String[] args) throws Exception { + asyncAnalyzeEntities(); + } + + public static void asyncAnalyzeEntities() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + AnalyzeEntitiesRequest request = + AnalyzeEntitiesRequest.newBuilder() + .setDocument(Document.newBuilder().build()) + .setEncodingType(EncodingType.forNumber(0)) + .build(); + ApiFuture future = + languageServiceClient.analyzeEntitiesCallable().futureCall(request); + // Do something. + AnalyzeEntitiesResponse response = future.get(); + } + } +} +// [END language_v1beta2_generated_languageserviceclient_analyzeentities_async] diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentities/SyncAnalyzeEntities.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentities/SyncAnalyzeEntities.java new file mode 100644 index 00000000..a9f9c8e9 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentities/SyncAnalyzeEntities.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1beta2.samples; + +// [START language_v1beta2_generated_languageserviceclient_analyzeentities_sync] +import com.google.cloud.language.v1beta2.AnalyzeEntitiesRequest; +import com.google.cloud.language.v1beta2.AnalyzeEntitiesResponse; +import com.google.cloud.language.v1beta2.Document; +import com.google.cloud.language.v1beta2.EncodingType; +import com.google.cloud.language.v1beta2.LanguageServiceClient; + +public class SyncAnalyzeEntities { + + public static void main(String[] args) throws Exception { + syncAnalyzeEntities(); + } + + public static void syncAnalyzeEntities() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + AnalyzeEntitiesRequest request = + AnalyzeEntitiesRequest.newBuilder() + .setDocument(Document.newBuilder().build()) + .setEncodingType(EncodingType.forNumber(0)) + .build(); + AnalyzeEntitiesResponse response = languageServiceClient.analyzeEntities(request); + } + } +} +// [END language_v1beta2_generated_languageserviceclient_analyzeentities_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentities/SyncAnalyzeEntitiesDocument.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentities/SyncAnalyzeEntitiesDocument.java new file mode 100644 index 00000000..51684990 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentities/SyncAnalyzeEntitiesDocument.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1beta2.samples; + +// [START language_v1beta2_generated_languageserviceclient_analyzeentities_document_sync] +import com.google.cloud.language.v1beta2.AnalyzeEntitiesResponse; +import com.google.cloud.language.v1beta2.Document; +import com.google.cloud.language.v1beta2.LanguageServiceClient; + +public class SyncAnalyzeEntitiesDocument { + + public static void main(String[] args) throws Exception { + syncAnalyzeEntitiesDocument(); + } + + public static void syncAnalyzeEntitiesDocument() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + Document document = Document.newBuilder().build(); + AnalyzeEntitiesResponse response = languageServiceClient.analyzeEntities(document); + } + } +} +// [END language_v1beta2_generated_languageserviceclient_analyzeentities_document_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentities/SyncAnalyzeEntitiesDocumentEncodingtype.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentities/SyncAnalyzeEntitiesDocumentEncodingtype.java new file mode 100644 index 00000000..5683d97c --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentities/SyncAnalyzeEntitiesDocumentEncodingtype.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1beta2.samples; + +// [START language_v1beta2_generated_languageserviceclient_analyzeentities_documentencodingtype_sync] +import com.google.cloud.language.v1beta2.AnalyzeEntitiesResponse; +import com.google.cloud.language.v1beta2.Document; +import com.google.cloud.language.v1beta2.EncodingType; +import com.google.cloud.language.v1beta2.LanguageServiceClient; + +public class SyncAnalyzeEntitiesDocumentEncodingtype { + + public static void main(String[] args) throws Exception { + syncAnalyzeEntitiesDocumentEncodingtype(); + } + + public static void syncAnalyzeEntitiesDocumentEncodingtype() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + Document document = Document.newBuilder().build(); + EncodingType encodingType = EncodingType.forNumber(0); + AnalyzeEntitiesResponse response = + languageServiceClient.analyzeEntities(document, encodingType); + } + } +} +// [END language_v1beta2_generated_languageserviceclient_analyzeentities_documentencodingtype_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentitysentiment/AsyncAnalyzeEntitySentiment.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentitysentiment/AsyncAnalyzeEntitySentiment.java new file mode 100644 index 00000000..fa5214d0 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentitysentiment/AsyncAnalyzeEntitySentiment.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1beta2.samples; + +// [START language_v1beta2_generated_languageserviceclient_analyzeentitysentiment_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest; +import com.google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse; +import com.google.cloud.language.v1beta2.Document; +import com.google.cloud.language.v1beta2.EncodingType; +import com.google.cloud.language.v1beta2.LanguageServiceClient; + +public class AsyncAnalyzeEntitySentiment { + + public static void main(String[] args) throws Exception { + asyncAnalyzeEntitySentiment(); + } + + public static void asyncAnalyzeEntitySentiment() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + AnalyzeEntitySentimentRequest request = + AnalyzeEntitySentimentRequest.newBuilder() + .setDocument(Document.newBuilder().build()) + .setEncodingType(EncodingType.forNumber(0)) + .build(); + ApiFuture future = + languageServiceClient.analyzeEntitySentimentCallable().futureCall(request); + // Do something. + AnalyzeEntitySentimentResponse response = future.get(); + } + } +} +// [END language_v1beta2_generated_languageserviceclient_analyzeentitysentiment_async] diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentiment.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentiment.java new file mode 100644 index 00000000..0c934d0b --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentiment.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1beta2.samples; + +// [START language_v1beta2_generated_languageserviceclient_analyzeentitysentiment_sync] +import com.google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest; +import com.google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse; +import com.google.cloud.language.v1beta2.Document; +import com.google.cloud.language.v1beta2.EncodingType; +import com.google.cloud.language.v1beta2.LanguageServiceClient; + +public class SyncAnalyzeEntitySentiment { + + public static void main(String[] args) throws Exception { + syncAnalyzeEntitySentiment(); + } + + public static void syncAnalyzeEntitySentiment() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + AnalyzeEntitySentimentRequest request = + AnalyzeEntitySentimentRequest.newBuilder() + .setDocument(Document.newBuilder().build()) + .setEncodingType(EncodingType.forNumber(0)) + .build(); + AnalyzeEntitySentimentResponse response = + languageServiceClient.analyzeEntitySentiment(request); + } + } +} +// [END language_v1beta2_generated_languageserviceclient_analyzeentitysentiment_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentimentDocument.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentimentDocument.java new file mode 100644 index 00000000..d2aaf663 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentimentDocument.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1beta2.samples; + +// [START language_v1beta2_generated_languageserviceclient_analyzeentitysentiment_document_sync] +import com.google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse; +import com.google.cloud.language.v1beta2.Document; +import com.google.cloud.language.v1beta2.LanguageServiceClient; + +public class SyncAnalyzeEntitySentimentDocument { + + public static void main(String[] args) throws Exception { + syncAnalyzeEntitySentimentDocument(); + } + + public static void syncAnalyzeEntitySentimentDocument() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + Document document = Document.newBuilder().build(); + AnalyzeEntitySentimentResponse response = + languageServiceClient.analyzeEntitySentiment(document); + } + } +} +// [END language_v1beta2_generated_languageserviceclient_analyzeentitysentiment_document_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentimentDocumentEncodingtype.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentimentDocumentEncodingtype.java new file mode 100644 index 00000000..42c2975a --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentimentDocumentEncodingtype.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1beta2.samples; + +// [START language_v1beta2_generated_languageserviceclient_analyzeentitysentiment_documentencodingtype_sync] +import com.google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse; +import com.google.cloud.language.v1beta2.Document; +import com.google.cloud.language.v1beta2.EncodingType; +import com.google.cloud.language.v1beta2.LanguageServiceClient; + +public class SyncAnalyzeEntitySentimentDocumentEncodingtype { + + public static void main(String[] args) throws Exception { + syncAnalyzeEntitySentimentDocumentEncodingtype(); + } + + public static void syncAnalyzeEntitySentimentDocumentEncodingtype() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + Document document = Document.newBuilder().build(); + EncodingType encodingType = EncodingType.forNumber(0); + AnalyzeEntitySentimentResponse response = + languageServiceClient.analyzeEntitySentiment(document, encodingType); + } + } +} +// [END language_v1beta2_generated_languageserviceclient_analyzeentitysentiment_documentencodingtype_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesentiment/AsyncAnalyzeSentiment.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesentiment/AsyncAnalyzeSentiment.java new file mode 100644 index 00000000..4ec820fc --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesentiment/AsyncAnalyzeSentiment.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1beta2.samples; + +// [START language_v1beta2_generated_languageserviceclient_analyzesentiment_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.language.v1beta2.AnalyzeSentimentRequest; +import com.google.cloud.language.v1beta2.AnalyzeSentimentResponse; +import com.google.cloud.language.v1beta2.Document; +import com.google.cloud.language.v1beta2.EncodingType; +import com.google.cloud.language.v1beta2.LanguageServiceClient; + +public class AsyncAnalyzeSentiment { + + public static void main(String[] args) throws Exception { + asyncAnalyzeSentiment(); + } + + public static void asyncAnalyzeSentiment() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + AnalyzeSentimentRequest request = + AnalyzeSentimentRequest.newBuilder() + .setDocument(Document.newBuilder().build()) + .setEncodingType(EncodingType.forNumber(0)) + .build(); + ApiFuture future = + languageServiceClient.analyzeSentimentCallable().futureCall(request); + // Do something. + AnalyzeSentimentResponse response = future.get(); + } + } +} +// [END language_v1beta2_generated_languageserviceclient_analyzesentiment_async] diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesentiment/SyncAnalyzeSentiment.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesentiment/SyncAnalyzeSentiment.java new file mode 100644 index 00000000..19ee4b84 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesentiment/SyncAnalyzeSentiment.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1beta2.samples; + +// [START language_v1beta2_generated_languageserviceclient_analyzesentiment_sync] +import com.google.cloud.language.v1beta2.AnalyzeSentimentRequest; +import com.google.cloud.language.v1beta2.AnalyzeSentimentResponse; +import com.google.cloud.language.v1beta2.Document; +import com.google.cloud.language.v1beta2.EncodingType; +import com.google.cloud.language.v1beta2.LanguageServiceClient; + +public class SyncAnalyzeSentiment { + + public static void main(String[] args) throws Exception { + syncAnalyzeSentiment(); + } + + public static void syncAnalyzeSentiment() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + AnalyzeSentimentRequest request = + AnalyzeSentimentRequest.newBuilder() + .setDocument(Document.newBuilder().build()) + .setEncodingType(EncodingType.forNumber(0)) + .build(); + AnalyzeSentimentResponse response = languageServiceClient.analyzeSentiment(request); + } + } +} +// [END language_v1beta2_generated_languageserviceclient_analyzesentiment_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesentiment/SyncAnalyzeSentimentDocument.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesentiment/SyncAnalyzeSentimentDocument.java new file mode 100644 index 00000000..6948b78e --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesentiment/SyncAnalyzeSentimentDocument.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1beta2.samples; + +// [START language_v1beta2_generated_languageserviceclient_analyzesentiment_document_sync] +import com.google.cloud.language.v1beta2.AnalyzeSentimentResponse; +import com.google.cloud.language.v1beta2.Document; +import com.google.cloud.language.v1beta2.LanguageServiceClient; + +public class SyncAnalyzeSentimentDocument { + + public static void main(String[] args) throws Exception { + syncAnalyzeSentimentDocument(); + } + + public static void syncAnalyzeSentimentDocument() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + Document document = Document.newBuilder().build(); + AnalyzeSentimentResponse response = languageServiceClient.analyzeSentiment(document); + } + } +} +// [END language_v1beta2_generated_languageserviceclient_analyzesentiment_document_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesentiment/SyncAnalyzeSentimentDocumentEncodingtype.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesentiment/SyncAnalyzeSentimentDocumentEncodingtype.java new file mode 100644 index 00000000..c3047b32 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesentiment/SyncAnalyzeSentimentDocumentEncodingtype.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1beta2.samples; + +// [START language_v1beta2_generated_languageserviceclient_analyzesentiment_documentencodingtype_sync] +import com.google.cloud.language.v1beta2.AnalyzeSentimentResponse; +import com.google.cloud.language.v1beta2.Document; +import com.google.cloud.language.v1beta2.EncodingType; +import com.google.cloud.language.v1beta2.LanguageServiceClient; + +public class SyncAnalyzeSentimentDocumentEncodingtype { + + public static void main(String[] args) throws Exception { + syncAnalyzeSentimentDocumentEncodingtype(); + } + + public static void syncAnalyzeSentimentDocumentEncodingtype() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + Document document = Document.newBuilder().build(); + EncodingType encodingType = EncodingType.forNumber(0); + AnalyzeSentimentResponse response = + languageServiceClient.analyzeSentiment(document, encodingType); + } + } +} +// [END language_v1beta2_generated_languageserviceclient_analyzesentiment_documentencodingtype_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesyntax/AsyncAnalyzeSyntax.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesyntax/AsyncAnalyzeSyntax.java new file mode 100644 index 00000000..5503e6f9 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesyntax/AsyncAnalyzeSyntax.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1beta2.samples; + +// [START language_v1beta2_generated_languageserviceclient_analyzesyntax_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.language.v1beta2.AnalyzeSyntaxRequest; +import com.google.cloud.language.v1beta2.AnalyzeSyntaxResponse; +import com.google.cloud.language.v1beta2.Document; +import com.google.cloud.language.v1beta2.EncodingType; +import com.google.cloud.language.v1beta2.LanguageServiceClient; + +public class AsyncAnalyzeSyntax { + + public static void main(String[] args) throws Exception { + asyncAnalyzeSyntax(); + } + + public static void asyncAnalyzeSyntax() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + AnalyzeSyntaxRequest request = + AnalyzeSyntaxRequest.newBuilder() + .setDocument(Document.newBuilder().build()) + .setEncodingType(EncodingType.forNumber(0)) + .build(); + ApiFuture future = + languageServiceClient.analyzeSyntaxCallable().futureCall(request); + // Do something. + AnalyzeSyntaxResponse response = future.get(); + } + } +} +// [END language_v1beta2_generated_languageserviceclient_analyzesyntax_async] diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesyntax/SyncAnalyzeSyntax.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesyntax/SyncAnalyzeSyntax.java new file mode 100644 index 00000000..688674a0 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesyntax/SyncAnalyzeSyntax.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1beta2.samples; + +// [START language_v1beta2_generated_languageserviceclient_analyzesyntax_sync] +import com.google.cloud.language.v1beta2.AnalyzeSyntaxRequest; +import com.google.cloud.language.v1beta2.AnalyzeSyntaxResponse; +import com.google.cloud.language.v1beta2.Document; +import com.google.cloud.language.v1beta2.EncodingType; +import com.google.cloud.language.v1beta2.LanguageServiceClient; + +public class SyncAnalyzeSyntax { + + public static void main(String[] args) throws Exception { + syncAnalyzeSyntax(); + } + + public static void syncAnalyzeSyntax() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + AnalyzeSyntaxRequest request = + AnalyzeSyntaxRequest.newBuilder() + .setDocument(Document.newBuilder().build()) + .setEncodingType(EncodingType.forNumber(0)) + .build(); + AnalyzeSyntaxResponse response = languageServiceClient.analyzeSyntax(request); + } + } +} +// [END language_v1beta2_generated_languageserviceclient_analyzesyntax_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesyntax/SyncAnalyzeSyntaxDocument.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesyntax/SyncAnalyzeSyntaxDocument.java new file mode 100644 index 00000000..a705cede --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesyntax/SyncAnalyzeSyntaxDocument.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1beta2.samples; + +// [START language_v1beta2_generated_languageserviceclient_analyzesyntax_document_sync] +import com.google.cloud.language.v1beta2.AnalyzeSyntaxResponse; +import com.google.cloud.language.v1beta2.Document; +import com.google.cloud.language.v1beta2.LanguageServiceClient; + +public class SyncAnalyzeSyntaxDocument { + + public static void main(String[] args) throws Exception { + syncAnalyzeSyntaxDocument(); + } + + public static void syncAnalyzeSyntaxDocument() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + Document document = Document.newBuilder().build(); + AnalyzeSyntaxResponse response = languageServiceClient.analyzeSyntax(document); + } + } +} +// [END language_v1beta2_generated_languageserviceclient_analyzesyntax_document_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesyntax/SyncAnalyzeSyntaxDocumentEncodingtype.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesyntax/SyncAnalyzeSyntaxDocumentEncodingtype.java new file mode 100644 index 00000000..d420702b --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesyntax/SyncAnalyzeSyntaxDocumentEncodingtype.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1beta2.samples; + +// [START language_v1beta2_generated_languageserviceclient_analyzesyntax_documentencodingtype_sync] +import com.google.cloud.language.v1beta2.AnalyzeSyntaxResponse; +import com.google.cloud.language.v1beta2.Document; +import com.google.cloud.language.v1beta2.EncodingType; +import com.google.cloud.language.v1beta2.LanguageServiceClient; + +public class SyncAnalyzeSyntaxDocumentEncodingtype { + + public static void main(String[] args) throws Exception { + syncAnalyzeSyntaxDocumentEncodingtype(); + } + + public static void syncAnalyzeSyntaxDocumentEncodingtype() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + Document document = Document.newBuilder().build(); + EncodingType encodingType = EncodingType.forNumber(0); + AnalyzeSyntaxResponse response = languageServiceClient.analyzeSyntax(document, encodingType); + } + } +} +// [END language_v1beta2_generated_languageserviceclient_analyzesyntax_documentencodingtype_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/annotatetext/AsyncAnnotateText.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/annotatetext/AsyncAnnotateText.java new file mode 100644 index 00000000..ebf89288 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/annotatetext/AsyncAnnotateText.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1beta2.samples; + +// [START language_v1beta2_generated_languageserviceclient_annotatetext_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.language.v1beta2.AnnotateTextRequest; +import com.google.cloud.language.v1beta2.AnnotateTextResponse; +import com.google.cloud.language.v1beta2.Document; +import com.google.cloud.language.v1beta2.EncodingType; +import com.google.cloud.language.v1beta2.LanguageServiceClient; + +public class AsyncAnnotateText { + + public static void main(String[] args) throws Exception { + asyncAnnotateText(); + } + + public static void asyncAnnotateText() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + AnnotateTextRequest request = + AnnotateTextRequest.newBuilder() + .setDocument(Document.newBuilder().build()) + .setFeatures(AnnotateTextRequest.Features.newBuilder().build()) + .setEncodingType(EncodingType.forNumber(0)) + .build(); + ApiFuture future = + languageServiceClient.annotateTextCallable().futureCall(request); + // Do something. + AnnotateTextResponse response = future.get(); + } + } +} +// [END language_v1beta2_generated_languageserviceclient_annotatetext_async] diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/annotatetext/SyncAnnotateText.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/annotatetext/SyncAnnotateText.java new file mode 100644 index 00000000..78134bec --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/annotatetext/SyncAnnotateText.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1beta2.samples; + +// [START language_v1beta2_generated_languageserviceclient_annotatetext_sync] +import com.google.cloud.language.v1beta2.AnnotateTextRequest; +import com.google.cloud.language.v1beta2.AnnotateTextResponse; +import com.google.cloud.language.v1beta2.Document; +import com.google.cloud.language.v1beta2.EncodingType; +import com.google.cloud.language.v1beta2.LanguageServiceClient; + +public class SyncAnnotateText { + + public static void main(String[] args) throws Exception { + syncAnnotateText(); + } + + public static void syncAnnotateText() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + AnnotateTextRequest request = + AnnotateTextRequest.newBuilder() + .setDocument(Document.newBuilder().build()) + .setFeatures(AnnotateTextRequest.Features.newBuilder().build()) + .setEncodingType(EncodingType.forNumber(0)) + .build(); + AnnotateTextResponse response = languageServiceClient.annotateText(request); + } + } +} +// [END language_v1beta2_generated_languageserviceclient_annotatetext_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/annotatetext/SyncAnnotateTextDocumentAnnotatetextrequestfeatures.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/annotatetext/SyncAnnotateTextDocumentAnnotatetextrequestfeatures.java new file mode 100644 index 00000000..733b06cb --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/annotatetext/SyncAnnotateTextDocumentAnnotatetextrequestfeatures.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1beta2.samples; + +// [START language_v1beta2_generated_languageserviceclient_annotatetext_documentannotatetextrequestfeatures_sync] +import com.google.cloud.language.v1beta2.AnnotateTextRequest; +import com.google.cloud.language.v1beta2.AnnotateTextResponse; +import com.google.cloud.language.v1beta2.Document; +import com.google.cloud.language.v1beta2.LanguageServiceClient; + +public class SyncAnnotateTextDocumentAnnotatetextrequestfeatures { + + public static void main(String[] args) throws Exception { + syncAnnotateTextDocumentAnnotatetextrequestfeatures(); + } + + public static void syncAnnotateTextDocumentAnnotatetextrequestfeatures() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + Document document = Document.newBuilder().build(); + AnnotateTextRequest.Features features = AnnotateTextRequest.Features.newBuilder().build(); + AnnotateTextResponse response = languageServiceClient.annotateText(document, features); + } + } +} +// [END language_v1beta2_generated_languageserviceclient_annotatetext_documentannotatetextrequestfeatures_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/annotatetext/SyncAnnotateTextDocumentAnnotatetextrequestfeaturesEncodingtype.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/annotatetext/SyncAnnotateTextDocumentAnnotatetextrequestfeaturesEncodingtype.java new file mode 100644 index 00000000..290af5fb --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/annotatetext/SyncAnnotateTextDocumentAnnotatetextrequestfeaturesEncodingtype.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1beta2.samples; + +// [START language_v1beta2_generated_languageserviceclient_annotatetext_documentannotatetextrequestfeaturesencodingtype_sync] +import com.google.cloud.language.v1beta2.AnnotateTextRequest; +import com.google.cloud.language.v1beta2.AnnotateTextResponse; +import com.google.cloud.language.v1beta2.Document; +import com.google.cloud.language.v1beta2.EncodingType; +import com.google.cloud.language.v1beta2.LanguageServiceClient; + +public class SyncAnnotateTextDocumentAnnotatetextrequestfeaturesEncodingtype { + + public static void main(String[] args) throws Exception { + syncAnnotateTextDocumentAnnotatetextrequestfeaturesEncodingtype(); + } + + public static void syncAnnotateTextDocumentAnnotatetextrequestfeaturesEncodingtype() + throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + Document document = Document.newBuilder().build(); + AnnotateTextRequest.Features features = AnnotateTextRequest.Features.newBuilder().build(); + EncodingType encodingType = EncodingType.forNumber(0); + AnnotateTextResponse response = + languageServiceClient.annotateText(document, features, encodingType); + } + } +} +// [END language_v1beta2_generated_languageserviceclient_annotatetext_documentannotatetextrequestfeaturesencodingtype_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/classifytext/AsyncClassifyText.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/classifytext/AsyncClassifyText.java new file mode 100644 index 00000000..273de85b --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/classifytext/AsyncClassifyText.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1beta2.samples; + +// [START language_v1beta2_generated_languageserviceclient_classifytext_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.language.v1beta2.ClassifyTextRequest; +import com.google.cloud.language.v1beta2.ClassifyTextResponse; +import com.google.cloud.language.v1beta2.Document; +import com.google.cloud.language.v1beta2.LanguageServiceClient; + +public class AsyncClassifyText { + + public static void main(String[] args) throws Exception { + asyncClassifyText(); + } + + public static void asyncClassifyText() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + ClassifyTextRequest request = + ClassifyTextRequest.newBuilder().setDocument(Document.newBuilder().build()).build(); + ApiFuture future = + languageServiceClient.classifyTextCallable().futureCall(request); + // Do something. + ClassifyTextResponse response = future.get(); + } + } +} +// [END language_v1beta2_generated_languageserviceclient_classifytext_async] diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/classifytext/SyncClassifyText.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/classifytext/SyncClassifyText.java new file mode 100644 index 00000000..c6576356 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/classifytext/SyncClassifyText.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1beta2.samples; + +// [START language_v1beta2_generated_languageserviceclient_classifytext_sync] +import com.google.cloud.language.v1beta2.ClassifyTextRequest; +import com.google.cloud.language.v1beta2.ClassifyTextResponse; +import com.google.cloud.language.v1beta2.Document; +import com.google.cloud.language.v1beta2.LanguageServiceClient; + +public class SyncClassifyText { + + public static void main(String[] args) throws Exception { + syncClassifyText(); + } + + public static void syncClassifyText() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + ClassifyTextRequest request = + ClassifyTextRequest.newBuilder().setDocument(Document.newBuilder().build()).build(); + ClassifyTextResponse response = languageServiceClient.classifyText(request); + } + } +} +// [END language_v1beta2_generated_languageserviceclient_classifytext_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/classifytext/SyncClassifyTextDocument.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/classifytext/SyncClassifyTextDocument.java new file mode 100644 index 00000000..49d3ea34 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/classifytext/SyncClassifyTextDocument.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1beta2.samples; + +// [START language_v1beta2_generated_languageserviceclient_classifytext_document_sync] +import com.google.cloud.language.v1beta2.ClassifyTextResponse; +import com.google.cloud.language.v1beta2.Document; +import com.google.cloud.language.v1beta2.LanguageServiceClient; + +public class SyncClassifyTextDocument { + + public static void main(String[] args) throws Exception { + syncClassifyTextDocument(); + } + + public static void syncClassifyTextDocument() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { + Document document = Document.newBuilder().build(); + ClassifyTextResponse response = languageServiceClient.classifyText(document); + } + } +} +// [END language_v1beta2_generated_languageserviceclient_classifytext_document_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 00000000..93b53187 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1beta2.samples; + +// [START language_v1beta2_generated_languageserviceclient_create_setcredentialsprovider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.language.v1beta2.LanguageServiceClient; +import com.google.cloud.language.v1beta2.LanguageServiceSettings; +import com.google.cloud.language.v1beta2.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + LanguageServiceSettings languageServiceSettings = + LanguageServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + LanguageServiceClient languageServiceClient = + LanguageServiceClient.create(languageServiceSettings); + } +} +// [END language_v1beta2_generated_languageserviceclient_create_setcredentialsprovider_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 00000000..f156c764 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1beta2.samples; + +// [START language_v1beta2_generated_languageserviceclient_create_setcredentialsprovider1_sync] +import com.google.cloud.language.v1beta2.LanguageServiceClient; +import com.google.cloud.language.v1beta2.LanguageServiceSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + LanguageServiceSettings languageServiceSettings = + LanguageServiceSettings.newBuilder() + .setTransportChannelProvider( + LanguageServiceSettings.defaultHttpJsonTransportProviderBuilder().build()) + .build(); + LanguageServiceClient languageServiceClient = + LanguageServiceClient.create(languageServiceSettings); + } +} +// [END language_v1beta2_generated_languageserviceclient_create_setcredentialsprovider1_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/create/SyncCreateSetEndpoint.java new file mode 100644 index 00000000..39c2bd73 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/create/SyncCreateSetEndpoint.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1beta2.samples; + +// [START language_v1beta2_generated_languageserviceclient_create_setendpoint_sync] +import com.google.cloud.language.v1beta2.LanguageServiceClient; +import com.google.cloud.language.v1beta2.LanguageServiceSettings; +import com.google.cloud.language.v1beta2.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + LanguageServiceSettings languageServiceSettings = + LanguageServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + LanguageServiceClient languageServiceClient = + LanguageServiceClient.create(languageServiceSettings); + } +} +// [END language_v1beta2_generated_languageserviceclient_create_setendpoint_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageservicesettings/analyzesentiment/SyncAnalyzeSentiment.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageservicesettings/analyzesentiment/SyncAnalyzeSentiment.java new file mode 100644 index 00000000..d5d64abf --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageservicesettings/analyzesentiment/SyncAnalyzeSentiment.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1beta2.samples; + +// [START language_v1beta2_generated_languageservicesettings_analyzesentiment_sync] +import com.google.cloud.language.v1beta2.LanguageServiceSettings; +import java.time.Duration; + +public class SyncAnalyzeSentiment { + + public static void main(String[] args) throws Exception { + syncAnalyzeSentiment(); + } + + public static void syncAnalyzeSentiment() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + LanguageServiceSettings.Builder languageServiceSettingsBuilder = + LanguageServiceSettings.newBuilder(); + languageServiceSettingsBuilder + .analyzeSentimentSettings() + .setRetrySettings( + languageServiceSettingsBuilder + .analyzeSentimentSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + LanguageServiceSettings languageServiceSettings = languageServiceSettingsBuilder.build(); + } +} +// [END language_v1beta2_generated_languageservicesettings_analyzesentiment_sync] diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/stub/languageservicestubsettings/analyzesentiment/SyncAnalyzeSentiment.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/stub/languageservicestubsettings/analyzesentiment/SyncAnalyzeSentiment.java new file mode 100644 index 00000000..90bf72ce --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/stub/languageservicestubsettings/analyzesentiment/SyncAnalyzeSentiment.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.language.v1beta2.stub.samples; + +// [START language_v1beta2_generated_languageservicestubsettings_analyzesentiment_sync] +import com.google.cloud.language.v1beta2.stub.LanguageServiceStubSettings; +import java.time.Duration; + +public class SyncAnalyzeSentiment { + + public static void main(String[] args) throws Exception { + syncAnalyzeSentiment(); + } + + public static void syncAnalyzeSentiment() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + LanguageServiceStubSettings.Builder languageServiceSettingsBuilder = + LanguageServiceStubSettings.newBuilder(); + languageServiceSettingsBuilder + .analyzeSentimentSettings() + .setRetrySettings( + languageServiceSettingsBuilder + .analyzeSentimentSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + LanguageServiceStubSettings languageServiceSettings = languageServiceSettingsBuilder.build(); + } +} +// [END language_v1beta2_generated_languageservicestubsettings_analyzesentiment_sync] diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 0036ed9d..d0086e2c 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 26.0.0 + 26.1.1 pom import diff --git a/versions.txt b/versions.txt index 06f7693f..887e360a 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-language:2.3.2:2.3.2 -grpc-google-cloud-language-v1:2.3.2:2.3.2 -grpc-google-cloud-language-v1beta2:0.90.2:0.90.2 -proto-google-cloud-language-v1:2.3.2:2.3.2 -proto-google-cloud-language-v1beta2:0.90.2:0.90.2 +google-cloud-language:2.3.3:2.3.3 +grpc-google-cloud-language-v1:2.3.3:2.3.3 +grpc-google-cloud-language-v1beta2:0.90.3:0.90.3 +proto-google-cloud-language-v1:2.3.3:2.3.3 +proto-google-cloud-language-v1beta2:0.90.3:0.90.3