google-apis-script_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: 7618a615fe6d63bed1d9b8c3281a53a6abf8b1d2128b6a2a768c2f18c9b257e1
4
+ data.tar.gz: 44d2b1c064c091f414d0f71387016ce6ce11043a17855c86573124817076e771
5
+ SHA512:
6
+ metadata.gz: da336f4ce759b1ce1f1d3bfa39e2edac6c10fc1c3149e668b80ad0402c0bcf812f1b4185a6af68cef73e5189be25fdc52e4a818e9794ca6a7edc2c3230f94250
7
+ data.tar.gz: bd40688c6d05a510656b5a94fdc33b8ce582d10fafa8d280ac71ca7463578958c8e887a513992dc826a570835e6fed1e824b6889cac32909b2970cd76b893bba
@@ -0,0 +1,13 @@
1
+ --hide-void-return
2
+ --no-private
3
+ --verbose
4
+ --title=google-apis-script_v1
5
+ --markup-provider=redcarpet
6
+ --markup=markdown
7
+ --main OVERVIEW.md
8
+ lib/google/apis/script_v1/*.rb
9
+ lib/google/apis/script_v1.rb
10
+ -
11
+ OVERVIEW.md
12
+ CHANGELOG.md
13
+ LICENSE.md
@@ -0,0 +1,7 @@
1
+ # Release history for google-apis-script_v1
2
+
3
+ ### v0.1.0 (2021-01-07)
4
+
5
+ * Regenerated using generator version 0.1.1
6
+ * Regenerated from discovery document revision 20200811
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 Apps Script API
2
+
3
+ This is a simple client library for version V1 of the Apps Script 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/script.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-script_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-script_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/script_v1"
49
+
50
+ # Create a client object
51
+ client = Google::Apis::ScriptV1::ScriptService.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 Script service in particular.)
67
+
68
+ For reference information on specific calls in the Apps Script API, see the {Google::Apis::ScriptV1::ScriptService 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-script_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://developers.google.com/apps-script/api/) 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/script_v1"
@@ -0,0 +1,87 @@
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/script_v1/service.rb'
16
+ require 'google/apis/script_v1/classes.rb'
17
+ require 'google/apis/script_v1/representations.rb'
18
+ require 'google/apis/script_v1/gem_version.rb'
19
+
20
+ module Google
21
+ module Apis
22
+ # Apps Script API
23
+ #
24
+ # Manages and executes Google Apps Script projects.
25
+ #
26
+ # @see https://developers.google.com/apps-script/api/
27
+ module ScriptV1
28
+ # Version of the Apps Script API this client connects to.
29
+ # This is NOT the gem version.
30
+ VERSION = 'V1'
31
+
32
+ # Read, compose, send, and permanently delete all your email from Gmail
33
+ AUTH_SCOPE = 'https://mail.google.com/'
34
+
35
+ # See, edit, share, and permanently delete all the calendars you can access using Google Calendar
36
+ CALENDAR_FEEDS = 'https://www.google.com/calendar/feeds'
37
+
38
+ # See, edit, download, and permanently delete your contacts
39
+ M8_FEEDS = 'https://www.google.com/m8/feeds'
40
+
41
+ # View and manage the provisioning of groups on your domain
42
+ AUTH_ADMIN_DIRECTORY_GROUP = 'https://www.googleapis.com/auth/admin.directory.group'
43
+
44
+ # View and manage the provisioning of users on your domain
45
+ AUTH_ADMIN_DIRECTORY_USER = 'https://www.googleapis.com/auth/admin.directory.user'
46
+
47
+ # View and manage your Google Docs documents
48
+ AUTH_DOCUMENTS = 'https://www.googleapis.com/auth/documents'
49
+
50
+ # See, edit, create, and delete all of your Google Drive files
51
+ AUTH_DRIVE = 'https://www.googleapis.com/auth/drive'
52
+
53
+ # View and manage your forms in Google Drive
54
+ AUTH_FORMS = 'https://www.googleapis.com/auth/forms'
55
+
56
+ # View and manage forms that this application has been installed in
57
+ AUTH_FORMS_CURRENTONLY = 'https://www.googleapis.com/auth/forms.currentonly'
58
+
59
+ # View and manage your Google Groups
60
+ AUTH_GROUPS = 'https://www.googleapis.com/auth/groups'
61
+
62
+ # Create and update Google Apps Script deployments
63
+ AUTH_SCRIPT_DEPLOYMENTS = 'https://www.googleapis.com/auth/script.deployments'
64
+
65
+ # View Google Apps Script deployments
66
+ AUTH_SCRIPT_DEPLOYMENTS_READONLY = 'https://www.googleapis.com/auth/script.deployments.readonly'
67
+
68
+ # View Google Apps Script project's metrics
69
+ AUTH_SCRIPT_METRICS = 'https://www.googleapis.com/auth/script.metrics'
70
+
71
+ # View Google Apps Script processes
72
+ AUTH_SCRIPT_PROCESSES = 'https://www.googleapis.com/auth/script.processes'
73
+
74
+ # Create and update Google Apps Script projects
75
+ AUTH_SCRIPT_PROJECTS = 'https://www.googleapis.com/auth/script.projects'
76
+
77
+ # View Google Apps Script projects
78
+ AUTH_SCRIPT_PROJECTS_READONLY = 'https://www.googleapis.com/auth/script.projects.readonly'
79
+
80
+ # See, edit, create, and delete your spreadsheets in Google Drive
81
+ AUTH_SPREADSHEETS = 'https://www.googleapis.com/auth/spreadsheets'
82
+
83
+ # View your email address
84
+ AUTH_USERINFO_EMAIL = 'https://www.googleapis.com/auth/userinfo.email'
85
+ end
86
+ end
87
+ end
@@ -0,0 +1,1203 @@
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 ScriptV1
24
+
25
+ # The Content resource.
26
+ class Content
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # The list of script project files. One of the files is a script manifest; it
30
+ # must be named "appsscript", must have type of JSON, and include the manifest
31
+ # configurations for the project.
32
+ # Corresponds to the JSON property `files`
33
+ # @return [Array<Google::Apis::ScriptV1::File>]
34
+ attr_accessor :files
35
+
36
+ # The script project's Drive ID.
37
+ # Corresponds to the JSON property `scriptId`
38
+ # @return [String]
39
+ attr_accessor :script_id
40
+
41
+ def initialize(**args)
42
+ update!(**args)
43
+ end
44
+
45
+ # Update properties of this object
46
+ def update!(**args)
47
+ @files = args[:files] if args.key?(:files)
48
+ @script_id = args[:script_id] if args.key?(:script_id)
49
+ end
50
+ end
51
+
52
+ # Request to create a script project.
53
+ class CreateProjectRequest
54
+ include Google::Apis::Core::Hashable
55
+
56
+ # The Drive ID of a parent file that the created script project is bound to.
57
+ # This is usually the ID of a Google Doc, Google Sheet, Google Form, or Google
58
+ # Slides file. If not set, a standalone script project is created.
59
+ # Corresponds to the JSON property `parentId`
60
+ # @return [String]
61
+ attr_accessor :parent_id
62
+
63
+ # The title for the project.
64
+ # Corresponds to the JSON property `title`
65
+ # @return [String]
66
+ attr_accessor :title
67
+
68
+ def initialize(**args)
69
+ update!(**args)
70
+ end
71
+
72
+ # Update properties of this object
73
+ def update!(**args)
74
+ @parent_id = args[:parent_id] if args.key?(:parent_id)
75
+ @title = args[:title] if args.key?(:title)
76
+ end
77
+ end
78
+
79
+ # Representation of a single script deployment.
80
+ class Deployment
81
+ include Google::Apis::Core::Hashable
82
+
83
+ # Metadata the defines how a deployment is configured.
84
+ # Corresponds to the JSON property `deploymentConfig`
85
+ # @return [Google::Apis::ScriptV1::DeploymentConfig]
86
+ attr_accessor :deployment_config
87
+
88
+ # The deployment ID for this deployment.
89
+ # Corresponds to the JSON property `deploymentId`
90
+ # @return [String]
91
+ attr_accessor :deployment_id
92
+
93
+ # The deployment's entry points.
94
+ # Corresponds to the JSON property `entryPoints`
95
+ # @return [Array<Google::Apis::ScriptV1::EntryPoint>]
96
+ attr_accessor :entry_points
97
+
98
+ # Last modified date time stamp.
99
+ # Corresponds to the JSON property `updateTime`
100
+ # @return [String]
101
+ attr_accessor :update_time
102
+
103
+ def initialize(**args)
104
+ update!(**args)
105
+ end
106
+
107
+ # Update properties of this object
108
+ def update!(**args)
109
+ @deployment_config = args[:deployment_config] if args.key?(:deployment_config)
110
+ @deployment_id = args[:deployment_id] if args.key?(:deployment_id)
111
+ @entry_points = args[:entry_points] if args.key?(:entry_points)
112
+ @update_time = args[:update_time] if args.key?(:update_time)
113
+ end
114
+ end
115
+
116
+ # Metadata the defines how a deployment is configured.
117
+ class DeploymentConfig
118
+ include Google::Apis::Core::Hashable
119
+
120
+ # The description for this deployment.
121
+ # Corresponds to the JSON property `description`
122
+ # @return [String]
123
+ attr_accessor :description
124
+
125
+ # The manifest file name for this deployment.
126
+ # Corresponds to the JSON property `manifestFileName`
127
+ # @return [String]
128
+ attr_accessor :manifest_file_name
129
+
130
+ # The script project's Drive ID.
131
+ # Corresponds to the JSON property `scriptId`
132
+ # @return [String]
133
+ attr_accessor :script_id
134
+
135
+ # The version number on which this deployment is based.
136
+ # Corresponds to the JSON property `versionNumber`
137
+ # @return [Fixnum]
138
+ attr_accessor :version_number
139
+
140
+ def initialize(**args)
141
+ update!(**args)
142
+ end
143
+
144
+ # Update properties of this object
145
+ def update!(**args)
146
+ @description = args[:description] if args.key?(:description)
147
+ @manifest_file_name = args[:manifest_file_name] if args.key?(:manifest_file_name)
148
+ @script_id = args[:script_id] if args.key?(:script_id)
149
+ @version_number = args[:version_number] if args.key?(:version_number)
150
+ end
151
+ end
152
+
153
+ # A generic empty message that you can re-use to avoid defining duplicated empty
154
+ # messages in your APIs. A typical example is to use it as the request or the
155
+ # response type of an API method. For instance: service Foo ` rpc Bar(google.
156
+ # protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
157
+ # `Empty` is empty JSON object ````.
158
+ class Empty
159
+ include Google::Apis::Core::Hashable
160
+
161
+ def initialize(**args)
162
+ update!(**args)
163
+ end
164
+
165
+ # Update properties of this object
166
+ def update!(**args)
167
+ end
168
+ end
169
+
170
+ # A configuration that defines how a deployment is accessed externally.
171
+ class EntryPoint
172
+ include Google::Apis::Core::Hashable
173
+
174
+ # An add-on entry point.
175
+ # Corresponds to the JSON property `addOn`
176
+ # @return [Google::Apis::ScriptV1::GoogleAppsScriptTypeAddOnEntryPoint]
177
+ attr_accessor :add_on
178
+
179
+ # The type of the entry point.
180
+ # Corresponds to the JSON property `entryPointType`
181
+ # @return [String]
182
+ attr_accessor :entry_point_type
183
+
184
+ # An API executable entry point.
185
+ # Corresponds to the JSON property `executionApi`
186
+ # @return [Google::Apis::ScriptV1::GoogleAppsScriptTypeExecutionApiEntryPoint]
187
+ attr_accessor :execution_api
188
+
189
+ # A web application entry point.
190
+ # Corresponds to the JSON property `webApp`
191
+ # @return [Google::Apis::ScriptV1::GoogleAppsScriptTypeWebAppEntryPoint]
192
+ attr_accessor :web_app
193
+
194
+ def initialize(**args)
195
+ update!(**args)
196
+ end
197
+
198
+ # Update properties of this object
199
+ def update!(**args)
200
+ @add_on = args[:add_on] if args.key?(:add_on)
201
+ @entry_point_type = args[:entry_point_type] if args.key?(:entry_point_type)
202
+ @execution_api = args[:execution_api] if args.key?(:execution_api)
203
+ @web_app = args[:web_app] if args.key?(:web_app)
204
+ end
205
+ end
206
+
207
+ # The response for executing or debugging a function in an Apps Script project.
208
+ class ExecuteStreamResponse
209
+ include Google::Apis::Core::Hashable
210
+
211
+ # The result of an execution.
212
+ # Corresponds to the JSON property `result`
213
+ # @return [Google::Apis::ScriptV1::ScriptExecutionResult]
214
+ attr_accessor :result
215
+
216
+ def initialize(**args)
217
+ update!(**args)
218
+ end
219
+
220
+ # Update properties of this object
221
+ def update!(**args)
222
+ @result = args[:result] if args.key?(:result)
223
+ end
224
+ end
225
+
226
+ # An object that provides information about the nature of an error resulting
227
+ # from an attempted execution of a script function using the Apps Script API. If
228
+ # a run call succeeds but the script function (or Apps Script itself) throws an
229
+ # exception, the response body's error field contains a Status object. The `
230
+ # Status` object's `details` field contains an array with a single one of these `
231
+ # ExecutionError` objects.
232
+ class ExecutionError
233
+ include Google::Apis::Core::Hashable
234
+
235
+ # The error message thrown by Apps Script, usually localized into the user's
236
+ # language.
237
+ # Corresponds to the JSON property `errorMessage`
238
+ # @return [String]
239
+ attr_accessor :error_message
240
+
241
+ # The error type, for example `TypeError` or `ReferenceError`. If the error type
242
+ # is unavailable, this field is not included.
243
+ # Corresponds to the JSON property `errorType`
244
+ # @return [String]
245
+ attr_accessor :error_type
246
+
247
+ # An array of objects that provide a stack trace through the script to show
248
+ # where the execution failed, with the deepest call first.
249
+ # Corresponds to the JSON property `scriptStackTraceElements`
250
+ # @return [Array<Google::Apis::ScriptV1::ScriptStackTraceElement>]
251
+ attr_accessor :script_stack_trace_elements
252
+
253
+ def initialize(**args)
254
+ update!(**args)
255
+ end
256
+
257
+ # Update properties of this object
258
+ def update!(**args)
259
+ @error_message = args[:error_message] if args.key?(:error_message)
260
+ @error_type = args[:error_type] if args.key?(:error_type)
261
+ @script_stack_trace_elements = args[:script_stack_trace_elements] if args.key?(:script_stack_trace_elements)
262
+ end
263
+ end
264
+
265
+ # A request to run the function in a script. The script is identified by the
266
+ # specified `script_id`. Executing a function on a script returns results based
267
+ # on the implementation of the script.
268
+ class ExecutionRequest
269
+ include Google::Apis::Core::Hashable
270
+
271
+ # If `true` and the user is an owner of the script, the script runs at the most
272
+ # recently saved version rather than the version deployed for use with the Apps
273
+ # Script API. Optional; default is `false`.
274
+ # Corresponds to the JSON property `devMode`
275
+ # @return [Boolean]
276
+ attr_accessor :dev_mode
277
+ alias_method :dev_mode?, :dev_mode
278
+
279
+ # The name of the function to execute in the given script. The name does not
280
+ # include parentheses or parameters. It can reference a function in an included
281
+ # library such as `Library.libFunction1`.
282
+ # Corresponds to the JSON property `function`
283
+ # @return [String]
284
+ attr_accessor :function
285
+
286
+ # The parameters to be passed to the function being executed. The object type
287
+ # for each parameter should match the expected type in Apps Script. Parameters
288
+ # cannot be Apps Script-specific object types (such as a `Document` or a `
289
+ # Calendar`); they can only be primitive types such as `string`, `number`, `
290
+ # array`, `object`, or `boolean`. Optional.
291
+ # Corresponds to the JSON property `parameters`
292
+ # @return [Array<Object>]
293
+ attr_accessor :parameters
294
+
295
+ # *Deprecated*. For use with Android add-ons only. An ID that represents the
296
+ # user's current session in the Android app for Google Docs or Sheets, included
297
+ # as extra data in the [Intent](https://developer.android.com/guide/components/
298
+ # intents-filters.html) that launches the add-on. When an Android add-on is run
299
+ # with a session state, it gains the privileges of a [bound](https://developers.
300
+ # google.com/apps-script/guides/bound) script—that is, it can access information
301
+ # like the user's current cursor position (in Docs) or selected cell (in Sheets).
302
+ # To retrieve the state, call `Intent.getStringExtra("com.google.android.apps.
303
+ # docs.addons.SessionState")`. Optional.
304
+ # Corresponds to the JSON property `sessionState`
305
+ # @return [String]
306
+ attr_accessor :session_state
307
+
308
+ def initialize(**args)
309
+ update!(**args)
310
+ end
311
+
312
+ # Update properties of this object
313
+ def update!(**args)
314
+ @dev_mode = args[:dev_mode] if args.key?(:dev_mode)
315
+ @function = args[:function] if args.key?(:function)
316
+ @parameters = args[:parameters] if args.key?(:parameters)
317
+ @session_state = args[:session_state] if args.key?(:session_state)
318
+ end
319
+ end
320
+
321
+ # An object that provides the return value of a function executed using the Apps
322
+ # Script API. If the script function returns successfully, the response body's
323
+ # response field contains this `ExecutionResponse` object.
324
+ class ExecutionResponse
325
+ include Google::Apis::Core::Hashable
326
+
327
+ # The return value of the script function. The type matches the object type
328
+ # returned in Apps Script. Functions called using the Apps Script API cannot
329
+ # return Apps Script-specific objects (such as a `Document` or a `Calendar`);
330
+ # they can only return primitive types such as a `string`, `number`, `array`, `
331
+ # object`, or `boolean`.
332
+ # Corresponds to the JSON property `result`
333
+ # @return [Object]
334
+ attr_accessor :result
335
+
336
+ def initialize(**args)
337
+ update!(**args)
338
+ end
339
+
340
+ # Update properties of this object
341
+ def update!(**args)
342
+ @result = args[:result] if args.key?(:result)
343
+ end
344
+ end
345
+
346
+ # An individual file within a script project. A file is a third-party source
347
+ # code created by one or more developers. It can be a server-side JS code, HTML,
348
+ # or a configuration file. Each script project can contain multiple files.
349
+ class File
350
+ include Google::Apis::Core::Hashable
351
+
352
+ # Creation date timestamp. This read-only field is only visible to users who
353
+ # have WRITER permission for the script project.
354
+ # Corresponds to the JSON property `createTime`
355
+ # @return [String]
356
+ attr_accessor :create_time
357
+
358
+ # A set of functions. No duplicates are permitted.
359
+ # Corresponds to the JSON property `functionSet`
360
+ # @return [Google::Apis::ScriptV1::GoogleAppsScriptTypeFunctionSet]
361
+ attr_accessor :function_set
362
+
363
+ # A simple user profile resource.
364
+ # Corresponds to the JSON property `lastModifyUser`
365
+ # @return [Google::Apis::ScriptV1::GoogleAppsScriptTypeUser]
366
+ attr_accessor :last_modify_user
367
+
368
+ # The name of the file. The file extension is not part of the file name, which
369
+ # can be identified from the type field.
370
+ # Corresponds to the JSON property `name`
371
+ # @return [String]
372
+ attr_accessor :name
373
+
374
+ # The file content.
375
+ # Corresponds to the JSON property `source`
376
+ # @return [String]
377
+ attr_accessor :source
378
+
379
+ # The type of the file.
380
+ # Corresponds to the JSON property `type`
381
+ # @return [String]
382
+ attr_accessor :type
383
+
384
+ # Last modified date timestamp. This read-only field is only visible to users
385
+ # who have WRITER permission for the script project.
386
+ # Corresponds to the JSON property `updateTime`
387
+ # @return [String]
388
+ attr_accessor :update_time
389
+
390
+ def initialize(**args)
391
+ update!(**args)
392
+ end
393
+
394
+ # Update properties of this object
395
+ def update!(**args)
396
+ @create_time = args[:create_time] if args.key?(:create_time)
397
+ @function_set = args[:function_set] if args.key?(:function_set)
398
+ @last_modify_user = args[:last_modify_user] if args.key?(:last_modify_user)
399
+ @name = args[:name] if args.key?(:name)
400
+ @source = args[:source] if args.key?(:source)
401
+ @type = args[:type] if args.key?(:type)
402
+ @update_time = args[:update_time] if args.key?(:update_time)
403
+ end
404
+ end
405
+
406
+ # An add-on entry point.
407
+ class GoogleAppsScriptTypeAddOnEntryPoint
408
+ include Google::Apis::Core::Hashable
409
+
410
+ # The add-on's required list of supported container types.
411
+ # Corresponds to the JSON property `addOnType`
412
+ # @return [String]
413
+ attr_accessor :add_on_type
414
+
415
+ # The add-on's optional description.
416
+ # Corresponds to the JSON property `description`
417
+ # @return [String]
418
+ attr_accessor :description
419
+
420
+ # The add-on's optional help URL.
421
+ # Corresponds to the JSON property `helpUrl`
422
+ # @return [String]
423
+ attr_accessor :help_url
424
+
425
+ # The add-on's required post install tip URL.
426
+ # Corresponds to the JSON property `postInstallTipUrl`
427
+ # @return [String]
428
+ attr_accessor :post_install_tip_url
429
+
430
+ # The add-on's optional report issue URL.
431
+ # Corresponds to the JSON property `reportIssueUrl`
432
+ # @return [String]
433
+ attr_accessor :report_issue_url
434
+
435
+ # The add-on's required title.
436
+ # Corresponds to the JSON property `title`
437
+ # @return [String]
438
+ attr_accessor :title
439
+
440
+ def initialize(**args)
441
+ update!(**args)
442
+ end
443
+
444
+ # Update properties of this object
445
+ def update!(**args)
446
+ @add_on_type = args[:add_on_type] if args.key?(:add_on_type)
447
+ @description = args[:description] if args.key?(:description)
448
+ @help_url = args[:help_url] if args.key?(:help_url)
449
+ @post_install_tip_url = args[:post_install_tip_url] if args.key?(:post_install_tip_url)
450
+ @report_issue_url = args[:report_issue_url] if args.key?(:report_issue_url)
451
+ @title = args[:title] if args.key?(:title)
452
+ end
453
+ end
454
+
455
+ # API executable entry point configuration.
456
+ class GoogleAppsScriptTypeExecutionApiConfig
457
+ include Google::Apis::Core::Hashable
458
+
459
+ # Who has permission to run the API executable.
460
+ # Corresponds to the JSON property `access`
461
+ # @return [String]
462
+ attr_accessor :access
463
+
464
+ def initialize(**args)
465
+ update!(**args)
466
+ end
467
+
468
+ # Update properties of this object
469
+ def update!(**args)
470
+ @access = args[:access] if args.key?(:access)
471
+ end
472
+ end
473
+
474
+ # An API executable entry point.
475
+ class GoogleAppsScriptTypeExecutionApiEntryPoint
476
+ include Google::Apis::Core::Hashable
477
+
478
+ # API executable entry point configuration.
479
+ # Corresponds to the JSON property `entryPointConfig`
480
+ # @return [Google::Apis::ScriptV1::GoogleAppsScriptTypeExecutionApiConfig]
481
+ attr_accessor :entry_point_config
482
+
483
+ def initialize(**args)
484
+ update!(**args)
485
+ end
486
+
487
+ # Update properties of this object
488
+ def update!(**args)
489
+ @entry_point_config = args[:entry_point_config] if args.key?(:entry_point_config)
490
+ end
491
+ end
492
+
493
+ # Represents a function in a script project.
494
+ class GoogleAppsScriptTypeFunction
495
+ include Google::Apis::Core::Hashable
496
+
497
+ # The function name in the script project.
498
+ # Corresponds to the JSON property `name`
499
+ # @return [String]
500
+ attr_accessor :name
501
+
502
+ def initialize(**args)
503
+ update!(**args)
504
+ end
505
+
506
+ # Update properties of this object
507
+ def update!(**args)
508
+ @name = args[:name] if args.key?(:name)
509
+ end
510
+ end
511
+
512
+ # A set of functions. No duplicates are permitted.
513
+ class GoogleAppsScriptTypeFunctionSet
514
+ include Google::Apis::Core::Hashable
515
+
516
+ # A list of functions composing the set.
517
+ # Corresponds to the JSON property `values`
518
+ # @return [Array<Google::Apis::ScriptV1::GoogleAppsScriptTypeFunction>]
519
+ attr_accessor :values
520
+
521
+ def initialize(**args)
522
+ update!(**args)
523
+ end
524
+
525
+ # Update properties of this object
526
+ def update!(**args)
527
+ @values = args[:values] if args.key?(:values)
528
+ end
529
+ end
530
+
531
+ # Representation of a single script process execution that was started from the
532
+ # script editor, a trigger, an application, or using the Apps Script API. This
533
+ # is distinct from the `Operation` resource, which only represents executions
534
+ # started via the Apps Script API.
535
+ class GoogleAppsScriptTypeProcess
536
+ include Google::Apis::Core::Hashable
537
+
538
+ # Duration the execution spent executing.
539
+ # Corresponds to the JSON property `duration`
540
+ # @return [String]
541
+ attr_accessor :duration
542
+
543
+ # Name of the function the started the execution.
544
+ # Corresponds to the JSON property `functionName`
545
+ # @return [String]
546
+ attr_accessor :function_name
547
+
548
+ # The executions status.
549
+ # Corresponds to the JSON property `processStatus`
550
+ # @return [String]
551
+ attr_accessor :process_status
552
+
553
+ # The executions type.
554
+ # Corresponds to the JSON property `processType`
555
+ # @return [String]
556
+ attr_accessor :process_type
557
+
558
+ # Name of the script being executed.
559
+ # Corresponds to the JSON property `projectName`
560
+ # @return [String]
561
+ attr_accessor :project_name
562
+
563
+ # Time the execution started.
564
+ # Corresponds to the JSON property `startTime`
565
+ # @return [String]
566
+ attr_accessor :start_time
567
+
568
+ # The executing users access level to the script.
569
+ # Corresponds to the JSON property `userAccessLevel`
570
+ # @return [String]
571
+ attr_accessor :user_access_level
572
+
573
+ def initialize(**args)
574
+ update!(**args)
575
+ end
576
+
577
+ # Update properties of this object
578
+ def update!(**args)
579
+ @duration = args[:duration] if args.key?(:duration)
580
+ @function_name = args[:function_name] if args.key?(:function_name)
581
+ @process_status = args[:process_status] if args.key?(:process_status)
582
+ @process_type = args[:process_type] if args.key?(:process_type)
583
+ @project_name = args[:project_name] if args.key?(:project_name)
584
+ @start_time = args[:start_time] if args.key?(:start_time)
585
+ @user_access_level = args[:user_access_level] if args.key?(:user_access_level)
586
+ end
587
+ end
588
+
589
+ # A simple user profile resource.
590
+ class GoogleAppsScriptTypeUser
591
+ include Google::Apis::Core::Hashable
592
+
593
+ # The user's domain.
594
+ # Corresponds to the JSON property `domain`
595
+ # @return [String]
596
+ attr_accessor :domain
597
+
598
+ # The user's identifying email address.
599
+ # Corresponds to the JSON property `email`
600
+ # @return [String]
601
+ attr_accessor :email
602
+
603
+ # The user's display name.
604
+ # Corresponds to the JSON property `name`
605
+ # @return [String]
606
+ attr_accessor :name
607
+
608
+ # The user's photo.
609
+ # Corresponds to the JSON property `photoUrl`
610
+ # @return [String]
611
+ attr_accessor :photo_url
612
+
613
+ def initialize(**args)
614
+ update!(**args)
615
+ end
616
+
617
+ # Update properties of this object
618
+ def update!(**args)
619
+ @domain = args[:domain] if args.key?(:domain)
620
+ @email = args[:email] if args.key?(:email)
621
+ @name = args[:name] if args.key?(:name)
622
+ @photo_url = args[:photo_url] if args.key?(:photo_url)
623
+ end
624
+ end
625
+
626
+ # Web app entry point configuration.
627
+ class GoogleAppsScriptTypeWebAppConfig
628
+ include Google::Apis::Core::Hashable
629
+
630
+ # Who has permission to run the web app.
631
+ # Corresponds to the JSON property `access`
632
+ # @return [String]
633
+ attr_accessor :access
634
+
635
+ # Who to execute the web app as.
636
+ # Corresponds to the JSON property `executeAs`
637
+ # @return [String]
638
+ attr_accessor :execute_as
639
+
640
+ def initialize(**args)
641
+ update!(**args)
642
+ end
643
+
644
+ # Update properties of this object
645
+ def update!(**args)
646
+ @access = args[:access] if args.key?(:access)
647
+ @execute_as = args[:execute_as] if args.key?(:execute_as)
648
+ end
649
+ end
650
+
651
+ # A web application entry point.
652
+ class GoogleAppsScriptTypeWebAppEntryPoint
653
+ include Google::Apis::Core::Hashable
654
+
655
+ # Web app entry point configuration.
656
+ # Corresponds to the JSON property `entryPointConfig`
657
+ # @return [Google::Apis::ScriptV1::GoogleAppsScriptTypeWebAppConfig]
658
+ attr_accessor :entry_point_config
659
+
660
+ # The URL for the web application.
661
+ # Corresponds to the JSON property `url`
662
+ # @return [String]
663
+ attr_accessor :url
664
+
665
+ def initialize(**args)
666
+ update!(**args)
667
+ end
668
+
669
+ # Update properties of this object
670
+ def update!(**args)
671
+ @entry_point_config = args[:entry_point_config] if args.key?(:entry_point_config)
672
+ @url = args[:url] if args.key?(:url)
673
+ end
674
+ end
675
+
676
+ # Response with the list of deployments for the specified Apps Script project.
677
+ class ListDeploymentsResponse
678
+ include Google::Apis::Core::Hashable
679
+
680
+ # The list of deployments.
681
+ # Corresponds to the JSON property `deployments`
682
+ # @return [Array<Google::Apis::ScriptV1::Deployment>]
683
+ attr_accessor :deployments
684
+
685
+ # The token that can be used in the next call to get the next page of results.
686
+ # Corresponds to the JSON property `nextPageToken`
687
+ # @return [String]
688
+ attr_accessor :next_page_token
689
+
690
+ def initialize(**args)
691
+ update!(**args)
692
+ end
693
+
694
+ # Update properties of this object
695
+ def update!(**args)
696
+ @deployments = args[:deployments] if args.key?(:deployments)
697
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
698
+ end
699
+ end
700
+
701
+ # Response with the list of Process resources.
702
+ class ListScriptProcessesResponse
703
+ include Google::Apis::Core::Hashable
704
+
705
+ # Token for the next page of results. If empty, there are no more pages
706
+ # remaining.
707
+ # Corresponds to the JSON property `nextPageToken`
708
+ # @return [String]
709
+ attr_accessor :next_page_token
710
+
711
+ # List of processes matching request parameters.
712
+ # Corresponds to the JSON property `processes`
713
+ # @return [Array<Google::Apis::ScriptV1::GoogleAppsScriptTypeProcess>]
714
+ attr_accessor :processes
715
+
716
+ def initialize(**args)
717
+ update!(**args)
718
+ end
719
+
720
+ # Update properties of this object
721
+ def update!(**args)
722
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
723
+ @processes = args[:processes] if args.key?(:processes)
724
+ end
725
+ end
726
+
727
+ # Response with the list of Process resources.
728
+ class ListUserProcessesResponse
729
+ include Google::Apis::Core::Hashable
730
+
731
+ # Token for the next page of results. If empty, there are no more pages
732
+ # remaining.
733
+ # Corresponds to the JSON property `nextPageToken`
734
+ # @return [String]
735
+ attr_accessor :next_page_token
736
+
737
+ # List of processes matching request parameters.
738
+ # Corresponds to the JSON property `processes`
739
+ # @return [Array<Google::Apis::ScriptV1::GoogleAppsScriptTypeProcess>]
740
+ attr_accessor :processes
741
+
742
+ def initialize(**args)
743
+ update!(**args)
744
+ end
745
+
746
+ # Update properties of this object
747
+ def update!(**args)
748
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
749
+ @processes = args[:processes] if args.key?(:processes)
750
+ end
751
+ end
752
+
753
+ # `ListValue` is a wrapper around a repeated field of values.
754
+ class ListValue
755
+ include Google::Apis::Core::Hashable
756
+
757
+ # Repeated field of dynamically typed values.
758
+ # Corresponds to the JSON property `values`
759
+ # @return [Array<Google::Apis::ScriptV1::Value>]
760
+ attr_accessor :values
761
+
762
+ def initialize(**args)
763
+ update!(**args)
764
+ end
765
+
766
+ # Update properties of this object
767
+ def update!(**args)
768
+ @values = args[:values] if args.key?(:values)
769
+ end
770
+ end
771
+
772
+ # Response with the list of the versions for the specified script project.
773
+ class ListVersionsResponse
774
+ include Google::Apis::Core::Hashable
775
+
776
+ # The token use to fetch the next page of records. if not exist in the response,
777
+ # that means no more versions to list.
778
+ # Corresponds to the JSON property `nextPageToken`
779
+ # @return [String]
780
+ attr_accessor :next_page_token
781
+
782
+ # The list of versions.
783
+ # Corresponds to the JSON property `versions`
784
+ # @return [Array<Google::Apis::ScriptV1::Version>]
785
+ attr_accessor :versions
786
+
787
+ def initialize(**args)
788
+ update!(**args)
789
+ end
790
+
791
+ # Update properties of this object
792
+ def update!(**args)
793
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
794
+ @versions = args[:versions] if args.key?(:versions)
795
+ end
796
+ end
797
+
798
+ # Resource containing usage stats for a given script, based on the supplied
799
+ # filter and mask present in the request.
800
+ class Metrics
801
+ include Google::Apis::Core::Hashable
802
+
803
+ # Number of active users.
804
+ # Corresponds to the JSON property `activeUsers`
805
+ # @return [Array<Google::Apis::ScriptV1::MetricsValue>]
806
+ attr_accessor :active_users
807
+
808
+ # Number of failed executions.
809
+ # Corresponds to the JSON property `failedExecutions`
810
+ # @return [Array<Google::Apis::ScriptV1::MetricsValue>]
811
+ attr_accessor :failed_executions
812
+
813
+ # Number of total executions.
814
+ # Corresponds to the JSON property `totalExecutions`
815
+ # @return [Array<Google::Apis::ScriptV1::MetricsValue>]
816
+ attr_accessor :total_executions
817
+
818
+ def initialize(**args)
819
+ update!(**args)
820
+ end
821
+
822
+ # Update properties of this object
823
+ def update!(**args)
824
+ @active_users = args[:active_users] if args.key?(:active_users)
825
+ @failed_executions = args[:failed_executions] if args.key?(:failed_executions)
826
+ @total_executions = args[:total_executions] if args.key?(:total_executions)
827
+ end
828
+ end
829
+
830
+ # Metrics value that holds number of executions counted.
831
+ class MetricsValue
832
+ include Google::Apis::Core::Hashable
833
+
834
+ # Required field indicating the end time of the interval.
835
+ # Corresponds to the JSON property `endTime`
836
+ # @return [String]
837
+ attr_accessor :end_time
838
+
839
+ # Required field indicating the start time of the interval.
840
+ # Corresponds to the JSON property `startTime`
841
+ # @return [String]
842
+ attr_accessor :start_time
843
+
844
+ # Indicates the number of executions counted.
845
+ # Corresponds to the JSON property `value`
846
+ # @return [Fixnum]
847
+ attr_accessor :value
848
+
849
+ def initialize(**args)
850
+ update!(**args)
851
+ end
852
+
853
+ # Update properties of this object
854
+ def update!(**args)
855
+ @end_time = args[:end_time] if args.key?(:end_time)
856
+ @start_time = args[:start_time] if args.key?(:start_time)
857
+ @value = args[:value] if args.key?(:value)
858
+ end
859
+ end
860
+
861
+ # A representation of an execution of an Apps Script function started with run.
862
+ # The execution response does not arrive until the function finishes executing.
863
+ # The maximum execution runtime is listed in the [Apps Script quotas guide](/
864
+ # apps-script/guides/services/quotas#current_limitations). After execution has
865
+ # started, it can have one of four outcomes: - If the script function returns
866
+ # successfully, the response field contains an ExecutionResponse object with the
867
+ # function's return value in the object's `result` field. - If the script
868
+ # function (or Apps Script itself) throws an exception, the error field contains
869
+ # a Status object. The `Status` object's `details` field contains an array with
870
+ # a single ExecutionError object that provides information about the nature of
871
+ # the error. - If the execution has not yet completed, the done field is `false`
872
+ # and the neither the `response` nor `error` fields are present. - If the `run`
873
+ # call itself fails (for example, because of a malformed request or an
874
+ # authorization error), the method returns an HTTP response code in the 4XX
875
+ # range with a different format for the response body. Client libraries
876
+ # automatically convert a 4XX response into an exception class.
877
+ class Operation
878
+ include Google::Apis::Core::Hashable
879
+
880
+ # This field indicates whether the script execution has completed. A completed
881
+ # execution has a populated `response` field containing the ExecutionResponse
882
+ # from function that was executed.
883
+ # Corresponds to the JSON property `done`
884
+ # @return [Boolean]
885
+ attr_accessor :done
886
+ alias_method :done?, :done
887
+
888
+ # If a `run` call succeeds but the script function (or Apps Script itself)
889
+ # throws an exception, the response body's error field contains this `Status`
890
+ # object.
891
+ # Corresponds to the JSON property `error`
892
+ # @return [Google::Apis::ScriptV1::Status]
893
+ attr_accessor :error
894
+
895
+ # If the script function returns successfully, this field contains an
896
+ # ExecutionResponse object with the function's return value.
897
+ # Corresponds to the JSON property `response`
898
+ # @return [Hash<String,Object>]
899
+ attr_accessor :response
900
+
901
+ def initialize(**args)
902
+ update!(**args)
903
+ end
904
+
905
+ # Update properties of this object
906
+ def update!(**args)
907
+ @done = args[:done] if args.key?(:done)
908
+ @error = args[:error] if args.key?(:error)
909
+ @response = args[:response] if args.key?(:response)
910
+ end
911
+ end
912
+
913
+ # The script project resource.
914
+ class Project
915
+ include Google::Apis::Core::Hashable
916
+
917
+ # When the script was created.
918
+ # Corresponds to the JSON property `createTime`
919
+ # @return [String]
920
+ attr_accessor :create_time
921
+
922
+ # A simple user profile resource.
923
+ # Corresponds to the JSON property `creator`
924
+ # @return [Google::Apis::ScriptV1::GoogleAppsScriptTypeUser]
925
+ attr_accessor :creator
926
+
927
+ # A simple user profile resource.
928
+ # Corresponds to the JSON property `lastModifyUser`
929
+ # @return [Google::Apis::ScriptV1::GoogleAppsScriptTypeUser]
930
+ attr_accessor :last_modify_user
931
+
932
+ # The parent's Drive ID that the script will be attached to. This is usually the
933
+ # ID of a Google Document or Google Sheet. This filed is optional, and if not
934
+ # set, a stand-alone script will be created.
935
+ # Corresponds to the JSON property `parentId`
936
+ # @return [String]
937
+ attr_accessor :parent_id
938
+
939
+ # The script project's Drive ID.
940
+ # Corresponds to the JSON property `scriptId`
941
+ # @return [String]
942
+ attr_accessor :script_id
943
+
944
+ # The title for the project.
945
+ # Corresponds to the JSON property `title`
946
+ # @return [String]
947
+ attr_accessor :title
948
+
949
+ # When the script was last updated.
950
+ # Corresponds to the JSON property `updateTime`
951
+ # @return [String]
952
+ attr_accessor :update_time
953
+
954
+ def initialize(**args)
955
+ update!(**args)
956
+ end
957
+
958
+ # Update properties of this object
959
+ def update!(**args)
960
+ @create_time = args[:create_time] if args.key?(:create_time)
961
+ @creator = args[:creator] if args.key?(:creator)
962
+ @last_modify_user = args[:last_modify_user] if args.key?(:last_modify_user)
963
+ @parent_id = args[:parent_id] if args.key?(:parent_id)
964
+ @script_id = args[:script_id] if args.key?(:script_id)
965
+ @title = args[:title] if args.key?(:title)
966
+ @update_time = args[:update_time] if args.key?(:update_time)
967
+ end
968
+ end
969
+
970
+ # The result of an execution.
971
+ class ScriptExecutionResult
972
+ include Google::Apis::Core::Hashable
973
+
974
+ # `Value` represents a dynamically typed value which is the outcome of an
975
+ # executed script.
976
+ # Corresponds to the JSON property `returnValue`
977
+ # @return [Google::Apis::ScriptV1::Value]
978
+ attr_accessor :return_value
979
+
980
+ def initialize(**args)
981
+ update!(**args)
982
+ end
983
+
984
+ # Update properties of this object
985
+ def update!(**args)
986
+ @return_value = args[:return_value] if args.key?(:return_value)
987
+ end
988
+ end
989
+
990
+ # A stack trace through the script that shows where the execution failed.
991
+ class ScriptStackTraceElement
992
+ include Google::Apis::Core::Hashable
993
+
994
+ # The name of the function that failed.
995
+ # Corresponds to the JSON property `function`
996
+ # @return [String]
997
+ attr_accessor :function
998
+
999
+ # The line number where the script failed.
1000
+ # Corresponds to the JSON property `lineNumber`
1001
+ # @return [Fixnum]
1002
+ attr_accessor :line_number
1003
+
1004
+ def initialize(**args)
1005
+ update!(**args)
1006
+ end
1007
+
1008
+ # Update properties of this object
1009
+ def update!(**args)
1010
+ @function = args[:function] if args.key?(:function)
1011
+ @line_number = args[:line_number] if args.key?(:line_number)
1012
+ end
1013
+ end
1014
+
1015
+ # If a `run` call succeeds but the script function (or Apps Script itself)
1016
+ # throws an exception, the response body's error field contains this `Status`
1017
+ # object.
1018
+ class Status
1019
+ include Google::Apis::Core::Hashable
1020
+
1021
+ # The status code. For this API, this value either: - 10, indicating a `
1022
+ # SCRIPT_TIMEOUT` error, - 3, indicating an `INVALID_ARGUMENT` error, or - 1,
1023
+ # indicating a `CANCELLED` execution.
1024
+ # Corresponds to the JSON property `code`
1025
+ # @return [Fixnum]
1026
+ attr_accessor :code
1027
+
1028
+ # An array that contains a single ExecutionError object that provides
1029
+ # information about the nature of the error.
1030
+ # Corresponds to the JSON property `details`
1031
+ # @return [Array<Hash<String,Object>>]
1032
+ attr_accessor :details
1033
+
1034
+ # A developer-facing error message, which is in English. Any user-facing error
1035
+ # message is localized and sent in the details field, or localized by the client.
1036
+ # Corresponds to the JSON property `message`
1037
+ # @return [String]
1038
+ attr_accessor :message
1039
+
1040
+ def initialize(**args)
1041
+ update!(**args)
1042
+ end
1043
+
1044
+ # Update properties of this object
1045
+ def update!(**args)
1046
+ @code = args[:code] if args.key?(:code)
1047
+ @details = args[:details] if args.key?(:details)
1048
+ @message = args[:message] if args.key?(:message)
1049
+ end
1050
+ end
1051
+
1052
+ # `Struct` represents a structured data value, consisting of fields which map to
1053
+ # dynamically typed values.
1054
+ class Struct
1055
+ include Google::Apis::Core::Hashable
1056
+
1057
+ # Unordered map of dynamically typed values.
1058
+ # Corresponds to the JSON property `fields`
1059
+ # @return [Hash<String,Google::Apis::ScriptV1::Value>]
1060
+ attr_accessor :fields
1061
+
1062
+ def initialize(**args)
1063
+ update!(**args)
1064
+ end
1065
+
1066
+ # Update properties of this object
1067
+ def update!(**args)
1068
+ @fields = args[:fields] if args.key?(:fields)
1069
+ end
1070
+ end
1071
+
1072
+ # Request with deployment information to update an existing deployment.
1073
+ class UpdateDeploymentRequest
1074
+ include Google::Apis::Core::Hashable
1075
+
1076
+ # Metadata the defines how a deployment is configured.
1077
+ # Corresponds to the JSON property `deploymentConfig`
1078
+ # @return [Google::Apis::ScriptV1::DeploymentConfig]
1079
+ attr_accessor :deployment_config
1080
+
1081
+ def initialize(**args)
1082
+ update!(**args)
1083
+ end
1084
+
1085
+ # Update properties of this object
1086
+ def update!(**args)
1087
+ @deployment_config = args[:deployment_config] if args.key?(:deployment_config)
1088
+ end
1089
+ end
1090
+
1091
+ # `Value` represents a dynamically typed value which is the outcome of an
1092
+ # executed script.
1093
+ class Value
1094
+ include Google::Apis::Core::Hashable
1095
+
1096
+ # Represents a boolean value.
1097
+ # Corresponds to the JSON property `boolValue`
1098
+ # @return [Boolean]
1099
+ attr_accessor :bool_value
1100
+ alias_method :bool_value?, :bool_value
1101
+
1102
+ # Represents raw byte values.
1103
+ # Corresponds to the JSON property `bytesValue`
1104
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
1105
+ # @return [String]
1106
+ attr_accessor :bytes_value
1107
+
1108
+ # Represents a date in ms since the epoch.
1109
+ # Corresponds to the JSON property `dateValue`
1110
+ # @return [Fixnum]
1111
+ attr_accessor :date_value
1112
+
1113
+ # `ListValue` is a wrapper around a repeated field of values.
1114
+ # Corresponds to the JSON property `listValue`
1115
+ # @return [Google::Apis::ScriptV1::ListValue]
1116
+ attr_accessor :list_value
1117
+
1118
+ # Represents a null value.
1119
+ # Corresponds to the JSON property `nullValue`
1120
+ # @return [String]
1121
+ attr_accessor :null_value
1122
+
1123
+ # Represents a double value.
1124
+ # Corresponds to the JSON property `numberValue`
1125
+ # @return [Float]
1126
+ attr_accessor :number_value
1127
+
1128
+ # Represents a structured proto value.
1129
+ # Corresponds to the JSON property `protoValue`
1130
+ # @return [Hash<String,Object>]
1131
+ attr_accessor :proto_value
1132
+
1133
+ # Represents a string value.
1134
+ # Corresponds to the JSON property `stringValue`
1135
+ # @return [String]
1136
+ attr_accessor :string_value
1137
+
1138
+ # `Struct` represents a structured data value, consisting of fields which map to
1139
+ # dynamically typed values.
1140
+ # Corresponds to the JSON property `structValue`
1141
+ # @return [Google::Apis::ScriptV1::Struct]
1142
+ attr_accessor :struct_value
1143
+
1144
+ def initialize(**args)
1145
+ update!(**args)
1146
+ end
1147
+
1148
+ # Update properties of this object
1149
+ def update!(**args)
1150
+ @bool_value = args[:bool_value] if args.key?(:bool_value)
1151
+ @bytes_value = args[:bytes_value] if args.key?(:bytes_value)
1152
+ @date_value = args[:date_value] if args.key?(:date_value)
1153
+ @list_value = args[:list_value] if args.key?(:list_value)
1154
+ @null_value = args[:null_value] if args.key?(:null_value)
1155
+ @number_value = args[:number_value] if args.key?(:number_value)
1156
+ @proto_value = args[:proto_value] if args.key?(:proto_value)
1157
+ @string_value = args[:string_value] if args.key?(:string_value)
1158
+ @struct_value = args[:struct_value] if args.key?(:struct_value)
1159
+ end
1160
+ end
1161
+
1162
+ # A resource representing a script project version. A version is a "snapshot" of
1163
+ # a script project and is similar to a read-only branched release. When creating
1164
+ # deployments, the version to use must be specified.
1165
+ class Version
1166
+ include Google::Apis::Core::Hashable
1167
+
1168
+ # When the version was created.
1169
+ # Corresponds to the JSON property `createTime`
1170
+ # @return [String]
1171
+ attr_accessor :create_time
1172
+
1173
+ # The description for this version.
1174
+ # Corresponds to the JSON property `description`
1175
+ # @return [String]
1176
+ attr_accessor :description
1177
+
1178
+ # The script project's Drive ID.
1179
+ # Corresponds to the JSON property `scriptId`
1180
+ # @return [String]
1181
+ attr_accessor :script_id
1182
+
1183
+ # The incremental ID that is created by Apps Script when a version is created.
1184
+ # This is system assigned number and is immutable once created.
1185
+ # Corresponds to the JSON property `versionNumber`
1186
+ # @return [Fixnum]
1187
+ attr_accessor :version_number
1188
+
1189
+ def initialize(**args)
1190
+ update!(**args)
1191
+ end
1192
+
1193
+ # Update properties of this object
1194
+ def update!(**args)
1195
+ @create_time = args[:create_time] if args.key?(:create_time)
1196
+ @description = args[:description] if args.key?(:description)
1197
+ @script_id = args[:script_id] if args.key?(:script_id)
1198
+ @version_number = args[:version_number] if args.key?(:version_number)
1199
+ end
1200
+ end
1201
+ end
1202
+ end
1203
+ end