lib/google/cloud/language/v1beta2/language_service/client.rb in google-cloud-language-v1beta2-0.1.3 vs lib/google/cloud/language/v1beta2/language_service/client.rb in google-cloud-language-v1beta2-0.1.4

- old
+ new

@@ -14,18 +14,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - require "google/cloud/errors" -require "google/cloud/language/v1beta2/version" require "google/cloud/language/v1beta2/language_service_pb" -require "google/cloud/language/v1beta2/language_service/credentials" module Google module Cloud module Language module V1beta2 @@ -198,23 +192,30 @@ ## # Analyzes the sentiment of the provided text. # # @overload analyze_sentiment(request, options = nil) - # @param request [Google::Cloud::Language::V1beta2::AnalyzeSentimentRequest | Hash] - # Analyzes the sentiment of the provided text. + # Pass arguments to `analyze_sentiment` via a request object, either of type + # {Google::Cloud::Language::V1beta2::AnalyzeSentimentRequest} or an equivalent Hash. + # + # @param request [Google::Cloud::Language::V1beta2::AnalyzeSentimentRequest, Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [Gapic::CallOptions, Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload analyze_sentiment(document: nil, encoding_type: nil) - # @param document [Google::Cloud::Language::V1beta2::Document | Hash] + # Pass arguments to `analyze_sentiment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param document [Google::Cloud::Language::V1beta2::Document, Hash] # Required. Input document. # @param encoding_type [Google::Cloud::Language::V1beta2::EncodingType] # The encoding type used by the API to calculate sentence offsets for the # sentence sentiment. # - # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [Google::Cloud::Language::V1beta2::AnalyzeSentimentResponse] # @yieldparam operation [GRPC::ActiveCall::Operation] # # @return [Google::Cloud::Language::V1beta2::AnalyzeSentimentResponse] @@ -256,24 +257,29 @@ # Finds named entities (currently proper names and common nouns) in the text # along with entity types, salience, mentions for each entity, and # other properties. # # @overload analyze_entities(request, options = nil) - # @param request [Google::Cloud::Language::V1beta2::AnalyzeEntitiesRequest | Hash] - # Finds named entities (currently proper names and common nouns) in the text - # along with entity types, salience, mentions for each entity, and - # other properties. + # Pass arguments to `analyze_entities` via a request object, either of type + # {Google::Cloud::Language::V1beta2::AnalyzeEntitiesRequest} or an equivalent Hash. + # + # @param request [Google::Cloud::Language::V1beta2::AnalyzeEntitiesRequest, Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [Gapic::CallOptions, Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload analyze_entities(document: nil, encoding_type: nil) - # @param document [Google::Cloud::Language::V1beta2::Document | Hash] + # Pass arguments to `analyze_entities` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param document [Google::Cloud::Language::V1beta2::Document, Hash] # Required. Input document. # @param encoding_type [Google::Cloud::Language::V1beta2::EncodingType] # The encoding type used by the API to calculate offsets. # - # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [Google::Cloud::Language::V1beta2::AnalyzeEntitiesResponse] # @yieldparam operation [GRPC::ActiveCall::Operation] # # @return [Google::Cloud::Language::V1beta2::AnalyzeEntitiesResponse] @@ -314,23 +320,29 @@ ## # Finds entities, similar to {Google::Cloud::Language::V1beta2::LanguageService::Client#analyze_entities AnalyzeEntities} in the text and analyzes # sentiment associated with each entity and its mentions. # # @overload analyze_entity_sentiment(request, options = nil) - # @param request [Google::Cloud::Language::V1beta2::AnalyzeEntitySentimentRequest | Hash] - # Finds entities, similar to {Google::Cloud::Language::V1beta2::LanguageService::Client#analyze_entities AnalyzeEntities} in the text and analyzes - # sentiment associated with each entity and its mentions. + # Pass arguments to `analyze_entity_sentiment` via a request object, either of type + # {Google::Cloud::Language::V1beta2::AnalyzeEntitySentimentRequest} or an equivalent Hash. + # + # @param request [Google::Cloud::Language::V1beta2::AnalyzeEntitySentimentRequest, Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [Gapic::CallOptions, Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload analyze_entity_sentiment(document: nil, encoding_type: nil) - # @param document [Google::Cloud::Language::V1beta2::Document | Hash] + # Pass arguments to `analyze_entity_sentiment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param document [Google::Cloud::Language::V1beta2::Document, Hash] # Required. Input document. # @param encoding_type [Google::Cloud::Language::V1beta2::EncodingType] # The encoding type used by the API to calculate offsets. # - # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [Google::Cloud::Language::V1beta2::AnalyzeEntitySentimentResponse] # @yieldparam operation [GRPC::ActiveCall::Operation] # # @return [Google::Cloud::Language::V1beta2::AnalyzeEntitySentimentResponse] @@ -372,24 +384,29 @@ # Analyzes the syntax of the text and provides sentence boundaries and # tokenization along with part-of-speech tags, dependency trees, and other # properties. # # @overload analyze_syntax(request, options = nil) - # @param request [Google::Cloud::Language::V1beta2::AnalyzeSyntaxRequest | Hash] - # Analyzes the syntax of the text and provides sentence boundaries and - # tokenization along with part-of-speech tags, dependency trees, and other - # properties. + # Pass arguments to `analyze_syntax` via a request object, either of type + # {Google::Cloud::Language::V1beta2::AnalyzeSyntaxRequest} or an equivalent Hash. + # + # @param request [Google::Cloud::Language::V1beta2::AnalyzeSyntaxRequest, Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [Gapic::CallOptions, Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload analyze_syntax(document: nil, encoding_type: nil) - # @param document [Google::Cloud::Language::V1beta2::Document | Hash] + # Pass arguments to `analyze_syntax` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param document [Google::Cloud::Language::V1beta2::Document, Hash] # Required. Input document. # @param encoding_type [Google::Cloud::Language::V1beta2::EncodingType] # The encoding type used by the API to calculate offsets. # - # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [Google::Cloud::Language::V1beta2::AnalyzeSyntaxResponse] # @yieldparam operation [GRPC::ActiveCall::Operation] # # @return [Google::Cloud::Language::V1beta2::AnalyzeSyntaxResponse] @@ -429,20 +446,27 @@ ## # Classifies a document into categories. # # @overload classify_text(request, options = nil) - # @param request [Google::Cloud::Language::V1beta2::ClassifyTextRequest | Hash] - # Classifies a document into categories. + # Pass arguments to `classify_text` via a request object, either of type + # {Google::Cloud::Language::V1beta2::ClassifyTextRequest} or an equivalent Hash. + # + # @param request [Google::Cloud::Language::V1beta2::ClassifyTextRequest, Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [Gapic::CallOptions, Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload classify_text(document: nil) - # @param document [Google::Cloud::Language::V1beta2::Document | Hash] + # Pass arguments to `classify_text` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param document [Google::Cloud::Language::V1beta2::Document, Hash] # Required. Input document. # - # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [Google::Cloud::Language::V1beta2::ClassifyTextResponse] # @yieldparam operation [GRPC::ActiveCall::Operation] # # @return [Google::Cloud::Language::V1beta2::ClassifyTextResponse] @@ -483,25 +507,31 @@ ## # A convenience method that provides all syntax, sentiment, entity, and # classification features in one call. # # @overload annotate_text(request, options = nil) - # @param request [Google::Cloud::Language::V1beta2::AnnotateTextRequest | Hash] - # A convenience method that provides all syntax, sentiment, entity, and - # classification features in one call. + # Pass arguments to `annotate_text` via a request object, either of type + # {Google::Cloud::Language::V1beta2::AnnotateTextRequest} or an equivalent Hash. + # + # @param request [Google::Cloud::Language::V1beta2::AnnotateTextRequest, Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [Gapic::CallOptions, Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload annotate_text(document: nil, features: nil, encoding_type: nil) - # @param document [Google::Cloud::Language::V1beta2::Document | Hash] + # Pass arguments to `annotate_text` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param document [Google::Cloud::Language::V1beta2::Document, Hash] # Required. Input document. - # @param features [Google::Cloud::Language::V1beta2::AnnotateTextRequest::Features | Hash] + # @param features [Google::Cloud::Language::V1beta2::AnnotateTextRequest::Features, Hash] # Required. The enabled features. # @param encoding_type [Google::Cloud::Language::V1beta2::EncodingType] # The encoding type used by the API to calculate offsets. # - # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [Google::Cloud::Language::V1beta2::AnnotateTextResponse] # @yieldparam operation [GRPC::ActiveCall::Operation] # # @return [Google::Cloud::Language::V1beta2::AnnotateTextResponse] @@ -725,15 +755,5 @@ end end end end end - -# rubocop:disable Lint/HandleExceptions - -# Once client is loaded, load helpers.rb if it exists. -begin - require "google/cloud/language/v1beta2/language_service/helpers" -rescue LoadError -end - -# rubocop:enable Lint/HandleExceptions