google-apis-chromepolicy_v1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google-apis-chromepolicy_v1.rb +15 -0
- data/lib/google/apis/chromepolicy_v1.rb +41 -0
- data/lib/google/apis/chromepolicy_v1/classes.rb +796 -0
- data/lib/google/apis/chromepolicy_v1/gem_version.rb +28 -0
- data/lib/google/apis/chromepolicy_v1/representations.rb +382 -0
- data/lib/google/apis/chromepolicy_v1/service.rb +246 -0
- metadata +76 -0
@@ -0,0 +1,28 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
module Google
|
16
|
+
module Apis
|
17
|
+
module ChromepolicyV1
|
18
|
+
# Version of the google-apis-chromepolicy_v1 gem
|
19
|
+
GEM_VERSION = "0.1.0"
|
20
|
+
|
21
|
+
# Version of the code generator used to generate this client
|
22
|
+
GENERATOR_VERSION = "0.2.0"
|
23
|
+
|
24
|
+
# Revision of the discovery document this client was generated from
|
25
|
+
REVISION = "20210305"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,382 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'date'
|
16
|
+
require 'google/apis/core/base_service'
|
17
|
+
require 'google/apis/core/json_representation'
|
18
|
+
require 'google/apis/core/hashable'
|
19
|
+
require 'google/apis/errors'
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Apis
|
23
|
+
module ChromepolicyV1
|
24
|
+
|
25
|
+
class GoogleChromePolicyV1AdditionalTargetKeyName
|
26
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
27
|
+
|
28
|
+
include Google::Apis::Core::JsonObjectSupport
|
29
|
+
end
|
30
|
+
|
31
|
+
class GoogleChromePolicyV1BatchInheritOrgUnitPoliciesRequest
|
32
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
33
|
+
|
34
|
+
include Google::Apis::Core::JsonObjectSupport
|
35
|
+
end
|
36
|
+
|
37
|
+
class GoogleChromePolicyV1BatchModifyOrgUnitPoliciesRequest
|
38
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
39
|
+
|
40
|
+
include Google::Apis::Core::JsonObjectSupport
|
41
|
+
end
|
42
|
+
|
43
|
+
class GoogleChromePolicyV1InheritOrgUnitPolicyRequest
|
44
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
45
|
+
|
46
|
+
include Google::Apis::Core::JsonObjectSupport
|
47
|
+
end
|
48
|
+
|
49
|
+
class GoogleChromePolicyV1ListPolicySchemasResponse
|
50
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
51
|
+
|
52
|
+
include Google::Apis::Core::JsonObjectSupport
|
53
|
+
end
|
54
|
+
|
55
|
+
class GoogleChromePolicyV1ModifyOrgUnitPolicyRequest
|
56
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
57
|
+
|
58
|
+
include Google::Apis::Core::JsonObjectSupport
|
59
|
+
end
|
60
|
+
|
61
|
+
class GoogleChromePolicyV1PolicySchema
|
62
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
63
|
+
|
64
|
+
include Google::Apis::Core::JsonObjectSupport
|
65
|
+
end
|
66
|
+
|
67
|
+
class GoogleChromePolicyV1PolicySchemaFieldDescription
|
68
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
69
|
+
|
70
|
+
include Google::Apis::Core::JsonObjectSupport
|
71
|
+
end
|
72
|
+
|
73
|
+
class GoogleChromePolicyV1PolicySchemaFieldKnownValueDescription
|
74
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
75
|
+
|
76
|
+
include Google::Apis::Core::JsonObjectSupport
|
77
|
+
end
|
78
|
+
|
79
|
+
class GoogleChromePolicyV1PolicySchemaNoticeDescription
|
80
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
81
|
+
|
82
|
+
include Google::Apis::Core::JsonObjectSupport
|
83
|
+
end
|
84
|
+
|
85
|
+
class GoogleChromePolicyV1PolicyTargetKey
|
86
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
87
|
+
|
88
|
+
include Google::Apis::Core::JsonObjectSupport
|
89
|
+
end
|
90
|
+
|
91
|
+
class GoogleChromePolicyV1PolicyValue
|
92
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
93
|
+
|
94
|
+
include Google::Apis::Core::JsonObjectSupport
|
95
|
+
end
|
96
|
+
|
97
|
+
class GoogleChromePolicyV1ResolveRequest
|
98
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
99
|
+
|
100
|
+
include Google::Apis::Core::JsonObjectSupport
|
101
|
+
end
|
102
|
+
|
103
|
+
class GoogleChromePolicyV1ResolveResponse
|
104
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
105
|
+
|
106
|
+
include Google::Apis::Core::JsonObjectSupport
|
107
|
+
end
|
108
|
+
|
109
|
+
class GoogleChromePolicyV1ResolvedPolicy
|
110
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
111
|
+
|
112
|
+
include Google::Apis::Core::JsonObjectSupport
|
113
|
+
end
|
114
|
+
|
115
|
+
class GoogleProtobufEmpty
|
116
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
117
|
+
|
118
|
+
include Google::Apis::Core::JsonObjectSupport
|
119
|
+
end
|
120
|
+
|
121
|
+
class Proto2DescriptorProto
|
122
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
123
|
+
|
124
|
+
include Google::Apis::Core::JsonObjectSupport
|
125
|
+
end
|
126
|
+
|
127
|
+
class Proto2EnumDescriptorProto
|
128
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
129
|
+
|
130
|
+
include Google::Apis::Core::JsonObjectSupport
|
131
|
+
end
|
132
|
+
|
133
|
+
class Proto2EnumValueDescriptorProto
|
134
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
135
|
+
|
136
|
+
include Google::Apis::Core::JsonObjectSupport
|
137
|
+
end
|
138
|
+
|
139
|
+
class Proto2FieldDescriptorProto
|
140
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
141
|
+
|
142
|
+
include Google::Apis::Core::JsonObjectSupport
|
143
|
+
end
|
144
|
+
|
145
|
+
class Proto2FileDescriptorProto
|
146
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
147
|
+
|
148
|
+
include Google::Apis::Core::JsonObjectSupport
|
149
|
+
end
|
150
|
+
|
151
|
+
class Proto2OneofDescriptorProto
|
152
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
153
|
+
|
154
|
+
include Google::Apis::Core::JsonObjectSupport
|
155
|
+
end
|
156
|
+
|
157
|
+
class GoogleChromePolicyV1AdditionalTargetKeyName
|
158
|
+
# @private
|
159
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
160
|
+
property :key, as: 'key'
|
161
|
+
property :key_description, as: 'keyDescription'
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
class GoogleChromePolicyV1BatchInheritOrgUnitPoliciesRequest
|
166
|
+
# @private
|
167
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
168
|
+
collection :requests, as: 'requests', class: Google::Apis::ChromepolicyV1::GoogleChromePolicyV1InheritOrgUnitPolicyRequest, decorator: Google::Apis::ChromepolicyV1::GoogleChromePolicyV1InheritOrgUnitPolicyRequest::Representation
|
169
|
+
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
class GoogleChromePolicyV1BatchModifyOrgUnitPoliciesRequest
|
174
|
+
# @private
|
175
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
176
|
+
collection :requests, as: 'requests', class: Google::Apis::ChromepolicyV1::GoogleChromePolicyV1ModifyOrgUnitPolicyRequest, decorator: Google::Apis::ChromepolicyV1::GoogleChromePolicyV1ModifyOrgUnitPolicyRequest::Representation
|
177
|
+
|
178
|
+
end
|
179
|
+
end
|
180
|
+
|
181
|
+
class GoogleChromePolicyV1InheritOrgUnitPolicyRequest
|
182
|
+
# @private
|
183
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
184
|
+
property :policy_schema, as: 'policySchema'
|
185
|
+
property :policy_target_key, as: 'policyTargetKey', class: Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicyTargetKey, decorator: Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicyTargetKey::Representation
|
186
|
+
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
190
|
+
class GoogleChromePolicyV1ListPolicySchemasResponse
|
191
|
+
# @private
|
192
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
193
|
+
property :next_page_token, as: 'nextPageToken'
|
194
|
+
collection :policy_schemas, as: 'policySchemas', class: Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicySchema, decorator: Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicySchema::Representation
|
195
|
+
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
199
|
+
class GoogleChromePolicyV1ModifyOrgUnitPolicyRequest
|
200
|
+
# @private
|
201
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
202
|
+
property :policy_target_key, as: 'policyTargetKey', class: Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicyTargetKey, decorator: Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicyTargetKey::Representation
|
203
|
+
|
204
|
+
property :policy_value, as: 'policyValue', class: Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicyValue, decorator: Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicyValue::Representation
|
205
|
+
|
206
|
+
property :update_mask, as: 'updateMask'
|
207
|
+
end
|
208
|
+
end
|
209
|
+
|
210
|
+
class GoogleChromePolicyV1PolicySchema
|
211
|
+
# @private
|
212
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
213
|
+
collection :access_restrictions, as: 'accessRestrictions'
|
214
|
+
collection :additional_target_key_names, as: 'additionalTargetKeyNames', class: Google::Apis::ChromepolicyV1::GoogleChromePolicyV1AdditionalTargetKeyName, decorator: Google::Apis::ChromepolicyV1::GoogleChromePolicyV1AdditionalTargetKeyName::Representation
|
215
|
+
|
216
|
+
property :definition, as: 'definition', class: Google::Apis::ChromepolicyV1::Proto2FileDescriptorProto, decorator: Google::Apis::ChromepolicyV1::Proto2FileDescriptorProto::Representation
|
217
|
+
|
218
|
+
collection :field_descriptions, as: 'fieldDescriptions', class: Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicySchemaFieldDescription, decorator: Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicySchemaFieldDescription::Representation
|
219
|
+
|
220
|
+
property :name, as: 'name'
|
221
|
+
collection :notices, as: 'notices', class: Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicySchemaNoticeDescription, decorator: Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicySchemaNoticeDescription::Representation
|
222
|
+
|
223
|
+
property :policy_description, as: 'policyDescription'
|
224
|
+
property :schema_name, as: 'schemaName'
|
225
|
+
property :support_uri, as: 'supportUri'
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
229
|
+
class GoogleChromePolicyV1PolicySchemaFieldDescription
|
230
|
+
# @private
|
231
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
232
|
+
property :description, as: 'description'
|
233
|
+
property :field, as: 'field'
|
234
|
+
property :input_constraint, as: 'inputConstraint'
|
235
|
+
collection :known_value_descriptions, as: 'knownValueDescriptions', class: Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicySchemaFieldKnownValueDescription, decorator: Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicySchemaFieldKnownValueDescription::Representation
|
236
|
+
|
237
|
+
collection :nested_field_descriptions, as: 'nestedFieldDescriptions', class: Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicySchemaFieldDescription, decorator: Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicySchemaFieldDescription::Representation
|
238
|
+
|
239
|
+
end
|
240
|
+
end
|
241
|
+
|
242
|
+
class GoogleChromePolicyV1PolicySchemaFieldKnownValueDescription
|
243
|
+
# @private
|
244
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
245
|
+
property :description, as: 'description'
|
246
|
+
property :value, as: 'value'
|
247
|
+
end
|
248
|
+
end
|
249
|
+
|
250
|
+
class GoogleChromePolicyV1PolicySchemaNoticeDescription
|
251
|
+
# @private
|
252
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
253
|
+
property :acknowledgement_required, as: 'acknowledgementRequired'
|
254
|
+
property :field, as: 'field'
|
255
|
+
property :notice_message, as: 'noticeMessage'
|
256
|
+
property :notice_value, as: 'noticeValue'
|
257
|
+
end
|
258
|
+
end
|
259
|
+
|
260
|
+
class GoogleChromePolicyV1PolicyTargetKey
|
261
|
+
# @private
|
262
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
263
|
+
hash :additional_target_keys, as: 'additionalTargetKeys'
|
264
|
+
property :target_resource, as: 'targetResource'
|
265
|
+
end
|
266
|
+
end
|
267
|
+
|
268
|
+
class GoogleChromePolicyV1PolicyValue
|
269
|
+
# @private
|
270
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
271
|
+
property :policy_schema, as: 'policySchema'
|
272
|
+
hash :value, as: 'value'
|
273
|
+
end
|
274
|
+
end
|
275
|
+
|
276
|
+
class GoogleChromePolicyV1ResolveRequest
|
277
|
+
# @private
|
278
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
279
|
+
property :page_size, as: 'pageSize'
|
280
|
+
property :page_token, as: 'pageToken'
|
281
|
+
property :policy_schema_filter, as: 'policySchemaFilter'
|
282
|
+
property :policy_target_key, as: 'policyTargetKey', class: Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicyTargetKey, decorator: Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicyTargetKey::Representation
|
283
|
+
|
284
|
+
end
|
285
|
+
end
|
286
|
+
|
287
|
+
class GoogleChromePolicyV1ResolveResponse
|
288
|
+
# @private
|
289
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
290
|
+
property :next_page_token, as: 'nextPageToken'
|
291
|
+
collection :resolved_policies, as: 'resolvedPolicies', class: Google::Apis::ChromepolicyV1::GoogleChromePolicyV1ResolvedPolicy, decorator: Google::Apis::ChromepolicyV1::GoogleChromePolicyV1ResolvedPolicy::Representation
|
292
|
+
|
293
|
+
end
|
294
|
+
end
|
295
|
+
|
296
|
+
class GoogleChromePolicyV1ResolvedPolicy
|
297
|
+
# @private
|
298
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
299
|
+
property :source_key, as: 'sourceKey', class: Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicyTargetKey, decorator: Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicyTargetKey::Representation
|
300
|
+
|
301
|
+
property :target_key, as: 'targetKey', class: Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicyTargetKey, decorator: Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicyTargetKey::Representation
|
302
|
+
|
303
|
+
property :value, as: 'value', class: Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicyValue, decorator: Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicyValue::Representation
|
304
|
+
|
305
|
+
end
|
306
|
+
end
|
307
|
+
|
308
|
+
class GoogleProtobufEmpty
|
309
|
+
# @private
|
310
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
311
|
+
end
|
312
|
+
end
|
313
|
+
|
314
|
+
class Proto2DescriptorProto
|
315
|
+
# @private
|
316
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
317
|
+
collection :enum_type, as: 'enumType', class: Google::Apis::ChromepolicyV1::Proto2EnumDescriptorProto, decorator: Google::Apis::ChromepolicyV1::Proto2EnumDescriptorProto::Representation
|
318
|
+
|
319
|
+
collection :field, as: 'field', class: Google::Apis::ChromepolicyV1::Proto2FieldDescriptorProto, decorator: Google::Apis::ChromepolicyV1::Proto2FieldDescriptorProto::Representation
|
320
|
+
|
321
|
+
property :name, as: 'name'
|
322
|
+
collection :nested_type, as: 'nestedType', class: Google::Apis::ChromepolicyV1::Proto2DescriptorProto, decorator: Google::Apis::ChromepolicyV1::Proto2DescriptorProto::Representation
|
323
|
+
|
324
|
+
collection :oneof_decl, as: 'oneofDecl', class: Google::Apis::ChromepolicyV1::Proto2OneofDescriptorProto, decorator: Google::Apis::ChromepolicyV1::Proto2OneofDescriptorProto::Representation
|
325
|
+
|
326
|
+
end
|
327
|
+
end
|
328
|
+
|
329
|
+
class Proto2EnumDescriptorProto
|
330
|
+
# @private
|
331
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
332
|
+
property :name, as: 'name'
|
333
|
+
collection :value, as: 'value', class: Google::Apis::ChromepolicyV1::Proto2EnumValueDescriptorProto, decorator: Google::Apis::ChromepolicyV1::Proto2EnumValueDescriptorProto::Representation
|
334
|
+
|
335
|
+
end
|
336
|
+
end
|
337
|
+
|
338
|
+
class Proto2EnumValueDescriptorProto
|
339
|
+
# @private
|
340
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
341
|
+
property :name, as: 'name'
|
342
|
+
property :number, as: 'number'
|
343
|
+
end
|
344
|
+
end
|
345
|
+
|
346
|
+
class Proto2FieldDescriptorProto
|
347
|
+
# @private
|
348
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
349
|
+
property :default_value, as: 'defaultValue'
|
350
|
+
property :json_name, as: 'jsonName'
|
351
|
+
property :label, as: 'label'
|
352
|
+
property :name, as: 'name'
|
353
|
+
property :number, as: 'number'
|
354
|
+
property :oneof_index, as: 'oneofIndex'
|
355
|
+
property :proto3_optional, as: 'proto3Optional'
|
356
|
+
property :type, as: 'type'
|
357
|
+
property :type_name, as: 'typeName'
|
358
|
+
end
|
359
|
+
end
|
360
|
+
|
361
|
+
class Proto2FileDescriptorProto
|
362
|
+
# @private
|
363
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
364
|
+
collection :enum_type, as: 'enumType', class: Google::Apis::ChromepolicyV1::Proto2EnumDescriptorProto, decorator: Google::Apis::ChromepolicyV1::Proto2EnumDescriptorProto::Representation
|
365
|
+
|
366
|
+
collection :message_type, as: 'messageType', class: Google::Apis::ChromepolicyV1::Proto2DescriptorProto, decorator: Google::Apis::ChromepolicyV1::Proto2DescriptorProto::Representation
|
367
|
+
|
368
|
+
property :name, as: 'name'
|
369
|
+
property :package, as: 'package'
|
370
|
+
property :syntax, as: 'syntax'
|
371
|
+
end
|
372
|
+
end
|
373
|
+
|
374
|
+
class Proto2OneofDescriptorProto
|
375
|
+
# @private
|
376
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
377
|
+
property :name, as: 'name'
|
378
|
+
end
|
379
|
+
end
|
380
|
+
end
|
381
|
+
end
|
382
|
+
end
|
@@ -0,0 +1,246 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'google/apis/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 ChromepolicyV1
|
23
|
+
# Chrome Policy API
|
24
|
+
#
|
25
|
+
# The Chrome Policy API is a suite of services that allows Chrome administrators
|
26
|
+
# to control the policies applied to their managed Chrome OS devices and Chrome
|
27
|
+
# browsers.
|
28
|
+
#
|
29
|
+
# @example
|
30
|
+
# require 'google/apis/chromepolicy_v1'
|
31
|
+
#
|
32
|
+
# Chromepolicy = Google::Apis::ChromepolicyV1 # Alias the module
|
33
|
+
# service = Chromepolicy::ChromePolicyService.new
|
34
|
+
#
|
35
|
+
# @see http://developers.google.com/chrome/policy
|
36
|
+
class ChromePolicyService < Google::Apis::Core::BaseService
|
37
|
+
# @return [String]
|
38
|
+
# API key. Your API key identifies your project and provides you with API access,
|
39
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
40
|
+
attr_accessor :key
|
41
|
+
|
42
|
+
# @return [String]
|
43
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
44
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
45
|
+
attr_accessor :quota_user
|
46
|
+
|
47
|
+
def initialize
|
48
|
+
super('https://chromepolicy.googleapis.com/', '',
|
49
|
+
client_name: 'google-apis-chromepolicy_v1',
|
50
|
+
client_version: Google::Apis::ChromepolicyV1::GEM_VERSION)
|
51
|
+
@batch_path = 'batch'
|
52
|
+
end
|
53
|
+
|
54
|
+
# Gets the resolved policy values for a list of policies that match a search
|
55
|
+
# query.
|
56
|
+
# @param [String] customer
|
57
|
+
# ID of the G Suite account or literal "my_customer" for the customer associated
|
58
|
+
# to the request.
|
59
|
+
# @param [Google::Apis::ChromepolicyV1::GoogleChromePolicyV1ResolveRequest] google_chrome_policy_v1_resolve_request_object
|
60
|
+
# @param [String] fields
|
61
|
+
# Selector specifying which fields to include in a partial response.
|
62
|
+
# @param [String] quota_user
|
63
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
64
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
65
|
+
# @param [Google::Apis::RequestOptions] options
|
66
|
+
# Request-specific options
|
67
|
+
#
|
68
|
+
# @yield [result, err] Result & error if block supplied
|
69
|
+
# @yieldparam result [Google::Apis::ChromepolicyV1::GoogleChromePolicyV1ResolveResponse] parsed result object
|
70
|
+
# @yieldparam err [StandardError] error object if request failed
|
71
|
+
#
|
72
|
+
# @return [Google::Apis::ChromepolicyV1::GoogleChromePolicyV1ResolveResponse]
|
73
|
+
#
|
74
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
75
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
76
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
77
|
+
def resolve_customer_policy(customer, google_chrome_policy_v1_resolve_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
78
|
+
command = make_simple_command(:post, 'v1/{+customer}/policies:resolve', options)
|
79
|
+
command.request_representation = Google::Apis::ChromepolicyV1::GoogleChromePolicyV1ResolveRequest::Representation
|
80
|
+
command.request_object = google_chrome_policy_v1_resolve_request_object
|
81
|
+
command.response_representation = Google::Apis::ChromepolicyV1::GoogleChromePolicyV1ResolveResponse::Representation
|
82
|
+
command.response_class = Google::Apis::ChromepolicyV1::GoogleChromePolicyV1ResolveResponse
|
83
|
+
command.params['customer'] = customer unless customer.nil?
|
84
|
+
command.query['fields'] = fields unless fields.nil?
|
85
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
86
|
+
execute_or_queue_command(command, &block)
|
87
|
+
end
|
88
|
+
|
89
|
+
# Modify multiple policy values that are applied to a specific org unit so that
|
90
|
+
# they now inherit the value from a parent (if applicable). All targets must
|
91
|
+
# have the same target format. That is to say that they must point to the same
|
92
|
+
# target resource and must have the same keys specified in `
|
93
|
+
# additionalTargetKeyNames`. On failure the request will return the error
|
94
|
+
# details as part of the google.rpc.Status.
|
95
|
+
# @param [String] customer
|
96
|
+
# ID of the G Suite account or literal "my_customer" for the customer associated
|
97
|
+
# to the request.
|
98
|
+
# @param [Google::Apis::ChromepolicyV1::GoogleChromePolicyV1BatchInheritOrgUnitPoliciesRequest] google_chrome_policy_v1_batch_inherit_org_unit_policies_request_object
|
99
|
+
# @param [String] fields
|
100
|
+
# Selector specifying which fields to include in a partial response.
|
101
|
+
# @param [String] quota_user
|
102
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
103
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
104
|
+
# @param [Google::Apis::RequestOptions] options
|
105
|
+
# Request-specific options
|
106
|
+
#
|
107
|
+
# @yield [result, err] Result & error if block supplied
|
108
|
+
# @yieldparam result [Google::Apis::ChromepolicyV1::GoogleProtobufEmpty] parsed result object
|
109
|
+
# @yieldparam err [StandardError] error object if request failed
|
110
|
+
#
|
111
|
+
# @return [Google::Apis::ChromepolicyV1::GoogleProtobufEmpty]
|
112
|
+
#
|
113
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
114
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
115
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
116
|
+
def batch_customer_policy_orgunit_inherit(customer, google_chrome_policy_v1_batch_inherit_org_unit_policies_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
117
|
+
command = make_simple_command(:post, 'v1/{+customer}/policies/orgunits:batchInherit', options)
|
118
|
+
command.request_representation = Google::Apis::ChromepolicyV1::GoogleChromePolicyV1BatchInheritOrgUnitPoliciesRequest::Representation
|
119
|
+
command.request_object = google_chrome_policy_v1_batch_inherit_org_unit_policies_request_object
|
120
|
+
command.response_representation = Google::Apis::ChromepolicyV1::GoogleProtobufEmpty::Representation
|
121
|
+
command.response_class = Google::Apis::ChromepolicyV1::GoogleProtobufEmpty
|
122
|
+
command.params['customer'] = customer unless customer.nil?
|
123
|
+
command.query['fields'] = fields unless fields.nil?
|
124
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
125
|
+
execute_or_queue_command(command, &block)
|
126
|
+
end
|
127
|
+
|
128
|
+
# Modify multiple policy values that are applied to a specific org unit. All
|
129
|
+
# targets must have the same target format. That is to say that they must point
|
130
|
+
# to the same target resource and must have the same keys specified in `
|
131
|
+
# additionalTargetKeyNames`. On failure the request will return the error
|
132
|
+
# details as part of the google.rpc.Status.
|
133
|
+
# @param [String] customer
|
134
|
+
# ID of the G Suite account or literal "my_customer" for the customer associated
|
135
|
+
# to the request.
|
136
|
+
# @param [Google::Apis::ChromepolicyV1::GoogleChromePolicyV1BatchModifyOrgUnitPoliciesRequest] google_chrome_policy_v1_batch_modify_org_unit_policies_request_object
|
137
|
+
# @param [String] fields
|
138
|
+
# Selector specifying which fields to include in a partial response.
|
139
|
+
# @param [String] quota_user
|
140
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
141
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
142
|
+
# @param [Google::Apis::RequestOptions] options
|
143
|
+
# Request-specific options
|
144
|
+
#
|
145
|
+
# @yield [result, err] Result & error if block supplied
|
146
|
+
# @yieldparam result [Google::Apis::ChromepolicyV1::GoogleProtobufEmpty] parsed result object
|
147
|
+
# @yieldparam err [StandardError] error object if request failed
|
148
|
+
#
|
149
|
+
# @return [Google::Apis::ChromepolicyV1::GoogleProtobufEmpty]
|
150
|
+
#
|
151
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
152
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
153
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
154
|
+
def batch_customer_policy_orgunit_modify(customer, google_chrome_policy_v1_batch_modify_org_unit_policies_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
155
|
+
command = make_simple_command(:post, 'v1/{+customer}/policies/orgunits:batchModify', options)
|
156
|
+
command.request_representation = Google::Apis::ChromepolicyV1::GoogleChromePolicyV1BatchModifyOrgUnitPoliciesRequest::Representation
|
157
|
+
command.request_object = google_chrome_policy_v1_batch_modify_org_unit_policies_request_object
|
158
|
+
command.response_representation = Google::Apis::ChromepolicyV1::GoogleProtobufEmpty::Representation
|
159
|
+
command.response_class = Google::Apis::ChromepolicyV1::GoogleProtobufEmpty
|
160
|
+
command.params['customer'] = customer unless customer.nil?
|
161
|
+
command.query['fields'] = fields unless fields.nil?
|
162
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
163
|
+
execute_or_queue_command(command, &block)
|
164
|
+
end
|
165
|
+
|
166
|
+
# Get a specific policy schema for a customer by its resource name.
|
167
|
+
# @param [String] name
|
168
|
+
# Required. The policy schema resource name to query.
|
169
|
+
# @param [String] fields
|
170
|
+
# Selector specifying which fields to include in a partial response.
|
171
|
+
# @param [String] quota_user
|
172
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
173
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
174
|
+
# @param [Google::Apis::RequestOptions] options
|
175
|
+
# Request-specific options
|
176
|
+
#
|
177
|
+
# @yield [result, err] Result & error if block supplied
|
178
|
+
# @yieldparam result [Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicySchema] parsed result object
|
179
|
+
# @yieldparam err [StandardError] error object if request failed
|
180
|
+
#
|
181
|
+
# @return [Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicySchema]
|
182
|
+
#
|
183
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
184
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
185
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
186
|
+
def get_customer_policy_schema(name, fields: nil, quota_user: nil, options: nil, &block)
|
187
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
188
|
+
command.response_representation = Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicySchema::Representation
|
189
|
+
command.response_class = Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicySchema
|
190
|
+
command.params['name'] = name unless name.nil?
|
191
|
+
command.query['fields'] = fields unless fields.nil?
|
192
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
193
|
+
execute_or_queue_command(command, &block)
|
194
|
+
end
|
195
|
+
|
196
|
+
# Gets a list of policy schemas that match a specified filter value for a given
|
197
|
+
# customer.
|
198
|
+
# @param [String] parent
|
199
|
+
# Required. The customer for which the listing request will apply.
|
200
|
+
# @param [String] filter
|
201
|
+
# The schema filter used to find a particular schema based on fields like its
|
202
|
+
# resource name, description and `additionalTargetKeyNames`.
|
203
|
+
# @param [Fixnum] page_size
|
204
|
+
# The maximum number of policy schemas to return.
|
205
|
+
# @param [String] page_token
|
206
|
+
# The page token used to retrieve a specific page of the listing request.
|
207
|
+
# @param [String] fields
|
208
|
+
# Selector specifying which fields to include in a partial response.
|
209
|
+
# @param [String] quota_user
|
210
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
211
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
212
|
+
# @param [Google::Apis::RequestOptions] options
|
213
|
+
# Request-specific options
|
214
|
+
#
|
215
|
+
# @yield [result, err] Result & error if block supplied
|
216
|
+
# @yieldparam result [Google::Apis::ChromepolicyV1::GoogleChromePolicyV1ListPolicySchemasResponse] parsed result object
|
217
|
+
# @yieldparam err [StandardError] error object if request failed
|
218
|
+
#
|
219
|
+
# @return [Google::Apis::ChromepolicyV1::GoogleChromePolicyV1ListPolicySchemasResponse]
|
220
|
+
#
|
221
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
222
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
223
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
224
|
+
def list_customer_policy_schemas(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
225
|
+
command = make_simple_command(:get, 'v1/{+parent}/policySchemas', options)
|
226
|
+
command.response_representation = Google::Apis::ChromepolicyV1::GoogleChromePolicyV1ListPolicySchemasResponse::Representation
|
227
|
+
command.response_class = Google::Apis::ChromepolicyV1::GoogleChromePolicyV1ListPolicySchemasResponse
|
228
|
+
command.params['parent'] = parent unless parent.nil?
|
229
|
+
command.query['filter'] = filter unless filter.nil?
|
230
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
231
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
232
|
+
command.query['fields'] = fields unless fields.nil?
|
233
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
234
|
+
execute_or_queue_command(command, &block)
|
235
|
+
end
|
236
|
+
|
237
|
+
protected
|
238
|
+
|
239
|
+
def apply_command_defaults(command)
|
240
|
+
command.query['key'] = key unless key.nil?
|
241
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
242
|
+
end
|
243
|
+
end
|
244
|
+
end
|
245
|
+
end
|
246
|
+
end
|