google-cloud-run-v2 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +6 -6
- data/README.md +3 -3
- data/lib/google/cloud/run/v2/execution_pb.rb +76 -0
- data/lib/google/cloud/run/v2/execution_services_pb.rb +49 -0
- data/lib/google/cloud/run/v2/execution_template_pb.rb +29 -0
- data/lib/google/cloud/run/v2/executions/client.rb +635 -0
- data/lib/google/cloud/run/v2/executions/credentials.rb +47 -0
- data/lib/google/cloud/run/v2/executions/operations.rb +770 -0
- data/lib/google/cloud/run/v2/executions/paths.rb +73 -0
- data/lib/google/cloud/run/v2/executions.rb +50 -0
- data/lib/google/cloud/run/v2/job_pb.rb +104 -0
- data/lib/google/cloud/run/v2/job_services_pb.rb +65 -0
- data/lib/google/cloud/run/v2/jobs/client.rb +1259 -0
- data/lib/google/cloud/run/v2/jobs/credentials.rb +47 -0
- data/lib/google/cloud/run/v2/jobs/operations.rb +770 -0
- data/lib/google/cloud/run/v2/jobs/paths.rb +166 -0
- data/lib/google/cloud/run/v2/jobs.rb +50 -0
- data/lib/google/cloud/run/v2/k8s.min_pb.rb +6 -0
- data/lib/google/cloud/run/v2/revision_services_pb.rb +2 -2
- data/lib/google/cloud/run/v2/revisions/client.rb +2 -2
- data/lib/google/cloud/run/v2/service_services_pb.rb +2 -2
- data/lib/google/cloud/run/v2/services/client.rb +13 -10
- data/lib/google/cloud/run/v2/task_pb.rb +81 -0
- data/lib/google/cloud/run/v2/task_services_pb.rb +47 -0
- data/lib/google/cloud/run/v2/task_template_pb.rb +36 -0
- data/lib/google/cloud/run/v2/tasks/client.rb +512 -0
- data/lib/google/cloud/run/v2/tasks/credentials.rb +47 -0
- data/lib/google/cloud/run/v2/tasks/paths.rb +77 -0
- data/lib/google/cloud/run/v2/tasks.rb +49 -0
- data/lib/google/cloud/run/v2/version.rb +1 -1
- data/lib/google/cloud/run/v2.rb +4 -1
- data/proto_docs/google/cloud/run/v2/execution.rb +223 -0
- data/proto_docs/google/cloud/run/v2/execution_template.rb +76 -0
- data/proto_docs/google/cloud/run/v2/job.rb +308 -0
- data/proto_docs/google/cloud/run/v2/k8s.min.rb +29 -7
- data/proto_docs/google/cloud/run/v2/service.rb +11 -8
- data/proto_docs/google/cloud/run/v2/task.rb +229 -0
- data/proto_docs/google/cloud/run/v2/task_template.rb +66 -0
- data/proto_docs/google/cloud/run/v2/vendor_settings.rb +2 -1
- metadata +29 -2
@@ -0,0 +1,73 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 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 Run
|
23
|
+
module V2
|
24
|
+
module Executions
|
25
|
+
# Path helper methods for the Executions API.
|
26
|
+
module Paths
|
27
|
+
##
|
28
|
+
# Create a fully-qualified Execution resource string.
|
29
|
+
#
|
30
|
+
# The resource will be in the following format:
|
31
|
+
#
|
32
|
+
# `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`
|
33
|
+
#
|
34
|
+
# @param project [String]
|
35
|
+
# @param location [String]
|
36
|
+
# @param job [String]
|
37
|
+
# @param execution [String]
|
38
|
+
#
|
39
|
+
# @return [::String]
|
40
|
+
def execution_path project:, location:, job:, execution:
|
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, "job cannot contain /" if job.to_s.include? "/"
|
44
|
+
|
45
|
+
"projects/#{project}/locations/#{location}/jobs/#{job}/executions/#{execution}"
|
46
|
+
end
|
47
|
+
|
48
|
+
##
|
49
|
+
# Create a fully-qualified Job resource string.
|
50
|
+
#
|
51
|
+
# The resource will be in the following format:
|
52
|
+
#
|
53
|
+
# `projects/{project}/locations/{location}/jobs/{job}`
|
54
|
+
#
|
55
|
+
# @param project [String]
|
56
|
+
# @param location [String]
|
57
|
+
# @param job [String]
|
58
|
+
#
|
59
|
+
# @return [::String]
|
60
|
+
def job_path project:, location:, job:
|
61
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
62
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
63
|
+
|
64
|
+
"projects/#{project}/locations/#{location}/jobs/#{job}"
|
65
|
+
end
|
66
|
+
|
67
|
+
extend self
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 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/run/v2/version"
|
24
|
+
|
25
|
+
require "google/cloud/run/v2/executions/credentials"
|
26
|
+
require "google/cloud/run/v2/executions/paths"
|
27
|
+
require "google/cloud/run/v2/executions/operations"
|
28
|
+
require "google/cloud/run/v2/executions/client"
|
29
|
+
|
30
|
+
module Google
|
31
|
+
module Cloud
|
32
|
+
module Run
|
33
|
+
module V2
|
34
|
+
##
|
35
|
+
# Cloud Run Execution Control Plane API.
|
36
|
+
#
|
37
|
+
# To load this service and instantiate a client:
|
38
|
+
#
|
39
|
+
# require "google/cloud/run/v2/executions"
|
40
|
+
# client = ::Google::Cloud::Run::V2::Executions::Client.new
|
41
|
+
#
|
42
|
+
module Executions
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
helper_path = ::File.join __dir__, "executions", "helpers.rb"
|
50
|
+
require "google/cloud/run/v2/executions/helpers" if ::File.file? helper_path
|
@@ -0,0 +1,104 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/run/v2/job.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/annotations_pb'
|
7
|
+
require 'google/api/client_pb'
|
8
|
+
require 'google/api/field_behavior_pb'
|
9
|
+
require 'google/api/launch_stage_pb'
|
10
|
+
require 'google/api/resource_pb'
|
11
|
+
require 'google/cloud/run/v2/condition_pb'
|
12
|
+
require 'google/cloud/run/v2/execution_template_pb'
|
13
|
+
require 'google/cloud/run/v2/vendor_settings_pb'
|
14
|
+
require 'google/iam/v1/iam_policy_pb'
|
15
|
+
require 'google/iam/v1/policy_pb'
|
16
|
+
require 'google/longrunning/operations_pb'
|
17
|
+
require 'google/protobuf/timestamp_pb'
|
18
|
+
|
19
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
20
|
+
add_file("google/cloud/run/v2/job.proto", :syntax => :proto3) do
|
21
|
+
add_message "google.cloud.run.v2.CreateJobRequest" do
|
22
|
+
optional :parent, :string, 1
|
23
|
+
optional :job, :message, 2, "google.cloud.run.v2.Job"
|
24
|
+
optional :job_id, :string, 3
|
25
|
+
optional :validate_only, :bool, 4
|
26
|
+
end
|
27
|
+
add_message "google.cloud.run.v2.GetJobRequest" do
|
28
|
+
optional :name, :string, 1
|
29
|
+
end
|
30
|
+
add_message "google.cloud.run.v2.UpdateJobRequest" do
|
31
|
+
optional :job, :message, 1, "google.cloud.run.v2.Job"
|
32
|
+
optional :validate_only, :bool, 3
|
33
|
+
optional :allow_missing, :bool, 4
|
34
|
+
end
|
35
|
+
add_message "google.cloud.run.v2.ListJobsRequest" do
|
36
|
+
optional :parent, :string, 1
|
37
|
+
optional :page_size, :int32, 2
|
38
|
+
optional :page_token, :string, 3
|
39
|
+
optional :show_deleted, :bool, 4
|
40
|
+
end
|
41
|
+
add_message "google.cloud.run.v2.ListJobsResponse" do
|
42
|
+
repeated :jobs, :message, 1, "google.cloud.run.v2.Job"
|
43
|
+
optional :next_page_token, :string, 2
|
44
|
+
end
|
45
|
+
add_message "google.cloud.run.v2.DeleteJobRequest" do
|
46
|
+
optional :name, :string, 1
|
47
|
+
optional :validate_only, :bool, 3
|
48
|
+
optional :etag, :string, 4
|
49
|
+
end
|
50
|
+
add_message "google.cloud.run.v2.RunJobRequest" do
|
51
|
+
optional :name, :string, 1
|
52
|
+
optional :validate_only, :bool, 2
|
53
|
+
optional :etag, :string, 3
|
54
|
+
end
|
55
|
+
add_message "google.cloud.run.v2.Job" do
|
56
|
+
optional :name, :string, 1
|
57
|
+
optional :uid, :string, 2
|
58
|
+
optional :generation, :int64, 3
|
59
|
+
map :labels, :string, :string, 4
|
60
|
+
map :annotations, :string, :string, 5
|
61
|
+
optional :create_time, :message, 6, "google.protobuf.Timestamp"
|
62
|
+
optional :update_time, :message, 7, "google.protobuf.Timestamp"
|
63
|
+
optional :delete_time, :message, 8, "google.protobuf.Timestamp"
|
64
|
+
optional :expire_time, :message, 9, "google.protobuf.Timestamp"
|
65
|
+
optional :creator, :string, 10
|
66
|
+
optional :last_modifier, :string, 11
|
67
|
+
optional :client, :string, 12
|
68
|
+
optional :client_version, :string, 13
|
69
|
+
optional :launch_stage, :enum, 14, "google.api.LaunchStage"
|
70
|
+
optional :binary_authorization, :message, 15, "google.cloud.run.v2.BinaryAuthorization"
|
71
|
+
optional :template, :message, 16, "google.cloud.run.v2.ExecutionTemplate"
|
72
|
+
optional :observed_generation, :int64, 17
|
73
|
+
optional :terminal_condition, :message, 18, "google.cloud.run.v2.Condition"
|
74
|
+
repeated :conditions, :message, 19, "google.cloud.run.v2.Condition"
|
75
|
+
optional :execution_count, :int32, 20
|
76
|
+
optional :latest_created_execution, :message, 22, "google.cloud.run.v2.ExecutionReference"
|
77
|
+
optional :reconciling, :bool, 23
|
78
|
+
optional :etag, :string, 99
|
79
|
+
end
|
80
|
+
add_message "google.cloud.run.v2.ExecutionReference" do
|
81
|
+
optional :name, :string, 1
|
82
|
+
optional :create_time, :message, 2, "google.protobuf.Timestamp"
|
83
|
+
optional :completion_time, :message, 3, "google.protobuf.Timestamp"
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
module Google
|
89
|
+
module Cloud
|
90
|
+
module Run
|
91
|
+
module V2
|
92
|
+
CreateJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.CreateJobRequest").msgclass
|
93
|
+
GetJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.GetJobRequest").msgclass
|
94
|
+
UpdateJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.UpdateJobRequest").msgclass
|
95
|
+
ListJobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.ListJobsRequest").msgclass
|
96
|
+
ListJobsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.ListJobsResponse").msgclass
|
97
|
+
DeleteJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.DeleteJobRequest").msgclass
|
98
|
+
RunJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.RunJobRequest").msgclass
|
99
|
+
Job = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.Job").msgclass
|
100
|
+
ExecutionReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.ExecutionReference").msgclass
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/cloud/run/v2/job.proto for package 'google.cloud.run.v2'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2022 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/run/v2/job_pb'
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Run
|
25
|
+
module V2
|
26
|
+
module Jobs
|
27
|
+
# Cloud Run Job Control Plane API.
|
28
|
+
class Service
|
29
|
+
|
30
|
+
include ::GRPC::GenericService
|
31
|
+
|
32
|
+
self.marshal_class_method = :encode
|
33
|
+
self.unmarshal_class_method = :decode
|
34
|
+
self.service_name = 'google.cloud.run.v2.Jobs'
|
35
|
+
|
36
|
+
# Creates a Job.
|
37
|
+
rpc :CreateJob, ::Google::Cloud::Run::V2::CreateJobRequest, ::Google::Longrunning::Operation
|
38
|
+
# Gets information about a Job.
|
39
|
+
rpc :GetJob, ::Google::Cloud::Run::V2::GetJobRequest, ::Google::Cloud::Run::V2::Job
|
40
|
+
# Lists Jobs.
|
41
|
+
rpc :ListJobs, ::Google::Cloud::Run::V2::ListJobsRequest, ::Google::Cloud::Run::V2::ListJobsResponse
|
42
|
+
# Updates a Job.
|
43
|
+
rpc :UpdateJob, ::Google::Cloud::Run::V2::UpdateJobRequest, ::Google::Longrunning::Operation
|
44
|
+
# Deletes a Job.
|
45
|
+
rpc :DeleteJob, ::Google::Cloud::Run::V2::DeleteJobRequest, ::Google::Longrunning::Operation
|
46
|
+
# Triggers creation of a new Execution of this Job.
|
47
|
+
rpc :RunJob, ::Google::Cloud::Run::V2::RunJobRequest, ::Google::Longrunning::Operation
|
48
|
+
# Gets the IAM Access Control policy currently in effect for the given Job.
|
49
|
+
# This result does not include any inherited policies.
|
50
|
+
rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy
|
51
|
+
# Sets the IAM Access control policy for the specified Job. Overwrites
|
52
|
+
# any existing policy.
|
53
|
+
rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy
|
54
|
+
# Returns permissions that a caller has on the specified Project.
|
55
|
+
#
|
56
|
+
# There are no permissions required for making this API call.
|
57
|
+
rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse
|
58
|
+
end
|
59
|
+
|
60
|
+
Stub = Service.rpc_stub_class
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|