google-cloud-functions-v2 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +151 -0
- data/LICENSE.md +201 -0
- data/README.md +144 -0
- data/lib/google/cloud/functions/v2/function_service/client.rb +1176 -0
- data/lib/google/cloud/functions/v2/function_service/credentials.rb +51 -0
- data/lib/google/cloud/functions/v2/function_service/operations.rb +770 -0
- data/lib/google/cloud/functions/v2/function_service/paths.rb +219 -0
- data/lib/google/cloud/functions/v2/function_service.rb +55 -0
- data/lib/google/cloud/functions/v2/functions_pb.rb +297 -0
- data/lib/google/cloud/functions/v2/functions_services_pb.rb +94 -0
- data/lib/google/cloud/functions/v2/version.rb +28 -0
- data/lib/google/cloud/functions/v2.rb +40 -0
- data/lib/google-cloud-functions-v2.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +71 -0
- data/proto_docs/google/api/resource.rb +222 -0
- data/proto_docs/google/cloud/functions/v2/functions.rb +903 -0
- data/proto_docs/google/longrunning/operations.rb +164 -0
- data/proto_docs/google/protobuf/any.rb +141 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +34 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +129 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- data/proto_docs/google/type/expr.rb +75 -0
- metadata +257 -0
@@ -0,0 +1,219 @@
|
|
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 Functions
|
23
|
+
module V2
|
24
|
+
module FunctionService
|
25
|
+
# Path helper methods for the FunctionService API.
|
26
|
+
module Paths
|
27
|
+
##
|
28
|
+
# Create a fully-qualified Build resource string.
|
29
|
+
#
|
30
|
+
# The resource will be in the following format:
|
31
|
+
#
|
32
|
+
# `projects/{project}/locations/{location}/builds/{build}`
|
33
|
+
#
|
34
|
+
# @param project [String]
|
35
|
+
# @param location [String]
|
36
|
+
# @param build [String]
|
37
|
+
#
|
38
|
+
# @return [::String]
|
39
|
+
def build_path project:, location:, build:
|
40
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
41
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
42
|
+
|
43
|
+
"projects/#{project}/locations/#{location}/builds/#{build}"
|
44
|
+
end
|
45
|
+
|
46
|
+
##
|
47
|
+
# Create a fully-qualified Channel resource string.
|
48
|
+
#
|
49
|
+
# The resource will be in the following format:
|
50
|
+
#
|
51
|
+
# `projects/{project}/locations/{location}/channels/{channel}`
|
52
|
+
#
|
53
|
+
# @param project [String]
|
54
|
+
# @param location [String]
|
55
|
+
# @param channel [String]
|
56
|
+
#
|
57
|
+
# @return [::String]
|
58
|
+
def channel_path project:, location:, channel:
|
59
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
60
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
61
|
+
|
62
|
+
"projects/#{project}/locations/#{location}/channels/#{channel}"
|
63
|
+
end
|
64
|
+
|
65
|
+
##
|
66
|
+
# Create a fully-qualified Connector resource string.
|
67
|
+
#
|
68
|
+
# The resource will be in the following format:
|
69
|
+
#
|
70
|
+
# `projects/{project}/locations/{location}/connectors/{connector}`
|
71
|
+
#
|
72
|
+
# @param project [String]
|
73
|
+
# @param location [String]
|
74
|
+
# @param connector [String]
|
75
|
+
#
|
76
|
+
# @return [::String]
|
77
|
+
def connector_path project:, location:, connector:
|
78
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
79
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
80
|
+
|
81
|
+
"projects/#{project}/locations/#{location}/connectors/#{connector}"
|
82
|
+
end
|
83
|
+
|
84
|
+
##
|
85
|
+
# Create a fully-qualified Function resource string.
|
86
|
+
#
|
87
|
+
# The resource will be in the following format:
|
88
|
+
#
|
89
|
+
# `projects/{project}/locations/{location}/functions/{function}`
|
90
|
+
#
|
91
|
+
# @param project [String]
|
92
|
+
# @param location [String]
|
93
|
+
# @param function [String]
|
94
|
+
#
|
95
|
+
# @return [::String]
|
96
|
+
def function_path project:, location:, function:
|
97
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
98
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
99
|
+
|
100
|
+
"projects/#{project}/locations/#{location}/functions/#{function}"
|
101
|
+
end
|
102
|
+
|
103
|
+
##
|
104
|
+
# Create a fully-qualified Location resource string.
|
105
|
+
#
|
106
|
+
# The resource will be in the following format:
|
107
|
+
#
|
108
|
+
# `projects/{project}/locations/{location}`
|
109
|
+
#
|
110
|
+
# @param project [String]
|
111
|
+
# @param location [String]
|
112
|
+
#
|
113
|
+
# @return [::String]
|
114
|
+
def location_path project:, location:
|
115
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
116
|
+
|
117
|
+
"projects/#{project}/locations/#{location}"
|
118
|
+
end
|
119
|
+
|
120
|
+
##
|
121
|
+
# Create a fully-qualified Repository resource string.
|
122
|
+
#
|
123
|
+
# The resource will be in the following format:
|
124
|
+
#
|
125
|
+
# `projects/{project}/locations/{location}/repositories/{repository}`
|
126
|
+
#
|
127
|
+
# @param project [String]
|
128
|
+
# @param location [String]
|
129
|
+
# @param repository [String]
|
130
|
+
#
|
131
|
+
# @return [::String]
|
132
|
+
def repository_path project:, location:, repository:
|
133
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
134
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
135
|
+
|
136
|
+
"projects/#{project}/locations/#{location}/repositories/#{repository}"
|
137
|
+
end
|
138
|
+
|
139
|
+
##
|
140
|
+
# Create a fully-qualified Service resource string.
|
141
|
+
#
|
142
|
+
# The resource will be in the following format:
|
143
|
+
#
|
144
|
+
# `projects/{project}/locations/{location}/services/{service}`
|
145
|
+
#
|
146
|
+
# @param project [String]
|
147
|
+
# @param location [String]
|
148
|
+
# @param service [String]
|
149
|
+
#
|
150
|
+
# @return [::String]
|
151
|
+
def service_path project:, location:, service:
|
152
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
153
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
154
|
+
|
155
|
+
"projects/#{project}/locations/#{location}/services/#{service}"
|
156
|
+
end
|
157
|
+
|
158
|
+
##
|
159
|
+
# Create a fully-qualified Topic resource string.
|
160
|
+
#
|
161
|
+
# The resource will be in the following format:
|
162
|
+
#
|
163
|
+
# `projects/{project}/topics/{topic}`
|
164
|
+
#
|
165
|
+
# @param project [String]
|
166
|
+
# @param topic [String]
|
167
|
+
#
|
168
|
+
# @return [::String]
|
169
|
+
def topic_path project:, topic:
|
170
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
171
|
+
|
172
|
+
"projects/#{project}/topics/#{topic}"
|
173
|
+
end
|
174
|
+
|
175
|
+
##
|
176
|
+
# Create a fully-qualified Trigger resource string.
|
177
|
+
#
|
178
|
+
# The resource will be in the following format:
|
179
|
+
#
|
180
|
+
# `projects/{project}/locations/{location}/triggers/{trigger}`
|
181
|
+
#
|
182
|
+
# @param project [String]
|
183
|
+
# @param location [String]
|
184
|
+
# @param trigger [String]
|
185
|
+
#
|
186
|
+
# @return [::String]
|
187
|
+
def trigger_path project:, location:, trigger:
|
188
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
189
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
190
|
+
|
191
|
+
"projects/#{project}/locations/#{location}/triggers/#{trigger}"
|
192
|
+
end
|
193
|
+
|
194
|
+
##
|
195
|
+
# Create a fully-qualified WorkerPool resource string.
|
196
|
+
#
|
197
|
+
# The resource will be in the following format:
|
198
|
+
#
|
199
|
+
# `projects/{project}/locations/{location}/workerPools/{worker_pool}`
|
200
|
+
#
|
201
|
+
# @param project [String]
|
202
|
+
# @param location [String]
|
203
|
+
# @param worker_pool [String]
|
204
|
+
#
|
205
|
+
# @return [::String]
|
206
|
+
def worker_pool_path project:, location:, worker_pool:
|
207
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
208
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
209
|
+
|
210
|
+
"projects/#{project}/locations/#{location}/workerPools/#{worker_pool}"
|
211
|
+
end
|
212
|
+
|
213
|
+
extend self
|
214
|
+
end
|
215
|
+
end
|
216
|
+
end
|
217
|
+
end
|
218
|
+
end
|
219
|
+
end
|
@@ -0,0 +1,55 @@
|
|
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/functions/v2/version"
|
24
|
+
|
25
|
+
require "google/cloud/functions/v2/function_service/credentials"
|
26
|
+
require "google/cloud/functions/v2/function_service/paths"
|
27
|
+
require "google/cloud/functions/v2/function_service/operations"
|
28
|
+
require "google/cloud/functions/v2/function_service/client"
|
29
|
+
|
30
|
+
module Google
|
31
|
+
module Cloud
|
32
|
+
module Functions
|
33
|
+
module V2
|
34
|
+
##
|
35
|
+
# Google Cloud Functions is used to deploy functions that are executed by
|
36
|
+
# Google in response to various events. Data connected with that event is
|
37
|
+
# passed to a function as the input data.
|
38
|
+
#
|
39
|
+
# A **function** is a resource which describes a function that should be
|
40
|
+
# executed and how it is triggered.
|
41
|
+
#
|
42
|
+
# To load this service and instantiate a client:
|
43
|
+
#
|
44
|
+
# require "google/cloud/functions/v2/function_service"
|
45
|
+
# client = ::Google::Cloud::Functions::V2::FunctionService::Client.new
|
46
|
+
#
|
47
|
+
module FunctionService
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
helper_path = ::File.join __dir__, "function_service", "helpers.rb"
|
55
|
+
require "google/cloud/functions/v2/function_service/helpers" if ::File.file? helper_path
|
@@ -0,0 +1,297 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/functions/v2/functions.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/resource_pb'
|
10
|
+
require 'google/longrunning/operations_pb'
|
11
|
+
require 'google/protobuf/any_pb'
|
12
|
+
require 'google/protobuf/field_mask_pb'
|
13
|
+
require 'google/protobuf/timestamp_pb'
|
14
|
+
|
15
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
16
|
+
add_file("google/cloud/functions/v2/functions.proto", :syntax => :proto3) do
|
17
|
+
add_message "google.cloud.functions.v2.Function" do
|
18
|
+
optional :name, :string, 1
|
19
|
+
optional :environment, :enum, 10, "google.cloud.functions.v2.Environment"
|
20
|
+
optional :description, :string, 2
|
21
|
+
optional :build_config, :message, 3, "google.cloud.functions.v2.BuildConfig"
|
22
|
+
optional :service_config, :message, 4, "google.cloud.functions.v2.ServiceConfig"
|
23
|
+
optional :event_trigger, :message, 5, "google.cloud.functions.v2.EventTrigger"
|
24
|
+
optional :state, :enum, 6, "google.cloud.functions.v2.Function.State"
|
25
|
+
optional :update_time, :message, 7, "google.protobuf.Timestamp"
|
26
|
+
map :labels, :string, :string, 8
|
27
|
+
repeated :state_messages, :message, 9, "google.cloud.functions.v2.StateMessage"
|
28
|
+
end
|
29
|
+
add_enum "google.cloud.functions.v2.Function.State" do
|
30
|
+
value :STATE_UNSPECIFIED, 0
|
31
|
+
value :ACTIVE, 1
|
32
|
+
value :FAILED, 2
|
33
|
+
value :DEPLOYING, 3
|
34
|
+
value :DELETING, 4
|
35
|
+
value :UNKNOWN, 5
|
36
|
+
end
|
37
|
+
add_message "google.cloud.functions.v2.StateMessage" do
|
38
|
+
optional :severity, :enum, 1, "google.cloud.functions.v2.StateMessage.Severity"
|
39
|
+
optional :type, :string, 2
|
40
|
+
optional :message, :string, 3
|
41
|
+
end
|
42
|
+
add_enum "google.cloud.functions.v2.StateMessage.Severity" do
|
43
|
+
value :SEVERITY_UNSPECIFIED, 0
|
44
|
+
value :ERROR, 1
|
45
|
+
value :WARNING, 2
|
46
|
+
value :INFO, 3
|
47
|
+
end
|
48
|
+
add_message "google.cloud.functions.v2.StorageSource" do
|
49
|
+
optional :bucket, :string, 1
|
50
|
+
optional :object, :string, 2
|
51
|
+
optional :generation, :int64, 3
|
52
|
+
end
|
53
|
+
add_message "google.cloud.functions.v2.RepoSource" do
|
54
|
+
optional :project_id, :string, 1
|
55
|
+
optional :repo_name, :string, 2
|
56
|
+
optional :dir, :string, 6
|
57
|
+
optional :invert_regex, :bool, 7
|
58
|
+
oneof :revision do
|
59
|
+
optional :branch_name, :string, 3
|
60
|
+
optional :tag_name, :string, 4
|
61
|
+
optional :commit_sha, :string, 5
|
62
|
+
end
|
63
|
+
end
|
64
|
+
add_message "google.cloud.functions.v2.Source" do
|
65
|
+
oneof :source do
|
66
|
+
optional :storage_source, :message, 1, "google.cloud.functions.v2.StorageSource"
|
67
|
+
optional :repo_source, :message, 2, "google.cloud.functions.v2.RepoSource"
|
68
|
+
end
|
69
|
+
end
|
70
|
+
add_message "google.cloud.functions.v2.SourceProvenance" do
|
71
|
+
optional :resolved_storage_source, :message, 1, "google.cloud.functions.v2.StorageSource"
|
72
|
+
optional :resolved_repo_source, :message, 2, "google.cloud.functions.v2.RepoSource"
|
73
|
+
end
|
74
|
+
add_message "google.cloud.functions.v2.BuildConfig" do
|
75
|
+
optional :build, :string, 1
|
76
|
+
optional :runtime, :string, 2
|
77
|
+
optional :entry_point, :string, 3
|
78
|
+
optional :source, :message, 4, "google.cloud.functions.v2.Source"
|
79
|
+
optional :source_provenance, :message, 8, "google.cloud.functions.v2.SourceProvenance"
|
80
|
+
optional :worker_pool, :string, 5
|
81
|
+
map :environment_variables, :string, :string, 6
|
82
|
+
optional :docker_repository, :string, 7
|
83
|
+
end
|
84
|
+
add_message "google.cloud.functions.v2.ServiceConfig" do
|
85
|
+
optional :service, :string, 1
|
86
|
+
optional :timeout_seconds, :int32, 2
|
87
|
+
optional :available_memory, :string, 13
|
88
|
+
map :environment_variables, :string, :string, 4
|
89
|
+
optional :max_instance_count, :int32, 5
|
90
|
+
optional :min_instance_count, :int32, 12
|
91
|
+
optional :vpc_connector, :string, 6
|
92
|
+
optional :vpc_connector_egress_settings, :enum, 7, "google.cloud.functions.v2.ServiceConfig.VpcConnectorEgressSettings"
|
93
|
+
optional :ingress_settings, :enum, 8, "google.cloud.functions.v2.ServiceConfig.IngressSettings"
|
94
|
+
optional :uri, :string, 9
|
95
|
+
optional :service_account_email, :string, 10
|
96
|
+
optional :all_traffic_on_latest_revision, :bool, 16
|
97
|
+
repeated :secret_environment_variables, :message, 17, "google.cloud.functions.v2.SecretEnvVar"
|
98
|
+
repeated :secret_volumes, :message, 19, "google.cloud.functions.v2.SecretVolume"
|
99
|
+
optional :revision, :string, 18
|
100
|
+
end
|
101
|
+
add_enum "google.cloud.functions.v2.ServiceConfig.VpcConnectorEgressSettings" do
|
102
|
+
value :VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED, 0
|
103
|
+
value :PRIVATE_RANGES_ONLY, 1
|
104
|
+
value :ALL_TRAFFIC, 2
|
105
|
+
end
|
106
|
+
add_enum "google.cloud.functions.v2.ServiceConfig.IngressSettings" do
|
107
|
+
value :INGRESS_SETTINGS_UNSPECIFIED, 0
|
108
|
+
value :ALLOW_ALL, 1
|
109
|
+
value :ALLOW_INTERNAL_ONLY, 2
|
110
|
+
value :ALLOW_INTERNAL_AND_GCLB, 3
|
111
|
+
end
|
112
|
+
add_message "google.cloud.functions.v2.SecretEnvVar" do
|
113
|
+
optional :key, :string, 1
|
114
|
+
optional :project_id, :string, 2
|
115
|
+
optional :secret, :string, 3
|
116
|
+
optional :version, :string, 4
|
117
|
+
end
|
118
|
+
add_message "google.cloud.functions.v2.SecretVolume" do
|
119
|
+
optional :mount_path, :string, 1
|
120
|
+
optional :project_id, :string, 2
|
121
|
+
optional :secret, :string, 3
|
122
|
+
repeated :versions, :message, 4, "google.cloud.functions.v2.SecretVolume.SecretVersion"
|
123
|
+
end
|
124
|
+
add_message "google.cloud.functions.v2.SecretVolume.SecretVersion" do
|
125
|
+
optional :version, :string, 1
|
126
|
+
optional :path, :string, 2
|
127
|
+
end
|
128
|
+
add_message "google.cloud.functions.v2.EventTrigger" do
|
129
|
+
optional :trigger, :string, 1
|
130
|
+
optional :trigger_region, :string, 2
|
131
|
+
optional :event_type, :string, 3
|
132
|
+
repeated :event_filters, :message, 4, "google.cloud.functions.v2.EventFilter"
|
133
|
+
optional :pubsub_topic, :string, 5
|
134
|
+
optional :service_account_email, :string, 6
|
135
|
+
optional :retry_policy, :enum, 7, "google.cloud.functions.v2.EventTrigger.RetryPolicy"
|
136
|
+
optional :channel, :string, 8
|
137
|
+
end
|
138
|
+
add_enum "google.cloud.functions.v2.EventTrigger.RetryPolicy" do
|
139
|
+
value :RETRY_POLICY_UNSPECIFIED, 0
|
140
|
+
value :RETRY_POLICY_DO_NOT_RETRY, 1
|
141
|
+
value :RETRY_POLICY_RETRY, 2
|
142
|
+
end
|
143
|
+
add_message "google.cloud.functions.v2.EventFilter" do
|
144
|
+
optional :attribute, :string, 1
|
145
|
+
optional :value, :string, 2
|
146
|
+
optional :operator, :string, 3
|
147
|
+
end
|
148
|
+
add_message "google.cloud.functions.v2.GetFunctionRequest" do
|
149
|
+
optional :name, :string, 1
|
150
|
+
end
|
151
|
+
add_message "google.cloud.functions.v2.ListFunctionsRequest" do
|
152
|
+
optional :parent, :string, 1
|
153
|
+
optional :page_size, :int32, 2
|
154
|
+
optional :page_token, :string, 3
|
155
|
+
optional :filter, :string, 4
|
156
|
+
optional :order_by, :string, 5
|
157
|
+
end
|
158
|
+
add_message "google.cloud.functions.v2.ListFunctionsResponse" do
|
159
|
+
repeated :functions, :message, 1, "google.cloud.functions.v2.Function"
|
160
|
+
optional :next_page_token, :string, 2
|
161
|
+
repeated :unreachable, :string, 3
|
162
|
+
end
|
163
|
+
add_message "google.cloud.functions.v2.CreateFunctionRequest" do
|
164
|
+
optional :parent, :string, 1
|
165
|
+
optional :function, :message, 2, "google.cloud.functions.v2.Function"
|
166
|
+
optional :function_id, :string, 3
|
167
|
+
end
|
168
|
+
add_message "google.cloud.functions.v2.UpdateFunctionRequest" do
|
169
|
+
optional :function, :message, 1, "google.cloud.functions.v2.Function"
|
170
|
+
optional :update_mask, :message, 2, "google.protobuf.FieldMask"
|
171
|
+
end
|
172
|
+
add_message "google.cloud.functions.v2.DeleteFunctionRequest" do
|
173
|
+
optional :name, :string, 1
|
174
|
+
end
|
175
|
+
add_message "google.cloud.functions.v2.GenerateUploadUrlRequest" do
|
176
|
+
optional :parent, :string, 1
|
177
|
+
end
|
178
|
+
add_message "google.cloud.functions.v2.GenerateUploadUrlResponse" do
|
179
|
+
optional :upload_url, :string, 1
|
180
|
+
optional :storage_source, :message, 2, "google.cloud.functions.v2.StorageSource"
|
181
|
+
end
|
182
|
+
add_message "google.cloud.functions.v2.GenerateDownloadUrlRequest" do
|
183
|
+
optional :name, :string, 1
|
184
|
+
end
|
185
|
+
add_message "google.cloud.functions.v2.GenerateDownloadUrlResponse" do
|
186
|
+
optional :download_url, :string, 1
|
187
|
+
end
|
188
|
+
add_message "google.cloud.functions.v2.ListRuntimesRequest" do
|
189
|
+
optional :parent, :string, 1
|
190
|
+
optional :filter, :string, 2
|
191
|
+
end
|
192
|
+
add_message "google.cloud.functions.v2.ListRuntimesResponse" do
|
193
|
+
repeated :runtimes, :message, 1, "google.cloud.functions.v2.ListRuntimesResponse.Runtime"
|
194
|
+
end
|
195
|
+
add_message "google.cloud.functions.v2.ListRuntimesResponse.Runtime" do
|
196
|
+
optional :name, :string, 1
|
197
|
+
optional :display_name, :string, 5
|
198
|
+
optional :stage, :enum, 2, "google.cloud.functions.v2.ListRuntimesResponse.RuntimeStage"
|
199
|
+
repeated :warnings, :string, 3
|
200
|
+
optional :environment, :enum, 4, "google.cloud.functions.v2.Environment"
|
201
|
+
end
|
202
|
+
add_enum "google.cloud.functions.v2.ListRuntimesResponse.RuntimeStage" do
|
203
|
+
value :RUNTIME_STAGE_UNSPECIFIED, 0
|
204
|
+
value :DEVELOPMENT, 1
|
205
|
+
value :ALPHA, 2
|
206
|
+
value :BETA, 3
|
207
|
+
value :GA, 4
|
208
|
+
value :DEPRECATED, 5
|
209
|
+
value :DECOMMISSIONED, 6
|
210
|
+
end
|
211
|
+
add_message "google.cloud.functions.v2.OperationMetadata" do
|
212
|
+
optional :create_time, :message, 1, "google.protobuf.Timestamp"
|
213
|
+
optional :end_time, :message, 2, "google.protobuf.Timestamp"
|
214
|
+
optional :target, :string, 3
|
215
|
+
optional :verb, :string, 4
|
216
|
+
optional :status_detail, :string, 5
|
217
|
+
optional :cancel_requested, :bool, 6
|
218
|
+
optional :api_version, :string, 7
|
219
|
+
optional :request_resource, :message, 8, "google.protobuf.Any"
|
220
|
+
repeated :stages, :message, 9, "google.cloud.functions.v2.Stage"
|
221
|
+
end
|
222
|
+
add_message "google.cloud.functions.v2.Stage" do
|
223
|
+
optional :name, :enum, 1, "google.cloud.functions.v2.Stage.Name"
|
224
|
+
optional :message, :string, 2
|
225
|
+
optional :state, :enum, 3, "google.cloud.functions.v2.Stage.State"
|
226
|
+
optional :resource, :string, 4
|
227
|
+
optional :resource_uri, :string, 5
|
228
|
+
repeated :state_messages, :message, 6, "google.cloud.functions.v2.StateMessage"
|
229
|
+
end
|
230
|
+
add_enum "google.cloud.functions.v2.Stage.Name" do
|
231
|
+
value :NAME_UNSPECIFIED, 0
|
232
|
+
value :ARTIFACT_REGISTRY, 1
|
233
|
+
value :BUILD, 2
|
234
|
+
value :SERVICE, 3
|
235
|
+
value :TRIGGER, 4
|
236
|
+
value :SERVICE_ROLLBACK, 5
|
237
|
+
value :TRIGGER_ROLLBACK, 6
|
238
|
+
end
|
239
|
+
add_enum "google.cloud.functions.v2.Stage.State" do
|
240
|
+
value :STATE_UNSPECIFIED, 0
|
241
|
+
value :NOT_STARTED, 1
|
242
|
+
value :IN_PROGRESS, 2
|
243
|
+
value :COMPLETE, 3
|
244
|
+
end
|
245
|
+
add_enum "google.cloud.functions.v2.Environment" do
|
246
|
+
value :ENVIRONMENT_UNSPECIFIED, 0
|
247
|
+
value :GEN_1, 1
|
248
|
+
value :GEN_2, 2
|
249
|
+
end
|
250
|
+
end
|
251
|
+
end
|
252
|
+
|
253
|
+
module Google
|
254
|
+
module Cloud
|
255
|
+
module Functions
|
256
|
+
module V2
|
257
|
+
Function = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.Function").msgclass
|
258
|
+
Function::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.Function.State").enummodule
|
259
|
+
StateMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.StateMessage").msgclass
|
260
|
+
StateMessage::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.StateMessage.Severity").enummodule
|
261
|
+
StorageSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.StorageSource").msgclass
|
262
|
+
RepoSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.RepoSource").msgclass
|
263
|
+
Source = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.Source").msgclass
|
264
|
+
SourceProvenance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.SourceProvenance").msgclass
|
265
|
+
BuildConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.BuildConfig").msgclass
|
266
|
+
ServiceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.ServiceConfig").msgclass
|
267
|
+
ServiceConfig::VpcConnectorEgressSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.ServiceConfig.VpcConnectorEgressSettings").enummodule
|
268
|
+
ServiceConfig::IngressSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.ServiceConfig.IngressSettings").enummodule
|
269
|
+
SecretEnvVar = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.SecretEnvVar").msgclass
|
270
|
+
SecretVolume = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.SecretVolume").msgclass
|
271
|
+
SecretVolume::SecretVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.SecretVolume.SecretVersion").msgclass
|
272
|
+
EventTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.EventTrigger").msgclass
|
273
|
+
EventTrigger::RetryPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.EventTrigger.RetryPolicy").enummodule
|
274
|
+
EventFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.EventFilter").msgclass
|
275
|
+
GetFunctionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.GetFunctionRequest").msgclass
|
276
|
+
ListFunctionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.ListFunctionsRequest").msgclass
|
277
|
+
ListFunctionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.ListFunctionsResponse").msgclass
|
278
|
+
CreateFunctionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.CreateFunctionRequest").msgclass
|
279
|
+
UpdateFunctionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.UpdateFunctionRequest").msgclass
|
280
|
+
DeleteFunctionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.DeleteFunctionRequest").msgclass
|
281
|
+
GenerateUploadUrlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.GenerateUploadUrlRequest").msgclass
|
282
|
+
GenerateUploadUrlResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.GenerateUploadUrlResponse").msgclass
|
283
|
+
GenerateDownloadUrlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.GenerateDownloadUrlRequest").msgclass
|
284
|
+
GenerateDownloadUrlResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.GenerateDownloadUrlResponse").msgclass
|
285
|
+
ListRuntimesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.ListRuntimesRequest").msgclass
|
286
|
+
ListRuntimesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.ListRuntimesResponse").msgclass
|
287
|
+
ListRuntimesResponse::Runtime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.ListRuntimesResponse.Runtime").msgclass
|
288
|
+
ListRuntimesResponse::RuntimeStage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.ListRuntimesResponse.RuntimeStage").enummodule
|
289
|
+
OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.OperationMetadata").msgclass
|
290
|
+
Stage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.Stage").msgclass
|
291
|
+
Stage::Name = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.Stage.Name").enummodule
|
292
|
+
Stage::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.Stage.State").enummodule
|
293
|
+
Environment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.Environment").enummodule
|
294
|
+
end
|
295
|
+
end
|
296
|
+
end
|
297
|
+
end
|
@@ -0,0 +1,94 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/cloud/functions/v2/functions.proto for package 'google.cloud.functions.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/functions/v2/functions_pb'
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Functions
|
25
|
+
module V2
|
26
|
+
module FunctionService
|
27
|
+
# Google Cloud Functions is used to deploy functions that are executed by
|
28
|
+
# Google in response to various events. Data connected with that event is
|
29
|
+
# passed to a function as the input data.
|
30
|
+
#
|
31
|
+
# A **function** is a resource which describes a function that should be
|
32
|
+
# executed and how it is triggered.
|
33
|
+
class Service
|
34
|
+
|
35
|
+
include ::GRPC::GenericService
|
36
|
+
|
37
|
+
self.marshal_class_method = :encode
|
38
|
+
self.unmarshal_class_method = :decode
|
39
|
+
self.service_name = 'google.cloud.functions.v2.FunctionService'
|
40
|
+
|
41
|
+
# Returns a function with the given name from the requested project.
|
42
|
+
rpc :GetFunction, ::Google::Cloud::Functions::V2::GetFunctionRequest, ::Google::Cloud::Functions::V2::Function
|
43
|
+
# Returns a list of functions that belong to the requested project.
|
44
|
+
rpc :ListFunctions, ::Google::Cloud::Functions::V2::ListFunctionsRequest, ::Google::Cloud::Functions::V2::ListFunctionsResponse
|
45
|
+
# Creates a new function. If a function with the given name already exists in
|
46
|
+
# the specified project, the long running operation will return
|
47
|
+
# `ALREADY_EXISTS` error.
|
48
|
+
rpc :CreateFunction, ::Google::Cloud::Functions::V2::CreateFunctionRequest, ::Google::Longrunning::Operation
|
49
|
+
# Updates existing function.
|
50
|
+
rpc :UpdateFunction, ::Google::Cloud::Functions::V2::UpdateFunctionRequest, ::Google::Longrunning::Operation
|
51
|
+
# Deletes a function with the given name from the specified project. If the
|
52
|
+
# given function is used by some trigger, the trigger will be updated to
|
53
|
+
# remove this function.
|
54
|
+
rpc :DeleteFunction, ::Google::Cloud::Functions::V2::DeleteFunctionRequest, ::Google::Longrunning::Operation
|
55
|
+
# Returns a signed URL for uploading a function source code.
|
56
|
+
# For more information about the signed URL usage see:
|
57
|
+
# https://cloud.google.com/storage/docs/access-control/signed-urls.
|
58
|
+
# Once the function source code upload is complete, the used signed
|
59
|
+
# URL should be provided in CreateFunction or UpdateFunction request
|
60
|
+
# as a reference to the function source code.
|
61
|
+
#
|
62
|
+
# When uploading source code to the generated signed URL, please follow
|
63
|
+
# these restrictions:
|
64
|
+
#
|
65
|
+
# * Source file type should be a zip file.
|
66
|
+
# * No credentials should be attached - the signed URLs provide access to the
|
67
|
+
# target bucket using internal service identity; if credentials were
|
68
|
+
# attached, the identity from the credentials would be used, but that
|
69
|
+
# identity does not have permissions to upload files to the URL.
|
70
|
+
#
|
71
|
+
# When making a HTTP PUT request, these two headers need to be specified:
|
72
|
+
#
|
73
|
+
# * `content-type: application/zip`
|
74
|
+
#
|
75
|
+
# And this header SHOULD NOT be specified:
|
76
|
+
#
|
77
|
+
# * `Authorization: Bearer YOUR_TOKEN`
|
78
|
+
rpc :GenerateUploadUrl, ::Google::Cloud::Functions::V2::GenerateUploadUrlRequest, ::Google::Cloud::Functions::V2::GenerateUploadUrlResponse
|
79
|
+
# Returns a signed URL for downloading deployed function source code.
|
80
|
+
# The URL is only valid for a limited period and should be used within
|
81
|
+
# 30 minutes of generation.
|
82
|
+
# For more information about the signed URL usage see:
|
83
|
+
# https://cloud.google.com/storage/docs/access-control/signed-urls
|
84
|
+
rpc :GenerateDownloadUrl, ::Google::Cloud::Functions::V2::GenerateDownloadUrlRequest, ::Google::Cloud::Functions::V2::GenerateDownloadUrlResponse
|
85
|
+
# Returns a list of runtimes that are supported for the requested project.
|
86
|
+
rpc :ListRuntimes, ::Google::Cloud::Functions::V2::ListRuntimesRequest, ::Google::Cloud::Functions::V2::ListRuntimesResponse
|
87
|
+
end
|
88
|
+
|
89
|
+
Stub = Service.rpc_stub_class
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|