google-cloud-ai_platform-v1 0.35.0 → 0.36.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (185) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +72 -99
  3. data/lib/google/cloud/ai_platform/v1/dataset_service/client.rb +43 -17
  4. data/lib/google/cloud/ai_platform/v1/dataset_service/operations.rb +28 -6
  5. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/client.rb +896 -0
  6. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/credentials.rb +47 -0
  7. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/operations.rb +809 -0
  8. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/paths.rb +83 -0
  9. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service.rb +50 -0
  10. data/lib/google/cloud/ai_platform/v1/endpoint_service/client.rb +43 -17
  11. data/lib/google/cloud/ai_platform/v1/endpoint_service/operations.rb +28 -6
  12. data/lib/google/cloud/ai_platform/v1/endpoint_service/paths.rb +19 -0
  13. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/client.rb +46 -18
  14. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/operations.rb +28 -6
  15. data/lib/google/cloud/ai_platform/v1/feature_online_store_service/client.rb +146 -17
  16. data/lib/google/cloud/ai_platform/v1/feature_online_store_service.rb +2 -0
  17. data/lib/google/cloud/ai_platform/v1/feature_registry_service/client.rb +44 -18
  18. data/lib/google/cloud/ai_platform/v1/feature_registry_service/operations.rb +28 -6
  19. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/client.rb +42 -17
  20. data/lib/google/cloud/ai_platform/v1/featurestore_service/client.rb +44 -18
  21. data/lib/google/cloud/ai_platform/v1/featurestore_service/operations.rb +28 -6
  22. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/client.rb +43 -17
  23. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/operations.rb +28 -6
  24. data/lib/google/cloud/ai_platform/v1/index_service/client.rb +52 -18
  25. data/lib/google/cloud/ai_platform/v1/index_service/operations.rb +28 -6
  26. data/lib/google/cloud/ai_platform/v1/job_service/client.rb +43 -17
  27. data/lib/google/cloud/ai_platform/v1/job_service/operations.rb +28 -6
  28. data/lib/google/cloud/ai_platform/v1/llm_utility_service/client.rb +49 -18
  29. data/lib/google/cloud/ai_platform/v1/match_service/client.rb +42 -17
  30. data/lib/google/cloud/ai_platform/v1/metadata_service/client.rb +43 -17
  31. data/lib/google/cloud/ai_platform/v1/metadata_service/operations.rb +28 -6
  32. data/lib/google/cloud/ai_platform/v1/migration_service/client.rb +43 -17
  33. data/lib/google/cloud/ai_platform/v1/migration_service/operations.rb +28 -6
  34. data/lib/google/cloud/ai_platform/v1/model_garden_service/client.rb +42 -17
  35. data/lib/google/cloud/ai_platform/v1/model_service/client.rb +47 -21
  36. data/lib/google/cloud/ai_platform/v1/model_service/operations.rb +28 -6
  37. data/lib/google/cloud/ai_platform/v1/pipeline_service/client.rb +43 -17
  38. data/lib/google/cloud/ai_platform/v1/pipeline_service/operations.rb +28 -6
  39. data/lib/google/cloud/ai_platform/v1/prediction_service/client.rb +544 -20
  40. data/lib/google/cloud/ai_platform/v1/schedule_service/client.rb +43 -17
  41. data/lib/google/cloud/ai_platform/v1/schedule_service/operations.rb +28 -6
  42. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/client.rb +43 -17
  43. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/operations.rb +28 -6
  44. data/lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb +43 -17
  45. data/lib/google/cloud/ai_platform/v1/tensorboard_service/operations.rb +28 -6
  46. data/lib/google/cloud/ai_platform/v1/version.rb +1 -1
  47. data/lib/google/cloud/ai_platform/v1/vizier_service/client.rb +43 -17
  48. data/lib/google/cloud/ai_platform/v1/vizier_service/operations.rb +28 -6
  49. data/lib/google/cloud/ai_platform/v1.rb +1 -0
  50. data/lib/google/cloud/aiplatform/v1/accelerator_type_pb.rb +1 -1
  51. data/lib/google/cloud/aiplatform/v1/annotation_pb.rb +1 -1
  52. data/lib/google/cloud/aiplatform/v1/annotation_spec_pb.rb +1 -1
  53. data/lib/google/cloud/aiplatform/v1/artifact_pb.rb +1 -1
  54. data/lib/google/cloud/aiplatform/v1/batch_prediction_job_pb.rb +1 -1
  55. data/lib/google/cloud/aiplatform/v1/completion_stats_pb.rb +1 -1
  56. data/lib/google/cloud/aiplatform/v1/content_pb.rb +64 -0
  57. data/lib/google/cloud/aiplatform/v1/context_pb.rb +1 -1
  58. data/lib/google/cloud/aiplatform/v1/custom_job_pb.rb +2 -2
  59. data/lib/google/cloud/aiplatform/v1/data_item_pb.rb +1 -1
  60. data/lib/google/cloud/aiplatform/v1/data_labeling_job_pb.rb +1 -1
  61. data/lib/google/cloud/aiplatform/v1/dataset_pb.rb +4 -2
  62. data/lib/google/cloud/aiplatform/v1/dataset_service_pb.rb +4 -2
  63. data/lib/google/cloud/aiplatform/v1/dataset_version_pb.rb +1 -1
  64. data/lib/google/cloud/aiplatform/v1/deployed_index_ref_pb.rb +2 -2
  65. data/lib/google/cloud/aiplatform/v1/deployed_model_ref_pb.rb +1 -1
  66. data/lib/google/cloud/aiplatform/v1/deployment_resource_pool_pb.rb +49 -0
  67. data/lib/google/cloud/aiplatform/v1/deployment_resource_pool_service_pb.rb +65 -0
  68. data/lib/google/cloud/aiplatform/v1/deployment_resource_pool_service_services_pb.rb +53 -0
  69. data/lib/google/cloud/aiplatform/v1/encryption_spec_pb.rb +1 -1
  70. data/lib/google/cloud/aiplatform/v1/endpoint_pb.rb +2 -2
  71. data/lib/google/cloud/aiplatform/v1/endpoint_service_pb.rb +2 -2
  72. data/lib/google/cloud/aiplatform/v1/entity_type_pb.rb +1 -1
  73. data/lib/google/cloud/aiplatform/v1/env_var_pb.rb +1 -1
  74. data/lib/google/cloud/aiplatform/v1/evaluated_annotation_pb.rb +1 -1
  75. data/lib/google/cloud/aiplatform/v1/event_pb.rb +1 -1
  76. data/lib/google/cloud/aiplatform/v1/execution_pb.rb +1 -1
  77. data/lib/google/cloud/aiplatform/v1/explanation_metadata_pb.rb +1 -1
  78. data/lib/google/cloud/aiplatform/v1/explanation_pb.rb +1 -1
  79. data/lib/google/cloud/aiplatform/v1/feature_group_pb.rb +2 -2
  80. data/lib/google/cloud/aiplatform/v1/feature_monitoring_stats_pb.rb +1 -1
  81. data/lib/google/cloud/aiplatform/v1/feature_online_store_admin_service_pb.rb +2 -2
  82. data/lib/google/cloud/aiplatform/v1/feature_online_store_pb.rb +2 -2
  83. data/lib/google/cloud/aiplatform/v1/feature_online_store_service_pb.rb +10 -2
  84. data/lib/google/cloud/aiplatform/v1/feature_online_store_service_services_pb.rb +5 -0
  85. data/lib/google/cloud/aiplatform/v1/feature_pb.rb +2 -2
  86. data/lib/google/cloud/aiplatform/v1/feature_registry_service_pb.rb +2 -2
  87. data/lib/google/cloud/aiplatform/v1/feature_selector_pb.rb +1 -1
  88. data/lib/google/cloud/aiplatform/v1/feature_view_pb.rb +2 -2
  89. data/lib/google/cloud/aiplatform/v1/feature_view_sync_pb.rb +2 -2
  90. data/lib/google/cloud/aiplatform/v1/featurestore_monitoring_pb.rb +1 -1
  91. data/lib/google/cloud/aiplatform/v1/featurestore_online_service_pb.rb +2 -2
  92. data/lib/google/cloud/aiplatform/v1/featurestore_pb.rb +1 -1
  93. data/lib/google/cloud/aiplatform/v1/featurestore_service_pb.rb +2 -2
  94. data/lib/google/cloud/aiplatform/v1/hyperparameter_tuning_job_pb.rb +1 -1
  95. data/lib/google/cloud/aiplatform/v1/index_endpoint_pb.rb +2 -2
  96. data/lib/google/cloud/aiplatform/v1/index_endpoint_service_pb.rb +2 -2
  97. data/lib/google/cloud/aiplatform/v1/index_pb.rb +1 -1
  98. data/lib/google/cloud/aiplatform/v1/index_service_pb.rb +2 -2
  99. data/lib/google/cloud/aiplatform/v1/io_pb.rb +1 -1
  100. data/lib/google/cloud/aiplatform/v1/job_service_pb.rb +2 -2
  101. data/lib/google/cloud/aiplatform/v1/job_state_pb.rb +1 -1
  102. data/lib/google/cloud/aiplatform/v1/lineage_subgraph_pb.rb +1 -1
  103. data/lib/google/cloud/aiplatform/v1/llm_utility_service_pb.rb +2 -2
  104. data/lib/google/cloud/aiplatform/v1/machine_resources_pb.rb +1 -1
  105. data/lib/google/cloud/aiplatform/v1/manual_batch_tuning_parameters_pb.rb +1 -1
  106. data/lib/google/cloud/aiplatform/v1/match_service_pb.rb +1 -1
  107. data/lib/google/cloud/aiplatform/v1/metadata_schema_pb.rb +1 -1
  108. data/lib/google/cloud/aiplatform/v1/metadata_service_pb.rb +2 -2
  109. data/lib/google/cloud/aiplatform/v1/metadata_store_pb.rb +1 -1
  110. data/lib/google/cloud/aiplatform/v1/migratable_resource_pb.rb +1 -1
  111. data/lib/google/cloud/aiplatform/v1/migration_service_pb.rb +2 -2
  112. data/lib/google/cloud/aiplatform/v1/model_deployment_monitoring_job_pb.rb +2 -2
  113. data/lib/google/cloud/aiplatform/v1/model_evaluation_pb.rb +1 -1
  114. data/lib/google/cloud/aiplatform/v1/model_evaluation_slice_pb.rb +1 -1
  115. data/lib/google/cloud/aiplatform/v1/model_garden_service_pb.rb +2 -2
  116. data/lib/google/cloud/aiplatform/v1/model_monitoring_pb.rb +1 -1
  117. data/lib/google/cloud/aiplatform/v1/model_pb.rb +3 -2
  118. data/lib/google/cloud/aiplatform/v1/model_service_pb.rb +2 -2
  119. data/lib/google/cloud/aiplatform/v1/nas_job_pb.rb +1 -1
  120. data/lib/google/cloud/aiplatform/v1/openapi_pb.rb +47 -0
  121. data/lib/google/cloud/aiplatform/v1/operation_pb.rb +1 -1
  122. data/lib/google/cloud/aiplatform/v1/pipeline_failure_policy_pb.rb +1 -1
  123. data/lib/google/cloud/aiplatform/v1/pipeline_job_pb.rb +1 -1
  124. data/lib/google/cloud/aiplatform/v1/pipeline_service_pb.rb +2 -2
  125. data/lib/google/cloud/aiplatform/v1/pipeline_state_pb.rb +1 -1
  126. data/lib/google/cloud/aiplatform/v1/prediction_service_pb.rb +16 -2
  127. data/lib/google/cloud/aiplatform/v1/prediction_service_services_pb.rb +16 -3
  128. data/lib/google/cloud/aiplatform/v1/publisher_model_pb.rb +6 -2
  129. data/lib/google/cloud/aiplatform/v1/saved_query_pb.rb +1 -1
  130. data/lib/google/cloud/aiplatform/v1/schedule_pb.rb +1 -1
  131. data/lib/google/cloud/aiplatform/v1/schedule_service_pb.rb +2 -2
  132. data/lib/google/cloud/aiplatform/v1/service_networking_pb.rb +4 -2
  133. data/lib/google/cloud/aiplatform/v1/specialist_pool_pb.rb +1 -1
  134. data/lib/google/cloud/aiplatform/v1/specialist_pool_service_pb.rb +2 -2
  135. data/lib/google/cloud/aiplatform/v1/study_pb.rb +1 -1
  136. data/lib/google/cloud/aiplatform/v1/tensorboard_data_pb.rb +1 -1
  137. data/lib/google/cloud/aiplatform/v1/tensorboard_experiment_pb.rb +1 -1
  138. data/lib/google/cloud/aiplatform/v1/tensorboard_pb.rb +1 -1
  139. data/lib/google/cloud/aiplatform/v1/tensorboard_run_pb.rb +1 -1
  140. data/lib/google/cloud/aiplatform/v1/tensorboard_service_pb.rb +2 -2
  141. data/lib/google/cloud/aiplatform/v1/tensorboard_time_series_pb.rb +1 -1
  142. data/lib/google/cloud/aiplatform/v1/tool_pb.rb +51 -0
  143. data/lib/google/cloud/aiplatform/v1/training_pipeline_pb.rb +1 -1
  144. data/lib/google/cloud/aiplatform/v1/types_pb.rb +1 -1
  145. data/lib/google/cloud/aiplatform/v1/unmanaged_container_model_pb.rb +1 -1
  146. data/lib/google/cloud/aiplatform/v1/user_action_reference_pb.rb +1 -1
  147. data/lib/google/cloud/aiplatform/v1/value_pb.rb +1 -1
  148. data/lib/google/cloud/aiplatform/v1/vizier_service_pb.rb +2 -2
  149. data/proto_docs/google/api/client.rb +1 -0
  150. data/proto_docs/google/cloud/aiplatform/v1/batch_prediction_job.rb +2 -2
  151. data/proto_docs/google/cloud/aiplatform/v1/content.rb +312 -0
  152. data/proto_docs/google/cloud/aiplatform/v1/custom_job.rb +15 -0
  153. data/proto_docs/google/cloud/aiplatform/v1/dataset.rb +102 -0
  154. data/proto_docs/google/cloud/aiplatform/v1/dataset_service.rb +12 -1
  155. data/proto_docs/google/cloud/aiplatform/v1/deployed_index_ref.rb +3 -0
  156. data/proto_docs/google/cloud/aiplatform/v1/deployment_resource_pool.rb +45 -0
  157. data/proto_docs/google/cloud/aiplatform/v1/deployment_resource_pool_service.rb +170 -0
  158. data/proto_docs/google/cloud/aiplatform/v1/endpoint.rb +6 -0
  159. data/proto_docs/google/cloud/aiplatform/v1/explanation.rb +8 -0
  160. data/proto_docs/google/cloud/aiplatform/v1/feature.rb +5 -1
  161. data/proto_docs/google/cloud/aiplatform/v1/feature_group.rb +2 -2
  162. data/proto_docs/google/cloud/aiplatform/v1/feature_online_store.rb +2 -2
  163. data/proto_docs/google/cloud/aiplatform/v1/feature_online_store_admin_service.rb +3 -1
  164. data/proto_docs/google/cloud/aiplatform/v1/feature_online_store_service.rb +136 -0
  165. data/proto_docs/google/cloud/aiplatform/v1/feature_view.rb +3 -2
  166. data/proto_docs/google/cloud/aiplatform/v1/feature_view_sync.rb +2 -2
  167. data/proto_docs/google/cloud/aiplatform/v1/featurestore_service.rb +1 -1
  168. data/proto_docs/google/cloud/aiplatform/v1/index_endpoint.rb +5 -0
  169. data/proto_docs/google/cloud/aiplatform/v1/index_service.rb +28 -0
  170. data/proto_docs/google/cloud/aiplatform/v1/metadata_service.rb +1 -0
  171. data/proto_docs/google/cloud/aiplatform/v1/model.rb +55 -4
  172. data/proto_docs/google/cloud/aiplatform/v1/model_deployment_monitoring_job.rb +4 -0
  173. data/proto_docs/google/cloud/aiplatform/v1/model_evaluation.rb +1 -1
  174. data/proto_docs/google/cloud/aiplatform/v1/model_monitoring.rb +1 -0
  175. data/proto_docs/google/cloud/aiplatform/v1/model_service.rb +4 -4
  176. data/proto_docs/google/cloud/aiplatform/v1/nas_job.rb +1 -0
  177. data/proto_docs/google/cloud/aiplatform/v1/openapi.rb +102 -0
  178. data/proto_docs/google/cloud/aiplatform/v1/pipeline_job.rb +1 -0
  179. data/proto_docs/google/cloud/aiplatform/v1/prediction_service.rb +195 -0
  180. data/proto_docs/google/cloud/aiplatform/v1/publisher_model.rb +73 -1
  181. data/proto_docs/google/cloud/aiplatform/v1/service_networking.rb +16 -0
  182. data/proto_docs/google/cloud/aiplatform/v1/tool.rb +112 -0
  183. data/proto_docs/google/protobuf/any.rb +2 -1
  184. data/proto_docs/google/type/date.rb +53 -0
  185. metadata +26 -9
@@ -32,6 +32,9 @@ module Google
32
32
  # A service for creating and managing Vertex AI's jobs.
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
+ @job_service_stub.universe_domain
105
+ end
106
+
95
107
  ##
96
108
  # Create a new JobService 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
+ @job_service_stub = ::Gapic::ServiceStub.new(
159
+ ::Google::Cloud::AIPlatform::V1::JobService::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 = @job_service_stub.endpoint
173
+ config.universe_domain = @job_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 = @job_service_stub.endpoint
180
+ config.universe_domain = @job_service_stub.universe_domain
154
181
  end
155
-
156
- @job_service_stub = ::Gapic::ServiceStub.new(
157
- ::Google::Cloud::AIPlatform::V1::JobService::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
  ##
@@ -3663,9 +3681,9 @@ module Google
3663
3681
  # end
3664
3682
  #
3665
3683
  # @!attribute [rw] endpoint
3666
- # The hostname or hostname:port of the service endpoint.
3667
- # Defaults to `"aiplatform.googleapis.com"`.
3668
- # @return [::String]
3684
+ # A custom service endpoint, as a hostname or hostname:port. The default is
3685
+ # nil, indicating to use the default endpoint in the current universe domain.
3686
+ # @return [::String,nil]
3669
3687
  # @!attribute [rw] credentials
3670
3688
  # Credentials to send with calls. You may provide any of the following types:
3671
3689
  # * (`String`) The path to a service account key file in JSON format
@@ -3711,13 +3729,20 @@ module Google
3711
3729
  # @!attribute [rw] quota_project
3712
3730
  # A separate project against which to charge quota.
3713
3731
  # @return [::String]
3732
+ # @!attribute [rw] universe_domain
3733
+ # The universe domain within which to make requests. This determines the
3734
+ # default endpoint URL. The default value of nil uses the environment
3735
+ # universe (usually the default "googleapis.com" universe).
3736
+ # @return [::String,nil]
3714
3737
  #
3715
3738
  class Configuration
3716
3739
  extend ::Gapic::Config
3717
3740
 
3741
+ # @private
3742
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
3718
3743
  DEFAULT_ENDPOINT = "aiplatform.googleapis.com"
3719
3744
 
3720
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
3745
+ config_attr :endpoint, nil, ::String, nil
3721
3746
  config_attr :credentials, nil do |value|
3722
3747
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
3723
3748
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -3732,6 +3757,7 @@ module Google
3732
3757
  config_attr :metadata, nil, ::Hash, nil
3733
3758
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
3734
3759
  config_attr :quota_project, nil, ::String, nil
3760
+ config_attr :universe_domain, nil, ::String, nil
3735
3761
 
3736
3762
  # @private
3737
3763
  def initialize parent_config = nil
@@ -26,6 +26,9 @@ module Google
26
26
  module JobService
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
  # Service for LLM related utility functions.
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
+ @llm_utility_service_stub.universe_domain
105
+ end
106
+
95
107
  ##
96
108
  # Create a new LlmUtilityService 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
+ @llm_utility_service_stub = ::Gapic::ServiceStub.new(
152
+ ::Google::Cloud::AIPlatform::V1::LlmUtilityService::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 = @llm_utility_service_stub.endpoint
166
+ config.universe_domain = @llm_utility_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 = @llm_utility_service_stub.endpoint
173
+ config.universe_domain = @llm_utility_service_stub.universe_domain
148
174
  end
149
-
150
- @llm_utility_service_stub = ::Gapic::ServiceStub.new(
151
- ::Google::Cloud::AIPlatform::V1::LlmUtilityService::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
  ##
@@ -186,7 +203,7 @@ module Google
186
203
  # @param options [::Gapic::CallOptions, ::Hash]
187
204
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
188
205
  #
189
- # @overload count_tokens(endpoint: nil, instances: nil)
206
+ # @overload count_tokens(endpoint: nil, model: nil, instances: nil, contents: nil)
190
207
  # Pass arguments to `count_tokens` via keyword arguments. Note that at
191
208
  # least one keyword argument is required. To specify no parameters, or to keep all
192
209
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -195,9 +212,15 @@ module Google
195
212
  # Required. The name of the Endpoint requested to perform token counting.
196
213
  # Format:
197
214
  # `projects/{project}/locations/{location}/endpoints/{endpoint}`
215
+ # @param model [::String]
216
+ # Required. The name of the publisher model requested to serve the
217
+ # prediction. Format:
218
+ # `projects/{project}/locations/{location}/publishers/*/models/*`
198
219
  # @param instances [::Array<::Google::Protobuf::Value, ::Hash>]
199
220
  # Required. The instances that are the input to token counting call.
200
221
  # Schema is identical to the prediction schema of the underlying model.
222
+ # @param contents [::Array<::Google::Cloud::AIPlatform::V1::Content, ::Hash>]
223
+ # Required. Input content.
201
224
  #
202
225
  # @yield [response, operation] Access the result along with the RPC operation
203
226
  # @yieldparam response [::Google::Cloud::AIPlatform::V1::CountTokensResponse]
@@ -383,9 +406,9 @@ module Google
383
406
  # end
384
407
  #
385
408
  # @!attribute [rw] endpoint
386
- # The hostname or hostname:port of the service endpoint.
387
- # Defaults to `"aiplatform.googleapis.com"`.
388
- # @return [::String]
409
+ # A custom service endpoint, as a hostname or hostname:port. The default is
410
+ # nil, indicating to use the default endpoint in the current universe domain.
411
+ # @return [::String,nil]
389
412
  # @!attribute [rw] credentials
390
413
  # Credentials to send with calls. You may provide any of the following types:
391
414
  # * (`String`) The path to a service account key file in JSON format
@@ -431,13 +454,20 @@ module Google
431
454
  # @!attribute [rw] quota_project
432
455
  # A separate project against which to charge quota.
433
456
  # @return [::String]
457
+ # @!attribute [rw] universe_domain
458
+ # The universe domain within which to make requests. This determines the
459
+ # default endpoint URL. The default value of nil uses the environment
460
+ # universe (usually the default "googleapis.com" universe).
461
+ # @return [::String,nil]
434
462
  #
435
463
  class Configuration
436
464
  extend ::Gapic::Config
437
465
 
466
+ # @private
467
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
438
468
  DEFAULT_ENDPOINT = "aiplatform.googleapis.com"
439
469
 
440
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
470
+ config_attr :endpoint, nil, ::String, nil
441
471
  config_attr :credentials, nil do |value|
442
472
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
443
473
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -452,6 +482,7 @@ module Google
452
482
  config_attr :metadata, nil, ::Hash, nil
453
483
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
454
484
  config_attr :quota_project, nil, ::String, nil
485
+ config_attr :universe_domain, nil, ::String, nil
455
486
 
456
487
  # @private
457
488
  def initialize parent_config = nil
@@ -33,6 +33,9 @@ module Google
33
33
  # search at scale.
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
+ @match_service_stub.universe_domain
106
+ end
107
+
96
108
  ##
97
109
  # Create a new MatchService 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)
@@ -136,26 +149,30 @@ module Google
136
149
  @quota_project_id = @config.quota_project
137
150
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
138
151
 
152
+ @match_service_stub = ::Gapic::ServiceStub.new(
153
+ ::Google::Cloud::AIPlatform::V1::MatchService::Stub,
154
+ credentials: credentials,
155
+ endpoint: @config.endpoint,
156
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
157
+ universe_domain: @config.universe_domain,
158
+ channel_args: @config.channel_args,
159
+ interceptors: @config.interceptors,
160
+ channel_pool_config: @config.channel_pool
161
+ )
162
+
139
163
  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
140
164
  config.credentials = credentials
141
165
  config.quota_project = @quota_project_id
142
- config.endpoint = @config.endpoint
166
+ config.endpoint = @match_service_stub.endpoint
167
+ config.universe_domain = @match_service_stub.universe_domain
143
168
  end
144
169
 
145
170
  @iam_policy_client = Google::Iam::V1::IAMPolicy::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 = @match_service_stub.endpoint
174
+ config.universe_domain = @match_service_stub.universe_domain
149
175
  end
150
-
151
- @match_service_stub = ::Gapic::ServiceStub.new(
152
- ::Google::Cloud::AIPlatform::V1::MatchService::Stub,
153
- credentials: credentials,
154
- endpoint: @config.endpoint,
155
- channel_args: @config.channel_args,
156
- interceptors: @config.interceptors,
157
- channel_pool_config: @config.channel_pool
158
- )
159
176
  end
160
177
 
161
178
  ##
@@ -397,9 +414,9 @@ module Google
397
414
  # end
398
415
  #
399
416
  # @!attribute [rw] endpoint
400
- # The hostname or hostname:port of the service endpoint.
401
- # Defaults to `"aiplatform.googleapis.com"`.
402
- # @return [::String]
417
+ # A custom service endpoint, as a hostname or hostname:port. The default is
418
+ # nil, indicating to use the default endpoint in the current universe domain.
419
+ # @return [::String,nil]
403
420
  # @!attribute [rw] credentials
404
421
  # Credentials to send with calls. You may provide any of the following types:
405
422
  # * (`String`) The path to a service account key file in JSON format
@@ -445,13 +462,20 @@ module Google
445
462
  # @!attribute [rw] quota_project
446
463
  # A separate project against which to charge quota.
447
464
  # @return [::String]
465
+ # @!attribute [rw] universe_domain
466
+ # The universe domain within which to make requests. This determines the
467
+ # default endpoint URL. The default value of nil uses the environment
468
+ # universe (usually the default "googleapis.com" universe).
469
+ # @return [::String,nil]
448
470
  #
449
471
  class Configuration
450
472
  extend ::Gapic::Config
451
473
 
474
+ # @private
475
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
452
476
  DEFAULT_ENDPOINT = "aiplatform.googleapis.com"
453
477
 
454
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
478
+ config_attr :endpoint, nil, ::String, nil
455
479
  config_attr :credentials, nil do |value|
456
480
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
457
481
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -466,6 +490,7 @@ module Google
466
490
  config_attr :metadata, nil, ::Hash, nil
467
491
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
468
492
  config_attr :quota_project, nil, ::String, nil
493
+ config_attr :universe_domain, nil, ::String, nil
469
494
 
470
495
  # @private
471
496
  def initialize parent_config = nil
@@ -32,6 +32,9 @@ module Google
32
32
  # Service for reading and writing metadata entries.
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
+ @metadata_service_stub.universe_domain
105
+ end
106
+
95
107
  ##
96
108
  # Create a new MetadataService 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
+ @metadata_service_stub = ::Gapic::ServiceStub.new(
159
+ ::Google::Cloud::AIPlatform::V1::MetadataService::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 = @metadata_service_stub.endpoint
173
+ config.universe_domain = @metadata_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 = @metadata_service_stub.endpoint
180
+ config.universe_domain = @metadata_service_stub.universe_domain
154
181
  end
155
-
156
- @metadata_service_stub = ::Gapic::ServiceStub.new(
157
- ::Google::Cloud::AIPlatform::V1::MetadataService::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
  ##
@@ -3459,9 +3477,9 @@ module Google
3459
3477
  # end
3460
3478
  #
3461
3479
  # @!attribute [rw] endpoint
3462
- # The hostname or hostname:port of the service endpoint.
3463
- # Defaults to `"aiplatform.googleapis.com"`.
3464
- # @return [::String]
3480
+ # A custom service endpoint, as a hostname or hostname:port. The default is
3481
+ # nil, indicating to use the default endpoint in the current universe domain.
3482
+ # @return [::String,nil]
3465
3483
  # @!attribute [rw] credentials
3466
3484
  # Credentials to send with calls. You may provide any of the following types:
3467
3485
  # * (`String`) The path to a service account key file in JSON format
@@ -3507,13 +3525,20 @@ module Google
3507
3525
  # @!attribute [rw] quota_project
3508
3526
  # A separate project against which to charge quota.
3509
3527
  # @return [::String]
3528
+ # @!attribute [rw] universe_domain
3529
+ # The universe domain within which to make requests. This determines the
3530
+ # default endpoint URL. The default value of nil uses the environment
3531
+ # universe (usually the default "googleapis.com" universe).
3532
+ # @return [::String,nil]
3510
3533
  #
3511
3534
  class Configuration
3512
3535
  extend ::Gapic::Config
3513
3536
 
3537
+ # @private
3538
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
3514
3539
  DEFAULT_ENDPOINT = "aiplatform.googleapis.com"
3515
3540
 
3516
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
3541
+ config_attr :endpoint, nil, ::String, nil
3517
3542
  config_attr :credentials, nil do |value|
3518
3543
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
3519
3544
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -3528,6 +3553,7 @@ module Google
3528
3553
  config_attr :metadata, nil, ::Hash, nil
3529
3554
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
3530
3555
  config_attr :quota_project, nil, ::String, nil
3556
+ config_attr :universe_domain, nil, ::String, nil
3531
3557
 
3532
3558
  # @private
3533
3559
  def initialize parent_config = nil