google-cloud-functions-v1 0.1.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 +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +203 -0
- data/README.md +75 -0
- data/lib/google-cloud-functions-v1.rb +21 -0
- data/lib/google/cloud/functions/v1.rb +35 -0
- data/lib/google/cloud/functions/v1/cloud_functions_service.rb +50 -0
- data/lib/google/cloud/functions/v1/cloud_functions_service/client.rb +1196 -0
- data/lib/google/cloud/functions/v1/cloud_functions_service/credentials.rb +51 -0
- data/lib/google/cloud/functions/v1/cloud_functions_service/operations.rb +570 -0
- data/lib/google/cloud/functions/v1/cloud_functions_service/paths.rb +69 -0
- data/lib/google/cloud/functions/v1/functions_pb.rb +163 -0
- data/lib/google/cloud/functions/v1/functions_services_pb.rb +106 -0
- data/lib/google/cloud/functions/v1/operations_pb.rb +37 -0
- data/lib/google/cloud/functions/v1/version.rb +28 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +59 -0
- data/proto_docs/google/api/resource.rb +247 -0
- data/proto_docs/google/cloud/functions/v1/functions.rb +491 -0
- data/proto_docs/google/cloud/functions/v1/operations.rb +68 -0
- data/proto_docs/google/iam/v1/iam_policy.rb +80 -0
- data/proto_docs/google/iam/v1/options.rb +40 -0
- data/proto_docs/google/iam/v1/policy.rb +248 -0
- data/proto_docs/google/longrunning/operations.rb +150 -0
- data/proto_docs/google/protobuf/any.rb +138 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +120 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- data/proto_docs/google/type/expr.rb +52 -0
- metadata +234 -0
@@ -0,0 +1,69 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 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 V1
|
24
|
+
module CloudFunctionsService
|
25
|
+
# Path helper methods for the CloudFunctionsService API.
|
26
|
+
module Paths
|
27
|
+
##
|
28
|
+
# Create a fully-qualified CloudFunction resource string.
|
29
|
+
#
|
30
|
+
# The resource will be in the following format:
|
31
|
+
#
|
32
|
+
# `projects/{project}/locations/{location}/functions/{function}`
|
33
|
+
#
|
34
|
+
# @param project [String]
|
35
|
+
# @param location [String]
|
36
|
+
# @param function [String]
|
37
|
+
#
|
38
|
+
# @return [::String]
|
39
|
+
def cloud_function_path project:, location:, function:
|
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}/functions/#{function}"
|
44
|
+
end
|
45
|
+
|
46
|
+
##
|
47
|
+
# Create a fully-qualified Location resource string.
|
48
|
+
#
|
49
|
+
# The resource will be in the following format:
|
50
|
+
#
|
51
|
+
# `projects/{project}/locations/{location}`
|
52
|
+
#
|
53
|
+
# @param project [String]
|
54
|
+
# @param location [String]
|
55
|
+
#
|
56
|
+
# @return [::String]
|
57
|
+
def location_path project:, location:
|
58
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
59
|
+
|
60
|
+
"projects/#{project}/locations/#{location}"
|
61
|
+
end
|
62
|
+
|
63
|
+
extend self
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,163 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/functions/v1/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/iam/v1/iam_policy_pb'
|
11
|
+
require 'google/iam/v1/policy_pb'
|
12
|
+
require 'google/longrunning/operations_pb'
|
13
|
+
require 'google/protobuf/duration_pb'
|
14
|
+
require 'google/protobuf/field_mask_pb'
|
15
|
+
require 'google/protobuf/timestamp_pb'
|
16
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
17
|
+
add_file("google/cloud/functions/v1/functions.proto", :syntax => :proto3) do
|
18
|
+
add_message "google.cloud.functions.v1.CloudFunction" do
|
19
|
+
optional :name, :string, 1
|
20
|
+
optional :description, :string, 2
|
21
|
+
optional :status, :enum, 7, "google.cloud.functions.v1.CloudFunctionStatus"
|
22
|
+
optional :entry_point, :string, 8
|
23
|
+
optional :runtime, :string, 19
|
24
|
+
optional :timeout, :message, 9, "google.protobuf.Duration"
|
25
|
+
optional :available_memory_mb, :int32, 10
|
26
|
+
optional :service_account_email, :string, 11
|
27
|
+
optional :update_time, :message, 12, "google.protobuf.Timestamp"
|
28
|
+
optional :version_id, :int64, 14
|
29
|
+
map :labels, :string, :string, 15
|
30
|
+
map :environment_variables, :string, :string, 17
|
31
|
+
optional :network, :string, 18
|
32
|
+
optional :max_instances, :int32, 20
|
33
|
+
optional :vpc_connector, :string, 22
|
34
|
+
optional :vpc_connector_egress_settings, :enum, 23, "google.cloud.functions.v1.CloudFunction.VpcConnectorEgressSettings"
|
35
|
+
optional :ingress_settings, :enum, 24, "google.cloud.functions.v1.CloudFunction.IngressSettings"
|
36
|
+
optional :build_id, :string, 27
|
37
|
+
oneof :source_code do
|
38
|
+
optional :source_archive_url, :string, 3
|
39
|
+
optional :source_repository, :message, 4, "google.cloud.functions.v1.SourceRepository"
|
40
|
+
optional :source_upload_url, :string, 16
|
41
|
+
end
|
42
|
+
oneof :trigger do
|
43
|
+
optional :https_trigger, :message, 5, "google.cloud.functions.v1.HttpsTrigger"
|
44
|
+
optional :event_trigger, :message, 6, "google.cloud.functions.v1.EventTrigger"
|
45
|
+
end
|
46
|
+
end
|
47
|
+
add_enum "google.cloud.functions.v1.CloudFunction.VpcConnectorEgressSettings" do
|
48
|
+
value :VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED, 0
|
49
|
+
value :PRIVATE_RANGES_ONLY, 1
|
50
|
+
value :ALL_TRAFFIC, 2
|
51
|
+
end
|
52
|
+
add_enum "google.cloud.functions.v1.CloudFunction.IngressSettings" do
|
53
|
+
value :INGRESS_SETTINGS_UNSPECIFIED, 0
|
54
|
+
value :ALLOW_ALL, 1
|
55
|
+
value :ALLOW_INTERNAL_ONLY, 2
|
56
|
+
value :ALLOW_INTERNAL_AND_GCLB, 3
|
57
|
+
end
|
58
|
+
add_message "google.cloud.functions.v1.SourceRepository" do
|
59
|
+
optional :url, :string, 1
|
60
|
+
optional :deployed_url, :string, 2
|
61
|
+
end
|
62
|
+
add_message "google.cloud.functions.v1.HttpsTrigger" do
|
63
|
+
optional :url, :string, 1
|
64
|
+
end
|
65
|
+
add_message "google.cloud.functions.v1.EventTrigger" do
|
66
|
+
optional :event_type, :string, 1
|
67
|
+
optional :resource, :string, 2
|
68
|
+
optional :service, :string, 3
|
69
|
+
optional :failure_policy, :message, 5, "google.cloud.functions.v1.FailurePolicy"
|
70
|
+
end
|
71
|
+
add_message "google.cloud.functions.v1.FailurePolicy" do
|
72
|
+
oneof :action do
|
73
|
+
optional :retry, :message, 1, "google.cloud.functions.v1.FailurePolicy.Retry"
|
74
|
+
end
|
75
|
+
end
|
76
|
+
add_message "google.cloud.functions.v1.FailurePolicy.Retry" do
|
77
|
+
end
|
78
|
+
add_message "google.cloud.functions.v1.CreateFunctionRequest" do
|
79
|
+
optional :location, :string, 1
|
80
|
+
optional :function, :message, 2, "google.cloud.functions.v1.CloudFunction"
|
81
|
+
end
|
82
|
+
add_message "google.cloud.functions.v1.UpdateFunctionRequest" do
|
83
|
+
optional :function, :message, 1, "google.cloud.functions.v1.CloudFunction"
|
84
|
+
optional :update_mask, :message, 2, "google.protobuf.FieldMask"
|
85
|
+
end
|
86
|
+
add_message "google.cloud.functions.v1.GetFunctionRequest" do
|
87
|
+
optional :name, :string, 1
|
88
|
+
end
|
89
|
+
add_message "google.cloud.functions.v1.ListFunctionsRequest" do
|
90
|
+
optional :parent, :string, 1
|
91
|
+
optional :page_size, :int32, 2
|
92
|
+
optional :page_token, :string, 3
|
93
|
+
end
|
94
|
+
add_message "google.cloud.functions.v1.ListFunctionsResponse" do
|
95
|
+
repeated :functions, :message, 1, "google.cloud.functions.v1.CloudFunction"
|
96
|
+
optional :next_page_token, :string, 2
|
97
|
+
repeated :unreachable, :string, 3
|
98
|
+
end
|
99
|
+
add_message "google.cloud.functions.v1.DeleteFunctionRequest" do
|
100
|
+
optional :name, :string, 1
|
101
|
+
end
|
102
|
+
add_message "google.cloud.functions.v1.CallFunctionRequest" do
|
103
|
+
optional :name, :string, 1
|
104
|
+
optional :data, :string, 2
|
105
|
+
end
|
106
|
+
add_message "google.cloud.functions.v1.CallFunctionResponse" do
|
107
|
+
optional :execution_id, :string, 1
|
108
|
+
optional :result, :string, 2
|
109
|
+
optional :error, :string, 3
|
110
|
+
end
|
111
|
+
add_message "google.cloud.functions.v1.GenerateUploadUrlRequest" do
|
112
|
+
optional :parent, :string, 1
|
113
|
+
end
|
114
|
+
add_message "google.cloud.functions.v1.GenerateUploadUrlResponse" do
|
115
|
+
optional :upload_url, :string, 1
|
116
|
+
end
|
117
|
+
add_message "google.cloud.functions.v1.GenerateDownloadUrlRequest" do
|
118
|
+
optional :name, :string, 1
|
119
|
+
optional :version_id, :uint64, 2
|
120
|
+
end
|
121
|
+
add_message "google.cloud.functions.v1.GenerateDownloadUrlResponse" do
|
122
|
+
optional :download_url, :string, 1
|
123
|
+
end
|
124
|
+
add_enum "google.cloud.functions.v1.CloudFunctionStatus" do
|
125
|
+
value :CLOUD_FUNCTION_STATUS_UNSPECIFIED, 0
|
126
|
+
value :ACTIVE, 1
|
127
|
+
value :OFFLINE, 2
|
128
|
+
value :DEPLOY_IN_PROGRESS, 3
|
129
|
+
value :DELETE_IN_PROGRESS, 4
|
130
|
+
value :UNKNOWN, 5
|
131
|
+
end
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
module Google
|
136
|
+
module Cloud
|
137
|
+
module Functions
|
138
|
+
module V1
|
139
|
+
CloudFunction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.CloudFunction").msgclass
|
140
|
+
CloudFunction::VpcConnectorEgressSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.CloudFunction.VpcConnectorEgressSettings").enummodule
|
141
|
+
CloudFunction::IngressSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.CloudFunction.IngressSettings").enummodule
|
142
|
+
SourceRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.SourceRepository").msgclass
|
143
|
+
HttpsTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.HttpsTrigger").msgclass
|
144
|
+
EventTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.EventTrigger").msgclass
|
145
|
+
FailurePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.FailurePolicy").msgclass
|
146
|
+
FailurePolicy::Retry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.FailurePolicy.Retry").msgclass
|
147
|
+
CreateFunctionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.CreateFunctionRequest").msgclass
|
148
|
+
UpdateFunctionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.UpdateFunctionRequest").msgclass
|
149
|
+
GetFunctionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.GetFunctionRequest").msgclass
|
150
|
+
ListFunctionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.ListFunctionsRequest").msgclass
|
151
|
+
ListFunctionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.ListFunctionsResponse").msgclass
|
152
|
+
DeleteFunctionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.DeleteFunctionRequest").msgclass
|
153
|
+
CallFunctionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.CallFunctionRequest").msgclass
|
154
|
+
CallFunctionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.CallFunctionResponse").msgclass
|
155
|
+
GenerateUploadUrlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.GenerateUploadUrlRequest").msgclass
|
156
|
+
GenerateUploadUrlResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.GenerateUploadUrlResponse").msgclass
|
157
|
+
GenerateDownloadUrlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.GenerateDownloadUrlRequest").msgclass
|
158
|
+
GenerateDownloadUrlResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.GenerateDownloadUrlResponse").msgclass
|
159
|
+
CloudFunctionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.CloudFunctionStatus").enummodule
|
160
|
+
end
|
161
|
+
end
|
162
|
+
end
|
163
|
+
end
|
@@ -0,0 +1,106 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/cloud/functions/v1/functions.proto for package 'google.cloud.functions.v1'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2020 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/v1/functions_pb'
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Functions
|
25
|
+
module V1
|
26
|
+
module CloudFunctionsService
|
27
|
+
# A service that application uses to manipulate triggers and functions.
|
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.functions.v1.CloudFunctionsService'
|
35
|
+
|
36
|
+
# Returns a list of functions that belong to the requested project.
|
37
|
+
rpc :ListFunctions, Google::Cloud::Functions::V1::ListFunctionsRequest, Google::Cloud::Functions::V1::ListFunctionsResponse
|
38
|
+
# Returns a function with the given name from the requested project.
|
39
|
+
rpc :GetFunction, Google::Cloud::Functions::V1::GetFunctionRequest, Google::Cloud::Functions::V1::CloudFunction
|
40
|
+
# Creates a new function. If a function with the given name already exists in
|
41
|
+
# the specified project, the long running operation will return
|
42
|
+
# `ALREADY_EXISTS` error.
|
43
|
+
rpc :CreateFunction, Google::Cloud::Functions::V1::CreateFunctionRequest, Google::Longrunning::Operation
|
44
|
+
# Updates existing function.
|
45
|
+
rpc :UpdateFunction, Google::Cloud::Functions::V1::UpdateFunctionRequest, Google::Longrunning::Operation
|
46
|
+
# Deletes a function with the given name from the specified project. If the
|
47
|
+
# given function is used by some trigger, the trigger will be updated to
|
48
|
+
# remove this function.
|
49
|
+
rpc :DeleteFunction, Google::Cloud::Functions::V1::DeleteFunctionRequest, Google::Longrunning::Operation
|
50
|
+
# Synchronously invokes a deployed Cloud Function. To be used for testing
|
51
|
+
# purposes as very limited traffic is allowed. For more information on
|
52
|
+
# the actual limits, refer to
|
53
|
+
# [Rate Limits](https://cloud.google.com/functions/quotas#rate_limits).
|
54
|
+
rpc :CallFunction, Google::Cloud::Functions::V1::CallFunctionRequest, Google::Cloud::Functions::V1::CallFunctionResponse
|
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
|
+
# * Source file size should not exceed 100MB limit.
|
67
|
+
# * No credentials should be attached - the signed URLs provide access to the
|
68
|
+
# target bucket using internal service identity; if credentials were
|
69
|
+
# attached, the identity from the credentials would be used, but that
|
70
|
+
# identity does not have permissions to upload files to the URL.
|
71
|
+
#
|
72
|
+
# When making a HTTP PUT request, these two headers need to be specified:
|
73
|
+
#
|
74
|
+
# * `content-type: application/zip`
|
75
|
+
# * `x-goog-content-length-range: 0,104857600`
|
76
|
+
#
|
77
|
+
# And this header SHOULD NOT be specified:
|
78
|
+
#
|
79
|
+
# * `Authorization: Bearer YOUR_TOKEN`
|
80
|
+
rpc :GenerateUploadUrl, Google::Cloud::Functions::V1::GenerateUploadUrlRequest, Google::Cloud::Functions::V1::GenerateUploadUrlResponse
|
81
|
+
# Returns a signed URL for downloading deployed function source code.
|
82
|
+
# The URL is only valid for a limited period and should be used within
|
83
|
+
# minutes after generation.
|
84
|
+
# For more information about the signed URL usage see:
|
85
|
+
# https://cloud.google.com/storage/docs/access-control/signed-urls
|
86
|
+
rpc :GenerateDownloadUrl, Google::Cloud::Functions::V1::GenerateDownloadUrlRequest, Google::Cloud::Functions::V1::GenerateDownloadUrlResponse
|
87
|
+
# Sets the IAM access control policy on the specified function.
|
88
|
+
# Replaces any existing policy.
|
89
|
+
rpc :SetIamPolicy, Google::Iam::V1::SetIamPolicyRequest, Google::Iam::V1::Policy
|
90
|
+
# Gets the IAM access control policy for a function.
|
91
|
+
# Returns an empty policy if the function exists and does not have a policy
|
92
|
+
# set.
|
93
|
+
rpc :GetIamPolicy, Google::Iam::V1::GetIamPolicyRequest, Google::Iam::V1::Policy
|
94
|
+
# Tests the specified permissions against the IAM access control policy
|
95
|
+
# for a function.
|
96
|
+
# If the function does not exist, this will return an empty set of
|
97
|
+
# permissions, not a NOT_FOUND error.
|
98
|
+
rpc :TestIamPermissions, Google::Iam::V1::TestIamPermissionsRequest, Google::Iam::V1::TestIamPermissionsResponse
|
99
|
+
end
|
100
|
+
|
101
|
+
Stub = Service.rpc_stub_class
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/functions/v1/operations.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/protobuf/any_pb'
|
7
|
+
require 'google/protobuf/timestamp_pb'
|
8
|
+
require 'google/api/annotations_pb'
|
9
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
10
|
+
add_file("google/cloud/functions/v1/operations.proto", :syntax => :proto3) do
|
11
|
+
add_message "google.cloud.functions.v1.OperationMetadataV1" do
|
12
|
+
optional :target, :string, 1
|
13
|
+
optional :type, :enum, 2, "google.cloud.functions.v1.OperationType"
|
14
|
+
optional :request, :message, 3, "google.protobuf.Any"
|
15
|
+
optional :version_id, :int64, 4
|
16
|
+
optional :update_time, :message, 5, "google.protobuf.Timestamp"
|
17
|
+
optional :build_id, :string, 6
|
18
|
+
end
|
19
|
+
add_enum "google.cloud.functions.v1.OperationType" do
|
20
|
+
value :OPERATION_UNSPECIFIED, 0
|
21
|
+
value :CREATE_FUNCTION, 1
|
22
|
+
value :UPDATE_FUNCTION, 2
|
23
|
+
value :DELETE_FUNCTION, 3
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
module Google
|
29
|
+
module Cloud
|
30
|
+
module Functions
|
31
|
+
module V1
|
32
|
+
OperationMetadataV1 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.OperationMetadataV1").msgclass
|
33
|
+
OperationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.OperationType").enummodule
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 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 V1
|
24
|
+
VERSION = "0.1.0"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 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 Api
|
22
|
+
# An indicator of the behavior of a given field (for example, that a field
|
23
|
+
# is required in requests, or given as output but ignored as input).
|
24
|
+
# This **does not** change the behavior in protocol buffers itself; it only
|
25
|
+
# denotes the behavior and may affect how API tooling handles the field.
|
26
|
+
#
|
27
|
+
# Note: This enum **may** receive new values in the future.
|
28
|
+
module FieldBehavior
|
29
|
+
# Conventional default for enums. Do not use this.
|
30
|
+
FIELD_BEHAVIOR_UNSPECIFIED = 0
|
31
|
+
|
32
|
+
# Specifically denotes a field as optional.
|
33
|
+
# While all fields in protocol buffers are optional, this may be specified
|
34
|
+
# for emphasis if appropriate.
|
35
|
+
OPTIONAL = 1
|
36
|
+
|
37
|
+
# Denotes a field as required.
|
38
|
+
# This indicates that the field **must** be provided as part of the request,
|
39
|
+
# and failure to do so will cause an error (usually `INVALID_ARGUMENT`).
|
40
|
+
REQUIRED = 2
|
41
|
+
|
42
|
+
# Denotes a field as output only.
|
43
|
+
# This indicates that the field is provided in responses, but including the
|
44
|
+
# field in a request does nothing (the server *must* ignore it and
|
45
|
+
# *must not* throw an error as a result of the field's presence).
|
46
|
+
OUTPUT_ONLY = 3
|
47
|
+
|
48
|
+
# Denotes a field as input only.
|
49
|
+
# This indicates that the field is provided in requests, and the
|
50
|
+
# corresponding field is not included in output.
|
51
|
+
INPUT_ONLY = 4
|
52
|
+
|
53
|
+
# Denotes a field as immutable.
|
54
|
+
# This indicates that the field may be set once in a request to create a
|
55
|
+
# resource, but may not be changed thereafter.
|
56
|
+
IMMUTABLE = 5
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|