google-apis-cloudfunctions_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: c0e4169a0bc45ff4dae59f9a7e889c3b8c1e286884f1e71283743aeb2c5364fd
4
+ data.tar.gz: f215f51baf74a87e133df185eb551d85be404407782240211e8700aaed3cd3f8
5
+ SHA512:
6
+ metadata.gz: dce545d2c3168944d18380a16f2f3b805b58428e56b24a267f4ae247597be29c168192e56b01c31fbd20da3239b3ea2f4476081f06cdafe0dcc13f993bda6c20
7
+ data.tar.gz: dcc1baad83256374e2117cd1497884d51c5a1159ec48b57064bdff1d973ff2c795eb4cabc70df61c14601595c7768518c5b2d72e175a1431319674fd0570c662
@@ -0,0 +1,13 @@
1
+ --hide-void-return
2
+ --no-private
3
+ --verbose
4
+ --title=google-apis-cloudfunctions_v1
5
+ --markup-provider=redcarpet
6
+ --markup=markdown
7
+ --main OVERVIEW.md
8
+ lib/google/apis/cloudfunctions_v1/*.rb
9
+ lib/google/apis/cloudfunctions_v1.rb
10
+ -
11
+ OVERVIEW.md
12
+ CHANGELOG.md
13
+ LICENSE.md
@@ -0,0 +1,7 @@
1
+ # Release history for google-apis-cloudfunctions_v1
2
+
3
+ ### v0.1.0 (2021-01-07)
4
+
5
+ * Regenerated using generator version 0.1.1
6
+ * Regenerated from discovery document revision 20201201
7
+
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,96 @@
1
+ # Simple REST client for version V1 of the Cloud Functions API
2
+
3
+ This is a simple client library for version V1 of the Cloud Functions API. It provides:
4
+
5
+ * A client object that connects to the HTTP/JSON REST endpoint for the service.
6
+ * Ruby objects for data structures related to the service.
7
+ * Integration with the googleauth gem for authentication using OAuth, API keys, and service accounts.
8
+ * Control of retry, pagination, and timeouts.
9
+
10
+ Note that although this client library is supported and will continue to be updated to track changes to the service, it is otherwise considered complete and not under active development. Many Google services, especially Google Cloud Platform services, may provide a more modern client that is under more active development and improvement. See the section below titled *Which client should I use?* for more information.
11
+
12
+ ## Getting started
13
+
14
+ ### Before you begin
15
+
16
+ There are a few setup steps you need to complete before you can use this library:
17
+
18
+ 1. If you don't already have a Google account, [sign up](https://www.google.com/accounts).
19
+ 2. If you have never created a Google APIs Console project, read about [Managing Projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and create a project in the [Google API Console](https://console.cloud.google.com/).
20
+ 3. Most APIs need to be enabled for your project. [Enable it](https://console.cloud.google.com/apis/library/cloudfunctions.googleapis.com) in the console.
21
+
22
+ ### Installation
23
+
24
+ Add this line to your application's Gemfile:
25
+
26
+ ```ruby
27
+ gem 'google-apis-cloudfunctions_v1', '~> 0.1'
28
+ ```
29
+
30
+ And then execute:
31
+
32
+ ```
33
+ $ bundle
34
+ ```
35
+
36
+ Or install it yourself as:
37
+
38
+ ```
39
+ $ gem install google-apis-cloudfunctions_v1
40
+ ```
41
+
42
+ ### Creating a client object
43
+
44
+ Once the gem is installed, you can load the client code and instantiate a client.
45
+
46
+ ```ruby
47
+ # Load the client
48
+ require "google/apis/cloudfunctions_v1"
49
+
50
+ # Create a client object
51
+ client = Google::Apis::CloudfunctionsV1::CloudFunctionsService.new
52
+
53
+ # Authenticate calls
54
+ client.authentication = # ... use the googleauth gem to create credentials
55
+ ```
56
+
57
+ See the class reference docs for information on the methods you can call from a client.
58
+
59
+ ## Documentation
60
+
61
+ More detailed descriptions of the Google simple REST clients are available in two documents.
62
+
63
+ * The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
64
+ * The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
65
+
66
+ (Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Cloudfunctions service in particular.)
67
+
68
+ For reference information on specific calls in the Cloud Functions API, see the {Google::Apis::CloudfunctionsV1::CloudFunctionsService class reference docs}.
69
+
70
+ ## Which client should I use?
71
+
72
+ Google provides two types of Ruby API client libraries: **simple REST clients** and **modern clients**.
73
+
74
+ This library, `google-apis-cloudfunctions_v1`, is a simple REST client. You can identify these clients by their gem names, which are always in the form `google-apis-<servicename>_<serviceversion>`. The simple REST clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward.
75
+
76
+ Modern clients are produced by a modern code generator, sometimes combined with hand-crafted functionality. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services. Modern clients are available for many Google services, especially Google Cloud Platform services, but do not yet support all the services covered by the simple clients.
77
+
78
+ Gem names for modern clients are often of the form `google-cloud-<service_name>`. (For example, [google-cloud-pubsub](https://rubygems.org/gems/google-cloud-pubsub).) Note that most modern clients also have corresponding "versioned" gems with names like `google-cloud-<service_name>-<version>`. (For example, [google-cloud-pubsub-v1](https://rubygems.org/gems/google-cloud-pubsub-v1).) The "versioned" gems can be used directly, but often provide lower-level interfaces. In most cases, the main gem is recommended.
79
+
80
+ **For most users, we recommend the modern client, if one is available.** Compared with simple clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a simple client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure.
81
+
82
+ The [product documentation](https://cloud.google.com/functions) may provide guidance regarding the preferred client library to use.
83
+
84
+ ## Supported Ruby versions
85
+
86
+ This library is supported on Ruby 2.5+.
87
+
88
+ Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Currently, this means Ruby 2.5 and later. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
89
+
90
+ ## License
91
+
92
+ This library is licensed under Apache 2.0. Full license text is available in the {file:LICENSE.md LICENSE}.
93
+
94
+ ## Support
95
+
96
+ Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com).
@@ -0,0 +1,15 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require "google/apis/cloudfunctions_v1"
@@ -0,0 +1,36 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/cloudfunctions_v1/service.rb'
16
+ require 'google/apis/cloudfunctions_v1/classes.rb'
17
+ require 'google/apis/cloudfunctions_v1/representations.rb'
18
+ require 'google/apis/cloudfunctions_v1/gem_version.rb'
19
+
20
+ module Google
21
+ module Apis
22
+ # Cloud Functions API
23
+ #
24
+ # Manages lightweight user-provided functions executed in response to events.
25
+ #
26
+ # @see https://cloud.google.com/functions
27
+ module CloudfunctionsV1
28
+ # Version of the Cloud Functions API this client connects to.
29
+ # This is NOT the gem version.
30
+ VERSION = 'V1'
31
+
32
+ # View and manage your data across Google Cloud Platform services
33
+ AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,1167 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module CloudfunctionsV1
24
+
25
+ # Specifies the audit configuration for a service. The configuration determines
26
+ # which permission types are logged, and what identities, if any, are exempted
27
+ # from logging. An AuditConfig must have one or more AuditLogConfigs. If there
28
+ # are AuditConfigs for both `allServices` and a specific service, the union of
29
+ # the two AuditConfigs is used for that service: the log_types specified in each
30
+ # AuditConfig are enabled, and the exempted_members in each AuditLogConfig are
31
+ # exempted. Example Policy with multiple AuditConfigs: ` "audit_configs": [ ` "
32
+ # service": "allServices", "audit_log_configs": [ ` "log_type": "DATA_READ", "
33
+ # exempted_members": [ "user:jose@example.com" ] `, ` "log_type": "DATA_WRITE" `,
34
+ # ` "log_type": "ADMIN_READ" ` ] `, ` "service": "sampleservice.googleapis.com",
35
+ # "audit_log_configs": [ ` "log_type": "DATA_READ" `, ` "log_type": "DATA_WRITE"
36
+ # , "exempted_members": [ "user:aliya@example.com" ] ` ] ` ] ` For sampleservice,
37
+ # this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also
38
+ # exempts jose@example.com from DATA_READ logging, and aliya@example.com from
39
+ # DATA_WRITE logging.
40
+ class AuditConfig
41
+ include Google::Apis::Core::Hashable
42
+
43
+ # The configuration for logging of each type of permission.
44
+ # Corresponds to the JSON property `auditLogConfigs`
45
+ # @return [Array<Google::Apis::CloudfunctionsV1::AuditLogConfig>]
46
+ attr_accessor :audit_log_configs
47
+
48
+ # Specifies a service that will be enabled for audit logging. For example, `
49
+ # storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special
50
+ # value that covers all services.
51
+ # Corresponds to the JSON property `service`
52
+ # @return [String]
53
+ attr_accessor :service
54
+
55
+ def initialize(**args)
56
+ update!(**args)
57
+ end
58
+
59
+ # Update properties of this object
60
+ def update!(**args)
61
+ @audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs)
62
+ @service = args[:service] if args.key?(:service)
63
+ end
64
+ end
65
+
66
+ # Provides the configuration for logging a type of permissions. Example: ` "
67
+ # audit_log_configs": [ ` "log_type": "DATA_READ", "exempted_members": [ "user:
68
+ # jose@example.com" ] `, ` "log_type": "DATA_WRITE" ` ] ` This enables '
69
+ # DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from
70
+ # DATA_READ logging.
71
+ class AuditLogConfig
72
+ include Google::Apis::Core::Hashable
73
+
74
+ # Specifies the identities that do not cause logging for this type of permission.
75
+ # Follows the same format of Binding.members.
76
+ # Corresponds to the JSON property `exemptedMembers`
77
+ # @return [Array<String>]
78
+ attr_accessor :exempted_members
79
+
80
+ # The log type that this config enables.
81
+ # Corresponds to the JSON property `logType`
82
+ # @return [String]
83
+ attr_accessor :log_type
84
+
85
+ def initialize(**args)
86
+ update!(**args)
87
+ end
88
+
89
+ # Update properties of this object
90
+ def update!(**args)
91
+ @exempted_members = args[:exempted_members] if args.key?(:exempted_members)
92
+ @log_type = args[:log_type] if args.key?(:log_type)
93
+ end
94
+ end
95
+
96
+ # Associates `members` with a `role`.
97
+ class Binding
98
+ include Google::Apis::Core::Hashable
99
+
100
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
101
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
102
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
103
+ # "Summary size limit" description: "Determines if a summary is less than 100
104
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
105
+ # Requestor is owner" description: "Determines if requestor is the document
106
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
107
+ # Logic): title: "Public documents" description: "Determine whether the document
108
+ # should be publicly visible" expression: "document.type != 'private' &&
109
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
110
+ # string" description: "Create a notification string with a timestamp."
111
+ # expression: "'New message received at ' + string(document.create_time)" The
112
+ # exact variables and functions that may be referenced within an expression are
113
+ # determined by the service that evaluates it. See the service documentation for
114
+ # additional information.
115
+ # Corresponds to the JSON property `condition`
116
+ # @return [Google::Apis::CloudfunctionsV1::Expr]
117
+ attr_accessor :condition
118
+
119
+ # Specifies the identities requesting access for a Cloud Platform resource. `
120
+ # members` can have the following values: * `allUsers`: A special identifier
121
+ # that represents anyone who is on the internet; with or without a Google
122
+ # account. * `allAuthenticatedUsers`: A special identifier that represents
123
+ # anyone who is authenticated with a Google account or a service account. * `
124
+ # user:`emailid``: An email address that represents a specific Google account.
125
+ # For example, `alice@example.com` . * `serviceAccount:`emailid``: An email
126
+ # address that represents a service account. For example, `my-other-app@appspot.
127
+ # gserviceaccount.com`. * `group:`emailid``: An email address that represents a
128
+ # Google group. For example, `admins@example.com`. * `deleted:user:`emailid`?uid=
129
+ # `uniqueid``: An email address (plus unique identifier) representing a user
130
+ # that has been recently deleted. For example, `alice@example.com?uid=
131
+ # 123456789012345678901`. If the user is recovered, this value reverts to `user:`
132
+ # emailid`` and the recovered user retains the role in the binding. * `deleted:
133
+ # serviceAccount:`emailid`?uid=`uniqueid``: An email address (plus unique
134
+ # identifier) representing a service account that has been recently deleted. For
135
+ # example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
136
+ # If the service account is undeleted, this value reverts to `serviceAccount:`
137
+ # emailid`` and the undeleted service account retains the role in the binding. *
138
+ # `deleted:group:`emailid`?uid=`uniqueid``: An email address (plus unique
139
+ # identifier) representing a Google group that has been recently deleted. For
140
+ # example, `admins@example.com?uid=123456789012345678901`. If the group is
141
+ # recovered, this value reverts to `group:`emailid`` and the recovered group
142
+ # retains the role in the binding. * `domain:`domain``: The G Suite domain (
143
+ # primary) that represents all the users of that domain. For example, `google.
144
+ # com` or `example.com`.
145
+ # Corresponds to the JSON property `members`
146
+ # @return [Array<String>]
147
+ attr_accessor :members
148
+
149
+ # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`
150
+ # , or `roles/owner`.
151
+ # Corresponds to the JSON property `role`
152
+ # @return [String]
153
+ attr_accessor :role
154
+
155
+ def initialize(**args)
156
+ update!(**args)
157
+ end
158
+
159
+ # Update properties of this object
160
+ def update!(**args)
161
+ @condition = args[:condition] if args.key?(:condition)
162
+ @members = args[:members] if args.key?(:members)
163
+ @role = args[:role] if args.key?(:role)
164
+ end
165
+ end
166
+
167
+ # Request for the `CallFunction` method.
168
+ class CallFunctionRequest
169
+ include Google::Apis::Core::Hashable
170
+
171
+ # Required. Input to be passed to the function.
172
+ # Corresponds to the JSON property `data`
173
+ # @return [String]
174
+ attr_accessor :data
175
+
176
+ def initialize(**args)
177
+ update!(**args)
178
+ end
179
+
180
+ # Update properties of this object
181
+ def update!(**args)
182
+ @data = args[:data] if args.key?(:data)
183
+ end
184
+ end
185
+
186
+ # Response of `CallFunction` method.
187
+ class CallFunctionResponse
188
+ include Google::Apis::Core::Hashable
189
+
190
+ # Either system or user-function generated error. Set if execution was not
191
+ # successful.
192
+ # Corresponds to the JSON property `error`
193
+ # @return [String]
194
+ attr_accessor :error
195
+
196
+ # Execution id of function invocation.
197
+ # Corresponds to the JSON property `executionId`
198
+ # @return [String]
199
+ attr_accessor :execution_id
200
+
201
+ # Result populated for successful execution of synchronous function. Will not be
202
+ # populated if function does not return a result through context.
203
+ # Corresponds to the JSON property `result`
204
+ # @return [String]
205
+ attr_accessor :result
206
+
207
+ def initialize(**args)
208
+ update!(**args)
209
+ end
210
+
211
+ # Update properties of this object
212
+ def update!(**args)
213
+ @error = args[:error] if args.key?(:error)
214
+ @execution_id = args[:execution_id] if args.key?(:execution_id)
215
+ @result = args[:result] if args.key?(:result)
216
+ end
217
+ end
218
+
219
+ # Describes a Cloud Function that contains user computation executed in response
220
+ # to an event. It encapsulate function and triggers configurations.
221
+ class CloudFunction
222
+ include Google::Apis::Core::Hashable
223
+
224
+ # The amount of memory in MB available for a function. Defaults to 256MB.
225
+ # Corresponds to the JSON property `availableMemoryMb`
226
+ # @return [Fixnum]
227
+ attr_accessor :available_memory_mb
228
+
229
+ # Build environment variables that shall be available during build time.
230
+ # Corresponds to the JSON property `buildEnvironmentVariables`
231
+ # @return [Hash<String,String>]
232
+ attr_accessor :build_environment_variables
233
+
234
+ # Output only. The Cloud Build ID of the latest successful deployment of the
235
+ # function.
236
+ # Corresponds to the JSON property `buildId`
237
+ # @return [String]
238
+ attr_accessor :build_id
239
+
240
+ # User-provided description of a function.
241
+ # Corresponds to the JSON property `description`
242
+ # @return [String]
243
+ attr_accessor :description
244
+
245
+ # The name of the function (as defined in source code) that will be executed.
246
+ # Defaults to the resource name suffix, if not specified. For backward
247
+ # compatibility, if function with given name is not found, then the system will
248
+ # try to use function named "function". For Node.js this is name of a function
249
+ # exported by the module specified in `source_location`.
250
+ # Corresponds to the JSON property `entryPoint`
251
+ # @return [String]
252
+ attr_accessor :entry_point
253
+
254
+ # Environment variables that shall be available during function execution.
255
+ # Corresponds to the JSON property `environmentVariables`
256
+ # @return [Hash<String,String>]
257
+ attr_accessor :environment_variables
258
+
259
+ # Describes EventTrigger, used to request events be sent from another service.
260
+ # Corresponds to the JSON property `eventTrigger`
261
+ # @return [Google::Apis::CloudfunctionsV1::EventTrigger]
262
+ attr_accessor :event_trigger
263
+
264
+ # Describes HttpsTrigger, could be used to connect web hooks to function.
265
+ # Corresponds to the JSON property `httpsTrigger`
266
+ # @return [Google::Apis::CloudfunctionsV1::HttpsTrigger]
267
+ attr_accessor :https_trigger
268
+
269
+ # The ingress settings for the function, controlling what traffic can reach it.
270
+ # Corresponds to the JSON property `ingressSettings`
271
+ # @return [String]
272
+ attr_accessor :ingress_settings
273
+
274
+ # Labels associated with this Cloud Function.
275
+ # Corresponds to the JSON property `labels`
276
+ # @return [Hash<String,String>]
277
+ attr_accessor :labels
278
+
279
+ # The limit on the maximum number of function instances that may coexist at a
280
+ # given time. In some cases, such as rapid traffic surges, Cloud Functions may,
281
+ # for a short period of time, create more instances than the specified max
282
+ # instances limit. If your function cannot tolerate this temporary behavior, you
283
+ # may want to factor in a safety margin and set a lower max instances value than
284
+ # your function can tolerate. See the [Max Instances](https://cloud.google.com/
285
+ # functions/docs/max-instances) Guide for more details.
286
+ # Corresponds to the JSON property `maxInstances`
287
+ # @return [Fixnum]
288
+ attr_accessor :max_instances
289
+
290
+ # A user-defined name of the function. Function names must be unique globally
291
+ # and match pattern `projects/*/locations/*/functions/*`
292
+ # Corresponds to the JSON property `name`
293
+ # @return [String]
294
+ attr_accessor :name
295
+
296
+ # The VPC Network that this cloud function can connect to. It can be either the
297
+ # fully-qualified URI, or the short name of the network resource. If the short
298
+ # network name is used, the network must belong to the same project. Otherwise,
299
+ # it must belong to a project within the same organization. The format of this
300
+ # field is either `projects/`project`/global/networks/`network`` or ``network``,
301
+ # where `project` is a project id where the network is defined, and `network` is
302
+ # the short name of the network. This field is mutually exclusive with `
303
+ # vpc_connector` and will be replaced by it. See [the VPC documentation](https://
304
+ # cloud.google.com/compute/docs/vpc) for more information on connecting Cloud
305
+ # projects.
306
+ # Corresponds to the JSON property `network`
307
+ # @return [String]
308
+ attr_accessor :network
309
+
310
+ # The runtime in which to run the function. Required when deploying a new
311
+ # function, optional when updating an existing function. For a complete list of
312
+ # possible choices, see the [`gcloud` command reference](/sdk/gcloud/reference/
313
+ # functions/deploy#--runtime).
314
+ # Corresponds to the JSON property `runtime`
315
+ # @return [String]
316
+ attr_accessor :runtime
317
+
318
+ # The email of the function's service account. If empty, defaults to ``
319
+ # project_id`@appspot.gserviceaccount.com`.
320
+ # Corresponds to the JSON property `serviceAccountEmail`
321
+ # @return [String]
322
+ attr_accessor :service_account_email
323
+
324
+ # The Google Cloud Storage URL, starting with gs://, pointing to the zip archive
325
+ # which contains the function.
326
+ # Corresponds to the JSON property `sourceArchiveUrl`
327
+ # @return [String]
328
+ attr_accessor :source_archive_url
329
+
330
+ # Describes SourceRepository, used to represent parameters related to source
331
+ # repository where a function is hosted.
332
+ # Corresponds to the JSON property `sourceRepository`
333
+ # @return [Google::Apis::CloudfunctionsV1::SourceRepository]
334
+ attr_accessor :source_repository
335
+
336
+ # The Google Cloud Storage signed URL used for source uploading, generated by
337
+ # google.cloud.functions.v1.GenerateUploadUrl
338
+ # Corresponds to the JSON property `sourceUploadUrl`
339
+ # @return [String]
340
+ attr_accessor :source_upload_url
341
+
342
+ # Output only. Status of the function deployment.
343
+ # Corresponds to the JSON property `status`
344
+ # @return [String]
345
+ attr_accessor :status
346
+
347
+ # The function execution timeout. Execution is considered failed and can be
348
+ # terminated if the function is not completed at the end of the timeout period.
349
+ # Defaults to 60 seconds.
350
+ # Corresponds to the JSON property `timeout`
351
+ # @return [String]
352
+ attr_accessor :timeout
353
+
354
+ # Output only. The last update timestamp of a Cloud Function.
355
+ # Corresponds to the JSON property `updateTime`
356
+ # @return [String]
357
+ attr_accessor :update_time
358
+
359
+ # Output only. The version identifier of the Cloud Function. Each deployment
360
+ # attempt results in a new version of a function being created.
361
+ # Corresponds to the JSON property `versionId`
362
+ # @return [Fixnum]
363
+ attr_accessor :version_id
364
+
365
+ # The VPC Network Connector that this cloud function can connect to. It can be
366
+ # either the fully-qualified URI, or the short name of the network connector
367
+ # resource. The format of this field is `projects/*/locations/*/connectors/*`
368
+ # This field is mutually exclusive with `network` field and will eventually
369
+ # replace it. See [the VPC documentation](https://cloud.google.com/compute/docs/
370
+ # vpc) for more information on connecting Cloud projects.
371
+ # Corresponds to the JSON property `vpcConnector`
372
+ # @return [String]
373
+ attr_accessor :vpc_connector
374
+
375
+ # The egress settings for the connector, controlling what traffic is diverted
376
+ # through it.
377
+ # Corresponds to the JSON property `vpcConnectorEgressSettings`
378
+ # @return [String]
379
+ attr_accessor :vpc_connector_egress_settings
380
+
381
+ def initialize(**args)
382
+ update!(**args)
383
+ end
384
+
385
+ # Update properties of this object
386
+ def update!(**args)
387
+ @available_memory_mb = args[:available_memory_mb] if args.key?(:available_memory_mb)
388
+ @build_environment_variables = args[:build_environment_variables] if args.key?(:build_environment_variables)
389
+ @build_id = args[:build_id] if args.key?(:build_id)
390
+ @description = args[:description] if args.key?(:description)
391
+ @entry_point = args[:entry_point] if args.key?(:entry_point)
392
+ @environment_variables = args[:environment_variables] if args.key?(:environment_variables)
393
+ @event_trigger = args[:event_trigger] if args.key?(:event_trigger)
394
+ @https_trigger = args[:https_trigger] if args.key?(:https_trigger)
395
+ @ingress_settings = args[:ingress_settings] if args.key?(:ingress_settings)
396
+ @labels = args[:labels] if args.key?(:labels)
397
+ @max_instances = args[:max_instances] if args.key?(:max_instances)
398
+ @name = args[:name] if args.key?(:name)
399
+ @network = args[:network] if args.key?(:network)
400
+ @runtime = args[:runtime] if args.key?(:runtime)
401
+ @service_account_email = args[:service_account_email] if args.key?(:service_account_email)
402
+ @source_archive_url = args[:source_archive_url] if args.key?(:source_archive_url)
403
+ @source_repository = args[:source_repository] if args.key?(:source_repository)
404
+ @source_upload_url = args[:source_upload_url] if args.key?(:source_upload_url)
405
+ @status = args[:status] if args.key?(:status)
406
+ @timeout = args[:timeout] if args.key?(:timeout)
407
+ @update_time = args[:update_time] if args.key?(:update_time)
408
+ @version_id = args[:version_id] if args.key?(:version_id)
409
+ @vpc_connector = args[:vpc_connector] if args.key?(:vpc_connector)
410
+ @vpc_connector_egress_settings = args[:vpc_connector_egress_settings] if args.key?(:vpc_connector_egress_settings)
411
+ end
412
+ end
413
+
414
+ # Describes EventTrigger, used to request events be sent from another service.
415
+ class EventTrigger
416
+ include Google::Apis::Core::Hashable
417
+
418
+ # Required. The type of event to observe. For example: `providers/cloud.storage/
419
+ # eventTypes/object.change` and `providers/cloud.pubsub/eventTypes/topic.publish`
420
+ # . Event types match pattern `providers/*/eventTypes/*.*`. The pattern contains:
421
+ # 1. namespace: For example, `cloud.storage` and `google.firebase.analytics`. 2.
422
+ # resource type: The type of resource on which event occurs. For example, the
423
+ # Google Cloud Storage API includes the type `object`. 3. action: The action
424
+ # that generates the event. For example, action for a Google Cloud Storage
425
+ # Object is 'change'. These parts are lower case.
426
+ # Corresponds to the JSON property `eventType`
427
+ # @return [String]
428
+ attr_accessor :event_type
429
+
430
+ # Describes the policy in case of function's execution failure. If empty, then
431
+ # defaults to ignoring failures (i.e. not retrying them).
432
+ # Corresponds to the JSON property `failurePolicy`
433
+ # @return [Google::Apis::CloudfunctionsV1::FailurePolicy]
434
+ attr_accessor :failure_policy
435
+
436
+ # Required. The resource(s) from which to observe events, for example, `projects/
437
+ # _/buckets/myBucket`. Not all syntactically correct values are accepted by all
438
+ # services. For example: 1. The authorization model must support it. Google
439
+ # Cloud Functions only allows EventTriggers to be deployed that observe
440
+ # resources in the same project as the `CloudFunction`. 2. The resource type
441
+ # must match the pattern expected for an `event_type`. For example, an `
442
+ # EventTrigger` that has an `event_type` of "google.pubsub.topic.publish" should
443
+ # have a resource that matches Google Cloud Pub/Sub topics. Additionally, some
444
+ # services may support short names when creating an `EventTrigger`. These will
445
+ # always be returned in the normalized "long" format. See each *service's*
446
+ # documentation for supported formats.
447
+ # Corresponds to the JSON property `resource`
448
+ # @return [String]
449
+ attr_accessor :resource
450
+
451
+ # The hostname of the service that should be observed. If no string is provided,
452
+ # the default service implementing the API will be used. For example, `storage.
453
+ # googleapis.com` is the default for all event types in the `google.storage`
454
+ # namespace.
455
+ # Corresponds to the JSON property `service`
456
+ # @return [String]
457
+ attr_accessor :service
458
+
459
+ def initialize(**args)
460
+ update!(**args)
461
+ end
462
+
463
+ # Update properties of this object
464
+ def update!(**args)
465
+ @event_type = args[:event_type] if args.key?(:event_type)
466
+ @failure_policy = args[:failure_policy] if args.key?(:failure_policy)
467
+ @resource = args[:resource] if args.key?(:resource)
468
+ @service = args[:service] if args.key?(:service)
469
+ end
470
+ end
471
+
472
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
473
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
474
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
475
+ # "Summary size limit" description: "Determines if a summary is less than 100
476
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
477
+ # Requestor is owner" description: "Determines if requestor is the document
478
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
479
+ # Logic): title: "Public documents" description: "Determine whether the document
480
+ # should be publicly visible" expression: "document.type != 'private' &&
481
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
482
+ # string" description: "Create a notification string with a timestamp."
483
+ # expression: "'New message received at ' + string(document.create_time)" The
484
+ # exact variables and functions that may be referenced within an expression are
485
+ # determined by the service that evaluates it. See the service documentation for
486
+ # additional information.
487
+ class Expr
488
+ include Google::Apis::Core::Hashable
489
+
490
+ # Optional. Description of the expression. This is a longer text which describes
491
+ # the expression, e.g. when hovered over it in a UI.
492
+ # Corresponds to the JSON property `description`
493
+ # @return [String]
494
+ attr_accessor :description
495
+
496
+ # Textual representation of an expression in Common Expression Language syntax.
497
+ # Corresponds to the JSON property `expression`
498
+ # @return [String]
499
+ attr_accessor :expression
500
+
501
+ # Optional. String indicating the location of the expression for error reporting,
502
+ # e.g. a file name and a position in the file.
503
+ # Corresponds to the JSON property `location`
504
+ # @return [String]
505
+ attr_accessor :location
506
+
507
+ # Optional. Title for the expression, i.e. a short string describing its purpose.
508
+ # This can be used e.g. in UIs which allow to enter the expression.
509
+ # Corresponds to the JSON property `title`
510
+ # @return [String]
511
+ attr_accessor :title
512
+
513
+ def initialize(**args)
514
+ update!(**args)
515
+ end
516
+
517
+ # Update properties of this object
518
+ def update!(**args)
519
+ @description = args[:description] if args.key?(:description)
520
+ @expression = args[:expression] if args.key?(:expression)
521
+ @location = args[:location] if args.key?(:location)
522
+ @title = args[:title] if args.key?(:title)
523
+ end
524
+ end
525
+
526
+ # Describes the policy in case of function's execution failure. If empty, then
527
+ # defaults to ignoring failures (i.e. not retrying them).
528
+ class FailurePolicy
529
+ include Google::Apis::Core::Hashable
530
+
531
+ # Describes the retry policy in case of function's execution failure. A function
532
+ # execution will be retried on any failure. A failed execution will be retried
533
+ # up to 7 days with an exponential backoff (capped at 10 seconds). Retried
534
+ # execution is charged as any other execution.
535
+ # Corresponds to the JSON property `retry`
536
+ # @return [Google::Apis::CloudfunctionsV1::Retry]
537
+ attr_accessor :retry
538
+
539
+ def initialize(**args)
540
+ update!(**args)
541
+ end
542
+
543
+ # Update properties of this object
544
+ def update!(**args)
545
+ @retry = args[:retry] if args.key?(:retry)
546
+ end
547
+ end
548
+
549
+ # Request of `GenerateDownloadUrl` method.
550
+ class GenerateDownloadUrlRequest
551
+ include Google::Apis::Core::Hashable
552
+
553
+ # The optional version of function. If not set, default, current version is used.
554
+ # Corresponds to the JSON property `versionId`
555
+ # @return [Fixnum]
556
+ attr_accessor :version_id
557
+
558
+ def initialize(**args)
559
+ update!(**args)
560
+ end
561
+
562
+ # Update properties of this object
563
+ def update!(**args)
564
+ @version_id = args[:version_id] if args.key?(:version_id)
565
+ end
566
+ end
567
+
568
+ # Response of `GenerateDownloadUrl` method.
569
+ class GenerateDownloadUrlResponse
570
+ include Google::Apis::Core::Hashable
571
+
572
+ # The generated Google Cloud Storage signed URL that should be used for function
573
+ # source code download.
574
+ # Corresponds to the JSON property `downloadUrl`
575
+ # @return [String]
576
+ attr_accessor :download_url
577
+
578
+ def initialize(**args)
579
+ update!(**args)
580
+ end
581
+
582
+ # Update properties of this object
583
+ def update!(**args)
584
+ @download_url = args[:download_url] if args.key?(:download_url)
585
+ end
586
+ end
587
+
588
+ # Request of `GenerateSourceUploadUrl` method.
589
+ class GenerateUploadUrlRequest
590
+ include Google::Apis::Core::Hashable
591
+
592
+ def initialize(**args)
593
+ update!(**args)
594
+ end
595
+
596
+ # Update properties of this object
597
+ def update!(**args)
598
+ end
599
+ end
600
+
601
+ # Response of `GenerateSourceUploadUrl` method.
602
+ class GenerateUploadUrlResponse
603
+ include Google::Apis::Core::Hashable
604
+
605
+ # The generated Google Cloud Storage signed URL that should be used for a
606
+ # function source code upload. The uploaded file should be a zip archive which
607
+ # contains a function.
608
+ # Corresponds to the JSON property `uploadUrl`
609
+ # @return [String]
610
+ attr_accessor :upload_url
611
+
612
+ def initialize(**args)
613
+ update!(**args)
614
+ end
615
+
616
+ # Update properties of this object
617
+ def update!(**args)
618
+ @upload_url = args[:upload_url] if args.key?(:upload_url)
619
+ end
620
+ end
621
+
622
+ # Describes HttpsTrigger, could be used to connect web hooks to function.
623
+ class HttpsTrigger
624
+ include Google::Apis::Core::Hashable
625
+
626
+ # Output only. The deployed url for the function.
627
+ # Corresponds to the JSON property `url`
628
+ # @return [String]
629
+ attr_accessor :url
630
+
631
+ def initialize(**args)
632
+ update!(**args)
633
+ end
634
+
635
+ # Update properties of this object
636
+ def update!(**args)
637
+ @url = args[:url] if args.key?(:url)
638
+ end
639
+ end
640
+
641
+ # Response for the `ListFunctions` method.
642
+ class ListFunctionsResponse
643
+ include Google::Apis::Core::Hashable
644
+
645
+ # The functions that match the request.
646
+ # Corresponds to the JSON property `functions`
647
+ # @return [Array<Google::Apis::CloudfunctionsV1::CloudFunction>]
648
+ attr_accessor :functions
649
+
650
+ # If not empty, indicates that there may be more functions that match the
651
+ # request; this value should be passed in a new google.cloud.functions.v1.
652
+ # ListFunctionsRequest to get more functions.
653
+ # Corresponds to the JSON property `nextPageToken`
654
+ # @return [String]
655
+ attr_accessor :next_page_token
656
+
657
+ # Locations that could not be reached. The response does not include any
658
+ # functions from these locations.
659
+ # Corresponds to the JSON property `unreachable`
660
+ # @return [Array<String>]
661
+ attr_accessor :unreachable
662
+
663
+ def initialize(**args)
664
+ update!(**args)
665
+ end
666
+
667
+ # Update properties of this object
668
+ def update!(**args)
669
+ @functions = args[:functions] if args.key?(:functions)
670
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
671
+ @unreachable = args[:unreachable] if args.key?(:unreachable)
672
+ end
673
+ end
674
+
675
+ # The response message for Locations.ListLocations.
676
+ class ListLocationsResponse
677
+ include Google::Apis::Core::Hashable
678
+
679
+ # A list of locations that matches the specified filter in the request.
680
+ # Corresponds to the JSON property `locations`
681
+ # @return [Array<Google::Apis::CloudfunctionsV1::Location>]
682
+ attr_accessor :locations
683
+
684
+ # The standard List next-page token.
685
+ # Corresponds to the JSON property `nextPageToken`
686
+ # @return [String]
687
+ attr_accessor :next_page_token
688
+
689
+ def initialize(**args)
690
+ update!(**args)
691
+ end
692
+
693
+ # Update properties of this object
694
+ def update!(**args)
695
+ @locations = args[:locations] if args.key?(:locations)
696
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
697
+ end
698
+ end
699
+
700
+ # The response message for Operations.ListOperations.
701
+ class ListOperationsResponse
702
+ include Google::Apis::Core::Hashable
703
+
704
+ # The standard List next-page token.
705
+ # Corresponds to the JSON property `nextPageToken`
706
+ # @return [String]
707
+ attr_accessor :next_page_token
708
+
709
+ # A list of operations that matches the specified filter in the request.
710
+ # Corresponds to the JSON property `operations`
711
+ # @return [Array<Google::Apis::CloudfunctionsV1::Operation>]
712
+ attr_accessor :operations
713
+
714
+ def initialize(**args)
715
+ update!(**args)
716
+ end
717
+
718
+ # Update properties of this object
719
+ def update!(**args)
720
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
721
+ @operations = args[:operations] if args.key?(:operations)
722
+ end
723
+ end
724
+
725
+ # A resource that represents Google Cloud Platform location.
726
+ class Location
727
+ include Google::Apis::Core::Hashable
728
+
729
+ # The friendly name for this location, typically a nearby city name. For example,
730
+ # "Tokyo".
731
+ # Corresponds to the JSON property `displayName`
732
+ # @return [String]
733
+ attr_accessor :display_name
734
+
735
+ # Cross-service attributes for the location. For example `"cloud.googleapis.com/
736
+ # region": "us-east1"`
737
+ # Corresponds to the JSON property `labels`
738
+ # @return [Hash<String,String>]
739
+ attr_accessor :labels
740
+
741
+ # The canonical id for this location. For example: `"us-east1"`.
742
+ # Corresponds to the JSON property `locationId`
743
+ # @return [String]
744
+ attr_accessor :location_id
745
+
746
+ # Service-specific metadata. For example the available capacity at the given
747
+ # location.
748
+ # Corresponds to the JSON property `metadata`
749
+ # @return [Hash<String,Object>]
750
+ attr_accessor :metadata
751
+
752
+ # Resource name for the location, which may vary between implementations. For
753
+ # example: `"projects/example-project/locations/us-east1"`
754
+ # Corresponds to the JSON property `name`
755
+ # @return [String]
756
+ attr_accessor :name
757
+
758
+ def initialize(**args)
759
+ update!(**args)
760
+ end
761
+
762
+ # Update properties of this object
763
+ def update!(**args)
764
+ @display_name = args[:display_name] if args.key?(:display_name)
765
+ @labels = args[:labels] if args.key?(:labels)
766
+ @location_id = args[:location_id] if args.key?(:location_id)
767
+ @metadata = args[:metadata] if args.key?(:metadata)
768
+ @name = args[:name] if args.key?(:name)
769
+ end
770
+ end
771
+
772
+ # This resource represents a long-running operation that is the result of a
773
+ # network API call.
774
+ class Operation
775
+ include Google::Apis::Core::Hashable
776
+
777
+ # If the value is `false`, it means the operation is still in progress. If `true`
778
+ # , the operation is completed, and either `error` or `response` is available.
779
+ # Corresponds to the JSON property `done`
780
+ # @return [Boolean]
781
+ attr_accessor :done
782
+ alias_method :done?, :done
783
+
784
+ # The `Status` type defines a logical error model that is suitable for different
785
+ # programming environments, including REST APIs and RPC APIs. It is used by [
786
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
787
+ # data: error code, error message, and error details. You can find out more
788
+ # about this error model and how to work with it in the [API Design Guide](https:
789
+ # //cloud.google.com/apis/design/errors).
790
+ # Corresponds to the JSON property `error`
791
+ # @return [Google::Apis::CloudfunctionsV1::Status]
792
+ attr_accessor :error
793
+
794
+ # Service-specific metadata associated with the operation. It typically contains
795
+ # progress information and common metadata such as create time. Some services
796
+ # might not provide such metadata. Any method that returns a long-running
797
+ # operation should document the metadata type, if any.
798
+ # Corresponds to the JSON property `metadata`
799
+ # @return [Hash<String,Object>]
800
+ attr_accessor :metadata
801
+
802
+ # The server-assigned name, which is only unique within the same service that
803
+ # originally returns it. If you use the default HTTP mapping, the `name` should
804
+ # be a resource name ending with `operations/`unique_id``.
805
+ # Corresponds to the JSON property `name`
806
+ # @return [String]
807
+ attr_accessor :name
808
+
809
+ # The normal response of the operation in case of success. If the original
810
+ # method returns no data on success, such as `Delete`, the response is `google.
811
+ # protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`,
812
+ # the response should be the resource. For other methods, the response should
813
+ # have the type `XxxResponse`, where `Xxx` is the original method name. For
814
+ # example, if the original method name is `TakeSnapshot()`, the inferred
815
+ # response type is `TakeSnapshotResponse`.
816
+ # Corresponds to the JSON property `response`
817
+ # @return [Hash<String,Object>]
818
+ attr_accessor :response
819
+
820
+ def initialize(**args)
821
+ update!(**args)
822
+ end
823
+
824
+ # Update properties of this object
825
+ def update!(**args)
826
+ @done = args[:done] if args.key?(:done)
827
+ @error = args[:error] if args.key?(:error)
828
+ @metadata = args[:metadata] if args.key?(:metadata)
829
+ @name = args[:name] if args.key?(:name)
830
+ @response = args[:response] if args.key?(:response)
831
+ end
832
+ end
833
+
834
+ # Metadata describing an Operation
835
+ class OperationMetadataV1
836
+ include Google::Apis::Core::Hashable
837
+
838
+ # The Cloud Build ID of the function created or updated by an API call. This
839
+ # field is only populated for Create and Update operations.
840
+ # Corresponds to the JSON property `buildId`
841
+ # @return [String]
842
+ attr_accessor :build_id
843
+
844
+ # The original request that started the operation.
845
+ # Corresponds to the JSON property `request`
846
+ # @return [Hash<String,Object>]
847
+ attr_accessor :request
848
+
849
+ # A field for Firebase function deployments
850
+ # Corresponds to the JSON property `sourceToken`
851
+ # @return [String]
852
+ attr_accessor :source_token
853
+
854
+ # Target of the operation - for example projects/project-1/locations/region-1/
855
+ # functions/function-1
856
+ # Corresponds to the JSON property `target`
857
+ # @return [String]
858
+ attr_accessor :target
859
+
860
+ # Type of operation.
861
+ # Corresponds to the JSON property `type`
862
+ # @return [String]
863
+ attr_accessor :type
864
+
865
+ # The last update timestamp of the operation.
866
+ # Corresponds to the JSON property `updateTime`
867
+ # @return [String]
868
+ attr_accessor :update_time
869
+
870
+ # Version id of the function created or updated by an API call. This field is
871
+ # only populated for Create and Update operations.
872
+ # Corresponds to the JSON property `versionId`
873
+ # @return [Fixnum]
874
+ attr_accessor :version_id
875
+
876
+ def initialize(**args)
877
+ update!(**args)
878
+ end
879
+
880
+ # Update properties of this object
881
+ def update!(**args)
882
+ @build_id = args[:build_id] if args.key?(:build_id)
883
+ @request = args[:request] if args.key?(:request)
884
+ @source_token = args[:source_token] if args.key?(:source_token)
885
+ @target = args[:target] if args.key?(:target)
886
+ @type = args[:type] if args.key?(:type)
887
+ @update_time = args[:update_time] if args.key?(:update_time)
888
+ @version_id = args[:version_id] if args.key?(:version_id)
889
+ end
890
+ end
891
+
892
+ # An Identity and Access Management (IAM) policy, which specifies access
893
+ # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
894
+ # A `binding` binds one or more `members` to a single `role`. Members can be
895
+ # user accounts, service accounts, Google groups, and domains (such as G Suite).
896
+ # A `role` is a named list of permissions; each `role` can be an IAM predefined
897
+ # role or a user-created custom role. For some types of Google Cloud resources,
898
+ # a `binding` can also specify a `condition`, which is a logical expression that
899
+ # allows access to a resource only if the expression evaluates to `true`. A
900
+ # condition can add constraints based on attributes of the request, the resource,
901
+ # or both. To learn which resources support conditions in their IAM policies,
902
+ # see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
903
+ # resource-policies). **JSON example:** ` "bindings": [ ` "role": "roles/
904
+ # resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "
905
+ # group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@
906
+ # appspot.gserviceaccount.com" ] `, ` "role": "roles/resourcemanager.
907
+ # organizationViewer", "members": [ "user:eve@example.com" ], "condition": ` "
908
+ # title": "expirable access", "description": "Does not grant access after Sep
909
+ # 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", `
910
+ # ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:** bindings: -
911
+ # members: - user:mike@example.com - group:admins@example.com - domain:google.
912
+ # com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/
913
+ # resourcemanager.organizationAdmin - members: - user:eve@example.com role:
914
+ # roles/resourcemanager.organizationViewer condition: title: expirable access
915
+ # description: Does not grant access after Sep 2020 expression: request.time <
916
+ # timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a
917
+ # description of IAM and its features, see the [IAM documentation](https://cloud.
918
+ # google.com/iam/docs/).
919
+ class Policy
920
+ include Google::Apis::Core::Hashable
921
+
922
+ # Specifies cloud audit logging configuration for this policy.
923
+ # Corresponds to the JSON property `auditConfigs`
924
+ # @return [Array<Google::Apis::CloudfunctionsV1::AuditConfig>]
925
+ attr_accessor :audit_configs
926
+
927
+ # Associates a list of `members` to a `role`. Optionally, may specify a `
928
+ # condition` that determines how and when the `bindings` are applied. Each of
929
+ # the `bindings` must contain at least one member.
930
+ # Corresponds to the JSON property `bindings`
931
+ # @return [Array<Google::Apis::CloudfunctionsV1::Binding>]
932
+ attr_accessor :bindings
933
+
934
+ # `etag` is used for optimistic concurrency control as a way to help prevent
935
+ # simultaneous updates of a policy from overwriting each other. It is strongly
936
+ # suggested that systems make use of the `etag` in the read-modify-write cycle
937
+ # to perform policy updates in order to avoid race conditions: An `etag` is
938
+ # returned in the response to `getIamPolicy`, and systems are expected to put
939
+ # that etag in the request to `setIamPolicy` to ensure that their change will be
940
+ # applied to the same version of the policy. **Important:** If you use IAM
941
+ # Conditions, you must include the `etag` field whenever you call `setIamPolicy`.
942
+ # If you omit this field, then IAM allows you to overwrite a version `3` policy
943
+ # with a version `1` policy, and all of the conditions in the version `3` policy
944
+ # are lost.
945
+ # Corresponds to the JSON property `etag`
946
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
947
+ # @return [String]
948
+ attr_accessor :etag
949
+
950
+ # Specifies the format of the policy. Valid values are `0`, `1`, and `3`.
951
+ # Requests that specify an invalid value are rejected. Any operation that
952
+ # affects conditional role bindings must specify version `3`. This requirement
953
+ # applies to the following operations: * Getting a policy that includes a
954
+ # conditional role binding * Adding a conditional role binding to a policy *
955
+ # Changing a conditional role binding in a policy * Removing any role binding,
956
+ # with or without a condition, from a policy that includes conditions **
957
+ # Important:** If you use IAM Conditions, you must include the `etag` field
958
+ # whenever you call `setIamPolicy`. If you omit this field, then IAM allows you
959
+ # to overwrite a version `3` policy with a version `1` policy, and all of the
960
+ # conditions in the version `3` policy are lost. If a policy does not include
961
+ # any conditions, operations on that policy may specify any valid version or
962
+ # leave the field unset. To learn which resources support conditions in their
963
+ # IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/
964
+ # conditions/resource-policies).
965
+ # Corresponds to the JSON property `version`
966
+ # @return [Fixnum]
967
+ attr_accessor :version
968
+
969
+ def initialize(**args)
970
+ update!(**args)
971
+ end
972
+
973
+ # Update properties of this object
974
+ def update!(**args)
975
+ @audit_configs = args[:audit_configs] if args.key?(:audit_configs)
976
+ @bindings = args[:bindings] if args.key?(:bindings)
977
+ @etag = args[:etag] if args.key?(:etag)
978
+ @version = args[:version] if args.key?(:version)
979
+ end
980
+ end
981
+
982
+ # Describes the retry policy in case of function's execution failure. A function
983
+ # execution will be retried on any failure. A failed execution will be retried
984
+ # up to 7 days with an exponential backoff (capped at 10 seconds). Retried
985
+ # execution is charged as any other execution.
986
+ class Retry
987
+ include Google::Apis::Core::Hashable
988
+
989
+ def initialize(**args)
990
+ update!(**args)
991
+ end
992
+
993
+ # Update properties of this object
994
+ def update!(**args)
995
+ end
996
+ end
997
+
998
+ # Request message for `SetIamPolicy` method.
999
+ class SetIamPolicyRequest
1000
+ include Google::Apis::Core::Hashable
1001
+
1002
+ # An Identity and Access Management (IAM) policy, which specifies access
1003
+ # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
1004
+ # A `binding` binds one or more `members` to a single `role`. Members can be
1005
+ # user accounts, service accounts, Google groups, and domains (such as G Suite).
1006
+ # A `role` is a named list of permissions; each `role` can be an IAM predefined
1007
+ # role or a user-created custom role. For some types of Google Cloud resources,
1008
+ # a `binding` can also specify a `condition`, which is a logical expression that
1009
+ # allows access to a resource only if the expression evaluates to `true`. A
1010
+ # condition can add constraints based on attributes of the request, the resource,
1011
+ # or both. To learn which resources support conditions in their IAM policies,
1012
+ # see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
1013
+ # resource-policies). **JSON example:** ` "bindings": [ ` "role": "roles/
1014
+ # resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "
1015
+ # group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@
1016
+ # appspot.gserviceaccount.com" ] `, ` "role": "roles/resourcemanager.
1017
+ # organizationViewer", "members": [ "user:eve@example.com" ], "condition": ` "
1018
+ # title": "expirable access", "description": "Does not grant access after Sep
1019
+ # 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", `
1020
+ # ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:** bindings: -
1021
+ # members: - user:mike@example.com - group:admins@example.com - domain:google.
1022
+ # com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/
1023
+ # resourcemanager.organizationAdmin - members: - user:eve@example.com role:
1024
+ # roles/resourcemanager.organizationViewer condition: title: expirable access
1025
+ # description: Does not grant access after Sep 2020 expression: request.time <
1026
+ # timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a
1027
+ # description of IAM and its features, see the [IAM documentation](https://cloud.
1028
+ # google.com/iam/docs/).
1029
+ # Corresponds to the JSON property `policy`
1030
+ # @return [Google::Apis::CloudfunctionsV1::Policy]
1031
+ attr_accessor :policy
1032
+
1033
+ # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
1034
+ # the fields in the mask will be modified. If no mask is provided, the following
1035
+ # default mask is used: `paths: "bindings, etag"`
1036
+ # Corresponds to the JSON property `updateMask`
1037
+ # @return [String]
1038
+ attr_accessor :update_mask
1039
+
1040
+ def initialize(**args)
1041
+ update!(**args)
1042
+ end
1043
+
1044
+ # Update properties of this object
1045
+ def update!(**args)
1046
+ @policy = args[:policy] if args.key?(:policy)
1047
+ @update_mask = args[:update_mask] if args.key?(:update_mask)
1048
+ end
1049
+ end
1050
+
1051
+ # Describes SourceRepository, used to represent parameters related to source
1052
+ # repository where a function is hosted.
1053
+ class SourceRepository
1054
+ include Google::Apis::Core::Hashable
1055
+
1056
+ # Output only. The URL pointing to the hosted repository where the function were
1057
+ # defined at the time of deployment. It always points to a specific commit in
1058
+ # the format described above.
1059
+ # Corresponds to the JSON property `deployedUrl`
1060
+ # @return [String]
1061
+ attr_accessor :deployed_url
1062
+
1063
+ # The URL pointing to the hosted repository where the function is defined. There
1064
+ # are supported Cloud Source Repository URLs in the following formats: To refer
1065
+ # to a specific commit: `https://source.developers.google.com/projects/*/repos/*/
1066
+ # revisions/*/paths/*` To refer to a moveable alias (branch): `https://source.
1067
+ # developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*` In
1068
+ # particular, to refer to HEAD use `master` moveable alias. To refer to a
1069
+ # specific fixed alias (tag): `https://source.developers.google.com/projects/*/
1070
+ # repos/*/fixed-aliases/*/paths/*` You may omit `paths/*` if you want to use the
1071
+ # main directory.
1072
+ # Corresponds to the JSON property `url`
1073
+ # @return [String]
1074
+ attr_accessor :url
1075
+
1076
+ def initialize(**args)
1077
+ update!(**args)
1078
+ end
1079
+
1080
+ # Update properties of this object
1081
+ def update!(**args)
1082
+ @deployed_url = args[:deployed_url] if args.key?(:deployed_url)
1083
+ @url = args[:url] if args.key?(:url)
1084
+ end
1085
+ end
1086
+
1087
+ # The `Status` type defines a logical error model that is suitable for different
1088
+ # programming environments, including REST APIs and RPC APIs. It is used by [
1089
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
1090
+ # data: error code, error message, and error details. You can find out more
1091
+ # about this error model and how to work with it in the [API Design Guide](https:
1092
+ # //cloud.google.com/apis/design/errors).
1093
+ class Status
1094
+ include Google::Apis::Core::Hashable
1095
+
1096
+ # The status code, which should be an enum value of google.rpc.Code.
1097
+ # Corresponds to the JSON property `code`
1098
+ # @return [Fixnum]
1099
+ attr_accessor :code
1100
+
1101
+ # A list of messages that carry the error details. There is a common set of
1102
+ # message types for APIs to use.
1103
+ # Corresponds to the JSON property `details`
1104
+ # @return [Array<Hash<String,Object>>]
1105
+ attr_accessor :details
1106
+
1107
+ # A developer-facing error message, which should be in English. Any user-facing
1108
+ # error message should be localized and sent in the google.rpc.Status.details
1109
+ # field, or localized by the client.
1110
+ # Corresponds to the JSON property `message`
1111
+ # @return [String]
1112
+ attr_accessor :message
1113
+
1114
+ def initialize(**args)
1115
+ update!(**args)
1116
+ end
1117
+
1118
+ # Update properties of this object
1119
+ def update!(**args)
1120
+ @code = args[:code] if args.key?(:code)
1121
+ @details = args[:details] if args.key?(:details)
1122
+ @message = args[:message] if args.key?(:message)
1123
+ end
1124
+ end
1125
+
1126
+ # Request message for `TestIamPermissions` method.
1127
+ class TestIamPermissionsRequest
1128
+ include Google::Apis::Core::Hashable
1129
+
1130
+ # The set of permissions to check for the `resource`. Permissions with wildcards
1131
+ # (such as '*' or 'storage.*') are not allowed. For more information see [IAM
1132
+ # Overview](https://cloud.google.com/iam/docs/overview#permissions).
1133
+ # Corresponds to the JSON property `permissions`
1134
+ # @return [Array<String>]
1135
+ attr_accessor :permissions
1136
+
1137
+ def initialize(**args)
1138
+ update!(**args)
1139
+ end
1140
+
1141
+ # Update properties of this object
1142
+ def update!(**args)
1143
+ @permissions = args[:permissions] if args.key?(:permissions)
1144
+ end
1145
+ end
1146
+
1147
+ # Response message for `TestIamPermissions` method.
1148
+ class TestIamPermissionsResponse
1149
+ include Google::Apis::Core::Hashable
1150
+
1151
+ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1152
+ # Corresponds to the JSON property `permissions`
1153
+ # @return [Array<String>]
1154
+ attr_accessor :permissions
1155
+
1156
+ def initialize(**args)
1157
+ update!(**args)
1158
+ end
1159
+
1160
+ # Update properties of this object
1161
+ def update!(**args)
1162
+ @permissions = args[:permissions] if args.key?(:permissions)
1163
+ end
1164
+ end
1165
+ end
1166
+ end
1167
+ end