google-cloud-ai_platform-v1 0.27.0 → 0.28.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.
@@ -0,0 +1,187 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module AIPlatform
23
+ module V1
24
+ module ScheduleService
25
+ # Path helper methods for the ScheduleService API.
26
+ module Paths
27
+ ##
28
+ # Create a fully-qualified Artifact resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `projects/{project}/locations/{location}/metadataStores/{metadata_store}/artifacts/{artifact}`
33
+ #
34
+ # @param project [String]
35
+ # @param location [String]
36
+ # @param metadata_store [String]
37
+ # @param artifact [String]
38
+ #
39
+ # @return [::String]
40
+ def artifact_path project:, location:, metadata_store:, artifact:
41
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
42
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
43
+ raise ::ArgumentError, "metadata_store cannot contain /" if metadata_store.to_s.include? "/"
44
+
45
+ "projects/#{project}/locations/#{location}/metadataStores/#{metadata_store}/artifacts/#{artifact}"
46
+ end
47
+
48
+ ##
49
+ # Create a fully-qualified Context resource string.
50
+ #
51
+ # The resource will be in the following format:
52
+ #
53
+ # `projects/{project}/locations/{location}/metadataStores/{metadata_store}/contexts/{context}`
54
+ #
55
+ # @param project [String]
56
+ # @param location [String]
57
+ # @param metadata_store [String]
58
+ # @param context [String]
59
+ #
60
+ # @return [::String]
61
+ def context_path project:, location:, metadata_store:, context:
62
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
63
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
64
+ raise ::ArgumentError, "metadata_store cannot contain /" if metadata_store.to_s.include? "/"
65
+
66
+ "projects/#{project}/locations/#{location}/metadataStores/#{metadata_store}/contexts/#{context}"
67
+ end
68
+
69
+ ##
70
+ # Create a fully-qualified CustomJob resource string.
71
+ #
72
+ # The resource will be in the following format:
73
+ #
74
+ # `projects/{project}/locations/{location}/customJobs/{custom_job}`
75
+ #
76
+ # @param project [String]
77
+ # @param location [String]
78
+ # @param custom_job [String]
79
+ #
80
+ # @return [::String]
81
+ def custom_job_path project:, location:, custom_job:
82
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
83
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
84
+
85
+ "projects/#{project}/locations/#{location}/customJobs/#{custom_job}"
86
+ end
87
+
88
+ ##
89
+ # Create a fully-qualified Execution resource string.
90
+ #
91
+ # The resource will be in the following format:
92
+ #
93
+ # `projects/{project}/locations/{location}/metadataStores/{metadata_store}/executions/{execution}`
94
+ #
95
+ # @param project [String]
96
+ # @param location [String]
97
+ # @param metadata_store [String]
98
+ # @param execution [String]
99
+ #
100
+ # @return [::String]
101
+ def execution_path project:, location:, metadata_store:, execution:
102
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
103
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
104
+ raise ::ArgumentError, "metadata_store cannot contain /" if metadata_store.to_s.include? "/"
105
+
106
+ "projects/#{project}/locations/#{location}/metadataStores/#{metadata_store}/executions/#{execution}"
107
+ end
108
+
109
+ ##
110
+ # Create a fully-qualified Location resource string.
111
+ #
112
+ # The resource will be in the following format:
113
+ #
114
+ # `projects/{project}/locations/{location}`
115
+ #
116
+ # @param project [String]
117
+ # @param location [String]
118
+ #
119
+ # @return [::String]
120
+ def location_path project:, location:
121
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
122
+
123
+ "projects/#{project}/locations/#{location}"
124
+ end
125
+
126
+ ##
127
+ # Create a fully-qualified Network resource string.
128
+ #
129
+ # The resource will be in the following format:
130
+ #
131
+ # `projects/{project}/global/networks/{network}`
132
+ #
133
+ # @param project [String]
134
+ # @param network [String]
135
+ #
136
+ # @return [::String]
137
+ def network_path project:, network:
138
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
139
+
140
+ "projects/#{project}/global/networks/#{network}"
141
+ end
142
+
143
+ ##
144
+ # Create a fully-qualified PipelineJob resource string.
145
+ #
146
+ # The resource will be in the following format:
147
+ #
148
+ # `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`
149
+ #
150
+ # @param project [String]
151
+ # @param location [String]
152
+ # @param pipeline_job [String]
153
+ #
154
+ # @return [::String]
155
+ def pipeline_job_path project:, location:, pipeline_job:
156
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
157
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
158
+
159
+ "projects/#{project}/locations/#{location}/pipelineJobs/#{pipeline_job}"
160
+ end
161
+
162
+ ##
163
+ # Create a fully-qualified Schedule resource string.
164
+ #
165
+ # The resource will be in the following format:
166
+ #
167
+ # `projects/{project}/locations/{location}/schedules/{schedule}`
168
+ #
169
+ # @param project [String]
170
+ # @param location [String]
171
+ # @param schedule [String]
172
+ #
173
+ # @return [::String]
174
+ def schedule_path project:, location:, schedule:
175
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
176
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
177
+
178
+ "projects/#{project}/locations/#{location}/schedules/#{schedule}"
179
+ end
180
+
181
+ extend self
182
+ end
183
+ end
184
+ end
185
+ end
186
+ end
187
+ end
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/ai_platform/v1/version"
24
+
25
+ require "google/cloud/ai_platform/v1/schedule_service/credentials"
26
+ require "google/cloud/ai_platform/v1/schedule_service/paths"
27
+ require "google/cloud/ai_platform/v1/schedule_service/operations"
28
+ require "google/cloud/ai_platform/v1/schedule_service/client"
29
+
30
+ module Google
31
+ module Cloud
32
+ module AIPlatform
33
+ module V1
34
+ ##
35
+ # A service for creating and managing Vertex AI's Schedule resources to
36
+ # periodically launch shceudled runs to make API calls.
37
+ #
38
+ # @example Load this service and instantiate a gRPC client
39
+ #
40
+ # require "google/cloud/ai_platform/v1/schedule_service"
41
+ # client = ::Google::Cloud::AIPlatform::V1::ScheduleService::Client.new
42
+ #
43
+ module ScheduleService
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+
50
+ helper_path = ::File.join __dir__, "schedule_service", "helpers.rb"
51
+ require "google/cloud/ai_platform/v1/schedule_service/helpers" if ::File.file? helper_path
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module AIPlatform
23
23
  module V1
24
- VERSION = "0.27.0"
24
+ VERSION = "0.28.0"
25
25
  end
26
26
  end
27
27
  end
@@ -30,6 +30,7 @@ require "google/cloud/ai_platform/v1/model_service"
30
30
  require "google/cloud/ai_platform/v1/model_garden_service"
31
31
  require "google/cloud/ai_platform/v1/pipeline_service"
32
32
  require "google/cloud/ai_platform/v1/prediction_service"
33
+ require "google/cloud/ai_platform/v1/schedule_service"
33
34
  require "google/cloud/ai_platform/v1/specialist_pool_service"
34
35
  require "google/cloud/ai_platform/v1/tensorboard_service"
35
36
  require "google/cloud/ai_platform/v1/vizier_service"
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: google/cloud/aiplatform/v1/schedule.proto
4
+
5
+ require 'google/protobuf'
6
+
7
+ require 'google/api/field_behavior_pb'
8
+ require 'google/api/resource_pb'
9
+ require 'google/cloud/aiplatform/v1/pipeline_service_pb'
10
+ require 'google/protobuf/timestamp_pb'
11
+
12
+
13
+ descriptor_data = "\n)google/cloud/aiplatform/v1/schedule.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x31google/cloud/aiplatform/v1/pipeline_service.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x85\t\n\x08Schedule\x12\x0e\n\x04\x63ron\x18\n \x01(\tH\x00\x12[\n\x1b\x63reate_pipeline_job_request\x18\x0e \x01(\x0b\x32\x34.google.cloud.aiplatform.v1.CreatePipelineJobRequestH\x01\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x31\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x1a\n\rmax_run_count\x18\x10 \x01(\x03\x42\x03\xe0\x41\x01\x12\x1e\n\x11started_run_count\x18\x11 \x01(\x03\x42\x03\xe0\x41\x03\x12>\n\x05state\x18\x05 \x01(\x0e\x32*.google.cloud.aiplatform.v1.Schedule.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\rnext_run_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x38\n\x0flast_pause_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x10last_resume_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12%\n\x18max_concurrent_run_count\x18\x0b \x01(\x03\x42\x03\xe0\x41\x02\x12\x1b\n\x0e\x61llow_queueing\x18\x0c \x01(\x08\x42\x03\xe0\x41\x01\x12\x15\n\x08\x63\x61tch_up\x18\r \x01(\x08\x42\x03\xe0\x41\x03\x12Z\n\x1blast_scheduled_run_response\x18\x12 \x01(\x0b\x32\x30.google.cloud.aiplatform.v1.Schedule.RunResponseB\x03\xe0\x41\x03\x1a[\n\x0bRunResponse\x12\x36\n\x12scheduled_run_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x14\n\x0crun_response\x18\x02 \x01(\t\"E\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\n\n\x06PAUSED\x10\x02\x12\r\n\tCOMPLETED\x10\x03:e\xea\x41\x62\n\"aiplatform.googleapis.com/Schedule\x12<projects/{project}/locations/{location}/schedules/{schedule}B\x14\n\x12time_specificationB\t\n\x07requestB\xcb\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\rScheduleProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3"
14
+
15
+ pool = Google::Protobuf::DescriptorPool.generated_pool
16
+
17
+ begin
18
+ pool.add_serialized_file(descriptor_data)
19
+ rescue TypeError => e
20
+ # Compatibility code: will be removed in the next major version.
21
+ require 'google/protobuf/descriptor_pb'
22
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
23
+ parsed.clear_dependency
24
+ serialized = parsed.class.encode(parsed)
25
+ file = pool.add_serialized_file(serialized)
26
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
27
+ imports = [
28
+ ["google.cloud.aiplatform.v1.CreatePipelineJobRequest", "google/cloud/aiplatform/v1/pipeline_service.proto"],
29
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
30
+ ]
31
+ imports.each do |type_name, expected_filename|
32
+ import_file = pool.lookup(type_name).file_descriptor
33
+ if import_file.name != expected_filename
34
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
35
+ end
36
+ end
37
+ warn "Each proto file must use a consistent fully-qualified name."
38
+ warn "This will become an error in the next major version."
39
+ end
40
+
41
+ module Google
42
+ module Cloud
43
+ module AIPlatform
44
+ module V1
45
+ Schedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.Schedule").msgclass
46
+ Schedule::RunResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.Schedule.RunResponse").msgclass
47
+ Schedule::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.Schedule.State").enummodule
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: google/cloud/aiplatform/v1/schedule_service.proto
4
+
5
+ require 'google/protobuf'
6
+
7
+ require 'google/api/annotations_pb'
8
+ require 'google/api/client_pb'
9
+ require 'google/api/field_behavior_pb'
10
+ require 'google/api/resource_pb'
11
+ require 'google/cloud/aiplatform/v1/operation_pb'
12
+ require 'google/cloud/aiplatform/v1/schedule_pb'
13
+ require 'google/longrunning/operations_pb'
14
+ require 'google/protobuf/empty_pb'
15
+ require 'google/protobuf/field_mask_pb'
16
+
17
+
18
+ descriptor_data = "\n1google/cloud/aiplatform/v1/schedule_service.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a*google/cloud/aiplatform/v1/operation.proto\x1a)google/cloud/aiplatform/v1/schedule.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\x8f\x01\n\x15\x43reateScheduleRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12;\n\x08schedule\x18\x02 \x01(\x0b\x32$.google.cloud.aiplatform.v1.ScheduleB\x03\xe0\x41\x02\"N\n\x12GetScheduleRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Schedule\"\x9a\x01\n\x14ListSchedulesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"i\n\x15ListSchedulesResponse\x12\x37\n\tschedules\x18\x01 \x03(\x0b\x32$.google.cloud.aiplatform.v1.Schedule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Q\n\x15\x44\x65leteScheduleRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Schedule\"P\n\x14PauseScheduleRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Schedule\"h\n\x15ResumeScheduleRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Schedule\x12\x15\n\x08\x63\x61tch_up\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\x8a\x01\n\x15UpdateScheduleRequest\x12;\n\x08schedule\x18\x01 \x01(\x0b\x32$.google.cloud.aiplatform.v1.ScheduleB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\xf6\n\n\x0fScheduleService\x12\xbc\x01\n\x0e\x43reateSchedule\x12\x31.google.cloud.aiplatform.v1.CreateScheduleRequest\x1a$.google.cloud.aiplatform.v1.Schedule\"Q\x82\xd3\xe4\x93\x02\x39\"-/v1/{parent=projects/*/locations/*}/schedules:\x08schedule\xda\x41\x0fparent,schedule\x12\xd3\x01\n\x0e\x44\x65leteSchedule\x12\x31.google.cloud.aiplatform.v1.DeleteScheduleRequest\x1a\x1d.google.longrunning.Operation\"o\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/schedules/*}\xda\x41\x04name\xca\x41\x30\n\x15google.protobuf.Empty\x12\x17\x44\x65leteOperationMetadata\x12\xa1\x01\n\x0bGetSchedule\x12..google.cloud.aiplatform.v1.GetScheduleRequest\x1a$.google.cloud.aiplatform.v1.Schedule\"<\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/schedules/*}\xda\x41\x04name\x12\xb4\x01\n\rListSchedules\x12\x30.google.cloud.aiplatform.v1.ListSchedulesRequest\x1a\x31.google.cloud.aiplatform.v1.ListSchedulesResponse\">\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/schedules\xda\x41\x06parent\x12\xa0\x01\n\rPauseSchedule\x12\x30.google.cloud.aiplatform.v1.PauseScheduleRequest\x1a\x16.google.protobuf.Empty\"E\x82\xd3\xe4\x93\x02\x38\"3/v1/{name=projects/*/locations/*/schedules/*}:pause:\x01*\xda\x41\x04name\x12\xb3\x01\n\x0eResumeSchedule\x12\x31.google.cloud.aiplatform.v1.ResumeScheduleRequest\x1a\x16.google.protobuf.Empty\"V\x82\xd3\xe4\x93\x02\x39\"4/v1/{name=projects/*/locations/*/schedules/*}:resume:\x01*\xda\x41\x04name\xda\x41\rname,catch_up\x12\xca\x01\n\x0eUpdateSchedule\x12\x31.google.cloud.aiplatform.v1.UpdateScheduleRequest\x1a$.google.cloud.aiplatform.v1.Schedule\"_\x82\xd3\xe4\x93\x02\x42\x32\x36/v1/{schedule.name=projects/*/locations/*/schedules/*}:\x08schedule\xda\x41\x14schedule,update_mask\x1aM\xca\x41\x19\x61iplatform.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd2\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x14ScheduleServiceProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3"
19
+
20
+ pool = Google::Protobuf::DescriptorPool.generated_pool
21
+
22
+ begin
23
+ pool.add_serialized_file(descriptor_data)
24
+ rescue TypeError => e
25
+ # Compatibility code: will be removed in the next major version.
26
+ require 'google/protobuf/descriptor_pb'
27
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
28
+ parsed.clear_dependency
29
+ serialized = parsed.class.encode(parsed)
30
+ file = pool.add_serialized_file(serialized)
31
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
32
+ imports = [
33
+ ["google.cloud.aiplatform.v1.Schedule", "google/cloud/aiplatform/v1/schedule.proto"],
34
+ ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"],
35
+ ]
36
+ imports.each do |type_name, expected_filename|
37
+ import_file = pool.lookup(type_name).file_descriptor
38
+ if import_file.name != expected_filename
39
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
40
+ end
41
+ end
42
+ warn "Each proto file must use a consistent fully-qualified name."
43
+ warn "This will become an error in the next major version."
44
+ end
45
+
46
+ module Google
47
+ module Cloud
48
+ module AIPlatform
49
+ module V1
50
+ CreateScheduleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.CreateScheduleRequest").msgclass
51
+ GetScheduleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.GetScheduleRequest").msgclass
52
+ ListSchedulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.ListSchedulesRequest").msgclass
53
+ ListSchedulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.ListSchedulesResponse").msgclass
54
+ DeleteScheduleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.DeleteScheduleRequest").msgclass
55
+ PauseScheduleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.PauseScheduleRequest").msgclass
56
+ ResumeScheduleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.ResumeScheduleRequest").msgclass
57
+ UpdateScheduleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.UpdateScheduleRequest").msgclass
58
+ end
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,74 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/cloud/aiplatform/v1/schedule_service.proto for package 'Google.Cloud.AIPlatform.V1'
3
+ # Original file comments:
4
+ # Copyright 2023 Google LLC
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+
19
+ require 'grpc'
20
+ require 'google/cloud/aiplatform/v1/schedule_service_pb'
21
+
22
+ module Google
23
+ module Cloud
24
+ module AIPlatform
25
+ module V1
26
+ module ScheduleService
27
+ # A service for creating and managing Vertex AI's Schedule resources to
28
+ # periodically launch shceudled runs to make API calls.
29
+ class Service
30
+
31
+ include ::GRPC::GenericService
32
+
33
+ self.marshal_class_method = :encode
34
+ self.unmarshal_class_method = :decode
35
+ self.service_name = 'google.cloud.aiplatform.v1.ScheduleService'
36
+
37
+ # Creates a Schedule.
38
+ rpc :CreateSchedule, ::Google::Cloud::AIPlatform::V1::CreateScheduleRequest, ::Google::Cloud::AIPlatform::V1::Schedule
39
+ # Deletes a Schedule.
40
+ rpc :DeleteSchedule, ::Google::Cloud::AIPlatform::V1::DeleteScheduleRequest, ::Google::Longrunning::Operation
41
+ # Gets a Schedule.
42
+ rpc :GetSchedule, ::Google::Cloud::AIPlatform::V1::GetScheduleRequest, ::Google::Cloud::AIPlatform::V1::Schedule
43
+ # Lists Schedules in a Location.
44
+ rpc :ListSchedules, ::Google::Cloud::AIPlatform::V1::ListSchedulesRequest, ::Google::Cloud::AIPlatform::V1::ListSchedulesResponse
45
+ # Pauses a Schedule. Will mark
46
+ # [Schedule.state][google.cloud.aiplatform.v1.Schedule.state] to 'PAUSED'. If
47
+ # the schedule is paused, no new runs will be created. Already created runs
48
+ # will NOT be paused or canceled.
49
+ rpc :PauseSchedule, ::Google::Cloud::AIPlatform::V1::PauseScheduleRequest, ::Google::Protobuf::Empty
50
+ # Resumes a paused Schedule to start scheduling new runs. Will mark
51
+ # [Schedule.state][google.cloud.aiplatform.v1.Schedule.state] to 'ACTIVE'.
52
+ # Only paused Schedule can be resumed.
53
+ #
54
+ # When the Schedule is resumed, new runs will be scheduled starting from the
55
+ # next execution time after the current time based on the time_specification
56
+ # in the Schedule. If [Schedule.catchUp][] is set up true, all
57
+ # missed runs will be scheduled for backfill first.
58
+ rpc :ResumeSchedule, ::Google::Cloud::AIPlatform::V1::ResumeScheduleRequest, ::Google::Protobuf::Empty
59
+ # Updates an active or paused Schedule.
60
+ #
61
+ # When the Schedule is updated, new runs will be scheduled starting from the
62
+ # updated next execution time after the update time based on the
63
+ # time_specification in the updated Schedule. All unstarted runs before the
64
+ # update time will be skipped while already created runs will NOT be paused
65
+ # or canceled.
66
+ rpc :UpdateSchedule, ::Google::Cloud::AIPlatform::V1::UpdateScheduleRequest, ::Google::Cloud::AIPlatform::V1::Schedule
67
+ end
68
+
69
+ Stub = Service.rpc_stub_class
70
+ end
71
+ end
72
+ end
73
+ end
74
+ end
@@ -0,0 +1,152 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module AIPlatform
23
+ module V1
24
+ # An instance of a Schedule periodically schedules runs to make API calls based
25
+ # on user specified time specification and API request type.
26
+ # @!attribute [rw] cron
27
+ # @return [::String]
28
+ # Cron schedule (https://en.wikipedia.org/wiki/Cron) to launch scheduled
29
+ # runs. To explicitly set a timezone to the cron tab, apply a prefix in the
30
+ # cron tab: "CRON_TZ=$\\{IANA_TIME_ZONE}" or "TZ=$\\{IANA_TIME_ZONE}".
31
+ # The $\\{IANA_TIME_ZONE} may only be a valid string from IANA time zone
32
+ # database. For example, "CRON_TZ=America/New_York 1 * * * *", or
33
+ # "TZ=America/New_York 1 * * * *".
34
+ # @!attribute [rw] create_pipeline_job_request
35
+ # @return [::Google::Cloud::AIPlatform::V1::CreatePipelineJobRequest]
36
+ # Request for
37
+ # {::Google::Cloud::AIPlatform::V1::PipelineService::Client#create_pipeline_job PipelineService.CreatePipelineJob}.
38
+ # CreatePipelineJobRequest.parent field is required (format:
39
+ # projects/\\{project}/locations/\\{location}).
40
+ # @!attribute [r] name
41
+ # @return [::String]
42
+ # Output only. The resource name of the Schedule.
43
+ # @!attribute [rw] display_name
44
+ # @return [::String]
45
+ # Required. User provided name of the Schedule.
46
+ # The name can be up to 128 characters long and can consist of any UTF-8
47
+ # characters.
48
+ # @!attribute [rw] start_time
49
+ # @return [::Google::Protobuf::Timestamp]
50
+ # Optional. Timestamp after which the first run can be scheduled.
51
+ # Default to Schedule create time if not specified.
52
+ # @!attribute [rw] end_time
53
+ # @return [::Google::Protobuf::Timestamp]
54
+ # Optional. Timestamp after which no new runs can be scheduled.
55
+ # If specified, The schedule will be completed when either
56
+ # end_time is reached or when scheduled_run_count >= max_run_count.
57
+ # If not specified, new runs will keep getting scheduled until this Schedule
58
+ # is paused or deleted. Already scheduled runs will be allowed to complete.
59
+ # Unset if not specified.
60
+ # @!attribute [rw] max_run_count
61
+ # @return [::Integer]
62
+ # Optional. Maximum run count of the schedule.
63
+ # If specified, The schedule will be completed when either
64
+ # started_run_count >= max_run_count or when end_time is reached.
65
+ # If not specified, new runs will keep getting scheduled until this Schedule
66
+ # is paused or deleted. Already scheduled runs will be allowed to complete.
67
+ # Unset if not specified.
68
+ # @!attribute [r] started_run_count
69
+ # @return [::Integer]
70
+ # Output only. The number of runs started by this schedule.
71
+ # @!attribute [r] state
72
+ # @return [::Google::Cloud::AIPlatform::V1::Schedule::State]
73
+ # Output only. The state of this Schedule.
74
+ # @!attribute [r] create_time
75
+ # @return [::Google::Protobuf::Timestamp]
76
+ # Output only. Timestamp when this Schedule was created.
77
+ # @!attribute [r] update_time
78
+ # @return [::Google::Protobuf::Timestamp]
79
+ # Output only. Timestamp when this Schedule was updated.
80
+ # @!attribute [r] next_run_time
81
+ # @return [::Google::Protobuf::Timestamp]
82
+ # Output only. Timestamp when this Schedule should schedule the next run.
83
+ # Having a next_run_time in the past means the runs are being started
84
+ # behind schedule.
85
+ # @!attribute [r] last_pause_time
86
+ # @return [::Google::Protobuf::Timestamp]
87
+ # Output only. Timestamp when this Schedule was last paused.
88
+ # Unset if never paused.
89
+ # @!attribute [r] last_resume_time
90
+ # @return [::Google::Protobuf::Timestamp]
91
+ # Output only. Timestamp when this Schedule was last resumed.
92
+ # Unset if never resumed from pause.
93
+ # @!attribute [rw] max_concurrent_run_count
94
+ # @return [::Integer]
95
+ # Required. Maximum number of runs that can be started concurrently for this
96
+ # Schedule. This is the limit for starting the scheduled requests and not the
97
+ # execution of the operations/jobs created by the requests (if applicable).
98
+ # @!attribute [rw] allow_queueing
99
+ # @return [::Boolean]
100
+ # Optional. Whether new scheduled runs can be queued when max_concurrent_runs
101
+ # limit is reached. If set to true, new runs will be queued instead of
102
+ # skipped. Default to false.
103
+ # @!attribute [r] catch_up
104
+ # @return [::Boolean]
105
+ # Output only. Whether to backfill missed runs when the schedule is resumed
106
+ # from PAUSED state. If set to true, all missed runs will be scheduled. New
107
+ # runs will be scheduled after the backfill is complete. Default to false.
108
+ # @!attribute [r] last_scheduled_run_response
109
+ # @return [::Google::Cloud::AIPlatform::V1::Schedule::RunResponse]
110
+ # Output only. Response of the last scheduled run.
111
+ # This is the response for starting the scheduled requests and not the
112
+ # execution of the operations/jobs created by the requests (if applicable).
113
+ # Unset if no run has been scheduled yet.
114
+ class Schedule
115
+ include ::Google::Protobuf::MessageExts
116
+ extend ::Google::Protobuf::MessageExts::ClassMethods
117
+
118
+ # Status of a scheduled run.
119
+ # @!attribute [rw] scheduled_run_time
120
+ # @return [::Google::Protobuf::Timestamp]
121
+ # The scheduled run time based on the user-specified schedule.
122
+ # @!attribute [rw] run_response
123
+ # @return [::String]
124
+ # The response of the scheduled run.
125
+ class RunResponse
126
+ include ::Google::Protobuf::MessageExts
127
+ extend ::Google::Protobuf::MessageExts::ClassMethods
128
+ end
129
+
130
+ # Possible state of the schedule.
131
+ module State
132
+ # Unspecified.
133
+ STATE_UNSPECIFIED = 0
134
+
135
+ # The Schedule is active. Runs are being scheduled on the user-specified
136
+ # timespec.
137
+ ACTIVE = 1
138
+
139
+ # The schedule is paused. No new runs will be created until the schedule
140
+ # is resumed. Already started runs will be allowed to complete.
141
+ PAUSED = 2
142
+
143
+ # The Schedule is completed. No new runs will be scheduled. Already started
144
+ # runs will be allowed to complete. Schedules in completed state cannot be
145
+ # paused or resumed.
146
+ COMPLETED = 3
147
+ end
148
+ end
149
+ end
150
+ end
151
+ end
152
+ end