google-api-client 0.18.0 → 0.18.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +41 -0
  3. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  4. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +9 -0
  5. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +1 -0
  6. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +1 -1
  7. data/generated/google/apis/admin_directory_v1.rb +1 -1
  8. data/generated/google/apis/admin_directory_v1/classes.rb +238 -10
  9. data/generated/google/apis/admin_directory_v1/representations.rb +101 -0
  10. data/generated/google/apis/admin_directory_v1/service.rb +529 -1
  11. data/generated/google/apis/androidmanagement_v1.rb +1 -1
  12. data/generated/google/apis/androidmanagement_v1/classes.rb +7 -0
  13. data/generated/google/apis/androidmanagement_v1/representations.rb +1 -0
  14. data/generated/google/apis/androidpublisher_v1_1.rb +1 -1
  15. data/generated/google/apis/androidpublisher_v1_1/classes.rb +9 -0
  16. data/generated/google/apis/androidpublisher_v1_1/representations.rb +1 -0
  17. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  18. data/generated/google/apis/androidpublisher_v2/classes.rb +34 -0
  19. data/generated/google/apis/androidpublisher_v2/representations.rb +3 -0
  20. data/generated/google/apis/appengine_v1.rb +1 -1
  21. data/generated/google/apis/appengine_v1/classes.rb +21 -17
  22. data/generated/google/apis/appengine_v1beta.rb +1 -1
  23. data/generated/google/apis/appengine_v1beta/classes.rb +21 -17
  24. data/generated/google/apis/bigquerydatatransfer_v1.rb +1 -1
  25. data/generated/google/apis/bigquerydatatransfer_v1/classes.rb +2 -2
  26. data/generated/google/apis/calendar_v3.rb +1 -1
  27. data/generated/google/apis/calendar_v3/classes.rb +326 -0
  28. data/generated/google/apis/calendar_v3/representations.rb +118 -0
  29. data/generated/google/apis/calendar_v3/service.rb +28 -4
  30. data/generated/google/apis/classroom_v1.rb +1 -1
  31. data/generated/google/apis/classroom_v1/classes.rb +69 -0
  32. data/generated/google/apis/classroom_v1/representations.rb +31 -0
  33. data/generated/google/apis/classroom_v1/service.rb +88 -0
  34. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  35. data/generated/google/apis/cloudbuild_v1/classes.rb +49 -0
  36. data/generated/google/apis/cloudbuild_v1/representations.rb +20 -0
  37. data/generated/google/apis/cloudfunctions_v1.rb +1 -1
  38. data/generated/google/apis/cloudfunctions_v1/classes.rb +9 -12
  39. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  40. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +25 -0
  41. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +4 -0
  42. data/generated/google/apis/cloudresourcemanager_v1/service.rb +8 -3
  43. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
  44. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +7 -3
  45. data/generated/google/apis/cloudresourcemanager_v2beta1.rb +1 -1
  46. data/generated/google/apis/cloudresourcemanager_v2beta1/classes.rb +8 -6
  47. data/generated/google/apis/cloudresourcemanager_v2beta1/service.rb +19 -13
  48. data/generated/google/apis/cloudshell_v1.rb +35 -0
  49. data/generated/google/apis/cloudshell_v1/classes.rb +409 -0
  50. data/generated/google/apis/cloudshell_v1/representations.rb +161 -0
  51. data/generated/google/apis/cloudshell_v1/service.rb +214 -0
  52. data/generated/google/apis/cloudshell_v1alpha1.rb +35 -0
  53. data/generated/google/apis/cloudshell_v1alpha1/classes.rb +403 -0
  54. data/generated/google/apis/cloudshell_v1alpha1/representations.rb +160 -0
  55. data/generated/google/apis/cloudshell_v1alpha1/service.rb +237 -0
  56. data/generated/google/apis/cloudtasks_v2beta2.rb +1 -1
  57. data/generated/google/apis/cloudtasks_v2beta2/classes.rb +106 -13
  58. data/generated/google/apis/cloudtasks_v2beta2/representations.rb +31 -1
  59. data/generated/google/apis/cloudtasks_v2beta2/service.rb +63 -8
  60. data/generated/google/apis/cloudtrace_v2.rb +1 -1
  61. data/generated/google/apis/cloudtrace_v2/service.rb +2 -2
  62. data/generated/google/apis/container_v1.rb +2 -2
  63. data/generated/google/apis/container_v1/classes.rb +6 -7
  64. data/generated/google/apis/container_v1/service.rb +2 -2
  65. data/generated/google/apis/container_v1beta1.rb +2 -2
  66. data/generated/google/apis/container_v1beta1/classes.rb +4 -4
  67. data/generated/google/apis/container_v1beta1/service.rb +3 -3
  68. data/generated/google/apis/content_v2.rb +1 -1
  69. data/generated/google/apis/content_v2/classes.rb +257 -0
  70. data/generated/google/apis/content_v2/representations.rb +114 -0
  71. data/generated/google/apis/content_v2/service.rb +84 -0
  72. data/generated/google/apis/content_v2sandbox.rb +1 -1
  73. data/generated/google/apis/content_v2sandbox/classes.rb +257 -0
  74. data/generated/google/apis/content_v2sandbox/representations.rb +114 -0
  75. data/generated/google/apis/content_v2sandbox/service.rb +84 -0
  76. data/generated/google/apis/dialogflow_v2beta1.rb +1 -1
  77. data/generated/google/apis/dialogflow_v2beta1/classes.rb +16 -0
  78. data/generated/google/apis/digitalassetlinks_v1.rb +32 -0
  79. data/generated/google/apis/digitalassetlinks_v1/classes.rb +305 -0
  80. data/generated/google/apis/digitalassetlinks_v1/representations.rb +133 -0
  81. data/generated/google/apis/digitalassetlinks_v1/service.rb +324 -0
  82. data/generated/google/apis/dlp_v2beta2.rb +36 -0
  83. data/generated/google/apis/dlp_v2beta2/classes.rb +5475 -0
  84. data/generated/google/apis/dlp_v2beta2/representations.rb +2734 -0
  85. data/generated/google/apis/dlp_v2beta2/service.rb +1135 -0
  86. data/generated/google/apis/drive_v2.rb +1 -1
  87. data/generated/google/apis/drive_v2/service.rb +25 -16
  88. data/generated/google/apis/drive_v3.rb +1 -1
  89. data/generated/google/apis/drive_v3/service.rb +1 -1
  90. data/generated/google/apis/monitoring_v3.rb +1 -1
  91. data/generated/google/apis/monitoring_v3/classes.rb +50 -1
  92. data/generated/google/apis/monitoring_v3/representations.rb +16 -0
  93. data/generated/google/apis/serviceconsumermanagement_v1.rb +1 -1
  94. data/generated/google/apis/serviceconsumermanagement_v1/classes.rb +6 -5
  95. data/generated/google/apis/slides_v1.rb +4 -1
  96. data/generated/google/apis/speech_v1.rb +1 -4
  97. data/generated/google/apis/speech_v1beta1.rb +1 -4
  98. data/generated/google/apis/streetviewpublish_v1.rb +1 -1
  99. data/generated/google/apis/streetviewpublish_v1/classes.rb +0 -2
  100. data/generated/google/apis/streetviewpublish_v1/service.rb +6 -0
  101. data/generated/google/apis/testing_v1.rb +1 -1
  102. data/generated/google/apis/testing_v1/classes.rb +81 -0
  103. data/generated/google/apis/testing_v1/representations.rb +45 -0
  104. data/generated/google/apis/toolresults_v1beta3.rb +1 -1
  105. data/generated/google/apis/youtube_v3.rb +1 -1
  106. data/generated/google/apis/youtube_v3/classes.rb +0 -6
  107. data/generated/google/apis/youtube_v3/representations.rb +0 -1
  108. data/generated/google/apis/youtubereporting_v1.rb +1 -1
  109. data/generated/google/apis/youtubereporting_v1/classes.rb +576 -19
  110. data/generated/google/apis/youtubereporting_v1/representations.rb +218 -12
  111. data/generated/google/apis/youtubereporting_v1/service.rb +4 -4
  112. data/lib/google/apis/version.rb +1 -1
  113. metadata +18 -2
@@ -0,0 +1,160 @@
1
+ # Copyright 2015 Google Inc.
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 CloudshellV1alpha1
24
+
25
+ class CreatePublicKeyRequest
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
31
+ class Empty
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
37
+ class Environment
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class Operation
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class PublicKey
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
55
+ class StartEnvironmentMetadata
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
57
+
58
+ include Google::Apis::Core::JsonObjectSupport
59
+ end
60
+
61
+ class StartEnvironmentRequest
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+
64
+ include Google::Apis::Core::JsonObjectSupport
65
+ end
66
+
67
+ class StartEnvironmentResponse
68
+ class Representation < Google::Apis::Core::JsonRepresentation; end
69
+
70
+ include Google::Apis::Core::JsonObjectSupport
71
+ end
72
+
73
+ class Status
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+
76
+ include Google::Apis::Core::JsonObjectSupport
77
+ end
78
+
79
+ class CreatePublicKeyRequest
80
+ # @private
81
+ class Representation < Google::Apis::Core::JsonRepresentation
82
+ property :key, as: 'key', class: Google::Apis::CloudshellV1alpha1::PublicKey, decorator: Google::Apis::CloudshellV1alpha1::PublicKey::Representation
83
+
84
+ end
85
+ end
86
+
87
+ class Empty
88
+ # @private
89
+ class Representation < Google::Apis::Core::JsonRepresentation
90
+ end
91
+ end
92
+
93
+ class Environment
94
+ # @private
95
+ class Representation < Google::Apis::Core::JsonRepresentation
96
+ property :docker_image, as: 'dockerImage'
97
+ property :id, as: 'id'
98
+ property :name, as: 'name'
99
+ collection :public_keys, as: 'publicKeys', class: Google::Apis::CloudshellV1alpha1::PublicKey, decorator: Google::Apis::CloudshellV1alpha1::PublicKey::Representation
100
+
101
+ property :ssh_host, as: 'sshHost'
102
+ property :ssh_port, as: 'sshPort'
103
+ property :ssh_username, as: 'sshUsername'
104
+ property :state, as: 'state'
105
+ end
106
+ end
107
+
108
+ class Operation
109
+ # @private
110
+ class Representation < Google::Apis::Core::JsonRepresentation
111
+ property :done, as: 'done'
112
+ property :error, as: 'error', class: Google::Apis::CloudshellV1alpha1::Status, decorator: Google::Apis::CloudshellV1alpha1::Status::Representation
113
+
114
+ hash :metadata, as: 'metadata'
115
+ property :name, as: 'name'
116
+ hash :response, as: 'response'
117
+ end
118
+ end
119
+
120
+ class PublicKey
121
+ # @private
122
+ class Representation < Google::Apis::Core::JsonRepresentation
123
+ property :format, as: 'format'
124
+ property :key, :base64 => true, as: 'key'
125
+ property :name, as: 'name'
126
+ end
127
+ end
128
+
129
+ class StartEnvironmentMetadata
130
+ # @private
131
+ class Representation < Google::Apis::Core::JsonRepresentation
132
+ property :state, as: 'state'
133
+ end
134
+ end
135
+
136
+ class StartEnvironmentRequest
137
+ # @private
138
+ class Representation < Google::Apis::Core::JsonRepresentation
139
+ end
140
+ end
141
+
142
+ class StartEnvironmentResponse
143
+ # @private
144
+ class Representation < Google::Apis::Core::JsonRepresentation
145
+ property :environment, as: 'environment', class: Google::Apis::CloudshellV1alpha1::Environment, decorator: Google::Apis::CloudshellV1alpha1::Environment::Representation
146
+
147
+ end
148
+ end
149
+
150
+ class Status
151
+ # @private
152
+ class Representation < Google::Apis::Core::JsonRepresentation
153
+ property :code, as: 'code'
154
+ collection :details, as: 'details'
155
+ property :message, as: 'message'
156
+ end
157
+ end
158
+ end
159
+ end
160
+ end
@@ -0,0 +1,237 @@
1
+ # Copyright 2015 Google Inc.
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/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module CloudshellV1alpha1
23
+ # Cloud Shell API
24
+ #
25
+ # Allows users to start, configure, and connect to interactive shell sessions
26
+ # running in the cloud.
27
+ #
28
+ # @example
29
+ # require 'google/apis/cloudshell_v1alpha1'
30
+ #
31
+ # Cloudshell = Google::Apis::CloudshellV1alpha1 # Alias the module
32
+ # service = Cloudshell::CloudShellService.new
33
+ #
34
+ # @see https://cloud.google.com/shell/docs/
35
+ class CloudShellService < Google::Apis::Core::BaseService
36
+ # @return [String]
37
+ # API key. Your API key identifies your project and provides you with API access,
38
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
39
+ attr_accessor :key
40
+
41
+ # @return [String]
42
+ # Available to use for quota purposes for server-side applications. Can be any
43
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
44
+ attr_accessor :quota_user
45
+
46
+ def initialize
47
+ super('https://cloudshell.googleapis.com/', '')
48
+ @batch_path = 'batch'
49
+ end
50
+
51
+ # Gets an environment. Returns NOT_FOUND if the environment does not exist.
52
+ # @param [String] name
53
+ # Name of the requested resource, for example `users/me/environments/default`
54
+ # or `users/someone@example.com/environments/default`.
55
+ # @param [String] fields
56
+ # Selector specifying which fields to include in a partial response.
57
+ # @param [String] quota_user
58
+ # Available to use for quota purposes for server-side applications. Can be any
59
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
60
+ # @param [Google::Apis::RequestOptions] options
61
+ # Request-specific options
62
+ #
63
+ # @yield [result, err] Result & error if block supplied
64
+ # @yieldparam result [Google::Apis::CloudshellV1alpha1::Environment] parsed result object
65
+ # @yieldparam err [StandardError] error object if request failed
66
+ #
67
+ # @return [Google::Apis::CloudshellV1alpha1::Environment]
68
+ #
69
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
70
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
71
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
72
+ def get_user_environment(name, fields: nil, quota_user: nil, options: nil, &block)
73
+ command = make_simple_command(:get, 'v1alpha1/{+name}', options)
74
+ command.response_representation = Google::Apis::CloudshellV1alpha1::Environment::Representation
75
+ command.response_class = Google::Apis::CloudshellV1alpha1::Environment
76
+ command.params['name'] = name unless name.nil?
77
+ command.query['fields'] = fields unless fields.nil?
78
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
79
+ execute_or_queue_command(command, &block)
80
+ end
81
+
82
+ # Updates an existing environment.
83
+ # @param [String] name
84
+ # Name of the resource to be updated, for example
85
+ # `users/me/environments/default` or
86
+ # `users/someone@example.com/environments/default`.
87
+ # @param [Google::Apis::CloudshellV1alpha1::Environment] environment_object
88
+ # @param [String] update_mask
89
+ # Mask specifying which fields in the environment should be updated.
90
+ # @param [String] fields
91
+ # Selector specifying which fields to include in a partial response.
92
+ # @param [String] quota_user
93
+ # Available to use for quota purposes for server-side applications. Can be any
94
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
95
+ # @param [Google::Apis::RequestOptions] options
96
+ # Request-specific options
97
+ #
98
+ # @yield [result, err] Result & error if block supplied
99
+ # @yieldparam result [Google::Apis::CloudshellV1alpha1::Environment] parsed result object
100
+ # @yieldparam err [StandardError] error object if request failed
101
+ #
102
+ # @return [Google::Apis::CloudshellV1alpha1::Environment]
103
+ #
104
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
105
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
106
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
107
+ def patch_user_environment(name, environment_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
108
+ command = make_simple_command(:patch, 'v1alpha1/{+name}', options)
109
+ command.request_representation = Google::Apis::CloudshellV1alpha1::Environment::Representation
110
+ command.request_object = environment_object
111
+ command.response_representation = Google::Apis::CloudshellV1alpha1::Environment::Representation
112
+ command.response_class = Google::Apis::CloudshellV1alpha1::Environment
113
+ command.params['name'] = name unless name.nil?
114
+ command.query['updateMask'] = update_mask unless update_mask.nil?
115
+ command.query['fields'] = fields unless fields.nil?
116
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
117
+ execute_or_queue_command(command, &block)
118
+ end
119
+
120
+ # Starts an existing environment, allowing clients to connect to it. The
121
+ # returned operation will contain an instance of StartEnvironmentMetadata in
122
+ # its metadata field. Users can wait for the environment to start by polling
123
+ # this operation via GetOperation. Once the environment has finished starting
124
+ # and is ready to accept connections, the operation will contain a
125
+ # StartEnvironmentResponse in its response field.
126
+ # @param [String] name
127
+ # Name of the resource that should be started, for example
128
+ # `users/me/environments/default` or
129
+ # `users/someone@example.com/environments/default`.
130
+ # @param [Google::Apis::CloudshellV1alpha1::StartEnvironmentRequest] start_environment_request_object
131
+ # @param [String] fields
132
+ # Selector specifying which fields to include in a partial response.
133
+ # @param [String] quota_user
134
+ # Available to use for quota purposes for server-side applications. Can be any
135
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
136
+ # @param [Google::Apis::RequestOptions] options
137
+ # Request-specific options
138
+ #
139
+ # @yield [result, err] Result & error if block supplied
140
+ # @yieldparam result [Google::Apis::CloudshellV1alpha1::Operation] parsed result object
141
+ # @yieldparam err [StandardError] error object if request failed
142
+ #
143
+ # @return [Google::Apis::CloudshellV1alpha1::Operation]
144
+ #
145
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
146
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
147
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
148
+ def start_environment(name, start_environment_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
149
+ command = make_simple_command(:post, 'v1alpha1/{+name}:start', options)
150
+ command.request_representation = Google::Apis::CloudshellV1alpha1::StartEnvironmentRequest::Representation
151
+ command.request_object = start_environment_request_object
152
+ command.response_representation = Google::Apis::CloudshellV1alpha1::Operation::Representation
153
+ command.response_class = Google::Apis::CloudshellV1alpha1::Operation
154
+ command.params['name'] = name unless name.nil?
155
+ command.query['fields'] = fields unless fields.nil?
156
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
157
+ execute_or_queue_command(command, &block)
158
+ end
159
+
160
+ # Adds a public SSH key to an environment, allowing clients with the
161
+ # corresponding private key to connect to that environment via SSH. If a key
162
+ # with the same format and content already exists, this will return the
163
+ # existing key.
164
+ # @param [String] parent
165
+ # Parent resource name, e.g. `users/me/environments/default`.
166
+ # @param [Google::Apis::CloudshellV1alpha1::CreatePublicKeyRequest] create_public_key_request_object
167
+ # @param [String] fields
168
+ # Selector specifying which fields to include in a partial response.
169
+ # @param [String] quota_user
170
+ # Available to use for quota purposes for server-side applications. Can be any
171
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
172
+ # @param [Google::Apis::RequestOptions] options
173
+ # Request-specific options
174
+ #
175
+ # @yield [result, err] Result & error if block supplied
176
+ # @yieldparam result [Google::Apis::CloudshellV1alpha1::PublicKey] parsed result object
177
+ # @yieldparam err [StandardError] error object if request failed
178
+ #
179
+ # @return [Google::Apis::CloudshellV1alpha1::PublicKey]
180
+ #
181
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
182
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
183
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
184
+ def create_public_key(parent, create_public_key_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
185
+ command = make_simple_command(:post, 'v1alpha1/{+parent}/publicKeys', options)
186
+ command.request_representation = Google::Apis::CloudshellV1alpha1::CreatePublicKeyRequest::Representation
187
+ command.request_object = create_public_key_request_object
188
+ command.response_representation = Google::Apis::CloudshellV1alpha1::PublicKey::Representation
189
+ command.response_class = Google::Apis::CloudshellV1alpha1::PublicKey
190
+ command.params['parent'] = parent unless parent.nil?
191
+ command.query['fields'] = fields unless fields.nil?
192
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
193
+ execute_or_queue_command(command, &block)
194
+ end
195
+
196
+ # Removes a public SSH key from an environment. Clients will no longer be
197
+ # able to connect to the environment using the corresponding private key.
198
+ # @param [String] name
199
+ # Name of the resource to be deleted, e.g.
200
+ # `users/me/environments/default/publicKeys/my-key`.
201
+ # @param [String] fields
202
+ # Selector specifying which fields to include in a partial response.
203
+ # @param [String] quota_user
204
+ # Available to use for quota purposes for server-side applications. Can be any
205
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
206
+ # @param [Google::Apis::RequestOptions] options
207
+ # Request-specific options
208
+ #
209
+ # @yield [result, err] Result & error if block supplied
210
+ # @yieldparam result [Google::Apis::CloudshellV1alpha1::Empty] parsed result object
211
+ # @yieldparam err [StandardError] error object if request failed
212
+ #
213
+ # @return [Google::Apis::CloudshellV1alpha1::Empty]
214
+ #
215
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
216
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
217
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
218
+ def delete_user_environment_public_key(name, fields: nil, quota_user: nil, options: nil, &block)
219
+ command = make_simple_command(:delete, 'v1alpha1/{+name}', options)
220
+ command.response_representation = Google::Apis::CloudshellV1alpha1::Empty::Representation
221
+ command.response_class = Google::Apis::CloudshellV1alpha1::Empty
222
+ command.params['name'] = name unless name.nil?
223
+ command.query['fields'] = fields unless fields.nil?
224
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
225
+ execute_or_queue_command(command, &block)
226
+ end
227
+
228
+ protected
229
+
230
+ def apply_command_defaults(command)
231
+ command.query['key'] = key unless key.nil?
232
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
233
+ end
234
+ end
235
+ end
236
+ end
237
+ end
@@ -26,7 +26,7 @@ module Google
26
26
  # @see https://cloud.google.com/cloud-tasks/
27
27
  module CloudtasksV2beta2
28
28
  VERSION = 'V2beta2'
29
- REVISION = '20171208'
29
+ REVISION = '20171215'
30
30
 
31
31
  # View and manage your data across Google Cloud Platform services
32
32
  AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
@@ -30,8 +30,8 @@ module Google
30
30
  # Required.
31
31
  # The task's current schedule time, available in the Task.schedule_time
32
32
  # returned in PullTasksResponse.tasks or
33
- # CloudTasks.RenewLease. This restriction is to check that
34
- # the caller is acknowledging the correct task.
33
+ # CloudTasks.RenewLease. This restriction is to ensure that your task
34
+ # worker currently holds the lease.
35
35
  # Corresponds to the JSON property `scheduleTime`
36
36
  # @return [String]
37
37
  attr_accessor :schedule_time
@@ -465,8 +465,8 @@ module Google
465
465
  # Required.
466
466
  # The task's current schedule time, available in the Task.schedule_time
467
467
  # returned in PullTasksResponse.tasks or
468
- # CloudTasks.RenewLease. This restriction is to check that
469
- # the caller is canceling the correct task.
468
+ # CloudTasks.RenewLease. This restriction is to ensure that your task
469
+ # worker currently holds the lease.
470
470
  # Corresponds to the JSON property `scheduleTime`
471
471
  # @return [String]
472
472
  attr_accessor :schedule_time
@@ -548,6 +548,99 @@ module Google
548
548
  end
549
549
  end
550
550
 
551
+ # Request message for pulling tasks using CloudTasks.LeaseTasks.
552
+ class LeaseTasksRequest
553
+ include Google::Apis::Core::Hashable
554
+
555
+ # `filter` can be used to specify a subset of tasks to lease.
556
+ # When `filter` is set to `tag=<my-tag>` then the
557
+ # LeaseTasksResponse will contain only tasks whose
558
+ # LeaseMessage.tag is equal to `<my-tag>`. `<my-tag>` must be less than
559
+ # 500 bytes.
560
+ # When `filter` is set to `tag_function=oldest_tag()`, only tasks which have
561
+ # the same tag as the task with the oldest schedule_time will be returned.
562
+ # Grammar Syntax:
563
+ # * `filter = "tag=" tag | "tag_function=" function`
564
+ # * `tag = string | bytes`
565
+ # * `function = "oldest_tag()"`
566
+ # The `oldest_tag()` function returns tasks which have the same tag as the
567
+ # oldest task (ordered by schedule time).
568
+ # Corresponds to the JSON property `filter`
569
+ # @return [String]
570
+ attr_accessor :filter
571
+
572
+ # The duration of the lease.
573
+ # Each task returned in the LeaseTasksResponse will have its
574
+ # Task.schedule_time set to the current time plus the
575
+ # `lease_duration`. A task that has been returned in a
576
+ # LeaseTasksResponse is leased -- that task will not be
577
+ # returned in a different LeaseTasksResponse before the
578
+ # Task.schedule_time.
579
+ # After the pull worker has successfully finished the work
580
+ # associated with the task, the pull worker must call
581
+ # CloudTasks.AcknowledgeTask. If the task is not acknowledged
582
+ # via CloudTasks.AcknowledgeTask before the
583
+ # Task.schedule_time then it will be returned in a later
584
+ # LeaseTasksResponse so that another pull worker can process
585
+ # it.
586
+ # The maximum lease duration is 1 week.
587
+ # `lease_duration` will be truncated to the nearest second.
588
+ # Corresponds to the JSON property `leaseDuration`
589
+ # @return [String]
590
+ attr_accessor :lease_duration
591
+
592
+ # The maximum number of tasks to lease. The maximum that can be
593
+ # requested is 1000.
594
+ # Corresponds to the JSON property `maxTasks`
595
+ # @return [Fixnum]
596
+ attr_accessor :max_tasks
597
+
598
+ # The response_view specifies which subset of the Task will be
599
+ # returned.
600
+ # By default response_view is Task.View.BASIC; not all
601
+ # information is retrieved by default because some data, such as
602
+ # payloads, might be desirable to return only when needed because
603
+ # of its large size or because of the sensitivity of data that it
604
+ # contains.
605
+ # Authorization for Task.View.FULL requires `cloudtasks.tasks.fullView`
606
+ # [Google IAM](/iam/) permission on the
607
+ # Task.name resource.
608
+ # Corresponds to the JSON property `responseView`
609
+ # @return [String]
610
+ attr_accessor :response_view
611
+
612
+ def initialize(**args)
613
+ update!(**args)
614
+ end
615
+
616
+ # Update properties of this object
617
+ def update!(**args)
618
+ @filter = args[:filter] if args.key?(:filter)
619
+ @lease_duration = args[:lease_duration] if args.key?(:lease_duration)
620
+ @max_tasks = args[:max_tasks] if args.key?(:max_tasks)
621
+ @response_view = args[:response_view] if args.key?(:response_view)
622
+ end
623
+ end
624
+
625
+ # Response message for leasing tasks using CloudTasks.LeaseTasks.
626
+ class LeaseTasksResponse
627
+ include Google::Apis::Core::Hashable
628
+
629
+ # The leased tasks.
630
+ # Corresponds to the JSON property `tasks`
631
+ # @return [Array<Google::Apis::CloudtasksV2beta2::Task>]
632
+ attr_accessor :tasks
633
+
634
+ def initialize(**args)
635
+ update!(**args)
636
+ end
637
+
638
+ # Update properties of this object
639
+ def update!(**args)
640
+ @tasks = args[:tasks] if args.key?(:tasks)
641
+ end
642
+ end
643
+
551
644
  # The response message for Locations.ListLocations.
552
645
  class ListLocationsResponse
553
646
  include Google::Apis::Core::Hashable
@@ -830,12 +923,12 @@ module Google
830
923
  # PullTasksResponse is leased -- that task will not be
831
924
  # returned in a different PullTasksResponse before the
832
925
  # Task.schedule_time.
833
- # After the lease holder has successfully finished the work
834
- # associated with the task, the lease holder must call
926
+ # After the pull worker has successfully finished the work
927
+ # associated with the task, the pull worker must call
835
928
  # CloudTasks.AcknowledgeTask. If the task is not acknowledged
836
929
  # via CloudTasks.AcknowledgeTask before the
837
930
  # Task.schedule_time then it will be returned in a later
838
- # PullTasksResponse so that another lease holder can process
931
+ # PullTasksResponse so that another pull worker can process
839
932
  # it.
840
933
  # The maximum lease duration is 1 week.
841
934
  # `lease_duration` will be truncated to the nearest second.
@@ -1101,8 +1194,8 @@ module Google
1101
1194
  # Required.
1102
1195
  # The task's current schedule time, available in the Task.schedule_time
1103
1196
  # returned in PullTasksResponse.tasks or
1104
- # CloudTasks.RenewLease. This restriction is to check that
1105
- # the caller is renewing the correct task.
1197
+ # CloudTasks.RenewLease. This restriction is to ensure that your task
1198
+ # worker currently holds the lease.
1106
1199
  # Corresponds to the JSON property `scheduleTime`
1107
1200
  # @return [String]
1108
1201
  attr_accessor :schedule_time
@@ -1457,20 +1550,20 @@ module Google
1457
1550
  attr_accessor :pull_message
1458
1551
 
1459
1552
  # The time when the task is scheduled to be attempted.
1553
+ # For App Engine queues, this is when the task will be attempted or retried.
1460
1554
  # For pull queues, this is the time when the task is available to
1461
1555
  # be leased; if a task is currently leased, this is the time when
1462
1556
  # the current lease expires, that is, the time that the task was
1463
1557
  # leased plus the PullTasksRequest.lease_duration.
1464
- # For App Engine queues, this is when the task will be attempted or retried.
1465
1558
  # `schedule_time` will be truncated to the nearest microsecond.
1466
1559
  # Corresponds to the JSON property `scheduleTime`
1467
1560
  # @return [String]
1468
1561
  attr_accessor :schedule_time
1469
1562
 
1470
1563
  # Status of the task.
1471
- # Corresponds to the JSON property `taskStatus`
1564
+ # Corresponds to the JSON property `status`
1472
1565
  # @return [Google::Apis::CloudtasksV2beta2::TaskStatus]
1473
- attr_accessor :task_status
1566
+ attr_accessor :status
1474
1567
 
1475
1568
  # Output only. The view specifies which subset of the Task has
1476
1569
  # been returned.
@@ -1489,7 +1582,7 @@ module Google
1489
1582
  @name = args[:name] if args.key?(:name)
1490
1583
  @pull_message = args[:pull_message] if args.key?(:pull_message)
1491
1584
  @schedule_time = args[:schedule_time] if args.key?(:schedule_time)
1492
- @task_status = args[:task_status] if args.key?(:task_status)
1585
+ @status = args[:status] if args.key?(:status)
1493
1586
  @view = args[:view] if args.key?(:view)
1494
1587
  end
1495
1588
  end