google-api-client 0.10.0 → 0.10.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (193) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/README.md +1 -1
  4. data/api_names.yaml +37747 -36512
  5. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  6. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +1016 -114
  7. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +426 -22
  8. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +481 -95
  9. data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
  10. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +27 -10
  11. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +1 -0
  12. data/generated/google/apis/admin_reports_v1.rb +2 -2
  13. data/generated/google/apis/adsense_v1_4.rb +1 -1
  14. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  15. data/generated/google/apis/analytics_v3.rb +1 -1
  16. data/generated/google/apis/analyticsreporting_v4.rb +4 -4
  17. data/generated/google/apis/analyticsreporting_v4/classes.rb +428 -428
  18. data/generated/google/apis/analyticsreporting_v4/representations.rb +108 -108
  19. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  20. data/generated/google/apis/androidenterprise_v1/classes.rb +60 -66
  21. data/generated/google/apis/androidenterprise_v1/service.rb +12 -11
  22. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  23. data/generated/google/apis/androidpublisher_v2/classes.rb +7 -0
  24. data/generated/google/apis/androidpublisher_v2/representations.rb +1 -0
  25. data/generated/google/apis/androidpublisher_v2/service.rb +1 -1
  26. data/generated/google/apis/appsactivity_v1.rb +3 -3
  27. data/generated/google/apis/appsactivity_v1/service.rb +1 -1
  28. data/generated/google/apis/appstate_v1.rb +1 -1
  29. data/generated/google/apis/bigquery_v2.rb +1 -1
  30. data/generated/google/apis/bigquery_v2/classes.rb +34 -8
  31. data/generated/google/apis/bigquery_v2/representations.rb +15 -0
  32. data/generated/google/apis/calendar_v3.rb +1 -1
  33. data/generated/google/apis/calendar_v3/classes.rb +3 -5
  34. data/generated/google/apis/classroom_v1.rb +25 -22
  35. data/generated/google/apis/classroom_v1/classes.rb +910 -1001
  36. data/generated/google/apis/classroom_v1/representations.rb +240 -240
  37. data/generated/google/apis/classroom_v1/service.rb +1064 -1272
  38. data/generated/google/apis/cloudbilling_v1.rb +3 -3
  39. data/generated/google/apis/cloudbilling_v1/classes.rb +76 -75
  40. data/generated/google/apis/cloudbilling_v1/representations.rb +17 -17
  41. data/generated/google/apis/cloudbilling_v1/service.rb +117 -110
  42. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  43. data/generated/google/apis/cloudbuild_v1/classes.rb +238 -238
  44. data/generated/google/apis/cloudbuild_v1/representations.rb +48 -48
  45. data/generated/google/apis/cloudbuild_v1/service.rb +176 -176
  46. data/generated/google/apis/clouddebugger_v2.rb +4 -4
  47. data/generated/google/apis/clouddebugger_v2/classes.rb +315 -315
  48. data/generated/google/apis/clouddebugger_v2/representations.rb +90 -90
  49. data/generated/google/apis/clouddebugger_v2/service.rb +152 -152
  50. data/generated/google/apis/cloudkms_v1.rb +35 -0
  51. data/generated/google/apis/cloudkms_v1/classes.rb +1039 -0
  52. data/generated/google/apis/cloudkms_v1/representations.rb +448 -0
  53. data/generated/google/apis/cloudkms_v1/service.rb +933 -0
  54. data/generated/google/apis/cloudkms_v1beta1.rb +1 -1
  55. data/generated/google/apis/cloudkms_v1beta1/classes.rb +645 -605
  56. data/generated/google/apis/cloudkms_v1beta1/representations.rb +136 -136
  57. data/generated/google/apis/cloudkms_v1beta1/service.rb +258 -264
  58. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  59. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  60. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +677 -456
  61. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +154 -89
  62. data/generated/google/apis/cloudresourcemanager_v1/service.rb +380 -279
  63. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +4 -4
  64. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +247 -114
  65. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +72 -40
  66. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +202 -208
  67. data/generated/google/apis/cloudtrace_v1.rb +4 -4
  68. data/generated/google/apis/cloudtrace_v1/classes.rb +39 -39
  69. data/generated/google/apis/cloudtrace_v1/representations.rb +13 -13
  70. data/generated/google/apis/cloudtrace_v1/service.rb +18 -18
  71. data/generated/google/apis/compute_beta.rb +1 -1
  72. data/generated/google/apis/compute_beta/classes.rb +813 -82
  73. data/generated/google/apis/compute_beta/representations.rb +305 -0
  74. data/generated/google/apis/compute_beta/service.rb +971 -180
  75. data/generated/google/apis/compute_v1.rb +1 -1
  76. data/generated/google/apis/compute_v1/classes.rb +147 -21
  77. data/generated/google/apis/compute_v1/representations.rb +38 -0
  78. data/generated/google/apis/compute_v1/service.rb +347 -65
  79. data/generated/google/apis/content_v2.rb +1 -1
  80. data/generated/google/apis/content_v2/classes.rb +2 -1
  81. data/generated/google/apis/dataflow_v1b3.rb +1 -1
  82. data/generated/google/apis/dataflow_v1b3/classes.rb +3352 -3110
  83. data/generated/google/apis/dataflow_v1b3/representations.rb +812 -730
  84. data/generated/google/apis/dataflow_v1b3/service.rb +264 -183
  85. data/generated/google/apis/dataproc_v1.rb +1 -1
  86. data/generated/google/apis/dataproc_v1/classes.rb +1200 -1164
  87. data/generated/google/apis/dataproc_v1/representations.rb +220 -204
  88. data/generated/google/apis/dataproc_v1/service.rb +299 -299
  89. data/generated/google/apis/datastore_v1.rb +4 -4
  90. data/generated/google/apis/datastore_v1/classes.rb +688 -688
  91. data/generated/google/apis/datastore_v1/representations.rb +167 -167
  92. data/generated/google/apis/datastore_v1/service.rb +68 -68
  93. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  94. data/generated/google/apis/deploymentmanager_v2/classes.rb +13 -3
  95. data/generated/google/apis/dns_v1.rb +1 -1
  96. data/generated/google/apis/dns_v2beta1.rb +1 -1
  97. data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
  98. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +1 -1
  99. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  100. data/generated/google/apis/drive_v2.rb +1 -1
  101. data/generated/google/apis/drive_v2/classes.rb +487 -15
  102. data/generated/google/apis/drive_v2/representations.rb +120 -0
  103. data/generated/google/apis/drive_v2/service.rb +355 -38
  104. data/generated/google/apis/drive_v3.rb +1 -1
  105. data/generated/google/apis/drive_v3/classes.rb +416 -14
  106. data/generated/google/apis/drive_v3/representations.rb +99 -0
  107. data/generated/google/apis/drive_v3/service.rb +315 -28
  108. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  109. data/generated/google/apis/games_management_v1management.rb +1 -1
  110. data/generated/google/apis/games_v1.rb +1 -1
  111. data/generated/google/apis/genomics_v1.rb +7 -7
  112. data/generated/google/apis/genomics_v1/classes.rb +2301 -2301
  113. data/generated/google/apis/genomics_v1/representations.rb +239 -239
  114. data/generated/google/apis/genomics_v1/service.rb +599 -599
  115. data/generated/google/apis/gmail_v1.rb +2 -2
  116. data/generated/google/apis/gmail_v1/service.rb +18 -1
  117. data/generated/google/apis/groupssettings_v1.rb +1 -1
  118. data/generated/google/apis/iam_v1.rb +1 -1
  119. data/generated/google/apis/iam_v1/classes.rb +440 -440
  120. data/generated/google/apis/iam_v1/representations.rb +96 -96
  121. data/generated/google/apis/iam_v1/service.rb +150 -150
  122. data/generated/google/apis/kgsearch_v1/service.rb +13 -13
  123. data/generated/google/apis/language_v1beta1.rb +1 -1
  124. data/generated/google/apis/language_v1beta1/classes.rb +235 -235
  125. data/generated/google/apis/language_v1beta1/representations.rb +73 -73
  126. data/generated/google/apis/language_v1beta1/service.rb +49 -49
  127. data/generated/google/apis/licensing_v1.rb +1 -1
  128. data/generated/google/apis/logging_v2beta1.rb +1 -1
  129. data/generated/google/apis/logging_v2beta1/classes.rb +888 -879
  130. data/generated/google/apis/logging_v2beta1/representations.rb +129 -129
  131. data/generated/google/apis/logging_v2beta1/service.rb +315 -316
  132. data/generated/google/apis/manufacturers_v1/classes.rb +139 -139
  133. data/generated/google/apis/manufacturers_v1/representations.rb +30 -30
  134. data/generated/google/apis/manufacturers_v1/service.rb +32 -32
  135. data/generated/google/apis/monitoring_v3.rb +4 -4
  136. data/generated/google/apis/monitoring_v3/classes.rb +229 -229
  137. data/generated/google/apis/monitoring_v3/representations.rb +45 -45
  138. data/generated/google/apis/monitoring_v3/service.rb +141 -141
  139. data/generated/google/apis/partners_v2.rb +3 -3
  140. data/generated/google/apis/partners_v2/classes.rb +1837 -483
  141. data/generated/google/apis/partners_v2/representations.rb +614 -157
  142. data/generated/google/apis/partners_v2/service.rb +881 -150
  143. data/generated/google/apis/people_v1.rb +1 -1
  144. data/generated/google/apis/people_v1/classes.rb +517 -465
  145. data/generated/google/apis/people_v1/representations.rb +138 -107
  146. data/generated/google/apis/people_v1/service.rb +56 -49
  147. data/generated/google/apis/plus_domains_v1.rb +1 -1
  148. data/generated/google/apis/plus_v1.rb +1 -1
  149. data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
  150. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +529 -458
  151. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +98 -97
  152. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +494 -370
  153. data/generated/google/apis/pubsub_v1.rb +4 -4
  154. data/generated/google/apis/pubsub_v1/classes.rb +203 -203
  155. data/generated/google/apis/pubsub_v1/representations.rb +65 -65
  156. data/generated/google/apis/pubsub_v1/service.rb +226 -217
  157. data/generated/google/apis/reseller_v1.rb +1 -1
  158. data/generated/google/apis/reseller_v1/classes.rb +213 -61
  159. data/generated/google/apis/reseller_v1/representations.rb +27 -0
  160. data/generated/google/apis/reseller_v1/service.rb +240 -47
  161. data/generated/google/apis/script_v1.rb +14 -14
  162. data/generated/google/apis/script_v1/classes.rb +95 -95
  163. data/generated/google/apis/script_v1/representations.rb +25 -25
  164. data/generated/google/apis/sheets_v4.rb +1 -1
  165. data/generated/google/apis/sheets_v4/classes.rb +4346 -4300
  166. data/generated/google/apis/sheets_v4/representations.rb +853 -837
  167. data/generated/google/apis/sheets_v4/service.rb +32 -32
  168. data/generated/google/apis/slides_v1.rb +1 -1
  169. data/generated/google/apis/slides_v1/classes.rb +804 -748
  170. data/generated/google/apis/slides_v1/representations.rb +204 -187
  171. data/generated/google/apis/slides_v1/service.rb +16 -16
  172. data/generated/google/apis/speech_v1beta1.rb +1 -1
  173. data/generated/google/apis/speech_v1beta1/classes.rb +57 -57
  174. data/generated/google/apis/speech_v1beta1/representations.rb +19 -19
  175. data/generated/google/apis/speech_v1beta1/service.rb +66 -66
  176. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  177. data/generated/google/apis/sqladmin_v1beta4/classes.rb +32 -7
  178. data/generated/google/apis/sqladmin_v1beta4/representations.rb +16 -0
  179. data/generated/google/apis/sqladmin_v1beta4/service.rb +9 -2
  180. data/generated/google/apis/storage_v1.rb +1 -1
  181. data/generated/google/apis/storage_v1/service.rb +10 -7
  182. data/generated/google/apis/vision_v1.rb +1 -1
  183. data/generated/google/apis/vision_v1/classes.rb +1393 -865
  184. data/generated/google/apis/vision_v1/representations.rb +367 -102
  185. data/generated/google/apis/vision_v1/service.rb +4 -4
  186. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  187. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  188. data/generated/google/apis/youtubereporting_v1.rb +4 -4
  189. data/generated/google/apis/youtubereporting_v1/classes.rb +93 -93
  190. data/generated/google/apis/youtubereporting_v1/representations.rb +25 -25
  191. data/generated/google/apis/youtubereporting_v1/service.rb +108 -108
  192. data/lib/google/apis/version.rb +1 -1
  193. metadata +34 -30
@@ -47,13 +47,108 @@ module Google
47
47
  super('https://cloudresourcemanager.googleapis.com/', '')
48
48
  end
49
49
 
50
- # Gets the access control policy for an Organization resource. May be empty
51
- # if no such policy or resource exists. The `resource` field should be the
52
- # organization's resource name, e.g. "organizations/123".
50
+ # Sets the IAM access control policy for the specified Project. Replaces
51
+ # any existing policy.
52
+ # The following constraints apply when using `setIamPolicy()`:
53
+ # + Project does not support `allUsers` and `allAuthenticatedUsers` as
54
+ # `members` in a `Binding` of a `Policy`.
55
+ # + The owner role can be granted only to `user` and `serviceAccount`.
56
+ # + Service accounts can be made owners of a project directly
57
+ # without any restrictions. However, to be added as an owner, a user must be
58
+ # invited via Cloud Platform console and must accept the invitation.
59
+ # + A user cannot be granted the owner role using `setIamPolicy()`. The user
60
+ # must be granted the owner role using the Cloud Platform Console and must
61
+ # explicitly accept the invitation.
62
+ # + Invitations to grant the owner role cannot be sent using
63
+ # `setIamPolicy()`;
64
+ # they must be sent only using the Cloud Platform Console.
65
+ # + Membership changes that leave the project without any owners that have
66
+ # accepted the Terms of Service (ToS) will be rejected.
67
+ # + There must be at least one owner who has accepted the Terms of
68
+ # Service (ToS) agreement in the policy. Calling `setIamPolicy()` to
69
+ # to remove the last ToS-accepted owner from the policy will fail. This
70
+ # restriction also applies to legacy projects that no longer have owners
71
+ # who have accepted the ToS. Edits to IAM policies will be rejected until
72
+ # the lack of a ToS-accepting owner is rectified.
73
+ # + Calling this method requires enabling the App Engine Admin API.
74
+ # Note: Removing service accounts from policies or changing their roles
75
+ # can render services completely inoperable. It is important to understand
76
+ # how the service account is being used before removing or updating its
77
+ # roles.
78
+ # @param [String] resource
79
+ # REQUIRED: The resource for which the policy is being specified.
80
+ # See the operation documentation for the appropriate value for this field.
81
+ # @param [Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest] set_iam_policy_request_object
82
+ # @param [String] fields
83
+ # Selector specifying which fields to include in a partial response.
84
+ # @param [String] quota_user
85
+ # Available to use for quota purposes for server-side applications. Can be any
86
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
87
+ # @param [Google::Apis::RequestOptions] options
88
+ # Request-specific options
89
+ #
90
+ # @yield [result, err] Result & error if block supplied
91
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Policy] parsed result object
92
+ # @yieldparam err [StandardError] error object if request failed
93
+ #
94
+ # @return [Google::Apis::CloudresourcemanagerV1::Policy]
95
+ #
96
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
97
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
98
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
99
+ def set_project_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
100
+ command = make_simple_command(:post, 'v1/projects/{resource}:setIamPolicy', options)
101
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest::Representation
102
+ command.request_object = set_iam_policy_request_object
103
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation
104
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Policy
105
+ command.params['resource'] = resource unless resource.nil?
106
+ command.query['fields'] = fields unless fields.nil?
107
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
108
+ execute_or_queue_command(command, &block)
109
+ end
110
+
111
+ # Request that a new Project be created. The result is an Operation which
112
+ # can be used to track the creation process. It is automatically deleted
113
+ # after a few hours, so there is no need to call DeleteOperation.
114
+ # Our SLO permits Project creation to take up to 30 seconds at the 90th
115
+ # percentile. As of 2016-08-29, we are observing 6 seconds 50th percentile
116
+ # latency. 95th percentile latency is around 11 seconds. We recommend
117
+ # polling at the 5th second with an exponential backoff.
118
+ # @param [Google::Apis::CloudresourcemanagerV1::Project] project_object
119
+ # @param [String] fields
120
+ # Selector specifying which fields to include in a partial response.
121
+ # @param [String] quota_user
122
+ # Available to use for quota purposes for server-side applications. Can be any
123
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
124
+ # @param [Google::Apis::RequestOptions] options
125
+ # Request-specific options
126
+ #
127
+ # @yield [result, err] Result & error if block supplied
128
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Operation] parsed result object
129
+ # @yieldparam err [StandardError] error object if request failed
130
+ #
131
+ # @return [Google::Apis::CloudresourcemanagerV1::Operation]
132
+ #
133
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
134
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
135
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
136
+ def create_project(project_object = nil, fields: nil, quota_user: nil, options: nil, &block)
137
+ command = make_simple_command(:post, 'v1/projects', options)
138
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation
139
+ command.request_object = project_object
140
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Operation::Representation
141
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Operation
142
+ command.query['fields'] = fields unless fields.nil?
143
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
144
+ execute_or_queue_command(command, &block)
145
+ end
146
+
147
+ # Returns the IAM access control policy for the specified Project.
148
+ # Permission is denied if the policy or the resource does not exist.
53
149
  # @param [String] resource
54
150
  # REQUIRED: The resource for which the policy is being requested.
55
- # `resource` is usually specified as a path. For example, a Project
56
- # resource is specified as `projects/`project``.
151
+ # See the operation documentation for the appropriate value for this field.
57
152
  # @param [Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest] get_iam_policy_request_object
58
153
  # @param [String] fields
59
154
  # Selector specifying which fields to include in a partial response.
@@ -72,8 +167,8 @@ module Google
72
167
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
73
168
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
74
169
  # @raise [Google::Apis::AuthorizationError] Authorization is required
75
- def get_organization_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
76
- command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options)
170
+ def get_project_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
171
+ command = make_simple_command(:post, 'v1/projects/{resource}:getIamPolicy', options)
77
172
  command.request_representation = Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest::Representation
78
173
  command.request_object = get_iam_policy_request_object
79
174
  command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation
@@ -84,11 +179,12 @@ module Google
84
179
  execute_or_queue_command(command, &block)
85
180
  end
86
181
 
87
- # Searches Organization resources that are visible to the user and satisfy
88
- # the specified filter. This method returns Organizations in an unspecified
89
- # order. New Organizations do not necessarily appear at the end of the
90
- # results.
91
- # @param [Google::Apis::CloudresourcemanagerV1::SearchOrganizationsRequest] search_organizations_request_object
182
+ # Retrieves the Project identified by the specified
183
+ # `project_id` (for example, `my-project-123`).
184
+ # The caller must have read permissions for this Project.
185
+ # @param [String] project_id
186
+ # The Project ID (for example, `my-project-123`).
187
+ # Required.
92
188
  # @param [String] fields
93
189
  # Selector specifying which fields to include in a partial response.
94
190
  # @param [String] quota_user
@@ -98,28 +194,34 @@ module Google
98
194
  # Request-specific options
99
195
  #
100
196
  # @yield [result, err] Result & error if block supplied
101
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse] parsed result object
197
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Project] parsed result object
102
198
  # @yieldparam err [StandardError] error object if request failed
103
199
  #
104
- # @return [Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse]
200
+ # @return [Google::Apis::CloudresourcemanagerV1::Project]
105
201
  #
106
202
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
107
203
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
108
204
  # @raise [Google::Apis::AuthorizationError] Authorization is required
109
- def search_organizations(search_organizations_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
110
- command = make_simple_command(:post, 'v1/organizations:search', options)
111
- command.request_representation = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsRequest::Representation
112
- command.request_object = search_organizations_request_object
113
- command.response_representation = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse::Representation
114
- command.response_class = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse
205
+ def get_project(project_id, fields: nil, quota_user: nil, options: nil, &block)
206
+ command = make_simple_command(:get, 'v1/projects/{projectId}', options)
207
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation
208
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Project
209
+ command.params['projectId'] = project_id unless project_id.nil?
115
210
  command.query['fields'] = fields unless fields.nil?
116
211
  command.query['quotaUser'] = quota_user unless quota_user.nil?
117
212
  execute_or_queue_command(command, &block)
118
213
  end
119
214
 
120
- # Fetches an Organization resource identified by the specified resource name.
121
- # @param [String] name
122
- # The resource name of the Organization to fetch, e.g. "organizations/1234".
215
+ # Restores the Project identified by the specified
216
+ # `project_id` (for example, `my-project-123`).
217
+ # You can only use this method for a Project that has a lifecycle state of
218
+ # DELETE_REQUESTED.
219
+ # After deletion starts, the Project cannot be restored.
220
+ # The caller must have modify permissions for this Project.
221
+ # @param [String] project_id
222
+ # The project ID (for example, `foo-bar-123`).
223
+ # Required.
224
+ # @param [Google::Apis::CloudresourcemanagerV1::UndeleteProjectRequest] undelete_project_request_object
123
225
  # @param [String] fields
124
226
  # Selector specifying which fields to include in a partial response.
125
227
  # @param [String] quota_user
@@ -129,32 +231,33 @@ module Google
129
231
  # Request-specific options
130
232
  #
131
233
  # @yield [result, err] Result & error if block supplied
132
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Organization] parsed result object
234
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Empty] parsed result object
133
235
  # @yieldparam err [StandardError] error object if request failed
134
236
  #
135
- # @return [Google::Apis::CloudresourcemanagerV1::Organization]
237
+ # @return [Google::Apis::CloudresourcemanagerV1::Empty]
136
238
  #
137
239
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
138
240
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
139
241
  # @raise [Google::Apis::AuthorizationError] Authorization is required
140
- def get_organization(name, fields: nil, quota_user: nil, options: nil, &block)
141
- command = make_simple_command(:get, 'v1/{+name}', options)
142
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Organization::Representation
143
- command.response_class = Google::Apis::CloudresourcemanagerV1::Organization
144
- command.params['name'] = name unless name.nil?
242
+ def undelete_project(project_id, undelete_project_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
243
+ command = make_simple_command(:post, 'v1/projects/{projectId}:undelete', options)
244
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::UndeleteProjectRequest::Representation
245
+ command.request_object = undelete_project_request_object
246
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation
247
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Empty
248
+ command.params['projectId'] = project_id unless project_id.nil?
145
249
  command.query['fields'] = fields unless fields.nil?
146
250
  command.query['quotaUser'] = quota_user unless quota_user.nil?
147
251
  execute_or_queue_command(command, &block)
148
252
  end
149
253
 
150
- # Sets the access control policy on an Organization resource. Replaces any
151
- # existing policy. The `resource` field should be the organization's resource
152
- # name, e.g. "organizations/123".
153
- # @param [String] resource
154
- # REQUIRED: The resource for which the policy is being specified.
155
- # `resource` is usually specified as a path. For example, a Project
156
- # resource is specified as `projects/`project``.
157
- # @param [Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest] set_iam_policy_request_object
254
+ # Updates the attributes of the Project identified by the specified
255
+ # `project_id` (for example, `my-project-123`).
256
+ # The caller must have modify permissions for this Project.
257
+ # @param [String] project_id
258
+ # The project ID (for example, `my-project-123`).
259
+ # Required.
260
+ # @param [Google::Apis::CloudresourcemanagerV1::Project] project_object
158
261
  # @param [String] fields
159
262
  # Selector specifying which fields to include in a partial response.
160
263
  # @param [String] quota_user
@@ -164,34 +267,33 @@ module Google
164
267
  # Request-specific options
165
268
  #
166
269
  # @yield [result, err] Result & error if block supplied
167
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Policy] parsed result object
270
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Project] parsed result object
168
271
  # @yieldparam err [StandardError] error object if request failed
169
272
  #
170
- # @return [Google::Apis::CloudresourcemanagerV1::Policy]
273
+ # @return [Google::Apis::CloudresourcemanagerV1::Project]
171
274
  #
172
275
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
173
276
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
174
277
  # @raise [Google::Apis::AuthorizationError] Authorization is required
175
- def set_organization_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
176
- command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
177
- command.request_representation = Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest::Representation
178
- command.request_object = set_iam_policy_request_object
179
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation
180
- command.response_class = Google::Apis::CloudresourcemanagerV1::Policy
181
- command.params['resource'] = resource unless resource.nil?
278
+ def update_project(project_id, project_object = nil, fields: nil, quota_user: nil, options: nil, &block)
279
+ command = make_simple_command(:put, 'v1/projects/{projectId}', options)
280
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation
281
+ command.request_object = project_object
282
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation
283
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Project
284
+ command.params['projectId'] = project_id unless project_id.nil?
182
285
  command.query['fields'] = fields unless fields.nil?
183
286
  command.query['quotaUser'] = quota_user unless quota_user.nil?
184
287
  execute_or_queue_command(command, &block)
185
288
  end
186
289
 
187
- # Returns permissions that a caller has on the specified Organization.
188
- # The `resource` field should be the organization's resource name,
189
- # e.g. "organizations/123".
190
- # @param [String] resource
191
- # REQUIRED: The resource for which the policy detail is being requested.
192
- # `resource` is usually specified as a path. For example, a Project
193
- # resource is specified as `projects/`project``.
194
- # @param [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest] test_iam_permissions_request_object
290
+ # Gets a list of ancestors in the resource hierarchy for the Project
291
+ # identified by the specified `project_id` (for example, `my-project-123`).
292
+ # The caller must have read permissions for this Project.
293
+ # @param [String] project_id
294
+ # The Project ID (for example, `my-project-123`).
295
+ # Required.
296
+ # @param [Google::Apis::CloudresourcemanagerV1::GetAncestryRequest] get_ancestry_request_object
195
297
  # @param [String] fields
196
298
  # Selector specifying which fields to include in a partial response.
197
299
  # @param [String] quota_user
@@ -201,31 +303,31 @@ module Google
201
303
  # Request-specific options
202
304
  #
203
305
  # @yield [result, err] Result & error if block supplied
204
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse] parsed result object
306
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::GetAncestryResponse] parsed result object
205
307
  # @yieldparam err [StandardError] error object if request failed
206
308
  #
207
- # @return [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse]
309
+ # @return [Google::Apis::CloudresourcemanagerV1::GetAncestryResponse]
208
310
  #
209
311
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
210
312
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
211
313
  # @raise [Google::Apis::AuthorizationError] Authorization is required
212
- def test_organization_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
213
- command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
214
- command.request_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest::Representation
215
- command.request_object = test_iam_permissions_request_object
216
- command.response_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse::Representation
217
- command.response_class = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse
218
- command.params['resource'] = resource unless resource.nil?
314
+ def get_project_ancestry(project_id, get_ancestry_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
315
+ command = make_simple_command(:post, 'v1/projects/{projectId}:getAncestry', options)
316
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::GetAncestryRequest::Representation
317
+ command.request_object = get_ancestry_request_object
318
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::GetAncestryResponse::Representation
319
+ command.response_class = Google::Apis::CloudresourcemanagerV1::GetAncestryResponse
320
+ command.params['projectId'] = project_id unless project_id.nil?
219
321
  command.query['fields'] = fields unless fields.nil?
220
322
  command.query['quotaUser'] = quota_user unless quota_user.nil?
221
323
  execute_or_queue_command(command, &block)
222
324
  end
223
325
 
224
- # Gets the latest state of a long-running operation. Clients can use this
225
- # method to poll the operation result at intervals as recommended by the API
226
- # service.
227
- # @param [String] name
228
- # The name of the operation resource.
326
+ # Returns permissions that a caller has on the specified Project.
327
+ # @param [String] resource
328
+ # REQUIRED: The resource for which the policy detail is being requested.
329
+ # See the operation documentation for the appropriate value for this field.
330
+ # @param [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest] test_iam_permissions_request_object
229
331
  # @param [String] fields
230
332
  # Selector specifying which fields to include in a partial response.
231
333
  # @param [String] quota_user
@@ -235,32 +337,48 @@ module Google
235
337
  # Request-specific options
236
338
  #
237
339
  # @yield [result, err] Result & error if block supplied
238
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Operation] parsed result object
340
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse] parsed result object
239
341
  # @yieldparam err [StandardError] error object if request failed
240
342
  #
241
- # @return [Google::Apis::CloudresourcemanagerV1::Operation]
343
+ # @return [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse]
242
344
  #
243
345
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
244
346
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
245
347
  # @raise [Google::Apis::AuthorizationError] Authorization is required
246
- def get_operation(name, fields: nil, quota_user: nil, options: nil, &block)
247
- command = make_simple_command(:get, 'v1/{+name}', options)
248
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Operation::Representation
249
- command.response_class = Google::Apis::CloudresourcemanagerV1::Operation
250
- command.params['name'] = name unless name.nil?
348
+ def test_project_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
349
+ command = make_simple_command(:post, 'v1/projects/{resource}:testIamPermissions', options)
350
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest::Representation
351
+ command.request_object = test_iam_permissions_request_object
352
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse::Representation
353
+ command.response_class = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse
354
+ command.params['resource'] = resource unless resource.nil?
251
355
  command.query['fields'] = fields unless fields.nil?
252
356
  command.query['quotaUser'] = quota_user unless quota_user.nil?
253
357
  execute_or_queue_command(command, &block)
254
358
  end
255
359
 
256
- # Request that a new Project be created. The result is an Operation which
257
- # can be used to track the creation process. It is automatically deleted
258
- # after a few hours, so there is no need to call DeleteOperation.
259
- # Our SLO permits Project creation to take up to 30 seconds at the 90th
260
- # percentile. As of 2016-08-29, we are observing 6 seconds 50th percentile
261
- # latency. 95th percentile latency is around 11 seconds. We recommend
262
- # polling at the 5th second with an exponential backoff.
263
- # @param [Google::Apis::CloudresourcemanagerV1::Project] project_object
360
+ # Marks the Project identified by the specified
361
+ # `project_id` (for example, `my-project-123`) for deletion.
362
+ # This method will only affect the Project if the following criteria are met:
363
+ # + The Project does not have a billing account associated with it.
364
+ # + The Project has a lifecycle state of
365
+ # ACTIVE.
366
+ # This method changes the Project's lifecycle state from
367
+ # ACTIVE
368
+ # to DELETE_REQUESTED.
369
+ # The deletion starts at an unspecified time,
370
+ # at which point the Project is no longer accessible.
371
+ # Until the deletion completes, you can check the lifecycle state
372
+ # checked by retrieving the Project with GetProject,
373
+ # and the Project remains visible to ListProjects.
374
+ # However, you cannot update the project.
375
+ # After the deletion completes, the Project is not retrievable by
376
+ # the GetProject and
377
+ # ListProjects methods.
378
+ # The caller must have modify permissions for this Project.
379
+ # @param [String] project_id
380
+ # The Project ID (for example, `foo-bar-123`).
381
+ # Required.
264
382
  # @param [String] fields
265
383
  # Selector specifying which fields to include in a partial response.
266
384
  # @param [String] quota_user
@@ -270,58 +388,54 @@ module Google
270
388
  # Request-specific options
271
389
  #
272
390
  # @yield [result, err] Result & error if block supplied
273
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Operation] parsed result object
391
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Empty] parsed result object
274
392
  # @yieldparam err [StandardError] error object if request failed
275
393
  #
276
- # @return [Google::Apis::CloudresourcemanagerV1::Operation]
394
+ # @return [Google::Apis::CloudresourcemanagerV1::Empty]
277
395
  #
278
396
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
279
397
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
280
398
  # @raise [Google::Apis::AuthorizationError] Authorization is required
281
- def create_project(project_object = nil, fields: nil, quota_user: nil, options: nil, &block)
282
- command = make_simple_command(:post, 'v1/projects', options)
283
- command.request_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation
284
- command.request_object = project_object
285
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Operation::Representation
286
- command.response_class = Google::Apis::CloudresourcemanagerV1::Operation
399
+ def delete_project(project_id, fields: nil, quota_user: nil, options: nil, &block)
400
+ command = make_simple_command(:delete, 'v1/projects/{projectId}', options)
401
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation
402
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Empty
403
+ command.params['projectId'] = project_id unless project_id.nil?
287
404
  command.query['fields'] = fields unless fields.nil?
288
405
  command.query['quotaUser'] = quota_user unless quota_user.nil?
289
406
  execute_or_queue_command(command, &block)
290
407
  end
291
408
 
292
- # Sets the IAM access control policy for the specified Project. Replaces
293
- # any existing policy.
294
- # The following constraints apply when using `setIamPolicy()`:
295
- # + Project does not support `allUsers` and `allAuthenticatedUsers` as
296
- # `members` in a `Binding` of a `Policy`.
297
- # + The owner role can be granted only to `user` and `serviceAccount`.
298
- # + Service accounts can be made owners of a project directly
299
- # without any restrictions. However, to be added as an owner, a user must be
300
- # invited via Cloud Platform console and must accept the invitation.
301
- # + A user cannot be granted the owner role using `setIamPolicy()`. The user
302
- # must be granted the owner role using the Cloud Platform Console and must
303
- # explicitly accept the invitation.
304
- # + Invitations to grant the owner role cannot be sent using
305
- # `setIamPolicy()`;
306
- # they must be sent only using the Cloud Platform Console.
307
- # + Membership changes that leave the project without any owners that have
308
- # accepted the Terms of Service (ToS) will be rejected.
309
- # + There must be at least one owner who has accepted the Terms of
310
- # Service (ToS) agreement in the policy. Calling `setIamPolicy()` to
311
- # to remove the last ToS-accepted owner from the policy will fail. This
312
- # restriction also applies to legacy projects that no longer have owners
313
- # who have accepted the ToS. Edits to IAM policies will be rejected until
314
- # the lack of a ToS-accepting owner is rectified.
315
- # + Calling this method requires enabling the App Engine Admin API.
316
- # Note: Removing service accounts from policies or changing their roles
317
- # can render services completely inoperable. It is important to understand
318
- # how the service account is being used before removing or updating its
319
- # roles.
320
- # @param [String] resource
321
- # REQUIRED: The resource for which the policy is being specified.
322
- # `resource` is usually specified as a path. For example, a Project
323
- # resource is specified as `projects/`project``.
324
- # @param [Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest] set_iam_policy_request_object
409
+ # Lists Projects that are visible to the user and satisfy the
410
+ # specified filter. This method returns Projects in an unspecified order.
411
+ # New Projects do not necessarily appear at the end of the list.
412
+ # @param [String] page_token
413
+ # A pagination token returned from a previous call to ListProjects
414
+ # that indicates from where listing should continue.
415
+ # Optional.
416
+ # @param [Fixnum] page_size
417
+ # The maximum number of Projects to return in the response.
418
+ # The server can return fewer Projects than requested.
419
+ # If unspecified, server picks an appropriate default.
420
+ # Optional.
421
+ # @param [String] filter
422
+ # An expression for filtering the results of the request. Filter rules are
423
+ # case insensitive. The fields eligible for filtering are:
424
+ # + `name`
425
+ # + `id`
426
+ # + <code>labels.<em>key</em></code> where *key* is the name of a label
427
+ # Some examples of using labels as filters:
428
+ # |Filter|Description|
429
+ # |------|-----------|
430
+ # |name:*|The project has a name.|
431
+ # |name:Howl|The project's name is `Howl` or `howl`.|
432
+ # |name:HOWL|Equivalent to above.|
433
+ # |NAME:howl|Equivalent to above.|
434
+ # |labels.color:*|The project has the label `color`.|
435
+ # |labels.color:red|The project's label `color` has the value `red`.|
436
+ # |labels.color:red&nbsp;label.size:big|The project's label `color` has the
437
+ # value `red` and its label `size` has the value `big`.
438
+ # Optional.
325
439
  # @param [String] fields
326
440
  # Selector specifying which fields to include in a partial response.
327
441
  # @param [String] quota_user
@@ -331,32 +445,32 @@ module Google
331
445
  # Request-specific options
332
446
  #
333
447
  # @yield [result, err] Result & error if block supplied
334
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Policy] parsed result object
448
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListProjectsResponse] parsed result object
335
449
  # @yieldparam err [StandardError] error object if request failed
336
450
  #
337
- # @return [Google::Apis::CloudresourcemanagerV1::Policy]
451
+ # @return [Google::Apis::CloudresourcemanagerV1::ListProjectsResponse]
338
452
  #
339
453
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
340
454
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
341
455
  # @raise [Google::Apis::AuthorizationError] Authorization is required
342
- def set_project_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
343
- command = make_simple_command(:post, 'v1/projects/{resource}:setIamPolicy', options)
344
- command.request_representation = Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest::Representation
345
- command.request_object = set_iam_policy_request_object
346
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation
347
- command.response_class = Google::Apis::CloudresourcemanagerV1::Policy
348
- command.params['resource'] = resource unless resource.nil?
456
+ def list_projects(page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
457
+ command = make_simple_command(:get, 'v1/projects', options)
458
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::ListProjectsResponse::Representation
459
+ command.response_class = Google::Apis::CloudresourcemanagerV1::ListProjectsResponse
460
+ command.query['pageToken'] = page_token unless page_token.nil?
461
+ command.query['pageSize'] = page_size unless page_size.nil?
462
+ command.query['filter'] = filter unless filter.nil?
349
463
  command.query['fields'] = fields unless fields.nil?
350
464
  command.query['quotaUser'] = quota_user unless quota_user.nil?
351
465
  execute_or_queue_command(command, &block)
352
466
  end
353
467
 
354
- # Returns the IAM access control policy for the specified Project.
355
- # Permission is denied if the policy or the resource does not exist.
468
+ # Gets the access control policy for an Organization resource. May be empty
469
+ # if no such policy or resource exists. The `resource` field should be the
470
+ # organization's resource name, e.g. "organizations/123".
356
471
  # @param [String] resource
357
472
  # REQUIRED: The resource for which the policy is being requested.
358
- # `resource` is usually specified as a path. For example, a Project
359
- # resource is specified as `projects/`project``.
473
+ # See the operation documentation for the appropriate value for this field.
360
474
  # @param [Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest] get_iam_policy_request_object
361
475
  # @param [String] fields
362
476
  # Selector specifying which fields to include in a partial response.
@@ -375,8 +489,8 @@ module Google
375
489
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
376
490
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
377
491
  # @raise [Google::Apis::AuthorizationError] Authorization is required
378
- def get_project_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
379
- command = make_simple_command(:post, 'v1/projects/{resource}:getIamPolicy', options)
492
+ def get_organization_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
493
+ command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options)
380
494
  command.request_representation = Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest::Representation
381
495
  command.request_object = get_iam_policy_request_object
382
496
  command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation
@@ -387,12 +501,11 @@ module Google
387
501
  execute_or_queue_command(command, &block)
388
502
  end
389
503
 
390
- # Retrieves the Project identified by the specified
391
- # `project_id` (for example, `my-project-123`).
392
- # The caller must have read permissions for this Project.
393
- # @param [String] project_id
394
- # The Project ID (for example, `my-project-123`).
395
- # Required.
504
+ # Searches Organization resources that are visible to the user and satisfy
505
+ # the specified filter. This method returns Organizations in an unspecified
506
+ # order. New Organizations do not necessarily appear at the end of the
507
+ # results.
508
+ # @param [Google::Apis::CloudresourcemanagerV1::SearchOrganizationsRequest] search_organizations_request_object
396
509
  # @param [String] fields
397
510
  # Selector specifying which fields to include in a partial response.
398
511
  # @param [String] quota_user
@@ -402,34 +515,28 @@ module Google
402
515
  # Request-specific options
403
516
  #
404
517
  # @yield [result, err] Result & error if block supplied
405
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Project] parsed result object
518
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse] parsed result object
406
519
  # @yieldparam err [StandardError] error object if request failed
407
520
  #
408
- # @return [Google::Apis::CloudresourcemanagerV1::Project]
521
+ # @return [Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse]
409
522
  #
410
523
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
411
524
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
412
525
  # @raise [Google::Apis::AuthorizationError] Authorization is required
413
- def get_project(project_id, fields: nil, quota_user: nil, options: nil, &block)
414
- command = make_simple_command(:get, 'v1/projects/{projectId}', options)
415
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation
416
- command.response_class = Google::Apis::CloudresourcemanagerV1::Project
417
- command.params['projectId'] = project_id unless project_id.nil?
526
+ def search_organizations(search_organizations_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
527
+ command = make_simple_command(:post, 'v1/organizations:search', options)
528
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsRequest::Representation
529
+ command.request_object = search_organizations_request_object
530
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse::Representation
531
+ command.response_class = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse
418
532
  command.query['fields'] = fields unless fields.nil?
419
533
  command.query['quotaUser'] = quota_user unless quota_user.nil?
420
534
  execute_or_queue_command(command, &block)
421
535
  end
422
536
 
423
- # Restores the Project identified by the specified
424
- # `project_id` (for example, `my-project-123`).
425
- # You can only use this method for a Project that has a lifecycle state of
426
- # DELETE_REQUESTED.
427
- # After deletion starts, the Project cannot be restored.
428
- # The caller must have modify permissions for this Project.
429
- # @param [String] project_id
430
- # The project ID (for example, `foo-bar-123`).
431
- # Required.
432
- # @param [Google::Apis::CloudresourcemanagerV1::UndeleteProjectRequest] undelete_project_request_object
537
+ # Fetches an Organization resource identified by the specified resource name.
538
+ # @param [String] name
539
+ # The resource name of the Organization to fetch, e.g. "organizations/1234".
433
540
  # @param [String] fields
434
541
  # Selector specifying which fields to include in a partial response.
435
542
  # @param [String] quota_user
@@ -439,33 +546,31 @@ module Google
439
546
  # Request-specific options
440
547
  #
441
548
  # @yield [result, err] Result & error if block supplied
442
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Empty] parsed result object
549
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Organization] parsed result object
443
550
  # @yieldparam err [StandardError] error object if request failed
444
551
  #
445
- # @return [Google::Apis::CloudresourcemanagerV1::Empty]
552
+ # @return [Google::Apis::CloudresourcemanagerV1::Organization]
446
553
  #
447
554
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
448
555
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
449
556
  # @raise [Google::Apis::AuthorizationError] Authorization is required
450
- def undelete_project(project_id, undelete_project_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
451
- command = make_simple_command(:post, 'v1/projects/{projectId}:undelete', options)
452
- command.request_representation = Google::Apis::CloudresourcemanagerV1::UndeleteProjectRequest::Representation
453
- command.request_object = undelete_project_request_object
454
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation
455
- command.response_class = Google::Apis::CloudresourcemanagerV1::Empty
456
- command.params['projectId'] = project_id unless project_id.nil?
557
+ def get_organization(name, fields: nil, quota_user: nil, options: nil, &block)
558
+ command = make_simple_command(:get, 'v1/{+name}', options)
559
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Organization::Representation
560
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Organization
561
+ command.params['name'] = name unless name.nil?
457
562
  command.query['fields'] = fields unless fields.nil?
458
563
  command.query['quotaUser'] = quota_user unless quota_user.nil?
459
564
  execute_or_queue_command(command, &block)
460
565
  end
461
566
 
462
- # Gets a list of ancestors in the resource hierarchy for the Project
463
- # identified by the specified `project_id` (for example, `my-project-123`).
464
- # The caller must have read permissions for this Project.
465
- # @param [String] project_id
466
- # The Project ID (for example, `my-project-123`).
467
- # Required.
468
- # @param [Google::Apis::CloudresourcemanagerV1::GetAncestryRequest] get_ancestry_request_object
567
+ # Sets the access control policy on an Organization resource. Replaces any
568
+ # existing policy. The `resource` field should be the organization's resource
569
+ # name, e.g. "organizations/123".
570
+ # @param [String] resource
571
+ # REQUIRED: The resource for which the policy is being specified.
572
+ # See the operation documentation for the appropriate value for this field.
573
+ # @param [Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest] set_iam_policy_request_object
469
574
  # @param [String] fields
470
575
  # Selector specifying which fields to include in a partial response.
471
576
  # @param [String] quota_user
@@ -475,33 +580,33 @@ module Google
475
580
  # Request-specific options
476
581
  #
477
582
  # @yield [result, err] Result & error if block supplied
478
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::GetAncestryResponse] parsed result object
583
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Policy] parsed result object
479
584
  # @yieldparam err [StandardError] error object if request failed
480
585
  #
481
- # @return [Google::Apis::CloudresourcemanagerV1::GetAncestryResponse]
586
+ # @return [Google::Apis::CloudresourcemanagerV1::Policy]
482
587
  #
483
588
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
484
589
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
485
590
  # @raise [Google::Apis::AuthorizationError] Authorization is required
486
- def get_project_ancestry(project_id, get_ancestry_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
487
- command = make_simple_command(:post, 'v1/projects/{projectId}:getAncestry', options)
488
- command.request_representation = Google::Apis::CloudresourcemanagerV1::GetAncestryRequest::Representation
489
- command.request_object = get_ancestry_request_object
490
- command.response_representation = Google::Apis::CloudresourcemanagerV1::GetAncestryResponse::Representation
491
- command.response_class = Google::Apis::CloudresourcemanagerV1::GetAncestryResponse
492
- command.params['projectId'] = project_id unless project_id.nil?
591
+ def set_organization_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
592
+ command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
593
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest::Representation
594
+ command.request_object = set_iam_policy_request_object
595
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation
596
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Policy
597
+ command.params['resource'] = resource unless resource.nil?
493
598
  command.query['fields'] = fields unless fields.nil?
494
599
  command.query['quotaUser'] = quota_user unless quota_user.nil?
495
600
  execute_or_queue_command(command, &block)
496
601
  end
497
602
 
498
- # Updates the attributes of the Project identified by the specified
499
- # `project_id` (for example, `my-project-123`).
500
- # The caller must have modify permissions for this Project.
501
- # @param [String] project_id
502
- # The project ID (for example, `my-project-123`).
503
- # Required.
504
- # @param [Google::Apis::CloudresourcemanagerV1::Project] project_object
603
+ # Returns permissions that a caller has on the specified Organization.
604
+ # The `resource` field should be the organization's resource name,
605
+ # e.g. "organizations/123".
606
+ # @param [String] resource
607
+ # REQUIRED: The resource for which the policy detail is being requested.
608
+ # See the operation documentation for the appropriate value for this field.
609
+ # @param [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest] test_iam_permissions_request_object
505
610
  # @param [String] fields
506
611
  # Selector specifying which fields to include in a partial response.
507
612
  # @param [String] quota_user
@@ -511,32 +616,32 @@ module Google
511
616
  # Request-specific options
512
617
  #
513
618
  # @yield [result, err] Result & error if block supplied
514
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Project] parsed result object
619
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse] parsed result object
515
620
  # @yieldparam err [StandardError] error object if request failed
516
621
  #
517
- # @return [Google::Apis::CloudresourcemanagerV1::Project]
622
+ # @return [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse]
518
623
  #
519
624
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
520
625
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
521
626
  # @raise [Google::Apis::AuthorizationError] Authorization is required
522
- def update_project(project_id, project_object = nil, fields: nil, quota_user: nil, options: nil, &block)
523
- command = make_simple_command(:put, 'v1/projects/{projectId}', options)
524
- command.request_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation
525
- command.request_object = project_object
526
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation
527
- command.response_class = Google::Apis::CloudresourcemanagerV1::Project
528
- command.params['projectId'] = project_id unless project_id.nil?
627
+ def test_organization_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
628
+ command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
629
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest::Representation
630
+ command.request_object = test_iam_permissions_request_object
631
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse::Representation
632
+ command.response_class = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse
633
+ command.params['resource'] = resource unless resource.nil?
529
634
  command.query['fields'] = fields unless fields.nil?
530
635
  command.query['quotaUser'] = quota_user unless quota_user.nil?
531
636
  execute_or_queue_command(command, &block)
532
637
  end
533
638
 
534
- # Returns permissions that a caller has on the specified Project.
535
- # @param [String] resource
536
- # REQUIRED: The resource for which the policy detail is being requested.
537
- # `resource` is usually specified as a path. For example, a Project
538
- # resource is specified as `projects/`project``.
539
- # @param [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest] test_iam_permissions_request_object
639
+ # Create a Lien which applies to the resource denoted by the `parent` field.
640
+ # Callers of this method will require permission on the `parent` resource.
641
+ # For example, applying to `projects/1234` requires permission
642
+ # `resourcemanager.projects.updateLiens`.
643
+ # NOTE: Some resources may limit the number of Liens which may be applied.
644
+ # @param [Google::Apis::CloudresourcemanagerV1::Lien] lien_object
540
645
  # @param [String] fields
541
646
  # Selector specifying which fields to include in a partial response.
542
647
  # @param [String] quota_user
@@ -546,48 +651,31 @@ module Google
546
651
  # Request-specific options
547
652
  #
548
653
  # @yield [result, err] Result & error if block supplied
549
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse] parsed result object
654
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Lien] parsed result object
550
655
  # @yieldparam err [StandardError] error object if request failed
551
656
  #
552
- # @return [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse]
657
+ # @return [Google::Apis::CloudresourcemanagerV1::Lien]
553
658
  #
554
659
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
555
660
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
556
661
  # @raise [Google::Apis::AuthorizationError] Authorization is required
557
- def test_project_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
558
- command = make_simple_command(:post, 'v1/projects/{resource}:testIamPermissions', options)
559
- command.request_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest::Representation
560
- command.request_object = test_iam_permissions_request_object
561
- command.response_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse::Representation
562
- command.response_class = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse
563
- command.params['resource'] = resource unless resource.nil?
662
+ def create_lien(lien_object = nil, fields: nil, quota_user: nil, options: nil, &block)
663
+ command = make_simple_command(:post, 'v1/liens', options)
664
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::Lien::Representation
665
+ command.request_object = lien_object
666
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Lien::Representation
667
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Lien
564
668
  command.query['fields'] = fields unless fields.nil?
565
669
  command.query['quotaUser'] = quota_user unless quota_user.nil?
566
670
  execute_or_queue_command(command, &block)
567
671
  end
568
672
 
569
- # Marks the Project identified by the specified
570
- # `project_id` (for example, `my-project-123`) for deletion.
571
- # This method will only affect the Project if the following criteria are met:
572
- # + The Project does not have a billing account associated with it.
573
- # + The Project has a lifecycle state of
574
- # ACTIVE.
575
- # This method changes the Project's lifecycle state from
576
- # ACTIVE
577
- # to DELETE_REQUESTED.
578
- # The deletion starts at an unspecified time,
579
- # at which point the Project is no longer accessible.
580
- # Until the deletion completes, you can check the lifecycle state
581
- # checked by retrieving the Project with GetProject,
582
- # and the Project remains visible to ListProjects.
583
- # However, you cannot update the project.
584
- # After the deletion completes, the Project is not retrievable by
585
- # the GetProject and
586
- # ListProjects methods.
587
- # The caller must have modify permissions for this Project.
588
- # @param [String] project_id
589
- # The Project ID (for example, `foo-bar-123`).
590
- # Required.
673
+ # Delete a Lien by `name`.
674
+ # Callers of this method will require permission on the `parent` resource.
675
+ # For example, a Lien with a `parent` of `projects/1234` requires permission
676
+ # `resourcemanager.projects.updateLiens`.
677
+ # @param [String] name
678
+ # The name/identifier of the Lien to delete.
591
679
  # @param [String] fields
592
680
  # Selector specifying which fields to include in a partial response.
593
681
  # @param [String] quota_user
@@ -605,46 +693,27 @@ module Google
605
693
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
606
694
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
607
695
  # @raise [Google::Apis::AuthorizationError] Authorization is required
608
- def delete_project(project_id, fields: nil, quota_user: nil, options: nil, &block)
609
- command = make_simple_command(:delete, 'v1/projects/{projectId}', options)
696
+ def delete_lien(name, fields: nil, quota_user: nil, options: nil, &block)
697
+ command = make_simple_command(:delete, 'v1/{+name}', options)
610
698
  command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation
611
699
  command.response_class = Google::Apis::CloudresourcemanagerV1::Empty
612
- command.params['projectId'] = project_id unless project_id.nil?
700
+ command.params['name'] = name unless name.nil?
613
701
  command.query['fields'] = fields unless fields.nil?
614
702
  command.query['quotaUser'] = quota_user unless quota_user.nil?
615
703
  execute_or_queue_command(command, &block)
616
704
  end
617
705
 
618
- # Lists Projects that are visible to the user and satisfy the
619
- # specified filter. This method returns Projects in an unspecified order.
620
- # New Projects do not necessarily appear at the end of the list.
621
- # @param [String] filter
622
- # An expression for filtering the results of the request. Filter rules are
623
- # case insensitive. The fields eligible for filtering are:
624
- # + `name`
625
- # + `id`
626
- # + <code>labels.<em>key</em></code> where *key* is the name of a label
627
- # Some examples of using labels as filters:
628
- # |Filter|Description|
629
- # |------|-----------|
630
- # |name:*|The project has a name.|
631
- # |name:Howl|The project's name is `Howl` or `howl`.|
632
- # |name:HOWL|Equivalent to above.|
633
- # |NAME:howl|Equivalent to above.|
634
- # |labels.color:*|The project has the label `color`.|
635
- # |labels.color:red|The project's label `color` has the value `red`.|
636
- # |labels.color:red&nbsp;label.size:big|The project's label `color` has the
637
- # value `red` and its label `size` has the value `big`.
638
- # Optional.
706
+ # List all Liens applied to the `parent` resource.
707
+ # Callers of this method will require permission on the `parent` resource.
708
+ # For example, a Lien with a `parent` of `projects/1234` requires permission
709
+ # `resourcemanager.projects.get`.
639
710
  # @param [String] page_token
640
- # A pagination token returned from a previous call to ListProjects
641
- # that indicates from where listing should continue.
642
- # Optional.
711
+ # The `next_page_token` value returned from a previous List request, if any.
643
712
  # @param [Fixnum] page_size
644
- # The maximum number of Projects to return in the response.
645
- # The server can return fewer Projects than requested.
646
- # If unspecified, server picks an appropriate default.
647
- # Optional.
713
+ # The maximum number of items to return. This is a suggestion for the server.
714
+ # @param [String] parent
715
+ # The name of the resource to list all attached Liens.
716
+ # For example, `projects/1234`.
648
717
  # @param [String] fields
649
718
  # Selector specifying which fields to include in a partial response.
650
719
  # @param [String] quota_user
@@ -654,21 +723,53 @@ module Google
654
723
  # Request-specific options
655
724
  #
656
725
  # @yield [result, err] Result & error if block supplied
657
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListProjectsResponse] parsed result object
726
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListLiensResponse] parsed result object
658
727
  # @yieldparam err [StandardError] error object if request failed
659
728
  #
660
- # @return [Google::Apis::CloudresourcemanagerV1::ListProjectsResponse]
729
+ # @return [Google::Apis::CloudresourcemanagerV1::ListLiensResponse]
661
730
  #
662
731
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
663
732
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
664
733
  # @raise [Google::Apis::AuthorizationError] Authorization is required
665
- def list_projects(filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
666
- command = make_simple_command(:get, 'v1/projects', options)
667
- command.response_representation = Google::Apis::CloudresourcemanagerV1::ListProjectsResponse::Representation
668
- command.response_class = Google::Apis::CloudresourcemanagerV1::ListProjectsResponse
669
- command.query['filter'] = filter unless filter.nil?
734
+ def list_liens(page_token: nil, page_size: nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
735
+ command = make_simple_command(:get, 'v1/liens', options)
736
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::ListLiensResponse::Representation
737
+ command.response_class = Google::Apis::CloudresourcemanagerV1::ListLiensResponse
670
738
  command.query['pageToken'] = page_token unless page_token.nil?
671
739
  command.query['pageSize'] = page_size unless page_size.nil?
740
+ command.query['parent'] = parent unless parent.nil?
741
+ command.query['fields'] = fields unless fields.nil?
742
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
743
+ execute_or_queue_command(command, &block)
744
+ end
745
+
746
+ # Gets the latest state of a long-running operation. Clients can use this
747
+ # method to poll the operation result at intervals as recommended by the API
748
+ # service.
749
+ # @param [String] name
750
+ # The name of the operation resource.
751
+ # @param [String] fields
752
+ # Selector specifying which fields to include in a partial response.
753
+ # @param [String] quota_user
754
+ # Available to use for quota purposes for server-side applications. Can be any
755
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
756
+ # @param [Google::Apis::RequestOptions] options
757
+ # Request-specific options
758
+ #
759
+ # @yield [result, err] Result & error if block supplied
760
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Operation] parsed result object
761
+ # @yieldparam err [StandardError] error object if request failed
762
+ #
763
+ # @return [Google::Apis::CloudresourcemanagerV1::Operation]
764
+ #
765
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
766
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
767
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
768
+ def get_operation(name, fields: nil, quota_user: nil, options: nil, &block)
769
+ command = make_simple_command(:get, 'v1/{+name}', options)
770
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Operation::Representation
771
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Operation
772
+ command.params['name'] = name unless name.nil?
672
773
  command.query['fields'] = fields unless fields.nil?
673
774
  command.query['quotaUser'] = quota_user unless quota_user.nil?
674
775
  execute_or_queue_command(command, &block)