google-cloud-compute-v1 2.6.0 → 2.7.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/AUTHENTICATION.md +72 -101
- data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +33 -7
- data/lib/google/cloud/compute/v1/accelerator_types/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/addresses/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/addresses/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/autoscalers/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +33 -7
- data/lib/google/cloud/compute/v1/disk_types/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/disks/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/disks/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/firewalls/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/global_addresses/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +33 -7
- data/lib/google/cloud/compute/v1/global_operations/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +33 -7
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/health_checks/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/image_family_views/rest/client.rb +33 -7
- data/lib/google/cloud/compute/v1/image_family_views/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/images/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/images/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/instance_groups/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/instance_templates/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/instances/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +33 -7
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest/client.rb +33 -7
- data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +33 -7
- data/lib/google/cloud/compute/v1/license_codes/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/licenses/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/licenses/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/machine_images/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +33 -7
- data/lib/google/cloud/compute/v1/machine_types/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/network_attachments/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/network_attachments/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/networks/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/networks/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/node_groups/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/node_templates/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/node_types/rest/client.rb +33 -7
- data/lib/google/cloud/compute/v1/node_types/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/projects/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/projects/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_commitments/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +33 -7
- data/lib/google/cloud/compute/v1/region_disk_types/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_disks/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_health_checks/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_instance_templates/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_instance_templates/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_instances/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +33 -7
- data/lib/google/cloud/compute/v1/region_operations/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_ssl_policies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_url_maps/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/regions/rest/client.rb +33 -7
- data/lib/google/cloud/compute/v1/regions/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/reservations/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/resource_policies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/routers/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/routes/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/routes/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/service_attachments/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/ssl_policies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/subnetworks/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/url_maps/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/version.rb +1 -1
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +33 -7
- data/lib/google/cloud/compute/v1/zone_operations/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/zones/rest/client.rb +33 -7
- data/lib/google/cloud/compute/v1/zones/rest/service_stub.rb +14 -2
- data/proto_docs/google/api/client.rb +1 -0
- metadata +5 -5
|
@@ -32,6 +32,9 @@ module Google
|
|
|
32
32
|
# The ImageFamilyViews API.
|
|
33
33
|
#
|
|
34
34
|
class Client
|
|
35
|
+
# @private
|
|
36
|
+
DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$"
|
|
37
|
+
|
|
35
38
|
# @private
|
|
36
39
|
attr_reader :image_family_views_stub
|
|
37
40
|
|
|
@@ -95,6 +98,15 @@ module Google
|
|
|
95
98
|
@config
|
|
96
99
|
end
|
|
97
100
|
|
|
101
|
+
##
|
|
102
|
+
# The effective universe domain
|
|
103
|
+
#
|
|
104
|
+
# @return [String]
|
|
105
|
+
#
|
|
106
|
+
def universe_domain
|
|
107
|
+
@image_family_views_stub.universe_domain
|
|
108
|
+
end
|
|
109
|
+
|
|
98
110
|
##
|
|
99
111
|
# Create a new ImageFamilyViews REST client object.
|
|
100
112
|
#
|
|
@@ -122,8 +134,9 @@ module Google
|
|
|
122
134
|
credentials = @config.credentials
|
|
123
135
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
|
124
136
|
# but only if the default endpoint does not have a region prefix.
|
|
125
|
-
enable_self_signed_jwt = @config.endpoint
|
|
126
|
-
|
|
137
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
|
138
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
|
139
|
+
!@config.endpoint.split(".").first.include?("-"))
|
|
127
140
|
credentials ||= Credentials.default scope: @config.scope,
|
|
128
141
|
enable_self_signed_jwt: enable_self_signed_jwt
|
|
129
142
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
|
@@ -133,7 +146,12 @@ module Google
|
|
|
133
146
|
@quota_project_id = @config.quota_project
|
|
134
147
|
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
|
135
148
|
|
|
136
|
-
@image_family_views_stub = ::Google::Cloud::Compute::V1::ImageFamilyViews::Rest::ServiceStub.new
|
|
149
|
+
@image_family_views_stub = ::Google::Cloud::Compute::V1::ImageFamilyViews::Rest::ServiceStub.new(
|
|
150
|
+
endpoint: @config.endpoint,
|
|
151
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
|
152
|
+
universe_domain: @config.universe_domain,
|
|
153
|
+
credentials: credentials
|
|
154
|
+
)
|
|
137
155
|
end
|
|
138
156
|
|
|
139
157
|
# Service calls
|
|
@@ -250,9 +268,9 @@ module Google
|
|
|
250
268
|
# end
|
|
251
269
|
#
|
|
252
270
|
# @!attribute [rw] endpoint
|
|
253
|
-
#
|
|
254
|
-
#
|
|
255
|
-
# @return [::String]
|
|
271
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
|
272
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
|
273
|
+
# @return [::String,nil]
|
|
256
274
|
# @!attribute [rw] credentials
|
|
257
275
|
# Credentials to send with calls. You may provide any of the following types:
|
|
258
276
|
# * (`String`) The path to a service account key file in JSON format
|
|
@@ -289,13 +307,20 @@ module Google
|
|
|
289
307
|
# @!attribute [rw] quota_project
|
|
290
308
|
# A separate project against which to charge quota.
|
|
291
309
|
# @return [::String]
|
|
310
|
+
# @!attribute [rw] universe_domain
|
|
311
|
+
# The universe domain within which to make requests. This determines the
|
|
312
|
+
# default endpoint URL. The default value of nil uses the environment
|
|
313
|
+
# universe (usually the default "googleapis.com" universe).
|
|
314
|
+
# @return [::String,nil]
|
|
292
315
|
#
|
|
293
316
|
class Configuration
|
|
294
317
|
extend ::Gapic::Config
|
|
295
318
|
|
|
319
|
+
# @private
|
|
320
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
|
296
321
|
DEFAULT_ENDPOINT = "compute.googleapis.com"
|
|
297
322
|
|
|
298
|
-
config_attr :endpoint,
|
|
323
|
+
config_attr :endpoint, nil, ::String, nil
|
|
299
324
|
config_attr :credentials, nil do |value|
|
|
300
325
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
|
301
326
|
allowed.any? { |klass| klass === value }
|
|
@@ -307,6 +332,7 @@ module Google
|
|
|
307
332
|
config_attr :metadata, nil, ::Hash, nil
|
|
308
333
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
|
309
334
|
config_attr :quota_project, nil, ::String, nil
|
|
335
|
+
config_attr :universe_domain, nil, ::String, nil
|
|
310
336
|
|
|
311
337
|
# @private
|
|
312
338
|
def initialize parent_config = nil
|
|
@@ -30,16 +30,28 @@ module Google
|
|
|
30
30
|
# including transcoding, making the REST call, and deserialing the response.
|
|
31
31
|
#
|
|
32
32
|
class ServiceStub
|
|
33
|
-
def initialize endpoint:, credentials:
|
|
33
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
|
|
34
34
|
# These require statements are intentionally placed here to initialize
|
|
35
35
|
# the REST modules only when it's required.
|
|
36
36
|
require "gapic/rest"
|
|
37
37
|
|
|
38
|
-
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
|
38
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
|
39
|
+
endpoint_template: endpoint_template,
|
|
40
|
+
universe_domain: universe_domain,
|
|
41
|
+
credentials: credentials,
|
|
39
42
|
numeric_enums: false,
|
|
40
43
|
raise_faraday_errors: false
|
|
41
44
|
end
|
|
42
45
|
|
|
46
|
+
##
|
|
47
|
+
# The effective universe domain
|
|
48
|
+
#
|
|
49
|
+
# @return [String]
|
|
50
|
+
#
|
|
51
|
+
def universe_domain
|
|
52
|
+
@client_stub.universe_domain
|
|
53
|
+
end
|
|
54
|
+
|
|
43
55
|
##
|
|
44
56
|
# Baseline implementation for the get REST call
|
|
45
57
|
#
|
|
@@ -33,6 +33,9 @@ module Google
|
|
|
33
33
|
# The Images API.
|
|
34
34
|
#
|
|
35
35
|
class Client
|
|
36
|
+
# @private
|
|
37
|
+
DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$"
|
|
38
|
+
|
|
36
39
|
# @private
|
|
37
40
|
attr_reader :images_stub
|
|
38
41
|
|
|
@@ -125,6 +128,15 @@ module Google
|
|
|
125
128
|
@config
|
|
126
129
|
end
|
|
127
130
|
|
|
131
|
+
##
|
|
132
|
+
# The effective universe domain
|
|
133
|
+
#
|
|
134
|
+
# @return [String]
|
|
135
|
+
#
|
|
136
|
+
def universe_domain
|
|
137
|
+
@images_stub.universe_domain
|
|
138
|
+
end
|
|
139
|
+
|
|
128
140
|
##
|
|
129
141
|
# Create a new Images REST client object.
|
|
130
142
|
#
|
|
@@ -152,8 +164,9 @@ module Google
|
|
|
152
164
|
credentials = @config.credentials
|
|
153
165
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
|
154
166
|
# but only if the default endpoint does not have a region prefix.
|
|
155
|
-
enable_self_signed_jwt = @config.endpoint
|
|
156
|
-
|
|
167
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
|
168
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
|
169
|
+
!@config.endpoint.split(".").first.include?("-"))
|
|
157
170
|
credentials ||= Credentials.default scope: @config.scope,
|
|
158
171
|
enable_self_signed_jwt: enable_self_signed_jwt
|
|
159
172
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
|
@@ -167,9 +180,15 @@ module Google
|
|
|
167
180
|
config.credentials = credentials
|
|
168
181
|
config.quota_project = @quota_project_id
|
|
169
182
|
config.endpoint = @config.endpoint
|
|
183
|
+
config.universe_domain = @config.universe_domain
|
|
170
184
|
end
|
|
171
185
|
|
|
172
|
-
@images_stub = ::Google::Cloud::Compute::V1::Images::Rest::ServiceStub.new
|
|
186
|
+
@images_stub = ::Google::Cloud::Compute::V1::Images::Rest::ServiceStub.new(
|
|
187
|
+
endpoint: @config.endpoint,
|
|
188
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
|
189
|
+
universe_domain: @config.universe_domain,
|
|
190
|
+
credentials: credentials
|
|
191
|
+
)
|
|
173
192
|
end
|
|
174
193
|
|
|
175
194
|
##
|
|
@@ -1162,9 +1181,9 @@ module Google
|
|
|
1162
1181
|
# end
|
|
1163
1182
|
#
|
|
1164
1183
|
# @!attribute [rw] endpoint
|
|
1165
|
-
#
|
|
1166
|
-
#
|
|
1167
|
-
# @return [::String]
|
|
1184
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
|
1185
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
|
1186
|
+
# @return [::String,nil]
|
|
1168
1187
|
# @!attribute [rw] credentials
|
|
1169
1188
|
# Credentials to send with calls. You may provide any of the following types:
|
|
1170
1189
|
# * (`String`) The path to a service account key file in JSON format
|
|
@@ -1201,13 +1220,20 @@ module Google
|
|
|
1201
1220
|
# @!attribute [rw] quota_project
|
|
1202
1221
|
# A separate project against which to charge quota.
|
|
1203
1222
|
# @return [::String]
|
|
1223
|
+
# @!attribute [rw] universe_domain
|
|
1224
|
+
# The universe domain within which to make requests. This determines the
|
|
1225
|
+
# default endpoint URL. The default value of nil uses the environment
|
|
1226
|
+
# universe (usually the default "googleapis.com" universe).
|
|
1227
|
+
# @return [::String,nil]
|
|
1204
1228
|
#
|
|
1205
1229
|
class Configuration
|
|
1206
1230
|
extend ::Gapic::Config
|
|
1207
1231
|
|
|
1232
|
+
# @private
|
|
1233
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
|
1208
1234
|
DEFAULT_ENDPOINT = "compute.googleapis.com"
|
|
1209
1235
|
|
|
1210
|
-
config_attr :endpoint,
|
|
1236
|
+
config_attr :endpoint, nil, ::String, nil
|
|
1211
1237
|
config_attr :credentials, nil do |value|
|
|
1212
1238
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
|
1213
1239
|
allowed.any? { |klass| klass === value }
|
|
@@ -1219,6 +1245,7 @@ module Google
|
|
|
1219
1245
|
config_attr :metadata, nil, ::Hash, nil
|
|
1220
1246
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
|
1221
1247
|
config_attr :quota_project, nil, ::String, nil
|
|
1248
|
+
config_attr :universe_domain, nil, ::String, nil
|
|
1222
1249
|
|
|
1223
1250
|
# @private
|
|
1224
1251
|
def initialize parent_config = nil
|
|
@@ -30,16 +30,28 @@ module Google
|
|
|
30
30
|
# including transcoding, making the REST call, and deserialing the response.
|
|
31
31
|
#
|
|
32
32
|
class ServiceStub
|
|
33
|
-
def initialize endpoint:, credentials:
|
|
33
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
|
|
34
34
|
# These require statements are intentionally placed here to initialize
|
|
35
35
|
# the REST modules only when it's required.
|
|
36
36
|
require "gapic/rest"
|
|
37
37
|
|
|
38
|
-
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
|
38
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
|
39
|
+
endpoint_template: endpoint_template,
|
|
40
|
+
universe_domain: universe_domain,
|
|
41
|
+
credentials: credentials,
|
|
39
42
|
numeric_enums: false,
|
|
40
43
|
raise_faraday_errors: false
|
|
41
44
|
end
|
|
42
45
|
|
|
46
|
+
##
|
|
47
|
+
# The effective universe domain
|
|
48
|
+
#
|
|
49
|
+
# @return [String]
|
|
50
|
+
#
|
|
51
|
+
def universe_domain
|
|
52
|
+
@client_stub.universe_domain
|
|
53
|
+
end
|
|
54
|
+
|
|
43
55
|
##
|
|
44
56
|
# Baseline implementation for the delete REST call
|
|
45
57
|
#
|
|
@@ -33,6 +33,9 @@ module Google
|
|
|
33
33
|
# The InstanceGroupManagers API.
|
|
34
34
|
#
|
|
35
35
|
class Client
|
|
36
|
+
# @private
|
|
37
|
+
DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$"
|
|
38
|
+
|
|
36
39
|
# @private
|
|
37
40
|
attr_reader :instance_group_managers_stub
|
|
38
41
|
|
|
@@ -143,6 +146,15 @@ module Google
|
|
|
143
146
|
@config
|
|
144
147
|
end
|
|
145
148
|
|
|
149
|
+
##
|
|
150
|
+
# The effective universe domain
|
|
151
|
+
#
|
|
152
|
+
# @return [String]
|
|
153
|
+
#
|
|
154
|
+
def universe_domain
|
|
155
|
+
@instance_group_managers_stub.universe_domain
|
|
156
|
+
end
|
|
157
|
+
|
|
146
158
|
##
|
|
147
159
|
# Create a new InstanceGroupManagers REST client object.
|
|
148
160
|
#
|
|
@@ -170,8 +182,9 @@ module Google
|
|
|
170
182
|
credentials = @config.credentials
|
|
171
183
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
|
172
184
|
# but only if the default endpoint does not have a region prefix.
|
|
173
|
-
enable_self_signed_jwt = @config.endpoint
|
|
174
|
-
|
|
185
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
|
186
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
|
187
|
+
!@config.endpoint.split(".").first.include?("-"))
|
|
175
188
|
credentials ||= Credentials.default scope: @config.scope,
|
|
176
189
|
enable_self_signed_jwt: enable_self_signed_jwt
|
|
177
190
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
|
@@ -185,9 +198,15 @@ module Google
|
|
|
185
198
|
config.credentials = credentials
|
|
186
199
|
config.quota_project = @quota_project_id
|
|
187
200
|
config.endpoint = @config.endpoint
|
|
201
|
+
config.universe_domain = @config.universe_domain
|
|
188
202
|
end
|
|
189
203
|
|
|
190
|
-
@instance_group_managers_stub = ::Google::Cloud::Compute::V1::InstanceGroupManagers::Rest::ServiceStub.new
|
|
204
|
+
@instance_group_managers_stub = ::Google::Cloud::Compute::V1::InstanceGroupManagers::Rest::ServiceStub.new(
|
|
205
|
+
endpoint: @config.endpoint,
|
|
206
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
|
207
|
+
universe_domain: @config.universe_domain,
|
|
208
|
+
credentials: credentials
|
|
209
|
+
)
|
|
191
210
|
end
|
|
192
211
|
|
|
193
212
|
##
|
|
@@ -2095,9 +2114,9 @@ module Google
|
|
|
2095
2114
|
# end
|
|
2096
2115
|
#
|
|
2097
2116
|
# @!attribute [rw] endpoint
|
|
2098
|
-
#
|
|
2099
|
-
#
|
|
2100
|
-
# @return [::String]
|
|
2117
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
|
2118
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
|
2119
|
+
# @return [::String,nil]
|
|
2101
2120
|
# @!attribute [rw] credentials
|
|
2102
2121
|
# Credentials to send with calls. You may provide any of the following types:
|
|
2103
2122
|
# * (`String`) The path to a service account key file in JSON format
|
|
@@ -2134,13 +2153,20 @@ module Google
|
|
|
2134
2153
|
# @!attribute [rw] quota_project
|
|
2135
2154
|
# A separate project against which to charge quota.
|
|
2136
2155
|
# @return [::String]
|
|
2156
|
+
# @!attribute [rw] universe_domain
|
|
2157
|
+
# The universe domain within which to make requests. This determines the
|
|
2158
|
+
# default endpoint URL. The default value of nil uses the environment
|
|
2159
|
+
# universe (usually the default "googleapis.com" universe).
|
|
2160
|
+
# @return [::String,nil]
|
|
2137
2161
|
#
|
|
2138
2162
|
class Configuration
|
|
2139
2163
|
extend ::Gapic::Config
|
|
2140
2164
|
|
|
2165
|
+
# @private
|
|
2166
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
|
2141
2167
|
DEFAULT_ENDPOINT = "compute.googleapis.com"
|
|
2142
2168
|
|
|
2143
|
-
config_attr :endpoint,
|
|
2169
|
+
config_attr :endpoint, nil, ::String, nil
|
|
2144
2170
|
config_attr :credentials, nil do |value|
|
|
2145
2171
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
|
2146
2172
|
allowed.any? { |klass| klass === value }
|
|
@@ -2152,6 +2178,7 @@ module Google
|
|
|
2152
2178
|
config_attr :metadata, nil, ::Hash, nil
|
|
2153
2179
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
|
2154
2180
|
config_attr :quota_project, nil, ::String, nil
|
|
2181
|
+
config_attr :universe_domain, nil, ::String, nil
|
|
2155
2182
|
|
|
2156
2183
|
# @private
|
|
2157
2184
|
def initialize parent_config = nil
|
|
@@ -30,16 +30,28 @@ module Google
|
|
|
30
30
|
# including transcoding, making the REST call, and deserialing the response.
|
|
31
31
|
#
|
|
32
32
|
class ServiceStub
|
|
33
|
-
def initialize endpoint:, credentials:
|
|
33
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
|
|
34
34
|
# These require statements are intentionally placed here to initialize
|
|
35
35
|
# the REST modules only when it's required.
|
|
36
36
|
require "gapic/rest"
|
|
37
37
|
|
|
38
|
-
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
|
38
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
|
39
|
+
endpoint_template: endpoint_template,
|
|
40
|
+
universe_domain: universe_domain,
|
|
41
|
+
credentials: credentials,
|
|
39
42
|
numeric_enums: false,
|
|
40
43
|
raise_faraday_errors: false
|
|
41
44
|
end
|
|
42
45
|
|
|
46
|
+
##
|
|
47
|
+
# The effective universe domain
|
|
48
|
+
#
|
|
49
|
+
# @return [String]
|
|
50
|
+
#
|
|
51
|
+
def universe_domain
|
|
52
|
+
@client_stub.universe_domain
|
|
53
|
+
end
|
|
54
|
+
|
|
43
55
|
##
|
|
44
56
|
# Baseline implementation for the abandon_instances REST call
|
|
45
57
|
#
|
|
@@ -33,6 +33,9 @@ module Google
|
|
|
33
33
|
# The InstanceGroups API.
|
|
34
34
|
#
|
|
35
35
|
class Client
|
|
36
|
+
# @private
|
|
37
|
+
DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$"
|
|
38
|
+
|
|
36
39
|
# @private
|
|
37
40
|
attr_reader :instance_groups_stub
|
|
38
41
|
|
|
@@ -118,6 +121,15 @@ module Google
|
|
|
118
121
|
@config
|
|
119
122
|
end
|
|
120
123
|
|
|
124
|
+
##
|
|
125
|
+
# The effective universe domain
|
|
126
|
+
#
|
|
127
|
+
# @return [String]
|
|
128
|
+
#
|
|
129
|
+
def universe_domain
|
|
130
|
+
@instance_groups_stub.universe_domain
|
|
131
|
+
end
|
|
132
|
+
|
|
121
133
|
##
|
|
122
134
|
# Create a new InstanceGroups REST client object.
|
|
123
135
|
#
|
|
@@ -145,8 +157,9 @@ module Google
|
|
|
145
157
|
credentials = @config.credentials
|
|
146
158
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
|
147
159
|
# but only if the default endpoint does not have a region prefix.
|
|
148
|
-
enable_self_signed_jwt = @config.endpoint
|
|
149
|
-
|
|
160
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
|
161
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
|
162
|
+
!@config.endpoint.split(".").first.include?("-"))
|
|
150
163
|
credentials ||= Credentials.default scope: @config.scope,
|
|
151
164
|
enable_self_signed_jwt: enable_self_signed_jwt
|
|
152
165
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
|
@@ -160,9 +173,15 @@ module Google
|
|
|
160
173
|
config.credentials = credentials
|
|
161
174
|
config.quota_project = @quota_project_id
|
|
162
175
|
config.endpoint = @config.endpoint
|
|
176
|
+
config.universe_domain = @config.universe_domain
|
|
163
177
|
end
|
|
164
178
|
|
|
165
|
-
@instance_groups_stub = ::Google::Cloud::Compute::V1::InstanceGroups::Rest::ServiceStub.new
|
|
179
|
+
@instance_groups_stub = ::Google::Cloud::Compute::V1::InstanceGroups::Rest::ServiceStub.new(
|
|
180
|
+
endpoint: @config.endpoint,
|
|
181
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
|
182
|
+
universe_domain: @config.universe_domain,
|
|
183
|
+
credentials: credentials
|
|
184
|
+
)
|
|
166
185
|
end
|
|
167
186
|
|
|
168
187
|
##
|
|
@@ -1035,9 +1054,9 @@ module Google
|
|
|
1035
1054
|
# end
|
|
1036
1055
|
#
|
|
1037
1056
|
# @!attribute [rw] endpoint
|
|
1038
|
-
#
|
|
1039
|
-
#
|
|
1040
|
-
# @return [::String]
|
|
1057
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
|
1058
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
|
1059
|
+
# @return [::String,nil]
|
|
1041
1060
|
# @!attribute [rw] credentials
|
|
1042
1061
|
# Credentials to send with calls. You may provide any of the following types:
|
|
1043
1062
|
# * (`String`) The path to a service account key file in JSON format
|
|
@@ -1074,13 +1093,20 @@ module Google
|
|
|
1074
1093
|
# @!attribute [rw] quota_project
|
|
1075
1094
|
# A separate project against which to charge quota.
|
|
1076
1095
|
# @return [::String]
|
|
1096
|
+
# @!attribute [rw] universe_domain
|
|
1097
|
+
# The universe domain within which to make requests. This determines the
|
|
1098
|
+
# default endpoint URL. The default value of nil uses the environment
|
|
1099
|
+
# universe (usually the default "googleapis.com" universe).
|
|
1100
|
+
# @return [::String,nil]
|
|
1077
1101
|
#
|
|
1078
1102
|
class Configuration
|
|
1079
1103
|
extend ::Gapic::Config
|
|
1080
1104
|
|
|
1105
|
+
# @private
|
|
1106
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
|
1081
1107
|
DEFAULT_ENDPOINT = "compute.googleapis.com"
|
|
1082
1108
|
|
|
1083
|
-
config_attr :endpoint,
|
|
1109
|
+
config_attr :endpoint, nil, ::String, nil
|
|
1084
1110
|
config_attr :credentials, nil do |value|
|
|
1085
1111
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
|
1086
1112
|
allowed.any? { |klass| klass === value }
|
|
@@ -1092,6 +1118,7 @@ module Google
|
|
|
1092
1118
|
config_attr :metadata, nil, ::Hash, nil
|
|
1093
1119
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
|
1094
1120
|
config_attr :quota_project, nil, ::String, nil
|
|
1121
|
+
config_attr :universe_domain, nil, ::String, nil
|
|
1095
1122
|
|
|
1096
1123
|
# @private
|
|
1097
1124
|
def initialize parent_config = nil
|
|
@@ -30,16 +30,28 @@ module Google
|
|
|
30
30
|
# including transcoding, making the REST call, and deserialing the response.
|
|
31
31
|
#
|
|
32
32
|
class ServiceStub
|
|
33
|
-
def initialize endpoint:, credentials:
|
|
33
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
|
|
34
34
|
# These require statements are intentionally placed here to initialize
|
|
35
35
|
# the REST modules only when it's required.
|
|
36
36
|
require "gapic/rest"
|
|
37
37
|
|
|
38
|
-
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
|
38
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
|
39
|
+
endpoint_template: endpoint_template,
|
|
40
|
+
universe_domain: universe_domain,
|
|
41
|
+
credentials: credentials,
|
|
39
42
|
numeric_enums: false,
|
|
40
43
|
raise_faraday_errors: false
|
|
41
44
|
end
|
|
42
45
|
|
|
46
|
+
##
|
|
47
|
+
# The effective universe domain
|
|
48
|
+
#
|
|
49
|
+
# @return [String]
|
|
50
|
+
#
|
|
51
|
+
def universe_domain
|
|
52
|
+
@client_stub.universe_domain
|
|
53
|
+
end
|
|
54
|
+
|
|
43
55
|
##
|
|
44
56
|
# Baseline implementation for the add_instances REST call
|
|
45
57
|
#
|
|
@@ -33,6 +33,9 @@ module Google
|
|
|
33
33
|
# The InstanceTemplates API.
|
|
34
34
|
#
|
|
35
35
|
class Client
|
|
36
|
+
# @private
|
|
37
|
+
DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$"
|
|
38
|
+
|
|
36
39
|
# @private
|
|
37
40
|
attr_reader :instance_templates_stub
|
|
38
41
|
|
|
@@ -119,6 +122,15 @@ module Google
|
|
|
119
122
|
@config
|
|
120
123
|
end
|
|
121
124
|
|
|
125
|
+
##
|
|
126
|
+
# The effective universe domain
|
|
127
|
+
#
|
|
128
|
+
# @return [String]
|
|
129
|
+
#
|
|
130
|
+
def universe_domain
|
|
131
|
+
@instance_templates_stub.universe_domain
|
|
132
|
+
end
|
|
133
|
+
|
|
122
134
|
##
|
|
123
135
|
# Create a new InstanceTemplates REST client object.
|
|
124
136
|
#
|
|
@@ -146,8 +158,9 @@ module Google
|
|
|
146
158
|
credentials = @config.credentials
|
|
147
159
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
|
148
160
|
# but only if the default endpoint does not have a region prefix.
|
|
149
|
-
enable_self_signed_jwt = @config.endpoint
|
|
150
|
-
|
|
161
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
|
162
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
|
163
|
+
!@config.endpoint.split(".").first.include?("-"))
|
|
151
164
|
credentials ||= Credentials.default scope: @config.scope,
|
|
152
165
|
enable_self_signed_jwt: enable_self_signed_jwt
|
|
153
166
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
|
@@ -161,9 +174,15 @@ module Google
|
|
|
161
174
|
config.credentials = credentials
|
|
162
175
|
config.quota_project = @quota_project_id
|
|
163
176
|
config.endpoint = @config.endpoint
|
|
177
|
+
config.universe_domain = @config.universe_domain
|
|
164
178
|
end
|
|
165
179
|
|
|
166
|
-
@instance_templates_stub = ::Google::Cloud::Compute::V1::InstanceTemplates::Rest::ServiceStub.new
|
|
180
|
+
@instance_templates_stub = ::Google::Cloud::Compute::V1::InstanceTemplates::Rest::ServiceStub.new(
|
|
181
|
+
endpoint: @config.endpoint,
|
|
182
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
|
183
|
+
universe_domain: @config.universe_domain,
|
|
184
|
+
credentials: credentials
|
|
185
|
+
)
|
|
167
186
|
end
|
|
168
187
|
|
|
169
188
|
##
|
|
@@ -892,9 +911,9 @@ module Google
|
|
|
892
911
|
# end
|
|
893
912
|
#
|
|
894
913
|
# @!attribute [rw] endpoint
|
|
895
|
-
#
|
|
896
|
-
#
|
|
897
|
-
# @return [::String]
|
|
914
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
|
915
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
|
916
|
+
# @return [::String,nil]
|
|
898
917
|
# @!attribute [rw] credentials
|
|
899
918
|
# Credentials to send with calls. You may provide any of the following types:
|
|
900
919
|
# * (`String`) The path to a service account key file in JSON format
|
|
@@ -931,13 +950,20 @@ module Google
|
|
|
931
950
|
# @!attribute [rw] quota_project
|
|
932
951
|
# A separate project against which to charge quota.
|
|
933
952
|
# @return [::String]
|
|
953
|
+
# @!attribute [rw] universe_domain
|
|
954
|
+
# The universe domain within which to make requests. This determines the
|
|
955
|
+
# default endpoint URL. The default value of nil uses the environment
|
|
956
|
+
# universe (usually the default "googleapis.com" universe).
|
|
957
|
+
# @return [::String,nil]
|
|
934
958
|
#
|
|
935
959
|
class Configuration
|
|
936
960
|
extend ::Gapic::Config
|
|
937
961
|
|
|
962
|
+
# @private
|
|
963
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
|
938
964
|
DEFAULT_ENDPOINT = "compute.googleapis.com"
|
|
939
965
|
|
|
940
|
-
config_attr :endpoint,
|
|
966
|
+
config_attr :endpoint, nil, ::String, nil
|
|
941
967
|
config_attr :credentials, nil do |value|
|
|
942
968
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
|
943
969
|
allowed.any? { |klass| klass === value }
|
|
@@ -949,6 +975,7 @@ module Google
|
|
|
949
975
|
config_attr :metadata, nil, ::Hash, nil
|
|
950
976
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
|
951
977
|
config_attr :quota_project, nil, ::String, nil
|
|
978
|
+
config_attr :universe_domain, nil, ::String, nil
|
|
952
979
|
|
|
953
980
|
# @private
|
|
954
981
|
def initialize parent_config = nil
|
|
@@ -30,16 +30,28 @@ module Google
|
|
|
30
30
|
# including transcoding, making the REST call, and deserialing the response.
|
|
31
31
|
#
|
|
32
32
|
class ServiceStub
|
|
33
|
-
def initialize endpoint:, credentials:
|
|
33
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
|
|
34
34
|
# These require statements are intentionally placed here to initialize
|
|
35
35
|
# the REST modules only when it's required.
|
|
36
36
|
require "gapic/rest"
|
|
37
37
|
|
|
38
|
-
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
|
38
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
|
39
|
+
endpoint_template: endpoint_template,
|
|
40
|
+
universe_domain: universe_domain,
|
|
41
|
+
credentials: credentials,
|
|
39
42
|
numeric_enums: false,
|
|
40
43
|
raise_faraday_errors: false
|
|
41
44
|
end
|
|
42
45
|
|
|
46
|
+
##
|
|
47
|
+
# The effective universe domain
|
|
48
|
+
#
|
|
49
|
+
# @return [String]
|
|
50
|
+
#
|
|
51
|
+
def universe_domain
|
|
52
|
+
@client_stub.universe_domain
|
|
53
|
+
end
|
|
54
|
+
|
|
43
55
|
##
|
|
44
56
|
# Baseline implementation for the aggregated_list REST call
|
|
45
57
|
#
|