google-cloud-service_directory-v1 1.0.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +31 -21
- data/lib/google/cloud/service_directory/v1/lookup_service/client.rb +35 -2
- data/lib/google/cloud/service_directory/v1/lookup_service/rest/client.rb +35 -2
- data/lib/google/cloud/service_directory/v1/lookup_service/rest/service_stub.rb +22 -8
- data/lib/google/cloud/service_directory/v1/registration_service/client.rb +38 -19
- data/lib/google/cloud/service_directory/v1/registration_service/rest/client.rb +38 -19
- data/lib/google/cloud/service_directory/v1/registration_service/rest/service_stub.rb +158 -110
- data/lib/google/cloud/service_directory/v1/version.rb +1 -1
- data/lib/google/cloud/servicedirectory/v1/endpoint_pb.rb +1 -1
- data/lib/google/cloud/servicedirectory/v1/lookup_service_pb.rb +1 -1
- data/lib/google/cloud/servicedirectory/v1/registration_service_pb.rb +1 -1
- data/lib/google/cloud/servicedirectory/v1/service_pb.rb +1 -1
- data/proto_docs/google/api/client.rb +39 -0
- metadata +6 -9
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: dbc259c624aa7cfae93ed58b1d2c0c7115146cc4a832f8daa076be40ea0cbffe
         | 
| 4 | 
            +
              data.tar.gz: 06623f67575262b9d145f4195be0866e725d29f342d74035f4344765c122b558
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 88e62332ea5094062723a9a1ff1c5efedc217f8a754c7c8611facd36770f0472a059a599b9984a714e5a20363d1a303c459aa9e76fffb89bbe587c177137ee05
         | 
| 7 | 
            +
              data.tar.gz: bd586b265060c43985fa83ea620177da56e4e6ef118697093328a62957dcf65215e8d2bb3df479d6dcb88fc0dbd54d814e31ea148df22a2026b061e865cda216
         | 
    
        data/README.md
    CHANGED
    
    | @@ -43,40 +43,50 @@ for class and method documentation. | |
| 43 43 | 
             
            See also the [Product Documentation](https://cloud.google.com/service-directory)
         | 
| 44 44 | 
             
            for general usage information.
         | 
| 45 45 |  | 
| 46 | 
            -
            ##  | 
| 47 | 
            -
             | 
| 48 | 
            -
             | 
| 49 | 
            -
             | 
| 50 | 
            -
             | 
| 51 | 
            -
             | 
| 52 | 
            -
             | 
| 53 | 
            -
             | 
| 54 | 
            -
             | 
| 46 | 
            +
            ## Debug Logging
         | 
| 47 | 
            +
             | 
| 48 | 
            +
            This library comes with opt-in Debug Logging that can help you troubleshoot
         | 
| 49 | 
            +
            your application's integration with the API. When logging is activated, key
         | 
| 50 | 
            +
            events such as requests and responses, along with data payloads and metadata
         | 
| 51 | 
            +
            such as headers and client configuration, are logged to the standard error
         | 
| 52 | 
            +
            stream.
         | 
| 53 | 
            +
             | 
| 54 | 
            +
            **WARNING:** Client Library Debug Logging includes your data payloads in
         | 
| 55 | 
            +
            plaintext, which could include sensitive data such as PII for yourself or your
         | 
| 56 | 
            +
            customers, private keys, or other security data that could be compromising if
         | 
| 57 | 
            +
            leaked. Always practice good data hygiene with your application logs, and follow
         | 
| 58 | 
            +
            the principle of least access. Google also recommends that Client Library Debug
         | 
| 59 | 
            +
            Logging be enabled only temporarily during active debugging, and not used
         | 
| 60 | 
            +
            permanently in production.
         | 
| 61 | 
            +
             | 
| 62 | 
            +
            To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
         | 
| 63 | 
            +
            to the value `all`. Alternatively, you can set the value to a comma-delimited
         | 
| 64 | 
            +
            list of client library gem names. This will select the default logging behavior,
         | 
| 65 | 
            +
            which writes logs to the standard error stream. On a local workstation, this may
         | 
| 66 | 
            +
            result in logs appearing on the console. When running on a Google Cloud hosting
         | 
| 67 | 
            +
            service such as [Google Cloud Run](https://cloud.google.com/run), this generally
         | 
| 68 | 
            +
            results in logs appearing alongside your application logs in the
         | 
| 69 | 
            +
            [Google Cloud Logging](https://cloud.google.com/logging/) service.
         | 
| 70 | 
            +
             | 
| 71 | 
            +
            You can customize logging by modifying the `logger` configuration when
         | 
| 72 | 
            +
            constructing a client object. For example:
         | 
| 55 73 |  | 
| 56 74 | 
             
            ```ruby
         | 
| 75 | 
            +
            require "google/cloud/service_directory/v1"
         | 
| 57 76 | 
             
            require "logger"
         | 
| 58 77 |  | 
| 59 | 
            -
             | 
| 60 | 
            -
               | 
| 61 | 
            -
              def logger
         | 
| 62 | 
            -
                LOGGER
         | 
| 63 | 
            -
              end
         | 
| 64 | 
            -
            end
         | 
| 65 | 
            -
             | 
| 66 | 
            -
            # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
         | 
| 67 | 
            -
            module GRPC
         | 
| 68 | 
            -
              extend MyLogger
         | 
| 78 | 
            +
            client = ::Google::Cloud::ServiceDirectory::V1::LookupService::Client.new do |config|
         | 
| 79 | 
            +
              config.logger = Logger.new "my-app.log"
         | 
| 69 80 | 
             
            end
         | 
| 70 81 | 
             
            ```
         | 
| 71 82 |  | 
| 72 | 
            -
             | 
| 73 83 | 
             
            ## Google Cloud Samples
         | 
| 74 84 |  | 
| 75 85 | 
             
            To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
         | 
| 76 86 |  | 
| 77 87 | 
             
            ## Supported Ruby Versions
         | 
| 78 88 |  | 
| 79 | 
            -
            This library is supported on Ruby  | 
| 89 | 
            +
            This library is supported on Ruby 3.0+.
         | 
| 80 90 |  | 
| 81 91 | 
             
            Google provides official support for Ruby versions that are actively supported
         | 
| 82 92 | 
             
            by Ruby Core—that is, Ruby versions that are either in normal maintenance or
         | 
| @@ -163,14 +163,26 @@ module Google | |
| 163 163 | 
             
                            universe_domain: @config.universe_domain,
         | 
| 164 164 | 
             
                            channel_args: @config.channel_args,
         | 
| 165 165 | 
             
                            interceptors: @config.interceptors,
         | 
| 166 | 
            -
                            channel_pool_config: @config.channel_pool
         | 
| 166 | 
            +
                            channel_pool_config: @config.channel_pool,
         | 
| 167 | 
            +
                            logger: @config.logger
         | 
| 167 168 | 
             
                          )
         | 
| 168 169 |  | 
| 170 | 
            +
                          @lookup_service_stub.stub_logger&.info do |entry|
         | 
| 171 | 
            +
                            entry.set_system_name
         | 
| 172 | 
            +
                            entry.set_service
         | 
| 173 | 
            +
                            entry.message = "Created client for #{entry.service}"
         | 
| 174 | 
            +
                            entry.set_credentials_fields credentials
         | 
| 175 | 
            +
                            entry.set "customEndpoint", @config.endpoint if @config.endpoint
         | 
| 176 | 
            +
                            entry.set "defaultTimeout", @config.timeout if @config.timeout
         | 
| 177 | 
            +
                            entry.set "quotaProject", @quota_project_id if @quota_project_id
         | 
| 178 | 
            +
                          end
         | 
| 179 | 
            +
             | 
| 169 180 | 
             
                          @location_client = Google::Cloud::Location::Locations::Client.new do |config|
         | 
| 170 181 | 
             
                            config.credentials = credentials
         | 
| 171 182 | 
             
                            config.quota_project = @quota_project_id
         | 
| 172 183 | 
             
                            config.endpoint = @lookup_service_stub.endpoint
         | 
| 173 184 | 
             
                            config.universe_domain = @lookup_service_stub.universe_domain
         | 
| 185 | 
            +
                            config.logger = @lookup_service_stub.logger if config.respond_to? :logger=
         | 
| 174 186 | 
             
                          end
         | 
| 175 187 | 
             
                        end
         | 
| 176 188 |  | 
| @@ -181,6 +193,15 @@ module Google | |
| 181 193 | 
             
                        #
         | 
| 182 194 | 
             
                        attr_reader :location_client
         | 
| 183 195 |  | 
| 196 | 
            +
                        ##
         | 
| 197 | 
            +
                        # The logger used for request/response debug logging.
         | 
| 198 | 
            +
                        #
         | 
| 199 | 
            +
                        # @return [Logger]
         | 
| 200 | 
            +
                        #
         | 
| 201 | 
            +
                        def logger
         | 
| 202 | 
            +
                          @lookup_service_stub.logger
         | 
| 203 | 
            +
                        end
         | 
| 204 | 
            +
             | 
| 184 205 | 
             
                        # Service calls
         | 
| 185 206 |  | 
| 186 207 | 
             
                        ##
         | 
| @@ -306,7 +327,6 @@ module Google | |
| 306 327 |  | 
| 307 328 | 
             
                          @lookup_service_stub.call_rpc :resolve_service, request, options: options do |response, operation|
         | 
| 308 329 | 
             
                            yield response, operation if block_given?
         | 
| 309 | 
            -
                            return response
         | 
| 310 330 | 
             
                          end
         | 
| 311 331 | 
             
                        rescue ::GRPC::BadStatus => e
         | 
| 312 332 | 
             
                          raise ::Google::Cloud::Error.from_error(e)
         | 
| @@ -356,6 +376,13 @@ module Google | |
| 356 376 | 
             
                        #    *  (`GRPC::Core::Channel`) a gRPC channel with included credentials
         | 
| 357 377 | 
             
                        #    *  (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
         | 
| 358 378 | 
             
                        #    *  (`nil`) indicating no credentials
         | 
| 379 | 
            +
                        #
         | 
| 380 | 
            +
                        #   Warning: If you accept a credential configuration (JSON file or Hash) from an
         | 
| 381 | 
            +
                        #   external source for authentication to Google Cloud, you must validate it before
         | 
| 382 | 
            +
                        #   providing it to a Google API client library. Providing an unvalidated credential
         | 
| 383 | 
            +
                        #   configuration to Google APIs can compromise the security of your systems and data.
         | 
| 384 | 
            +
                        #   For more information, refer to [Validate credential configurations from external
         | 
| 385 | 
            +
                        #   sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
         | 
| 359 386 | 
             
                        #   @return [::Object]
         | 
| 360 387 | 
             
                        # @!attribute [rw] scope
         | 
| 361 388 | 
             
                        #   The OAuth scopes
         | 
| @@ -395,6 +422,11 @@ module Google | |
| 395 422 | 
             
                        #   default endpoint URL. The default value of nil uses the environment
         | 
| 396 423 | 
             
                        #   universe (usually the default "googleapis.com" universe).
         | 
| 397 424 | 
             
                        #   @return [::String,nil]
         | 
| 425 | 
            +
                        # @!attribute [rw] logger
         | 
| 426 | 
            +
                        #   A custom logger to use for request/response debug logging, or the value
         | 
| 427 | 
            +
                        #   `:default` (the default) to construct a default logger, or `nil` to
         | 
| 428 | 
            +
                        #   explicitly disable logging.
         | 
| 429 | 
            +
                        #   @return [::Logger,:default,nil]
         | 
| 398 430 | 
             
                        #
         | 
| 399 431 | 
             
                        class Configuration
         | 
| 400 432 | 
             
                          extend ::Gapic::Config
         | 
| @@ -419,6 +451,7 @@ module Google | |
| 419 451 | 
             
                          config_attr :retry_policy,  nil, ::Hash, ::Proc, nil
         | 
| 420 452 | 
             
                          config_attr :quota_project, nil, ::String, nil
         | 
| 421 453 | 
             
                          config_attr :universe_domain, nil, ::String, nil
         | 
| 454 | 
            +
                          config_attr :logger, :default, ::Logger, nil, :default
         | 
| 422 455 |  | 
| 423 456 | 
             
                          # @private
         | 
| 424 457 | 
             
                          def initialize parent_config = nil
         | 
| @@ -156,15 +156,27 @@ module Google | |
| 156 156 | 
             
                              endpoint: @config.endpoint,
         | 
| 157 157 | 
             
                              endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
         | 
| 158 158 | 
             
                              universe_domain: @config.universe_domain,
         | 
| 159 | 
            -
                              credentials: credentials
         | 
| 159 | 
            +
                              credentials: credentials,
         | 
| 160 | 
            +
                              logger: @config.logger
         | 
| 160 161 | 
             
                            )
         | 
| 161 162 |  | 
| 163 | 
            +
                            @lookup_service_stub.logger(stub: true)&.info do |entry|
         | 
| 164 | 
            +
                              entry.set_system_name
         | 
| 165 | 
            +
                              entry.set_service
         | 
| 166 | 
            +
                              entry.message = "Created client for #{entry.service}"
         | 
| 167 | 
            +
                              entry.set_credentials_fields credentials
         | 
| 168 | 
            +
                              entry.set "customEndpoint", @config.endpoint if @config.endpoint
         | 
| 169 | 
            +
                              entry.set "defaultTimeout", @config.timeout if @config.timeout
         | 
| 170 | 
            +
                              entry.set "quotaProject", @quota_project_id if @quota_project_id
         | 
| 171 | 
            +
                            end
         | 
| 172 | 
            +
             | 
| 162 173 | 
             
                            @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
         | 
| 163 174 | 
             
                              config.credentials = credentials
         | 
| 164 175 | 
             
                              config.quota_project = @quota_project_id
         | 
| 165 176 | 
             
                              config.endpoint = @lookup_service_stub.endpoint
         | 
| 166 177 | 
             
                              config.universe_domain = @lookup_service_stub.universe_domain
         | 
| 167 178 | 
             
                              config.bindings_override = @config.bindings_override
         | 
| 179 | 
            +
                              config.logger = @lookup_service_stub.logger if config.respond_to? :logger=
         | 
| 168 180 | 
             
                            end
         | 
| 169 181 | 
             
                          end
         | 
| 170 182 |  | 
| @@ -175,6 +187,15 @@ module Google | |
| 175 187 | 
             
                          #
         | 
| 176 188 | 
             
                          attr_reader :location_client
         | 
| 177 189 |  | 
| 190 | 
            +
                          ##
         | 
| 191 | 
            +
                          # The logger used for request/response debug logging.
         | 
| 192 | 
            +
                          #
         | 
| 193 | 
            +
                          # @return [Logger]
         | 
| 194 | 
            +
                          #
         | 
| 195 | 
            +
                          def logger
         | 
| 196 | 
            +
                            @lookup_service_stub.logger
         | 
| 197 | 
            +
                          end
         | 
| 198 | 
            +
             | 
| 178 199 | 
             
                          # Service calls
         | 
| 179 200 |  | 
| 180 201 | 
             
                          ##
         | 
| @@ -293,7 +314,6 @@ module Google | |
| 293 314 |  | 
| 294 315 | 
             
                            @lookup_service_stub.resolve_service request, options do |result, operation|
         | 
| 295 316 | 
             
                              yield result, operation if block_given?
         | 
| 296 | 
            -
                              return result
         | 
| 297 317 | 
             
                            end
         | 
| 298 318 | 
             
                          rescue ::Gapic::Rest::Error => e
         | 
| 299 319 | 
             
                            raise ::Google::Cloud::Error.from_error(e)
         | 
| @@ -341,6 +361,13 @@ module Google | |
| 341 361 | 
             
                          #    *  (`Signet::OAuth2::Client`) A signet oauth2 client object
         | 
| 342 362 | 
             
                          #       (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
         | 
| 343 363 | 
             
                          #    *  (`nil`) indicating no credentials
         | 
| 364 | 
            +
                          #
         | 
| 365 | 
            +
                          #   Warning: If you accept a credential configuration (JSON file or Hash) from an
         | 
| 366 | 
            +
                          #   external source for authentication to Google Cloud, you must validate it before
         | 
| 367 | 
            +
                          #   providing it to a Google API client library. Providing an unvalidated credential
         | 
| 368 | 
            +
                          #   configuration to Google APIs can compromise the security of your systems and data.
         | 
| 369 | 
            +
                          #   For more information, refer to [Validate credential configurations from external
         | 
| 370 | 
            +
                          #   sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
         | 
| 344 371 | 
             
                          #   @return [::Object]
         | 
| 345 372 | 
             
                          # @!attribute [rw] scope
         | 
| 346 373 | 
             
                          #   The OAuth scopes
         | 
| @@ -373,6 +400,11 @@ module Google | |
| 373 400 | 
             
                          #   default endpoint URL. The default value of nil uses the environment
         | 
| 374 401 | 
             
                          #   universe (usually the default "googleapis.com" universe).
         | 
| 375 402 | 
             
                          #   @return [::String,nil]
         | 
| 403 | 
            +
                          # @!attribute [rw] logger
         | 
| 404 | 
            +
                          #   A custom logger to use for request/response debug logging, or the value
         | 
| 405 | 
            +
                          #   `:default` (the default) to construct a default logger, or `nil` to
         | 
| 406 | 
            +
                          #   explicitly disable logging.
         | 
| 407 | 
            +
                          #   @return [::Logger,:default,nil]
         | 
| 376 408 | 
             
                          #
         | 
| 377 409 | 
             
                          class Configuration
         | 
| 378 410 | 
             
                            extend ::Gapic::Config
         | 
| @@ -401,6 +433,7 @@ module Google | |
| 401 433 | 
             
                            # by the host service.
         | 
| 402 434 | 
             
                            # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
         | 
| 403 435 | 
             
                            config_attr :bindings_override, {}, ::Hash, nil
         | 
| 436 | 
            +
                            config_attr :logger, :default, ::Logger, nil, :default
         | 
| 404 437 |  | 
| 405 438 | 
             
                            # @private
         | 
| 406 439 | 
             
                            def initialize parent_config = nil
         | 
| @@ -30,7 +30,8 @@ module Google | |
| 30 30 | 
             
                        # including transcoding, making the REST call, and deserialing the response.
         | 
| 31 31 | 
             
                        #
         | 
| 32 32 | 
             
                        class ServiceStub
         | 
| 33 | 
            -
                           | 
| 33 | 
            +
                          # @private
         | 
| 34 | 
            +
                          def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
         | 
| 34 35 | 
             
                            # These require statements are intentionally placed here to initialize
         | 
| 35 36 | 
             
                            # the REST modules only when it's required.
         | 
| 36 37 | 
             
                            require "gapic/rest"
         | 
| @@ -40,7 +41,9 @@ module Google | |
| 40 41 | 
             
                                                                         universe_domain: universe_domain,
         | 
| 41 42 | 
             
                                                                         credentials: credentials,
         | 
| 42 43 | 
             
                                                                         numeric_enums: true,
         | 
| 43 | 
            -
                                                                          | 
| 44 | 
            +
                                                                         service_name: self.class,
         | 
| 45 | 
            +
                                                                         raise_faraday_errors: false,
         | 
| 46 | 
            +
                                                                         logger: logger
         | 
| 44 47 | 
             
                          end
         | 
| 45 48 |  | 
| 46 49 | 
             
                          ##
         | 
| @@ -61,6 +64,15 @@ module Google | |
| 61 64 | 
             
                            @client_stub.endpoint
         | 
| 62 65 | 
             
                          end
         | 
| 63 66 |  | 
| 67 | 
            +
                          ##
         | 
| 68 | 
            +
                          # The logger used for request/response debug logging.
         | 
| 69 | 
            +
                          #
         | 
| 70 | 
            +
                          # @return [Logger]
         | 
| 71 | 
            +
                          #
         | 
| 72 | 
            +
                          def logger stub: false
         | 
| 73 | 
            +
                            stub ? @client_stub.stub_logger : @client_stub.logger
         | 
| 74 | 
            +
                          end
         | 
| 75 | 
            +
             | 
| 64 76 | 
             
                          ##
         | 
| 65 77 | 
             
                          # Baseline implementation for the resolve_service REST call
         | 
| 66 78 | 
             
                          #
         | 
| @@ -87,16 +99,18 @@ module Google | |
| 87 99 |  | 
| 88 100 | 
             
                            response = @client_stub.make_http_request(
         | 
| 89 101 | 
             
                              verb,
         | 
| 90 | 
            -
                              uri: | 
| 91 | 
            -
                              body: | 
| 92 | 
            -
                              params: | 
| 102 | 
            +
                              uri: uri,
         | 
| 103 | 
            +
                              body: body || "",
         | 
| 104 | 
            +
                              params: query_string_params,
         | 
| 105 | 
            +
                              method_name: "resolve_service",
         | 
| 93 106 | 
             
                              options: options
         | 
| 94 107 | 
             
                            )
         | 
| 95 108 | 
             
                            operation = ::Gapic::Rest::TransportOperation.new response
         | 
| 96 109 | 
             
                            result = ::Google::Cloud::ServiceDirectory::V1::ResolveServiceResponse.decode_json response.body, ignore_unknown_fields: true
         | 
| 97 | 
            -
             | 
| 98 | 
            -
             | 
| 99 | 
            -
             | 
| 110 | 
            +
                            catch :response do
         | 
| 111 | 
            +
                              yield result, operation if block_given?
         | 
| 112 | 
            +
                              result
         | 
| 113 | 
            +
                            end
         | 
| 100 114 | 
             
                          end
         | 
| 101 115 |  | 
| 102 116 | 
             
                          ##
         | 
| @@ -177,14 +177,26 @@ module Google | |
| 177 177 | 
             
                            universe_domain: @config.universe_domain,
         | 
| 178 178 | 
             
                            channel_args: @config.channel_args,
         | 
| 179 179 | 
             
                            interceptors: @config.interceptors,
         | 
| 180 | 
            -
                            channel_pool_config: @config.channel_pool
         | 
| 180 | 
            +
                            channel_pool_config: @config.channel_pool,
         | 
| 181 | 
            +
                            logger: @config.logger
         | 
| 181 182 | 
             
                          )
         | 
| 182 183 |  | 
| 184 | 
            +
                          @registration_service_stub.stub_logger&.info do |entry|
         | 
| 185 | 
            +
                            entry.set_system_name
         | 
| 186 | 
            +
                            entry.set_service
         | 
| 187 | 
            +
                            entry.message = "Created client for #{entry.service}"
         | 
| 188 | 
            +
                            entry.set_credentials_fields credentials
         | 
| 189 | 
            +
                            entry.set "customEndpoint", @config.endpoint if @config.endpoint
         | 
| 190 | 
            +
                            entry.set "defaultTimeout", @config.timeout if @config.timeout
         | 
| 191 | 
            +
                            entry.set "quotaProject", @quota_project_id if @quota_project_id
         | 
| 192 | 
            +
                          end
         | 
| 193 | 
            +
             | 
| 183 194 | 
             
                          @location_client = Google::Cloud::Location::Locations::Client.new do |config|
         | 
| 184 195 | 
             
                            config.credentials = credentials
         | 
| 185 196 | 
             
                            config.quota_project = @quota_project_id
         | 
| 186 197 | 
             
                            config.endpoint = @registration_service_stub.endpoint
         | 
| 187 198 | 
             
                            config.universe_domain = @registration_service_stub.universe_domain
         | 
| 199 | 
            +
                            config.logger = @registration_service_stub.logger if config.respond_to? :logger=
         | 
| 188 200 | 
             
                          end
         | 
| 189 201 | 
             
                        end
         | 
| 190 202 |  | 
| @@ -195,6 +207,15 @@ module Google | |
| 195 207 | 
             
                        #
         | 
| 196 208 | 
             
                        attr_reader :location_client
         | 
| 197 209 |  | 
| 210 | 
            +
                        ##
         | 
| 211 | 
            +
                        # The logger used for request/response debug logging.
         | 
| 212 | 
            +
                        #
         | 
| 213 | 
            +
                        # @return [Logger]
         | 
| 214 | 
            +
                        #
         | 
| 215 | 
            +
                        def logger
         | 
| 216 | 
            +
                          @registration_service_stub.logger
         | 
| 217 | 
            +
                        end
         | 
| 218 | 
            +
             | 
| 198 219 | 
             
                        # Service calls
         | 
| 199 220 |  | 
| 200 221 | 
             
                        ##
         | 
| @@ -288,7 +309,6 @@ module Google | |
| 288 309 |  | 
| 289 310 | 
             
                          @registration_service_stub.call_rpc :create_namespace, request, options: options do |response, operation|
         | 
| 290 311 | 
             
                            yield response, operation if block_given?
         | 
| 291 | 
            -
                            return response
         | 
| 292 312 | 
             
                          end
         | 
| 293 313 | 
             
                        rescue ::GRPC::BadStatus => e
         | 
| 294 314 | 
             
                          raise ::Google::Cloud::Error.from_error(e)
         | 
| @@ -425,7 +445,7 @@ module Google | |
| 425 445 | 
             
                          @registration_service_stub.call_rpc :list_namespaces, request, options: options do |response, operation|
         | 
| 426 446 | 
             
                            response = ::Gapic::PagedEnumerable.new @registration_service_stub, :list_namespaces, request, response, operation, options
         | 
| 427 447 | 
             
                            yield response, operation if block_given?
         | 
| 428 | 
            -
                             | 
| 448 | 
            +
                            throw :response, response
         | 
| 429 449 | 
             
                          end
         | 
| 430 450 | 
             
                        rescue ::GRPC::BadStatus => e
         | 
| 431 451 | 
             
                          raise ::Google::Cloud::Error.from_error(e)
         | 
| @@ -511,7 +531,6 @@ module Google | |
| 511 531 |  | 
| 512 532 | 
             
                          @registration_service_stub.call_rpc :get_namespace, request, options: options do |response, operation|
         | 
| 513 533 | 
             
                            yield response, operation if block_given?
         | 
| 514 | 
            -
                            return response
         | 
| 515 534 | 
             
                          end
         | 
| 516 535 | 
             
                        rescue ::GRPC::BadStatus => e
         | 
| 517 536 | 
             
                          raise ::Google::Cloud::Error.from_error(e)
         | 
| @@ -599,7 +618,6 @@ module Google | |
| 599 618 |  | 
| 600 619 | 
             
                          @registration_service_stub.call_rpc :update_namespace, request, options: options do |response, operation|
         | 
| 601 620 | 
             
                            yield response, operation if block_given?
         | 
| 602 | 
            -
                            return response
         | 
| 603 621 | 
             
                          end
         | 
| 604 622 | 
             
                        rescue ::GRPC::BadStatus => e
         | 
| 605 623 | 
             
                          raise ::Google::Cloud::Error.from_error(e)
         | 
| @@ -686,7 +704,6 @@ module Google | |
| 686 704 |  | 
| 687 705 | 
             
                          @registration_service_stub.call_rpc :delete_namespace, request, options: options do |response, operation|
         | 
| 688 706 | 
             
                            yield response, operation if block_given?
         | 
| 689 | 
            -
                            return response
         | 
| 690 707 | 
             
                          end
         | 
| 691 708 | 
             
                        rescue ::GRPC::BadStatus => e
         | 
| 692 709 | 
             
                          raise ::Google::Cloud::Error.from_error(e)
         | 
| @@ -782,7 +799,6 @@ module Google | |
| 782 799 |  | 
| 783 800 | 
             
                          @registration_service_stub.call_rpc :create_service, request, options: options do |response, operation|
         | 
| 784 801 | 
             
                            yield response, operation if block_given?
         | 
| 785 | 
            -
                            return response
         | 
| 786 802 | 
             
                          end
         | 
| 787 803 | 
             
                        rescue ::GRPC::BadStatus => e
         | 
| 788 804 | 
             
                          raise ::Google::Cloud::Error.from_error(e)
         | 
| @@ -921,7 +937,7 @@ module Google | |
| 921 937 | 
             
                          @registration_service_stub.call_rpc :list_services, request, options: options do |response, operation|
         | 
| 922 938 | 
             
                            response = ::Gapic::PagedEnumerable.new @registration_service_stub, :list_services, request, response, operation, options
         | 
| 923 939 | 
             
                            yield response, operation if block_given?
         | 
| 924 | 
            -
                             | 
| 940 | 
            +
                            throw :response, response
         | 
| 925 941 | 
             
                          end
         | 
| 926 942 | 
             
                        rescue ::GRPC::BadStatus => e
         | 
| 927 943 | 
             
                          raise ::Google::Cloud::Error.from_error(e)
         | 
| @@ -1007,7 +1023,6 @@ module Google | |
| 1007 1023 |  | 
| 1008 1024 | 
             
                          @registration_service_stub.call_rpc :get_service, request, options: options do |response, operation|
         | 
| 1009 1025 | 
             
                            yield response, operation if block_given?
         | 
| 1010 | 
            -
                            return response
         | 
| 1011 1026 | 
             
                          end
         | 
| 1012 1027 | 
             
                        rescue ::GRPC::BadStatus => e
         | 
| 1013 1028 | 
             
                          raise ::Google::Cloud::Error.from_error(e)
         | 
| @@ -1095,7 +1110,6 @@ module Google | |
| 1095 1110 |  | 
| 1096 1111 | 
             
                          @registration_service_stub.call_rpc :update_service, request, options: options do |response, operation|
         | 
| 1097 1112 | 
             
                            yield response, operation if block_given?
         | 
| 1098 | 
            -
                            return response
         | 
| 1099 1113 | 
             
                          end
         | 
| 1100 1114 | 
             
                        rescue ::GRPC::BadStatus => e
         | 
| 1101 1115 | 
             
                          raise ::Google::Cloud::Error.from_error(e)
         | 
| @@ -1182,7 +1196,6 @@ module Google | |
| 1182 1196 |  | 
| 1183 1197 | 
             
                          @registration_service_stub.call_rpc :delete_service, request, options: options do |response, operation|
         | 
| 1184 1198 | 
             
                            yield response, operation if block_given?
         | 
| 1185 | 
            -
                            return response
         | 
| 1186 1199 | 
             
                          end
         | 
| 1187 1200 | 
             
                        rescue ::GRPC::BadStatus => e
         | 
| 1188 1201 | 
             
                          raise ::Google::Cloud::Error.from_error(e)
         | 
| @@ -1278,7 +1291,6 @@ module Google | |
| 1278 1291 |  | 
| 1279 1292 | 
             
                          @registration_service_stub.call_rpc :create_endpoint, request, options: options do |response, operation|
         | 
| 1280 1293 | 
             
                            yield response, operation if block_given?
         | 
| 1281 | 
            -
                            return response
         | 
| 1282 1294 | 
             
                          end
         | 
| 1283 1295 | 
             
                        rescue ::GRPC::BadStatus => e
         | 
| 1284 1296 | 
             
                          raise ::Google::Cloud::Error.from_error(e)
         | 
| @@ -1420,7 +1432,7 @@ module Google | |
| 1420 1432 | 
             
                          @registration_service_stub.call_rpc :list_endpoints, request, options: options do |response, operation|
         | 
| 1421 1433 | 
             
                            response = ::Gapic::PagedEnumerable.new @registration_service_stub, :list_endpoints, request, response, operation, options
         | 
| 1422 1434 | 
             
                            yield response, operation if block_given?
         | 
| 1423 | 
            -
                             | 
| 1435 | 
            +
                            throw :response, response
         | 
| 1424 1436 | 
             
                          end
         | 
| 1425 1437 | 
             
                        rescue ::GRPC::BadStatus => e
         | 
| 1426 1438 | 
             
                          raise ::Google::Cloud::Error.from_error(e)
         | 
| @@ -1506,7 +1518,6 @@ module Google | |
| 1506 1518 |  | 
| 1507 1519 | 
             
                          @registration_service_stub.call_rpc :get_endpoint, request, options: options do |response, operation|
         | 
| 1508 1520 | 
             
                            yield response, operation if block_given?
         | 
| 1509 | 
            -
                            return response
         | 
| 1510 1521 | 
             
                          end
         | 
| 1511 1522 | 
             
                        rescue ::GRPC::BadStatus => e
         | 
| 1512 1523 | 
             
                          raise ::Google::Cloud::Error.from_error(e)
         | 
| @@ -1594,7 +1605,6 @@ module Google | |
| 1594 1605 |  | 
| 1595 1606 | 
             
                          @registration_service_stub.call_rpc :update_endpoint, request, options: options do |response, operation|
         | 
| 1596 1607 | 
             
                            yield response, operation if block_given?
         | 
| 1597 | 
            -
                            return response
         | 
| 1598 1608 | 
             
                          end
         | 
| 1599 1609 | 
             
                        rescue ::GRPC::BadStatus => e
         | 
| 1600 1610 | 
             
                          raise ::Google::Cloud::Error.from_error(e)
         | 
| @@ -1680,7 +1690,6 @@ module Google | |
| 1680 1690 |  | 
| 1681 1691 | 
             
                          @registration_service_stub.call_rpc :delete_endpoint, request, options: options do |response, operation|
         | 
| 1682 1692 | 
             
                            yield response, operation if block_given?
         | 
| 1683 | 
            -
                            return response
         | 
| 1684 1693 | 
             
                          end
         | 
| 1685 1694 | 
             
                        rescue ::GRPC::BadStatus => e
         | 
| 1686 1695 | 
             
                          raise ::Google::Cloud::Error.from_error(e)
         | 
| @@ -1770,7 +1779,6 @@ module Google | |
| 1770 1779 |  | 
| 1771 1780 | 
             
                          @registration_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
         | 
| 1772 1781 | 
             
                            yield response, operation if block_given?
         | 
| 1773 | 
            -
                            return response
         | 
| 1774 1782 | 
             
                          end
         | 
| 1775 1783 | 
             
                        rescue ::GRPC::BadStatus => e
         | 
| 1776 1784 | 
             
                          raise ::Google::Cloud::Error.from_error(e)
         | 
| @@ -1868,7 +1876,6 @@ module Google | |
| 1868 1876 |  | 
| 1869 1877 | 
             
                          @registration_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
         | 
| 1870 1878 | 
             
                            yield response, operation if block_given?
         | 
| 1871 | 
            -
                            return response
         | 
| 1872 1879 | 
             
                          end
         | 
| 1873 1880 | 
             
                        rescue ::GRPC::BadStatus => e
         | 
| 1874 1881 | 
             
                          raise ::Google::Cloud::Error.from_error(e)
         | 
| @@ -1960,7 +1967,6 @@ module Google | |
| 1960 1967 |  | 
| 1961 1968 | 
             
                          @registration_service_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
         | 
| 1962 1969 | 
             
                            yield response, operation if block_given?
         | 
| 1963 | 
            -
                            return response
         | 
| 1964 1970 | 
             
                          end
         | 
| 1965 1971 | 
             
                        rescue ::GRPC::BadStatus => e
         | 
| 1966 1972 | 
             
                          raise ::Google::Cloud::Error.from_error(e)
         | 
| @@ -2010,6 +2016,13 @@ module Google | |
| 2010 2016 | 
             
                        #    *  (`GRPC::Core::Channel`) a gRPC channel with included credentials
         | 
| 2011 2017 | 
             
                        #    *  (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
         | 
| 2012 2018 | 
             
                        #    *  (`nil`) indicating no credentials
         | 
| 2019 | 
            +
                        #
         | 
| 2020 | 
            +
                        #   Warning: If you accept a credential configuration (JSON file or Hash) from an
         | 
| 2021 | 
            +
                        #   external source for authentication to Google Cloud, you must validate it before
         | 
| 2022 | 
            +
                        #   providing it to a Google API client library. Providing an unvalidated credential
         | 
| 2023 | 
            +
                        #   configuration to Google APIs can compromise the security of your systems and data.
         | 
| 2024 | 
            +
                        #   For more information, refer to [Validate credential configurations from external
         | 
| 2025 | 
            +
                        #   sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
         | 
| 2013 2026 | 
             
                        #   @return [::Object]
         | 
| 2014 2027 | 
             
                        # @!attribute [rw] scope
         | 
| 2015 2028 | 
             
                        #   The OAuth scopes
         | 
| @@ -2049,6 +2062,11 @@ module Google | |
| 2049 2062 | 
             
                        #   default endpoint URL. The default value of nil uses the environment
         | 
| 2050 2063 | 
             
                        #   universe (usually the default "googleapis.com" universe).
         | 
| 2051 2064 | 
             
                        #   @return [::String,nil]
         | 
| 2065 | 
            +
                        # @!attribute [rw] logger
         | 
| 2066 | 
            +
                        #   A custom logger to use for request/response debug logging, or the value
         | 
| 2067 | 
            +
                        #   `:default` (the default) to construct a default logger, or `nil` to
         | 
| 2068 | 
            +
                        #   explicitly disable logging.
         | 
| 2069 | 
            +
                        #   @return [::Logger,:default,nil]
         | 
| 2052 2070 | 
             
                        #
         | 
| 2053 2071 | 
             
                        class Configuration
         | 
| 2054 2072 | 
             
                          extend ::Gapic::Config
         | 
| @@ -2073,6 +2091,7 @@ module Google | |
| 2073 2091 | 
             
                          config_attr :retry_policy,  nil, ::Hash, ::Proc, nil
         | 
| 2074 2092 | 
             
                          config_attr :quota_project, nil, ::String, nil
         | 
| 2075 2093 | 
             
                          config_attr :universe_domain, nil, ::String, nil
         | 
| 2094 | 
            +
                          config_attr :logger, :default, ::Logger, nil, :default
         | 
| 2076 2095 |  | 
| 2077 2096 | 
             
                          # @private
         | 
| 2078 2097 | 
             
                          def initialize parent_config = nil
         |