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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 3e9c4279db1b9f7887e59f908760986d8ac852a2d966f096602e4302abca5d35
4
+ data.tar.gz: a7df310d7b90dbccfdc0c1e6875297f2dcb292207929e68ce9403574ee1c7e4a
5
+ SHA512:
6
+ metadata.gz: d27fc0308ec4fb86cd9abdc2d4fd6e7c72d8c136448cac4104970edcca7089c03ddbcacc614c1cec44c9628e5d2dbd9b2aa9bd87431e47e10512c7ae5cff4379
7
+ data.tar.gz: 121abcd8292044daa13b70212386d950892449a25046755e21d3afa821cfa8191f685cea26d09ed24108e912b7f9a09e4f95c6a2ed4d3117d8b86d64f58d89b1
data/.yardopts ADDED
@@ -0,0 +1,13 @@
1
+ --hide-void-return
2
+ --no-private
3
+ --verbose
4
+ --title=google-apis-chromepolicy_v1
5
+ --markup-provider=redcarpet
6
+ --markup=markdown
7
+ --main OVERVIEW.md
8
+ lib/google/apis/chromepolicy_v1/*.rb
9
+ lib/google/apis/chromepolicy_v1.rb
10
+ -
11
+ OVERVIEW.md
12
+ CHANGELOG.md
13
+ LICENSE.md
data/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ # Release history for google-apis-chromepolicy_v1
2
+
3
+ ### v0.1.0 (2021-03-09)
4
+
5
+ * Regenerated from discovery document revision 20210305
6
+ * Regenerated using generator version 0.2.0
7
+
data/LICENSE.md ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
data/OVERVIEW.md ADDED
@@ -0,0 +1,96 @@
1
+ # Simple REST client for version V1 of the Chrome Policy API
2
+
3
+ This is a simple client library for version V1 of the Chrome Policy API. It provides:
4
+
5
+ * A client object that connects to the HTTP/JSON REST endpoint for the service.
6
+ * Ruby objects for data structures related to the service.
7
+ * Integration with the googleauth gem for authentication using OAuth, API keys, and service accounts.
8
+ * Control of retry, pagination, and timeouts.
9
+
10
+ Note that although this client library is supported and will continue to be updated to track changes to the service, it is otherwise considered complete and not under active development. Many Google services, especially Google Cloud Platform services, may provide a more modern client that is under more active development and improvement. See the section below titled *Which client should I use?* for more information.
11
+
12
+ ## Getting started
13
+
14
+ ### Before you begin
15
+
16
+ There are a few setup steps you need to complete before you can use this library:
17
+
18
+ 1. If you don't already have a Google account, [sign up](https://www.google.com/accounts).
19
+ 2. If you have never created a Google APIs Console project, read about [Managing Projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and create a project in the [Google API Console](https://console.cloud.google.com/).
20
+ 3. Most APIs need to be enabled for your project. [Enable it](https://console.cloud.google.com/apis/library/chromepolicy.googleapis.com) in the console.
21
+
22
+ ### Installation
23
+
24
+ Add this line to your application's Gemfile:
25
+
26
+ ```ruby
27
+ gem 'google-apis-chromepolicy_v1', '~> 0.1'
28
+ ```
29
+
30
+ And then execute:
31
+
32
+ ```
33
+ $ bundle
34
+ ```
35
+
36
+ Or install it yourself as:
37
+
38
+ ```
39
+ $ gem install google-apis-chromepolicy_v1
40
+ ```
41
+
42
+ ### Creating a client object
43
+
44
+ Once the gem is installed, you can load the client code and instantiate a client.
45
+
46
+ ```ruby
47
+ # Load the client
48
+ require "google/apis/chromepolicy_v1"
49
+
50
+ # Create a client object
51
+ client = Google::Apis::ChromepolicyV1::ChromePolicyService.new
52
+
53
+ # Authenticate calls
54
+ client.authentication = # ... use the googleauth gem to create credentials
55
+ ```
56
+
57
+ See the class reference docs for information on the methods you can call from a client.
58
+
59
+ ## Documentation
60
+
61
+ More detailed descriptions of the Google simple REST clients are available in two documents.
62
+
63
+ * The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
64
+ * The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
65
+
66
+ (Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Chromepolicy service in particular.)
67
+
68
+ For reference information on specific calls in the Chrome Policy API, see the {Google::Apis::ChromepolicyV1::ChromePolicyService class reference docs}.
69
+
70
+ ## Which client should I use?
71
+
72
+ Google provides two types of Ruby API client libraries: **simple REST clients** and **modern clients**.
73
+
74
+ This library, `google-apis-chromepolicy_v1`, is a simple REST client. You can identify these clients by their gem names, which are always in the form `google-apis-<servicename>_<serviceversion>`. The simple REST clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward.
75
+
76
+ Modern clients are produced by a modern code generator, sometimes combined with hand-crafted functionality. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services. Modern clients are available for many Google services, especially Google Cloud Platform services, but do not yet support all the services covered by the simple clients.
77
+
78
+ Gem names for modern clients are often of the form `google-cloud-<service_name>`. (For example, [google-cloud-pubsub](https://rubygems.org/gems/google-cloud-pubsub).) Note that most modern clients also have corresponding "versioned" gems with names like `google-cloud-<service_name>-<version>`. (For example, [google-cloud-pubsub-v1](https://rubygems.org/gems/google-cloud-pubsub-v1).) The "versioned" gems can be used directly, but often provide lower-level interfaces. In most cases, the main gem is recommended.
79
+
80
+ **For most users, we recommend the modern client, if one is available.** Compared with simple clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a simple client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure.
81
+
82
+ The [product documentation](http://developers.google.com/chrome/policy) may provide guidance regarding the preferred client library to use.
83
+
84
+ ## Supported Ruby versions
85
+
86
+ This library is supported on Ruby 2.5+.
87
+
88
+ Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Currently, this means Ruby 2.5 and later. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
89
+
90
+ ## License
91
+
92
+ This library is licensed under Apache 2.0. Full license text is available in the {file:LICENSE.md LICENSE}.
93
+
94
+ ## Support
95
+
96
+ Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com).
@@ -0,0 +1,15 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require "google/apis/chromepolicy_v1"
@@ -0,0 +1,41 @@
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/chromepolicy_v1/service.rb'
16
+ require 'google/apis/chromepolicy_v1/classes.rb'
17
+ require 'google/apis/chromepolicy_v1/representations.rb'
18
+ require 'google/apis/chromepolicy_v1/gem_version.rb'
19
+
20
+ module Google
21
+ module Apis
22
+ # Chrome Policy API
23
+ #
24
+ # The Chrome Policy API is a suite of services that allows Chrome administrators
25
+ # to control the policies applied to their managed Chrome OS devices and Chrome
26
+ # browsers.
27
+ #
28
+ # @see http://developers.google.com/chrome/policy
29
+ module ChromepolicyV1
30
+ # Version of the Chrome Policy API this client connects to.
31
+ # This is NOT the gem version.
32
+ VERSION = 'V1'
33
+
34
+ # See, edit, create or delete policies applied to Chrome OS and Chrome Browsers managed within your organization
35
+ AUTH_CHROME_MANAGEMENT_POLICY = 'https://www.googleapis.com/auth/chrome.management.policy'
36
+
37
+ # See policies applied to Chrome OS and Chrome Browsers managed within your organization
38
+ AUTH_CHROME_MANAGEMENT_POLICY_READONLY = 'https://www.googleapis.com/auth/chrome.management.policy.readonly'
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,796 @@
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
+ # Additional key names that will be used to identify the target of the policy
26
+ # value.
27
+ class GoogleChromePolicyV1AdditionalTargetKeyName
28
+ include Google::Apis::Core::Hashable
29
+
30
+ # Key name.
31
+ # Corresponds to the JSON property `key`
32
+ # @return [String]
33
+ attr_accessor :key
34
+
35
+ # Key description.
36
+ # Corresponds to the JSON property `keyDescription`
37
+ # @return [String]
38
+ attr_accessor :key_description
39
+
40
+ def initialize(**args)
41
+ update!(**args)
42
+ end
43
+
44
+ # Update properties of this object
45
+ def update!(**args)
46
+ @key = args[:key] if args.key?(:key)
47
+ @key_description = args[:key_description] if args.key?(:key_description)
48
+ end
49
+ end
50
+
51
+ # Request message for specifying that multiple policy values inherit their value
52
+ # from their parents.
53
+ class GoogleChromePolicyV1BatchInheritOrgUnitPoliciesRequest
54
+ include Google::Apis::Core::Hashable
55
+
56
+ # List of policies that have to inherit their values as defined by the `requests`
57
+ # . All requests in the list must follow these restrictions: 1. All schemas in
58
+ # the list must have the same root namespace. 2. All `policyTargetKey.
59
+ # targetResource` values must point to an org unit resource. 3. All `
60
+ # policyTargetKey` values must have the same key names in the `
61
+ # additionalTargetKeys`. This also means if one of the targets has an empty `
62
+ # additionalTargetKeys` map, all of the targets must have an empty `
63
+ # additionalTargetKeys` map. 4. No two modification requests can reference the
64
+ # same `policySchema` + ` policyTargetKey` pair.
65
+ # Corresponds to the JSON property `requests`
66
+ # @return [Array<Google::Apis::ChromepolicyV1::GoogleChromePolicyV1InheritOrgUnitPolicyRequest>]
67
+ attr_accessor :requests
68
+
69
+ def initialize(**args)
70
+ update!(**args)
71
+ end
72
+
73
+ # Update properties of this object
74
+ def update!(**args)
75
+ @requests = args[:requests] if args.key?(:requests)
76
+ end
77
+ end
78
+
79
+ # Request message for modifying multiple policy values for a specific target.
80
+ class GoogleChromePolicyV1BatchModifyOrgUnitPoliciesRequest
81
+ include Google::Apis::Core::Hashable
82
+
83
+ # List of policies to modify as defined by the `requests`. All requests in the
84
+ # list must follow these restrictions: 1. All schemas in the list must have the
85
+ # same root namespace. 2. All `policyTargetKey.targetResource` values must point
86
+ # to an org unit resource. 3. All `policyTargetKey` values must have the same
87
+ # key names in the ` additionalTargetKeys`. This also means if one of the
88
+ # targets has an empty `additionalTargetKeys` map, all of the targets must have
89
+ # an empty `additionalTargetKeys` map. 4. No two modification requests can
90
+ # reference the same `policySchema` + ` policyTargetKey` pair.
91
+ # Corresponds to the JSON property `requests`
92
+ # @return [Array<Google::Apis::ChromepolicyV1::GoogleChromePolicyV1ModifyOrgUnitPolicyRequest>]
93
+ attr_accessor :requests
94
+
95
+ def initialize(**args)
96
+ update!(**args)
97
+ end
98
+
99
+ # Update properties of this object
100
+ def update!(**args)
101
+ @requests = args[:requests] if args.key?(:requests)
102
+ end
103
+ end
104
+
105
+ # Request parameters for inheriting policy value of a specific org unit target
106
+ # from the policy value of its parent org unit.
107
+ class GoogleChromePolicyV1InheritOrgUnitPolicyRequest
108
+ include Google::Apis::Core::Hashable
109
+
110
+ # The fully qualified name of the policy schema that is being inherited.
111
+ # Corresponds to the JSON property `policySchema`
112
+ # @return [String]
113
+ attr_accessor :policy_schema
114
+
115
+ # The key used to identify the target on which the policy will be applied.
116
+ # Corresponds to the JSON property `policyTargetKey`
117
+ # @return [Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicyTargetKey]
118
+ attr_accessor :policy_target_key
119
+
120
+ def initialize(**args)
121
+ update!(**args)
122
+ end
123
+
124
+ # Update properties of this object
125
+ def update!(**args)
126
+ @policy_schema = args[:policy_schema] if args.key?(:policy_schema)
127
+ @policy_target_key = args[:policy_target_key] if args.key?(:policy_target_key)
128
+ end
129
+ end
130
+
131
+ # Response message for listing policy schemas that match a filter.
132
+ class GoogleChromePolicyV1ListPolicySchemasResponse
133
+ include Google::Apis::Core::Hashable
134
+
135
+ # The page token used to get the next page of policy schemas.
136
+ # Corresponds to the JSON property `nextPageToken`
137
+ # @return [String]
138
+ attr_accessor :next_page_token
139
+
140
+ # The list of policy schemas that match the query.
141
+ # Corresponds to the JSON property `policySchemas`
142
+ # @return [Array<Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicySchema>]
143
+ attr_accessor :policy_schemas
144
+
145
+ def initialize(**args)
146
+ update!(**args)
147
+ end
148
+
149
+ # Update properties of this object
150
+ def update!(**args)
151
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
152
+ @policy_schemas = args[:policy_schemas] if args.key?(:policy_schemas)
153
+ end
154
+ end
155
+
156
+ # Request parameters for modifying a policy value for a specific org unit target.
157
+ class GoogleChromePolicyV1ModifyOrgUnitPolicyRequest
158
+ include Google::Apis::Core::Hashable
159
+
160
+ # The key used to identify the target on which the policy will be applied.
161
+ # Corresponds to the JSON property `policyTargetKey`
162
+ # @return [Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicyTargetKey]
163
+ attr_accessor :policy_target_key
164
+
165
+ # A particular value for a policy managed by the service.
166
+ # Corresponds to the JSON property `policyValue`
167
+ # @return [Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicyValue]
168
+ attr_accessor :policy_value
169
+
170
+ # Required. Policy fields to update. Only fields in this mask will be updated;
171
+ # other fields in `policy_value` will be ignored (even if they have values). If
172
+ # a field is in this list it must have a value in 'policy_value'.
173
+ # Corresponds to the JSON property `updateMask`
174
+ # @return [String]
175
+ attr_accessor :update_mask
176
+
177
+ def initialize(**args)
178
+ update!(**args)
179
+ end
180
+
181
+ # Update properties of this object
182
+ def update!(**args)
183
+ @policy_target_key = args[:policy_target_key] if args.key?(:policy_target_key)
184
+ @policy_value = args[:policy_value] if args.key?(:policy_value)
185
+ @update_mask = args[:update_mask] if args.key?(:update_mask)
186
+ end
187
+ end
188
+
189
+ # Resource representing a policy schema. Next ID: 10
190
+ class GoogleChromePolicyV1PolicySchema
191
+ include Google::Apis::Core::Hashable
192
+
193
+ # Output only. Specific access restrictions related to this policy.
194
+ # Corresponds to the JSON property `accessRestrictions`
195
+ # @return [Array<String>]
196
+ attr_accessor :access_restrictions
197
+
198
+ # Output only. Additional key names that will be used to identify the target of
199
+ # the policy value. When specifying a `policyTargetKey`, each of the additional
200
+ # keys specified here will have to be included in the `additionalTargetKeys` map.
201
+ # Corresponds to the JSON property `additionalTargetKeyNames`
202
+ # @return [Array<Google::Apis::ChromepolicyV1::GoogleChromePolicyV1AdditionalTargetKeyName>]
203
+ attr_accessor :additional_target_key_names
204
+
205
+ # Describes a complete .proto file.
206
+ # Corresponds to the JSON property `definition`
207
+ # @return [Google::Apis::ChromepolicyV1::Proto2FileDescriptorProto]
208
+ attr_accessor :definition
209
+
210
+ # Output only. Detailed description of each field that is part of the schema.
211
+ # Corresponds to the JSON property `fieldDescriptions`
212
+ # @return [Array<Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicySchemaFieldDescription>]
213
+ attr_accessor :field_descriptions
214
+
215
+ # Format: name=customers/`customer`/policySchemas/`schema_namespace`
216
+ # Corresponds to the JSON property `name`
217
+ # @return [String]
218
+ attr_accessor :name
219
+
220
+ # Output only. Special notice messages related to setting certain values in
221
+ # certain fields in the schema.
222
+ # Corresponds to the JSON property `notices`
223
+ # @return [Array<Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicySchemaNoticeDescription>]
224
+ attr_accessor :notices
225
+
226
+ # Output only. Description about the policy schema for user consumption.
227
+ # Corresponds to the JSON property `policyDescription`
228
+ # @return [String]
229
+ attr_accessor :policy_description
230
+
231
+ # Output only. The full qualified name of the policy schema. This value is used
232
+ # to fill the field `policy_schema` in PolicyValue when calling
233
+ # BatchInheritOrgUnitPolicies or BatchModifyOrgUnitPolicies.
234
+ # Corresponds to the JSON property `schemaName`
235
+ # @return [String]
236
+ attr_accessor :schema_name
237
+
238
+ # Output only. URI to related support article for this schema.
239
+ # Corresponds to the JSON property `supportUri`
240
+ # @return [String]
241
+ attr_accessor :support_uri
242
+
243
+ def initialize(**args)
244
+ update!(**args)
245
+ end
246
+
247
+ # Update properties of this object
248
+ def update!(**args)
249
+ @access_restrictions = args[:access_restrictions] if args.key?(:access_restrictions)
250
+ @additional_target_key_names = args[:additional_target_key_names] if args.key?(:additional_target_key_names)
251
+ @definition = args[:definition] if args.key?(:definition)
252
+ @field_descriptions = args[:field_descriptions] if args.key?(:field_descriptions)
253
+ @name = args[:name] if args.key?(:name)
254
+ @notices = args[:notices] if args.key?(:notices)
255
+ @policy_description = args[:policy_description] if args.key?(:policy_description)
256
+ @schema_name = args[:schema_name] if args.key?(:schema_name)
257
+ @support_uri = args[:support_uri] if args.key?(:support_uri)
258
+ end
259
+ end
260
+
261
+ # Provides detailed information for a particular field that is part of a
262
+ # PolicySchema.
263
+ class GoogleChromePolicyV1PolicySchemaFieldDescription
264
+ include Google::Apis::Core::Hashable
265
+
266
+ # Output only. The description for the field.
267
+ # Corresponds to the JSON property `description`
268
+ # @return [String]
269
+ attr_accessor :description
270
+
271
+ # Output only. The name of the field for associated with this description.
272
+ # Corresponds to the JSON property `field`
273
+ # @return [String]
274
+ attr_accessor :field
275
+
276
+ # Output only. Any input constraints associated on the values for the field.
277
+ # Corresponds to the JSON property `inputConstraint`
278
+ # @return [String]
279
+ attr_accessor :input_constraint
280
+
281
+ # Output only. If the field has a set of know values, this field will provide a
282
+ # description for these values.
283
+ # Corresponds to the JSON property `knownValueDescriptions`
284
+ # @return [Array<Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicySchemaFieldKnownValueDescription>]
285
+ attr_accessor :known_value_descriptions
286
+
287
+ # Output only. Provides the description of the fields nested in this field, if
288
+ # the field is a message type that defines multiple fields.
289
+ # Corresponds to the JSON property `nestedFieldDescriptions`
290
+ # @return [Array<Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicySchemaFieldDescription>]
291
+ attr_accessor :nested_field_descriptions
292
+
293
+ def initialize(**args)
294
+ update!(**args)
295
+ end
296
+
297
+ # Update properties of this object
298
+ def update!(**args)
299
+ @description = args[:description] if args.key?(:description)
300
+ @field = args[:field] if args.key?(:field)
301
+ @input_constraint = args[:input_constraint] if args.key?(:input_constraint)
302
+ @known_value_descriptions = args[:known_value_descriptions] if args.key?(:known_value_descriptions)
303
+ @nested_field_descriptions = args[:nested_field_descriptions] if args.key?(:nested_field_descriptions)
304
+ end
305
+ end
306
+
307
+ # Provides detailed information about a known value that is allowed for a
308
+ # particular field in a PolicySchema.
309
+ class GoogleChromePolicyV1PolicySchemaFieldKnownValueDescription
310
+ include Google::Apis::Core::Hashable
311
+
312
+ # Output only. Additional description for this value.
313
+ # Corresponds to the JSON property `description`
314
+ # @return [String]
315
+ attr_accessor :description
316
+
317
+ # Output only. The string represenstation of the value that can be set for the
318
+ # field.
319
+ # Corresponds to the JSON property `value`
320
+ # @return [String]
321
+ attr_accessor :value
322
+
323
+ def initialize(**args)
324
+ update!(**args)
325
+ end
326
+
327
+ # Update properties of this object
328
+ def update!(**args)
329
+ @description = args[:description] if args.key?(:description)
330
+ @value = args[:value] if args.key?(:value)
331
+ end
332
+ end
333
+
334
+ # Provides special notice messages related to a particular value in a field that
335
+ # is part of a PolicySchema.
336
+ class GoogleChromePolicyV1PolicySchemaNoticeDescription
337
+ include Google::Apis::Core::Hashable
338
+
339
+ # Output only. Whether the user needs to acknowledge the notice message before
340
+ # the value can be set.
341
+ # Corresponds to the JSON property `acknowledgementRequired`
342
+ # @return [Boolean]
343
+ attr_accessor :acknowledgement_required
344
+ alias_method :acknowledgement_required?, :acknowledgement_required
345
+
346
+ # Output only. The field name associated with the notice.
347
+ # Corresponds to the JSON property `field`
348
+ # @return [String]
349
+ attr_accessor :field
350
+
351
+ # Output only. The notice message associate with the value of the field.
352
+ # Corresponds to the JSON property `noticeMessage`
353
+ # @return [String]
354
+ attr_accessor :notice_message
355
+
356
+ # Output only. The value of the field that has a notice. When setting the field
357
+ # to this value, the user may be required to acknowledge the notice message in
358
+ # order for the value to be set.
359
+ # Corresponds to the JSON property `noticeValue`
360
+ # @return [String]
361
+ attr_accessor :notice_value
362
+
363
+ def initialize(**args)
364
+ update!(**args)
365
+ end
366
+
367
+ # Update properties of this object
368
+ def update!(**args)
369
+ @acknowledgement_required = args[:acknowledgement_required] if args.key?(:acknowledgement_required)
370
+ @field = args[:field] if args.key?(:field)
371
+ @notice_message = args[:notice_message] if args.key?(:notice_message)
372
+ @notice_value = args[:notice_value] if args.key?(:notice_value)
373
+ end
374
+ end
375
+
376
+ # The key used to identify the target on which the policy will be applied.
377
+ class GoogleChromePolicyV1PolicyTargetKey
378
+ include Google::Apis::Core::Hashable
379
+
380
+ # Map containing the additional target key name and value pairs used to further
381
+ # identify the target of the policy.
382
+ # Corresponds to the JSON property `additionalTargetKeys`
383
+ # @return [Hash<String,String>]
384
+ attr_accessor :additional_target_keys
385
+
386
+ # The target resource on which this policy is applied. The following resources
387
+ # are supported: * Organizational Unit ("orgunits/`orgunit_id`")
388
+ # Corresponds to the JSON property `targetResource`
389
+ # @return [String]
390
+ attr_accessor :target_resource
391
+
392
+ def initialize(**args)
393
+ update!(**args)
394
+ end
395
+
396
+ # Update properties of this object
397
+ def update!(**args)
398
+ @additional_target_keys = args[:additional_target_keys] if args.key?(:additional_target_keys)
399
+ @target_resource = args[:target_resource] if args.key?(:target_resource)
400
+ end
401
+ end
402
+
403
+ # A particular value for a policy managed by the service.
404
+ class GoogleChromePolicyV1PolicyValue
405
+ include Google::Apis::Core::Hashable
406
+
407
+ # The fully qualified name of the policy schema associated with this policy.
408
+ # Corresponds to the JSON property `policySchema`
409
+ # @return [String]
410
+ attr_accessor :policy_schema
411
+
412
+ # The value of the policy that is compatible with the schema that it is
413
+ # associated with.
414
+ # Corresponds to the JSON property `value`
415
+ # @return [Hash<String,Object>]
416
+ attr_accessor :value
417
+
418
+ def initialize(**args)
419
+ update!(**args)
420
+ end
421
+
422
+ # Update properties of this object
423
+ def update!(**args)
424
+ @policy_schema = args[:policy_schema] if args.key?(:policy_schema)
425
+ @value = args[:value] if args.key?(:value)
426
+ end
427
+ end
428
+
429
+ # Request message for getting the resolved policy value for a specific target.
430
+ class GoogleChromePolicyV1ResolveRequest
431
+ include Google::Apis::Core::Hashable
432
+
433
+ # The maximum number of policies to return, defaults to 100 and has a maximum of
434
+ # 1000.
435
+ # Corresponds to the JSON property `pageSize`
436
+ # @return [Fixnum]
437
+ attr_accessor :page_size
438
+
439
+ # The page token used to retrieve a specific page of the request.
440
+ # Corresponds to the JSON property `pageToken`
441
+ # @return [String]
442
+ attr_accessor :page_token
443
+
444
+ # The schema filter to apply to the resolve request. Specify a schema name to
445
+ # view a particular schema, for example: chrome.users.ShowLogoutButton Wildcards
446
+ # are supported, but only in the leaf portion of the schema name. Wildcards
447
+ # cannot be used in namespace directly. Please read https://developers.google.
448
+ # com/chrome/chrome-management/guides/policyapi for details on schema namepsaces.
449
+ # For example: Valid: "chrome.users.*", "chrome.users.apps.*", "chrome.printers.
450
+ # *" Invalid: "*", "*.users", "chrome.*", "chrome.*.apps.*"
451
+ # Corresponds to the JSON property `policySchemaFilter`
452
+ # @return [String]
453
+ attr_accessor :policy_schema_filter
454
+
455
+ # The key used to identify the target on which the policy will be applied.
456
+ # Corresponds to the JSON property `policyTargetKey`
457
+ # @return [Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicyTargetKey]
458
+ attr_accessor :policy_target_key
459
+
460
+ def initialize(**args)
461
+ update!(**args)
462
+ end
463
+
464
+ # Update properties of this object
465
+ def update!(**args)
466
+ @page_size = args[:page_size] if args.key?(:page_size)
467
+ @page_token = args[:page_token] if args.key?(:page_token)
468
+ @policy_schema_filter = args[:policy_schema_filter] if args.key?(:policy_schema_filter)
469
+ @policy_target_key = args[:policy_target_key] if args.key?(:policy_target_key)
470
+ end
471
+ end
472
+
473
+ # Response message for getting the resolved policy value for a specific target.
474
+ class GoogleChromePolicyV1ResolveResponse
475
+ include Google::Apis::Core::Hashable
476
+
477
+ # The page token used to get the next set of resolved policies found by the
478
+ # request.
479
+ # Corresponds to the JSON property `nextPageToken`
480
+ # @return [String]
481
+ attr_accessor :next_page_token
482
+
483
+ # The list of resolved policies found by the resolve request.
484
+ # Corresponds to the JSON property `resolvedPolicies`
485
+ # @return [Array<Google::Apis::ChromepolicyV1::GoogleChromePolicyV1ResolvedPolicy>]
486
+ attr_accessor :resolved_policies
487
+
488
+ def initialize(**args)
489
+ update!(**args)
490
+ end
491
+
492
+ # Update properties of this object
493
+ def update!(**args)
494
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
495
+ @resolved_policies = args[:resolved_policies] if args.key?(:resolved_policies)
496
+ end
497
+ end
498
+
499
+ # The resolved value of a policy for a given target.
500
+ class GoogleChromePolicyV1ResolvedPolicy
501
+ include Google::Apis::Core::Hashable
502
+
503
+ # The key used to identify the target on which the policy will be applied.
504
+ # Corresponds to the JSON property `sourceKey`
505
+ # @return [Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicyTargetKey]
506
+ attr_accessor :source_key
507
+
508
+ # The key used to identify the target on which the policy will be applied.
509
+ # Corresponds to the JSON property `targetKey`
510
+ # @return [Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicyTargetKey]
511
+ attr_accessor :target_key
512
+
513
+ # A particular value for a policy managed by the service.
514
+ # Corresponds to the JSON property `value`
515
+ # @return [Google::Apis::ChromepolicyV1::GoogleChromePolicyV1PolicyValue]
516
+ attr_accessor :value
517
+
518
+ def initialize(**args)
519
+ update!(**args)
520
+ end
521
+
522
+ # Update properties of this object
523
+ def update!(**args)
524
+ @source_key = args[:source_key] if args.key?(:source_key)
525
+ @target_key = args[:target_key] if args.key?(:target_key)
526
+ @value = args[:value] if args.key?(:value)
527
+ end
528
+ end
529
+
530
+ # A generic empty message that you can re-use to avoid defining duplicated empty
531
+ # messages in your APIs. A typical example is to use it as the request or the
532
+ # response type of an API method. For instance: service Foo ` rpc Bar(google.
533
+ # protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
534
+ # `Empty` is empty JSON object ````.
535
+ class GoogleProtobufEmpty
536
+ include Google::Apis::Core::Hashable
537
+
538
+ def initialize(**args)
539
+ update!(**args)
540
+ end
541
+
542
+ # Update properties of this object
543
+ def update!(**args)
544
+ end
545
+ end
546
+
547
+ # Describes a message type.
548
+ class Proto2DescriptorProto
549
+ include Google::Apis::Core::Hashable
550
+
551
+ #
552
+ # Corresponds to the JSON property `enumType`
553
+ # @return [Array<Google::Apis::ChromepolicyV1::Proto2EnumDescriptorProto>]
554
+ attr_accessor :enum_type
555
+
556
+ #
557
+ # Corresponds to the JSON property `field`
558
+ # @return [Array<Google::Apis::ChromepolicyV1::Proto2FieldDescriptorProto>]
559
+ attr_accessor :field
560
+
561
+ #
562
+ # Corresponds to the JSON property `name`
563
+ # @return [String]
564
+ attr_accessor :name
565
+
566
+ #
567
+ # Corresponds to the JSON property `nestedType`
568
+ # @return [Array<Google::Apis::ChromepolicyV1::Proto2DescriptorProto>]
569
+ attr_accessor :nested_type
570
+
571
+ #
572
+ # Corresponds to the JSON property `oneofDecl`
573
+ # @return [Array<Google::Apis::ChromepolicyV1::Proto2OneofDescriptorProto>]
574
+ attr_accessor :oneof_decl
575
+
576
+ def initialize(**args)
577
+ update!(**args)
578
+ end
579
+
580
+ # Update properties of this object
581
+ def update!(**args)
582
+ @enum_type = args[:enum_type] if args.key?(:enum_type)
583
+ @field = args[:field] if args.key?(:field)
584
+ @name = args[:name] if args.key?(:name)
585
+ @nested_type = args[:nested_type] if args.key?(:nested_type)
586
+ @oneof_decl = args[:oneof_decl] if args.key?(:oneof_decl)
587
+ end
588
+ end
589
+
590
+ # Describes an enum type.
591
+ class Proto2EnumDescriptorProto
592
+ include Google::Apis::Core::Hashable
593
+
594
+ #
595
+ # Corresponds to the JSON property `name`
596
+ # @return [String]
597
+ attr_accessor :name
598
+
599
+ #
600
+ # Corresponds to the JSON property `value`
601
+ # @return [Array<Google::Apis::ChromepolicyV1::Proto2EnumValueDescriptorProto>]
602
+ attr_accessor :value
603
+
604
+ def initialize(**args)
605
+ update!(**args)
606
+ end
607
+
608
+ # Update properties of this object
609
+ def update!(**args)
610
+ @name = args[:name] if args.key?(:name)
611
+ @value = args[:value] if args.key?(:value)
612
+ end
613
+ end
614
+
615
+ # Describes a value within an enum.
616
+ class Proto2EnumValueDescriptorProto
617
+ include Google::Apis::Core::Hashable
618
+
619
+ #
620
+ # Corresponds to the JSON property `name`
621
+ # @return [String]
622
+ attr_accessor :name
623
+
624
+ #
625
+ # Corresponds to the JSON property `number`
626
+ # @return [Fixnum]
627
+ attr_accessor :number
628
+
629
+ def initialize(**args)
630
+ update!(**args)
631
+ end
632
+
633
+ # Update properties of this object
634
+ def update!(**args)
635
+ @name = args[:name] if args.key?(:name)
636
+ @number = args[:number] if args.key?(:number)
637
+ end
638
+ end
639
+
640
+ # Describes a field within a message.
641
+ class Proto2FieldDescriptorProto
642
+ include Google::Apis::Core::Hashable
643
+
644
+ # For numeric types, contains the original text representation of the value. For
645
+ # booleans, "true" or "false". For strings, contains the default text contents (
646
+ # not escaped in any way). For bytes, contains the C escaped value. All bytes >=
647
+ # 128 are escaped.
648
+ # Corresponds to the JSON property `defaultValue`
649
+ # @return [String]
650
+ attr_accessor :default_value
651
+
652
+ # JSON name of this field. The value is set by protocol compiler. If the user
653
+ # has set a "json_name" option on this field, that option's value will be used.
654
+ # Otherwise, it's deduced from the field's name by converting it to camelCase.
655
+ # Corresponds to the JSON property `jsonName`
656
+ # @return [String]
657
+ attr_accessor :json_name
658
+
659
+ #
660
+ # Corresponds to the JSON property `label`
661
+ # @return [String]
662
+ attr_accessor :label
663
+
664
+ #
665
+ # Corresponds to the JSON property `name`
666
+ # @return [String]
667
+ attr_accessor :name
668
+
669
+ #
670
+ # Corresponds to the JSON property `number`
671
+ # @return [Fixnum]
672
+ attr_accessor :number
673
+
674
+ # If set, gives the index of a oneof in the containing type's oneof_decl list.
675
+ # This field is a member of that oneof.
676
+ # Corresponds to the JSON property `oneofIndex`
677
+ # @return [Fixnum]
678
+ attr_accessor :oneof_index
679
+
680
+ # If true, this is a proto3 "optional". When a proto3 field is optional, it
681
+ # tracks presence regardless of field type. When proto3_optional is true, this
682
+ # field must be belong to a oneof to signal to old proto3 clients that presence
683
+ # is tracked for this field. This oneof is known as a "synthetic" oneof, and
684
+ # this field must be its sole member (each proto3 optional field gets its own
685
+ # synthetic oneof). Synthetic oneofs exist in the descriptor only, and do not
686
+ # generate any API. Synthetic oneofs must be ordered after all "real" oneofs.
687
+ # For message fields, proto3_optional doesn't create any semantic change, since
688
+ # non-repeated message fields always track presence. However it still indicates
689
+ # the semantic detail of whether the user wrote "optional" or not. This can be
690
+ # useful for round-tripping the .proto file. For consistency we give message
691
+ # fields a synthetic oneof also, even though it is not required to track
692
+ # presence. This is especially important because the parser can't tell if a
693
+ # field is a message or an enum, so it must always create a synthetic oneof.
694
+ # Proto2 optional fields do not set this flag, because they already indicate
695
+ # optional with `LABEL_OPTIONAL`.
696
+ # Corresponds to the JSON property `proto3Optional`
697
+ # @return [Boolean]
698
+ attr_accessor :proto3_optional
699
+ alias_method :proto3_optional?, :proto3_optional
700
+
701
+ # If type_name is set, this need not be set. If both this and type_name are set,
702
+ # this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
703
+ # Corresponds to the JSON property `type`
704
+ # @return [String]
705
+ attr_accessor :type
706
+
707
+ # For message and enum types, this is the name of the type. If the name starts
708
+ # with a '.', it is fully-qualified. Otherwise, C++-like scoping rules are used
709
+ # to find the type (i.e. first the nested types within this message are searched,
710
+ # then within the parent, on up to the root namespace).
711
+ # Corresponds to the JSON property `typeName`
712
+ # @return [String]
713
+ attr_accessor :type_name
714
+
715
+ def initialize(**args)
716
+ update!(**args)
717
+ end
718
+
719
+ # Update properties of this object
720
+ def update!(**args)
721
+ @default_value = args[:default_value] if args.key?(:default_value)
722
+ @json_name = args[:json_name] if args.key?(:json_name)
723
+ @label = args[:label] if args.key?(:label)
724
+ @name = args[:name] if args.key?(:name)
725
+ @number = args[:number] if args.key?(:number)
726
+ @oneof_index = args[:oneof_index] if args.key?(:oneof_index)
727
+ @proto3_optional = args[:proto3_optional] if args.key?(:proto3_optional)
728
+ @type = args[:type] if args.key?(:type)
729
+ @type_name = args[:type_name] if args.key?(:type_name)
730
+ end
731
+ end
732
+
733
+ # Describes a complete .proto file.
734
+ class Proto2FileDescriptorProto
735
+ include Google::Apis::Core::Hashable
736
+
737
+ #
738
+ # Corresponds to the JSON property `enumType`
739
+ # @return [Array<Google::Apis::ChromepolicyV1::Proto2EnumDescriptorProto>]
740
+ attr_accessor :enum_type
741
+
742
+ # All top-level definitions in this file.
743
+ # Corresponds to the JSON property `messageType`
744
+ # @return [Array<Google::Apis::ChromepolicyV1::Proto2DescriptorProto>]
745
+ attr_accessor :message_type
746
+
747
+ # file name, relative to root of source tree
748
+ # Corresponds to the JSON property `name`
749
+ # @return [String]
750
+ attr_accessor :name
751
+
752
+ # e.g. "foo", "foo.bar", etc.
753
+ # Corresponds to the JSON property `package`
754
+ # @return [String]
755
+ attr_accessor :package
756
+
757
+ # The syntax of the proto file. The supported values are "proto2" and "proto3".
758
+ # Corresponds to the JSON property `syntax`
759
+ # @return [String]
760
+ attr_accessor :syntax
761
+
762
+ def initialize(**args)
763
+ update!(**args)
764
+ end
765
+
766
+ # Update properties of this object
767
+ def update!(**args)
768
+ @enum_type = args[:enum_type] if args.key?(:enum_type)
769
+ @message_type = args[:message_type] if args.key?(:message_type)
770
+ @name = args[:name] if args.key?(:name)
771
+ @package = args[:package] if args.key?(:package)
772
+ @syntax = args[:syntax] if args.key?(:syntax)
773
+ end
774
+ end
775
+
776
+ # Describes a oneof.
777
+ class Proto2OneofDescriptorProto
778
+ include Google::Apis::Core::Hashable
779
+
780
+ #
781
+ # Corresponds to the JSON property `name`
782
+ # @return [String]
783
+ attr_accessor :name
784
+
785
+ def initialize(**args)
786
+ update!(**args)
787
+ end
788
+
789
+ # Update properties of this object
790
+ def update!(**args)
791
+ @name = args[:name] if args.key?(:name)
792
+ end
793
+ end
794
+ end
795
+ end
796
+ end