lib/google/cloud/notebooks/v2/notebook_service/rest/client.rb in google-cloud-notebooks-v2-0.3.0 vs lib/google/cloud/notebooks/v2/notebook_service/rest/client.rb in google-cloud-notebooks-v2-0.3.1
- old
+ new
@@ -173,31 +173,31 @@
config.quota_project = @quota_project_id
config.endpoint = @config.endpoint
config.universe_domain = @config.universe_domain
end
+ @notebook_service_stub = ::Google::Cloud::Notebooks::V2::NotebookService::Rest::ServiceStub.new(
+ endpoint: @config.endpoint,
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
+ universe_domain: @config.universe_domain,
+ credentials: credentials
+ )
+
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
config.credentials = credentials
config.quota_project = @quota_project_id
- config.endpoint = @config.endpoint
- config.universe_domain = @config.universe_domain
+ config.endpoint = @notebook_service_stub.endpoint
+ config.universe_domain = @notebook_service_stub.universe_domain
config.bindings_override = @config.bindings_override
end
@iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
config.credentials = credentials
config.quota_project = @quota_project_id
- config.endpoint = @config.endpoint
- config.universe_domain = @config.universe_domain
+ config.endpoint = @notebook_service_stub.endpoint
+ config.universe_domain = @notebook_service_stub.universe_domain
config.bindings_override = @config.bindings_override
end
-
- @notebook_service_stub = ::Google::Cloud::Notebooks::V2::NotebookService::Rest::ServiceStub.new(
- endpoint: @config.endpoint,
- endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
- universe_domain: @config.universe_domain,
- credentials: credentials
- )
end
##
# Get the associated client for long-running operations.
#