google-cloud-ai_platform-v1 0.35.0 → 0.37.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (186) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +72 -99
  3. data/README.md +1 -1
  4. data/lib/google/cloud/ai_platform/v1/dataset_service/client.rb +43 -17
  5. data/lib/google/cloud/ai_platform/v1/dataset_service/operations.rb +28 -6
  6. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/client.rb +896 -0
  7. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/credentials.rb +47 -0
  8. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/operations.rb +809 -0
  9. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/paths.rb +83 -0
  10. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service.rb +50 -0
  11. data/lib/google/cloud/ai_platform/v1/endpoint_service/client.rb +43 -17
  12. data/lib/google/cloud/ai_platform/v1/endpoint_service/operations.rb +28 -6
  13. data/lib/google/cloud/ai_platform/v1/endpoint_service/paths.rb +19 -0
  14. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/client.rb +46 -18
  15. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/operations.rb +28 -6
  16. data/lib/google/cloud/ai_platform/v1/feature_online_store_service/client.rb +146 -17
  17. data/lib/google/cloud/ai_platform/v1/feature_online_store_service.rb +2 -0
  18. data/lib/google/cloud/ai_platform/v1/feature_registry_service/client.rb +44 -18
  19. data/lib/google/cloud/ai_platform/v1/feature_registry_service/operations.rb +28 -6
  20. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/client.rb +42 -17
  21. data/lib/google/cloud/ai_platform/v1/featurestore_service/client.rb +44 -18
  22. data/lib/google/cloud/ai_platform/v1/featurestore_service/operations.rb +28 -6
  23. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/client.rb +43 -17
  24. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/operations.rb +28 -6
  25. data/lib/google/cloud/ai_platform/v1/index_service/client.rb +52 -18
  26. data/lib/google/cloud/ai_platform/v1/index_service/operations.rb +28 -6
  27. data/lib/google/cloud/ai_platform/v1/job_service/client.rb +43 -17
  28. data/lib/google/cloud/ai_platform/v1/job_service/operations.rb +28 -6
  29. data/lib/google/cloud/ai_platform/v1/llm_utility_service/client.rb +49 -18
  30. data/lib/google/cloud/ai_platform/v1/match_service/client.rb +42 -17
  31. data/lib/google/cloud/ai_platform/v1/metadata_service/client.rb +43 -17
  32. data/lib/google/cloud/ai_platform/v1/metadata_service/operations.rb +28 -6
  33. data/lib/google/cloud/ai_platform/v1/migration_service/client.rb +43 -17
  34. data/lib/google/cloud/ai_platform/v1/migration_service/operations.rb +28 -6
  35. data/lib/google/cloud/ai_platform/v1/model_garden_service/client.rb +42 -17
  36. data/lib/google/cloud/ai_platform/v1/model_service/client.rb +47 -21
  37. data/lib/google/cloud/ai_platform/v1/model_service/operations.rb +28 -6
  38. data/lib/google/cloud/ai_platform/v1/pipeline_service/client.rb +43 -17
  39. data/lib/google/cloud/ai_platform/v1/pipeline_service/operations.rb +28 -6
  40. data/lib/google/cloud/ai_platform/v1/prediction_service/client.rb +544 -20
  41. data/lib/google/cloud/ai_platform/v1/schedule_service/client.rb +43 -17
  42. data/lib/google/cloud/ai_platform/v1/schedule_service/operations.rb +28 -6
  43. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/client.rb +43 -17
  44. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/operations.rb +28 -6
  45. data/lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb +43 -17
  46. data/lib/google/cloud/ai_platform/v1/tensorboard_service/operations.rb +28 -6
  47. data/lib/google/cloud/ai_platform/v1/version.rb +1 -1
  48. data/lib/google/cloud/ai_platform/v1/vizier_service/client.rb +43 -17
  49. data/lib/google/cloud/ai_platform/v1/vizier_service/operations.rb +28 -6
  50. data/lib/google/cloud/ai_platform/v1.rb +1 -0
  51. data/lib/google/cloud/aiplatform/v1/accelerator_type_pb.rb +1 -1
  52. data/lib/google/cloud/aiplatform/v1/annotation_pb.rb +1 -1
  53. data/lib/google/cloud/aiplatform/v1/annotation_spec_pb.rb +1 -1
  54. data/lib/google/cloud/aiplatform/v1/artifact_pb.rb +1 -1
  55. data/lib/google/cloud/aiplatform/v1/batch_prediction_job_pb.rb +1 -1
  56. data/lib/google/cloud/aiplatform/v1/completion_stats_pb.rb +1 -1
  57. data/lib/google/cloud/aiplatform/v1/content_pb.rb +64 -0
  58. data/lib/google/cloud/aiplatform/v1/context_pb.rb +1 -1
  59. data/lib/google/cloud/aiplatform/v1/custom_job_pb.rb +2 -2
  60. data/lib/google/cloud/aiplatform/v1/data_item_pb.rb +1 -1
  61. data/lib/google/cloud/aiplatform/v1/data_labeling_job_pb.rb +1 -1
  62. data/lib/google/cloud/aiplatform/v1/dataset_pb.rb +4 -2
  63. data/lib/google/cloud/aiplatform/v1/dataset_service_pb.rb +4 -2
  64. data/lib/google/cloud/aiplatform/v1/dataset_version_pb.rb +1 -1
  65. data/lib/google/cloud/aiplatform/v1/deployed_index_ref_pb.rb +2 -2
  66. data/lib/google/cloud/aiplatform/v1/deployed_model_ref_pb.rb +1 -1
  67. data/lib/google/cloud/aiplatform/v1/deployment_resource_pool_pb.rb +49 -0
  68. data/lib/google/cloud/aiplatform/v1/deployment_resource_pool_service_pb.rb +65 -0
  69. data/lib/google/cloud/aiplatform/v1/deployment_resource_pool_service_services_pb.rb +53 -0
  70. data/lib/google/cloud/aiplatform/v1/encryption_spec_pb.rb +1 -1
  71. data/lib/google/cloud/aiplatform/v1/endpoint_pb.rb +2 -2
  72. data/lib/google/cloud/aiplatform/v1/endpoint_service_pb.rb +2 -2
  73. data/lib/google/cloud/aiplatform/v1/entity_type_pb.rb +1 -1
  74. data/lib/google/cloud/aiplatform/v1/env_var_pb.rb +1 -1
  75. data/lib/google/cloud/aiplatform/v1/evaluated_annotation_pb.rb +1 -1
  76. data/lib/google/cloud/aiplatform/v1/event_pb.rb +1 -1
  77. data/lib/google/cloud/aiplatform/v1/execution_pb.rb +1 -1
  78. data/lib/google/cloud/aiplatform/v1/explanation_metadata_pb.rb +1 -1
  79. data/lib/google/cloud/aiplatform/v1/explanation_pb.rb +1 -1
  80. data/lib/google/cloud/aiplatform/v1/feature_group_pb.rb +2 -2
  81. data/lib/google/cloud/aiplatform/v1/feature_monitoring_stats_pb.rb +1 -1
  82. data/lib/google/cloud/aiplatform/v1/feature_online_store_admin_service_pb.rb +2 -2
  83. data/lib/google/cloud/aiplatform/v1/feature_online_store_pb.rb +2 -2
  84. data/lib/google/cloud/aiplatform/v1/feature_online_store_service_pb.rb +11 -2
  85. data/lib/google/cloud/aiplatform/v1/feature_online_store_service_services_pb.rb +5 -0
  86. data/lib/google/cloud/aiplatform/v1/feature_pb.rb +2 -2
  87. data/lib/google/cloud/aiplatform/v1/feature_registry_service_pb.rb +2 -2
  88. data/lib/google/cloud/aiplatform/v1/feature_selector_pb.rb +1 -1
  89. data/lib/google/cloud/aiplatform/v1/feature_view_pb.rb +2 -2
  90. data/lib/google/cloud/aiplatform/v1/feature_view_sync_pb.rb +2 -2
  91. data/lib/google/cloud/aiplatform/v1/featurestore_monitoring_pb.rb +1 -1
  92. data/lib/google/cloud/aiplatform/v1/featurestore_online_service_pb.rb +2 -2
  93. data/lib/google/cloud/aiplatform/v1/featurestore_pb.rb +1 -1
  94. data/lib/google/cloud/aiplatform/v1/featurestore_service_pb.rb +2 -2
  95. data/lib/google/cloud/aiplatform/v1/hyperparameter_tuning_job_pb.rb +1 -1
  96. data/lib/google/cloud/aiplatform/v1/index_endpoint_pb.rb +2 -2
  97. data/lib/google/cloud/aiplatform/v1/index_endpoint_service_pb.rb +2 -2
  98. data/lib/google/cloud/aiplatform/v1/index_pb.rb +1 -1
  99. data/lib/google/cloud/aiplatform/v1/index_service_pb.rb +2 -2
  100. data/lib/google/cloud/aiplatform/v1/io_pb.rb +1 -1
  101. data/lib/google/cloud/aiplatform/v1/job_service_pb.rb +2 -2
  102. data/lib/google/cloud/aiplatform/v1/job_state_pb.rb +1 -1
  103. data/lib/google/cloud/aiplatform/v1/lineage_subgraph_pb.rb +1 -1
  104. data/lib/google/cloud/aiplatform/v1/llm_utility_service_pb.rb +2 -2
  105. data/lib/google/cloud/aiplatform/v1/machine_resources_pb.rb +1 -1
  106. data/lib/google/cloud/aiplatform/v1/manual_batch_tuning_parameters_pb.rb +1 -1
  107. data/lib/google/cloud/aiplatform/v1/match_service_pb.rb +1 -1
  108. data/lib/google/cloud/aiplatform/v1/metadata_schema_pb.rb +1 -1
  109. data/lib/google/cloud/aiplatform/v1/metadata_service_pb.rb +2 -2
  110. data/lib/google/cloud/aiplatform/v1/metadata_store_pb.rb +1 -1
  111. data/lib/google/cloud/aiplatform/v1/migratable_resource_pb.rb +1 -1
  112. data/lib/google/cloud/aiplatform/v1/migration_service_pb.rb +2 -2
  113. data/lib/google/cloud/aiplatform/v1/model_deployment_monitoring_job_pb.rb +2 -2
  114. data/lib/google/cloud/aiplatform/v1/model_evaluation_pb.rb +1 -1
  115. data/lib/google/cloud/aiplatform/v1/model_evaluation_slice_pb.rb +1 -1
  116. data/lib/google/cloud/aiplatform/v1/model_garden_service_pb.rb +2 -2
  117. data/lib/google/cloud/aiplatform/v1/model_monitoring_pb.rb +1 -1
  118. data/lib/google/cloud/aiplatform/v1/model_pb.rb +3 -2
  119. data/lib/google/cloud/aiplatform/v1/model_service_pb.rb +2 -2
  120. data/lib/google/cloud/aiplatform/v1/nas_job_pb.rb +1 -1
  121. data/lib/google/cloud/aiplatform/v1/openapi_pb.rb +47 -0
  122. data/lib/google/cloud/aiplatform/v1/operation_pb.rb +1 -1
  123. data/lib/google/cloud/aiplatform/v1/pipeline_failure_policy_pb.rb +1 -1
  124. data/lib/google/cloud/aiplatform/v1/pipeline_job_pb.rb +1 -1
  125. data/lib/google/cloud/aiplatform/v1/pipeline_service_pb.rb +2 -2
  126. data/lib/google/cloud/aiplatform/v1/pipeline_state_pb.rb +1 -1
  127. data/lib/google/cloud/aiplatform/v1/prediction_service_pb.rb +16 -2
  128. data/lib/google/cloud/aiplatform/v1/prediction_service_services_pb.rb +16 -3
  129. data/lib/google/cloud/aiplatform/v1/publisher_model_pb.rb +6 -2
  130. data/lib/google/cloud/aiplatform/v1/saved_query_pb.rb +1 -1
  131. data/lib/google/cloud/aiplatform/v1/schedule_pb.rb +1 -1
  132. data/lib/google/cloud/aiplatform/v1/schedule_service_pb.rb +2 -2
  133. data/lib/google/cloud/aiplatform/v1/service_networking_pb.rb +4 -2
  134. data/lib/google/cloud/aiplatform/v1/specialist_pool_pb.rb +1 -1
  135. data/lib/google/cloud/aiplatform/v1/specialist_pool_service_pb.rb +2 -2
  136. data/lib/google/cloud/aiplatform/v1/study_pb.rb +1 -1
  137. data/lib/google/cloud/aiplatform/v1/tensorboard_data_pb.rb +1 -1
  138. data/lib/google/cloud/aiplatform/v1/tensorboard_experiment_pb.rb +1 -1
  139. data/lib/google/cloud/aiplatform/v1/tensorboard_pb.rb +1 -1
  140. data/lib/google/cloud/aiplatform/v1/tensorboard_run_pb.rb +1 -1
  141. data/lib/google/cloud/aiplatform/v1/tensorboard_service_pb.rb +2 -2
  142. data/lib/google/cloud/aiplatform/v1/tensorboard_time_series_pb.rb +1 -1
  143. data/lib/google/cloud/aiplatform/v1/tool_pb.rb +51 -0
  144. data/lib/google/cloud/aiplatform/v1/training_pipeline_pb.rb +1 -1
  145. data/lib/google/cloud/aiplatform/v1/types_pb.rb +1 -1
  146. data/lib/google/cloud/aiplatform/v1/unmanaged_container_model_pb.rb +1 -1
  147. data/lib/google/cloud/aiplatform/v1/user_action_reference_pb.rb +1 -1
  148. data/lib/google/cloud/aiplatform/v1/value_pb.rb +1 -1
  149. data/lib/google/cloud/aiplatform/v1/vizier_service_pb.rb +2 -2
  150. data/proto_docs/google/api/client.rb +1 -0
  151. data/proto_docs/google/cloud/aiplatform/v1/batch_prediction_job.rb +2 -2
  152. data/proto_docs/google/cloud/aiplatform/v1/content.rb +312 -0
  153. data/proto_docs/google/cloud/aiplatform/v1/custom_job.rb +15 -0
  154. data/proto_docs/google/cloud/aiplatform/v1/dataset.rb +102 -0
  155. data/proto_docs/google/cloud/aiplatform/v1/dataset_service.rb +12 -1
  156. data/proto_docs/google/cloud/aiplatform/v1/deployed_index_ref.rb +3 -0
  157. data/proto_docs/google/cloud/aiplatform/v1/deployment_resource_pool.rb +45 -0
  158. data/proto_docs/google/cloud/aiplatform/v1/deployment_resource_pool_service.rb +170 -0
  159. data/proto_docs/google/cloud/aiplatform/v1/endpoint.rb +6 -0
  160. data/proto_docs/google/cloud/aiplatform/v1/explanation.rb +8 -0
  161. data/proto_docs/google/cloud/aiplatform/v1/feature.rb +5 -1
  162. data/proto_docs/google/cloud/aiplatform/v1/feature_group.rb +2 -2
  163. data/proto_docs/google/cloud/aiplatform/v1/feature_online_store.rb +2 -2
  164. data/proto_docs/google/cloud/aiplatform/v1/feature_online_store_admin_service.rb +3 -1
  165. data/proto_docs/google/cloud/aiplatform/v1/feature_online_store_service.rb +150 -0
  166. data/proto_docs/google/cloud/aiplatform/v1/feature_view.rb +3 -2
  167. data/proto_docs/google/cloud/aiplatform/v1/feature_view_sync.rb +2 -2
  168. data/proto_docs/google/cloud/aiplatform/v1/featurestore_service.rb +1 -1
  169. data/proto_docs/google/cloud/aiplatform/v1/index_endpoint.rb +5 -0
  170. data/proto_docs/google/cloud/aiplatform/v1/index_service.rb +28 -0
  171. data/proto_docs/google/cloud/aiplatform/v1/metadata_service.rb +1 -0
  172. data/proto_docs/google/cloud/aiplatform/v1/model.rb +55 -4
  173. data/proto_docs/google/cloud/aiplatform/v1/model_deployment_monitoring_job.rb +4 -0
  174. data/proto_docs/google/cloud/aiplatform/v1/model_evaluation.rb +1 -1
  175. data/proto_docs/google/cloud/aiplatform/v1/model_monitoring.rb +1 -0
  176. data/proto_docs/google/cloud/aiplatform/v1/model_service.rb +4 -4
  177. data/proto_docs/google/cloud/aiplatform/v1/nas_job.rb +1 -0
  178. data/proto_docs/google/cloud/aiplatform/v1/openapi.rb +102 -0
  179. data/proto_docs/google/cloud/aiplatform/v1/pipeline_job.rb +1 -0
  180. data/proto_docs/google/cloud/aiplatform/v1/prediction_service.rb +195 -0
  181. data/proto_docs/google/cloud/aiplatform/v1/publisher_model.rb +73 -1
  182. data/proto_docs/google/cloud/aiplatform/v1/service_networking.rb +16 -0
  183. data/proto_docs/google/cloud/aiplatform/v1/tool.rb +112 -0
  184. data/proto_docs/google/protobuf/any.rb +2 -1
  185. data/proto_docs/google/type/date.rb +53 -0
  186. metadata +27 -122
@@ -26,6 +26,9 @@ module Google
26
26
  module MetadataService
27
27
  # Service that implements Longrunning Operations API.
28
28
  class Operations
29
+ # @private
30
+ DEFAULT_ENDPOINT_TEMPLATE = "aiplatform.$UNIVERSE_DOMAIN$"
31
+
29
32
  # @private
30
33
  attr_reader :operations_stub
31
34
 
@@ -60,6 +63,15 @@ module Google
60
63
  @config
61
64
  end
62
65
 
66
+ ##
67
+ # The effective universe domain
68
+ #
69
+ # @return [String]
70
+ #
71
+ def universe_domain
72
+ @operations_stub.universe_domain
73
+ end
74
+
63
75
  ##
64
76
  # Create a new Operations client object.
65
77
  #
@@ -90,8 +102,10 @@ module Google
90
102
 
91
103
  @operations_stub = ::Gapic::ServiceStub.new(
92
104
  ::Google::Longrunning::Operations::Stub,
93
- credentials: credentials,
94
- endpoint: @config.endpoint,
105
+ credentials: credentials,
106
+ endpoint: @config.endpoint,
107
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
108
+ universe_domain: @config.universe_domain,
95
109
  channel_args: @config.channel_args,
96
110
  interceptors: @config.interceptors,
97
111
  channel_pool_config: @config.channel_pool
@@ -621,9 +635,9 @@ module Google
621
635
  # end
622
636
  #
623
637
  # @!attribute [rw] endpoint
624
- # The hostname or hostname:port of the service endpoint.
625
- # Defaults to `"aiplatform.googleapis.com"`.
626
- # @return [::String]
638
+ # A custom service endpoint, as a hostname or hostname:port. The default is
639
+ # nil, indicating to use the default endpoint in the current universe domain.
640
+ # @return [::String,nil]
627
641
  # @!attribute [rw] credentials
628
642
  # Credentials to send with calls. You may provide any of the following types:
629
643
  # * (`String`) The path to a service account key file in JSON format
@@ -669,13 +683,20 @@ module Google
669
683
  # @!attribute [rw] quota_project
670
684
  # A separate project against which to charge quota.
671
685
  # @return [::String]
686
+ # @!attribute [rw] universe_domain
687
+ # The universe domain within which to make requests. This determines the
688
+ # default endpoint URL. The default value of nil uses the environment
689
+ # universe (usually the default "googleapis.com" universe).
690
+ # @return [::String,nil]
672
691
  #
673
692
  class Configuration
674
693
  extend ::Gapic::Config
675
694
 
695
+ # @private
696
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
676
697
  DEFAULT_ENDPOINT = "aiplatform.googleapis.com"
677
698
 
678
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
699
+ config_attr :endpoint, nil, ::String, nil
679
700
  config_attr :credentials, nil do |value|
680
701
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
681
702
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -690,6 +711,7 @@ module Google
690
711
  config_attr :metadata, nil, ::Hash, nil
691
712
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
692
713
  config_attr :quota_project, nil, ::String, nil
714
+ config_attr :universe_domain, nil, ::String, nil
693
715
 
694
716
  # @private
695
717
  def initialize parent_config = nil
@@ -33,6 +33,9 @@ module Google
33
33
  # datalabeling.googleapis.com and ml.googleapis.com to Vertex AI.
34
34
  #
35
35
  class Client
36
+ # @private
37
+ DEFAULT_ENDPOINT_TEMPLATE = "aiplatform.$UNIVERSE_DOMAIN$"
38
+
36
39
  include Paths
37
40
 
38
41
  # @private
@@ -93,6 +96,15 @@ module Google
93
96
  @config
94
97
  end
95
98
 
99
+ ##
100
+ # The effective universe domain
101
+ #
102
+ # @return [String]
103
+ #
104
+ def universe_domain
105
+ @migration_service_stub.universe_domain
106
+ end
107
+
96
108
  ##
97
109
  # Create a new MigrationService client object.
98
110
  #
@@ -126,8 +138,9 @@ module Google
126
138
  credentials = @config.credentials
127
139
  # Use self-signed JWT if the endpoint is unchanged from default,
128
140
  # but only if the default endpoint does not have a region prefix.
129
- enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
130
- !@config.endpoint.split(".").first.include?("-")
141
+ enable_self_signed_jwt = @config.endpoint.nil? ||
142
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
143
+ !@config.endpoint.split(".").first.include?("-"))
131
144
  credentials ||= Credentials.default scope: @config.scope,
132
145
  enable_self_signed_jwt: enable_self_signed_jwt
133
146
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
@@ -140,28 +153,33 @@ module Google
140
153
  config.credentials = credentials
141
154
  config.quota_project = @quota_project_id
142
155
  config.endpoint = @config.endpoint
156
+ config.universe_domain = @config.universe_domain
143
157
  end
144
158
 
159
+ @migration_service_stub = ::Gapic::ServiceStub.new(
160
+ ::Google::Cloud::AIPlatform::V1::MigrationService::Stub,
161
+ credentials: credentials,
162
+ endpoint: @config.endpoint,
163
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
164
+ universe_domain: @config.universe_domain,
165
+ channel_args: @config.channel_args,
166
+ interceptors: @config.interceptors,
167
+ channel_pool_config: @config.channel_pool
168
+ )
169
+
145
170
  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
146
171
  config.credentials = credentials
147
172
  config.quota_project = @quota_project_id
148
- config.endpoint = @config.endpoint
173
+ config.endpoint = @migration_service_stub.endpoint
174
+ config.universe_domain = @migration_service_stub.universe_domain
149
175
  end
150
176
 
151
177
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
152
178
  config.credentials = credentials
153
179
  config.quota_project = @quota_project_id
154
- config.endpoint = @config.endpoint
180
+ config.endpoint = @migration_service_stub.endpoint
181
+ config.universe_domain = @migration_service_stub.universe_domain
155
182
  end
156
-
157
- @migration_service_stub = ::Gapic::ServiceStub.new(
158
- ::Google::Cloud::AIPlatform::V1::MigrationService::Stub,
159
- credentials: credentials,
160
- endpoint: @config.endpoint,
161
- channel_args: @config.channel_args,
162
- interceptors: @config.interceptors,
163
- channel_pool_config: @config.channel_pool
164
- )
165
183
  end
166
184
 
167
185
  ##
@@ -429,9 +447,9 @@ module Google
429
447
  # end
430
448
  #
431
449
  # @!attribute [rw] endpoint
432
- # The hostname or hostname:port of the service endpoint.
433
- # Defaults to `"aiplatform.googleapis.com"`.
434
- # @return [::String]
450
+ # A custom service endpoint, as a hostname or hostname:port. The default is
451
+ # nil, indicating to use the default endpoint in the current universe domain.
452
+ # @return [::String,nil]
435
453
  # @!attribute [rw] credentials
436
454
  # Credentials to send with calls. You may provide any of the following types:
437
455
  # * (`String`) The path to a service account key file in JSON format
@@ -477,13 +495,20 @@ module Google
477
495
  # @!attribute [rw] quota_project
478
496
  # A separate project against which to charge quota.
479
497
  # @return [::String]
498
+ # @!attribute [rw] universe_domain
499
+ # The universe domain within which to make requests. This determines the
500
+ # default endpoint URL. The default value of nil uses the environment
501
+ # universe (usually the default "googleapis.com" universe).
502
+ # @return [::String,nil]
480
503
  #
481
504
  class Configuration
482
505
  extend ::Gapic::Config
483
506
 
507
+ # @private
508
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
484
509
  DEFAULT_ENDPOINT = "aiplatform.googleapis.com"
485
510
 
486
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
511
+ config_attr :endpoint, nil, ::String, nil
487
512
  config_attr :credentials, nil do |value|
488
513
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
489
514
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -498,6 +523,7 @@ module Google
498
523
  config_attr :metadata, nil, ::Hash, nil
499
524
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
500
525
  config_attr :quota_project, nil, ::String, nil
526
+ config_attr :universe_domain, nil, ::String, nil
501
527
 
502
528
  # @private
503
529
  def initialize parent_config = nil
@@ -26,6 +26,9 @@ module Google
26
26
  module MigrationService
27
27
  # Service that implements Longrunning Operations API.
28
28
  class Operations
29
+ # @private
30
+ DEFAULT_ENDPOINT_TEMPLATE = "aiplatform.$UNIVERSE_DOMAIN$"
31
+
29
32
  # @private
30
33
  attr_reader :operations_stub
31
34
 
@@ -60,6 +63,15 @@ module Google
60
63
  @config
61
64
  end
62
65
 
66
+ ##
67
+ # The effective universe domain
68
+ #
69
+ # @return [String]
70
+ #
71
+ def universe_domain
72
+ @operations_stub.universe_domain
73
+ end
74
+
63
75
  ##
64
76
  # Create a new Operations client object.
65
77
  #
@@ -90,8 +102,10 @@ module Google
90
102
 
91
103
  @operations_stub = ::Gapic::ServiceStub.new(
92
104
  ::Google::Longrunning::Operations::Stub,
93
- credentials: credentials,
94
- endpoint: @config.endpoint,
105
+ credentials: credentials,
106
+ endpoint: @config.endpoint,
107
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
108
+ universe_domain: @config.universe_domain,
95
109
  channel_args: @config.channel_args,
96
110
  interceptors: @config.interceptors,
97
111
  channel_pool_config: @config.channel_pool
@@ -621,9 +635,9 @@ module Google
621
635
  # end
622
636
  #
623
637
  # @!attribute [rw] endpoint
624
- # The hostname or hostname:port of the service endpoint.
625
- # Defaults to `"aiplatform.googleapis.com"`.
626
- # @return [::String]
638
+ # A custom service endpoint, as a hostname or hostname:port. The default is
639
+ # nil, indicating to use the default endpoint in the current universe domain.
640
+ # @return [::String,nil]
627
641
  # @!attribute [rw] credentials
628
642
  # Credentials to send with calls. You may provide any of the following types:
629
643
  # * (`String`) The path to a service account key file in JSON format
@@ -669,13 +683,20 @@ module Google
669
683
  # @!attribute [rw] quota_project
670
684
  # A separate project against which to charge quota.
671
685
  # @return [::String]
686
+ # @!attribute [rw] universe_domain
687
+ # The universe domain within which to make requests. This determines the
688
+ # default endpoint URL. The default value of nil uses the environment
689
+ # universe (usually the default "googleapis.com" universe).
690
+ # @return [::String,nil]
672
691
  #
673
692
  class Configuration
674
693
  extend ::Gapic::Config
675
694
 
695
+ # @private
696
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
676
697
  DEFAULT_ENDPOINT = "aiplatform.googleapis.com"
677
698
 
678
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
699
+ config_attr :endpoint, nil, ::String, nil
679
700
  config_attr :credentials, nil do |value|
680
701
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
681
702
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -690,6 +711,7 @@ module Google
690
711
  config_attr :metadata, nil, ::Hash, nil
691
712
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
692
713
  config_attr :quota_project, nil, ::String, nil
714
+ config_attr :universe_domain, nil, ::String, nil
693
715
 
694
716
  # @private
695
717
  def initialize parent_config = nil
@@ -32,6 +32,9 @@ module Google
32
32
  # The interface of Model Garden Service.
33
33
  #
34
34
  class Client
35
+ # @private
36
+ DEFAULT_ENDPOINT_TEMPLATE = "aiplatform.$UNIVERSE_DOMAIN$"
37
+
35
38
  include Paths
36
39
 
37
40
  # @private
@@ -92,6 +95,15 @@ module Google
92
95
  @config
93
96
  end
94
97
 
98
+ ##
99
+ # The effective universe domain
100
+ #
101
+ # @return [String]
102
+ #
103
+ def universe_domain
104
+ @model_garden_service_stub.universe_domain
105
+ end
106
+
95
107
  ##
96
108
  # Create a new ModelGardenService client object.
97
109
  #
@@ -125,8 +137,9 @@ module Google
125
137
  credentials = @config.credentials
126
138
  # Use self-signed JWT if the endpoint is unchanged from default,
127
139
  # but only if the default endpoint does not have a region prefix.
128
- enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
129
- !@config.endpoint.split(".").first.include?("-")
140
+ enable_self_signed_jwt = @config.endpoint.nil? ||
141
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
142
+ !@config.endpoint.split(".").first.include?("-"))
130
143
  credentials ||= Credentials.default scope: @config.scope,
131
144
  enable_self_signed_jwt: enable_self_signed_jwt
132
145
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
@@ -135,26 +148,30 @@ module Google
135
148
  @quota_project_id = @config.quota_project
136
149
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
137
150
 
151
+ @model_garden_service_stub = ::Gapic::ServiceStub.new(
152
+ ::Google::Cloud::AIPlatform::V1::ModelGardenService::Stub,
153
+ credentials: credentials,
154
+ endpoint: @config.endpoint,
155
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
156
+ universe_domain: @config.universe_domain,
157
+ channel_args: @config.channel_args,
158
+ interceptors: @config.interceptors,
159
+ channel_pool_config: @config.channel_pool
160
+ )
161
+
138
162
  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
139
163
  config.credentials = credentials
140
164
  config.quota_project = @quota_project_id
141
- config.endpoint = @config.endpoint
165
+ config.endpoint = @model_garden_service_stub.endpoint
166
+ config.universe_domain = @model_garden_service_stub.universe_domain
142
167
  end
143
168
 
144
169
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
145
170
  config.credentials = credentials
146
171
  config.quota_project = @quota_project_id
147
- config.endpoint = @config.endpoint
172
+ config.endpoint = @model_garden_service_stub.endpoint
173
+ config.universe_domain = @model_garden_service_stub.universe_domain
148
174
  end
149
-
150
- @model_garden_service_stub = ::Gapic::ServiceStub.new(
151
- ::Google::Cloud::AIPlatform::V1::ModelGardenService::Stub,
152
- credentials: credentials,
153
- endpoint: @config.endpoint,
154
- channel_args: @config.channel_args,
155
- interceptors: @config.interceptors,
156
- channel_pool_config: @config.channel_pool
157
- )
158
175
  end
159
176
 
160
177
  ##
@@ -295,9 +312,9 @@ module Google
295
312
  # end
296
313
  #
297
314
  # @!attribute [rw] endpoint
298
- # The hostname or hostname:port of the service endpoint.
299
- # Defaults to `"aiplatform.googleapis.com"`.
300
- # @return [::String]
315
+ # A custom service endpoint, as a hostname or hostname:port. The default is
316
+ # nil, indicating to use the default endpoint in the current universe domain.
317
+ # @return [::String,nil]
301
318
  # @!attribute [rw] credentials
302
319
  # Credentials to send with calls. You may provide any of the following types:
303
320
  # * (`String`) The path to a service account key file in JSON format
@@ -343,13 +360,20 @@ module Google
343
360
  # @!attribute [rw] quota_project
344
361
  # A separate project against which to charge quota.
345
362
  # @return [::String]
363
+ # @!attribute [rw] universe_domain
364
+ # The universe domain within which to make requests. This determines the
365
+ # default endpoint URL. The default value of nil uses the environment
366
+ # universe (usually the default "googleapis.com" universe).
367
+ # @return [::String,nil]
346
368
  #
347
369
  class Configuration
348
370
  extend ::Gapic::Config
349
371
 
372
+ # @private
373
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
350
374
  DEFAULT_ENDPOINT = "aiplatform.googleapis.com"
351
375
 
352
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
376
+ config_attr :endpoint, nil, ::String, nil
353
377
  config_attr :credentials, nil do |value|
354
378
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
355
379
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -364,6 +388,7 @@ module Google
364
388
  config_attr :metadata, nil, ::Hash, nil
365
389
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
366
390
  config_attr :quota_project, nil, ::String, nil
391
+ config_attr :universe_domain, nil, ::String, nil
367
392
 
368
393
  # @private
369
394
  def initialize parent_config = nil
@@ -32,6 +32,9 @@ module Google
32
32
  # A service for managing Vertex AI's machine learning Models.
33
33
  #
34
34
  class Client
35
+ # @private
36
+ DEFAULT_ENDPOINT_TEMPLATE = "aiplatform.$UNIVERSE_DOMAIN$"
37
+
35
38
  include Paths
36
39
 
37
40
  # @private
@@ -92,6 +95,15 @@ module Google
92
95
  @config
93
96
  end
94
97
 
98
+ ##
99
+ # The effective universe domain
100
+ #
101
+ # @return [String]
102
+ #
103
+ def universe_domain
104
+ @model_service_stub.universe_domain
105
+ end
106
+
95
107
  ##
96
108
  # Create a new ModelService client object.
97
109
  #
@@ -125,8 +137,9 @@ module Google
125
137
  credentials = @config.credentials
126
138
  # Use self-signed JWT if the endpoint is unchanged from default,
127
139
  # but only if the default endpoint does not have a region prefix.
128
- enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
129
- !@config.endpoint.split(".").first.include?("-")
140
+ enable_self_signed_jwt = @config.endpoint.nil? ||
141
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
142
+ !@config.endpoint.split(".").first.include?("-"))
130
143
  credentials ||= Credentials.default scope: @config.scope,
131
144
  enable_self_signed_jwt: enable_self_signed_jwt
132
145
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
@@ -139,28 +152,33 @@ module Google
139
152
  config.credentials = credentials
140
153
  config.quota_project = @quota_project_id
141
154
  config.endpoint = @config.endpoint
155
+ config.universe_domain = @config.universe_domain
142
156
  end
143
157
 
158
+ @model_service_stub = ::Gapic::ServiceStub.new(
159
+ ::Google::Cloud::AIPlatform::V1::ModelService::Stub,
160
+ credentials: credentials,
161
+ endpoint: @config.endpoint,
162
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
163
+ universe_domain: @config.universe_domain,
164
+ channel_args: @config.channel_args,
165
+ interceptors: @config.interceptors,
166
+ channel_pool_config: @config.channel_pool
167
+ )
168
+
144
169
  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
145
170
  config.credentials = credentials
146
171
  config.quota_project = @quota_project_id
147
- config.endpoint = @config.endpoint
172
+ config.endpoint = @model_service_stub.endpoint
173
+ config.universe_domain = @model_service_stub.universe_domain
148
174
  end
149
175
 
150
176
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
151
177
  config.credentials = credentials
152
178
  config.quota_project = @quota_project_id
153
- config.endpoint = @config.endpoint
179
+ config.endpoint = @model_service_stub.endpoint
180
+ config.universe_domain = @model_service_stub.universe_domain
154
181
  end
155
-
156
- @model_service_stub = ::Gapic::ServiceStub.new(
157
- ::Google::Cloud::AIPlatform::V1::ModelService::Stub,
158
- credentials: credentials,
159
- endpoint: @config.endpoint,
160
- channel_args: @config.channel_args,
161
- interceptors: @config.interceptors,
162
- channel_pool_config: @config.channel_pool
163
- )
164
182
  end
165
183
 
166
184
  ##
@@ -222,10 +240,10 @@ module Google
222
240
  # Optional. The user-provided custom service account to use to do the model
223
241
  # upload. If empty, [Vertex AI Service
224
242
  # Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents)
225
- # will be used. Users uploading the Model must have the
226
- # `iam.serviceAccounts.actAs` permission on this service account. Also, this
227
- # account must belong to the project specified in the `parent` field and have
228
- # all necessary read permissions.
243
+ # will be used to access resources needed to upload the model. This account
244
+ # must belong to the target project where the model is uploaded to, i.e., the
245
+ # project specified in the `parent` field of this request and have necessary
246
+ # read permissions (to Google Cloud Storage, Artifact Registry, etc.).
229
247
  #
230
248
  # @yield [response, operation] Access the result along with the RPC operation
231
249
  # @yieldparam response [::Gapic::Operation]
@@ -2050,9 +2068,9 @@ module Google
2050
2068
  # end
2051
2069
  #
2052
2070
  # @!attribute [rw] endpoint
2053
- # The hostname or hostname:port of the service endpoint.
2054
- # Defaults to `"aiplatform.googleapis.com"`.
2055
- # @return [::String]
2071
+ # A custom service endpoint, as a hostname or hostname:port. The default is
2072
+ # nil, indicating to use the default endpoint in the current universe domain.
2073
+ # @return [::String,nil]
2056
2074
  # @!attribute [rw] credentials
2057
2075
  # Credentials to send with calls. You may provide any of the following types:
2058
2076
  # * (`String`) The path to a service account key file in JSON format
@@ -2098,13 +2116,20 @@ module Google
2098
2116
  # @!attribute [rw] quota_project
2099
2117
  # A separate project against which to charge quota.
2100
2118
  # @return [::String]
2119
+ # @!attribute [rw] universe_domain
2120
+ # The universe domain within which to make requests. This determines the
2121
+ # default endpoint URL. The default value of nil uses the environment
2122
+ # universe (usually the default "googleapis.com" universe).
2123
+ # @return [::String,nil]
2101
2124
  #
2102
2125
  class Configuration
2103
2126
  extend ::Gapic::Config
2104
2127
 
2128
+ # @private
2129
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
2105
2130
  DEFAULT_ENDPOINT = "aiplatform.googleapis.com"
2106
2131
 
2107
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
2132
+ config_attr :endpoint, nil, ::String, nil
2108
2133
  config_attr :credentials, nil do |value|
2109
2134
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
2110
2135
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -2119,6 +2144,7 @@ module Google
2119
2144
  config_attr :metadata, nil, ::Hash, nil
2120
2145
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2121
2146
  config_attr :quota_project, nil, ::String, nil
2147
+ config_attr :universe_domain, nil, ::String, nil
2122
2148
 
2123
2149
  # @private
2124
2150
  def initialize parent_config = nil
@@ -26,6 +26,9 @@ module Google
26
26
  module ModelService
27
27
  # Service that implements Longrunning Operations API.
28
28
  class Operations
29
+ # @private
30
+ DEFAULT_ENDPOINT_TEMPLATE = "aiplatform.$UNIVERSE_DOMAIN$"
31
+
29
32
  # @private
30
33
  attr_reader :operations_stub
31
34
 
@@ -60,6 +63,15 @@ module Google
60
63
  @config
61
64
  end
62
65
 
66
+ ##
67
+ # The effective universe domain
68
+ #
69
+ # @return [String]
70
+ #
71
+ def universe_domain
72
+ @operations_stub.universe_domain
73
+ end
74
+
63
75
  ##
64
76
  # Create a new Operations client object.
65
77
  #
@@ -90,8 +102,10 @@ module Google
90
102
 
91
103
  @operations_stub = ::Gapic::ServiceStub.new(
92
104
  ::Google::Longrunning::Operations::Stub,
93
- credentials: credentials,
94
- endpoint: @config.endpoint,
105
+ credentials: credentials,
106
+ endpoint: @config.endpoint,
107
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
108
+ universe_domain: @config.universe_domain,
95
109
  channel_args: @config.channel_args,
96
110
  interceptors: @config.interceptors,
97
111
  channel_pool_config: @config.channel_pool
@@ -621,9 +635,9 @@ module Google
621
635
  # end
622
636
  #
623
637
  # @!attribute [rw] endpoint
624
- # The hostname or hostname:port of the service endpoint.
625
- # Defaults to `"aiplatform.googleapis.com"`.
626
- # @return [::String]
638
+ # A custom service endpoint, as a hostname or hostname:port. The default is
639
+ # nil, indicating to use the default endpoint in the current universe domain.
640
+ # @return [::String,nil]
627
641
  # @!attribute [rw] credentials
628
642
  # Credentials to send with calls. You may provide any of the following types:
629
643
  # * (`String`) The path to a service account key file in JSON format
@@ -669,13 +683,20 @@ module Google
669
683
  # @!attribute [rw] quota_project
670
684
  # A separate project against which to charge quota.
671
685
  # @return [::String]
686
+ # @!attribute [rw] universe_domain
687
+ # The universe domain within which to make requests. This determines the
688
+ # default endpoint URL. The default value of nil uses the environment
689
+ # universe (usually the default "googleapis.com" universe).
690
+ # @return [::String,nil]
672
691
  #
673
692
  class Configuration
674
693
  extend ::Gapic::Config
675
694
 
695
+ # @private
696
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
676
697
  DEFAULT_ENDPOINT = "aiplatform.googleapis.com"
677
698
 
678
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
699
+ config_attr :endpoint, nil, ::String, nil
679
700
  config_attr :credentials, nil do |value|
680
701
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
681
702
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -690,6 +711,7 @@ module Google
690
711
  config_attr :metadata, nil, ::Hash, nil
691
712
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
692
713
  config_attr :quota_project, nil, ::String, nil
714
+ config_attr :universe_domain, nil, ::String, nil
693
715
 
694
716
  # @private
695
717
  def initialize parent_config = nil