google-cloud-batch-v1 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 67910a1809b1477ba0ceb3fbcf99b860d6a777e8e349f95e6cdc56e5df329d03
4
- data.tar.gz: 51037b3161059caef8a9575ba7f3506e0187c90362789ffe27dd2327c31173ad
3
+ metadata.gz: 906c4eaa4cf770d9782cea5e2c37d5148edfa6564e2adc25905c634f43cd24aa
4
+ data.tar.gz: 3f48ab217caa5c4f29b0b496f566c79793fc1f14e90b7a83099c32fb2faff16f
5
5
  SHA512:
6
- metadata.gz: 908b63288d33fe0075641ed4e88d3d507951a7aa5bed609b1bf22b4945bda64c7f3c73abcaca61d2f103d4646add950f66ea5a250ec09d059560e2b61ccd3584
7
- data.tar.gz: 6f4eaafe78b6a48b342829e90ff4dcaeb1baebca6a895241631baeb63057156da896045b9200043f7c9009c2f476b262b4debd05f6e5a223a74ed2d3d0e4dd84
6
+ metadata.gz: 85f67730e7066a0b49c121cb05928a4b66970d830319400387cbe3fe717b7ddcf4137efc120f487fc653a431b5a79fb2637f6eff984e694e606cf4bab5622244
7
+ data.tar.gz: 49e60517d57b7cabe4c8842fc75c5f797f1b2ca7de176a3b010e5fe03d036c16a407064e5689bbeb1c2d1d6325bbc449e343f8fbf2e15a09024e2152f32fd88e
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/batch/v1/batch.proto
3
4
 
@@ -13,57 +14,34 @@ require 'google/longrunning/operations_pb'
13
14
  require 'google/protobuf/empty_pb'
14
15
  require 'google/protobuf/timestamp_pb'
15
16
 
16
- Google::Protobuf::DescriptorPool.generated_pool.build do
17
- add_file("google/cloud/batch/v1/batch.proto", :syntax => :proto3) do
18
- add_message "google.cloud.batch.v1.CreateJobRequest" do
19
- optional :parent, :string, 1
20
- optional :job_id, :string, 2
21
- optional :job, :message, 3, "google.cloud.batch.v1.Job"
22
- optional :request_id, :string, 4
23
- end
24
- add_message "google.cloud.batch.v1.GetJobRequest" do
25
- optional :name, :string, 1
26
- end
27
- add_message "google.cloud.batch.v1.DeleteJobRequest" do
28
- optional :name, :string, 1
29
- optional :reason, :string, 2
30
- optional :request_id, :string, 4
31
- end
32
- add_message "google.cloud.batch.v1.ListJobsRequest" do
33
- optional :parent, :string, 1
34
- optional :filter, :string, 4
35
- optional :page_size, :int32, 2
36
- optional :page_token, :string, 3
37
- end
38
- add_message "google.cloud.batch.v1.ListJobsResponse" do
39
- repeated :jobs, :message, 1, "google.cloud.batch.v1.Job"
40
- optional :next_page_token, :string, 2
41
- repeated :unreachable, :string, 3
42
- end
43
- add_message "google.cloud.batch.v1.ListTasksRequest" do
44
- optional :parent, :string, 1
45
- optional :filter, :string, 2
46
- optional :page_size, :int32, 3
47
- optional :page_token, :string, 4
48
- end
49
- add_message "google.cloud.batch.v1.ListTasksResponse" do
50
- repeated :tasks, :message, 1, "google.cloud.batch.v1.Task"
51
- optional :next_page_token, :string, 2
52
- repeated :unreachable, :string, 3
53
- end
54
- add_message "google.cloud.batch.v1.GetTaskRequest" do
55
- optional :name, :string, 1
56
- end
57
- add_message "google.cloud.batch.v1.OperationMetadata" do
58
- optional :create_time, :message, 1, "google.protobuf.Timestamp"
59
- optional :end_time, :message, 2, "google.protobuf.Timestamp"
60
- optional :target, :string, 3
61
- optional :verb, :string, 4
62
- optional :status_message, :string, 5
63
- optional :requested_cancellation, :bool, 6
64
- optional :api_version, :string, 7
17
+
18
+ descriptor_data = "\n!google/cloud/batch/v1/batch.proto\x12\x15google.cloud.batch.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/cloud/batch/v1/job.proto\x1a google/cloud/batch/v1/task.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9b\x01\n\x10\x43reateJobRequest\x12\x30\n\x06parent\x18\x01 \x01(\tB \xe0\x41\x02\xfa\x41\x1a\x12\x18\x62\x61tch.googleapis.com/Job\x12\x0e\n\x06job_id\x18\x02 \x01(\t\x12,\n\x03job\x18\x03 \x01(\x0b\x32\x1a.google.cloud.batch.v1.JobB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"?\n\rGetJobRequest\x12.\n\x04name\x18\x01 \x01(\tB \xe0\x41\x02\xfa\x41\x1a\n\x18\x62\x61tch.googleapis.com/Job\"N\n\x10\x44\x65leteJobRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x06reason\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"X\n\x0fListJobsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"j\n\x10ListJobsResponse\x12(\n\x04jobs\x18\x01 \x03(\x0b\x32\x1a.google.cloud.batch.v1.Job\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x81\x01\n\x10ListTasksRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x62\x61tch.googleapis.com/TaskGroup\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\"m\n\x11ListTasksResponse\x12*\n\x05tasks\x18\x01 \x03(\x0b\x32\x1b.google.cloud.batch.v1.Task\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"A\n\x0eGetTaskRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x62\x61tch.googleapis.com/Task\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x32\xb6\x08\n\x0c\x42\x61tchService\x12\x9b\x01\n\tCreateJob\x12\'.google.cloud.batch.v1.CreateJobRequest\x1a\x1a.google.cloud.batch.v1.Job\"I\x82\xd3\xe4\x93\x02/\"(/v1/{parent=projects/*/locations/*}/jobs:\x03job\xda\x41\x11parent,job,job_id\x12\x83\x01\n\x06GetJob\x12$.google.cloud.batch.v1.GetJobRequest\x1a\x1a.google.cloud.batch.v1.Job\"7\x82\xd3\xe4\x93\x02*\x12(/v1/{name=projects/*/locations/*/jobs/*}\xda\x41\x04name\x12\xcf\x01\n\tDeleteJob\x12\'.google.cloud.batch.v1.DeleteJobRequest\x1a\x1d.google.longrunning.Operation\"z\x82\xd3\xe4\x93\x02**(/v1/{name=projects/*/locations/*/jobs/*}\xda\x41\x04name\xca\x41@\n\x15google.protobuf.Empty\x12\'google.cloud.batch.v1.OperationMetadata\x12\x96\x01\n\x08ListJobs\x12&.google.cloud.batch.v1.ListJobsRequest\x1a\'.google.cloud.batch.v1.ListJobsResponse\"9\x82\xd3\xe4\x93\x02*\x12(/v1/{parent=projects/*/locations/*}/jobs\xda\x41\x06parent\x12\x9b\x01\n\x07GetTask\x12%.google.cloud.batch.v1.GetTaskRequest\x1a\x1b.google.cloud.batch.v1.Task\"L\x82\xd3\xe4\x93\x02?\x12=/v1/{name=projects/*/locations/*/jobs/*/taskGroups/*/tasks/*}\xda\x41\x04name\x12\xae\x01\n\tListTasks\x12\'.google.cloud.batch.v1.ListTasksRequest\x1a(.google.cloud.batch.v1.ListTasksResponse\"N\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/locations/*/jobs/*/taskGroups/*}/tasks\xda\x41\x06parent\x1aH\xca\x41\x14\x62\x61tch.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xab\x01\n\x19\x63om.google.cloud.batch.v1B\nBatchProtoP\x01Z/cloud.google.com/go/batch/apiv1/batchpb;batchpb\xa2\x02\x03GCB\xaa\x02\x15Google.Cloud.Batch.V1\xca\x02\x15Google\\Cloud\\Batch\\V1\xea\x02\x18Google::Cloud::Batch::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.batch.v1.Job", "google/cloud/batch/v1/job.proto"],
34
+ ["google.cloud.batch.v1.Task", "google/cloud/batch/v1/task.proto"],
35
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
36
+ ]
37
+ imports.each do |type_name, expected_filename|
38
+ import_file = pool.lookup(type_name).file_descriptor
39
+ if import_file.name != expected_filename
40
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
65
41
  end
66
42
  end
43
+ warn "Each proto file must use a consistent fully-qualified name."
44
+ warn "This will become an error in the next major version."
67
45
  end
68
46
 
69
47
  module Google
@@ -150,7 +150,7 @@ module Google
150
150
  credentials = @config.credentials
151
151
  # Use self-signed JWT if the endpoint is unchanged from default,
152
152
  # but only if the default endpoint does not have a region prefix.
153
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
153
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
154
154
  !@config.endpoint.split(".").first.include?("-")
155
155
  credentials ||= Credentials.default scope: @config.scope,
156
156
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -866,7 +866,9 @@ module Google
866
866
  class Configuration
867
867
  extend ::Gapic::Config
868
868
 
869
- config_attr :endpoint, "batch.googleapis.com", ::String
869
+ DEFAULT_ENDPOINT = "batch.googleapis.com"
870
+
871
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
870
872
  config_attr :credentials, nil do |value|
871
873
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
872
874
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -664,7 +664,9 @@ module Google
664
664
  class Configuration
665
665
  extend ::Gapic::Config
666
666
 
667
- config_attr :endpoint, "batch.googleapis.com", ::String
667
+ DEFAULT_ENDPOINT = "batch.googleapis.com"
668
+
669
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
668
670
  config_attr :credentials, nil do |value|
669
671
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
670
672
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -146,7 +146,7 @@ module Google
146
146
  credentials = @config.credentials
147
147
  # Use self-signed JWT if the endpoint is unchanged from default,
148
148
  # but only if the default endpoint does not have a region prefix.
149
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
149
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
150
150
  !@config.endpoint.split(".").first.include?("-")
151
151
  credentials ||= Credentials.default scope: @config.scope,
152
152
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -694,7 +694,9 @@ module Google
694
694
  class Configuration
695
695
  extend ::Gapic::Config
696
696
 
697
- config_attr :endpoint, "batch.googleapis.com", ::String
697
+ DEFAULT_ENDPOINT = "batch.googleapis.com"
698
+
699
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
698
700
  config_attr :credentials, nil do |value|
699
701
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
700
702
  allowed.any? { |klass| klass === value }
@@ -446,7 +446,9 @@ module Google
446
446
  class Configuration
447
447
  extend ::Gapic::Config
448
448
 
449
- config_attr :endpoint, "batch.googleapis.com", ::String
449
+ DEFAULT_ENDPOINT = "batch.googleapis.com"
450
+
451
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
450
452
  config_attr :credentials, nil do |value|
451
453
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
452
454
  allowed.any? { |klass| klass === value }
@@ -567,7 +569,7 @@ module Google
567
569
 
568
570
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb
569
571
  query_string_params = if query_string_params.any?
570
- query_string_params.to_h { |p| p.split("=", 2) }
572
+ query_string_params.to_h { |p| p.split "=", 2 }
571
573
  else
572
574
  {}
573
575
  end
@@ -605,7 +607,7 @@ module Google
605
607
 
606
608
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb
607
609
  query_string_params = if query_string_params.any?
608
- query_string_params.to_h { |p| p.split("=", 2) }
610
+ query_string_params.to_h { |p| p.split "=", 2 }
609
611
  else
610
612
  {}
611
613
  end
@@ -643,7 +645,7 @@ module Google
643
645
 
644
646
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb
645
647
  query_string_params = if query_string_params.any?
646
- query_string_params.to_h { |p| p.split("=", 2) }
648
+ query_string_params.to_h { |p| p.split "=", 2 }
647
649
  else
648
650
  {}
649
651
  end
@@ -681,7 +683,7 @@ module Google
681
683
 
682
684
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb
683
685
  query_string_params = if query_string_params.any?
684
- query_string_params.to_h { |p| p.split("=", 2) }
686
+ query_string_params.to_h { |p| p.split "=", 2 }
685
687
  else
686
688
  {}
687
689
  end
@@ -59,7 +59,7 @@ module Google
59
59
 
60
60
  verb, uri, query_string_params, body = ServiceStub.transcode_create_job_request request_pb
61
61
  query_string_params = if query_string_params.any?
62
- query_string_params.to_h { |p| p.split("=", 2) }
62
+ query_string_params.to_h { |p| p.split "=", 2 }
63
63
  else
64
64
  {}
65
65
  end
@@ -97,7 +97,7 @@ module Google
97
97
 
98
98
  verb, uri, query_string_params, body = ServiceStub.transcode_get_job_request request_pb
99
99
  query_string_params = if query_string_params.any?
100
- query_string_params.to_h { |p| p.split("=", 2) }
100
+ query_string_params.to_h { |p| p.split "=", 2 }
101
101
  else
102
102
  {}
103
103
  end
@@ -135,7 +135,7 @@ module Google
135
135
 
136
136
  verb, uri, query_string_params, body = ServiceStub.transcode_delete_job_request request_pb
137
137
  query_string_params = if query_string_params.any?
138
- query_string_params.to_h { |p| p.split("=", 2) }
138
+ query_string_params.to_h { |p| p.split "=", 2 }
139
139
  else
140
140
  {}
141
141
  end
@@ -173,7 +173,7 @@ module Google
173
173
 
174
174
  verb, uri, query_string_params, body = ServiceStub.transcode_list_jobs_request request_pb
175
175
  query_string_params = if query_string_params.any?
176
- query_string_params.to_h { |p| p.split("=", 2) }
176
+ query_string_params.to_h { |p| p.split "=", 2 }
177
177
  else
178
178
  {}
179
179
  end
@@ -211,7 +211,7 @@ module Google
211
211
 
212
212
  verb, uri, query_string_params, body = ServiceStub.transcode_get_task_request request_pb
213
213
  query_string_params = if query_string_params.any?
214
- query_string_params.to_h { |p| p.split("=", 2) }
214
+ query_string_params.to_h { |p| p.split "=", 2 }
215
215
  else
216
216
  {}
217
217
  end
@@ -249,7 +249,7 @@ module Google
249
249
 
250
250
  verb, uri, query_string_params, body = ServiceStub.transcode_list_tasks_request request_pb
251
251
  query_string_params = if query_string_params.any?
252
- query_string_params.to_h { |p| p.split("=", 2) }
252
+ query_string_params.to_h { |p| p.split "=", 2 }
253
253
  else
254
254
  {}
255
255
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/batch/v1/job.proto
3
4
 
@@ -9,149 +10,34 @@ require 'google/cloud/batch/v1/task_pb'
9
10
  require 'google/protobuf/duration_pb'
10
11
  require 'google/protobuf/timestamp_pb'
11
12
 
12
- Google::Protobuf::DescriptorPool.generated_pool.build do
13
- add_file("google/cloud/batch/v1/job.proto", :syntax => :proto3) do
14
- add_message "google.cloud.batch.v1.Job" do
15
- optional :name, :string, 1
16
- optional :uid, :string, 2
17
- optional :priority, :int64, 3
18
- repeated :task_groups, :message, 4, "google.cloud.batch.v1.TaskGroup"
19
- optional :allocation_policy, :message, 7, "google.cloud.batch.v1.AllocationPolicy"
20
- map :labels, :string, :string, 8
21
- optional :status, :message, 9, "google.cloud.batch.v1.JobStatus"
22
- optional :create_time, :message, 11, "google.protobuf.Timestamp"
23
- optional :update_time, :message, 12, "google.protobuf.Timestamp"
24
- optional :logs_policy, :message, 13, "google.cloud.batch.v1.LogsPolicy"
25
- repeated :notifications, :message, 14, "google.cloud.batch.v1.JobNotification"
26
- end
27
- add_message "google.cloud.batch.v1.LogsPolicy" do
28
- optional :destination, :enum, 1, "google.cloud.batch.v1.LogsPolicy.Destination"
29
- optional :logs_path, :string, 2
30
- end
31
- add_enum "google.cloud.batch.v1.LogsPolicy.Destination" do
32
- value :DESTINATION_UNSPECIFIED, 0
33
- value :CLOUD_LOGGING, 1
34
- value :PATH, 2
35
- end
36
- add_message "google.cloud.batch.v1.JobStatus" do
37
- optional :state, :enum, 1, "google.cloud.batch.v1.JobStatus.State"
38
- repeated :status_events, :message, 2, "google.cloud.batch.v1.StatusEvent"
39
- map :task_groups, :string, :message, 4, "google.cloud.batch.v1.JobStatus.TaskGroupStatus"
40
- optional :run_duration, :message, 5, "google.protobuf.Duration"
41
- end
42
- add_message "google.cloud.batch.v1.JobStatus.InstanceStatus" do
43
- optional :machine_type, :string, 1
44
- optional :provisioning_model, :enum, 2, "google.cloud.batch.v1.AllocationPolicy.ProvisioningModel"
45
- optional :task_pack, :int64, 3
46
- optional :boot_disk, :message, 4, "google.cloud.batch.v1.AllocationPolicy.Disk"
47
- end
48
- add_message "google.cloud.batch.v1.JobStatus.TaskGroupStatus" do
49
- map :counts, :string, :int64, 1
50
- repeated :instances, :message, 2, "google.cloud.batch.v1.JobStatus.InstanceStatus"
51
- end
52
- add_enum "google.cloud.batch.v1.JobStatus.State" do
53
- value :STATE_UNSPECIFIED, 0
54
- value :QUEUED, 1
55
- value :SCHEDULED, 2
56
- value :RUNNING, 3
57
- value :SUCCEEDED, 4
58
- value :FAILED, 5
59
- value :DELETION_IN_PROGRESS, 6
60
- end
61
- add_message "google.cloud.batch.v1.JobNotification" do
62
- optional :pubsub_topic, :string, 1
63
- optional :message, :message, 2, "google.cloud.batch.v1.JobNotification.Message"
64
- end
65
- add_message "google.cloud.batch.v1.JobNotification.Message" do
66
- optional :type, :enum, 1, "google.cloud.batch.v1.JobNotification.Type"
67
- optional :new_job_state, :enum, 2, "google.cloud.batch.v1.JobStatus.State"
68
- optional :new_task_state, :enum, 3, "google.cloud.batch.v1.TaskStatus.State"
69
- end
70
- add_enum "google.cloud.batch.v1.JobNotification.Type" do
71
- value :TYPE_UNSPECIFIED, 0
72
- value :JOB_STATE_CHANGED, 1
73
- value :TASK_STATE_CHANGED, 2
74
- end
75
- add_message "google.cloud.batch.v1.AllocationPolicy" do
76
- optional :location, :message, 1, "google.cloud.batch.v1.AllocationPolicy.LocationPolicy"
77
- repeated :instances, :message, 8, "google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate"
78
- optional :service_account, :message, 9, "google.cloud.batch.v1.ServiceAccount"
79
- map :labels, :string, :string, 6
80
- optional :network, :message, 7, "google.cloud.batch.v1.AllocationPolicy.NetworkPolicy"
81
- optional :placement, :message, 10, "google.cloud.batch.v1.AllocationPolicy.PlacementPolicy"
82
- end
83
- add_message "google.cloud.batch.v1.AllocationPolicy.LocationPolicy" do
84
- repeated :allowed_locations, :string, 1
85
- end
86
- add_message "google.cloud.batch.v1.AllocationPolicy.Disk" do
87
- optional :type, :string, 1
88
- optional :size_gb, :int64, 2
89
- optional :disk_interface, :string, 6
90
- oneof :data_source do
91
- optional :image, :string, 4
92
- optional :snapshot, :string, 5
93
- end
94
- end
95
- add_message "google.cloud.batch.v1.AllocationPolicy.AttachedDisk" do
96
- optional :device_name, :string, 3
97
- oneof :attached do
98
- optional :new_disk, :message, 1, "google.cloud.batch.v1.AllocationPolicy.Disk"
99
- optional :existing_disk, :string, 2
100
- end
101
- end
102
- add_message "google.cloud.batch.v1.AllocationPolicy.Accelerator" do
103
- optional :type, :string, 1
104
- optional :count, :int64, 2
105
- optional :install_gpu_drivers, :bool, 3
106
- end
107
- add_message "google.cloud.batch.v1.AllocationPolicy.InstancePolicy" do
108
- optional :machine_type, :string, 2
109
- optional :min_cpu_platform, :string, 3
110
- optional :provisioning_model, :enum, 4, "google.cloud.batch.v1.AllocationPolicy.ProvisioningModel"
111
- repeated :accelerators, :message, 5, "google.cloud.batch.v1.AllocationPolicy.Accelerator"
112
- optional :boot_disk, :message, 8, "google.cloud.batch.v1.AllocationPolicy.Disk"
113
- repeated :disks, :message, 6, "google.cloud.batch.v1.AllocationPolicy.AttachedDisk"
114
- end
115
- add_message "google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate" do
116
- optional :install_gpu_drivers, :bool, 3
117
- oneof :policy_template do
118
- optional :policy, :message, 1, "google.cloud.batch.v1.AllocationPolicy.InstancePolicy"
119
- optional :instance_template, :string, 2
120
- end
121
- end
122
- add_message "google.cloud.batch.v1.AllocationPolicy.NetworkInterface" do
123
- optional :network, :string, 1
124
- optional :subnetwork, :string, 2
125
- optional :no_external_ip_address, :bool, 3
126
- end
127
- add_message "google.cloud.batch.v1.AllocationPolicy.NetworkPolicy" do
128
- repeated :network_interfaces, :message, 1, "google.cloud.batch.v1.AllocationPolicy.NetworkInterface"
129
- end
130
- add_message "google.cloud.batch.v1.AllocationPolicy.PlacementPolicy" do
131
- optional :collocation, :string, 1
132
- optional :max_distance, :int64, 2
133
- end
134
- add_enum "google.cloud.batch.v1.AllocationPolicy.ProvisioningModel" do
135
- value :PROVISIONING_MODEL_UNSPECIFIED, 0
136
- value :STANDARD, 1
137
- value :SPOT, 2
138
- value :PREEMPTIBLE, 3
139
- end
140
- add_message "google.cloud.batch.v1.TaskGroup" do
141
- optional :name, :string, 1
142
- optional :task_spec, :message, 3, "google.cloud.batch.v1.TaskSpec"
143
- optional :task_count, :int64, 4
144
- optional :parallelism, :int64, 5
145
- repeated :task_environments, :message, 9, "google.cloud.batch.v1.Environment"
146
- optional :task_count_per_node, :int64, 10
147
- optional :require_hosts_file, :bool, 11
148
- optional :permissive_ssh, :bool, 12
149
- end
150
- add_message "google.cloud.batch.v1.ServiceAccount" do
151
- optional :email, :string, 1
152
- repeated :scopes, :string, 2
13
+
14
+ descriptor_data = "\n\x1fgoogle/cloud/batch/v1/job.proto\x12\x15google.cloud.batch.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/cloud/batch/v1/task.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x90\x05\n\x03Job\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x08priority\x18\x03 \x01(\x03\x12:\n\x0btask_groups\x18\x04 \x03(\x0b\x32 .google.cloud.batch.v1.TaskGroupB\x03\xe0\x41\x02\x12\x42\n\x11\x61llocation_policy\x18\x07 \x01(\x0b\x32\'.google.cloud.batch.v1.AllocationPolicy\x12\x36\n\x06labels\x18\x08 \x03(\x0b\x32&.google.cloud.batch.v1.Job.LabelsEntry\x12\x35\n\x06status\x18\t \x01(\x0b\x32 .google.cloud.batch.v1.JobStatusB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\x0blogs_policy\x18\r \x01(\x0b\x32!.google.cloud.batch.v1.LogsPolicy\x12=\n\rnotifications\x18\x0e \x03(\x0b\x32&.google.cloud.batch.v1.JobNotification\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:Q\xea\x41N\n\x18\x62\x61tch.googleapis.com/Job\x12\x32projects/{project}/locations/{location}/jobs/{job}\"\xac\x01\n\nLogsPolicy\x12\x42\n\x0b\x64\x65stination\x18\x01 \x01(\x0e\x32-.google.cloud.batch.v1.LogsPolicy.Destination\x12\x11\n\tlogs_path\x18\x02 \x01(\t\"G\n\x0b\x44\x65stination\x12\x1b\n\x17\x44\x45STINATION_UNSPECIFIED\x10\x00\x12\x11\n\rCLOUD_LOGGING\x10\x01\x12\x08\n\x04PATH\x10\x02\"\x80\x07\n\tJobStatus\x12\x35\n\x05state\x18\x01 \x01(\x0e\x32&.google.cloud.batch.v1.JobStatus.State\x12\x39\n\rstatus_events\x18\x02 \x03(\x0b\x32\".google.cloud.batch.v1.StatusEvent\x12\x45\n\x0btask_groups\x18\x04 \x03(\x0b\x32\x30.google.cloud.batch.v1.JobStatus.TaskGroupsEntry\x12/\n\x0crun_duration\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\xd1\x01\n\x0eInstanceStatus\x12\x14\n\x0cmachine_type\x18\x01 \x01(\t\x12U\n\x12provisioning_model\x18\x02 \x01(\x0e\x32\x39.google.cloud.batch.v1.AllocationPolicy.ProvisioningModel\x12\x11\n\ttask_pack\x18\x03 \x01(\x03\x12?\n\tboot_disk\x18\x04 \x01(\x0b\x32,.google.cloud.batch.v1.AllocationPolicy.Disk\x1a\xd2\x01\n\x0fTaskGroupStatus\x12L\n\x06\x63ounts\x18\x01 \x03(\x0b\x32<.google.cloud.batch.v1.JobStatus.TaskGroupStatus.CountsEntry\x12\x42\n\tinstances\x18\x02 \x03(\x0b\x32/.google.cloud.batch.v1.JobStatus.InstanceStatus\x1a-\n\x0b\x43ountsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\x1a\x63\n\x0fTaskGroupsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12?\n\x05value\x18\x02 \x01(\x0b\x32\x30.google.cloud.batch.v1.JobStatus.TaskGroupStatus:\x02\x38\x01\"{\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06QUEUED\x10\x01\x12\r\n\tSCHEDULED\x10\x02\x12\x0b\n\x07RUNNING\x10\x03\x12\r\n\tSUCCEEDED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\x18\n\x14\x44\x45LETION_IN_PROGRESS\x10\x06\"\xfc\x02\n\x0fJobNotification\x12\x14\n\x0cpubsub_topic\x18\x01 \x01(\t\x12?\n\x07message\x18\x02 \x01(\x0b\x32..google.cloud.batch.v1.JobNotification.Message\x1a\xc4\x01\n\x07Message\x12\x39\n\x04type\x18\x01 \x01(\x0e\x32+.google.cloud.batch.v1.JobNotification.Type\x12=\n\rnew_job_state\x18\x02 \x01(\x0e\x32&.google.cloud.batch.v1.JobStatus.State\x12?\n\x0enew_task_state\x18\x03 \x01(\x0e\x32\'.google.cloud.batch.v1.TaskStatus.State\"K\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11JOB_STATE_CHANGED\x10\x01\x12\x16\n\x12TASK_STATE_CHANGED\x10\x02\"\xf2\r\n\x10\x41llocationPolicy\x12H\n\x08location\x18\x01 \x01(\x0b\x32\x36.google.cloud.batch.v1.AllocationPolicy.LocationPolicy\x12S\n\tinstances\x18\x08 \x03(\x0b\x32@.google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate\x12>\n\x0fservice_account\x18\t \x01(\x0b\x32%.google.cloud.batch.v1.ServiceAccount\x12\x43\n\x06labels\x18\x06 \x03(\x0b\x32\x33.google.cloud.batch.v1.AllocationPolicy.LabelsEntry\x12\x46\n\x07network\x18\x07 \x01(\x0b\x32\x35.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy\x12J\n\tplacement\x18\n \x01(\x0b\x32\x37.google.cloud.batch.v1.AllocationPolicy.PlacementPolicy\x1a+\n\x0eLocationPolicy\x12\x19\n\x11\x61llowed_locations\x18\x01 \x03(\t\x1aq\n\x04\x44isk\x12\x0f\n\x05image\x18\x04 \x01(\tH\x00\x12\x12\n\x08snapshot\x18\x05 \x01(\tH\x00\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0f\n\x07size_gb\x18\x02 \x01(\x03\x12\x16\n\x0e\x64isk_interface\x18\x06 \x01(\tB\r\n\x0b\x64\x61ta_source\x1a\x8a\x01\n\x0c\x41ttachedDisk\x12@\n\x08new_disk\x18\x01 \x01(\x0b\x32,.google.cloud.batch.v1.AllocationPolicy.DiskH\x00\x12\x17\n\rexisting_disk\x18\x02 \x01(\tH\x00\x12\x13\n\x0b\x64\x65vice_name\x18\x03 \x01(\tB\n\n\x08\x61ttached\x1aK\n\x0b\x41\x63\x63\x65lerator\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\x12\x1f\n\x13install_gpu_drivers\x18\x03 \x01(\x08\x42\x02\x18\x01\x1a\xe8\x02\n\x0eInstancePolicy\x12\x14\n\x0cmachine_type\x18\x02 \x01(\t\x12\x18\n\x10min_cpu_platform\x18\x03 \x01(\t\x12U\n\x12provisioning_model\x18\x04 \x01(\x0e\x32\x39.google.cloud.batch.v1.AllocationPolicy.ProvisioningModel\x12I\n\x0c\x61\x63\x63\x65lerators\x18\x05 \x03(\x0b\x32\x33.google.cloud.batch.v1.AllocationPolicy.Accelerator\x12?\n\tboot_disk\x18\x08 \x01(\x0b\x32,.google.cloud.batch.v1.AllocationPolicy.Disk\x12\x43\n\x05\x64isks\x18\x06 \x03(\x0b\x32\x34.google.cloud.batch.v1.AllocationPolicy.AttachedDisk\x1a\xb1\x01\n\x18InstancePolicyOrTemplate\x12H\n\x06policy\x18\x01 \x01(\x0b\x32\x36.google.cloud.batch.v1.AllocationPolicy.InstancePolicyH\x00\x12\x1b\n\x11instance_template\x18\x02 \x01(\tH\x00\x12\x1b\n\x13install_gpu_drivers\x18\x03 \x01(\x08\x42\x11\n\x0fpolicy_template\x1aW\n\x10NetworkInterface\x12\x0f\n\x07network\x18\x01 \x01(\t\x12\x12\n\nsubnetwork\x18\x02 \x01(\t\x12\x1e\n\x16no_external_ip_address\x18\x03 \x01(\x08\x1a\x65\n\rNetworkPolicy\x12T\n\x12network_interfaces\x18\x01 \x03(\x0b\x32\x38.google.cloud.batch.v1.AllocationPolicy.NetworkInterface\x1a<\n\x0fPlacementPolicy\x12\x13\n\x0b\x63ollocation\x18\x01 \x01(\t\x12\x14\n\x0cmax_distance\x18\x02 \x01(\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"`\n\x11ProvisioningModel\x12\"\n\x1ePROVISIONING_MODEL_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x08\n\x04SPOT\x10\x02\x12\x0f\n\x0bPREEMPTIBLE\x10\x03\"\x81\x03\n\tTaskGroup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x37\n\ttask_spec\x18\x03 \x01(\x0b\x32\x1f.google.cloud.batch.v1.TaskSpecB\x03\xe0\x41\x02\x12\x12\n\ntask_count\x18\x04 \x01(\x03\x12\x13\n\x0bparallelism\x18\x05 \x01(\x03\x12=\n\x11task_environments\x18\t \x03(\x0b\x32\".google.cloud.batch.v1.Environment\x12\x1b\n\x13task_count_per_node\x18\n \x01(\x03\x12\x1a\n\x12require_hosts_file\x18\x0b \x01(\x08\x12\x16\n\x0epermissive_ssh\x18\x0c \x01(\x08:o\xea\x41l\n\x1e\x62\x61tch.googleapis.com/TaskGroup\x12Jprojects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}\"/\n\x0eServiceAccount\x12\r\n\x05\x65mail\x18\x01 \x01(\t\x12\x0e\n\x06scopes\x18\x02 \x03(\tB\xa9\x01\n\x19\x63om.google.cloud.batch.v1B\x08JobProtoP\x01Z/cloud.google.com/go/batch/apiv1/batchpb;batchpb\xa2\x02\x03GCB\xaa\x02\x15Google.Cloud.Batch.V1\xca\x02\x15Google\\Cloud\\Batch\\V1\xea\x02\x18Google::Cloud::Batch::V1b\x06proto3"
15
+
16
+ pool = Google::Protobuf::DescriptorPool.generated_pool
17
+
18
+ begin
19
+ pool.add_serialized_file(descriptor_data)
20
+ rescue TypeError => e
21
+ # Compatibility code: will be removed in the next major version.
22
+ require 'google/protobuf/descriptor_pb'
23
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
24
+ parsed.clear_dependency
25
+ serialized = parsed.class.encode(parsed)
26
+ file = pool.add_serialized_file(serialized)
27
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
28
+ imports = [
29
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
30
+ ["google.cloud.batch.v1.StatusEvent", "google/cloud/batch/v1/task.proto"],
31
+ ["google.protobuf.Duration", "google/protobuf/duration.proto"],
32
+ ]
33
+ imports.each do |type_name, expected_filename|
34
+ import_file = pool.lookup(type_name).file_descriptor
35
+ if import_file.name != expected_filename
36
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
153
37
  end
154
38
  end
39
+ warn "Each proto file must use a consistent fully-qualified name."
40
+ warn "This will become an error in the next major version."
155
41
  end
156
42
 
157
43
  module Google
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/batch/v1/task.proto
3
4
 
@@ -8,104 +9,34 @@ require 'google/cloud/batch/v1/volume_pb'
8
9
  require 'google/protobuf/duration_pb'
9
10
  require 'google/protobuf/timestamp_pb'
10
11
 
11
- Google::Protobuf::DescriptorPool.generated_pool.build do
12
- add_file("google/cloud/batch/v1/task.proto", :syntax => :proto3) do
13
- add_message "google.cloud.batch.v1.ComputeResource" do
14
- optional :cpu_milli, :int64, 1
15
- optional :memory_mib, :int64, 2
16
- optional :boot_disk_mib, :int64, 4
17
- end
18
- add_message "google.cloud.batch.v1.StatusEvent" do
19
- optional :type, :string, 3
20
- optional :description, :string, 1
21
- optional :event_time, :message, 2, "google.protobuf.Timestamp"
22
- optional :task_execution, :message, 4, "google.cloud.batch.v1.TaskExecution"
23
- optional :task_state, :enum, 5, "google.cloud.batch.v1.TaskStatus.State"
24
- end
25
- add_message "google.cloud.batch.v1.TaskExecution" do
26
- optional :exit_code, :int32, 1
27
- end
28
- add_message "google.cloud.batch.v1.TaskStatus" do
29
- optional :state, :enum, 1, "google.cloud.batch.v1.TaskStatus.State"
30
- repeated :status_events, :message, 2, "google.cloud.batch.v1.StatusEvent"
31
- end
32
- add_enum "google.cloud.batch.v1.TaskStatus.State" do
33
- value :STATE_UNSPECIFIED, 0
34
- value :PENDING, 1
35
- value :ASSIGNED, 2
36
- value :RUNNING, 3
37
- value :FAILED, 4
38
- value :SUCCEEDED, 5
39
- value :UNEXECUTED, 6
40
- end
41
- add_message "google.cloud.batch.v1.Runnable" do
42
- optional :ignore_exit_status, :bool, 3
43
- optional :background, :bool, 4
44
- optional :always_run, :bool, 5
45
- optional :environment, :message, 7, "google.cloud.batch.v1.Environment"
46
- optional :timeout, :message, 8, "google.protobuf.Duration"
47
- map :labels, :string, :string, 9
48
- oneof :executable do
49
- optional :container, :message, 1, "google.cloud.batch.v1.Runnable.Container"
50
- optional :script, :message, 2, "google.cloud.batch.v1.Runnable.Script"
51
- optional :barrier, :message, 6, "google.cloud.batch.v1.Runnable.Barrier"
52
- end
53
- end
54
- add_message "google.cloud.batch.v1.Runnable.Container" do
55
- optional :image_uri, :string, 1
56
- repeated :commands, :string, 2
57
- optional :entrypoint, :string, 3
58
- repeated :volumes, :string, 7
59
- optional :options, :string, 8
60
- optional :block_external_network, :bool, 9
61
- optional :username, :string, 10
62
- optional :password, :string, 11
63
- end
64
- add_message "google.cloud.batch.v1.Runnable.Script" do
65
- oneof :command do
66
- optional :path, :string, 1
67
- optional :text, :string, 2
68
- end
69
- end
70
- add_message "google.cloud.batch.v1.Runnable.Barrier" do
71
- optional :name, :string, 1
72
- end
73
- add_message "google.cloud.batch.v1.TaskSpec" do
74
- repeated :runnables, :message, 8, "google.cloud.batch.v1.Runnable"
75
- optional :compute_resource, :message, 3, "google.cloud.batch.v1.ComputeResource"
76
- optional :max_run_duration, :message, 4, "google.protobuf.Duration"
77
- optional :max_retry_count, :int32, 5
78
- repeated :lifecycle_policies, :message, 9, "google.cloud.batch.v1.LifecyclePolicy"
79
- map :environments, :string, :string, 6
80
- repeated :volumes, :message, 7, "google.cloud.batch.v1.Volume"
81
- optional :environment, :message, 10, "google.cloud.batch.v1.Environment"
82
- end
83
- add_message "google.cloud.batch.v1.LifecyclePolicy" do
84
- optional :action, :enum, 1, "google.cloud.batch.v1.LifecyclePolicy.Action"
85
- optional :action_condition, :message, 2, "google.cloud.batch.v1.LifecyclePolicy.ActionCondition"
86
- end
87
- add_message "google.cloud.batch.v1.LifecyclePolicy.ActionCondition" do
88
- repeated :exit_codes, :int32, 1
89
- end
90
- add_enum "google.cloud.batch.v1.LifecyclePolicy.Action" do
91
- value :ACTION_UNSPECIFIED, 0
92
- value :RETRY_TASK, 1
93
- value :FAIL_TASK, 2
94
- end
95
- add_message "google.cloud.batch.v1.Task" do
96
- optional :name, :string, 1
97
- optional :status, :message, 2, "google.cloud.batch.v1.TaskStatus"
98
- end
99
- add_message "google.cloud.batch.v1.Environment" do
100
- map :variables, :string, :string, 1
101
- map :secret_variables, :string, :string, 2
102
- optional :encrypted_variables, :message, 3, "google.cloud.batch.v1.Environment.KMSEnvMap"
103
- end
104
- add_message "google.cloud.batch.v1.Environment.KMSEnvMap" do
105
- optional :key_name, :string, 1
106
- optional :cipher_text, :string, 2
12
+
13
+ descriptor_data = "\n google/cloud/batch/v1/task.proto\x12\x15google.cloud.batch.v1\x1a\x19google/api/resource.proto\x1a\"google/cloud/batch/v1/volume.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"O\n\x0f\x43omputeResource\x12\x11\n\tcpu_milli\x18\x01 \x01(\x03\x12\x12\n\nmemory_mib\x18\x02 \x01(\x03\x12\x15\n\rboot_disk_mib\x18\x04 \x01(\x03\"\xdb\x01\n\x0bStatusEvent\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12.\n\nevent_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12<\n\x0etask_execution\x18\x04 \x01(\x0b\x32$.google.cloud.batch.v1.TaskExecution\x12;\n\ntask_state\x18\x05 \x01(\x0e\x32\'.google.cloud.batch.v1.TaskStatus.State\"\"\n\rTaskExecution\x12\x11\n\texit_code\x18\x01 \x01(\x05\"\xf2\x01\n\nTaskStatus\x12\x36\n\x05state\x18\x01 \x01(\x0e\x32\'.google.cloud.batch.v1.TaskStatus.State\x12\x39\n\rstatus_events\x18\x02 \x03(\x0b\x32\".google.cloud.batch.v1.StatusEvent\"q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0c\n\x08\x41SSIGNED\x10\x02\x12\x0b\n\x07RUNNING\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\r\n\tSUCCEEDED\x10\x05\x12\x0e\n\nUNEXECUTED\x10\x06\"\xde\x05\n\x08Runnable\x12>\n\tcontainer\x18\x01 \x01(\x0b\x32).google.cloud.batch.v1.Runnable.ContainerH\x00\x12\x38\n\x06script\x18\x02 \x01(\x0b\x32&.google.cloud.batch.v1.Runnable.ScriptH\x00\x12:\n\x07\x62\x61rrier\x18\x06 \x01(\x0b\x32\'.google.cloud.batch.v1.Runnable.BarrierH\x00\x12\x1a\n\x12ignore_exit_status\x18\x03 \x01(\x08\x12\x12\n\nbackground\x18\x04 \x01(\x08\x12\x12\n\nalways_run\x18\x05 \x01(\x08\x12\x37\n\x0b\x65nvironment\x18\x07 \x01(\x0b\x32\".google.cloud.batch.v1.Environment\x12*\n\x07timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12;\n\x06labels\x18\t \x03(\x0b\x32+.google.cloud.batch.v1.Runnable.LabelsEntry\x1a\xaa\x01\n\tContainer\x12\x11\n\timage_uri\x18\x01 \x01(\t\x12\x10\n\x08\x63ommands\x18\x02 \x03(\t\x12\x12\n\nentrypoint\x18\x03 \x01(\t\x12\x0f\n\x07volumes\x18\x07 \x03(\t\x12\x0f\n\x07options\x18\x08 \x01(\t\x12\x1e\n\x16\x62lock_external_network\x18\t \x01(\x08\x12\x10\n\x08username\x18\n \x01(\t\x12\x10\n\x08password\x18\x0b \x01(\t\x1a\x33\n\x06Script\x12\x0e\n\x04path\x18\x01 \x01(\tH\x00\x12\x0e\n\x04text\x18\x02 \x01(\tH\x00\x42\t\n\x07\x63ommand\x1a\x17\n\x07\x42\x61rrier\x12\x0c\n\x04name\x18\x01 \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0c\n\nexecutable\"\xfd\x03\n\x08TaskSpec\x12\x32\n\trunnables\x18\x08 \x03(\x0b\x32\x1f.google.cloud.batch.v1.Runnable\x12@\n\x10\x63ompute_resource\x18\x03 \x01(\x0b\x32&.google.cloud.batch.v1.ComputeResource\x12\x33\n\x10max_run_duration\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x17\n\x0fmax_retry_count\x18\x05 \x01(\x05\x12\x42\n\x12lifecycle_policies\x18\t \x03(\x0b\x32&.google.cloud.batch.v1.LifecyclePolicy\x12K\n\x0c\x65nvironments\x18\x06 \x03(\x0b\x32\x31.google.cloud.batch.v1.TaskSpec.EnvironmentsEntryB\x02\x18\x01\x12.\n\x07volumes\x18\x07 \x03(\x0b\x32\x1d.google.cloud.batch.v1.Volume\x12\x37\n\x0b\x65nvironment\x18\n \x01(\x0b\x32\".google.cloud.batch.v1.Environment\x1a\x33\n\x11\x45nvironmentsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8a\x02\n\x0fLifecyclePolicy\x12=\n\x06\x61\x63tion\x18\x01 \x01(\x0e\x32-.google.cloud.batch.v1.LifecyclePolicy.Action\x12P\n\x10\x61\x63tion_condition\x18\x02 \x01(\x0b\x32\x36.google.cloud.batch.v1.LifecyclePolicy.ActionCondition\x1a%\n\x0f\x41\x63tionCondition\x12\x12\n\nexit_codes\x18\x01 \x03(\x05\"?\n\x06\x41\x63tion\x12\x16\n\x12\x41\x43TION_UNSPECIFIED\x10\x00\x12\x0e\n\nRETRY_TASK\x10\x01\x12\r\n\tFAIL_TASK\x10\x02\"\xc0\x01\n\x04Task\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x31\n\x06status\x18\x02 \x01(\x0b\x32!.google.cloud.batch.v1.TaskStatus:w\xea\x41t\n\x19\x62\x61tch.googleapis.com/Task\x12Wprojects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}/tasks/{task}\"\x8f\x03\n\x0b\x45nvironment\x12\x44\n\tvariables\x18\x01 \x03(\x0b\x32\x31.google.cloud.batch.v1.Environment.VariablesEntry\x12Q\n\x10secret_variables\x18\x02 \x03(\x0b\x32\x37.google.cloud.batch.v1.Environment.SecretVariablesEntry\x12I\n\x13\x65ncrypted_variables\x18\x03 \x01(\x0b\x32,.google.cloud.batch.v1.Environment.KMSEnvMap\x1a\x32\n\tKMSEnvMap\x12\x10\n\x08key_name\x18\x01 \x01(\t\x12\x13\n\x0b\x63ipher_text\x18\x02 \x01(\t\x1a\x30\n\x0eVariablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x36\n\x14SecretVariablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\xaa\x01\n\x19\x63om.google.cloud.batch.v1B\tTaskProtoP\x01Z/cloud.google.com/go/batch/apiv1/batchpb;batchpb\xa2\x02\x03GCB\xaa\x02\x15Google.Cloud.Batch.V1\xca\x02\x15Google\\Cloud\\Batch\\V1\xea\x02\x18Google::Cloud::Batch::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.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
29
+ ["google.protobuf.Duration", "google/protobuf/duration.proto"],
30
+ ["google.cloud.batch.v1.Volume", "google/cloud/batch/v1/volume.proto"],
31
+ ]
32
+ imports.each do |type_name, expected_filename|
33
+ import_file = pool.lookup(type_name).file_descriptor
34
+ if import_file.name != expected_filename
35
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
107
36
  end
108
37
  end
38
+ warn "Each proto file must use a consistent fully-qualified name."
39
+ warn "This will become an error in the next major version."
109
40
  end
110
41
 
111
42
  module Google
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Batch
23
23
  module V1
24
- VERSION = "0.8.0"
24
+ VERSION = "0.9.0"
25
25
  end
26
26
  end
27
27
  end
@@ -1,27 +1,34 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/batch/v1/volume.proto
3
4
 
4
5
  require 'google/protobuf'
5
6
 
6
- Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_file("google/cloud/batch/v1/volume.proto", :syntax => :proto3) do
8
- add_message "google.cloud.batch.v1.Volume" do
9
- optional :mount_path, :string, 4
10
- repeated :mount_options, :string, 5
11
- oneof :source do
12
- optional :nfs, :message, 1, "google.cloud.batch.v1.NFS"
13
- optional :gcs, :message, 3, "google.cloud.batch.v1.GCS"
14
- optional :device_name, :string, 6
15
- end
16
- end
17
- add_message "google.cloud.batch.v1.NFS" do
18
- optional :server, :string, 1
19
- optional :remote_path, :string, 2
20
- end
21
- add_message "google.cloud.batch.v1.GCS" do
22
- optional :remote_path, :string, 1
7
+
8
+ descriptor_data = "\n\"google/cloud/batch/v1/volume.proto\x12\x15google.cloud.batch.v1\"\xaa\x01\n\x06Volume\x12)\n\x03nfs\x18\x01 \x01(\x0b\x32\x1a.google.cloud.batch.v1.NFSH\x00\x12)\n\x03gcs\x18\x03 \x01(\x0b\x32\x1a.google.cloud.batch.v1.GCSH\x00\x12\x15\n\x0b\x64\x65vice_name\x18\x06 \x01(\tH\x00\x12\x12\n\nmount_path\x18\x04 \x01(\t\x12\x15\n\rmount_options\x18\x05 \x03(\tB\x08\n\x06source\"*\n\x03NFS\x12\x0e\n\x06server\x18\x01 \x01(\t\x12\x13\n\x0bremote_path\x18\x02 \x01(\t\"\x1a\n\x03GCS\x12\x13\n\x0bremote_path\x18\x01 \x01(\tB\xac\x01\n\x19\x63om.google.cloud.batch.v1B\x0bVolumeProtoP\x01Z/cloud.google.com/go/batch/apiv1/batchpb;batchpb\xa2\x02\x03GCB\xaa\x02\x15Google.Cloud.Batch.V1\xca\x02\x15Google\\Cloud\\Batch\\V1\xea\x02\x18Google::Cloud::Batch::V1b\x06proto3"
9
+
10
+ pool = Google::Protobuf::DescriptorPool.generated_pool
11
+
12
+ begin
13
+ pool.add_serialized_file(descriptor_data)
14
+ rescue TypeError => e
15
+ # Compatibility code: will be removed in the next major version.
16
+ require 'google/protobuf/descriptor_pb'
17
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
18
+ parsed.clear_dependency
19
+ serialized = parsed.class.encode(parsed)
20
+ file = pool.add_serialized_file(serialized)
21
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
22
+ imports = [
23
+ ]
24
+ imports.each do |type_name, expected_filename|
25
+ import_file = pool.lookup(type_name).file_descriptor
26
+ if import_file.name != expected_filename
27
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
23
28
  end
24
29
  end
30
+ warn "Each proto file must use a consistent fully-qualified name."
31
+ warn "This will become an error in the next major version."
25
32
  end
26
33
 
27
34
  module Google
@@ -146,7 +146,7 @@ module Google
146
146
  credentials = @config.credentials
147
147
  # Use self-signed JWT if the endpoint is unchanged from default,
148
148
  # but only if the default endpoint does not have a region prefix.
149
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
149
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
150
150
  !@config.endpoint.split(".").first.include?("-")
151
151
  credentials ||= Credentials.default scope: @config.scope,
152
152
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -550,7 +550,9 @@ module Google
550
550
  class Configuration
551
551
  extend ::Gapic::Config
552
552
 
553
- config_attr :endpoint, "iam-meta-api.googleapis.com", ::String
553
+ DEFAULT_ENDPOINT = "iam-meta-api.googleapis.com"
554
+
555
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
554
556
  config_attr :credentials, nil do |value|
555
557
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
556
558
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -142,7 +142,7 @@ module Google
142
142
  credentials = @config.credentials
143
143
  # Use self-signed JWT if the endpoint is unchanged from default,
144
144
  # but only if the default endpoint does not have a region prefix.
145
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
145
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
146
146
  !@config.endpoint.split(".").first.include?("-")
147
147
  credentials ||= Credentials.default scope: @config.scope,
148
148
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -464,7 +464,9 @@ module Google
464
464
  class Configuration
465
465
  extend ::Gapic::Config
466
466
 
467
- config_attr :endpoint, "iam-meta-api.googleapis.com", ::String
467
+ DEFAULT_ENDPOINT = "iam-meta-api.googleapis.com"
468
+
469
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
468
470
  config_attr :credentials, nil do |value|
469
471
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
470
472
  allowed.any? { |klass| klass === value }
@@ -58,7 +58,7 @@ module Google
58
58
 
59
59
  verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb
60
60
  query_string_params = if query_string_params.any?
61
- query_string_params.to_h { |p| p.split("=", 2) }
61
+ query_string_params.to_h { |p| p.split "=", 2 }
62
62
  else
63
63
  {}
64
64
  end
@@ -96,7 +96,7 @@ module Google
96
96
 
97
97
  verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb
98
98
  query_string_params = if query_string_params.any?
99
- query_string_params.to_h { |p| p.split("=", 2) }
99
+ query_string_params.to_h { |p| p.split "=", 2 }
100
100
  else
101
101
  {}
102
102
  end
@@ -134,7 +134,7 @@ module Google
134
134
 
135
135
  verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb
136
136
  query_string_params = if query_string_params.any?
137
- query_string_params.to_h { |p| p.split("=", 2) }
137
+ query_string_params.to_h { |p| p.split "=", 2 }
138
138
  else
139
139
  {}
140
140
  end
@@ -43,8 +43,12 @@ module Google
43
43
  # if (any.is(Foo.class)) {
44
44
  # foo = any.unpack(Foo.class);
45
45
  # }
46
+ # // or ...
47
+ # if (any.isSameTypeAs(Foo.getDefaultInstance())) {
48
+ # foo = any.unpack(Foo.getDefaultInstance());
49
+ # }
46
50
  #
47
- # Example 3: Pack and unpack a message in Python.
51
+ # Example 3: Pack and unpack a message in Python.
48
52
  #
49
53
  # foo = Foo(...)
50
54
  # any = Any()
@@ -54,7 +58,7 @@ module Google
54
58
  # any.Unpack(foo)
55
59
  # ...
56
60
  #
57
- # Example 4: Pack and unpack a message in Go
61
+ # Example 4: Pack and unpack a message in Go
58
62
  #
59
63
  # foo := &pb.Foo{...}
60
64
  # any, err := anypb.New(foo)
@@ -73,9 +77,8 @@ module Google
73
77
  # in the type URL, for example "foo.bar.com/x/y.z" will yield type
74
78
  # name "y.z".
75
79
  #
76
- #
77
80
  # JSON
78
- #
81
+ # ====
79
82
  # The JSON representation of an `Any` value uses the regular
80
83
  # representation of the deserialized, embedded message, with an
81
84
  # additional field `@type` which contains the type URL. Example:
@@ -69,7 +69,6 @@ module Google
69
69
  # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
70
70
  # .setNanos((int) ((millis % 1000) * 1000000)).build();
71
71
  #
72
- #
73
72
  # Example 5: Compute Timestamp from Java `Instant.now()`.
74
73
  #
75
74
  # Instant now = Instant.now();
@@ -78,7 +77,6 @@ module Google
78
77
  # Timestamp.newBuilder().setSeconds(now.getEpochSecond())
79
78
  # .setNanos(now.getNano()).build();
80
79
  #
81
- #
82
80
  # Example 6: Compute Timestamp from current time in Python.
83
81
  #
84
82
  # timestamp = Timestamp()
@@ -108,7 +106,7 @@ module Google
108
106
  # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
109
107
  # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
110
108
  # the Joda Time's [`ISODateTimeFormat.dateTime()`](
111
- # http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
109
+ # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
112
110
  # ) to obtain a formatter capable of generating timestamps in this format.
113
111
  # @!attribute [rw] seconds
114
112
  # @return [::Integer]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-batch-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-19 00:00:00.000000000 Z
11
+ date: 2023-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.18.0
19
+ version: 0.19.1
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.18.0
29
+ version: 0.19.1
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a