Class: Google::Cloud::Translate::V3::TranslationService::Rest::Client::Configuration
- Inherits:
-
Object
- Object
- Google::Cloud::Translate::V3::TranslationService::Rest::Client::Configuration
- Extended by:
- Gapic::Config
- Defined in:
- lib/google/cloud/translate/v3/translation_service/rest/client.rb
Overview
Configuration class for the TranslationService REST API.
This class represents the configuration for TranslationService REST, providing control over timeouts, retry behavior, logging, transport parameters, and other low-level controls. Certain parameters can also be applied individually to specific RPCs. See Rpcs for a list of RPCs that can be configured independently.
Configuration can be applied globally to all clients, or to a single client on construction.
Defined Under Namespace
Classes: Rpcs
Instance Attribute Summary collapse
-
#credentials ⇒ ::Object
Credentials to send with calls.
-
#endpoint ⇒ ::String?
A custom service endpoint, as a hostname or hostname:port.
-
#lib_name ⇒ ::String
The library name as recorded in instrumentation and logging.
-
#lib_version ⇒ ::String
The library version as recorded in instrumentation and logging.
-
#logger ⇒ ::Logger, ...
A custom logger to use for request/response debug logging, or the value
:default
(the default) to construct a default logger, ornil
to explicitly disable logging. -
#metadata ⇒ ::Hash{::Symbol=>::String}
Additional headers to be sent with the call.
-
#quota_project ⇒ ::String
A separate project against which to charge quota.
-
#retry_policy ⇒ ::Hash
The retry policy.
-
#scope ⇒ ::Array<::String>
The OAuth scopes.
-
#timeout ⇒ ::Numeric
The call timeout in seconds.
-
#universe_domain ⇒ ::String?
The universe domain within which to make requests.
Instance Method Summary collapse
-
#rpcs ⇒ Rpcs
Configurations for individual RPCs.
Instance Attribute Details
#credentials ⇒ ::Object
Credentials to send with calls. You may provide any of the following types:
- (
String
) The path to a service account key file in JSON format - (
Hash
) A service account key as a Hash - (
Google::Auth::Credentials
) A googleauth credentials object (see the googleauth docs) - (
Signet::OAuth2::Client
) A signet oauth2 client object (see the signet docs) - (
nil
) indicating no credentials
3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 |
# File 'lib/google/cloud/translate/v3/translation_service/rest/client.rb', line 3943 class Configuration extend ::Gapic::Config # @private # The endpoint specific to the default "googleapis.com" universe. Deprecated. DEFAULT_ENDPOINT = "translate.googleapis.com" config_attr :endpoint, nil, ::String, nil config_attr :credentials, nil do |value| allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] allowed.any? { |klass| klass === value } end config_attr :scope, nil, ::String, ::Array, nil config_attr :lib_name, nil, ::String, nil config_attr :lib_version, nil, ::String, nil config_attr :timeout, nil, ::Numeric, nil config_attr :metadata, nil, ::Hash, nil config_attr :retry_policy, nil, ::Hash, ::Proc, nil config_attr :quota_project, nil, ::String, nil config_attr :universe_domain, nil, ::String, nil # @private # Overrides for http bindings for the RPCs of this service # are only used when this service is used as mixin, and only # by the host service. # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] config_attr :bindings_override, {}, ::Hash, nil config_attr :logger, :default, ::Logger, nil, :default # @private def initialize parent_config = nil @parent_config = parent_config unless parent_config.nil? yield self if block_given? end ## # Configurations for individual RPCs # @return [Rpcs] # def rpcs @rpcs ||= begin parent_rpcs = nil parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) Rpcs.new parent_rpcs end end ## # Configuration RPC class for the TranslationService API. # # Includes fields providing the configuration for each RPC in this service. # Each configuration object is of type `Gapic::Config::Method` and includes # the following configuration fields: # # * `timeout` (*type:* `Numeric`) - The call timeout in seconds # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields # include the following keys: # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should # trigger a retry. # class Rpcs ## # RPC-specific configuration for `translate_text` # @return [::Gapic::Config::Method] # attr_reader :translate_text ## # RPC-specific configuration for `romanize_text` # @return [::Gapic::Config::Method] # attr_reader :romanize_text ## # RPC-specific configuration for `detect_language` # @return [::Gapic::Config::Method] # attr_reader :detect_language ## # RPC-specific configuration for `get_supported_languages` # @return [::Gapic::Config::Method] # attr_reader :get_supported_languages ## # RPC-specific configuration for `translate_document` # @return [::Gapic::Config::Method] # attr_reader :translate_document ## # RPC-specific configuration for `batch_translate_text` # @return [::Gapic::Config::Method] # attr_reader :batch_translate_text ## # RPC-specific configuration for `batch_translate_document` # @return [::Gapic::Config::Method] # attr_reader :batch_translate_document ## # RPC-specific configuration for `create_glossary` # @return [::Gapic::Config::Method] # attr_reader :create_glossary ## # RPC-specific configuration for `update_glossary` # @return [::Gapic::Config::Method] # attr_reader :update_glossary ## # RPC-specific configuration for `list_glossaries` # @return [::Gapic::Config::Method] # attr_reader :list_glossaries ## # RPC-specific configuration for `get_glossary` # @return [::Gapic::Config::Method] # attr_reader :get_glossary ## # RPC-specific configuration for `delete_glossary` # @return [::Gapic::Config::Method] # attr_reader :delete_glossary ## # RPC-specific configuration for `get_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :get_glossary_entry ## # RPC-specific configuration for `list_glossary_entries` # @return [::Gapic::Config::Method] # attr_reader :list_glossary_entries ## # RPC-specific configuration for `create_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :create_glossary_entry ## # RPC-specific configuration for `update_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :update_glossary_entry ## # RPC-specific configuration for `delete_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :delete_glossary_entry ## # RPC-specific configuration for `create_dataset` # @return [::Gapic::Config::Method] # attr_reader :create_dataset ## # RPC-specific configuration for `get_dataset` # @return [::Gapic::Config::Method] # attr_reader :get_dataset ## # RPC-specific configuration for `list_datasets` # @return [::Gapic::Config::Method] # attr_reader :list_datasets ## # RPC-specific configuration for `delete_dataset` # @return [::Gapic::Config::Method] # attr_reader :delete_dataset ## # RPC-specific configuration for `create_adaptive_mt_dataset` # @return [::Gapic::Config::Method] # attr_reader :create_adaptive_mt_dataset ## # RPC-specific configuration for `delete_adaptive_mt_dataset` # @return [::Gapic::Config::Method] # attr_reader :delete_adaptive_mt_dataset ## # RPC-specific configuration for `get_adaptive_mt_dataset` # @return [::Gapic::Config::Method] # attr_reader :get_adaptive_mt_dataset ## # RPC-specific configuration for `list_adaptive_mt_datasets` # @return [::Gapic::Config::Method] # attr_reader :list_adaptive_mt_datasets ## # RPC-specific configuration for `adaptive_mt_translate` # @return [::Gapic::Config::Method] # attr_reader :adaptive_mt_translate ## # RPC-specific configuration for `get_adaptive_mt_file` # @return [::Gapic::Config::Method] # attr_reader :get_adaptive_mt_file ## # RPC-specific configuration for `delete_adaptive_mt_file` # @return [::Gapic::Config::Method] # attr_reader :delete_adaptive_mt_file ## # RPC-specific configuration for `import_adaptive_mt_file` # @return [::Gapic::Config::Method] # attr_reader :import_adaptive_mt_file ## # RPC-specific configuration for `list_adaptive_mt_files` # @return [::Gapic::Config::Method] # attr_reader :list_adaptive_mt_files ## # RPC-specific configuration for `list_adaptive_mt_sentences` # @return [::Gapic::Config::Method] # attr_reader :list_adaptive_mt_sentences ## # RPC-specific configuration for `import_data` # @return [::Gapic::Config::Method] # attr_reader :import_data ## # RPC-specific configuration for `export_data` # @return [::Gapic::Config::Method] # attr_reader :export_data ## # RPC-specific configuration for `list_examples` # @return [::Gapic::Config::Method] # attr_reader :list_examples ## # RPC-specific configuration for `create_model` # @return [::Gapic::Config::Method] # attr_reader :create_model ## # RPC-specific configuration for `list_models` # @return [::Gapic::Config::Method] # attr_reader :list_models ## # RPC-specific configuration for `get_model` # @return [::Gapic::Config::Method] # attr_reader :get_model ## # RPC-specific configuration for `delete_model` # @return [::Gapic::Config::Method] # attr_reader :delete_model # @private def initialize parent_rpcs = nil translate_text_config = parent_rpcs.translate_text if parent_rpcs.respond_to? :translate_text @translate_text = ::Gapic::Config::Method.new translate_text_config romanize_text_config = parent_rpcs.romanize_text if parent_rpcs.respond_to? :romanize_text @romanize_text = ::Gapic::Config::Method.new romanize_text_config detect_language_config = parent_rpcs.detect_language if parent_rpcs.respond_to? :detect_language @detect_language = ::Gapic::Config::Method.new detect_language_config get_supported_languages_config = parent_rpcs.get_supported_languages if parent_rpcs.respond_to? :get_supported_languages @get_supported_languages = ::Gapic::Config::Method.new get_supported_languages_config translate_document_config = parent_rpcs.translate_document if parent_rpcs.respond_to? :translate_document @translate_document = ::Gapic::Config::Method.new translate_document_config batch_translate_text_config = parent_rpcs.batch_translate_text if parent_rpcs.respond_to? :batch_translate_text @batch_translate_text = ::Gapic::Config::Method.new batch_translate_text_config batch_translate_document_config = parent_rpcs.batch_translate_document if parent_rpcs.respond_to? :batch_translate_document @batch_translate_document = ::Gapic::Config::Method.new batch_translate_document_config create_glossary_config = parent_rpcs.create_glossary if parent_rpcs.respond_to? :create_glossary @create_glossary = ::Gapic::Config::Method.new create_glossary_config update_glossary_config = parent_rpcs.update_glossary if parent_rpcs.respond_to? :update_glossary @update_glossary = ::Gapic::Config::Method.new update_glossary_config list_glossaries_config = parent_rpcs.list_glossaries if parent_rpcs.respond_to? :list_glossaries @list_glossaries = ::Gapic::Config::Method.new list_glossaries_config get_glossary_config = parent_rpcs.get_glossary if parent_rpcs.respond_to? :get_glossary @get_glossary = ::Gapic::Config::Method.new get_glossary_config delete_glossary_config = parent_rpcs.delete_glossary if parent_rpcs.respond_to? :delete_glossary @delete_glossary = ::Gapic::Config::Method.new delete_glossary_config get_glossary_entry_config = parent_rpcs.get_glossary_entry if parent_rpcs.respond_to? :get_glossary_entry @get_glossary_entry = ::Gapic::Config::Method.new get_glossary_entry_config list_glossary_entries_config = parent_rpcs.list_glossary_entries if parent_rpcs.respond_to? :list_glossary_entries @list_glossary_entries = ::Gapic::Config::Method.new list_glossary_entries_config create_glossary_entry_config = parent_rpcs.create_glossary_entry if parent_rpcs.respond_to? :create_glossary_entry @create_glossary_entry = ::Gapic::Config::Method.new create_glossary_entry_config update_glossary_entry_config = parent_rpcs.update_glossary_entry if parent_rpcs.respond_to? :update_glossary_entry @update_glossary_entry = ::Gapic::Config::Method.new update_glossary_entry_config delete_glossary_entry_config = parent_rpcs.delete_glossary_entry if parent_rpcs.respond_to? :delete_glossary_entry @delete_glossary_entry = ::Gapic::Config::Method.new delete_glossary_entry_config create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset @create_dataset = ::Gapic::Config::Method.new create_dataset_config get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset @get_dataset = ::Gapic::Config::Method.new get_dataset_config list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets @list_datasets = ::Gapic::Config::Method.new list_datasets_config delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config create_adaptive_mt_dataset_config = parent_rpcs.create_adaptive_mt_dataset if parent_rpcs.respond_to? :create_adaptive_mt_dataset @create_adaptive_mt_dataset = ::Gapic::Config::Method.new create_adaptive_mt_dataset_config delete_adaptive_mt_dataset_config = parent_rpcs.delete_adaptive_mt_dataset if parent_rpcs.respond_to? :delete_adaptive_mt_dataset @delete_adaptive_mt_dataset = ::Gapic::Config::Method.new delete_adaptive_mt_dataset_config get_adaptive_mt_dataset_config = parent_rpcs.get_adaptive_mt_dataset if parent_rpcs.respond_to? :get_adaptive_mt_dataset @get_adaptive_mt_dataset = ::Gapic::Config::Method.new get_adaptive_mt_dataset_config list_adaptive_mt_datasets_config = parent_rpcs.list_adaptive_mt_datasets if parent_rpcs.respond_to? :list_adaptive_mt_datasets @list_adaptive_mt_datasets = ::Gapic::Config::Method.new list_adaptive_mt_datasets_config adaptive_mt_translate_config = parent_rpcs.adaptive_mt_translate if parent_rpcs.respond_to? :adaptive_mt_translate @adaptive_mt_translate = ::Gapic::Config::Method.new adaptive_mt_translate_config get_adaptive_mt_file_config = parent_rpcs.get_adaptive_mt_file if parent_rpcs.respond_to? :get_adaptive_mt_file @get_adaptive_mt_file = ::Gapic::Config::Method.new get_adaptive_mt_file_config delete_adaptive_mt_file_config = parent_rpcs.delete_adaptive_mt_file if parent_rpcs.respond_to? :delete_adaptive_mt_file @delete_adaptive_mt_file = ::Gapic::Config::Method.new delete_adaptive_mt_file_config import_adaptive_mt_file_config = parent_rpcs.import_adaptive_mt_file if parent_rpcs.respond_to? :import_adaptive_mt_file @import_adaptive_mt_file = ::Gapic::Config::Method.new import_adaptive_mt_file_config list_adaptive_mt_files_config = parent_rpcs.list_adaptive_mt_files if parent_rpcs.respond_to? :list_adaptive_mt_files @list_adaptive_mt_files = ::Gapic::Config::Method.new list_adaptive_mt_files_config list_adaptive_mt_sentences_config = parent_rpcs.list_adaptive_mt_sentences if parent_rpcs.respond_to? :list_adaptive_mt_sentences @list_adaptive_mt_sentences = ::Gapic::Config::Method.new list_adaptive_mt_sentences_config import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data @import_data = ::Gapic::Config::Method.new import_data_config export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data @export_data = ::Gapic::Config::Method.new export_data_config list_examples_config = parent_rpcs.list_examples if parent_rpcs.respond_to? :list_examples @list_examples = ::Gapic::Config::Method.new list_examples_config create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model @create_model = ::Gapic::Config::Method.new create_model_config list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models @list_models = ::Gapic::Config::Method.new list_models_config get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model @get_model = ::Gapic::Config::Method.new get_model_config delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model @delete_model = ::Gapic::Config::Method.new delete_model_config yield self if block_given? end end end |
#endpoint ⇒ ::String?
A custom service endpoint, as a hostname or hostname:port. The default is nil, indicating to use the default endpoint in the current universe domain.
3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 |
# File 'lib/google/cloud/translate/v3/translation_service/rest/client.rb', line 3943 class Configuration extend ::Gapic::Config # @private # The endpoint specific to the default "googleapis.com" universe. Deprecated. DEFAULT_ENDPOINT = "translate.googleapis.com" config_attr :endpoint, nil, ::String, nil config_attr :credentials, nil do |value| allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] allowed.any? { |klass| klass === value } end config_attr :scope, nil, ::String, ::Array, nil config_attr :lib_name, nil, ::String, nil config_attr :lib_version, nil, ::String, nil config_attr :timeout, nil, ::Numeric, nil config_attr :metadata, nil, ::Hash, nil config_attr :retry_policy, nil, ::Hash, ::Proc, nil config_attr :quota_project, nil, ::String, nil config_attr :universe_domain, nil, ::String, nil # @private # Overrides for http bindings for the RPCs of this service # are only used when this service is used as mixin, and only # by the host service. # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] config_attr :bindings_override, {}, ::Hash, nil config_attr :logger, :default, ::Logger, nil, :default # @private def initialize parent_config = nil @parent_config = parent_config unless parent_config.nil? yield self if block_given? end ## # Configurations for individual RPCs # @return [Rpcs] # def rpcs @rpcs ||= begin parent_rpcs = nil parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) Rpcs.new parent_rpcs end end ## # Configuration RPC class for the TranslationService API. # # Includes fields providing the configuration for each RPC in this service. # Each configuration object is of type `Gapic::Config::Method` and includes # the following configuration fields: # # * `timeout` (*type:* `Numeric`) - The call timeout in seconds # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields # include the following keys: # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should # trigger a retry. # class Rpcs ## # RPC-specific configuration for `translate_text` # @return [::Gapic::Config::Method] # attr_reader :translate_text ## # RPC-specific configuration for `romanize_text` # @return [::Gapic::Config::Method] # attr_reader :romanize_text ## # RPC-specific configuration for `detect_language` # @return [::Gapic::Config::Method] # attr_reader :detect_language ## # RPC-specific configuration for `get_supported_languages` # @return [::Gapic::Config::Method] # attr_reader :get_supported_languages ## # RPC-specific configuration for `translate_document` # @return [::Gapic::Config::Method] # attr_reader :translate_document ## # RPC-specific configuration for `batch_translate_text` # @return [::Gapic::Config::Method] # attr_reader :batch_translate_text ## # RPC-specific configuration for `batch_translate_document` # @return [::Gapic::Config::Method] # attr_reader :batch_translate_document ## # RPC-specific configuration for `create_glossary` # @return [::Gapic::Config::Method] # attr_reader :create_glossary ## # RPC-specific configuration for `update_glossary` # @return [::Gapic::Config::Method] # attr_reader :update_glossary ## # RPC-specific configuration for `list_glossaries` # @return [::Gapic::Config::Method] # attr_reader :list_glossaries ## # RPC-specific configuration for `get_glossary` # @return [::Gapic::Config::Method] # attr_reader :get_glossary ## # RPC-specific configuration for `delete_glossary` # @return [::Gapic::Config::Method] # attr_reader :delete_glossary ## # RPC-specific configuration for `get_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :get_glossary_entry ## # RPC-specific configuration for `list_glossary_entries` # @return [::Gapic::Config::Method] # attr_reader :list_glossary_entries ## # RPC-specific configuration for `create_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :create_glossary_entry ## # RPC-specific configuration for `update_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :update_glossary_entry ## # RPC-specific configuration for `delete_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :delete_glossary_entry ## # RPC-specific configuration for `create_dataset` # @return [::Gapic::Config::Method] # attr_reader :create_dataset ## # RPC-specific configuration for `get_dataset` # @return [::Gapic::Config::Method] # attr_reader :get_dataset ## # RPC-specific configuration for `list_datasets` # @return [::Gapic::Config::Method] # attr_reader :list_datasets ## # RPC-specific configuration for `delete_dataset` # @return [::Gapic::Config::Method] # attr_reader :delete_dataset ## # RPC-specific configuration for `create_adaptive_mt_dataset` # @return [::Gapic::Config::Method] # attr_reader :create_adaptive_mt_dataset ## # RPC-specific configuration for `delete_adaptive_mt_dataset` # @return [::Gapic::Config::Method] # attr_reader :delete_adaptive_mt_dataset ## # RPC-specific configuration for `get_adaptive_mt_dataset` # @return [::Gapic::Config::Method] # attr_reader :get_adaptive_mt_dataset ## # RPC-specific configuration for `list_adaptive_mt_datasets` # @return [::Gapic::Config::Method] # attr_reader :list_adaptive_mt_datasets ## # RPC-specific configuration for `adaptive_mt_translate` # @return [::Gapic::Config::Method] # attr_reader :adaptive_mt_translate ## # RPC-specific configuration for `get_adaptive_mt_file` # @return [::Gapic::Config::Method] # attr_reader :get_adaptive_mt_file ## # RPC-specific configuration for `delete_adaptive_mt_file` # @return [::Gapic::Config::Method] # attr_reader :delete_adaptive_mt_file ## # RPC-specific configuration for `import_adaptive_mt_file` # @return [::Gapic::Config::Method] # attr_reader :import_adaptive_mt_file ## # RPC-specific configuration for `list_adaptive_mt_files` # @return [::Gapic::Config::Method] # attr_reader :list_adaptive_mt_files ## # RPC-specific configuration for `list_adaptive_mt_sentences` # @return [::Gapic::Config::Method] # attr_reader :list_adaptive_mt_sentences ## # RPC-specific configuration for `import_data` # @return [::Gapic::Config::Method] # attr_reader :import_data ## # RPC-specific configuration for `export_data` # @return [::Gapic::Config::Method] # attr_reader :export_data ## # RPC-specific configuration for `list_examples` # @return [::Gapic::Config::Method] # attr_reader :list_examples ## # RPC-specific configuration for `create_model` # @return [::Gapic::Config::Method] # attr_reader :create_model ## # RPC-specific configuration for `list_models` # @return [::Gapic::Config::Method] # attr_reader :list_models ## # RPC-specific configuration for `get_model` # @return [::Gapic::Config::Method] # attr_reader :get_model ## # RPC-specific configuration for `delete_model` # @return [::Gapic::Config::Method] # attr_reader :delete_model # @private def initialize parent_rpcs = nil translate_text_config = parent_rpcs.translate_text if parent_rpcs.respond_to? :translate_text @translate_text = ::Gapic::Config::Method.new translate_text_config romanize_text_config = parent_rpcs.romanize_text if parent_rpcs.respond_to? :romanize_text @romanize_text = ::Gapic::Config::Method.new romanize_text_config detect_language_config = parent_rpcs.detect_language if parent_rpcs.respond_to? :detect_language @detect_language = ::Gapic::Config::Method.new detect_language_config get_supported_languages_config = parent_rpcs.get_supported_languages if parent_rpcs.respond_to? :get_supported_languages @get_supported_languages = ::Gapic::Config::Method.new get_supported_languages_config translate_document_config = parent_rpcs.translate_document if parent_rpcs.respond_to? :translate_document @translate_document = ::Gapic::Config::Method.new translate_document_config batch_translate_text_config = parent_rpcs.batch_translate_text if parent_rpcs.respond_to? :batch_translate_text @batch_translate_text = ::Gapic::Config::Method.new batch_translate_text_config batch_translate_document_config = parent_rpcs.batch_translate_document if parent_rpcs.respond_to? :batch_translate_document @batch_translate_document = ::Gapic::Config::Method.new batch_translate_document_config create_glossary_config = parent_rpcs.create_glossary if parent_rpcs.respond_to? :create_glossary @create_glossary = ::Gapic::Config::Method.new create_glossary_config update_glossary_config = parent_rpcs.update_glossary if parent_rpcs.respond_to? :update_glossary @update_glossary = ::Gapic::Config::Method.new update_glossary_config list_glossaries_config = parent_rpcs.list_glossaries if parent_rpcs.respond_to? :list_glossaries @list_glossaries = ::Gapic::Config::Method.new list_glossaries_config get_glossary_config = parent_rpcs.get_glossary if parent_rpcs.respond_to? :get_glossary @get_glossary = ::Gapic::Config::Method.new get_glossary_config delete_glossary_config = parent_rpcs.delete_glossary if parent_rpcs.respond_to? :delete_glossary @delete_glossary = ::Gapic::Config::Method.new delete_glossary_config get_glossary_entry_config = parent_rpcs.get_glossary_entry if parent_rpcs.respond_to? :get_glossary_entry @get_glossary_entry = ::Gapic::Config::Method.new get_glossary_entry_config list_glossary_entries_config = parent_rpcs.list_glossary_entries if parent_rpcs.respond_to? :list_glossary_entries @list_glossary_entries = ::Gapic::Config::Method.new list_glossary_entries_config create_glossary_entry_config = parent_rpcs.create_glossary_entry if parent_rpcs.respond_to? :create_glossary_entry @create_glossary_entry = ::Gapic::Config::Method.new create_glossary_entry_config update_glossary_entry_config = parent_rpcs.update_glossary_entry if parent_rpcs.respond_to? :update_glossary_entry @update_glossary_entry = ::Gapic::Config::Method.new update_glossary_entry_config delete_glossary_entry_config = parent_rpcs.delete_glossary_entry if parent_rpcs.respond_to? :delete_glossary_entry @delete_glossary_entry = ::Gapic::Config::Method.new delete_glossary_entry_config create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset @create_dataset = ::Gapic::Config::Method.new create_dataset_config get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset @get_dataset = ::Gapic::Config::Method.new get_dataset_config list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets @list_datasets = ::Gapic::Config::Method.new list_datasets_config delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config create_adaptive_mt_dataset_config = parent_rpcs.create_adaptive_mt_dataset if parent_rpcs.respond_to? :create_adaptive_mt_dataset @create_adaptive_mt_dataset = ::Gapic::Config::Method.new create_adaptive_mt_dataset_config delete_adaptive_mt_dataset_config = parent_rpcs.delete_adaptive_mt_dataset if parent_rpcs.respond_to? :delete_adaptive_mt_dataset @delete_adaptive_mt_dataset = ::Gapic::Config::Method.new delete_adaptive_mt_dataset_config get_adaptive_mt_dataset_config = parent_rpcs.get_adaptive_mt_dataset if parent_rpcs.respond_to? :get_adaptive_mt_dataset @get_adaptive_mt_dataset = ::Gapic::Config::Method.new get_adaptive_mt_dataset_config list_adaptive_mt_datasets_config = parent_rpcs.list_adaptive_mt_datasets if parent_rpcs.respond_to? :list_adaptive_mt_datasets @list_adaptive_mt_datasets = ::Gapic::Config::Method.new list_adaptive_mt_datasets_config adaptive_mt_translate_config = parent_rpcs.adaptive_mt_translate if parent_rpcs.respond_to? :adaptive_mt_translate @adaptive_mt_translate = ::Gapic::Config::Method.new adaptive_mt_translate_config get_adaptive_mt_file_config = parent_rpcs.get_adaptive_mt_file if parent_rpcs.respond_to? :get_adaptive_mt_file @get_adaptive_mt_file = ::Gapic::Config::Method.new get_adaptive_mt_file_config delete_adaptive_mt_file_config = parent_rpcs.delete_adaptive_mt_file if parent_rpcs.respond_to? :delete_adaptive_mt_file @delete_adaptive_mt_file = ::Gapic::Config::Method.new delete_adaptive_mt_file_config import_adaptive_mt_file_config = parent_rpcs.import_adaptive_mt_file if parent_rpcs.respond_to? :import_adaptive_mt_file @import_adaptive_mt_file = ::Gapic::Config::Method.new import_adaptive_mt_file_config list_adaptive_mt_files_config = parent_rpcs.list_adaptive_mt_files if parent_rpcs.respond_to? :list_adaptive_mt_files @list_adaptive_mt_files = ::Gapic::Config::Method.new list_adaptive_mt_files_config list_adaptive_mt_sentences_config = parent_rpcs.list_adaptive_mt_sentences if parent_rpcs.respond_to? :list_adaptive_mt_sentences @list_adaptive_mt_sentences = ::Gapic::Config::Method.new list_adaptive_mt_sentences_config import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data @import_data = ::Gapic::Config::Method.new import_data_config export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data @export_data = ::Gapic::Config::Method.new export_data_config list_examples_config = parent_rpcs.list_examples if parent_rpcs.respond_to? :list_examples @list_examples = ::Gapic::Config::Method.new list_examples_config create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model @create_model = ::Gapic::Config::Method.new create_model_config list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models @list_models = ::Gapic::Config::Method.new list_models_config get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model @get_model = ::Gapic::Config::Method.new get_model_config delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model @delete_model = ::Gapic::Config::Method.new delete_model_config yield self if block_given? end end end |
#lib_name ⇒ ::String
The library name as recorded in instrumentation and logging
3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 |
# File 'lib/google/cloud/translate/v3/translation_service/rest/client.rb', line 3943 class Configuration extend ::Gapic::Config # @private # The endpoint specific to the default "googleapis.com" universe. Deprecated. DEFAULT_ENDPOINT = "translate.googleapis.com" config_attr :endpoint, nil, ::String, nil config_attr :credentials, nil do |value| allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] allowed.any? { |klass| klass === value } end config_attr :scope, nil, ::String, ::Array, nil config_attr :lib_name, nil, ::String, nil config_attr :lib_version, nil, ::String, nil config_attr :timeout, nil, ::Numeric, nil config_attr :metadata, nil, ::Hash, nil config_attr :retry_policy, nil, ::Hash, ::Proc, nil config_attr :quota_project, nil, ::String, nil config_attr :universe_domain, nil, ::String, nil # @private # Overrides for http bindings for the RPCs of this service # are only used when this service is used as mixin, and only # by the host service. # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] config_attr :bindings_override, {}, ::Hash, nil config_attr :logger, :default, ::Logger, nil, :default # @private def initialize parent_config = nil @parent_config = parent_config unless parent_config.nil? yield self if block_given? end ## # Configurations for individual RPCs # @return [Rpcs] # def rpcs @rpcs ||= begin parent_rpcs = nil parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) Rpcs.new parent_rpcs end end ## # Configuration RPC class for the TranslationService API. # # Includes fields providing the configuration for each RPC in this service. # Each configuration object is of type `Gapic::Config::Method` and includes # the following configuration fields: # # * `timeout` (*type:* `Numeric`) - The call timeout in seconds # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields # include the following keys: # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should # trigger a retry. # class Rpcs ## # RPC-specific configuration for `translate_text` # @return [::Gapic::Config::Method] # attr_reader :translate_text ## # RPC-specific configuration for `romanize_text` # @return [::Gapic::Config::Method] # attr_reader :romanize_text ## # RPC-specific configuration for `detect_language` # @return [::Gapic::Config::Method] # attr_reader :detect_language ## # RPC-specific configuration for `get_supported_languages` # @return [::Gapic::Config::Method] # attr_reader :get_supported_languages ## # RPC-specific configuration for `translate_document` # @return [::Gapic::Config::Method] # attr_reader :translate_document ## # RPC-specific configuration for `batch_translate_text` # @return [::Gapic::Config::Method] # attr_reader :batch_translate_text ## # RPC-specific configuration for `batch_translate_document` # @return [::Gapic::Config::Method] # attr_reader :batch_translate_document ## # RPC-specific configuration for `create_glossary` # @return [::Gapic::Config::Method] # attr_reader :create_glossary ## # RPC-specific configuration for `update_glossary` # @return [::Gapic::Config::Method] # attr_reader :update_glossary ## # RPC-specific configuration for `list_glossaries` # @return [::Gapic::Config::Method] # attr_reader :list_glossaries ## # RPC-specific configuration for `get_glossary` # @return [::Gapic::Config::Method] # attr_reader :get_glossary ## # RPC-specific configuration for `delete_glossary` # @return [::Gapic::Config::Method] # attr_reader :delete_glossary ## # RPC-specific configuration for `get_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :get_glossary_entry ## # RPC-specific configuration for `list_glossary_entries` # @return [::Gapic::Config::Method] # attr_reader :list_glossary_entries ## # RPC-specific configuration for `create_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :create_glossary_entry ## # RPC-specific configuration for `update_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :update_glossary_entry ## # RPC-specific configuration for `delete_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :delete_glossary_entry ## # RPC-specific configuration for `create_dataset` # @return [::Gapic::Config::Method] # attr_reader :create_dataset ## # RPC-specific configuration for `get_dataset` # @return [::Gapic::Config::Method] # attr_reader :get_dataset ## # RPC-specific configuration for `list_datasets` # @return [::Gapic::Config::Method] # attr_reader :list_datasets ## # RPC-specific configuration for `delete_dataset` # @return [::Gapic::Config::Method] # attr_reader :delete_dataset ## # RPC-specific configuration for `create_adaptive_mt_dataset` # @return [::Gapic::Config::Method] # attr_reader :create_adaptive_mt_dataset ## # RPC-specific configuration for `delete_adaptive_mt_dataset` # @return [::Gapic::Config::Method] # attr_reader :delete_adaptive_mt_dataset ## # RPC-specific configuration for `get_adaptive_mt_dataset` # @return [::Gapic::Config::Method] # attr_reader :get_adaptive_mt_dataset ## # RPC-specific configuration for `list_adaptive_mt_datasets` # @return [::Gapic::Config::Method] # attr_reader :list_adaptive_mt_datasets ## # RPC-specific configuration for `adaptive_mt_translate` # @return [::Gapic::Config::Method] # attr_reader :adaptive_mt_translate ## # RPC-specific configuration for `get_adaptive_mt_file` # @return [::Gapic::Config::Method] # attr_reader :get_adaptive_mt_file ## # RPC-specific configuration for `delete_adaptive_mt_file` # @return [::Gapic::Config::Method] # attr_reader :delete_adaptive_mt_file ## # RPC-specific configuration for `import_adaptive_mt_file` # @return [::Gapic::Config::Method] # attr_reader :import_adaptive_mt_file ## # RPC-specific configuration for `list_adaptive_mt_files` # @return [::Gapic::Config::Method] # attr_reader :list_adaptive_mt_files ## # RPC-specific configuration for `list_adaptive_mt_sentences` # @return [::Gapic::Config::Method] # attr_reader :list_adaptive_mt_sentences ## # RPC-specific configuration for `import_data` # @return [::Gapic::Config::Method] # attr_reader :import_data ## # RPC-specific configuration for `export_data` # @return [::Gapic::Config::Method] # attr_reader :export_data ## # RPC-specific configuration for `list_examples` # @return [::Gapic::Config::Method] # attr_reader :list_examples ## # RPC-specific configuration for `create_model` # @return [::Gapic::Config::Method] # attr_reader :create_model ## # RPC-specific configuration for `list_models` # @return [::Gapic::Config::Method] # attr_reader :list_models ## # RPC-specific configuration for `get_model` # @return [::Gapic::Config::Method] # attr_reader :get_model ## # RPC-specific configuration for `delete_model` # @return [::Gapic::Config::Method] # attr_reader :delete_model # @private def initialize parent_rpcs = nil translate_text_config = parent_rpcs.translate_text if parent_rpcs.respond_to? :translate_text @translate_text = ::Gapic::Config::Method.new translate_text_config romanize_text_config = parent_rpcs.romanize_text if parent_rpcs.respond_to? :romanize_text @romanize_text = ::Gapic::Config::Method.new romanize_text_config detect_language_config = parent_rpcs.detect_language if parent_rpcs.respond_to? :detect_language @detect_language = ::Gapic::Config::Method.new detect_language_config get_supported_languages_config = parent_rpcs.get_supported_languages if parent_rpcs.respond_to? :get_supported_languages @get_supported_languages = ::Gapic::Config::Method.new get_supported_languages_config translate_document_config = parent_rpcs.translate_document if parent_rpcs.respond_to? :translate_document @translate_document = ::Gapic::Config::Method.new translate_document_config batch_translate_text_config = parent_rpcs.batch_translate_text if parent_rpcs.respond_to? :batch_translate_text @batch_translate_text = ::Gapic::Config::Method.new batch_translate_text_config batch_translate_document_config = parent_rpcs.batch_translate_document if parent_rpcs.respond_to? :batch_translate_document @batch_translate_document = ::Gapic::Config::Method.new batch_translate_document_config create_glossary_config = parent_rpcs.create_glossary if parent_rpcs.respond_to? :create_glossary @create_glossary = ::Gapic::Config::Method.new create_glossary_config update_glossary_config = parent_rpcs.update_glossary if parent_rpcs.respond_to? :update_glossary @update_glossary = ::Gapic::Config::Method.new update_glossary_config list_glossaries_config = parent_rpcs.list_glossaries if parent_rpcs.respond_to? :list_glossaries @list_glossaries = ::Gapic::Config::Method.new list_glossaries_config get_glossary_config = parent_rpcs.get_glossary if parent_rpcs.respond_to? :get_glossary @get_glossary = ::Gapic::Config::Method.new get_glossary_config delete_glossary_config = parent_rpcs.delete_glossary if parent_rpcs.respond_to? :delete_glossary @delete_glossary = ::Gapic::Config::Method.new delete_glossary_config get_glossary_entry_config = parent_rpcs.get_glossary_entry if parent_rpcs.respond_to? :get_glossary_entry @get_glossary_entry = ::Gapic::Config::Method.new get_glossary_entry_config list_glossary_entries_config = parent_rpcs.list_glossary_entries if parent_rpcs.respond_to? :list_glossary_entries @list_glossary_entries = ::Gapic::Config::Method.new list_glossary_entries_config create_glossary_entry_config = parent_rpcs.create_glossary_entry if parent_rpcs.respond_to? :create_glossary_entry @create_glossary_entry = ::Gapic::Config::Method.new create_glossary_entry_config update_glossary_entry_config = parent_rpcs.update_glossary_entry if parent_rpcs.respond_to? :update_glossary_entry @update_glossary_entry = ::Gapic::Config::Method.new update_glossary_entry_config delete_glossary_entry_config = parent_rpcs.delete_glossary_entry if parent_rpcs.respond_to? :delete_glossary_entry @delete_glossary_entry = ::Gapic::Config::Method.new delete_glossary_entry_config create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset @create_dataset = ::Gapic::Config::Method.new create_dataset_config get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset @get_dataset = ::Gapic::Config::Method.new get_dataset_config list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets @list_datasets = ::Gapic::Config::Method.new list_datasets_config delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config create_adaptive_mt_dataset_config = parent_rpcs.create_adaptive_mt_dataset if parent_rpcs.respond_to? :create_adaptive_mt_dataset @create_adaptive_mt_dataset = ::Gapic::Config::Method.new create_adaptive_mt_dataset_config delete_adaptive_mt_dataset_config = parent_rpcs.delete_adaptive_mt_dataset if parent_rpcs.respond_to? :delete_adaptive_mt_dataset @delete_adaptive_mt_dataset = ::Gapic::Config::Method.new delete_adaptive_mt_dataset_config get_adaptive_mt_dataset_config = parent_rpcs.get_adaptive_mt_dataset if parent_rpcs.respond_to? :get_adaptive_mt_dataset @get_adaptive_mt_dataset = ::Gapic::Config::Method.new get_adaptive_mt_dataset_config list_adaptive_mt_datasets_config = parent_rpcs.list_adaptive_mt_datasets if parent_rpcs.respond_to? :list_adaptive_mt_datasets @list_adaptive_mt_datasets = ::Gapic::Config::Method.new list_adaptive_mt_datasets_config adaptive_mt_translate_config = parent_rpcs.adaptive_mt_translate if parent_rpcs.respond_to? :adaptive_mt_translate @adaptive_mt_translate = ::Gapic::Config::Method.new adaptive_mt_translate_config get_adaptive_mt_file_config = parent_rpcs.get_adaptive_mt_file if parent_rpcs.respond_to? :get_adaptive_mt_file @get_adaptive_mt_file = ::Gapic::Config::Method.new get_adaptive_mt_file_config delete_adaptive_mt_file_config = parent_rpcs.delete_adaptive_mt_file if parent_rpcs.respond_to? :delete_adaptive_mt_file @delete_adaptive_mt_file = ::Gapic::Config::Method.new delete_adaptive_mt_file_config import_adaptive_mt_file_config = parent_rpcs.import_adaptive_mt_file if parent_rpcs.respond_to? :import_adaptive_mt_file @import_adaptive_mt_file = ::Gapic::Config::Method.new import_adaptive_mt_file_config list_adaptive_mt_files_config = parent_rpcs.list_adaptive_mt_files if parent_rpcs.respond_to? :list_adaptive_mt_files @list_adaptive_mt_files = ::Gapic::Config::Method.new list_adaptive_mt_files_config list_adaptive_mt_sentences_config = parent_rpcs.list_adaptive_mt_sentences if parent_rpcs.respond_to? :list_adaptive_mt_sentences @list_adaptive_mt_sentences = ::Gapic::Config::Method.new list_adaptive_mt_sentences_config import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data @import_data = ::Gapic::Config::Method.new import_data_config export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data @export_data = ::Gapic::Config::Method.new export_data_config list_examples_config = parent_rpcs.list_examples if parent_rpcs.respond_to? :list_examples @list_examples = ::Gapic::Config::Method.new list_examples_config create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model @create_model = ::Gapic::Config::Method.new create_model_config list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models @list_models = ::Gapic::Config::Method.new list_models_config get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model @get_model = ::Gapic::Config::Method.new get_model_config delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model @delete_model = ::Gapic::Config::Method.new delete_model_config yield self if block_given? end end end |
#lib_version ⇒ ::String
The library version as recorded in instrumentation and logging
3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 |
# File 'lib/google/cloud/translate/v3/translation_service/rest/client.rb', line 3943 class Configuration extend ::Gapic::Config # @private # The endpoint specific to the default "googleapis.com" universe. Deprecated. DEFAULT_ENDPOINT = "translate.googleapis.com" config_attr :endpoint, nil, ::String, nil config_attr :credentials, nil do |value| allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] allowed.any? { |klass| klass === value } end config_attr :scope, nil, ::String, ::Array, nil config_attr :lib_name, nil, ::String, nil config_attr :lib_version, nil, ::String, nil config_attr :timeout, nil, ::Numeric, nil config_attr :metadata, nil, ::Hash, nil config_attr :retry_policy, nil, ::Hash, ::Proc, nil config_attr :quota_project, nil, ::String, nil config_attr :universe_domain, nil, ::String, nil # @private # Overrides for http bindings for the RPCs of this service # are only used when this service is used as mixin, and only # by the host service. # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] config_attr :bindings_override, {}, ::Hash, nil config_attr :logger, :default, ::Logger, nil, :default # @private def initialize parent_config = nil @parent_config = parent_config unless parent_config.nil? yield self if block_given? end ## # Configurations for individual RPCs # @return [Rpcs] # def rpcs @rpcs ||= begin parent_rpcs = nil parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) Rpcs.new parent_rpcs end end ## # Configuration RPC class for the TranslationService API. # # Includes fields providing the configuration for each RPC in this service. # Each configuration object is of type `Gapic::Config::Method` and includes # the following configuration fields: # # * `timeout` (*type:* `Numeric`) - The call timeout in seconds # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields # include the following keys: # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should # trigger a retry. # class Rpcs ## # RPC-specific configuration for `translate_text` # @return [::Gapic::Config::Method] # attr_reader :translate_text ## # RPC-specific configuration for `romanize_text` # @return [::Gapic::Config::Method] # attr_reader :romanize_text ## # RPC-specific configuration for `detect_language` # @return [::Gapic::Config::Method] # attr_reader :detect_language ## # RPC-specific configuration for `get_supported_languages` # @return [::Gapic::Config::Method] # attr_reader :get_supported_languages ## # RPC-specific configuration for `translate_document` # @return [::Gapic::Config::Method] # attr_reader :translate_document ## # RPC-specific configuration for `batch_translate_text` # @return [::Gapic::Config::Method] # attr_reader :batch_translate_text ## # RPC-specific configuration for `batch_translate_document` # @return [::Gapic::Config::Method] # attr_reader :batch_translate_document ## # RPC-specific configuration for `create_glossary` # @return [::Gapic::Config::Method] # attr_reader :create_glossary ## # RPC-specific configuration for `update_glossary` # @return [::Gapic::Config::Method] # attr_reader :update_glossary ## # RPC-specific configuration for `list_glossaries` # @return [::Gapic::Config::Method] # attr_reader :list_glossaries ## # RPC-specific configuration for `get_glossary` # @return [::Gapic::Config::Method] # attr_reader :get_glossary ## # RPC-specific configuration for `delete_glossary` # @return [::Gapic::Config::Method] # attr_reader :delete_glossary ## # RPC-specific configuration for `get_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :get_glossary_entry ## # RPC-specific configuration for `list_glossary_entries` # @return [::Gapic::Config::Method] # attr_reader :list_glossary_entries ## # RPC-specific configuration for `create_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :create_glossary_entry ## # RPC-specific configuration for `update_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :update_glossary_entry ## # RPC-specific configuration for `delete_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :delete_glossary_entry ## # RPC-specific configuration for `create_dataset` # @return [::Gapic::Config::Method] # attr_reader :create_dataset ## # RPC-specific configuration for `get_dataset` # @return [::Gapic::Config::Method] # attr_reader :get_dataset ## # RPC-specific configuration for `list_datasets` # @return [::Gapic::Config::Method] # attr_reader :list_datasets ## # RPC-specific configuration for `delete_dataset` # @return [::Gapic::Config::Method] # attr_reader :delete_dataset ## # RPC-specific configuration for `create_adaptive_mt_dataset` # @return [::Gapic::Config::Method] # attr_reader :create_adaptive_mt_dataset ## # RPC-specific configuration for `delete_adaptive_mt_dataset` # @return [::Gapic::Config::Method] # attr_reader :delete_adaptive_mt_dataset ## # RPC-specific configuration for `get_adaptive_mt_dataset` # @return [::Gapic::Config::Method] # attr_reader :get_adaptive_mt_dataset ## # RPC-specific configuration for `list_adaptive_mt_datasets` # @return [::Gapic::Config::Method] # attr_reader :list_adaptive_mt_datasets ## # RPC-specific configuration for `adaptive_mt_translate` # @return [::Gapic::Config::Method] # attr_reader :adaptive_mt_translate ## # RPC-specific configuration for `get_adaptive_mt_file` # @return [::Gapic::Config::Method] # attr_reader :get_adaptive_mt_file ## # RPC-specific configuration for `delete_adaptive_mt_file` # @return [::Gapic::Config::Method] # attr_reader :delete_adaptive_mt_file ## # RPC-specific configuration for `import_adaptive_mt_file` # @return [::Gapic::Config::Method] # attr_reader :import_adaptive_mt_file ## # RPC-specific configuration for `list_adaptive_mt_files` # @return [::Gapic::Config::Method] # attr_reader :list_adaptive_mt_files ## # RPC-specific configuration for `list_adaptive_mt_sentences` # @return [::Gapic::Config::Method] # attr_reader :list_adaptive_mt_sentences ## # RPC-specific configuration for `import_data` # @return [::Gapic::Config::Method] # attr_reader :import_data ## # RPC-specific configuration for `export_data` # @return [::Gapic::Config::Method] # attr_reader :export_data ## # RPC-specific configuration for `list_examples` # @return [::Gapic::Config::Method] # attr_reader :list_examples ## # RPC-specific configuration for `create_model` # @return [::Gapic::Config::Method] # attr_reader :create_model ## # RPC-specific configuration for `list_models` # @return [::Gapic::Config::Method] # attr_reader :list_models ## # RPC-specific configuration for `get_model` # @return [::Gapic::Config::Method] # attr_reader :get_model ## # RPC-specific configuration for `delete_model` # @return [::Gapic::Config::Method] # attr_reader :delete_model # @private def initialize parent_rpcs = nil translate_text_config = parent_rpcs.translate_text if parent_rpcs.respond_to? :translate_text @translate_text = ::Gapic::Config::Method.new translate_text_config romanize_text_config = parent_rpcs.romanize_text if parent_rpcs.respond_to? :romanize_text @romanize_text = ::Gapic::Config::Method.new romanize_text_config detect_language_config = parent_rpcs.detect_language if parent_rpcs.respond_to? :detect_language @detect_language = ::Gapic::Config::Method.new detect_language_config get_supported_languages_config = parent_rpcs.get_supported_languages if parent_rpcs.respond_to? :get_supported_languages @get_supported_languages = ::Gapic::Config::Method.new get_supported_languages_config translate_document_config = parent_rpcs.translate_document if parent_rpcs.respond_to? :translate_document @translate_document = ::Gapic::Config::Method.new translate_document_config batch_translate_text_config = parent_rpcs.batch_translate_text if parent_rpcs.respond_to? :batch_translate_text @batch_translate_text = ::Gapic::Config::Method.new batch_translate_text_config batch_translate_document_config = parent_rpcs.batch_translate_document if parent_rpcs.respond_to? :batch_translate_document @batch_translate_document = ::Gapic::Config::Method.new batch_translate_document_config create_glossary_config = parent_rpcs.create_glossary if parent_rpcs.respond_to? :create_glossary @create_glossary = ::Gapic::Config::Method.new create_glossary_config update_glossary_config = parent_rpcs.update_glossary if parent_rpcs.respond_to? :update_glossary @update_glossary = ::Gapic::Config::Method.new update_glossary_config list_glossaries_config = parent_rpcs.list_glossaries if parent_rpcs.respond_to? :list_glossaries @list_glossaries = ::Gapic::Config::Method.new list_glossaries_config get_glossary_config = parent_rpcs.get_glossary if parent_rpcs.respond_to? :get_glossary @get_glossary = ::Gapic::Config::Method.new get_glossary_config delete_glossary_config = parent_rpcs.delete_glossary if parent_rpcs.respond_to? :delete_glossary @delete_glossary = ::Gapic::Config::Method.new delete_glossary_config get_glossary_entry_config = parent_rpcs.get_glossary_entry if parent_rpcs.respond_to? :get_glossary_entry @get_glossary_entry = ::Gapic::Config::Method.new get_glossary_entry_config list_glossary_entries_config = parent_rpcs.list_glossary_entries if parent_rpcs.respond_to? :list_glossary_entries @list_glossary_entries = ::Gapic::Config::Method.new list_glossary_entries_config create_glossary_entry_config = parent_rpcs.create_glossary_entry if parent_rpcs.respond_to? :create_glossary_entry @create_glossary_entry = ::Gapic::Config::Method.new create_glossary_entry_config update_glossary_entry_config = parent_rpcs.update_glossary_entry if parent_rpcs.respond_to? :update_glossary_entry @update_glossary_entry = ::Gapic::Config::Method.new update_glossary_entry_config delete_glossary_entry_config = parent_rpcs.delete_glossary_entry if parent_rpcs.respond_to? :delete_glossary_entry @delete_glossary_entry = ::Gapic::Config::Method.new delete_glossary_entry_config create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset @create_dataset = ::Gapic::Config::Method.new create_dataset_config get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset @get_dataset = ::Gapic::Config::Method.new get_dataset_config list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets @list_datasets = ::Gapic::Config::Method.new list_datasets_config delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config create_adaptive_mt_dataset_config = parent_rpcs.create_adaptive_mt_dataset if parent_rpcs.respond_to? :create_adaptive_mt_dataset @create_adaptive_mt_dataset = ::Gapic::Config::Method.new create_adaptive_mt_dataset_config delete_adaptive_mt_dataset_config = parent_rpcs.delete_adaptive_mt_dataset if parent_rpcs.respond_to? :delete_adaptive_mt_dataset @delete_adaptive_mt_dataset = ::Gapic::Config::Method.new delete_adaptive_mt_dataset_config get_adaptive_mt_dataset_config = parent_rpcs.get_adaptive_mt_dataset if parent_rpcs.respond_to? :get_adaptive_mt_dataset @get_adaptive_mt_dataset = ::Gapic::Config::Method.new get_adaptive_mt_dataset_config list_adaptive_mt_datasets_config = parent_rpcs.list_adaptive_mt_datasets if parent_rpcs.respond_to? :list_adaptive_mt_datasets @list_adaptive_mt_datasets = ::Gapic::Config::Method.new list_adaptive_mt_datasets_config adaptive_mt_translate_config = parent_rpcs.adaptive_mt_translate if parent_rpcs.respond_to? :adaptive_mt_translate @adaptive_mt_translate = ::Gapic::Config::Method.new adaptive_mt_translate_config get_adaptive_mt_file_config = parent_rpcs.get_adaptive_mt_file if parent_rpcs.respond_to? :get_adaptive_mt_file @get_adaptive_mt_file = ::Gapic::Config::Method.new get_adaptive_mt_file_config delete_adaptive_mt_file_config = parent_rpcs.delete_adaptive_mt_file if parent_rpcs.respond_to? :delete_adaptive_mt_file @delete_adaptive_mt_file = ::Gapic::Config::Method.new delete_adaptive_mt_file_config import_adaptive_mt_file_config = parent_rpcs.import_adaptive_mt_file if parent_rpcs.respond_to? :import_adaptive_mt_file @import_adaptive_mt_file = ::Gapic::Config::Method.new import_adaptive_mt_file_config list_adaptive_mt_files_config = parent_rpcs.list_adaptive_mt_files if parent_rpcs.respond_to? :list_adaptive_mt_files @list_adaptive_mt_files = ::Gapic::Config::Method.new list_adaptive_mt_files_config list_adaptive_mt_sentences_config = parent_rpcs.list_adaptive_mt_sentences if parent_rpcs.respond_to? :list_adaptive_mt_sentences @list_adaptive_mt_sentences = ::Gapic::Config::Method.new list_adaptive_mt_sentences_config import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data @import_data = ::Gapic::Config::Method.new import_data_config export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data @export_data = ::Gapic::Config::Method.new export_data_config list_examples_config = parent_rpcs.list_examples if parent_rpcs.respond_to? :list_examples @list_examples = ::Gapic::Config::Method.new list_examples_config create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model @create_model = ::Gapic::Config::Method.new create_model_config list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models @list_models = ::Gapic::Config::Method.new list_models_config get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model @get_model = ::Gapic::Config::Method.new get_model_config delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model @delete_model = ::Gapic::Config::Method.new delete_model_config yield self if block_given? end end end |
#logger ⇒ ::Logger, ...
A custom logger to use for request/response debug logging, or the value
:default
(the default) to construct a default logger, or nil
to
explicitly disable logging.
3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 |
# File 'lib/google/cloud/translate/v3/translation_service/rest/client.rb', line 3943 class Configuration extend ::Gapic::Config # @private # The endpoint specific to the default "googleapis.com" universe. Deprecated. DEFAULT_ENDPOINT = "translate.googleapis.com" config_attr :endpoint, nil, ::String, nil config_attr :credentials, nil do |value| allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] allowed.any? { |klass| klass === value } end config_attr :scope, nil, ::String, ::Array, nil config_attr :lib_name, nil, ::String, nil config_attr :lib_version, nil, ::String, nil config_attr :timeout, nil, ::Numeric, nil config_attr :metadata, nil, ::Hash, nil config_attr :retry_policy, nil, ::Hash, ::Proc, nil config_attr :quota_project, nil, ::String, nil config_attr :universe_domain, nil, ::String, nil # @private # Overrides for http bindings for the RPCs of this service # are only used when this service is used as mixin, and only # by the host service. # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] config_attr :bindings_override, {}, ::Hash, nil config_attr :logger, :default, ::Logger, nil, :default # @private def initialize parent_config = nil @parent_config = parent_config unless parent_config.nil? yield self if block_given? end ## # Configurations for individual RPCs # @return [Rpcs] # def rpcs @rpcs ||= begin parent_rpcs = nil parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) Rpcs.new parent_rpcs end end ## # Configuration RPC class for the TranslationService API. # # Includes fields providing the configuration for each RPC in this service. # Each configuration object is of type `Gapic::Config::Method` and includes # the following configuration fields: # # * `timeout` (*type:* `Numeric`) - The call timeout in seconds # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields # include the following keys: # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should # trigger a retry. # class Rpcs ## # RPC-specific configuration for `translate_text` # @return [::Gapic::Config::Method] # attr_reader :translate_text ## # RPC-specific configuration for `romanize_text` # @return [::Gapic::Config::Method] # attr_reader :romanize_text ## # RPC-specific configuration for `detect_language` # @return [::Gapic::Config::Method] # attr_reader :detect_language ## # RPC-specific configuration for `get_supported_languages` # @return [::Gapic::Config::Method] # attr_reader :get_supported_languages ## # RPC-specific configuration for `translate_document` # @return [::Gapic::Config::Method] # attr_reader :translate_document ## # RPC-specific configuration for `batch_translate_text` # @return [::Gapic::Config::Method] # attr_reader :batch_translate_text ## # RPC-specific configuration for `batch_translate_document` # @return [::Gapic::Config::Method] # attr_reader :batch_translate_document ## # RPC-specific configuration for `create_glossary` # @return [::Gapic::Config::Method] # attr_reader :create_glossary ## # RPC-specific configuration for `update_glossary` # @return [::Gapic::Config::Method] # attr_reader :update_glossary ## # RPC-specific configuration for `list_glossaries` # @return [::Gapic::Config::Method] # attr_reader :list_glossaries ## # RPC-specific configuration for `get_glossary` # @return [::Gapic::Config::Method] # attr_reader :get_glossary ## # RPC-specific configuration for `delete_glossary` # @return [::Gapic::Config::Method] # attr_reader :delete_glossary ## # RPC-specific configuration for `get_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :get_glossary_entry ## # RPC-specific configuration for `list_glossary_entries` # @return [::Gapic::Config::Method] # attr_reader :list_glossary_entries ## # RPC-specific configuration for `create_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :create_glossary_entry ## # RPC-specific configuration for `update_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :update_glossary_entry ## # RPC-specific configuration for `delete_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :delete_glossary_entry ## # RPC-specific configuration for `create_dataset` # @return [::Gapic::Config::Method] # attr_reader :create_dataset ## # RPC-specific configuration for `get_dataset` # @return [::Gapic::Config::Method] # attr_reader :get_dataset ## # RPC-specific configuration for `list_datasets` # @return [::Gapic::Config::Method] # attr_reader :list_datasets ## # RPC-specific configuration for `delete_dataset` # @return [::Gapic::Config::Method] # attr_reader :delete_dataset ## # RPC-specific configuration for `create_adaptive_mt_dataset` # @return [::Gapic::Config::Method] # attr_reader :create_adaptive_mt_dataset ## # RPC-specific configuration for `delete_adaptive_mt_dataset` # @return [::Gapic::Config::Method] # attr_reader :delete_adaptive_mt_dataset ## # RPC-specific configuration for `get_adaptive_mt_dataset` # @return [::Gapic::Config::Method] # attr_reader :get_adaptive_mt_dataset ## # RPC-specific configuration for `list_adaptive_mt_datasets` # @return [::Gapic::Config::Method] # attr_reader :list_adaptive_mt_datasets ## # RPC-specific configuration for `adaptive_mt_translate` # @return [::Gapic::Config::Method] # attr_reader :adaptive_mt_translate ## # RPC-specific configuration for `get_adaptive_mt_file` # @return [::Gapic::Config::Method] # attr_reader :get_adaptive_mt_file ## # RPC-specific configuration for `delete_adaptive_mt_file` # @return [::Gapic::Config::Method] # attr_reader :delete_adaptive_mt_file ## # RPC-specific configuration for `import_adaptive_mt_file` # @return [::Gapic::Config::Method] # attr_reader :import_adaptive_mt_file ## # RPC-specific configuration for `list_adaptive_mt_files` # @return [::Gapic::Config::Method] # attr_reader :list_adaptive_mt_files ## # RPC-specific configuration for `list_adaptive_mt_sentences` # @return [::Gapic::Config::Method] # attr_reader :list_adaptive_mt_sentences ## # RPC-specific configuration for `import_data` # @return [::Gapic::Config::Method] # attr_reader :import_data ## # RPC-specific configuration for `export_data` # @return [::Gapic::Config::Method] # attr_reader :export_data ## # RPC-specific configuration for `list_examples` # @return [::Gapic::Config::Method] # attr_reader :list_examples ## # RPC-specific configuration for `create_model` # @return [::Gapic::Config::Method] # attr_reader :create_model ## # RPC-specific configuration for `list_models` # @return [::Gapic::Config::Method] # attr_reader :list_models ## # RPC-specific configuration for `get_model` # @return [::Gapic::Config::Method] # attr_reader :get_model ## # RPC-specific configuration for `delete_model` # @return [::Gapic::Config::Method] # attr_reader :delete_model # @private def initialize parent_rpcs = nil translate_text_config = parent_rpcs.translate_text if parent_rpcs.respond_to? :translate_text @translate_text = ::Gapic::Config::Method.new translate_text_config romanize_text_config = parent_rpcs.romanize_text if parent_rpcs.respond_to? :romanize_text @romanize_text = ::Gapic::Config::Method.new romanize_text_config detect_language_config = parent_rpcs.detect_language if parent_rpcs.respond_to? :detect_language @detect_language = ::Gapic::Config::Method.new detect_language_config get_supported_languages_config = parent_rpcs.get_supported_languages if parent_rpcs.respond_to? :get_supported_languages @get_supported_languages = ::Gapic::Config::Method.new get_supported_languages_config translate_document_config = parent_rpcs.translate_document if parent_rpcs.respond_to? :translate_document @translate_document = ::Gapic::Config::Method.new translate_document_config batch_translate_text_config = parent_rpcs.batch_translate_text if parent_rpcs.respond_to? :batch_translate_text @batch_translate_text = ::Gapic::Config::Method.new batch_translate_text_config batch_translate_document_config = parent_rpcs.batch_translate_document if parent_rpcs.respond_to? :batch_translate_document @batch_translate_document = ::Gapic::Config::Method.new batch_translate_document_config create_glossary_config = parent_rpcs.create_glossary if parent_rpcs.respond_to? :create_glossary @create_glossary = ::Gapic::Config::Method.new create_glossary_config update_glossary_config = parent_rpcs.update_glossary if parent_rpcs.respond_to? :update_glossary @update_glossary = ::Gapic::Config::Method.new update_glossary_config list_glossaries_config = parent_rpcs.list_glossaries if parent_rpcs.respond_to? :list_glossaries @list_glossaries = ::Gapic::Config::Method.new list_glossaries_config get_glossary_config = parent_rpcs.get_glossary if parent_rpcs.respond_to? :get_glossary @get_glossary = ::Gapic::Config::Method.new get_glossary_config delete_glossary_config = parent_rpcs.delete_glossary if parent_rpcs.respond_to? :delete_glossary @delete_glossary = ::Gapic::Config::Method.new delete_glossary_config get_glossary_entry_config = parent_rpcs.get_glossary_entry if parent_rpcs.respond_to? :get_glossary_entry @get_glossary_entry = ::Gapic::Config::Method.new get_glossary_entry_config list_glossary_entries_config = parent_rpcs.list_glossary_entries if parent_rpcs.respond_to? :list_glossary_entries @list_glossary_entries = ::Gapic::Config::Method.new list_glossary_entries_config create_glossary_entry_config = parent_rpcs.create_glossary_entry if parent_rpcs.respond_to? :create_glossary_entry @create_glossary_entry = ::Gapic::Config::Method.new create_glossary_entry_config update_glossary_entry_config = parent_rpcs.update_glossary_entry if parent_rpcs.respond_to? :update_glossary_entry @update_glossary_entry = ::Gapic::Config::Method.new update_glossary_entry_config delete_glossary_entry_config = parent_rpcs.delete_glossary_entry if parent_rpcs.respond_to? :delete_glossary_entry @delete_glossary_entry = ::Gapic::Config::Method.new delete_glossary_entry_config create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset @create_dataset = ::Gapic::Config::Method.new create_dataset_config get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset @get_dataset = ::Gapic::Config::Method.new get_dataset_config list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets @list_datasets = ::Gapic::Config::Method.new list_datasets_config delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config create_adaptive_mt_dataset_config = parent_rpcs.create_adaptive_mt_dataset if parent_rpcs.respond_to? :create_adaptive_mt_dataset @create_adaptive_mt_dataset = ::Gapic::Config::Method.new create_adaptive_mt_dataset_config delete_adaptive_mt_dataset_config = parent_rpcs.delete_adaptive_mt_dataset if parent_rpcs.respond_to? :delete_adaptive_mt_dataset @delete_adaptive_mt_dataset = ::Gapic::Config::Method.new delete_adaptive_mt_dataset_config get_adaptive_mt_dataset_config = parent_rpcs.get_adaptive_mt_dataset if parent_rpcs.respond_to? :get_adaptive_mt_dataset @get_adaptive_mt_dataset = ::Gapic::Config::Method.new get_adaptive_mt_dataset_config list_adaptive_mt_datasets_config = parent_rpcs.list_adaptive_mt_datasets if parent_rpcs.respond_to? :list_adaptive_mt_datasets @list_adaptive_mt_datasets = ::Gapic::Config::Method.new list_adaptive_mt_datasets_config adaptive_mt_translate_config = parent_rpcs.adaptive_mt_translate if parent_rpcs.respond_to? :adaptive_mt_translate @adaptive_mt_translate = ::Gapic::Config::Method.new adaptive_mt_translate_config get_adaptive_mt_file_config = parent_rpcs.get_adaptive_mt_file if parent_rpcs.respond_to? :get_adaptive_mt_file @get_adaptive_mt_file = ::Gapic::Config::Method.new get_adaptive_mt_file_config delete_adaptive_mt_file_config = parent_rpcs.delete_adaptive_mt_file if parent_rpcs.respond_to? :delete_adaptive_mt_file @delete_adaptive_mt_file = ::Gapic::Config::Method.new delete_adaptive_mt_file_config import_adaptive_mt_file_config = parent_rpcs.import_adaptive_mt_file if parent_rpcs.respond_to? :import_adaptive_mt_file @import_adaptive_mt_file = ::Gapic::Config::Method.new import_adaptive_mt_file_config list_adaptive_mt_files_config = parent_rpcs.list_adaptive_mt_files if parent_rpcs.respond_to? :list_adaptive_mt_files @list_adaptive_mt_files = ::Gapic::Config::Method.new list_adaptive_mt_files_config list_adaptive_mt_sentences_config = parent_rpcs.list_adaptive_mt_sentences if parent_rpcs.respond_to? :list_adaptive_mt_sentences @list_adaptive_mt_sentences = ::Gapic::Config::Method.new list_adaptive_mt_sentences_config import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data @import_data = ::Gapic::Config::Method.new import_data_config export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data @export_data = ::Gapic::Config::Method.new export_data_config list_examples_config = parent_rpcs.list_examples if parent_rpcs.respond_to? :list_examples @list_examples = ::Gapic::Config::Method.new list_examples_config create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model @create_model = ::Gapic::Config::Method.new create_model_config list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models @list_models = ::Gapic::Config::Method.new list_models_config get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model @get_model = ::Gapic::Config::Method.new get_model_config delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model @delete_model = ::Gapic::Config::Method.new delete_model_config yield self if block_given? end end end |
#metadata ⇒ ::Hash{::Symbol=>::String}
Additional headers to be sent with the call.
3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 |
# File 'lib/google/cloud/translate/v3/translation_service/rest/client.rb', line 3943 class Configuration extend ::Gapic::Config # @private # The endpoint specific to the default "googleapis.com" universe. Deprecated. DEFAULT_ENDPOINT = "translate.googleapis.com" config_attr :endpoint, nil, ::String, nil config_attr :credentials, nil do |value| allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] allowed.any? { |klass| klass === value } end config_attr :scope, nil, ::String, ::Array, nil config_attr :lib_name, nil, ::String, nil config_attr :lib_version, nil, ::String, nil config_attr :timeout, nil, ::Numeric, nil config_attr :metadata, nil, ::Hash, nil config_attr :retry_policy, nil, ::Hash, ::Proc, nil config_attr :quota_project, nil, ::String, nil config_attr :universe_domain, nil, ::String, nil # @private # Overrides for http bindings for the RPCs of this service # are only used when this service is used as mixin, and only # by the host service. # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] config_attr :bindings_override, {}, ::Hash, nil config_attr :logger, :default, ::Logger, nil, :default # @private def initialize parent_config = nil @parent_config = parent_config unless parent_config.nil? yield self if block_given? end ## # Configurations for individual RPCs # @return [Rpcs] # def rpcs @rpcs ||= begin parent_rpcs = nil parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) Rpcs.new parent_rpcs end end ## # Configuration RPC class for the TranslationService API. # # Includes fields providing the configuration for each RPC in this service. # Each configuration object is of type `Gapic::Config::Method` and includes # the following configuration fields: # # * `timeout` (*type:* `Numeric`) - The call timeout in seconds # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields # include the following keys: # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should # trigger a retry. # class Rpcs ## # RPC-specific configuration for `translate_text` # @return [::Gapic::Config::Method] # attr_reader :translate_text ## # RPC-specific configuration for `romanize_text` # @return [::Gapic::Config::Method] # attr_reader :romanize_text ## # RPC-specific configuration for `detect_language` # @return [::Gapic::Config::Method] # attr_reader :detect_language ## # RPC-specific configuration for `get_supported_languages` # @return [::Gapic::Config::Method] # attr_reader :get_supported_languages ## # RPC-specific configuration for `translate_document` # @return [::Gapic::Config::Method] # attr_reader :translate_document ## # RPC-specific configuration for `batch_translate_text` # @return [::Gapic::Config::Method] # attr_reader :batch_translate_text ## # RPC-specific configuration for `batch_translate_document` # @return [::Gapic::Config::Method] # attr_reader :batch_translate_document ## # RPC-specific configuration for `create_glossary` # @return [::Gapic::Config::Method] # attr_reader :create_glossary ## # RPC-specific configuration for `update_glossary` # @return [::Gapic::Config::Method] # attr_reader :update_glossary ## # RPC-specific configuration for `list_glossaries` # @return [::Gapic::Config::Method] # attr_reader :list_glossaries ## # RPC-specific configuration for `get_glossary` # @return [::Gapic::Config::Method] # attr_reader :get_glossary ## # RPC-specific configuration for `delete_glossary` # @return [::Gapic::Config::Method] # attr_reader :delete_glossary ## # RPC-specific configuration for `get_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :get_glossary_entry ## # RPC-specific configuration for `list_glossary_entries` # @return [::Gapic::Config::Method] # attr_reader :list_glossary_entries ## # RPC-specific configuration for `create_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :create_glossary_entry ## # RPC-specific configuration for `update_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :update_glossary_entry ## # RPC-specific configuration for `delete_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :delete_glossary_entry ## # RPC-specific configuration for `create_dataset` # @return [::Gapic::Config::Method] # attr_reader :create_dataset ## # RPC-specific configuration for `get_dataset` # @return [::Gapic::Config::Method] # attr_reader :get_dataset ## # RPC-specific configuration for `list_datasets` # @return [::Gapic::Config::Method] # attr_reader :list_datasets ## # RPC-specific configuration for `delete_dataset` # @return [::Gapic::Config::Method] # attr_reader :delete_dataset ## # RPC-specific configuration for `create_adaptive_mt_dataset` # @return [::Gapic::Config::Method] # attr_reader :create_adaptive_mt_dataset ## # RPC-specific configuration for `delete_adaptive_mt_dataset` # @return [::Gapic::Config::Method] # attr_reader :delete_adaptive_mt_dataset ## # RPC-specific configuration for `get_adaptive_mt_dataset` # @return [::Gapic::Config::Method] # attr_reader :get_adaptive_mt_dataset ## # RPC-specific configuration for `list_adaptive_mt_datasets` # @return [::Gapic::Config::Method] # attr_reader :list_adaptive_mt_datasets ## # RPC-specific configuration for `adaptive_mt_translate` # @return [::Gapic::Config::Method] # attr_reader :adaptive_mt_translate ## # RPC-specific configuration for `get_adaptive_mt_file` # @return [::Gapic::Config::Method] # attr_reader :get_adaptive_mt_file ## # RPC-specific configuration for `delete_adaptive_mt_file` # @return [::Gapic::Config::Method] # attr_reader :delete_adaptive_mt_file ## # RPC-specific configuration for `import_adaptive_mt_file` # @return [::Gapic::Config::Method] # attr_reader :import_adaptive_mt_file ## # RPC-specific configuration for `list_adaptive_mt_files` # @return [::Gapic::Config::Method] # attr_reader :list_adaptive_mt_files ## # RPC-specific configuration for `list_adaptive_mt_sentences` # @return [::Gapic::Config::Method] # attr_reader :list_adaptive_mt_sentences ## # RPC-specific configuration for `import_data` # @return [::Gapic::Config::Method] # attr_reader :import_data ## # RPC-specific configuration for `export_data` # @return [::Gapic::Config::Method] # attr_reader :export_data ## # RPC-specific configuration for `list_examples` # @return [::Gapic::Config::Method] # attr_reader :list_examples ## # RPC-specific configuration for `create_model` # @return [::Gapic::Config::Method] # attr_reader :create_model ## # RPC-specific configuration for `list_models` # @return [::Gapic::Config::Method] # attr_reader :list_models ## # RPC-specific configuration for `get_model` # @return [::Gapic::Config::Method] # attr_reader :get_model ## # RPC-specific configuration for `delete_model` # @return [::Gapic::Config::Method] # attr_reader :delete_model # @private def initialize parent_rpcs = nil translate_text_config = parent_rpcs.translate_text if parent_rpcs.respond_to? :translate_text @translate_text = ::Gapic::Config::Method.new translate_text_config romanize_text_config = parent_rpcs.romanize_text if parent_rpcs.respond_to? :romanize_text @romanize_text = ::Gapic::Config::Method.new romanize_text_config detect_language_config = parent_rpcs.detect_language if parent_rpcs.respond_to? :detect_language @detect_language = ::Gapic::Config::Method.new detect_language_config get_supported_languages_config = parent_rpcs.get_supported_languages if parent_rpcs.respond_to? :get_supported_languages @get_supported_languages = ::Gapic::Config::Method.new get_supported_languages_config translate_document_config = parent_rpcs.translate_document if parent_rpcs.respond_to? :translate_document @translate_document = ::Gapic::Config::Method.new translate_document_config batch_translate_text_config = parent_rpcs.batch_translate_text if parent_rpcs.respond_to? :batch_translate_text @batch_translate_text = ::Gapic::Config::Method.new batch_translate_text_config batch_translate_document_config = parent_rpcs.batch_translate_document if parent_rpcs.respond_to? :batch_translate_document @batch_translate_document = ::Gapic::Config::Method.new batch_translate_document_config create_glossary_config = parent_rpcs.create_glossary if parent_rpcs.respond_to? :create_glossary @create_glossary = ::Gapic::Config::Method.new create_glossary_config update_glossary_config = parent_rpcs.update_glossary if parent_rpcs.respond_to? :update_glossary @update_glossary = ::Gapic::Config::Method.new update_glossary_config list_glossaries_config = parent_rpcs.list_glossaries if parent_rpcs.respond_to? :list_glossaries @list_glossaries = ::Gapic::Config::Method.new list_glossaries_config get_glossary_config = parent_rpcs.get_glossary if parent_rpcs.respond_to? :get_glossary @get_glossary = ::Gapic::Config::Method.new get_glossary_config delete_glossary_config = parent_rpcs.delete_glossary if parent_rpcs.respond_to? :delete_glossary @delete_glossary = ::Gapic::Config::Method.new delete_glossary_config get_glossary_entry_config = parent_rpcs.get_glossary_entry if parent_rpcs.respond_to? :get_glossary_entry @get_glossary_entry = ::Gapic::Config::Method.new get_glossary_entry_config list_glossary_entries_config = parent_rpcs.list_glossary_entries if parent_rpcs.respond_to? :list_glossary_entries @list_glossary_entries = ::Gapic::Config::Method.new list_glossary_entries_config create_glossary_entry_config = parent_rpcs.create_glossary_entry if parent_rpcs.respond_to? :create_glossary_entry @create_glossary_entry = ::Gapic::Config::Method.new create_glossary_entry_config update_glossary_entry_config = parent_rpcs.update_glossary_entry if parent_rpcs.respond_to? :update_glossary_entry @update_glossary_entry = ::Gapic::Config::Method.new update_glossary_entry_config delete_glossary_entry_config = parent_rpcs.delete_glossary_entry if parent_rpcs.respond_to? :delete_glossary_entry @delete_glossary_entry = ::Gapic::Config::Method.new delete_glossary_entry_config create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset @create_dataset = ::Gapic::Config::Method.new create_dataset_config get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset @get_dataset = ::Gapic::Config::Method.new get_dataset_config list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets @list_datasets = ::Gapic::Config::Method.new list_datasets_config delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config create_adaptive_mt_dataset_config = parent_rpcs.create_adaptive_mt_dataset if parent_rpcs.respond_to? :create_adaptive_mt_dataset @create_adaptive_mt_dataset = ::Gapic::Config::Method.new create_adaptive_mt_dataset_config delete_adaptive_mt_dataset_config = parent_rpcs.delete_adaptive_mt_dataset if parent_rpcs.respond_to? :delete_adaptive_mt_dataset @delete_adaptive_mt_dataset = ::Gapic::Config::Method.new delete_adaptive_mt_dataset_config get_adaptive_mt_dataset_config = parent_rpcs.get_adaptive_mt_dataset if parent_rpcs.respond_to? :get_adaptive_mt_dataset @get_adaptive_mt_dataset = ::Gapic::Config::Method.new get_adaptive_mt_dataset_config list_adaptive_mt_datasets_config = parent_rpcs.list_adaptive_mt_datasets if parent_rpcs.respond_to? :list_adaptive_mt_datasets @list_adaptive_mt_datasets = ::Gapic::Config::Method.new list_adaptive_mt_datasets_config adaptive_mt_translate_config = parent_rpcs.adaptive_mt_translate if parent_rpcs.respond_to? :adaptive_mt_translate @adaptive_mt_translate = ::Gapic::Config::Method.new adaptive_mt_translate_config get_adaptive_mt_file_config = parent_rpcs.get_adaptive_mt_file if parent_rpcs.respond_to? :get_adaptive_mt_file @get_adaptive_mt_file = ::Gapic::Config::Method.new get_adaptive_mt_file_config delete_adaptive_mt_file_config = parent_rpcs.delete_adaptive_mt_file if parent_rpcs.respond_to? :delete_adaptive_mt_file @delete_adaptive_mt_file = ::Gapic::Config::Method.new delete_adaptive_mt_file_config import_adaptive_mt_file_config = parent_rpcs.import_adaptive_mt_file if parent_rpcs.respond_to? :import_adaptive_mt_file @import_adaptive_mt_file = ::Gapic::Config::Method.new import_adaptive_mt_file_config list_adaptive_mt_files_config = parent_rpcs.list_adaptive_mt_files if parent_rpcs.respond_to? :list_adaptive_mt_files @list_adaptive_mt_files = ::Gapic::Config::Method.new list_adaptive_mt_files_config list_adaptive_mt_sentences_config = parent_rpcs.list_adaptive_mt_sentences if parent_rpcs.respond_to? :list_adaptive_mt_sentences @list_adaptive_mt_sentences = ::Gapic::Config::Method.new list_adaptive_mt_sentences_config import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data @import_data = ::Gapic::Config::Method.new import_data_config export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data @export_data = ::Gapic::Config::Method.new export_data_config list_examples_config = parent_rpcs.list_examples if parent_rpcs.respond_to? :list_examples @list_examples = ::Gapic::Config::Method.new list_examples_config create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model @create_model = ::Gapic::Config::Method.new create_model_config list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models @list_models = ::Gapic::Config::Method.new list_models_config get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model @get_model = ::Gapic::Config::Method.new get_model_config delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model @delete_model = ::Gapic::Config::Method.new delete_model_config yield self if block_given? end end end |
#quota_project ⇒ ::String
A separate project against which to charge quota.
3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 |
# File 'lib/google/cloud/translate/v3/translation_service/rest/client.rb', line 3943 class Configuration extend ::Gapic::Config # @private # The endpoint specific to the default "googleapis.com" universe. Deprecated. DEFAULT_ENDPOINT = "translate.googleapis.com" config_attr :endpoint, nil, ::String, nil config_attr :credentials, nil do |value| allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] allowed.any? { |klass| klass === value } end config_attr :scope, nil, ::String, ::Array, nil config_attr :lib_name, nil, ::String, nil config_attr :lib_version, nil, ::String, nil config_attr :timeout, nil, ::Numeric, nil config_attr :metadata, nil, ::Hash, nil config_attr :retry_policy, nil, ::Hash, ::Proc, nil config_attr :quota_project, nil, ::String, nil config_attr :universe_domain, nil, ::String, nil # @private # Overrides for http bindings for the RPCs of this service # are only used when this service is used as mixin, and only # by the host service. # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] config_attr :bindings_override, {}, ::Hash, nil config_attr :logger, :default, ::Logger, nil, :default # @private def initialize parent_config = nil @parent_config = parent_config unless parent_config.nil? yield self if block_given? end ## # Configurations for individual RPCs # @return [Rpcs] # def rpcs @rpcs ||= begin parent_rpcs = nil parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) Rpcs.new parent_rpcs end end ## # Configuration RPC class for the TranslationService API. # # Includes fields providing the configuration for each RPC in this service. # Each configuration object is of type `Gapic::Config::Method` and includes # the following configuration fields: # # * `timeout` (*type:* `Numeric`) - The call timeout in seconds # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields # include the following keys: # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should # trigger a retry. # class Rpcs ## # RPC-specific configuration for `translate_text` # @return [::Gapic::Config::Method] # attr_reader :translate_text ## # RPC-specific configuration for `romanize_text` # @return [::Gapic::Config::Method] # attr_reader :romanize_text ## # RPC-specific configuration for `detect_language` # @return [::Gapic::Config::Method] # attr_reader :detect_language ## # RPC-specific configuration for `get_supported_languages` # @return [::Gapic::Config::Method] # attr_reader :get_supported_languages ## # RPC-specific configuration for `translate_document` # @return [::Gapic::Config::Method] # attr_reader :translate_document ## # RPC-specific configuration for `batch_translate_text` # @return [::Gapic::Config::Method] # attr_reader :batch_translate_text ## # RPC-specific configuration for `batch_translate_document` # @return [::Gapic::Config::Method] # attr_reader :batch_translate_document ## # RPC-specific configuration for `create_glossary` # @return [::Gapic::Config::Method] # attr_reader :create_glossary ## # RPC-specific configuration for `update_glossary` # @return [::Gapic::Config::Method] # attr_reader :update_glossary ## # RPC-specific configuration for `list_glossaries` # @return [::Gapic::Config::Method] # attr_reader :list_glossaries ## # RPC-specific configuration for `get_glossary` # @return [::Gapic::Config::Method] # attr_reader :get_glossary ## # RPC-specific configuration for `delete_glossary` # @return [::Gapic::Config::Method] # attr_reader :delete_glossary ## # RPC-specific configuration for `get_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :get_glossary_entry ## # RPC-specific configuration for `list_glossary_entries` # @return [::Gapic::Config::Method] # attr_reader :list_glossary_entries ## # RPC-specific configuration for `create_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :create_glossary_entry ## # RPC-specific configuration for `update_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :update_glossary_entry ## # RPC-specific configuration for `delete_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :delete_glossary_entry ## # RPC-specific configuration for `create_dataset` # @return [::Gapic::Config::Method] # attr_reader :create_dataset ## # RPC-specific configuration for `get_dataset` # @return [::Gapic::Config::Method] # attr_reader :get_dataset ## # RPC-specific configuration for `list_datasets` # @return [::Gapic::Config::Method] # attr_reader :list_datasets ## # RPC-specific configuration for `delete_dataset` # @return [::Gapic::Config::Method] # attr_reader :delete_dataset ## # RPC-specific configuration for `create_adaptive_mt_dataset` # @return [::Gapic::Config::Method] # attr_reader :create_adaptive_mt_dataset ## # RPC-specific configuration for `delete_adaptive_mt_dataset` # @return [::Gapic::Config::Method] # attr_reader :delete_adaptive_mt_dataset ## # RPC-specific configuration for `get_adaptive_mt_dataset` # @return [::Gapic::Config::Method] # attr_reader :get_adaptive_mt_dataset ## # RPC-specific configuration for `list_adaptive_mt_datasets` # @return [::Gapic::Config::Method] # attr_reader :list_adaptive_mt_datasets ## # RPC-specific configuration for `adaptive_mt_translate` # @return [::Gapic::Config::Method] # attr_reader :adaptive_mt_translate ## # RPC-specific configuration for `get_adaptive_mt_file` # @return [::Gapic::Config::Method] # attr_reader :get_adaptive_mt_file ## # RPC-specific configuration for `delete_adaptive_mt_file` # @return [::Gapic::Config::Method] # attr_reader :delete_adaptive_mt_file ## # RPC-specific configuration for `import_adaptive_mt_file` # @return [::Gapic::Config::Method] # attr_reader :import_adaptive_mt_file ## # RPC-specific configuration for `list_adaptive_mt_files` # @return [::Gapic::Config::Method] # attr_reader :list_adaptive_mt_files ## # RPC-specific configuration for `list_adaptive_mt_sentences` # @return [::Gapic::Config::Method] # attr_reader :list_adaptive_mt_sentences ## # RPC-specific configuration for `import_data` # @return [::Gapic::Config::Method] # attr_reader :import_data ## # RPC-specific configuration for `export_data` # @return [::Gapic::Config::Method] # attr_reader :export_data ## # RPC-specific configuration for `list_examples` # @return [::Gapic::Config::Method] # attr_reader :list_examples ## # RPC-specific configuration for `create_model` # @return [::Gapic::Config::Method] # attr_reader :create_model ## # RPC-specific configuration for `list_models` # @return [::Gapic::Config::Method] # attr_reader :list_models ## # RPC-specific configuration for `get_model` # @return [::Gapic::Config::Method] # attr_reader :get_model ## # RPC-specific configuration for `delete_model` # @return [::Gapic::Config::Method] # attr_reader :delete_model # @private def initialize parent_rpcs = nil translate_text_config = parent_rpcs.translate_text if parent_rpcs.respond_to? :translate_text @translate_text = ::Gapic::Config::Method.new translate_text_config romanize_text_config = parent_rpcs.romanize_text if parent_rpcs.respond_to? :romanize_text @romanize_text = ::Gapic::Config::Method.new romanize_text_config detect_language_config = parent_rpcs.detect_language if parent_rpcs.respond_to? :detect_language @detect_language = ::Gapic::Config::Method.new detect_language_config get_supported_languages_config = parent_rpcs.get_supported_languages if parent_rpcs.respond_to? :get_supported_languages @get_supported_languages = ::Gapic::Config::Method.new get_supported_languages_config translate_document_config = parent_rpcs.translate_document if parent_rpcs.respond_to? :translate_document @translate_document = ::Gapic::Config::Method.new translate_document_config batch_translate_text_config = parent_rpcs.batch_translate_text if parent_rpcs.respond_to? :batch_translate_text @batch_translate_text = ::Gapic::Config::Method.new batch_translate_text_config batch_translate_document_config = parent_rpcs.batch_translate_document if parent_rpcs.respond_to? :batch_translate_document @batch_translate_document = ::Gapic::Config::Method.new batch_translate_document_config create_glossary_config = parent_rpcs.create_glossary if parent_rpcs.respond_to? :create_glossary @create_glossary = ::Gapic::Config::Method.new create_glossary_config update_glossary_config = parent_rpcs.update_glossary if parent_rpcs.respond_to? :update_glossary @update_glossary = ::Gapic::Config::Method.new update_glossary_config list_glossaries_config = parent_rpcs.list_glossaries if parent_rpcs.respond_to? :list_glossaries @list_glossaries = ::Gapic::Config::Method.new list_glossaries_config get_glossary_config = parent_rpcs.get_glossary if parent_rpcs.respond_to? :get_glossary @get_glossary = ::Gapic::Config::Method.new get_glossary_config delete_glossary_config = parent_rpcs.delete_glossary if parent_rpcs.respond_to? :delete_glossary @delete_glossary = ::Gapic::Config::Method.new delete_glossary_config get_glossary_entry_config = parent_rpcs.get_glossary_entry if parent_rpcs.respond_to? :get_glossary_entry @get_glossary_entry = ::Gapic::Config::Method.new get_glossary_entry_config list_glossary_entries_config = parent_rpcs.list_glossary_entries if parent_rpcs.respond_to? :list_glossary_entries @list_glossary_entries = ::Gapic::Config::Method.new list_glossary_entries_config create_glossary_entry_config = parent_rpcs.create_glossary_entry if parent_rpcs.respond_to? :create_glossary_entry @create_glossary_entry = ::Gapic::Config::Method.new create_glossary_entry_config update_glossary_entry_config = parent_rpcs.update_glossary_entry if parent_rpcs.respond_to? :update_glossary_entry @update_glossary_entry = ::Gapic::Config::Method.new update_glossary_entry_config delete_glossary_entry_config = parent_rpcs.delete_glossary_entry if parent_rpcs.respond_to? :delete_glossary_entry @delete_glossary_entry = ::Gapic::Config::Method.new delete_glossary_entry_config create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset @create_dataset = ::Gapic::Config::Method.new create_dataset_config get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset @get_dataset = ::Gapic::Config::Method.new get_dataset_config list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets @list_datasets = ::Gapic::Config::Method.new list_datasets_config delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config create_adaptive_mt_dataset_config = parent_rpcs.create_adaptive_mt_dataset if parent_rpcs.respond_to? :create_adaptive_mt_dataset @create_adaptive_mt_dataset = ::Gapic::Config::Method.new create_adaptive_mt_dataset_config delete_adaptive_mt_dataset_config = parent_rpcs.delete_adaptive_mt_dataset if parent_rpcs.respond_to? :delete_adaptive_mt_dataset @delete_adaptive_mt_dataset = ::Gapic::Config::Method.new delete_adaptive_mt_dataset_config get_adaptive_mt_dataset_config = parent_rpcs.get_adaptive_mt_dataset if parent_rpcs.respond_to? :get_adaptive_mt_dataset @get_adaptive_mt_dataset = ::Gapic::Config::Method.new get_adaptive_mt_dataset_config list_adaptive_mt_datasets_config = parent_rpcs.list_adaptive_mt_datasets if parent_rpcs.respond_to? :list_adaptive_mt_datasets @list_adaptive_mt_datasets = ::Gapic::Config::Method.new list_adaptive_mt_datasets_config adaptive_mt_translate_config = parent_rpcs.adaptive_mt_translate if parent_rpcs.respond_to? :adaptive_mt_translate @adaptive_mt_translate = ::Gapic::Config::Method.new adaptive_mt_translate_config get_adaptive_mt_file_config = parent_rpcs.get_adaptive_mt_file if parent_rpcs.respond_to? :get_adaptive_mt_file @get_adaptive_mt_file = ::Gapic::Config::Method.new get_adaptive_mt_file_config delete_adaptive_mt_file_config = parent_rpcs.delete_adaptive_mt_file if parent_rpcs.respond_to? :delete_adaptive_mt_file @delete_adaptive_mt_file = ::Gapic::Config::Method.new delete_adaptive_mt_file_config import_adaptive_mt_file_config = parent_rpcs.import_adaptive_mt_file if parent_rpcs.respond_to? :import_adaptive_mt_file @import_adaptive_mt_file = ::Gapic::Config::Method.new import_adaptive_mt_file_config list_adaptive_mt_files_config = parent_rpcs.list_adaptive_mt_files if parent_rpcs.respond_to? :list_adaptive_mt_files @list_adaptive_mt_files = ::Gapic::Config::Method.new list_adaptive_mt_files_config list_adaptive_mt_sentences_config = parent_rpcs.list_adaptive_mt_sentences if parent_rpcs.respond_to? :list_adaptive_mt_sentences @list_adaptive_mt_sentences = ::Gapic::Config::Method.new list_adaptive_mt_sentences_config import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data @import_data = ::Gapic::Config::Method.new import_data_config export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data @export_data = ::Gapic::Config::Method.new export_data_config list_examples_config = parent_rpcs.list_examples if parent_rpcs.respond_to? :list_examples @list_examples = ::Gapic::Config::Method.new list_examples_config create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model @create_model = ::Gapic::Config::Method.new create_model_config list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models @list_models = ::Gapic::Config::Method.new list_models_config get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model @get_model = ::Gapic::Config::Method.new get_model_config delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model @delete_model = ::Gapic::Config::Method.new delete_model_config yield self if block_given? end end end |
#retry_policy ⇒ ::Hash
The retry policy. The value is a hash with the following keys:
-
:initial_delay
(type:Numeric
) - The initial delay in seconds. -
:max_delay
(type:Numeric
) - The max delay in seconds. -
:multiplier
(type:Numeric
) - The incremental backoff multiplier. -
:retry_codes
(type:Array<String>
) - The error codes that should trigger a retry.
3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 |
# File 'lib/google/cloud/translate/v3/translation_service/rest/client.rb', line 3943 class Configuration extend ::Gapic::Config # @private # The endpoint specific to the default "googleapis.com" universe. Deprecated. DEFAULT_ENDPOINT = "translate.googleapis.com" config_attr :endpoint, nil, ::String, nil config_attr :credentials, nil do |value| allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] allowed.any? { |klass| klass === value } end config_attr :scope, nil, ::String, ::Array, nil config_attr :lib_name, nil, ::String, nil config_attr :lib_version, nil, ::String, nil config_attr :timeout, nil, ::Numeric, nil config_attr :metadata, nil, ::Hash, nil config_attr :retry_policy, nil, ::Hash, ::Proc, nil config_attr :quota_project, nil, ::String, nil config_attr :universe_domain, nil, ::String, nil # @private # Overrides for http bindings for the RPCs of this service # are only used when this service is used as mixin, and only # by the host service. # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] config_attr :bindings_override, {}, ::Hash, nil config_attr :logger, :default, ::Logger, nil, :default # @private def initialize parent_config = nil @parent_config = parent_config unless parent_config.nil? yield self if block_given? end ## # Configurations for individual RPCs # @return [Rpcs] # def rpcs @rpcs ||= begin parent_rpcs = nil parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) Rpcs.new parent_rpcs end end ## # Configuration RPC class for the TranslationService API. # # Includes fields providing the configuration for each RPC in this service. # Each configuration object is of type `Gapic::Config::Method` and includes # the following configuration fields: # # * `timeout` (*type:* `Numeric`) - The call timeout in seconds # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields # include the following keys: # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should # trigger a retry. # class Rpcs ## # RPC-specific configuration for `translate_text` # @return [::Gapic::Config::Method] # attr_reader :translate_text ## # RPC-specific configuration for `romanize_text` # @return [::Gapic::Config::Method] # attr_reader :romanize_text ## # RPC-specific configuration for `detect_language` # @return [::Gapic::Config::Method] # attr_reader :detect_language ## # RPC-specific configuration for `get_supported_languages` # @return [::Gapic::Config::Method] # attr_reader :get_supported_languages ## # RPC-specific configuration for `translate_document` # @return [::Gapic::Config::Method] # attr_reader :translate_document ## # RPC-specific configuration for `batch_translate_text` # @return [::Gapic::Config::Method] # attr_reader :batch_translate_text ## # RPC-specific configuration for `batch_translate_document` # @return [::Gapic::Config::Method] # attr_reader :batch_translate_document ## # RPC-specific configuration for `create_glossary` # @return [::Gapic::Config::Method] # attr_reader :create_glossary ## # RPC-specific configuration for `update_glossary` # @return [::Gapic::Config::Method] # attr_reader :update_glossary ## # RPC-specific configuration for `list_glossaries` # @return [::Gapic::Config::Method] # attr_reader :list_glossaries ## # RPC-specific configuration for `get_glossary` # @return [::Gapic::Config::Method] # attr_reader :get_glossary ## # RPC-specific configuration for `delete_glossary` # @return [::Gapic::Config::Method] # attr_reader :delete_glossary ## # RPC-specific configuration for `get_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :get_glossary_entry ## # RPC-specific configuration for `list_glossary_entries` # @return [::Gapic::Config::Method] # attr_reader :list_glossary_entries ## # RPC-specific configuration for `create_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :create_glossary_entry ## # RPC-specific configuration for `update_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :update_glossary_entry ## # RPC-specific configuration for `delete_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :delete_glossary_entry ## # RPC-specific configuration for `create_dataset` # @return [::Gapic::Config::Method] # attr_reader :create_dataset ## # RPC-specific configuration for `get_dataset` # @return [::Gapic::Config::Method] # attr_reader :get_dataset ## # RPC-specific configuration for `list_datasets` # @return [::Gapic::Config::Method] # attr_reader :list_datasets ## # RPC-specific configuration for `delete_dataset` # @return [::Gapic::Config::Method] # attr_reader :delete_dataset ## # RPC-specific configuration for `create_adaptive_mt_dataset` # @return [::Gapic::Config::Method] # attr_reader :create_adaptive_mt_dataset ## # RPC-specific configuration for `delete_adaptive_mt_dataset` # @return [::Gapic::Config::Method] # attr_reader :delete_adaptive_mt_dataset ## # RPC-specific configuration for `get_adaptive_mt_dataset` # @return [::Gapic::Config::Method] # attr_reader :get_adaptive_mt_dataset ## # RPC-specific configuration for `list_adaptive_mt_datasets` # @return [::Gapic::Config::Method] # attr_reader :list_adaptive_mt_datasets ## # RPC-specific configuration for `adaptive_mt_translate` # @return [::Gapic::Config::Method] # attr_reader :adaptive_mt_translate ## # RPC-specific configuration for `get_adaptive_mt_file` # @return [::Gapic::Config::Method] # attr_reader :get_adaptive_mt_file ## # RPC-specific configuration for `delete_adaptive_mt_file` # @return [::Gapic::Config::Method] # attr_reader :delete_adaptive_mt_file ## # RPC-specific configuration for `import_adaptive_mt_file` # @return [::Gapic::Config::Method] # attr_reader :import_adaptive_mt_file ## # RPC-specific configuration for `list_adaptive_mt_files` # @return [::Gapic::Config::Method] # attr_reader :list_adaptive_mt_files ## # RPC-specific configuration for `list_adaptive_mt_sentences` # @return [::Gapic::Config::Method] # attr_reader :list_adaptive_mt_sentences ## # RPC-specific configuration for `import_data` # @return [::Gapic::Config::Method] # attr_reader :import_data ## # RPC-specific configuration for `export_data` # @return [::Gapic::Config::Method] # attr_reader :export_data ## # RPC-specific configuration for `list_examples` # @return [::Gapic::Config::Method] # attr_reader :list_examples ## # RPC-specific configuration for `create_model` # @return [::Gapic::Config::Method] # attr_reader :create_model ## # RPC-specific configuration for `list_models` # @return [::Gapic::Config::Method] # attr_reader :list_models ## # RPC-specific configuration for `get_model` # @return [::Gapic::Config::Method] # attr_reader :get_model ## # RPC-specific configuration for `delete_model` # @return [::Gapic::Config::Method] # attr_reader :delete_model # @private def initialize parent_rpcs = nil translate_text_config = parent_rpcs.translate_text if parent_rpcs.respond_to? :translate_text @translate_text = ::Gapic::Config::Method.new translate_text_config romanize_text_config = parent_rpcs.romanize_text if parent_rpcs.respond_to? :romanize_text @romanize_text = ::Gapic::Config::Method.new romanize_text_config detect_language_config = parent_rpcs.detect_language if parent_rpcs.respond_to? :detect_language @detect_language = ::Gapic::Config::Method.new detect_language_config get_supported_languages_config = parent_rpcs.get_supported_languages if parent_rpcs.respond_to? :get_supported_languages @get_supported_languages = ::Gapic::Config::Method.new get_supported_languages_config translate_document_config = parent_rpcs.translate_document if parent_rpcs.respond_to? :translate_document @translate_document = ::Gapic::Config::Method.new translate_document_config batch_translate_text_config = parent_rpcs.batch_translate_text if parent_rpcs.respond_to? :batch_translate_text @batch_translate_text = ::Gapic::Config::Method.new batch_translate_text_config batch_translate_document_config = parent_rpcs.batch_translate_document if parent_rpcs.respond_to? :batch_translate_document @batch_translate_document = ::Gapic::Config::Method.new batch_translate_document_config create_glossary_config = parent_rpcs.create_glossary if parent_rpcs.respond_to? :create_glossary @create_glossary = ::Gapic::Config::Method.new create_glossary_config update_glossary_config = parent_rpcs.update_glossary if parent_rpcs.respond_to? :update_glossary @update_glossary = ::Gapic::Config::Method.new update_glossary_config list_glossaries_config = parent_rpcs.list_glossaries if parent_rpcs.respond_to? :list_glossaries @list_glossaries = ::Gapic::Config::Method.new list_glossaries_config get_glossary_config = parent_rpcs.get_glossary if parent_rpcs.respond_to? :get_glossary @get_glossary = ::Gapic::Config::Method.new get_glossary_config delete_glossary_config = parent_rpcs.delete_glossary if parent_rpcs.respond_to? :delete_glossary @delete_glossary = ::Gapic::Config::Method.new delete_glossary_config get_glossary_entry_config = parent_rpcs.get_glossary_entry if parent_rpcs.respond_to? :get_glossary_entry @get_glossary_entry = ::Gapic::Config::Method.new get_glossary_entry_config list_glossary_entries_config = parent_rpcs.list_glossary_entries if parent_rpcs.respond_to? :list_glossary_entries @list_glossary_entries = ::Gapic::Config::Method.new list_glossary_entries_config create_glossary_entry_config = parent_rpcs.create_glossary_entry if parent_rpcs.respond_to? :create_glossary_entry @create_glossary_entry = ::Gapic::Config::Method.new create_glossary_entry_config update_glossary_entry_config = parent_rpcs.update_glossary_entry if parent_rpcs.respond_to? :update_glossary_entry @update_glossary_entry = ::Gapic::Config::Method.new update_glossary_entry_config delete_glossary_entry_config = parent_rpcs.delete_glossary_entry if parent_rpcs.respond_to? :delete_glossary_entry @delete_glossary_entry = ::Gapic::Config::Method.new delete_glossary_entry_config create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset @create_dataset = ::Gapic::Config::Method.new create_dataset_config get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset @get_dataset = ::Gapic::Config::Method.new get_dataset_config list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets @list_datasets = ::Gapic::Config::Method.new list_datasets_config delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config create_adaptive_mt_dataset_config = parent_rpcs.create_adaptive_mt_dataset if parent_rpcs.respond_to? :create_adaptive_mt_dataset @create_adaptive_mt_dataset = ::Gapic::Config::Method.new create_adaptive_mt_dataset_config delete_adaptive_mt_dataset_config = parent_rpcs.delete_adaptive_mt_dataset if parent_rpcs.respond_to? :delete_adaptive_mt_dataset @delete_adaptive_mt_dataset = ::Gapic::Config::Method.new delete_adaptive_mt_dataset_config get_adaptive_mt_dataset_config = parent_rpcs.get_adaptive_mt_dataset if parent_rpcs.respond_to? :get_adaptive_mt_dataset @get_adaptive_mt_dataset = ::Gapic::Config::Method.new get_adaptive_mt_dataset_config list_adaptive_mt_datasets_config = parent_rpcs.list_adaptive_mt_datasets if parent_rpcs.respond_to? :list_adaptive_mt_datasets @list_adaptive_mt_datasets = ::Gapic::Config::Method.new list_adaptive_mt_datasets_config adaptive_mt_translate_config = parent_rpcs.adaptive_mt_translate if parent_rpcs.respond_to? :adaptive_mt_translate @adaptive_mt_translate = ::Gapic::Config::Method.new adaptive_mt_translate_config get_adaptive_mt_file_config = parent_rpcs.get_adaptive_mt_file if parent_rpcs.respond_to? :get_adaptive_mt_file @get_adaptive_mt_file = ::Gapic::Config::Method.new get_adaptive_mt_file_config delete_adaptive_mt_file_config = parent_rpcs.delete_adaptive_mt_file if parent_rpcs.respond_to? :delete_adaptive_mt_file @delete_adaptive_mt_file = ::Gapic::Config::Method.new delete_adaptive_mt_file_config import_adaptive_mt_file_config = parent_rpcs.import_adaptive_mt_file if parent_rpcs.respond_to? :import_adaptive_mt_file @import_adaptive_mt_file = ::Gapic::Config::Method.new import_adaptive_mt_file_config list_adaptive_mt_files_config = parent_rpcs.list_adaptive_mt_files if parent_rpcs.respond_to? :list_adaptive_mt_files @list_adaptive_mt_files = ::Gapic::Config::Method.new list_adaptive_mt_files_config list_adaptive_mt_sentences_config = parent_rpcs.list_adaptive_mt_sentences if parent_rpcs.respond_to? :list_adaptive_mt_sentences @list_adaptive_mt_sentences = ::Gapic::Config::Method.new list_adaptive_mt_sentences_config import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data @import_data = ::Gapic::Config::Method.new import_data_config export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data @export_data = ::Gapic::Config::Method.new export_data_config list_examples_config = parent_rpcs.list_examples if parent_rpcs.respond_to? :list_examples @list_examples = ::Gapic::Config::Method.new list_examples_config create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model @create_model = ::Gapic::Config::Method.new create_model_config list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models @list_models = ::Gapic::Config::Method.new list_models_config get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model @get_model = ::Gapic::Config::Method.new get_model_config delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model @delete_model = ::Gapic::Config::Method.new delete_model_config yield self if block_given? end end end |
#scope ⇒ ::Array<::String>
The OAuth scopes
3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 |
# File 'lib/google/cloud/translate/v3/translation_service/rest/client.rb', line 3943 class Configuration extend ::Gapic::Config # @private # The endpoint specific to the default "googleapis.com" universe. Deprecated. DEFAULT_ENDPOINT = "translate.googleapis.com" config_attr :endpoint, nil, ::String, nil config_attr :credentials, nil do |value| allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] allowed.any? { |klass| klass === value } end config_attr :scope, nil, ::String, ::Array, nil config_attr :lib_name, nil, ::String, nil config_attr :lib_version, nil, ::String, nil config_attr :timeout, nil, ::Numeric, nil config_attr :metadata, nil, ::Hash, nil config_attr :retry_policy, nil, ::Hash, ::Proc, nil config_attr :quota_project, nil, ::String, nil config_attr :universe_domain, nil, ::String, nil # @private # Overrides for http bindings for the RPCs of this service # are only used when this service is used as mixin, and only # by the host service. # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] config_attr :bindings_override, {}, ::Hash, nil config_attr :logger, :default, ::Logger, nil, :default # @private def initialize parent_config = nil @parent_config = parent_config unless parent_config.nil? yield self if block_given? end ## # Configurations for individual RPCs # @return [Rpcs] # def rpcs @rpcs ||= begin parent_rpcs = nil parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) Rpcs.new parent_rpcs end end ## # Configuration RPC class for the TranslationService API. # # Includes fields providing the configuration for each RPC in this service. # Each configuration object is of type `Gapic::Config::Method` and includes # the following configuration fields: # # * `timeout` (*type:* `Numeric`) - The call timeout in seconds # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields # include the following keys: # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should # trigger a retry. # class Rpcs ## # RPC-specific configuration for `translate_text` # @return [::Gapic::Config::Method] # attr_reader :translate_text ## # RPC-specific configuration for `romanize_text` # @return [::Gapic::Config::Method] # attr_reader :romanize_text ## # RPC-specific configuration for `detect_language` # @return [::Gapic::Config::Method] # attr_reader :detect_language ## # RPC-specific configuration for `get_supported_languages` # @return [::Gapic::Config::Method] # attr_reader :get_supported_languages ## # RPC-specific configuration for `translate_document` # @return [::Gapic::Config::Method] # attr_reader :translate_document ## # RPC-specific configuration for `batch_translate_text` # @return [::Gapic::Config::Method] # attr_reader :batch_translate_text ## # RPC-specific configuration for `batch_translate_document` # @return [::Gapic::Config::Method] # attr_reader :batch_translate_document ## # RPC-specific configuration for `create_glossary` # @return [::Gapic::Config::Method] # attr_reader :create_glossary ## # RPC-specific configuration for `update_glossary` # @return [::Gapic::Config::Method] # attr_reader :update_glossary ## # RPC-specific configuration for `list_glossaries` # @return [::Gapic::Config::Method] # attr_reader :list_glossaries ## # RPC-specific configuration for `get_glossary` # @return [::Gapic::Config::Method] # attr_reader :get_glossary ## # RPC-specific configuration for `delete_glossary` # @return [::Gapic::Config::Method] # attr_reader :delete_glossary ## # RPC-specific configuration for `get_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :get_glossary_entry ## # RPC-specific configuration for `list_glossary_entries` # @return [::Gapic::Config::Method] # attr_reader :list_glossary_entries ## # RPC-specific configuration for `create_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :create_glossary_entry ## # RPC-specific configuration for `update_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :update_glossary_entry ## # RPC-specific configuration for `delete_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :delete_glossary_entry ## # RPC-specific configuration for `create_dataset` # @return [::Gapic::Config::Method] # attr_reader :create_dataset ## # RPC-specific configuration for `get_dataset` # @return [::Gapic::Config::Method] # attr_reader :get_dataset ## # RPC-specific configuration for `list_datasets` # @return [::Gapic::Config::Method] # attr_reader :list_datasets ## # RPC-specific configuration for `delete_dataset` # @return [::Gapic::Config::Method] # attr_reader :delete_dataset ## # RPC-specific configuration for `create_adaptive_mt_dataset` # @return [::Gapic::Config::Method] # attr_reader :create_adaptive_mt_dataset ## # RPC-specific configuration for `delete_adaptive_mt_dataset` # @return [::Gapic::Config::Method] # attr_reader :delete_adaptive_mt_dataset ## # RPC-specific configuration for `get_adaptive_mt_dataset` # @return [::Gapic::Config::Method] # attr_reader :get_adaptive_mt_dataset ## # RPC-specific configuration for `list_adaptive_mt_datasets` # @return [::Gapic::Config::Method] # attr_reader :list_adaptive_mt_datasets ## # RPC-specific configuration for `adaptive_mt_translate` # @return [::Gapic::Config::Method] # attr_reader :adaptive_mt_translate ## # RPC-specific configuration for `get_adaptive_mt_file` # @return [::Gapic::Config::Method] # attr_reader :get_adaptive_mt_file ## # RPC-specific configuration for `delete_adaptive_mt_file` # @return [::Gapic::Config::Method] # attr_reader :delete_adaptive_mt_file ## # RPC-specific configuration for `import_adaptive_mt_file` # @return [::Gapic::Config::Method] # attr_reader :import_adaptive_mt_file ## # RPC-specific configuration for `list_adaptive_mt_files` # @return [::Gapic::Config::Method] # attr_reader :list_adaptive_mt_files ## # RPC-specific configuration for `list_adaptive_mt_sentences` # @return [::Gapic::Config::Method] # attr_reader :list_adaptive_mt_sentences ## # RPC-specific configuration for `import_data` # @return [::Gapic::Config::Method] # attr_reader :import_data ## # RPC-specific configuration for `export_data` # @return [::Gapic::Config::Method] # attr_reader :export_data ## # RPC-specific configuration for `list_examples` # @return [::Gapic::Config::Method] # attr_reader :list_examples ## # RPC-specific configuration for `create_model` # @return [::Gapic::Config::Method] # attr_reader :create_model ## # RPC-specific configuration for `list_models` # @return [::Gapic::Config::Method] # attr_reader :list_models ## # RPC-specific configuration for `get_model` # @return [::Gapic::Config::Method] # attr_reader :get_model ## # RPC-specific configuration for `delete_model` # @return [::Gapic::Config::Method] # attr_reader :delete_model # @private def initialize parent_rpcs = nil translate_text_config = parent_rpcs.translate_text if parent_rpcs.respond_to? :translate_text @translate_text = ::Gapic::Config::Method.new translate_text_config romanize_text_config = parent_rpcs.romanize_text if parent_rpcs.respond_to? :romanize_text @romanize_text = ::Gapic::Config::Method.new romanize_text_config detect_language_config = parent_rpcs.detect_language if parent_rpcs.respond_to? :detect_language @detect_language = ::Gapic::Config::Method.new detect_language_config get_supported_languages_config = parent_rpcs.get_supported_languages if parent_rpcs.respond_to? :get_supported_languages @get_supported_languages = ::Gapic::Config::Method.new get_supported_languages_config translate_document_config = parent_rpcs.translate_document if parent_rpcs.respond_to? :translate_document @translate_document = ::Gapic::Config::Method.new translate_document_config batch_translate_text_config = parent_rpcs.batch_translate_text if parent_rpcs.respond_to? :batch_translate_text @batch_translate_text = ::Gapic::Config::Method.new batch_translate_text_config batch_translate_document_config = parent_rpcs.batch_translate_document if parent_rpcs.respond_to? :batch_translate_document @batch_translate_document = ::Gapic::Config::Method.new batch_translate_document_config create_glossary_config = parent_rpcs.create_glossary if parent_rpcs.respond_to? :create_glossary @create_glossary = ::Gapic::Config::Method.new create_glossary_config update_glossary_config = parent_rpcs.update_glossary if parent_rpcs.respond_to? :update_glossary @update_glossary = ::Gapic::Config::Method.new update_glossary_config list_glossaries_config = parent_rpcs.list_glossaries if parent_rpcs.respond_to? :list_glossaries @list_glossaries = ::Gapic::Config::Method.new list_glossaries_config get_glossary_config = parent_rpcs.get_glossary if parent_rpcs.respond_to? :get_glossary @get_glossary = ::Gapic::Config::Method.new get_glossary_config delete_glossary_config = parent_rpcs.delete_glossary if parent_rpcs.respond_to? :delete_glossary @delete_glossary = ::Gapic::Config::Method.new delete_glossary_config get_glossary_entry_config = parent_rpcs.get_glossary_entry if parent_rpcs.respond_to? :get_glossary_entry @get_glossary_entry = ::Gapic::Config::Method.new get_glossary_entry_config list_glossary_entries_config = parent_rpcs.list_glossary_entries if parent_rpcs.respond_to? :list_glossary_entries @list_glossary_entries = ::Gapic::Config::Method.new list_glossary_entries_config create_glossary_entry_config = parent_rpcs.create_glossary_entry if parent_rpcs.respond_to? :create_glossary_entry @create_glossary_entry = ::Gapic::Config::Method.new create_glossary_entry_config update_glossary_entry_config = parent_rpcs.update_glossary_entry if parent_rpcs.respond_to? :update_glossary_entry @update_glossary_entry = ::Gapic::Config::Method.new update_glossary_entry_config delete_glossary_entry_config = parent_rpcs.delete_glossary_entry if parent_rpcs.respond_to? :delete_glossary_entry @delete_glossary_entry = ::Gapic::Config::Method.new delete_glossary_entry_config create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset @create_dataset = ::Gapic::Config::Method.new create_dataset_config get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset @get_dataset = ::Gapic::Config::Method.new get_dataset_config list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets @list_datasets = ::Gapic::Config::Method.new list_datasets_config delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config create_adaptive_mt_dataset_config = parent_rpcs.create_adaptive_mt_dataset if parent_rpcs.respond_to? :create_adaptive_mt_dataset @create_adaptive_mt_dataset = ::Gapic::Config::Method.new create_adaptive_mt_dataset_config delete_adaptive_mt_dataset_config = parent_rpcs.delete_adaptive_mt_dataset if parent_rpcs.respond_to? :delete_adaptive_mt_dataset @delete_adaptive_mt_dataset = ::Gapic::Config::Method.new delete_adaptive_mt_dataset_config get_adaptive_mt_dataset_config = parent_rpcs.get_adaptive_mt_dataset if parent_rpcs.respond_to? :get_adaptive_mt_dataset @get_adaptive_mt_dataset = ::Gapic::Config::Method.new get_adaptive_mt_dataset_config list_adaptive_mt_datasets_config = parent_rpcs.list_adaptive_mt_datasets if parent_rpcs.respond_to? :list_adaptive_mt_datasets @list_adaptive_mt_datasets = ::Gapic::Config::Method.new list_adaptive_mt_datasets_config adaptive_mt_translate_config = parent_rpcs.adaptive_mt_translate if parent_rpcs.respond_to? :adaptive_mt_translate @adaptive_mt_translate = ::Gapic::Config::Method.new adaptive_mt_translate_config get_adaptive_mt_file_config = parent_rpcs.get_adaptive_mt_file if parent_rpcs.respond_to? :get_adaptive_mt_file @get_adaptive_mt_file = ::Gapic::Config::Method.new get_adaptive_mt_file_config delete_adaptive_mt_file_config = parent_rpcs.delete_adaptive_mt_file if parent_rpcs.respond_to? :delete_adaptive_mt_file @delete_adaptive_mt_file = ::Gapic::Config::Method.new delete_adaptive_mt_file_config import_adaptive_mt_file_config = parent_rpcs.import_adaptive_mt_file if parent_rpcs.respond_to? :import_adaptive_mt_file @import_adaptive_mt_file = ::Gapic::Config::Method.new import_adaptive_mt_file_config list_adaptive_mt_files_config = parent_rpcs.list_adaptive_mt_files if parent_rpcs.respond_to? :list_adaptive_mt_files @list_adaptive_mt_files = ::Gapic::Config::Method.new list_adaptive_mt_files_config list_adaptive_mt_sentences_config = parent_rpcs.list_adaptive_mt_sentences if parent_rpcs.respond_to? :list_adaptive_mt_sentences @list_adaptive_mt_sentences = ::Gapic::Config::Method.new list_adaptive_mt_sentences_config import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data @import_data = ::Gapic::Config::Method.new import_data_config export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data @export_data = ::Gapic::Config::Method.new export_data_config list_examples_config = parent_rpcs.list_examples if parent_rpcs.respond_to? :list_examples @list_examples = ::Gapic::Config::Method.new list_examples_config create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model @create_model = ::Gapic::Config::Method.new create_model_config list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models @list_models = ::Gapic::Config::Method.new list_models_config get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model @get_model = ::Gapic::Config::Method.new get_model_config delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model @delete_model = ::Gapic::Config::Method.new delete_model_config yield self if block_given? end end end |
#timeout ⇒ ::Numeric
The call timeout in seconds.
3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 |
# File 'lib/google/cloud/translate/v3/translation_service/rest/client.rb', line 3943 class Configuration extend ::Gapic::Config # @private # The endpoint specific to the default "googleapis.com" universe. Deprecated. DEFAULT_ENDPOINT = "translate.googleapis.com" config_attr :endpoint, nil, ::String, nil config_attr :credentials, nil do |value| allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] allowed.any? { |klass| klass === value } end config_attr :scope, nil, ::String, ::Array, nil config_attr :lib_name, nil, ::String, nil config_attr :lib_version, nil, ::String, nil config_attr :timeout, nil, ::Numeric, nil config_attr :metadata, nil, ::Hash, nil config_attr :retry_policy, nil, ::Hash, ::Proc, nil config_attr :quota_project, nil, ::String, nil config_attr :universe_domain, nil, ::String, nil # @private # Overrides for http bindings for the RPCs of this service # are only used when this service is used as mixin, and only # by the host service. # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] config_attr :bindings_override, {}, ::Hash, nil config_attr :logger, :default, ::Logger, nil, :default # @private def initialize parent_config = nil @parent_config = parent_config unless parent_config.nil? yield self if block_given? end ## # Configurations for individual RPCs # @return [Rpcs] # def rpcs @rpcs ||= begin parent_rpcs = nil parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) Rpcs.new parent_rpcs end end ## # Configuration RPC class for the TranslationService API. # # Includes fields providing the configuration for each RPC in this service. # Each configuration object is of type `Gapic::Config::Method` and includes # the following configuration fields: # # * `timeout` (*type:* `Numeric`) - The call timeout in seconds # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields # include the following keys: # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should # trigger a retry. # class Rpcs ## # RPC-specific configuration for `translate_text` # @return [::Gapic::Config::Method] # attr_reader :translate_text ## # RPC-specific configuration for `romanize_text` # @return [::Gapic::Config::Method] # attr_reader :romanize_text ## # RPC-specific configuration for `detect_language` # @return [::Gapic::Config::Method] # attr_reader :detect_language ## # RPC-specific configuration for `get_supported_languages` # @return [::Gapic::Config::Method] # attr_reader :get_supported_languages ## # RPC-specific configuration for `translate_document` # @return [::Gapic::Config::Method] # attr_reader :translate_document ## # RPC-specific configuration for `batch_translate_text` # @return [::Gapic::Config::Method] # attr_reader :batch_translate_text ## # RPC-specific configuration for `batch_translate_document` # @return [::Gapic::Config::Method] # attr_reader :batch_translate_document ## # RPC-specific configuration for `create_glossary` # @return [::Gapic::Config::Method] # attr_reader :create_glossary ## # RPC-specific configuration for `update_glossary` # @return [::Gapic::Config::Method] # attr_reader :update_glossary ## # RPC-specific configuration for `list_glossaries` # @return [::Gapic::Config::Method] # attr_reader :list_glossaries ## # RPC-specific configuration for `get_glossary` # @return [::Gapic::Config::Method] # attr_reader :get_glossary ## # RPC-specific configuration for `delete_glossary` # @return [::Gapic::Config::Method] # attr_reader :delete_glossary ## # RPC-specific configuration for `get_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :get_glossary_entry ## # RPC-specific configuration for `list_glossary_entries` # @return [::Gapic::Config::Method] # attr_reader :list_glossary_entries ## # RPC-specific configuration for `create_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :create_glossary_entry ## # RPC-specific configuration for `update_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :update_glossary_entry ## # RPC-specific configuration for `delete_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :delete_glossary_entry ## # RPC-specific configuration for `create_dataset` # @return [::Gapic::Config::Method] # attr_reader :create_dataset ## # RPC-specific configuration for `get_dataset` # @return [::Gapic::Config::Method] # attr_reader :get_dataset ## # RPC-specific configuration for `list_datasets` # @return [::Gapic::Config::Method] # attr_reader :list_datasets ## # RPC-specific configuration for `delete_dataset` # @return [::Gapic::Config::Method] # attr_reader :delete_dataset ## # RPC-specific configuration for `create_adaptive_mt_dataset` # @return [::Gapic::Config::Method] # attr_reader :create_adaptive_mt_dataset ## # RPC-specific configuration for `delete_adaptive_mt_dataset` # @return [::Gapic::Config::Method] # attr_reader :delete_adaptive_mt_dataset ## # RPC-specific configuration for `get_adaptive_mt_dataset` # @return [::Gapic::Config::Method] # attr_reader :get_adaptive_mt_dataset ## # RPC-specific configuration for `list_adaptive_mt_datasets` # @return [::Gapic::Config::Method] # attr_reader :list_adaptive_mt_datasets ## # RPC-specific configuration for `adaptive_mt_translate` # @return [::Gapic::Config::Method] # attr_reader :adaptive_mt_translate ## # RPC-specific configuration for `get_adaptive_mt_file` # @return [::Gapic::Config::Method] # attr_reader :get_adaptive_mt_file ## # RPC-specific configuration for `delete_adaptive_mt_file` # @return [::Gapic::Config::Method] # attr_reader :delete_adaptive_mt_file ## # RPC-specific configuration for `import_adaptive_mt_file` # @return [::Gapic::Config::Method] # attr_reader :import_adaptive_mt_file ## # RPC-specific configuration for `list_adaptive_mt_files` # @return [::Gapic::Config::Method] # attr_reader :list_adaptive_mt_files ## # RPC-specific configuration for `list_adaptive_mt_sentences` # @return [::Gapic::Config::Method] # attr_reader :list_adaptive_mt_sentences ## # RPC-specific configuration for `import_data` # @return [::Gapic::Config::Method] # attr_reader :import_data ## # RPC-specific configuration for `export_data` # @return [::Gapic::Config::Method] # attr_reader :export_data ## # RPC-specific configuration for `list_examples` # @return [::Gapic::Config::Method] # attr_reader :list_examples ## # RPC-specific configuration for `create_model` # @return [::Gapic::Config::Method] # attr_reader :create_model ## # RPC-specific configuration for `list_models` # @return [::Gapic::Config::Method] # attr_reader :list_models ## # RPC-specific configuration for `get_model` # @return [::Gapic::Config::Method] # attr_reader :get_model ## # RPC-specific configuration for `delete_model` # @return [::Gapic::Config::Method] # attr_reader :delete_model # @private def initialize parent_rpcs = nil translate_text_config = parent_rpcs.translate_text if parent_rpcs.respond_to? :translate_text @translate_text = ::Gapic::Config::Method.new translate_text_config romanize_text_config = parent_rpcs.romanize_text if parent_rpcs.respond_to? :romanize_text @romanize_text = ::Gapic::Config::Method.new romanize_text_config detect_language_config = parent_rpcs.detect_language if parent_rpcs.respond_to? :detect_language @detect_language = ::Gapic::Config::Method.new detect_language_config get_supported_languages_config = parent_rpcs.get_supported_languages if parent_rpcs.respond_to? :get_supported_languages @get_supported_languages = ::Gapic::Config::Method.new get_supported_languages_config translate_document_config = parent_rpcs.translate_document if parent_rpcs.respond_to? :translate_document @translate_document = ::Gapic::Config::Method.new translate_document_config batch_translate_text_config = parent_rpcs.batch_translate_text if parent_rpcs.respond_to? :batch_translate_text @batch_translate_text = ::Gapic::Config::Method.new batch_translate_text_config batch_translate_document_config = parent_rpcs.batch_translate_document if parent_rpcs.respond_to? :batch_translate_document @batch_translate_document = ::Gapic::Config::Method.new batch_translate_document_config create_glossary_config = parent_rpcs.create_glossary if parent_rpcs.respond_to? :create_glossary @create_glossary = ::Gapic::Config::Method.new create_glossary_config update_glossary_config = parent_rpcs.update_glossary if parent_rpcs.respond_to? :update_glossary @update_glossary = ::Gapic::Config::Method.new update_glossary_config list_glossaries_config = parent_rpcs.list_glossaries if parent_rpcs.respond_to? :list_glossaries @list_glossaries = ::Gapic::Config::Method.new list_glossaries_config get_glossary_config = parent_rpcs.get_glossary if parent_rpcs.respond_to? :get_glossary @get_glossary = ::Gapic::Config::Method.new get_glossary_config delete_glossary_config = parent_rpcs.delete_glossary if parent_rpcs.respond_to? :delete_glossary @delete_glossary = ::Gapic::Config::Method.new delete_glossary_config get_glossary_entry_config = parent_rpcs.get_glossary_entry if parent_rpcs.respond_to? :get_glossary_entry @get_glossary_entry = ::Gapic::Config::Method.new get_glossary_entry_config list_glossary_entries_config = parent_rpcs.list_glossary_entries if parent_rpcs.respond_to? :list_glossary_entries @list_glossary_entries = ::Gapic::Config::Method.new list_glossary_entries_config create_glossary_entry_config = parent_rpcs.create_glossary_entry if parent_rpcs.respond_to? :create_glossary_entry @create_glossary_entry = ::Gapic::Config::Method.new create_glossary_entry_config update_glossary_entry_config = parent_rpcs.update_glossary_entry if parent_rpcs.respond_to? :update_glossary_entry @update_glossary_entry = ::Gapic::Config::Method.new update_glossary_entry_config delete_glossary_entry_config = parent_rpcs.delete_glossary_entry if parent_rpcs.respond_to? :delete_glossary_entry @delete_glossary_entry = ::Gapic::Config::Method.new delete_glossary_entry_config create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset @create_dataset = ::Gapic::Config::Method.new create_dataset_config get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset @get_dataset = ::Gapic::Config::Method.new get_dataset_config list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets @list_datasets = ::Gapic::Config::Method.new list_datasets_config delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config create_adaptive_mt_dataset_config = parent_rpcs.create_adaptive_mt_dataset if parent_rpcs.respond_to? :create_adaptive_mt_dataset @create_adaptive_mt_dataset = ::Gapic::Config::Method.new create_adaptive_mt_dataset_config delete_adaptive_mt_dataset_config = parent_rpcs.delete_adaptive_mt_dataset if parent_rpcs.respond_to? :delete_adaptive_mt_dataset @delete_adaptive_mt_dataset = ::Gapic::Config::Method.new delete_adaptive_mt_dataset_config get_adaptive_mt_dataset_config = parent_rpcs.get_adaptive_mt_dataset if parent_rpcs.respond_to? :get_adaptive_mt_dataset @get_adaptive_mt_dataset = ::Gapic::Config::Method.new get_adaptive_mt_dataset_config list_adaptive_mt_datasets_config = parent_rpcs.list_adaptive_mt_datasets if parent_rpcs.respond_to? :list_adaptive_mt_datasets @list_adaptive_mt_datasets = ::Gapic::Config::Method.new list_adaptive_mt_datasets_config adaptive_mt_translate_config = parent_rpcs.adaptive_mt_translate if parent_rpcs.respond_to? :adaptive_mt_translate @adaptive_mt_translate = ::Gapic::Config::Method.new adaptive_mt_translate_config get_adaptive_mt_file_config = parent_rpcs.get_adaptive_mt_file if parent_rpcs.respond_to? :get_adaptive_mt_file @get_adaptive_mt_file = ::Gapic::Config::Method.new get_adaptive_mt_file_config delete_adaptive_mt_file_config = parent_rpcs.delete_adaptive_mt_file if parent_rpcs.respond_to? :delete_adaptive_mt_file @delete_adaptive_mt_file = ::Gapic::Config::Method.new delete_adaptive_mt_file_config import_adaptive_mt_file_config = parent_rpcs.import_adaptive_mt_file if parent_rpcs.respond_to? :import_adaptive_mt_file @import_adaptive_mt_file = ::Gapic::Config::Method.new import_adaptive_mt_file_config list_adaptive_mt_files_config = parent_rpcs.list_adaptive_mt_files if parent_rpcs.respond_to? :list_adaptive_mt_files @list_adaptive_mt_files = ::Gapic::Config::Method.new list_adaptive_mt_files_config list_adaptive_mt_sentences_config = parent_rpcs.list_adaptive_mt_sentences if parent_rpcs.respond_to? :list_adaptive_mt_sentences @list_adaptive_mt_sentences = ::Gapic::Config::Method.new list_adaptive_mt_sentences_config import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data @import_data = ::Gapic::Config::Method.new import_data_config export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data @export_data = ::Gapic::Config::Method.new export_data_config list_examples_config = parent_rpcs.list_examples if parent_rpcs.respond_to? :list_examples @list_examples = ::Gapic::Config::Method.new list_examples_config create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model @create_model = ::Gapic::Config::Method.new create_model_config list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models @list_models = ::Gapic::Config::Method.new list_models_config get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model @get_model = ::Gapic::Config::Method.new get_model_config delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model @delete_model = ::Gapic::Config::Method.new delete_model_config yield self if block_given? end end end |
#universe_domain ⇒ ::String?
The universe domain within which to make requests. This determines the default endpoint URL. The default value of nil uses the environment universe (usually the default "googleapis.com" universe).
3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 |
# File 'lib/google/cloud/translate/v3/translation_service/rest/client.rb', line 3943 class Configuration extend ::Gapic::Config # @private # The endpoint specific to the default "googleapis.com" universe. Deprecated. DEFAULT_ENDPOINT = "translate.googleapis.com" config_attr :endpoint, nil, ::String, nil config_attr :credentials, nil do |value| allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] allowed.any? { |klass| klass === value } end config_attr :scope, nil, ::String, ::Array, nil config_attr :lib_name, nil, ::String, nil config_attr :lib_version, nil, ::String, nil config_attr :timeout, nil, ::Numeric, nil config_attr :metadata, nil, ::Hash, nil config_attr :retry_policy, nil, ::Hash, ::Proc, nil config_attr :quota_project, nil, ::String, nil config_attr :universe_domain, nil, ::String, nil # @private # Overrides for http bindings for the RPCs of this service # are only used when this service is used as mixin, and only # by the host service. # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] config_attr :bindings_override, {}, ::Hash, nil config_attr :logger, :default, ::Logger, nil, :default # @private def initialize parent_config = nil @parent_config = parent_config unless parent_config.nil? yield self if block_given? end ## # Configurations for individual RPCs # @return [Rpcs] # def rpcs @rpcs ||= begin parent_rpcs = nil parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) Rpcs.new parent_rpcs end end ## # Configuration RPC class for the TranslationService API. # # Includes fields providing the configuration for each RPC in this service. # Each configuration object is of type `Gapic::Config::Method` and includes # the following configuration fields: # # * `timeout` (*type:* `Numeric`) - The call timeout in seconds # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields # include the following keys: # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should # trigger a retry. # class Rpcs ## # RPC-specific configuration for `translate_text` # @return [::Gapic::Config::Method] # attr_reader :translate_text ## # RPC-specific configuration for `romanize_text` # @return [::Gapic::Config::Method] # attr_reader :romanize_text ## # RPC-specific configuration for `detect_language` # @return [::Gapic::Config::Method] # attr_reader :detect_language ## # RPC-specific configuration for `get_supported_languages` # @return [::Gapic::Config::Method] # attr_reader :get_supported_languages ## # RPC-specific configuration for `translate_document` # @return [::Gapic::Config::Method] # attr_reader :translate_document ## # RPC-specific configuration for `batch_translate_text` # @return [::Gapic::Config::Method] # attr_reader :batch_translate_text ## # RPC-specific configuration for `batch_translate_document` # @return [::Gapic::Config::Method] # attr_reader :batch_translate_document ## # RPC-specific configuration for `create_glossary` # @return [::Gapic::Config::Method] # attr_reader :create_glossary ## # RPC-specific configuration for `update_glossary` # @return [::Gapic::Config::Method] # attr_reader :update_glossary ## # RPC-specific configuration for `list_glossaries` # @return [::Gapic::Config::Method] # attr_reader :list_glossaries ## # RPC-specific configuration for `get_glossary` # @return [::Gapic::Config::Method] # attr_reader :get_glossary ## # RPC-specific configuration for `delete_glossary` # @return [::Gapic::Config::Method] # attr_reader :delete_glossary ## # RPC-specific configuration for `get_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :get_glossary_entry ## # RPC-specific configuration for `list_glossary_entries` # @return [::Gapic::Config::Method] # attr_reader :list_glossary_entries ## # RPC-specific configuration for `create_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :create_glossary_entry ## # RPC-specific configuration for `update_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :update_glossary_entry ## # RPC-specific configuration for `delete_glossary_entry` # @return [::Gapic::Config::Method] # attr_reader :delete_glossary_entry ## # RPC-specific configuration for `create_dataset` # @return [::Gapic::Config::Method] # attr_reader :create_dataset ## # RPC-specific configuration for `get_dataset` # @return [::Gapic::Config::Method] # attr_reader :get_dataset ## # RPC-specific configuration for `list_datasets` # @return [::Gapic::Config::Method] # attr_reader :list_datasets ## # RPC-specific configuration for `delete_dataset` # @return [::Gapic::Config::Method] # attr_reader :delete_dataset ## # RPC-specific configuration for `create_adaptive_mt_dataset` # @return [::Gapic::Config::Method] # attr_reader :create_adaptive_mt_dataset ## # RPC-specific configuration for `delete_adaptive_mt_dataset` # @return [::Gapic::Config::Method] # attr_reader :delete_adaptive_mt_dataset ## # RPC-specific configuration for `get_adaptive_mt_dataset` # @return [::Gapic::Config::Method] # attr_reader :get_adaptive_mt_dataset ## # RPC-specific configuration for `list_adaptive_mt_datasets` # @return [::Gapic::Config::Method] # attr_reader :list_adaptive_mt_datasets ## # RPC-specific configuration for `adaptive_mt_translate` # @return [::Gapic::Config::Method] # attr_reader :adaptive_mt_translate ## # RPC-specific configuration for `get_adaptive_mt_file` # @return [::Gapic::Config::Method] # attr_reader :get_adaptive_mt_file ## # RPC-specific configuration for `delete_adaptive_mt_file` # @return [::Gapic::Config::Method] # attr_reader :delete_adaptive_mt_file ## # RPC-specific configuration for `import_adaptive_mt_file` # @return [::Gapic::Config::Method] # attr_reader :import_adaptive_mt_file ## # RPC-specific configuration for `list_adaptive_mt_files` # @return [::Gapic::Config::Method] # attr_reader :list_adaptive_mt_files ## # RPC-specific configuration for `list_adaptive_mt_sentences` # @return [::Gapic::Config::Method] # attr_reader :list_adaptive_mt_sentences ## # RPC-specific configuration for `import_data` # @return [::Gapic::Config::Method] # attr_reader :import_data ## # RPC-specific configuration for `export_data` # @return [::Gapic::Config::Method] # attr_reader :export_data ## # RPC-specific configuration for `list_examples` # @return [::Gapic::Config::Method] # attr_reader :list_examples ## # RPC-specific configuration for `create_model` # @return [::Gapic::Config::Method] # attr_reader :create_model ## # RPC-specific configuration for `list_models` # @return [::Gapic::Config::Method] # attr_reader :list_models ## # RPC-specific configuration for `get_model` # @return [::Gapic::Config::Method] # attr_reader :get_model ## # RPC-specific configuration for `delete_model` # @return [::Gapic::Config::Method] # attr_reader :delete_model # @private def initialize parent_rpcs = nil translate_text_config = parent_rpcs.translate_text if parent_rpcs.respond_to? :translate_text @translate_text = ::Gapic::Config::Method.new translate_text_config romanize_text_config = parent_rpcs.romanize_text if parent_rpcs.respond_to? :romanize_text @romanize_text = ::Gapic::Config::Method.new romanize_text_config detect_language_config = parent_rpcs.detect_language if parent_rpcs.respond_to? :detect_language @detect_language = ::Gapic::Config::Method.new detect_language_config get_supported_languages_config = parent_rpcs.get_supported_languages if parent_rpcs.respond_to? :get_supported_languages @get_supported_languages = ::Gapic::Config::Method.new get_supported_languages_config translate_document_config = parent_rpcs.translate_document if parent_rpcs.respond_to? :translate_document @translate_document = ::Gapic::Config::Method.new translate_document_config batch_translate_text_config = parent_rpcs.batch_translate_text if parent_rpcs.respond_to? :batch_translate_text @batch_translate_text = ::Gapic::Config::Method.new batch_translate_text_config batch_translate_document_config = parent_rpcs.batch_translate_document if parent_rpcs.respond_to? :batch_translate_document @batch_translate_document = ::Gapic::Config::Method.new batch_translate_document_config create_glossary_config = parent_rpcs.create_glossary if parent_rpcs.respond_to? :create_glossary @create_glossary = ::Gapic::Config::Method.new create_glossary_config update_glossary_config = parent_rpcs.update_glossary if parent_rpcs.respond_to? :update_glossary @update_glossary = ::Gapic::Config::Method.new update_glossary_config list_glossaries_config = parent_rpcs.list_glossaries if parent_rpcs.respond_to? :list_glossaries @list_glossaries = ::Gapic::Config::Method.new list_glossaries_config get_glossary_config = parent_rpcs.get_glossary if parent_rpcs.respond_to? :get_glossary @get_glossary = ::Gapic::Config::Method.new get_glossary_config delete_glossary_config = parent_rpcs.delete_glossary if parent_rpcs.respond_to? :delete_glossary @delete_glossary = ::Gapic::Config::Method.new delete_glossary_config get_glossary_entry_config = parent_rpcs.get_glossary_entry if parent_rpcs.respond_to? :get_glossary_entry @get_glossary_entry = ::Gapic::Config::Method.new get_glossary_entry_config list_glossary_entries_config = parent_rpcs.list_glossary_entries if parent_rpcs.respond_to? :list_glossary_entries @list_glossary_entries = ::Gapic::Config::Method.new list_glossary_entries_config create_glossary_entry_config = parent_rpcs.create_glossary_entry if parent_rpcs.respond_to? :create_glossary_entry @create_glossary_entry = ::Gapic::Config::Method.new create_glossary_entry_config update_glossary_entry_config = parent_rpcs.update_glossary_entry if parent_rpcs.respond_to? :update_glossary_entry @update_glossary_entry = ::Gapic::Config::Method.new update_glossary_entry_config delete_glossary_entry_config = parent_rpcs.delete_glossary_entry if parent_rpcs.respond_to? :delete_glossary_entry @delete_glossary_entry = ::Gapic::Config::Method.new delete_glossary_entry_config create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset @create_dataset = ::Gapic::Config::Method.new create_dataset_config get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset @get_dataset = ::Gapic::Config::Method.new get_dataset_config list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets @list_datasets = ::Gapic::Config::Method.new list_datasets_config delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config create_adaptive_mt_dataset_config = parent_rpcs.create_adaptive_mt_dataset if parent_rpcs.respond_to? :create_adaptive_mt_dataset @create_adaptive_mt_dataset = ::Gapic::Config::Method.new create_adaptive_mt_dataset_config delete_adaptive_mt_dataset_config = parent_rpcs.delete_adaptive_mt_dataset if parent_rpcs.respond_to? :delete_adaptive_mt_dataset @delete_adaptive_mt_dataset = ::Gapic::Config::Method.new delete_adaptive_mt_dataset_config get_adaptive_mt_dataset_config = parent_rpcs.get_adaptive_mt_dataset if parent_rpcs.respond_to? :get_adaptive_mt_dataset @get_adaptive_mt_dataset = ::Gapic::Config::Method.new get_adaptive_mt_dataset_config list_adaptive_mt_datasets_config = parent_rpcs.list_adaptive_mt_datasets if parent_rpcs.respond_to? :list_adaptive_mt_datasets @list_adaptive_mt_datasets = ::Gapic::Config::Method.new list_adaptive_mt_datasets_config adaptive_mt_translate_config = parent_rpcs.adaptive_mt_translate if parent_rpcs.respond_to? :adaptive_mt_translate @adaptive_mt_translate = ::Gapic::Config::Method.new adaptive_mt_translate_config get_adaptive_mt_file_config = parent_rpcs.get_adaptive_mt_file if parent_rpcs.respond_to? :get_adaptive_mt_file @get_adaptive_mt_file = ::Gapic::Config::Method.new get_adaptive_mt_file_config delete_adaptive_mt_file_config = parent_rpcs.delete_adaptive_mt_file if parent_rpcs.respond_to? :delete_adaptive_mt_file @delete_adaptive_mt_file = ::Gapic::Config::Method.new delete_adaptive_mt_file_config import_adaptive_mt_file_config = parent_rpcs.import_adaptive_mt_file if parent_rpcs.respond_to? :import_adaptive_mt_file @import_adaptive_mt_file = ::Gapic::Config::Method.new import_adaptive_mt_file_config list_adaptive_mt_files_config = parent_rpcs.list_adaptive_mt_files if parent_rpcs.respond_to? :list_adaptive_mt_files @list_adaptive_mt_files = ::Gapic::Config::Method.new list_adaptive_mt_files_config list_adaptive_mt_sentences_config = parent_rpcs.list_adaptive_mt_sentences if parent_rpcs.respond_to? :list_adaptive_mt_sentences @list_adaptive_mt_sentences = ::Gapic::Config::Method.new list_adaptive_mt_sentences_config import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data @import_data = ::Gapic::Config::Method.new import_data_config export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data @export_data = ::Gapic::Config::Method.new export_data_config list_examples_config = parent_rpcs.list_examples if parent_rpcs.respond_to? :list_examples @list_examples = ::Gapic::Config::Method.new list_examples_config create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model @create_model = ::Gapic::Config::Method.new create_model_config list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models @list_models = ::Gapic::Config::Method.new list_models_config get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model @get_model = ::Gapic::Config::Method.new get_model_config delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model @delete_model = ::Gapic::Config::Method.new delete_model_config yield self if block_given? end end end |
Instance Method Details
#rpcs ⇒ Rpcs
Configurations for individual RPCs
3983 3984 3985 3986 3987 3988 3989 |
# File 'lib/google/cloud/translate/v3/translation_service/rest/client.rb', line 3983 def rpcs @rpcs ||= begin parent_rpcs = nil parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) Rpcs.new parent_rpcs end end |