google-api-client 0.9.3 → 0.9.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/README.md +28 -3
  4. data/api_names.yaml +1 -0
  5. data/api_names_out.yaml +418 -0
  6. data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
  7. data/generated/google/apis/adsense_v1_4.rb +2 -3
  8. data/generated/google/apis/adsense_v1_4/service.rb +1 -2
  9. data/generated/google/apis/adsensehost_v4_1.rb +3 -3
  10. data/generated/google/apis/adsensehost_v4_1/service.rb +2 -2
  11. data/generated/google/apis/analytics_v3.rb +2 -2
  12. data/generated/google/apis/analytics_v3/classes.rb +42 -0
  13. data/generated/google/apis/analytics_v3/representations.rb +6 -0
  14. data/generated/google/apis/analytics_v3/service.rb +3 -3
  15. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  16. data/generated/google/apis/appsactivity_v1.rb +1 -1
  17. data/generated/google/apis/appsactivity_v1/classes.rb +16 -0
  18. data/generated/google/apis/appsactivity_v1/representations.rb +2 -0
  19. data/generated/google/apis/appstate_v1.rb +1 -1
  20. data/generated/google/apis/bigquery_v2.rb +1 -1
  21. data/generated/google/apis/bigquery_v2/classes.rb +200 -13
  22. data/generated/google/apis/bigquery_v2/representations.rb +54 -0
  23. data/generated/google/apis/books_v1.rb +1 -1
  24. data/generated/google/apis/books_v1/classes.rb +6 -0
  25. data/generated/google/apis/books_v1/representations.rb +1 -0
  26. data/generated/google/apis/books_v1/service.rb +4 -1
  27. data/generated/google/apis/calendar_v3.rb +1 -1
  28. data/generated/google/apis/cloudbuild_v1.rb +2 -3
  29. data/generated/google/apis/cloudbuild_v1/classes.rb +7 -0
  30. data/generated/google/apis/cloudbuild_v1/representations.rb +1 -0
  31. data/generated/google/apis/cloudbuild_v1/service.rb +1 -2
  32. data/generated/google/apis/clouddebugger_v2.rb +2 -2
  33. data/generated/google/apis/clouddebugger_v2/classes.rb +8 -1
  34. data/generated/google/apis/clouddebugger_v2/representations.rb +1 -0
  35. data/generated/google/apis/clouddebugger_v2/service.rb +26 -6
  36. data/generated/google/apis/cloudlatencytest_v2.rb +2 -2
  37. data/generated/google/apis/cloudlatencytest_v2/service.rb +1 -1
  38. data/generated/google/apis/cloudmonitoring_v2beta2.rb +2 -2
  39. data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +1 -1
  40. data/generated/google/apis/cloudresourcemanager_v1.rb +38 -0
  41. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +355 -0
  42. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +181 -0
  43. data/generated/google/apis/cloudresourcemanager_v1/service.rb +373 -0
  44. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
  45. data/generated/google/apis/clouduseraccounts_beta.rb +3 -2
  46. data/generated/google/apis/clouduseraccounts_beta/classes.rb +52 -30
  47. data/generated/google/apis/clouduseraccounts_beta/representations.rb +1 -0
  48. data/generated/google/apis/clouduseraccounts_beta/service.rb +110 -57
  49. data/generated/google/apis/compute_beta.rb +1 -1
  50. data/generated/google/apis/compute_beta/classes.rb +324 -101
  51. data/generated/google/apis/compute_beta/representations.rb +78 -0
  52. data/generated/google/apis/compute_beta/service.rb +1599 -208
  53. data/generated/google/apis/compute_v1.rb +1 -1
  54. data/generated/google/apis/compute_v1/classes.rb +96 -79
  55. data/generated/google/apis/compute_v1/service.rb +199 -169
  56. data/generated/google/apis/content_v2.rb +2 -2
  57. data/generated/google/apis/content_v2/classes.rb +6 -0
  58. data/generated/google/apis/content_v2/representations.rb +1 -0
  59. data/generated/google/apis/content_v2/service.rb +1 -1
  60. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  61. data/generated/google/apis/deploymentmanager_v2/classes.rb +6 -6
  62. data/generated/google/apis/deploymentmanager_v2/service.rb +10 -10
  63. data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
  64. data/generated/google/apis/doubleclicksearch_v2.rb +2 -2
  65. data/generated/google/apis/doubleclicksearch_v2/service.rb +1 -1
  66. data/generated/google/apis/drive_v2.rb +1 -1
  67. data/generated/google/apis/drive_v3.rb +1 -1
  68. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  69. data/generated/google/apis/games_management_v1management.rb +1 -1
  70. data/generated/google/apis/games_v1.rb +1 -1
  71. data/generated/google/apis/games_v1/classes.rb +9 -2
  72. data/generated/google/apis/games_v1/representations.rb +1 -0
  73. data/generated/google/apis/genomics_v1.rb +4 -5
  74. data/generated/google/apis/genomics_v1/classes.rb +51 -0
  75. data/generated/google/apis/genomics_v1/representations.rb +17 -0
  76. data/generated/google/apis/genomics_v1/service.rb +44 -8
  77. data/generated/google/apis/gmail_v1.rb +2 -2
  78. data/generated/google/apis/gmail_v1/classes.rb +19 -0
  79. data/generated/google/apis/gmail_v1/representations.rb +13 -0
  80. data/generated/google/apis/gmail_v1/service.rb +43 -2
  81. data/generated/google/apis/iam_v1.rb +36 -0
  82. data/generated/google/apis/iam_v1/classes.rb +665 -0
  83. data/generated/google/apis/iam_v1/representations.rb +325 -0
  84. data/generated/google/apis/iam_v1/service.rb +520 -0
  85. data/generated/google/apis/identitytoolkit_v3.rb +1 -1
  86. data/generated/google/apis/identitytoolkit_v3/classes.rb +306 -0
  87. data/generated/google/apis/identitytoolkit_v3/representations.rb +85 -0
  88. data/generated/google/apis/identitytoolkit_v3/service.rb +42 -1
  89. data/generated/google/apis/pagespeedonline_v2.rb +2 -2
  90. data/generated/google/apis/pagespeedonline_v2/service.rb +1 -1
  91. data/generated/google/apis/plus_domains_v1.rb +1 -1
  92. data/generated/google/apis/plus_v1.rb +1 -1
  93. data/generated/google/apis/prediction_v1_6.rb +1 -1
  94. data/generated/google/apis/prediction_v1_6/classes.rb +1 -1
  95. data/generated/google/apis/qpx_express_v1.rb +2 -2
  96. data/generated/google/apis/qpx_express_v1/service.rb +1 -1
  97. data/generated/google/apis/replicapoolupdater_v1beta1.rb +2 -3
  98. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +1 -2
  99. data/generated/google/apis/reseller_v1.rb +2 -2
  100. data/generated/google/apis/reseller_v1/service.rb +1 -1
  101. data/generated/google/apis/site_verification_v1.rb +2 -2
  102. data/generated/google/apis/site_verification_v1/service.rb +1 -1
  103. data/generated/google/apis/storage_v1.rb +2 -2
  104. data/generated/google/apis/storage_v1/service.rb +1 -1
  105. data/generated/google/apis/tagmanager_v1.rb +2 -2
  106. data/generated/google/apis/tagmanager_v1/service.rb +1 -1
  107. data/generated/google/apis/vision_v1.rb +1 -1
  108. data/generated/google/apis/vision_v1/classes.rb +2 -2
  109. data/generated/google/apis/youtube_analytics_v1.rb +2 -2
  110. data/generated/google/apis/youtube_analytics_v1/service.rb +1 -1
  111. data/generated/google/apis/youtube_v3.rb +1 -1
  112. data/generated/google/apis/youtube_v3/classes.rb +8 -0
  113. data/generated/google/apis/youtube_v3/representations.rb +1 -0
  114. data/generated/google/apis/youtubereporting_v1.rb +3 -3
  115. data/generated/google/apis/youtubereporting_v1/classes.rb +1 -2
  116. data/generated/google/apis/youtubereporting_v1/service.rb +4 -4
  117. data/lib/google/apis/core/base_service.rb +84 -6
  118. data/lib/google/apis/version.rb +1 -1
  119. data/script/generate +2 -0
  120. data/spec/google/apis/core/service_spec.rb +66 -0
  121. metadata +10 -2
@@ -0,0 +1,373 @@
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 CloudresourcemanagerV1
23
+ # Google Cloud Resource Manager API
24
+ #
25
+ # The Google Cloud Resource Manager API provides methods for creating, reading,
26
+ # and updating project metadata.
27
+ #
28
+ # @example
29
+ # require 'google/apis/cloudresourcemanager_v1'
30
+ #
31
+ # Cloudresourcemanager = Google::Apis::CloudresourcemanagerV1 # Alias the module
32
+ # service = Cloudresourcemanager::CloudresourcemanagerService.new
33
+ #
34
+ # @see https://cloud.google.com/resource-manager
35
+ class CloudresourcemanagerService < 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://cloudresourcemanager.googleapis.com/', '')
48
+ end
49
+
50
+ # Retrieves the Project identified by the specified `project_id` (for example, `
51
+ # my-project-123`). The caller must have read permissions for this Project.
52
+ # @param [String] project_id
53
+ # The Project ID (for example, `my-project-123`). Required.
54
+ # @param [String] fields
55
+ # Selector specifying which fields to include in a partial response.
56
+ # @param [String] quota_user
57
+ # Available to use for quota purposes for server-side applications. Can be any
58
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
59
+ # @param [Google::Apis::RequestOptions] options
60
+ # Request-specific options
61
+ #
62
+ # @yield [result, err] Result & error if block supplied
63
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Project] parsed result object
64
+ # @yieldparam err [StandardError] error object if request failed
65
+ #
66
+ # @return [Google::Apis::CloudresourcemanagerV1::Project]
67
+ #
68
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
69
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
70
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
71
+ def get_project(project_id, fields: nil, quota_user: nil, options: nil, &block)
72
+ command = make_simple_command(:get, 'v1/projects/{projectId}', options)
73
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation
74
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Project
75
+ command.params['projectId'] = project_id unless project_id.nil?
76
+ command.query['fields'] = fields unless fields.nil?
77
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
78
+ execute_or_queue_command(command, &block)
79
+ end
80
+
81
+ # Lists Projects that are visible to the user and satisfy the specified filter.
82
+ # This method returns Projects in an unspecified order. New Projects do not
83
+ # necessarily appear at the end of the list.
84
+ # @param [String] page_token
85
+ # A pagination token returned from a previous call to ListProjects that
86
+ # indicates from where listing should continue. Optional.
87
+ # @param [Fixnum] page_size
88
+ # The maximum number of Projects to return in the response. The server can
89
+ # return fewer Projects than requested. If unspecified, server picks an
90
+ # appropriate default. Optional.
91
+ # @param [String] filter
92
+ # An expression for filtering the results of the request. Filter rules are case
93
+ # insensitive. The fields eligible for filtering are: + `name` + `id` + labels.
94
+ # key where *key* is the name of a label Some examples of using labels as
95
+ # filters: |Filter|Description| |------|-----------| |name:*|The project has a
96
+ # name.| |name:Howl|The project's name is `Howl` or `howl`.| |name:HOWL|
97
+ # Equivalent to above.| |NAME:howl|Equivalent to above.| |labels.color:*|The
98
+ # project has the label `color`.| |labels.color:red|The project's label `color`
99
+ # has the value `red`.| |labels.color:red label.size:big|The project's label `
100
+ # color` has the value `red` and its label `size` has the value `big`. Optional.
101
+ # @param [String] fields
102
+ # Selector specifying which fields to include in a partial response.
103
+ # @param [String] quota_user
104
+ # Available to use for quota purposes for server-side applications. Can be any
105
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
106
+ # @param [Google::Apis::RequestOptions] options
107
+ # Request-specific options
108
+ #
109
+ # @yield [result, err] Result & error if block supplied
110
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListProjectsResponse] parsed result object
111
+ # @yieldparam err [StandardError] error object if request failed
112
+ #
113
+ # @return [Google::Apis::CloudresourcemanagerV1::ListProjectsResponse]
114
+ #
115
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
116
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
117
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
118
+ def list_projects(page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
119
+ command = make_simple_command(:get, 'v1/projects', options)
120
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::ListProjectsResponse::Representation
121
+ command.response_class = Google::Apis::CloudresourcemanagerV1::ListProjectsResponse
122
+ command.query['pageToken'] = page_token unless page_token.nil?
123
+ command.query['pageSize'] = page_size unless page_size.nil?
124
+ command.query['filter'] = filter unless filter.nil?
125
+ command.query['fields'] = fields unless fields.nil?
126
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
127
+ execute_or_queue_command(command, &block)
128
+ end
129
+
130
+ # Updates the attributes of the Project identified by the specified `project_id`
131
+ # (for example, `my-project-123`). The caller must have modify permissions for
132
+ # this Project.
133
+ # @param [String] project_id
134
+ # The project ID (for example, `my-project-123`). Required.
135
+ # @param [Google::Apis::CloudresourcemanagerV1::Project] project_object
136
+ # @param [String] fields
137
+ # Selector specifying which fields to include in a partial response.
138
+ # @param [String] quota_user
139
+ # Available to use for quota purposes for server-side applications. Can be any
140
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
141
+ # @param [Google::Apis::RequestOptions] options
142
+ # Request-specific options
143
+ #
144
+ # @yield [result, err] Result & error if block supplied
145
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Project] parsed result object
146
+ # @yieldparam err [StandardError] error object if request failed
147
+ #
148
+ # @return [Google::Apis::CloudresourcemanagerV1::Project]
149
+ #
150
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
151
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
152
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
153
+ def update_project(project_id, project_object = nil, fields: nil, quota_user: nil, options: nil, &block)
154
+ command = make_simple_command(:put, 'v1/projects/{projectId}', options)
155
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation
156
+ command.request_object = project_object
157
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation
158
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Project
159
+ command.params['projectId'] = project_id unless project_id.nil?
160
+ command.query['fields'] = fields unless fields.nil?
161
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
162
+ execute_or_queue_command(command, &block)
163
+ end
164
+
165
+ # Marks the Project identified by the specified `project_id` (for example, `my-
166
+ # project-123`) for deletion. This method will only affect the Project if the
167
+ # following criteria are met: + The Project does not have a billing account
168
+ # associated with it. + The Project has a lifecycle state of ACTIVE. This method
169
+ # changes the Project's lifecycle state from ACTIVE to DELETE_REQUESTED. The
170
+ # deletion starts at an unspecified time, at which point the lifecycle state
171
+ # changes to DELETE_IN_PROGRESS. Until the deletion completes, you can check the
172
+ # lifecycle state checked by retrieving the Project with GetProject, and the
173
+ # Project remains visible to ListProjects. However, you cannot update the
174
+ # project. After the deletion completes, the Project is not retrievable by the
175
+ # GetProject and ListProjects methods. The caller must have modify permissions
176
+ # for this Project.
177
+ # @param [String] project_id
178
+ # The Project ID (for example, `foo-bar-123`). Required.
179
+ # @param [String] fields
180
+ # Selector specifying which fields to include in a partial response.
181
+ # @param [String] quota_user
182
+ # Available to use for quota purposes for server-side applications. Can be any
183
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
184
+ # @param [Google::Apis::RequestOptions] options
185
+ # Request-specific options
186
+ #
187
+ # @yield [result, err] Result & error if block supplied
188
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Empty] parsed result object
189
+ # @yieldparam err [StandardError] error object if request failed
190
+ #
191
+ # @return [Google::Apis::CloudresourcemanagerV1::Empty]
192
+ #
193
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
194
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
195
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
196
+ def delete_project(project_id, fields: nil, quota_user: nil, options: nil, &block)
197
+ command = make_simple_command(:delete, 'v1/projects/{projectId}', options)
198
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation
199
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Empty
200
+ command.params['projectId'] = project_id unless project_id.nil?
201
+ command.query['fields'] = fields unless fields.nil?
202
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
203
+ execute_or_queue_command(command, &block)
204
+ end
205
+
206
+ # Restores the Project identified by the specified `project_id` (for example, `
207
+ # my-project-123`). You can only use this method for a Project that has a
208
+ # lifecycle state of DELETE_REQUESTED. After deletion starts, as indicated by a
209
+ # lifecycle state of DELETE_IN_PROGRESS, the Project cannot be restored. The
210
+ # caller must have modify permissions for this Project.
211
+ # @param [String] project_id
212
+ # The project ID (for example, `foo-bar-123`). Required.
213
+ # @param [Google::Apis::CloudresourcemanagerV1::UndeleteProjectRequest] undelete_project_request_object
214
+ # @param [String] fields
215
+ # Selector specifying which fields to include in a partial response.
216
+ # @param [String] quota_user
217
+ # Available to use for quota purposes for server-side applications. Can be any
218
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
219
+ # @param [Google::Apis::RequestOptions] options
220
+ # Request-specific options
221
+ #
222
+ # @yield [result, err] Result & error if block supplied
223
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Empty] parsed result object
224
+ # @yieldparam err [StandardError] error object if request failed
225
+ #
226
+ # @return [Google::Apis::CloudresourcemanagerV1::Empty]
227
+ #
228
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
229
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
230
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
231
+ def undelete_project(project_id, undelete_project_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
232
+ command = make_simple_command(:post, 'v1/projects/{projectId}:undelete', options)
233
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::UndeleteProjectRequest::Representation
234
+ command.request_object = undelete_project_request_object
235
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation
236
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Empty
237
+ command.params['projectId'] = project_id unless project_id.nil?
238
+ command.query['fields'] = fields unless fields.nil?
239
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
240
+ execute_or_queue_command(command, &block)
241
+ end
242
+
243
+ # Returns the IAM access control policy for the specified Project. Permission is
244
+ # denied if the policy or the resource does not exist.
245
+ # @param [String] resource
246
+ # REQUIRED: The resource for which the policy is being requested. `resource` is
247
+ # usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*
248
+ # disk*`. The format for the path specified in this value is resource specific
249
+ # and is specified in the `getIamPolicy` documentation.
250
+ # @param [Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest] get_iam_policy_request_object
251
+ # @param [String] fields
252
+ # Selector specifying which fields to include in a partial response.
253
+ # @param [String] quota_user
254
+ # Available to use for quota purposes for server-side applications. Can be any
255
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
256
+ # @param [Google::Apis::RequestOptions] options
257
+ # Request-specific options
258
+ #
259
+ # @yield [result, err] Result & error if block supplied
260
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Policy] parsed result object
261
+ # @yieldparam err [StandardError] error object if request failed
262
+ #
263
+ # @return [Google::Apis::CloudresourcemanagerV1::Policy]
264
+ #
265
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
266
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
267
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
268
+ def get_project_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
269
+ command = make_simple_command(:post, 'v1/projects/{resource}:getIamPolicy', options)
270
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest::Representation
271
+ command.request_object = get_iam_policy_request_object
272
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation
273
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Policy
274
+ command.params['resource'] = resource unless resource.nil?
275
+ command.query['fields'] = fields unless fields.nil?
276
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
277
+ execute_or_queue_command(command, &block)
278
+ end
279
+
280
+ # Sets the IAM access control policy for the specified Project. Replaces any
281
+ # existing policy. The following constraints apply when using `setIamPolicy()`: +
282
+ # Project currently supports only `user:`emailid`` and `serviceAccount:`emailid`
283
+ # ` members in a `Binding` of a `Policy`. + To be added as an `owner`, a user
284
+ # must be invited via Cloud Platform console and must accept the invitation. +
285
+ # Members cannot be added to more than one role in the same policy. + There must
286
+ # be at least one owner who has accepted the Terms of Service (ToS) agreement in
287
+ # the policy. Calling `setIamPolicy()` to to remove the last ToS-accepted owner
288
+ # from the policy will fail. + Calling this method requires enabling the App
289
+ # Engine Admin API. Note: Removing service accounts from policies or changing
290
+ # their roles can render services completely inoperable. It is important to
291
+ # understand how the service account is being used before removing or updating
292
+ # its roles.
293
+ # @param [String] resource
294
+ # REQUIRED: The resource for which the policy is being specified. `resource` is
295
+ # usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*
296
+ # disk*`. The format for the path specified in this value is resource specific
297
+ # and is specified in the `setIamPolicy` documentation.
298
+ # @param [Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest] set_iam_policy_request_object
299
+ # @param [String] fields
300
+ # Selector specifying which fields to include in a partial response.
301
+ # @param [String] quota_user
302
+ # Available to use for quota purposes for server-side applications. Can be any
303
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
304
+ # @param [Google::Apis::RequestOptions] options
305
+ # Request-specific options
306
+ #
307
+ # @yield [result, err] Result & error if block supplied
308
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Policy] parsed result object
309
+ # @yieldparam err [StandardError] error object if request failed
310
+ #
311
+ # @return [Google::Apis::CloudresourcemanagerV1::Policy]
312
+ #
313
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
314
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
315
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
316
+ def set_project_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
317
+ command = make_simple_command(:post, 'v1/projects/{resource}:setIamPolicy', options)
318
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest::Representation
319
+ command.request_object = set_iam_policy_request_object
320
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation
321
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Policy
322
+ command.params['resource'] = resource unless resource.nil?
323
+ command.query['fields'] = fields unless fields.nil?
324
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
325
+ execute_or_queue_command(command, &block)
326
+ end
327
+
328
+ # Returns permissions that a caller has on the specified Project.
329
+ # @param [String] resource
330
+ # REQUIRED: The resource for which the policy detail is being requested. `
331
+ # resource` is usually specified as a path, such as `projects/*project*/zones/*
332
+ # zone*/disks/*disk*`. The format for the path specified in this value is
333
+ # resource specific and is specified in the `testIamPermissions` documentation.
334
+ # @param [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest] test_iam_permissions_request_object
335
+ # @param [String] fields
336
+ # Selector specifying which fields to include in a partial response.
337
+ # @param [String] quota_user
338
+ # Available to use for quota purposes for server-side applications. Can be any
339
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
340
+ # @param [Google::Apis::RequestOptions] options
341
+ # Request-specific options
342
+ #
343
+ # @yield [result, err] Result & error if block supplied
344
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse] parsed result object
345
+ # @yieldparam err [StandardError] error object if request failed
346
+ #
347
+ # @return [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse]
348
+ #
349
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
350
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
351
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
352
+ def test_project_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
353
+ command = make_simple_command(:post, 'v1/projects/{resource}:testIamPermissions', options)
354
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest::Representation
355
+ command.request_object = test_iam_permissions_request_object
356
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse::Representation
357
+ command.response_class = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse
358
+ command.params['resource'] = resource unless resource.nil?
359
+ command.query['fields'] = fields unless fields.nil?
360
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
361
+ execute_or_queue_command(command, &block)
362
+ end
363
+
364
+ protected
365
+
366
+ def apply_command_defaults(command)
367
+ command.query['key'] = key unless key.nil?
368
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
369
+ end
370
+ end
371
+ end
372
+ end
373
+ end
@@ -26,7 +26,7 @@ module Google
26
26
  # @see https://cloud.google.com/resource-manager
27
27
  module CloudresourcemanagerV1beta1
28
28
  VERSION = 'V1beta1'
29
- REVISION = '20160224'
29
+ REVISION = '20160225'
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'
@@ -20,12 +20,13 @@ module Google
20
20
  module Apis
21
21
  # Cloud User Accounts API
22
22
  #
23
- # API for the Google Cloud User Accounts service.
23
+ # Creates and manages users and groups for accessing Google Compute Engine
24
+ # virtual machines.
24
25
  #
25
26
  # @see https://cloud.google.com/compute/docs/access/user-accounts/api/latest/
26
27
  module ClouduseraccountsBeta
27
28
  VERSION = 'Beta'
28
- REVISION = '20150924'
29
+ REVISION = '20160301'
29
30
 
30
31
  # View and manage your data across Google Cloud Platform services
31
32
  AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
@@ -348,8 +348,7 @@ module Google
348
348
  class Operation
349
349
  include Google::Apis::Core::Hashable
350
350
 
351
- # [Output Only] An optional identifier specified by the client when the mutation
352
- # was initiated. Must be unique for all Operation resources in the project.
351
+ # [Output Only] Reserved for future use.
353
352
  # Corresponds to the JSON property `clientOperationId`
354
353
  # @return [String]
355
354
  attr_accessor :client_operation_id
@@ -359,8 +358,14 @@ module Google
359
358
  # @return [String]
360
359
  attr_accessor :creation_timestamp
361
360
 
362
- # [Output Only] The time that this operation was completed. This is in RFC3339
363
- # text format.
361
+ # [Output Only] A textual description of the operation, which is set when the
362
+ # operation is created.
363
+ # Corresponds to the JSON property `description`
364
+ # @return [String]
365
+ attr_accessor :description
366
+
367
+ # [Output Only] The time that this operation was completed. This value is in
368
+ # RFC3339 text format.
364
369
  # Corresponds to the JSON property `endTime`
365
370
  # @return [String]
366
371
  attr_accessor :end_time
@@ -378,23 +383,25 @@ module Google
378
383
  attr_accessor :http_error_message
379
384
 
380
385
  # [Output Only] If the operation fails, this field contains the HTTP error
381
- # message that was returned, such as 404.
386
+ # status code that was returned. For example, a 404 means the resource was not
387
+ # found.
382
388
  # Corresponds to the JSON property `httpErrorStatusCode`
383
389
  # @return [Fixnum]
384
390
  attr_accessor :http_error_status_code
385
391
 
386
- # [Output Only] Unique identifier for the resource; defined by the server.
392
+ # [Output Only] The unique identifier for the resource. This identifier is
393
+ # defined by the server.
387
394
  # Corresponds to the JSON property `id`
388
395
  # @return [String]
389
396
  attr_accessor :id
390
397
 
391
- # [Output Only] The time that this operation was requested. This is in RFC3339
392
- # text format.
398
+ # [Output Only] The time that this operation was requested. This value is in
399
+ # RFC3339 text format.
393
400
  # Corresponds to the JSON property `insertTime`
394
401
  # @return [String]
395
402
  attr_accessor :insert_time
396
403
 
397
- # [Output Only] Type of the resource. Always compute#operation for Operation
404
+ # [Output Only] Type of the resource. Always compute#operation for operation
398
405
  # resources.
399
406
  # Corresponds to the JSON property `kind`
400
407
  # @return [String]
@@ -405,22 +412,22 @@ module Google
405
412
  # @return [String]
406
413
  attr_accessor :name
407
414
 
408
- # [Output Only] Type of the operation, such as insert, compute.instanceGroups.
409
- # update, or compute.instanceGroups.delete.
415
+ # [Output Only] The type of operation, such as insert, update, or delete, and so
416
+ # on.
410
417
  # Corresponds to the JSON property `operationType`
411
418
  # @return [String]
412
419
  attr_accessor :operation_type
413
420
 
414
421
  # [Output Only] An optional progress indicator that ranges from 0 to 100. There
415
422
  # is no requirement that this be linear or support any granularity of operations.
416
- # This should not be used to guess at when the operation will be complete. This
423
+ # This should not be used to guess when the operation will be complete. This
417
424
  # number should monotonically increase as the operation progresses.
418
425
  # Corresponds to the JSON property `progress`
419
426
  # @return [Fixnum]
420
427
  attr_accessor :progress
421
428
 
422
- # [Output Only] URL of the region where the operation resides. Only applicable
423
- # for regional resources.
429
+ # [Output Only] The URL of the region where the operation resides. Only
430
+ # available when performing regional operations.
424
431
  # Corresponds to the JSON property `region`
425
432
  # @return [String]
426
433
  attr_accessor :region
@@ -430,14 +437,14 @@ module Google
430
437
  # @return [String]
431
438
  attr_accessor :self_link
432
439
 
433
- # [Output Only] The time that this operation was started by the server. This is
434
- # in RFC3339 text format.
440
+ # [Output Only] The time that this operation was started by the server. This
441
+ # value is in RFC3339 text format.
435
442
  # Corresponds to the JSON property `startTime`
436
443
  # @return [String]
437
444
  attr_accessor :start_time
438
445
 
439
- # [Output Only] Status of the operation. Can be one of the following: PENDING,
440
- # RUNNING, or DONE.
446
+ # [Output Only] The status of the operation, which can be one of the following:
447
+ # PENDING, RUNNING, or DONE.
441
448
  # Corresponds to the JSON property `status`
442
449
  # @return [String]
443
450
  attr_accessor :status
@@ -448,13 +455,13 @@ module Google
448
455
  # @return [String]
449
456
  attr_accessor :status_message
450
457
 
451
- # [Output Only] Unique target ID which identifies a particular incarnation of
452
- # the target.
458
+ # [Output Only] The unique target ID, which identifies a specific incarnation of
459
+ # the target resource.
453
460
  # Corresponds to the JSON property `targetId`
454
461
  # @return [String]
455
462
  attr_accessor :target_id
456
463
 
457
- # [Output Only] URL of the resource the operation is mutating.
464
+ # [Output Only] The URL of the resource that the operation modifies.
458
465
  # Corresponds to the JSON property `targetLink`
459
466
  # @return [String]
460
467
  attr_accessor :target_link
@@ -470,7 +477,8 @@ module Google
470
477
  # @return [Array<Google::Apis::ClouduseraccountsBeta::Operation::Warning>]
471
478
  attr_accessor :warnings
472
479
 
473
- # [Output Only] URL of the zone where the operation resides.
480
+ # [Output Only] The URL of the zone where the operation resides. Only available
481
+ # when performing per-zone operations.
474
482
  # Corresponds to the JSON property `zone`
475
483
  # @return [String]
476
484
  attr_accessor :zone
@@ -483,6 +491,7 @@ module Google
483
491
  def update!(**args)
484
492
  @client_operation_id = args[:client_operation_id] if args.key?(:client_operation_id)
485
493
  @creation_timestamp = args[:creation_timestamp] if args.key?(:creation_timestamp)
494
+ @description = args[:description] if args.key?(:description)
486
495
  @end_time = args[:end_time] if args.key?(:end_time)
487
496
  @error = args[:error] if args.key?(:error)
488
497
  @http_error_message = args[:http_error_message] if args.key?(:http_error_message)
@@ -533,7 +542,7 @@ module Google
533
542
  # @return [String]
534
543
  attr_accessor :code
535
544
 
536
- # [Output Only] Indicates the field in the request which caused the error. This
545
+ # [Output Only] Indicates the field in the request that caused the error. This
537
546
  # property is optional.
538
547
  # Corresponds to the JSON property `location`
539
548
  # @return [String]
@@ -561,17 +570,19 @@ module Google
561
570
  class Warning
562
571
  include Google::Apis::Core::Hashable
563
572
 
564
- # [Output Only] The warning type identifier for this warning.
573
+ # [Output Only] A warning code, if applicable. For example, Compute Engine
574
+ # returns NO_RESULTS_ON_PAGE if there are no results in the response.
565
575
  # Corresponds to the JSON property `code`
566
576
  # @return [String]
567
577
  attr_accessor :code
568
578
 
569
- # [Output Only] Metadata for this warning in key: value format.
579
+ # [Output Only] Metadata about this warning in key: value format. For example:
580
+ # "data": [ ` "key": "scope", "value": "zones/us-east1-d" `
570
581
  # Corresponds to the JSON property `data`
571
582
  # @return [Array<Google::Apis::ClouduseraccountsBeta::Operation::Warning::Datum>]
572
583
  attr_accessor :data
573
584
 
574
- # [Output Only] Optional human-readable details for this warning.
585
+ # [Output Only] A human-readable description of the warning code.
575
586
  # Corresponds to the JSON property `message`
576
587
  # @return [String]
577
588
  attr_accessor :message
@@ -591,7 +602,13 @@ module Google
591
602
  class Datum
592
603
  include Google::Apis::Core::Hashable
593
604
 
594
- # [Output Only] A key for the warning data.
605
+ # [Output Only] A key that provides more detail on the warning being returned.
606
+ # For example, for warnings where there are no results in a list request for a
607
+ # particular zone, this key might be scope and the key value might be the zone
608
+ # name. Other examples might be a key indicating a deprecated resource and a
609
+ # suggested replacement, or a warning about invalid network settings (for
610
+ # example, if an instance attempts to perform IP forwarding but is not enabled
611
+ # for IP forwarding).
595
612
  # Corresponds to the JSON property `key`
596
613
  # @return [String]
597
614
  attr_accessor :key
@@ -618,12 +635,13 @@ module Google
618
635
  class OperationList
619
636
  include Google::Apis::Core::Hashable
620
637
 
621
- # [Output Only] Unique identifier for the resource; defined by the server.
638
+ # [Output Only] The unique identifier for the resource. This identifier is
639
+ # defined by the server.
622
640
  # Corresponds to the JSON property `id`
623
641
  # @return [String]
624
642
  attr_accessor :id
625
643
 
626
- # [Output Only] The Operation resources.
644
+ # [Output Only] A list of Operation resources.
627
645
  # Corresponds to the JSON property `items`
628
646
  # @return [Array<Google::Apis::ClouduseraccountsBeta::Operation>]
629
647
  attr_accessor :items
@@ -634,7 +652,11 @@ module Google
634
652
  # @return [String]
635
653
  attr_accessor :kind
636
654
 
637
- # [Output Only] A token used to continue a truncate.
655
+ # [Output Only] This token allows you to get the next page of results for list
656
+ # requests. If the number of results is larger than maxResults, use the
657
+ # nextPageToken as a value for the query parameter pageToken in the next list
658
+ # request. Subsequent list requests will have their own nextPageToken to
659
+ # continue paging through the results.
638
660
  # Corresponds to the JSON property `nextPageToken`
639
661
  # @return [String]
640
662
  attr_accessor :next_page_token