1// Copyright 2021 Google LLC.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Code generated file. DO NOT EDIT.
6
7// Package chromepolicy provides access to the Chrome Policy API.
8//
9// For product documentation, see: http://developers.google.com/chrome/policy
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/chromepolicy/v1"
16//   ...
17//   ctx := context.Background()
18//   chromepolicyService, err := chromepolicy.NewService(ctx)
19//
20// In this example, Google Application Default Credentials are used for authentication.
21//
22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
23//
24// Other authentication options
25//
26// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
27//
28//   chromepolicyService, err := chromepolicy.NewService(ctx, option.WithScopes(chromepolicy.ChromeManagementPolicyReadonlyScope))
29//
30// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
31//
32//   chromepolicyService, err := chromepolicy.NewService(ctx, option.WithAPIKey("AIza..."))
33//
34// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
35//
36//   config := &oauth2.Config{...}
37//   // ...
38//   token, err := config.Exchange(ctx, ...)
39//   chromepolicyService, err := chromepolicy.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
40//
41// See https://godoc.org/google.golang.org/api/option/ for details on options.
42package chromepolicy // import "google.golang.org/api/chromepolicy/v1"
43
44import (
45	"bytes"
46	"context"
47	"encoding/json"
48	"errors"
49	"fmt"
50	"io"
51	"net/http"
52	"net/url"
53	"strconv"
54	"strings"
55
56	googleapi "google.golang.org/api/googleapi"
57	gensupport "google.golang.org/api/internal/gensupport"
58	option "google.golang.org/api/option"
59	internaloption "google.golang.org/api/option/internaloption"
60	htransport "google.golang.org/api/transport/http"
61)
62
63// Always reference these packages, just in case the auto-generated code
64// below doesn't.
65var _ = bytes.NewBuffer
66var _ = strconv.Itoa
67var _ = fmt.Sprintf
68var _ = json.NewDecoder
69var _ = io.Copy
70var _ = url.Parse
71var _ = gensupport.MarshalJSON
72var _ = googleapi.Version
73var _ = errors.New
74var _ = strings.Replace
75var _ = context.Canceled
76var _ = internaloption.WithDefaultEndpoint
77
78const apiId = "chromepolicy:v1"
79const apiName = "chromepolicy"
80const apiVersion = "v1"
81const basePath = "https://chromepolicy.googleapis.com/"
82const mtlsBasePath = "https://chromepolicy.mtls.googleapis.com/"
83
84// OAuth2 scopes used by this API.
85const (
86	// See, edit, create or delete policies applied to Chrome OS and Chrome
87	// Browsers managed within your organization
88	ChromeManagementPolicyScope = "https://www.googleapis.com/auth/chrome.management.policy"
89
90	// See policies applied to Chrome OS and Chrome Browsers managed within
91	// your organization
92	ChromeManagementPolicyReadonlyScope = "https://www.googleapis.com/auth/chrome.management.policy.readonly"
93)
94
95// NewService creates a new Service.
96func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
97	scopesOption := option.WithScopes(
98		"https://www.googleapis.com/auth/chrome.management.policy",
99		"https://www.googleapis.com/auth/chrome.management.policy.readonly",
100	)
101	// NOTE: prepend, so we don't override user-specified scopes.
102	opts = append([]option.ClientOption{scopesOption}, opts...)
103	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
104	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
105	client, endpoint, err := htransport.NewClient(ctx, opts...)
106	if err != nil {
107		return nil, err
108	}
109	s, err := New(client)
110	if err != nil {
111		return nil, err
112	}
113	if endpoint != "" {
114		s.BasePath = endpoint
115	}
116	return s, nil
117}
118
119// New creates a new Service. It uses the provided http.Client for requests.
120//
121// Deprecated: please use NewService instead.
122// To provide a custom HTTP client, use option.WithHTTPClient.
123// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
124func New(client *http.Client) (*Service, error) {
125	if client == nil {
126		return nil, errors.New("client is nil")
127	}
128	s := &Service{client: client, BasePath: basePath}
129	s.Customers = NewCustomersService(s)
130	s.Media = NewMediaService(s)
131	return s, nil
132}
133
134type Service struct {
135	client    *http.Client
136	BasePath  string // API endpoint base URL
137	UserAgent string // optional additional User-Agent fragment
138
139	Customers *CustomersService
140
141	Media *MediaService
142}
143
144func (s *Service) userAgent() string {
145	if s.UserAgent == "" {
146		return googleapi.UserAgent
147	}
148	return googleapi.UserAgent + " " + s.UserAgent
149}
150
151func NewCustomersService(s *Service) *CustomersService {
152	rs := &CustomersService{s: s}
153	rs.Policies = NewCustomersPoliciesService(s)
154	rs.PolicySchemas = NewCustomersPolicySchemasService(s)
155	return rs
156}
157
158type CustomersService struct {
159	s *Service
160
161	Policies *CustomersPoliciesService
162
163	PolicySchemas *CustomersPolicySchemasService
164}
165
166func NewCustomersPoliciesService(s *Service) *CustomersPoliciesService {
167	rs := &CustomersPoliciesService{s: s}
168	rs.Orgunits = NewCustomersPoliciesOrgunitsService(s)
169	return rs
170}
171
172type CustomersPoliciesService struct {
173	s *Service
174
175	Orgunits *CustomersPoliciesOrgunitsService
176}
177
178func NewCustomersPoliciesOrgunitsService(s *Service) *CustomersPoliciesOrgunitsService {
179	rs := &CustomersPoliciesOrgunitsService{s: s}
180	return rs
181}
182
183type CustomersPoliciesOrgunitsService struct {
184	s *Service
185}
186
187func NewCustomersPolicySchemasService(s *Service) *CustomersPolicySchemasService {
188	rs := &CustomersPolicySchemasService{s: s}
189	return rs
190}
191
192type CustomersPolicySchemasService struct {
193	s *Service
194}
195
196func NewMediaService(s *Service) *MediaService {
197	rs := &MediaService{s: s}
198	return rs
199}
200
201type MediaService struct {
202	s *Service
203}
204
205// GoogleChromePolicyV1AdditionalTargetKeyName: Additional key names
206// that will be used to identify the target of the policy value.
207type GoogleChromePolicyV1AdditionalTargetKeyName struct {
208	// Key: Key name.
209	Key string `json:"key,omitempty"`
210
211	// KeyDescription: Key description.
212	KeyDescription string `json:"keyDescription,omitempty"`
213
214	// ForceSendFields is a list of field names (e.g. "Key") to
215	// unconditionally include in API requests. By default, fields with
216	// empty values are omitted from API requests. However, any non-pointer,
217	// non-interface field appearing in ForceSendFields will be sent to the
218	// server regardless of whether the field is empty or not. This may be
219	// used to include empty fields in Patch requests.
220	ForceSendFields []string `json:"-"`
221
222	// NullFields is a list of field names (e.g. "Key") to include in API
223	// requests with the JSON null value. By default, fields with empty
224	// values are omitted from API requests. However, any field with an
225	// empty value appearing in NullFields will be sent to the server as
226	// null. It is an error if a field in this list has a non-empty value.
227	// This may be used to include null fields in Patch requests.
228	NullFields []string `json:"-"`
229}
230
231func (s *GoogleChromePolicyV1AdditionalTargetKeyName) MarshalJSON() ([]byte, error) {
232	type NoMethod GoogleChromePolicyV1AdditionalTargetKeyName
233	raw := NoMethod(*s)
234	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
235}
236
237// GoogleChromePolicyV1BatchInheritOrgUnitPoliciesRequest: Request
238// message for specifying that multiple policy values inherit their
239// value from their parents.
240type GoogleChromePolicyV1BatchInheritOrgUnitPoliciesRequest struct {
241	// Requests: List of policies that have to inherit their values as
242	// defined by the `requests`. All requests in the list must follow these
243	// restrictions: 1. All schemas in the list must have the same root
244	// namespace. 2. All `policyTargetKey.targetResource` values must point
245	// to an org unit resource. 3. All `policyTargetKey` values must have
246	// the same key names in the ` additionalTargetKeys`. This also means if
247	// one of the targets has an empty `additionalTargetKeys` map, all of
248	// the targets must have an empty `additionalTargetKeys` map. 4. No two
249	// modification requests can reference the same `policySchema` + `
250	// policyTargetKey` pair.
251	Requests []*GoogleChromePolicyV1InheritOrgUnitPolicyRequest `json:"requests,omitempty"`
252
253	// ForceSendFields is a list of field names (e.g. "Requests") to
254	// unconditionally include in API requests. By default, fields with
255	// empty values are omitted from API requests. However, any non-pointer,
256	// non-interface field appearing in ForceSendFields will be sent to the
257	// server regardless of whether the field is empty or not. This may be
258	// used to include empty fields in Patch requests.
259	ForceSendFields []string `json:"-"`
260
261	// NullFields is a list of field names (e.g. "Requests") to include in
262	// API requests with the JSON null value. By default, fields with empty
263	// values are omitted from API requests. However, any field with an
264	// empty value appearing in NullFields will be sent to the server as
265	// null. It is an error if a field in this list has a non-empty value.
266	// This may be used to include null fields in Patch requests.
267	NullFields []string `json:"-"`
268}
269
270func (s *GoogleChromePolicyV1BatchInheritOrgUnitPoliciesRequest) MarshalJSON() ([]byte, error) {
271	type NoMethod GoogleChromePolicyV1BatchInheritOrgUnitPoliciesRequest
272	raw := NoMethod(*s)
273	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
274}
275
276// GoogleChromePolicyV1BatchModifyOrgUnitPoliciesRequest: Request
277// message for modifying multiple policy values for a specific target.
278type GoogleChromePolicyV1BatchModifyOrgUnitPoliciesRequest struct {
279	// Requests: List of policies to modify as defined by the `requests`.
280	// All requests in the list must follow these restrictions: 1. All
281	// schemas in the list must have the same root namespace. 2. All
282	// `policyTargetKey.targetResource` values must point to an org unit
283	// resource. 3. All `policyTargetKey` values must have the same key
284	// names in the ` additionalTargetKeys`. This also means if one of the
285	// targets has an empty `additionalTargetKeys` map, all of the targets
286	// must have an empty `additionalTargetKeys` map. 4. No two modification
287	// requests can reference the same `policySchema` + ` policyTargetKey`
288	// pair.
289	Requests []*GoogleChromePolicyV1ModifyOrgUnitPolicyRequest `json:"requests,omitempty"`
290
291	// ForceSendFields is a list of field names (e.g. "Requests") to
292	// unconditionally include in API requests. By default, fields with
293	// empty values are omitted from API requests. However, any non-pointer,
294	// non-interface field appearing in ForceSendFields will be sent to the
295	// server regardless of whether the field is empty or not. This may be
296	// used to include empty fields in Patch requests.
297	ForceSendFields []string `json:"-"`
298
299	// NullFields is a list of field names (e.g. "Requests") to include in
300	// API requests with the JSON null value. By default, fields with empty
301	// values are omitted from API requests. However, any field with an
302	// empty value appearing in NullFields will be sent to the server as
303	// null. It is an error if a field in this list has a non-empty value.
304	// This may be used to include null fields in Patch requests.
305	NullFields []string `json:"-"`
306}
307
308func (s *GoogleChromePolicyV1BatchModifyOrgUnitPoliciesRequest) MarshalJSON() ([]byte, error) {
309	type NoMethod GoogleChromePolicyV1BatchModifyOrgUnitPoliciesRequest
310	raw := NoMethod(*s)
311	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
312}
313
314// GoogleChromePolicyV1InheritOrgUnitPolicyRequest: Request parameters
315// for inheriting policy value of a specific org unit target from the
316// policy value of its parent org unit.
317type GoogleChromePolicyV1InheritOrgUnitPolicyRequest struct {
318	// PolicySchema: The fully qualified name of the policy schema that is
319	// being inherited.
320	PolicySchema string `json:"policySchema,omitempty"`
321
322	// PolicyTargetKey: Required. The key of the target for which we want to
323	// modify a policy. The target resource must point to an Org Unit.
324	PolicyTargetKey *GoogleChromePolicyV1PolicyTargetKey `json:"policyTargetKey,omitempty"`
325
326	// ForceSendFields is a list of field names (e.g. "PolicySchema") to
327	// unconditionally include in API requests. By default, fields with
328	// empty values are omitted from API requests. However, any non-pointer,
329	// non-interface field appearing in ForceSendFields will be sent to the
330	// server regardless of whether the field is empty or not. This may be
331	// used to include empty fields in Patch requests.
332	ForceSendFields []string `json:"-"`
333
334	// NullFields is a list of field names (e.g. "PolicySchema") to include
335	// in API requests with the JSON null value. By default, fields with
336	// empty values are omitted from API requests. However, any field with
337	// an empty value appearing in NullFields will be sent to the server as
338	// null. It is an error if a field in this list has a non-empty value.
339	// This may be used to include null fields in Patch requests.
340	NullFields []string `json:"-"`
341}
342
343func (s *GoogleChromePolicyV1InheritOrgUnitPolicyRequest) MarshalJSON() ([]byte, error) {
344	type NoMethod GoogleChromePolicyV1InheritOrgUnitPolicyRequest
345	raw := NoMethod(*s)
346	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
347}
348
349// GoogleChromePolicyV1ListPolicySchemasResponse: Response message for
350// listing policy schemas that match a filter.
351type GoogleChromePolicyV1ListPolicySchemasResponse struct {
352	// NextPageToken: The page token used to get the next page of policy
353	// schemas.
354	NextPageToken string `json:"nextPageToken,omitempty"`
355
356	// PolicySchemas: The list of policy schemas that match the query.
357	PolicySchemas []*GoogleChromePolicyV1PolicySchema `json:"policySchemas,omitempty"`
358
359	// ServerResponse contains the HTTP response code and headers from the
360	// server.
361	googleapi.ServerResponse `json:"-"`
362
363	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
364	// unconditionally include in API requests. By default, fields with
365	// empty values are omitted from API requests. However, any non-pointer,
366	// non-interface field appearing in ForceSendFields will be sent to the
367	// server regardless of whether the field is empty or not. This may be
368	// used to include empty fields in Patch requests.
369	ForceSendFields []string `json:"-"`
370
371	// NullFields is a list of field names (e.g. "NextPageToken") to include
372	// in API requests with the JSON null value. By default, fields with
373	// empty values are omitted from API requests. However, any field with
374	// an empty value appearing in NullFields will be sent to the server as
375	// null. It is an error if a field in this list has a non-empty value.
376	// This may be used to include null fields in Patch requests.
377	NullFields []string `json:"-"`
378}
379
380func (s *GoogleChromePolicyV1ListPolicySchemasResponse) MarshalJSON() ([]byte, error) {
381	type NoMethod GoogleChromePolicyV1ListPolicySchemasResponse
382	raw := NoMethod(*s)
383	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
384}
385
386// GoogleChromePolicyV1ModifyOrgUnitPolicyRequest: Request parameters
387// for modifying a policy value for a specific org unit target.
388type GoogleChromePolicyV1ModifyOrgUnitPolicyRequest struct {
389	// PolicyTargetKey: Required. The key of the target for which we want to
390	// modify a policy. The target resource must point to an Org Unit.
391	PolicyTargetKey *GoogleChromePolicyV1PolicyTargetKey `json:"policyTargetKey,omitempty"`
392
393	// PolicyValue: The new value for the policy.
394	PolicyValue *GoogleChromePolicyV1PolicyValue `json:"policyValue,omitempty"`
395
396	// UpdateMask: Required. Policy fields to update. Only fields in this
397	// mask will be updated; other fields in `policy_value` will be ignored
398	// (even if they have values). If a field is in this list it must have a
399	// value in 'policy_value'.
400	UpdateMask string `json:"updateMask,omitempty"`
401
402	// ForceSendFields is a list of field names (e.g. "PolicyTargetKey") to
403	// unconditionally include in API requests. By default, fields with
404	// empty values are omitted from API requests. However, any non-pointer,
405	// non-interface field appearing in ForceSendFields will be sent to the
406	// server regardless of whether the field is empty or not. This may be
407	// used to include empty fields in Patch requests.
408	ForceSendFields []string `json:"-"`
409
410	// NullFields is a list of field names (e.g. "PolicyTargetKey") to
411	// include in API requests with the JSON null value. By default, fields
412	// with empty values are omitted from API requests. However, any field
413	// with an empty value appearing in NullFields will be sent to the
414	// server as null. It is an error if a field in this list has a
415	// non-empty value. This may be used to include null fields in Patch
416	// requests.
417	NullFields []string `json:"-"`
418}
419
420func (s *GoogleChromePolicyV1ModifyOrgUnitPolicyRequest) MarshalJSON() ([]byte, error) {
421	type NoMethod GoogleChromePolicyV1ModifyOrgUnitPolicyRequest
422	raw := NoMethod(*s)
423	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
424}
425
426// GoogleChromePolicyV1PolicySchema: Resource representing a policy
427// schema. Next ID: 10
428type GoogleChromePolicyV1PolicySchema struct {
429	// AccessRestrictions: Output only. Specific access restrictions related
430	// to this policy.
431	AccessRestrictions []string `json:"accessRestrictions,omitempty"`
432
433	// AdditionalTargetKeyNames: Output only. Additional key names that will
434	// be used to identify the target of the policy value. When specifying a
435	// `policyTargetKey`, each of the additional keys specified here will
436	// have to be included in the `additionalTargetKeys` map.
437	AdditionalTargetKeyNames []*GoogleChromePolicyV1AdditionalTargetKeyName `json:"additionalTargetKeyNames,omitempty"`
438
439	// Definition: Schema definition using proto descriptor.
440	Definition *Proto2FileDescriptorProto `json:"definition,omitempty"`
441
442	// FieldDescriptions: Output only. Detailed description of each field
443	// that is part of the schema.
444	FieldDescriptions []*GoogleChromePolicyV1PolicySchemaFieldDescription `json:"fieldDescriptions,omitempty"`
445
446	// Name: Format:
447	// name=customers/{customer}/policySchemas/{schema_namespace}
448	Name string `json:"name,omitempty"`
449
450	// Notices: Output only. Special notice messages related to setting
451	// certain values in certain fields in the schema.
452	Notices []*GoogleChromePolicyV1PolicySchemaNoticeDescription `json:"notices,omitempty"`
453
454	// PolicyDescription: Output only. Description about the policy schema
455	// for user consumption.
456	PolicyDescription string `json:"policyDescription,omitempty"`
457
458	// SchemaName: Output only. The full qualified name of the policy
459	// schema. This value is used to fill the field `policy_schema` in
460	// PolicyValue when calling BatchInheritOrgUnitPolicies or
461	// BatchModifyOrgUnitPolicies.
462	SchemaName string `json:"schemaName,omitempty"`
463
464	// SupportUri: Output only. URI to related support article for this
465	// schema.
466	SupportUri string `json:"supportUri,omitempty"`
467
468	// ServerResponse contains the HTTP response code and headers from the
469	// server.
470	googleapi.ServerResponse `json:"-"`
471
472	// ForceSendFields is a list of field names (e.g. "AccessRestrictions")
473	// to unconditionally include in API requests. By default, fields with
474	// empty values are omitted from API requests. However, any non-pointer,
475	// non-interface field appearing in ForceSendFields will be sent to the
476	// server regardless of whether the field is empty or not. This may be
477	// used to include empty fields in Patch requests.
478	ForceSendFields []string `json:"-"`
479
480	// NullFields is a list of field names (e.g. "AccessRestrictions") to
481	// include in API requests with the JSON null value. By default, fields
482	// with empty values are omitted from API requests. However, any field
483	// with an empty value appearing in NullFields will be sent to the
484	// server as null. It is an error if a field in this list has a
485	// non-empty value. This may be used to include null fields in Patch
486	// requests.
487	NullFields []string `json:"-"`
488}
489
490func (s *GoogleChromePolicyV1PolicySchema) MarshalJSON() ([]byte, error) {
491	type NoMethod GoogleChromePolicyV1PolicySchema
492	raw := NoMethod(*s)
493	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
494}
495
496// GoogleChromePolicyV1PolicySchemaFieldDescription: Provides detailed
497// information for a particular field that is part of a PolicySchema.
498type GoogleChromePolicyV1PolicySchemaFieldDescription struct {
499	// Description: Output only. The description for the field.
500	Description string `json:"description,omitempty"`
501
502	// Field: Output only. The name of the field for associated with this
503	// description.
504	Field string `json:"field,omitempty"`
505
506	// InputConstraint: Output only. Any input constraints associated on the
507	// values for the field.
508	InputConstraint string `json:"inputConstraint,omitempty"`
509
510	// KnownValueDescriptions: Output only. If the field has a set of know
511	// values, this field will provide a description for these values.
512	KnownValueDescriptions []*GoogleChromePolicyV1PolicySchemaFieldKnownValueDescription `json:"knownValueDescriptions,omitempty"`
513
514	// NestedFieldDescriptions: Output only. Provides the description of the
515	// fields nested in this field, if the field is a message type that
516	// defines multiple fields.
517	NestedFieldDescriptions []*GoogleChromePolicyV1PolicySchemaFieldDescription `json:"nestedFieldDescriptions,omitempty"`
518
519	// ForceSendFields is a list of field names (e.g. "Description") to
520	// unconditionally include in API requests. By default, fields with
521	// empty values are omitted from API requests. However, any non-pointer,
522	// non-interface field appearing in ForceSendFields will be sent to the
523	// server regardless of whether the field is empty or not. This may be
524	// used to include empty fields in Patch requests.
525	ForceSendFields []string `json:"-"`
526
527	// NullFields is a list of field names (e.g. "Description") to include
528	// in API requests with the JSON null value. By default, fields with
529	// empty values are omitted from API requests. However, any field with
530	// an empty value appearing in NullFields will be sent to the server as
531	// null. It is an error if a field in this list has a non-empty value.
532	// This may be used to include null fields in Patch requests.
533	NullFields []string `json:"-"`
534}
535
536func (s *GoogleChromePolicyV1PolicySchemaFieldDescription) MarshalJSON() ([]byte, error) {
537	type NoMethod GoogleChromePolicyV1PolicySchemaFieldDescription
538	raw := NoMethod(*s)
539	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
540}
541
542// GoogleChromePolicyV1PolicySchemaFieldKnownValueDescription: Provides
543// detailed information about a known value that is allowed for a
544// particular field in a PolicySchema.
545type GoogleChromePolicyV1PolicySchemaFieldKnownValueDescription struct {
546	// Description: Output only. Additional description for this value.
547	Description string `json:"description,omitempty"`
548
549	// Value: Output only. The string represenstation of the value that can
550	// be set for the field.
551	Value string `json:"value,omitempty"`
552
553	// ForceSendFields is a list of field names (e.g. "Description") to
554	// unconditionally include in API requests. By default, fields with
555	// empty values are omitted from API requests. However, any non-pointer,
556	// non-interface field appearing in ForceSendFields will be sent to the
557	// server regardless of whether the field is empty or not. This may be
558	// used to include empty fields in Patch requests.
559	ForceSendFields []string `json:"-"`
560
561	// NullFields is a list of field names (e.g. "Description") to include
562	// in API requests with the JSON null value. By default, fields with
563	// empty values are omitted from API requests. However, any field with
564	// an empty value appearing in NullFields will be sent to the server as
565	// null. It is an error if a field in this list has a non-empty value.
566	// This may be used to include null fields in Patch requests.
567	NullFields []string `json:"-"`
568}
569
570func (s *GoogleChromePolicyV1PolicySchemaFieldKnownValueDescription) MarshalJSON() ([]byte, error) {
571	type NoMethod GoogleChromePolicyV1PolicySchemaFieldKnownValueDescription
572	raw := NoMethod(*s)
573	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
574}
575
576// GoogleChromePolicyV1PolicySchemaNoticeDescription: Provides special
577// notice messages related to a particular value in a field that is part
578// of a PolicySchema.
579type GoogleChromePolicyV1PolicySchemaNoticeDescription struct {
580	// AcknowledgementRequired: Output only. Whether the user needs to
581	// acknowledge the notice message before the value can be set.
582	AcknowledgementRequired bool `json:"acknowledgementRequired,omitempty"`
583
584	// Field: Output only. The field name associated with the notice.
585	Field string `json:"field,omitempty"`
586
587	// NoticeMessage: Output only. The notice message associate with the
588	// value of the field.
589	NoticeMessage string `json:"noticeMessage,omitempty"`
590
591	// NoticeValue: Output only. The value of the field that has a notice.
592	// When setting the field to this value, the user may be required to
593	// acknowledge the notice message in order for the value to be set.
594	NoticeValue string `json:"noticeValue,omitempty"`
595
596	// ForceSendFields is a list of field names (e.g.
597	// "AcknowledgementRequired") to unconditionally include in API
598	// requests. By default, fields with empty values are omitted from API
599	// requests. However, any non-pointer, non-interface field appearing in
600	// ForceSendFields will be sent to the server regardless of whether the
601	// field is empty or not. This may be used to include empty fields in
602	// Patch requests.
603	ForceSendFields []string `json:"-"`
604
605	// NullFields is a list of field names (e.g. "AcknowledgementRequired")
606	// to include in API requests with the JSON null value. By default,
607	// fields with empty values are omitted from API requests. However, any
608	// field with an empty value appearing in NullFields will be sent to the
609	// server as null. It is an error if a field in this list has a
610	// non-empty value. This may be used to include null fields in Patch
611	// requests.
612	NullFields []string `json:"-"`
613}
614
615func (s *GoogleChromePolicyV1PolicySchemaNoticeDescription) MarshalJSON() ([]byte, error) {
616	type NoMethod GoogleChromePolicyV1PolicySchemaNoticeDescription
617	raw := NoMethod(*s)
618	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
619}
620
621// GoogleChromePolicyV1PolicyTargetKey: The key used to identify the
622// target on which the policy will be applied.
623type GoogleChromePolicyV1PolicyTargetKey struct {
624	// AdditionalTargetKeys: Map containing the additional target key name
625	// and value pairs used to further identify the target of the policy.
626	AdditionalTargetKeys map[string]string `json:"additionalTargetKeys,omitempty"`
627
628	// TargetResource: The target resource on which this policy is applied.
629	// The following resources are supported: * Organizational Unit
630	// ("orgunits/{orgunit_id}")
631	TargetResource string `json:"targetResource,omitempty"`
632
633	// ForceSendFields is a list of field names (e.g.
634	// "AdditionalTargetKeys") to unconditionally include in API requests.
635	// By default, fields with empty values are omitted from API requests.
636	// However, any non-pointer, non-interface field appearing in
637	// ForceSendFields will be sent to the server regardless of whether the
638	// field is empty or not. This may be used to include empty fields in
639	// Patch requests.
640	ForceSendFields []string `json:"-"`
641
642	// NullFields is a list of field names (e.g. "AdditionalTargetKeys") to
643	// include in API requests with the JSON null value. By default, fields
644	// with empty values are omitted from API requests. However, any field
645	// with an empty value appearing in NullFields will be sent to the
646	// server as null. It is an error if a field in this list has a
647	// non-empty value. This may be used to include null fields in Patch
648	// requests.
649	NullFields []string `json:"-"`
650}
651
652func (s *GoogleChromePolicyV1PolicyTargetKey) MarshalJSON() ([]byte, error) {
653	type NoMethod GoogleChromePolicyV1PolicyTargetKey
654	raw := NoMethod(*s)
655	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
656}
657
658// GoogleChromePolicyV1PolicyValue: A particular value for a policy
659// managed by the service.
660type GoogleChromePolicyV1PolicyValue struct {
661	// PolicySchema: The fully qualified name of the policy schema
662	// associated with this policy.
663	PolicySchema string `json:"policySchema,omitempty"`
664
665	// Value: The value of the policy that is compatible with the schema
666	// that it is associated with.
667	Value googleapi.RawMessage `json:"value,omitempty"`
668
669	// ForceSendFields is a list of field names (e.g. "PolicySchema") to
670	// unconditionally include in API requests. By default, fields with
671	// empty values are omitted from API requests. However, any non-pointer,
672	// non-interface field appearing in ForceSendFields will be sent to the
673	// server regardless of whether the field is empty or not. This may be
674	// used to include empty fields in Patch requests.
675	ForceSendFields []string `json:"-"`
676
677	// NullFields is a list of field names (e.g. "PolicySchema") to include
678	// in API requests with the JSON null value. By default, fields with
679	// empty values are omitted from API requests. However, any field with
680	// an empty value appearing in NullFields will be sent to the server as
681	// null. It is an error if a field in this list has a non-empty value.
682	// This may be used to include null fields in Patch requests.
683	NullFields []string `json:"-"`
684}
685
686func (s *GoogleChromePolicyV1PolicyValue) MarshalJSON() ([]byte, error) {
687	type NoMethod GoogleChromePolicyV1PolicyValue
688	raw := NoMethod(*s)
689	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
690}
691
692// GoogleChromePolicyV1ResolveRequest: Request message for getting the
693// resolved policy value for a specific target.
694type GoogleChromePolicyV1ResolveRequest struct {
695	// PageSize: The maximum number of policies to return, defaults to 100
696	// and has a maximum of 1000.
697	PageSize int64 `json:"pageSize,omitempty"`
698
699	// PageToken: The page token used to retrieve a specific page of the
700	// request.
701	PageToken string `json:"pageToken,omitempty"`
702
703	// PolicySchemaFilter: The schema filter to apply to the resolve
704	// request. Specify a schema name to view a particular schema, for
705	// example: chrome.users.ShowLogoutButton Wildcards are supported, but
706	// only in the leaf portion of the schema name. Wildcards cannot be used
707	// in namespace directly. Please read
708	// https://developers.google.com/chrome/chrome-management/guides/policyapi
709	// for details on schema namepsaces. For example: Valid:
710	// "chrome.users.*", "chrome.users.apps.*", "chrome.printers.*" Invalid:
711	// "*", "*.users", "chrome.*", "chrome.*.apps.*"
712	PolicySchemaFilter string `json:"policySchemaFilter,omitempty"`
713
714	// PolicyTargetKey: Required. The key of the target resource on which
715	// the policies should be resolved. The target resource must point to an
716	// Org Unit.
717	PolicyTargetKey *GoogleChromePolicyV1PolicyTargetKey `json:"policyTargetKey,omitempty"`
718
719	// ForceSendFields is a list of field names (e.g. "PageSize") to
720	// unconditionally include in API requests. By default, fields with
721	// empty values are omitted from API requests. However, any non-pointer,
722	// non-interface field appearing in ForceSendFields will be sent to the
723	// server regardless of whether the field is empty or not. This may be
724	// used to include empty fields in Patch requests.
725	ForceSendFields []string `json:"-"`
726
727	// NullFields is a list of field names (e.g. "PageSize") to include in
728	// API requests with the JSON null value. By default, fields with empty
729	// values are omitted from API requests. However, any field with an
730	// empty value appearing in NullFields will be sent to the server as
731	// null. It is an error if a field in this list has a non-empty value.
732	// This may be used to include null fields in Patch requests.
733	NullFields []string `json:"-"`
734}
735
736func (s *GoogleChromePolicyV1ResolveRequest) MarshalJSON() ([]byte, error) {
737	type NoMethod GoogleChromePolicyV1ResolveRequest
738	raw := NoMethod(*s)
739	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
740}
741
742// GoogleChromePolicyV1ResolveResponse: Response message for getting the
743// resolved policy value for a specific target.
744type GoogleChromePolicyV1ResolveResponse struct {
745	// NextPageToken: The page token used to get the next set of resolved
746	// policies found by the request.
747	NextPageToken string `json:"nextPageToken,omitempty"`
748
749	// ResolvedPolicies: The list of resolved policies found by the resolve
750	// request.
751	ResolvedPolicies []*GoogleChromePolicyV1ResolvedPolicy `json:"resolvedPolicies,omitempty"`
752
753	// ServerResponse contains the HTTP response code and headers from the
754	// server.
755	googleapi.ServerResponse `json:"-"`
756
757	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
758	// unconditionally include in API requests. By default, fields with
759	// empty values are omitted from API requests. However, any non-pointer,
760	// non-interface field appearing in ForceSendFields will be sent to the
761	// server regardless of whether the field is empty or not. This may be
762	// used to include empty fields in Patch requests.
763	ForceSendFields []string `json:"-"`
764
765	// NullFields is a list of field names (e.g. "NextPageToken") to include
766	// in API requests with the JSON null value. By default, fields with
767	// empty values are omitted from API requests. However, any field with
768	// an empty value appearing in NullFields will be sent to the server as
769	// null. It is an error if a field in this list has a non-empty value.
770	// This may be used to include null fields in Patch requests.
771	NullFields []string `json:"-"`
772}
773
774func (s *GoogleChromePolicyV1ResolveResponse) MarshalJSON() ([]byte, error) {
775	type NoMethod GoogleChromePolicyV1ResolveResponse
776	raw := NoMethod(*s)
777	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
778}
779
780// GoogleChromePolicyV1ResolvedPolicy: The resolved value of a policy
781// for a given target.
782type GoogleChromePolicyV1ResolvedPolicy struct {
783	// SourceKey: Output only. The source resource from which this policy
784	// value is obtained. May be the same as `targetKey` if the policy is
785	// directly modified on the target, otherwise it would be another
786	// resource from which the policy gets its value (if applicable). If not
787	// present, the source is the default value for the customer.
788	SourceKey *GoogleChromePolicyV1PolicyTargetKey `json:"sourceKey,omitempty"`
789
790	// TargetKey: Output only. The target resource for which the resolved
791	// policy value applies.
792	TargetKey *GoogleChromePolicyV1PolicyTargetKey `json:"targetKey,omitempty"`
793
794	// Value: Output only. The resolved value of the policy.
795	Value *GoogleChromePolicyV1PolicyValue `json:"value,omitempty"`
796
797	// ForceSendFields is a list of field names (e.g. "SourceKey") to
798	// unconditionally include in API requests. By default, fields with
799	// empty values are omitted from API requests. However, any non-pointer,
800	// non-interface field appearing in ForceSendFields will be sent to the
801	// server regardless of whether the field is empty or not. This may be
802	// used to include empty fields in Patch requests.
803	ForceSendFields []string `json:"-"`
804
805	// NullFields is a list of field names (e.g. "SourceKey") to include in
806	// API requests with the JSON null value. By default, fields with empty
807	// values are omitted from API requests. However, any field with an
808	// empty value appearing in NullFields will be sent to the server as
809	// null. It is an error if a field in this list has a non-empty value.
810	// This may be used to include null fields in Patch requests.
811	NullFields []string `json:"-"`
812}
813
814func (s *GoogleChromePolicyV1ResolvedPolicy) MarshalJSON() ([]byte, error) {
815	type NoMethod GoogleChromePolicyV1ResolvedPolicy
816	raw := NoMethod(*s)
817	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
818}
819
820// GoogleChromePolicyV1UploadPolicyFileRequest: Request message for
821// uploading a file for a policy. Next ID: 5
822type GoogleChromePolicyV1UploadPolicyFileRequest struct {
823	// PolicyField: Required. The fully qualified policy schema and field
824	// name this file is uploaded for. This information will be used to
825	// validate the content type of the file.
826	PolicyField string `json:"policyField,omitempty"`
827
828	// ForceSendFields is a list of field names (e.g. "PolicyField") to
829	// unconditionally include in API requests. By default, fields with
830	// empty values are omitted from API requests. However, any non-pointer,
831	// non-interface field appearing in ForceSendFields will be sent to the
832	// server regardless of whether the field is empty or not. This may be
833	// used to include empty fields in Patch requests.
834	ForceSendFields []string `json:"-"`
835
836	// NullFields is a list of field names (e.g. "PolicyField") to include
837	// in API requests with the JSON null value. By default, fields with
838	// empty values are omitted from API requests. However, any field with
839	// an empty value appearing in NullFields will be sent to the server as
840	// null. It is an error if a field in this list has a non-empty value.
841	// This may be used to include null fields in Patch requests.
842	NullFields []string `json:"-"`
843}
844
845func (s *GoogleChromePolicyV1UploadPolicyFileRequest) MarshalJSON() ([]byte, error) {
846	type NoMethod GoogleChromePolicyV1UploadPolicyFileRequest
847	raw := NoMethod(*s)
848	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
849}
850
851// GoogleChromePolicyV1UploadPolicyFileResponse: Response message for
852// downloading an uploaded file. Next ID: 2
853type GoogleChromePolicyV1UploadPolicyFileResponse struct {
854	// DownloadUri: The uri for end user to download the file.
855	DownloadUri string `json:"downloadUri,omitempty"`
856
857	// ServerResponse contains the HTTP response code and headers from the
858	// server.
859	googleapi.ServerResponse `json:"-"`
860
861	// ForceSendFields is a list of field names (e.g. "DownloadUri") to
862	// unconditionally include in API requests. By default, fields with
863	// empty values are omitted from API requests. However, any non-pointer,
864	// non-interface field appearing in ForceSendFields will be sent to the
865	// server regardless of whether the field is empty or not. This may be
866	// used to include empty fields in Patch requests.
867	ForceSendFields []string `json:"-"`
868
869	// NullFields is a list of field names (e.g. "DownloadUri") to include
870	// in API requests with the JSON null value. By default, fields with
871	// empty values are omitted from API requests. However, any field with
872	// an empty value appearing in NullFields will be sent to the server as
873	// null. It is an error if a field in this list has a non-empty value.
874	// This may be used to include null fields in Patch requests.
875	NullFields []string `json:"-"`
876}
877
878func (s *GoogleChromePolicyV1UploadPolicyFileResponse) MarshalJSON() ([]byte, error) {
879	type NoMethod GoogleChromePolicyV1UploadPolicyFileResponse
880	raw := NoMethod(*s)
881	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
882}
883
884// GoogleProtobufEmpty: A generic empty message that you can re-use to
885// avoid defining duplicated empty messages in your APIs. A typical
886// example is to use it as the request or the response type of an API
887// method. For instance: service Foo { rpc Bar(google.protobuf.Empty)
888// returns (google.protobuf.Empty); } The JSON representation for
889// `Empty` is empty JSON object `{}`.
890type GoogleProtobufEmpty struct {
891	// ServerResponse contains the HTTP response code and headers from the
892	// server.
893	googleapi.ServerResponse `json:"-"`
894}
895
896// Proto2DescriptorProto: Describes a message type.
897type Proto2DescriptorProto struct {
898	EnumType []*Proto2EnumDescriptorProto `json:"enumType,omitempty"`
899
900	Field []*Proto2FieldDescriptorProto `json:"field,omitempty"`
901
902	Name string `json:"name,omitempty"`
903
904	NestedType []*Proto2DescriptorProto `json:"nestedType,omitempty"`
905
906	OneofDecl []*Proto2OneofDescriptorProto `json:"oneofDecl,omitempty"`
907
908	// ForceSendFields is a list of field names (e.g. "EnumType") to
909	// unconditionally include in API requests. By default, fields with
910	// empty values are omitted from API requests. However, any non-pointer,
911	// non-interface field appearing in ForceSendFields will be sent to the
912	// server regardless of whether the field is empty or not. This may be
913	// used to include empty fields in Patch requests.
914	ForceSendFields []string `json:"-"`
915
916	// NullFields is a list of field names (e.g. "EnumType") to include in
917	// API requests with the JSON null value. By default, fields with empty
918	// values are omitted from API requests. However, any field with an
919	// empty value appearing in NullFields will be sent to the server as
920	// null. It is an error if a field in this list has a non-empty value.
921	// This may be used to include null fields in Patch requests.
922	NullFields []string `json:"-"`
923}
924
925func (s *Proto2DescriptorProto) MarshalJSON() ([]byte, error) {
926	type NoMethod Proto2DescriptorProto
927	raw := NoMethod(*s)
928	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
929}
930
931// Proto2EnumDescriptorProto: Describes an enum type.
932type Proto2EnumDescriptorProto struct {
933	Name string `json:"name,omitempty"`
934
935	Value []*Proto2EnumValueDescriptorProto `json:"value,omitempty"`
936
937	// ForceSendFields is a list of field names (e.g. "Name") to
938	// unconditionally include in API requests. By default, fields with
939	// empty values are omitted from API requests. However, any non-pointer,
940	// non-interface field appearing in ForceSendFields will be sent to the
941	// server regardless of whether the field is empty or not. This may be
942	// used to include empty fields in Patch requests.
943	ForceSendFields []string `json:"-"`
944
945	// NullFields is a list of field names (e.g. "Name") to include in API
946	// requests with the JSON null value. By default, fields with empty
947	// values are omitted from API requests. However, any field with an
948	// empty value appearing in NullFields will be sent to the server as
949	// null. It is an error if a field in this list has a non-empty value.
950	// This may be used to include null fields in Patch requests.
951	NullFields []string `json:"-"`
952}
953
954func (s *Proto2EnumDescriptorProto) MarshalJSON() ([]byte, error) {
955	type NoMethod Proto2EnumDescriptorProto
956	raw := NoMethod(*s)
957	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
958}
959
960// Proto2EnumValueDescriptorProto: Describes a value within an enum.
961type Proto2EnumValueDescriptorProto struct {
962	Name string `json:"name,omitempty"`
963
964	Number int64 `json:"number,omitempty"`
965
966	// ForceSendFields is a list of field names (e.g. "Name") to
967	// unconditionally include in API requests. By default, fields with
968	// empty values are omitted from API requests. However, any non-pointer,
969	// non-interface field appearing in ForceSendFields will be sent to the
970	// server regardless of whether the field is empty or not. This may be
971	// used to include empty fields in Patch requests.
972	ForceSendFields []string `json:"-"`
973
974	// NullFields is a list of field names (e.g. "Name") to include in API
975	// requests with the JSON null value. By default, fields with empty
976	// values are omitted from API requests. However, any field with an
977	// empty value appearing in NullFields will be sent to the server as
978	// null. It is an error if a field in this list has a non-empty value.
979	// This may be used to include null fields in Patch requests.
980	NullFields []string `json:"-"`
981}
982
983func (s *Proto2EnumValueDescriptorProto) MarshalJSON() ([]byte, error) {
984	type NoMethod Proto2EnumValueDescriptorProto
985	raw := NoMethod(*s)
986	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
987}
988
989// Proto2FieldDescriptorProto: Describes a field within a message.
990type Proto2FieldDescriptorProto struct {
991	// DefaultValue: For numeric types, contains the original text
992	// representation of the value. For booleans, "true" or "false". For
993	// strings, contains the default text contents (not escaped in any way).
994	// For bytes, contains the C escaped value. All bytes >= 128 are
995	// escaped.
996	DefaultValue string `json:"defaultValue,omitempty"`
997
998	// JsonName: JSON name of this field. The value is set by protocol
999	// compiler. If the user has set a "json_name" option on this field,
1000	// that option's value will be used. Otherwise, it's deduced from the
1001	// field's name by converting it to camelCase.
1002	JsonName string `json:"jsonName,omitempty"`
1003
1004	// Possible values:
1005	//   "LABEL_OPTIONAL" - 0 is reserved for errors
1006	//   "LABEL_REQUIRED"
1007	//   "LABEL_REPEATED"
1008	Label string `json:"label,omitempty"`
1009
1010	Name string `json:"name,omitempty"`
1011
1012	Number int64 `json:"number,omitempty"`
1013
1014	// OneofIndex: If set, gives the index of a oneof in the containing
1015	// type's oneof_decl list. This field is a member of that oneof.
1016	OneofIndex int64 `json:"oneofIndex,omitempty"`
1017
1018	// Proto3Optional: If true, this is a proto3 "optional". When a proto3
1019	// field is optional, it tracks presence regardless of field type. When
1020	// proto3_optional is true, this field must be belong to a oneof to
1021	// signal to old proto3 clients that presence is tracked for this field.
1022	// This oneof is known as a "synthetic" oneof, and this field must be
1023	// its sole member (each proto3 optional field gets its own synthetic
1024	// oneof). Synthetic oneofs exist in the descriptor only, and do not
1025	// generate any API. Synthetic oneofs must be ordered after all "real"
1026	// oneofs. For message fields, proto3_optional doesn't create any
1027	// semantic change, since non-repeated message fields always track
1028	// presence. However it still indicates the semantic detail of whether
1029	// the user wrote "optional" or not. This can be useful for
1030	// round-tripping the .proto file. For consistency we give message
1031	// fields a synthetic oneof also, even though it is not required to
1032	// track presence. This is especially important because the parser can't
1033	// tell if a field is a message or an enum, so it must always create a
1034	// synthetic oneof. Proto2 optional fields do not set this flag, because
1035	// they already indicate optional with `LABEL_OPTIONAL`.
1036	Proto3Optional bool `json:"proto3Optional,omitempty"`
1037
1038	// Type: If type_name is set, this need not be set. If both this and
1039	// type_name are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or
1040	// TYPE_GROUP.
1041	//
1042	// Possible values:
1043	//   "TYPE_DOUBLE" - 0 is reserved for errors. Order is weird for
1044	// historical reasons.
1045	//   "TYPE_FLOAT"
1046	//   "TYPE_INT64" - Not ZigZag encoded. Negative numbers take 10 bytes.
1047	// Use TYPE_SINT64 if negative values are likely.
1048	//   "TYPE_UINT64"
1049	//   "TYPE_INT32" - Not ZigZag encoded. Negative numbers take 10 bytes.
1050	// Use TYPE_SINT32 if negative values are likely.
1051	//   "TYPE_FIXED64"
1052	//   "TYPE_FIXED32"
1053	//   "TYPE_BOOL"
1054	//   "TYPE_STRING"
1055	//   "TYPE_GROUP" - Tag-delimited aggregate. Group type is deprecated
1056	// and not supported in proto3. However, Proto3 implementations should
1057	// still be able to parse the group wire format and treat group fields
1058	// as unknown fields.
1059	//   "TYPE_MESSAGE" - Length-delimited aggregate.
1060	//   "TYPE_BYTES" - New in version 2.
1061	//   "TYPE_UINT32"
1062	//   "TYPE_ENUM"
1063	//   "TYPE_SFIXED32"
1064	//   "TYPE_SFIXED64"
1065	//   "TYPE_SINT32" - Uses ZigZag encoding.
1066	//   "TYPE_SINT64" - Uses ZigZag encoding.
1067	Type string `json:"type,omitempty"`
1068
1069	// TypeName: For message and enum types, this is the name of the type.
1070	// If the name starts with a '.', it is fully-qualified. Otherwise,
1071	// C++-like scoping rules are used to find the type (i.e. first the
1072	// nested types within this message are searched, then within the
1073	// parent, on up to the root namespace).
1074	TypeName string `json:"typeName,omitempty"`
1075
1076	// ForceSendFields is a list of field names (e.g. "DefaultValue") to
1077	// unconditionally include in API requests. By default, fields with
1078	// empty values are omitted from API requests. However, any non-pointer,
1079	// non-interface field appearing in ForceSendFields will be sent to the
1080	// server regardless of whether the field is empty or not. This may be
1081	// used to include empty fields in Patch requests.
1082	ForceSendFields []string `json:"-"`
1083
1084	// NullFields is a list of field names (e.g. "DefaultValue") to include
1085	// in API requests with the JSON null value. By default, fields with
1086	// empty values are omitted from API requests. However, any field with
1087	// an empty value appearing in NullFields will be sent to the server as
1088	// null. It is an error if a field in this list has a non-empty value.
1089	// This may be used to include null fields in Patch requests.
1090	NullFields []string `json:"-"`
1091}
1092
1093func (s *Proto2FieldDescriptorProto) MarshalJSON() ([]byte, error) {
1094	type NoMethod Proto2FieldDescriptorProto
1095	raw := NoMethod(*s)
1096	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1097}
1098
1099// Proto2FileDescriptorProto: Describes a complete .proto file.
1100type Proto2FileDescriptorProto struct {
1101	EnumType []*Proto2EnumDescriptorProto `json:"enumType,omitempty"`
1102
1103	// MessageType: All top-level definitions in this file.
1104	MessageType []*Proto2DescriptorProto `json:"messageType,omitempty"`
1105
1106	// Name: file name, relative to root of source tree
1107	Name string `json:"name,omitempty"`
1108
1109	// Package: e.g. "foo", "foo.bar", etc.
1110	Package string `json:"package,omitempty"`
1111
1112	// Syntax: The syntax of the proto file. The supported values are
1113	// "proto2" and "proto3".
1114	Syntax string `json:"syntax,omitempty"`
1115
1116	// ForceSendFields is a list of field names (e.g. "EnumType") to
1117	// unconditionally include in API requests. By default, fields with
1118	// empty values are omitted from API requests. However, any non-pointer,
1119	// non-interface field appearing in ForceSendFields will be sent to the
1120	// server regardless of whether the field is empty or not. This may be
1121	// used to include empty fields in Patch requests.
1122	ForceSendFields []string `json:"-"`
1123
1124	// NullFields is a list of field names (e.g. "EnumType") to include in
1125	// API requests with the JSON null value. By default, fields with empty
1126	// values are omitted from API requests. However, any field with an
1127	// empty value appearing in NullFields will be sent to the server as
1128	// null. It is an error if a field in this list has a non-empty value.
1129	// This may be used to include null fields in Patch requests.
1130	NullFields []string `json:"-"`
1131}
1132
1133func (s *Proto2FileDescriptorProto) MarshalJSON() ([]byte, error) {
1134	type NoMethod Proto2FileDescriptorProto
1135	raw := NoMethod(*s)
1136	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1137}
1138
1139// Proto2OneofDescriptorProto: Describes a oneof.
1140type Proto2OneofDescriptorProto struct {
1141	Name string `json:"name,omitempty"`
1142
1143	// ForceSendFields is a list of field names (e.g. "Name") to
1144	// unconditionally include in API requests. By default, fields with
1145	// empty values are omitted from API requests. However, any non-pointer,
1146	// non-interface field appearing in ForceSendFields will be sent to the
1147	// server regardless of whether the field is empty or not. This may be
1148	// used to include empty fields in Patch requests.
1149	ForceSendFields []string `json:"-"`
1150
1151	// NullFields is a list of field names (e.g. "Name") to include in API
1152	// requests with the JSON null value. By default, fields with empty
1153	// values are omitted from API requests. However, any field with an
1154	// empty value appearing in NullFields will be sent to the server as
1155	// null. It is an error if a field in this list has a non-empty value.
1156	// This may be used to include null fields in Patch requests.
1157	NullFields []string `json:"-"`
1158}
1159
1160func (s *Proto2OneofDescriptorProto) MarshalJSON() ([]byte, error) {
1161	type NoMethod Proto2OneofDescriptorProto
1162	raw := NoMethod(*s)
1163	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1164}
1165
1166// method id "chromepolicy.customers.policies.resolve":
1167
1168type CustomersPoliciesResolveCall struct {
1169	s                                  *Service
1170	customer                           string
1171	googlechromepolicyv1resolverequest *GoogleChromePolicyV1ResolveRequest
1172	urlParams_                         gensupport.URLParams
1173	ctx_                               context.Context
1174	header_                            http.Header
1175}
1176
1177// Resolve: Gets the resolved policy values for a list of policies that
1178// match a search query.
1179//
1180// - customer: ID of the G Suite account or literal "my_customer" for
1181//   the customer associated to the request.
1182func (r *CustomersPoliciesService) Resolve(customer string, googlechromepolicyv1resolverequest *GoogleChromePolicyV1ResolveRequest) *CustomersPoliciesResolveCall {
1183	c := &CustomersPoliciesResolveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1184	c.customer = customer
1185	c.googlechromepolicyv1resolverequest = googlechromepolicyv1resolverequest
1186	return c
1187}
1188
1189// Fields allows partial responses to be retrieved. See
1190// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1191// for more information.
1192func (c *CustomersPoliciesResolveCall) Fields(s ...googleapi.Field) *CustomersPoliciesResolveCall {
1193	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1194	return c
1195}
1196
1197// Context sets the context to be used in this call's Do method. Any
1198// pending HTTP request will be aborted if the provided context is
1199// canceled.
1200func (c *CustomersPoliciesResolveCall) Context(ctx context.Context) *CustomersPoliciesResolveCall {
1201	c.ctx_ = ctx
1202	return c
1203}
1204
1205// Header returns an http.Header that can be modified by the caller to
1206// add HTTP headers to the request.
1207func (c *CustomersPoliciesResolveCall) Header() http.Header {
1208	if c.header_ == nil {
1209		c.header_ = make(http.Header)
1210	}
1211	return c.header_
1212}
1213
1214func (c *CustomersPoliciesResolveCall) doRequest(alt string) (*http.Response, error) {
1215	reqHeaders := make(http.Header)
1216	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
1217	for k, v := range c.header_ {
1218		reqHeaders[k] = v
1219	}
1220	reqHeaders.Set("User-Agent", c.s.userAgent())
1221	var body io.Reader = nil
1222	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlechromepolicyv1resolverequest)
1223	if err != nil {
1224		return nil, err
1225	}
1226	reqHeaders.Set("Content-Type", "application/json")
1227	c.urlParams_.Set("alt", alt)
1228	c.urlParams_.Set("prettyPrint", "false")
1229	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+customer}/policies:resolve")
1230	urls += "?" + c.urlParams_.Encode()
1231	req, err := http.NewRequest("POST", urls, body)
1232	if err != nil {
1233		return nil, err
1234	}
1235	req.Header = reqHeaders
1236	googleapi.Expand(req.URL, map[string]string{
1237		"customer": c.customer,
1238	})
1239	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1240}
1241
1242// Do executes the "chromepolicy.customers.policies.resolve" call.
1243// Exactly one of *GoogleChromePolicyV1ResolveResponse or error will be
1244// non-nil. Any non-2xx status code is an error. Response headers are in
1245// either *GoogleChromePolicyV1ResolveResponse.ServerResponse.Header or
1246// (if a response was returned at all) in
1247// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
1248// whether the returned error was because http.StatusNotModified was
1249// returned.
1250func (c *CustomersPoliciesResolveCall) Do(opts ...googleapi.CallOption) (*GoogleChromePolicyV1ResolveResponse, error) {
1251	gensupport.SetOptions(c.urlParams_, opts...)
1252	res, err := c.doRequest("json")
1253	if res != nil && res.StatusCode == http.StatusNotModified {
1254		if res.Body != nil {
1255			res.Body.Close()
1256		}
1257		return nil, &googleapi.Error{
1258			Code:   res.StatusCode,
1259			Header: res.Header,
1260		}
1261	}
1262	if err != nil {
1263		return nil, err
1264	}
1265	defer googleapi.CloseBody(res)
1266	if err := googleapi.CheckResponse(res); err != nil {
1267		return nil, err
1268	}
1269	ret := &GoogleChromePolicyV1ResolveResponse{
1270		ServerResponse: googleapi.ServerResponse{
1271			Header:         res.Header,
1272			HTTPStatusCode: res.StatusCode,
1273		},
1274	}
1275	target := &ret
1276	if err := gensupport.DecodeResponse(target, res); err != nil {
1277		return nil, err
1278	}
1279	return ret, nil
1280	// {
1281	//   "description": "Gets the resolved policy values for a list of policies that match a search query.",
1282	//   "flatPath": "v1/customers/{customersId}/policies:resolve",
1283	//   "httpMethod": "POST",
1284	//   "id": "chromepolicy.customers.policies.resolve",
1285	//   "parameterOrder": [
1286	//     "customer"
1287	//   ],
1288	//   "parameters": {
1289	//     "customer": {
1290	//       "description": "ID of the G Suite account or literal \"my_customer\" for the customer associated to the request.",
1291	//       "location": "path",
1292	//       "pattern": "^customers/[^/]+$",
1293	//       "required": true,
1294	//       "type": "string"
1295	//     }
1296	//   },
1297	//   "path": "v1/{+customer}/policies:resolve",
1298	//   "request": {
1299	//     "$ref": "GoogleChromePolicyV1ResolveRequest"
1300	//   },
1301	//   "response": {
1302	//     "$ref": "GoogleChromePolicyV1ResolveResponse"
1303	//   },
1304	//   "scopes": [
1305	//     "https://www.googleapis.com/auth/chrome.management.policy",
1306	//     "https://www.googleapis.com/auth/chrome.management.policy.readonly"
1307	//   ]
1308	// }
1309
1310}
1311
1312// Pages invokes f for each page of results.
1313// A non-nil error returned from f will halt the iteration.
1314// The provided context supersedes any context provided to the Context method.
1315func (c *CustomersPoliciesResolveCall) Pages(ctx context.Context, f func(*GoogleChromePolicyV1ResolveResponse) error) error {
1316	c.ctx_ = ctx
1317	defer func(pt string) { c.googlechromepolicyv1resolverequest.PageToken = pt }(c.googlechromepolicyv1resolverequest.PageToken) // reset paging to original point
1318	for {
1319		x, err := c.Do()
1320		if err != nil {
1321			return err
1322		}
1323		if err := f(x); err != nil {
1324			return err
1325		}
1326		if x.NextPageToken == "" {
1327			return nil
1328		}
1329		c.googlechromepolicyv1resolverequest.PageToken = x.NextPageToken
1330	}
1331}
1332
1333// method id "chromepolicy.customers.policies.orgunits.batchInherit":
1334
1335type CustomersPoliciesOrgunitsBatchInheritCall struct {
1336	s                                                      *Service
1337	customer                                               string
1338	googlechromepolicyv1batchinheritorgunitpoliciesrequest *GoogleChromePolicyV1BatchInheritOrgUnitPoliciesRequest
1339	urlParams_                                             gensupport.URLParams
1340	ctx_                                                   context.Context
1341	header_                                                http.Header
1342}
1343
1344// BatchInherit: Modify multiple policy values that are applied to a
1345// specific org unit so that they now inherit the value from a parent
1346// (if applicable). All targets must have the same target format. That
1347// is to say that they must point to the same target resource and must
1348// have the same keys specified in `additionalTargetKeyNames`. On
1349// failure the request will return the error details as part of the
1350// google.rpc.Status.
1351//
1352// - customer: ID of the G Suite account or literal "my_customer" for
1353//   the customer associated to the request.
1354func (r *CustomersPoliciesOrgunitsService) BatchInherit(customer string, googlechromepolicyv1batchinheritorgunitpoliciesrequest *GoogleChromePolicyV1BatchInheritOrgUnitPoliciesRequest) *CustomersPoliciesOrgunitsBatchInheritCall {
1355	c := &CustomersPoliciesOrgunitsBatchInheritCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1356	c.customer = customer
1357	c.googlechromepolicyv1batchinheritorgunitpoliciesrequest = googlechromepolicyv1batchinheritorgunitpoliciesrequest
1358	return c
1359}
1360
1361// Fields allows partial responses to be retrieved. See
1362// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1363// for more information.
1364func (c *CustomersPoliciesOrgunitsBatchInheritCall) Fields(s ...googleapi.Field) *CustomersPoliciesOrgunitsBatchInheritCall {
1365	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1366	return c
1367}
1368
1369// Context sets the context to be used in this call's Do method. Any
1370// pending HTTP request will be aborted if the provided context is
1371// canceled.
1372func (c *CustomersPoliciesOrgunitsBatchInheritCall) Context(ctx context.Context) *CustomersPoliciesOrgunitsBatchInheritCall {
1373	c.ctx_ = ctx
1374	return c
1375}
1376
1377// Header returns an http.Header that can be modified by the caller to
1378// add HTTP headers to the request.
1379func (c *CustomersPoliciesOrgunitsBatchInheritCall) Header() http.Header {
1380	if c.header_ == nil {
1381		c.header_ = make(http.Header)
1382	}
1383	return c.header_
1384}
1385
1386func (c *CustomersPoliciesOrgunitsBatchInheritCall) doRequest(alt string) (*http.Response, error) {
1387	reqHeaders := make(http.Header)
1388	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
1389	for k, v := range c.header_ {
1390		reqHeaders[k] = v
1391	}
1392	reqHeaders.Set("User-Agent", c.s.userAgent())
1393	var body io.Reader = nil
1394	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlechromepolicyv1batchinheritorgunitpoliciesrequest)
1395	if err != nil {
1396		return nil, err
1397	}
1398	reqHeaders.Set("Content-Type", "application/json")
1399	c.urlParams_.Set("alt", alt)
1400	c.urlParams_.Set("prettyPrint", "false")
1401	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+customer}/policies/orgunits:batchInherit")
1402	urls += "?" + c.urlParams_.Encode()
1403	req, err := http.NewRequest("POST", urls, body)
1404	if err != nil {
1405		return nil, err
1406	}
1407	req.Header = reqHeaders
1408	googleapi.Expand(req.URL, map[string]string{
1409		"customer": c.customer,
1410	})
1411	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1412}
1413
1414// Do executes the "chromepolicy.customers.policies.orgunits.batchInherit" call.
1415// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
1416// non-2xx status code is an error. Response headers are in either
1417// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
1418// returned at all) in error.(*googleapi.Error).Header. Use
1419// googleapi.IsNotModified to check whether the returned error was
1420// because http.StatusNotModified was returned.
1421func (c *CustomersPoliciesOrgunitsBatchInheritCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
1422	gensupport.SetOptions(c.urlParams_, opts...)
1423	res, err := c.doRequest("json")
1424	if res != nil && res.StatusCode == http.StatusNotModified {
1425		if res.Body != nil {
1426			res.Body.Close()
1427		}
1428		return nil, &googleapi.Error{
1429			Code:   res.StatusCode,
1430			Header: res.Header,
1431		}
1432	}
1433	if err != nil {
1434		return nil, err
1435	}
1436	defer googleapi.CloseBody(res)
1437	if err := googleapi.CheckResponse(res); err != nil {
1438		return nil, err
1439	}
1440	ret := &GoogleProtobufEmpty{
1441		ServerResponse: googleapi.ServerResponse{
1442			Header:         res.Header,
1443			HTTPStatusCode: res.StatusCode,
1444		},
1445	}
1446	target := &ret
1447	if err := gensupport.DecodeResponse(target, res); err != nil {
1448		return nil, err
1449	}
1450	return ret, nil
1451	// {
1452	//   "description": "Modify multiple policy values that are applied to a specific org unit so that they now inherit the value from a parent (if applicable). All targets must have the same target format. That is to say that they must point to the same target resource and must have the same keys specified in `additionalTargetKeyNames`. On failure the request will return the error details as part of the google.rpc.Status.",
1453	//   "flatPath": "v1/customers/{customersId}/policies/orgunits:batchInherit",
1454	//   "httpMethod": "POST",
1455	//   "id": "chromepolicy.customers.policies.orgunits.batchInherit",
1456	//   "parameterOrder": [
1457	//     "customer"
1458	//   ],
1459	//   "parameters": {
1460	//     "customer": {
1461	//       "description": "ID of the G Suite account or literal \"my_customer\" for the customer associated to the request.",
1462	//       "location": "path",
1463	//       "pattern": "^customers/[^/]+$",
1464	//       "required": true,
1465	//       "type": "string"
1466	//     }
1467	//   },
1468	//   "path": "v1/{+customer}/policies/orgunits:batchInherit",
1469	//   "request": {
1470	//     "$ref": "GoogleChromePolicyV1BatchInheritOrgUnitPoliciesRequest"
1471	//   },
1472	//   "response": {
1473	//     "$ref": "GoogleProtobufEmpty"
1474	//   },
1475	//   "scopes": [
1476	//     "https://www.googleapis.com/auth/chrome.management.policy"
1477	//   ]
1478	// }
1479
1480}
1481
1482// method id "chromepolicy.customers.policies.orgunits.batchModify":
1483
1484type CustomersPoliciesOrgunitsBatchModifyCall struct {
1485	s                                                     *Service
1486	customer                                              string
1487	googlechromepolicyv1batchmodifyorgunitpoliciesrequest *GoogleChromePolicyV1BatchModifyOrgUnitPoliciesRequest
1488	urlParams_                                            gensupport.URLParams
1489	ctx_                                                  context.Context
1490	header_                                               http.Header
1491}
1492
1493// BatchModify: Modify multiple policy values that are applied to a
1494// specific org unit. All targets must have the same target format. That
1495// is to say that they must point to the same target resource and must
1496// have the same keys specified in `additionalTargetKeyNames`. On
1497// failure the request will return the error details as part of the
1498// google.rpc.Status.
1499//
1500// - customer: ID of the G Suite account or literal "my_customer" for
1501//   the customer associated to the request.
1502func (r *CustomersPoliciesOrgunitsService) BatchModify(customer string, googlechromepolicyv1batchmodifyorgunitpoliciesrequest *GoogleChromePolicyV1BatchModifyOrgUnitPoliciesRequest) *CustomersPoliciesOrgunitsBatchModifyCall {
1503	c := &CustomersPoliciesOrgunitsBatchModifyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1504	c.customer = customer
1505	c.googlechromepolicyv1batchmodifyorgunitpoliciesrequest = googlechromepolicyv1batchmodifyorgunitpoliciesrequest
1506	return c
1507}
1508
1509// Fields allows partial responses to be retrieved. See
1510// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1511// for more information.
1512func (c *CustomersPoliciesOrgunitsBatchModifyCall) Fields(s ...googleapi.Field) *CustomersPoliciesOrgunitsBatchModifyCall {
1513	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1514	return c
1515}
1516
1517// Context sets the context to be used in this call's Do method. Any
1518// pending HTTP request will be aborted if the provided context is
1519// canceled.
1520func (c *CustomersPoliciesOrgunitsBatchModifyCall) Context(ctx context.Context) *CustomersPoliciesOrgunitsBatchModifyCall {
1521	c.ctx_ = ctx
1522	return c
1523}
1524
1525// Header returns an http.Header that can be modified by the caller to
1526// add HTTP headers to the request.
1527func (c *CustomersPoliciesOrgunitsBatchModifyCall) Header() http.Header {
1528	if c.header_ == nil {
1529		c.header_ = make(http.Header)
1530	}
1531	return c.header_
1532}
1533
1534func (c *CustomersPoliciesOrgunitsBatchModifyCall) doRequest(alt string) (*http.Response, error) {
1535	reqHeaders := make(http.Header)
1536	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
1537	for k, v := range c.header_ {
1538		reqHeaders[k] = v
1539	}
1540	reqHeaders.Set("User-Agent", c.s.userAgent())
1541	var body io.Reader = nil
1542	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlechromepolicyv1batchmodifyorgunitpoliciesrequest)
1543	if err != nil {
1544		return nil, err
1545	}
1546	reqHeaders.Set("Content-Type", "application/json")
1547	c.urlParams_.Set("alt", alt)
1548	c.urlParams_.Set("prettyPrint", "false")
1549	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+customer}/policies/orgunits:batchModify")
1550	urls += "?" + c.urlParams_.Encode()
1551	req, err := http.NewRequest("POST", urls, body)
1552	if err != nil {
1553		return nil, err
1554	}
1555	req.Header = reqHeaders
1556	googleapi.Expand(req.URL, map[string]string{
1557		"customer": c.customer,
1558	})
1559	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1560}
1561
1562// Do executes the "chromepolicy.customers.policies.orgunits.batchModify" call.
1563// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
1564// non-2xx status code is an error. Response headers are in either
1565// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
1566// returned at all) in error.(*googleapi.Error).Header. Use
1567// googleapi.IsNotModified to check whether the returned error was
1568// because http.StatusNotModified was returned.
1569func (c *CustomersPoliciesOrgunitsBatchModifyCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
1570	gensupport.SetOptions(c.urlParams_, opts...)
1571	res, err := c.doRequest("json")
1572	if res != nil && res.StatusCode == http.StatusNotModified {
1573		if res.Body != nil {
1574			res.Body.Close()
1575		}
1576		return nil, &googleapi.Error{
1577			Code:   res.StatusCode,
1578			Header: res.Header,
1579		}
1580	}
1581	if err != nil {
1582		return nil, err
1583	}
1584	defer googleapi.CloseBody(res)
1585	if err := googleapi.CheckResponse(res); err != nil {
1586		return nil, err
1587	}
1588	ret := &GoogleProtobufEmpty{
1589		ServerResponse: googleapi.ServerResponse{
1590			Header:         res.Header,
1591			HTTPStatusCode: res.StatusCode,
1592		},
1593	}
1594	target := &ret
1595	if err := gensupport.DecodeResponse(target, res); err != nil {
1596		return nil, err
1597	}
1598	return ret, nil
1599	// {
1600	//   "description": "Modify multiple policy values that are applied to a specific org unit. All targets must have the same target format. That is to say that they must point to the same target resource and must have the same keys specified in `additionalTargetKeyNames`. On failure the request will return the error details as part of the google.rpc.Status.",
1601	//   "flatPath": "v1/customers/{customersId}/policies/orgunits:batchModify",
1602	//   "httpMethod": "POST",
1603	//   "id": "chromepolicy.customers.policies.orgunits.batchModify",
1604	//   "parameterOrder": [
1605	//     "customer"
1606	//   ],
1607	//   "parameters": {
1608	//     "customer": {
1609	//       "description": "ID of the G Suite account or literal \"my_customer\" for the customer associated to the request.",
1610	//       "location": "path",
1611	//       "pattern": "^customers/[^/]+$",
1612	//       "required": true,
1613	//       "type": "string"
1614	//     }
1615	//   },
1616	//   "path": "v1/{+customer}/policies/orgunits:batchModify",
1617	//   "request": {
1618	//     "$ref": "GoogleChromePolicyV1BatchModifyOrgUnitPoliciesRequest"
1619	//   },
1620	//   "response": {
1621	//     "$ref": "GoogleProtobufEmpty"
1622	//   },
1623	//   "scopes": [
1624	//     "https://www.googleapis.com/auth/chrome.management.policy"
1625	//   ]
1626	// }
1627
1628}
1629
1630// method id "chromepolicy.customers.policySchemas.get":
1631
1632type CustomersPolicySchemasGetCall struct {
1633	s            *Service
1634	name         string
1635	urlParams_   gensupport.URLParams
1636	ifNoneMatch_ string
1637	ctx_         context.Context
1638	header_      http.Header
1639}
1640
1641// Get: Get a specific policy schema for a customer by its resource
1642// name.
1643//
1644// - name: The policy schema resource name to query.
1645func (r *CustomersPolicySchemasService) Get(name string) *CustomersPolicySchemasGetCall {
1646	c := &CustomersPolicySchemasGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1647	c.name = name
1648	return c
1649}
1650
1651// Fields allows partial responses to be retrieved. See
1652// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1653// for more information.
1654func (c *CustomersPolicySchemasGetCall) Fields(s ...googleapi.Field) *CustomersPolicySchemasGetCall {
1655	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1656	return c
1657}
1658
1659// IfNoneMatch sets the optional parameter which makes the operation
1660// fail if the object's ETag matches the given value. This is useful for
1661// getting updates only after the object has changed since the last
1662// request. Use googleapi.IsNotModified to check whether the response
1663// error from Do is the result of In-None-Match.
1664func (c *CustomersPolicySchemasGetCall) IfNoneMatch(entityTag string) *CustomersPolicySchemasGetCall {
1665	c.ifNoneMatch_ = entityTag
1666	return c
1667}
1668
1669// Context sets the context to be used in this call's Do method. Any
1670// pending HTTP request will be aborted if the provided context is
1671// canceled.
1672func (c *CustomersPolicySchemasGetCall) Context(ctx context.Context) *CustomersPolicySchemasGetCall {
1673	c.ctx_ = ctx
1674	return c
1675}
1676
1677// Header returns an http.Header that can be modified by the caller to
1678// add HTTP headers to the request.
1679func (c *CustomersPolicySchemasGetCall) Header() http.Header {
1680	if c.header_ == nil {
1681		c.header_ = make(http.Header)
1682	}
1683	return c.header_
1684}
1685
1686func (c *CustomersPolicySchemasGetCall) doRequest(alt string) (*http.Response, error) {
1687	reqHeaders := make(http.Header)
1688	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
1689	for k, v := range c.header_ {
1690		reqHeaders[k] = v
1691	}
1692	reqHeaders.Set("User-Agent", c.s.userAgent())
1693	if c.ifNoneMatch_ != "" {
1694		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1695	}
1696	var body io.Reader = nil
1697	c.urlParams_.Set("alt", alt)
1698	c.urlParams_.Set("prettyPrint", "false")
1699	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
1700	urls += "?" + c.urlParams_.Encode()
1701	req, err := http.NewRequest("GET", urls, body)
1702	if err != nil {
1703		return nil, err
1704	}
1705	req.Header = reqHeaders
1706	googleapi.Expand(req.URL, map[string]string{
1707		"name": c.name,
1708	})
1709	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1710}
1711
1712// Do executes the "chromepolicy.customers.policySchemas.get" call.
1713// Exactly one of *GoogleChromePolicyV1PolicySchema or error will be
1714// non-nil. Any non-2xx status code is an error. Response headers are in
1715// either *GoogleChromePolicyV1PolicySchema.ServerResponse.Header or (if
1716// a response was returned at all) in error.(*googleapi.Error).Header.
1717// Use googleapi.IsNotModified to check whether the returned error was
1718// because http.StatusNotModified was returned.
1719func (c *CustomersPolicySchemasGetCall) Do(opts ...googleapi.CallOption) (*GoogleChromePolicyV1PolicySchema, error) {
1720	gensupport.SetOptions(c.urlParams_, opts...)
1721	res, err := c.doRequest("json")
1722	if res != nil && res.StatusCode == http.StatusNotModified {
1723		if res.Body != nil {
1724			res.Body.Close()
1725		}
1726		return nil, &googleapi.Error{
1727			Code:   res.StatusCode,
1728			Header: res.Header,
1729		}
1730	}
1731	if err != nil {
1732		return nil, err
1733	}
1734	defer googleapi.CloseBody(res)
1735	if err := googleapi.CheckResponse(res); err != nil {
1736		return nil, err
1737	}
1738	ret := &GoogleChromePolicyV1PolicySchema{
1739		ServerResponse: googleapi.ServerResponse{
1740			Header:         res.Header,
1741			HTTPStatusCode: res.StatusCode,
1742		},
1743	}
1744	target := &ret
1745	if err := gensupport.DecodeResponse(target, res); err != nil {
1746		return nil, err
1747	}
1748	return ret, nil
1749	// {
1750	//   "description": "Get a specific policy schema for a customer by its resource name.",
1751	//   "flatPath": "v1/customers/{customersId}/policySchemas/{policySchemasId}",
1752	//   "httpMethod": "GET",
1753	//   "id": "chromepolicy.customers.policySchemas.get",
1754	//   "parameterOrder": [
1755	//     "name"
1756	//   ],
1757	//   "parameters": {
1758	//     "name": {
1759	//       "description": "Required. The policy schema resource name to query.",
1760	//       "location": "path",
1761	//       "pattern": "^customers/[^/]+/policySchemas/.*$",
1762	//       "required": true,
1763	//       "type": "string"
1764	//     }
1765	//   },
1766	//   "path": "v1/{+name}",
1767	//   "response": {
1768	//     "$ref": "GoogleChromePolicyV1PolicySchema"
1769	//   },
1770	//   "scopes": [
1771	//     "https://www.googleapis.com/auth/chrome.management.policy",
1772	//     "https://www.googleapis.com/auth/chrome.management.policy.readonly"
1773	//   ]
1774	// }
1775
1776}
1777
1778// method id "chromepolicy.customers.policySchemas.list":
1779
1780type CustomersPolicySchemasListCall struct {
1781	s            *Service
1782	parent       string
1783	urlParams_   gensupport.URLParams
1784	ifNoneMatch_ string
1785	ctx_         context.Context
1786	header_      http.Header
1787}
1788
1789// List: Gets a list of policy schemas that match a specified filter
1790// value for a given customer.
1791//
1792// - parent: The customer for which the listing request will apply.
1793func (r *CustomersPolicySchemasService) List(parent string) *CustomersPolicySchemasListCall {
1794	c := &CustomersPolicySchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1795	c.parent = parent
1796	return c
1797}
1798
1799// Filter sets the optional parameter "filter": The schema filter used
1800// to find a particular schema based on fields like its resource name,
1801// description and `additionalTargetKeyNames`.
1802func (c *CustomersPolicySchemasListCall) Filter(filter string) *CustomersPolicySchemasListCall {
1803	c.urlParams_.Set("filter", filter)
1804	return c
1805}
1806
1807// PageSize sets the optional parameter "pageSize": The maximum number
1808// of policy schemas to return.
1809func (c *CustomersPolicySchemasListCall) PageSize(pageSize int64) *CustomersPolicySchemasListCall {
1810	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
1811	return c
1812}
1813
1814// PageToken sets the optional parameter "pageToken": The page token
1815// used to retrieve a specific page of the listing request.
1816func (c *CustomersPolicySchemasListCall) PageToken(pageToken string) *CustomersPolicySchemasListCall {
1817	c.urlParams_.Set("pageToken", pageToken)
1818	return c
1819}
1820
1821// Fields allows partial responses to be retrieved. See
1822// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1823// for more information.
1824func (c *CustomersPolicySchemasListCall) Fields(s ...googleapi.Field) *CustomersPolicySchemasListCall {
1825	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1826	return c
1827}
1828
1829// IfNoneMatch sets the optional parameter which makes the operation
1830// fail if the object's ETag matches the given value. This is useful for
1831// getting updates only after the object has changed since the last
1832// request. Use googleapi.IsNotModified to check whether the response
1833// error from Do is the result of In-None-Match.
1834func (c *CustomersPolicySchemasListCall) IfNoneMatch(entityTag string) *CustomersPolicySchemasListCall {
1835	c.ifNoneMatch_ = entityTag
1836	return c
1837}
1838
1839// Context sets the context to be used in this call's Do method. Any
1840// pending HTTP request will be aborted if the provided context is
1841// canceled.
1842func (c *CustomersPolicySchemasListCall) Context(ctx context.Context) *CustomersPolicySchemasListCall {
1843	c.ctx_ = ctx
1844	return c
1845}
1846
1847// Header returns an http.Header that can be modified by the caller to
1848// add HTTP headers to the request.
1849func (c *CustomersPolicySchemasListCall) Header() http.Header {
1850	if c.header_ == nil {
1851		c.header_ = make(http.Header)
1852	}
1853	return c.header_
1854}
1855
1856func (c *CustomersPolicySchemasListCall) doRequest(alt string) (*http.Response, error) {
1857	reqHeaders := make(http.Header)
1858	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
1859	for k, v := range c.header_ {
1860		reqHeaders[k] = v
1861	}
1862	reqHeaders.Set("User-Agent", c.s.userAgent())
1863	if c.ifNoneMatch_ != "" {
1864		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1865	}
1866	var body io.Reader = nil
1867	c.urlParams_.Set("alt", alt)
1868	c.urlParams_.Set("prettyPrint", "false")
1869	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/policySchemas")
1870	urls += "?" + c.urlParams_.Encode()
1871	req, err := http.NewRequest("GET", urls, body)
1872	if err != nil {
1873		return nil, err
1874	}
1875	req.Header = reqHeaders
1876	googleapi.Expand(req.URL, map[string]string{
1877		"parent": c.parent,
1878	})
1879	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1880}
1881
1882// Do executes the "chromepolicy.customers.policySchemas.list" call.
1883// Exactly one of *GoogleChromePolicyV1ListPolicySchemasResponse or
1884// error will be non-nil. Any non-2xx status code is an error. Response
1885// headers are in either
1886// *GoogleChromePolicyV1ListPolicySchemasResponse.ServerResponse.Header
1887// or (if a response was returned at all) in
1888// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
1889// whether the returned error was because http.StatusNotModified was
1890// returned.
1891func (c *CustomersPolicySchemasListCall) Do(opts ...googleapi.CallOption) (*GoogleChromePolicyV1ListPolicySchemasResponse, error) {
1892	gensupport.SetOptions(c.urlParams_, opts...)
1893	res, err := c.doRequest("json")
1894	if res != nil && res.StatusCode == http.StatusNotModified {
1895		if res.Body != nil {
1896			res.Body.Close()
1897		}
1898		return nil, &googleapi.Error{
1899			Code:   res.StatusCode,
1900			Header: res.Header,
1901		}
1902	}
1903	if err != nil {
1904		return nil, err
1905	}
1906	defer googleapi.CloseBody(res)
1907	if err := googleapi.CheckResponse(res); err != nil {
1908		return nil, err
1909	}
1910	ret := &GoogleChromePolicyV1ListPolicySchemasResponse{
1911		ServerResponse: googleapi.ServerResponse{
1912			Header:         res.Header,
1913			HTTPStatusCode: res.StatusCode,
1914		},
1915	}
1916	target := &ret
1917	if err := gensupport.DecodeResponse(target, res); err != nil {
1918		return nil, err
1919	}
1920	return ret, nil
1921	// {
1922	//   "description": "Gets a list of policy schemas that match a specified filter value for a given customer.",
1923	//   "flatPath": "v1/customers/{customersId}/policySchemas",
1924	//   "httpMethod": "GET",
1925	//   "id": "chromepolicy.customers.policySchemas.list",
1926	//   "parameterOrder": [
1927	//     "parent"
1928	//   ],
1929	//   "parameters": {
1930	//     "filter": {
1931	//       "description": "The schema filter used to find a particular schema based on fields like its resource name, description and `additionalTargetKeyNames`.",
1932	//       "location": "query",
1933	//       "type": "string"
1934	//     },
1935	//     "pageSize": {
1936	//       "description": "The maximum number of policy schemas to return.",
1937	//       "format": "int32",
1938	//       "location": "query",
1939	//       "type": "integer"
1940	//     },
1941	//     "pageToken": {
1942	//       "description": "The page token used to retrieve a specific page of the listing request.",
1943	//       "location": "query",
1944	//       "type": "string"
1945	//     },
1946	//     "parent": {
1947	//       "description": "Required. The customer for which the listing request will apply.",
1948	//       "location": "path",
1949	//       "pattern": "^customers/[^/]+$",
1950	//       "required": true,
1951	//       "type": "string"
1952	//     }
1953	//   },
1954	//   "path": "v1/{+parent}/policySchemas",
1955	//   "response": {
1956	//     "$ref": "GoogleChromePolicyV1ListPolicySchemasResponse"
1957	//   },
1958	//   "scopes": [
1959	//     "https://www.googleapis.com/auth/chrome.management.policy",
1960	//     "https://www.googleapis.com/auth/chrome.management.policy.readonly"
1961	//   ]
1962	// }
1963
1964}
1965
1966// Pages invokes f for each page of results.
1967// A non-nil error returned from f will halt the iteration.
1968// The provided context supersedes any context provided to the Context method.
1969func (c *CustomersPolicySchemasListCall) Pages(ctx context.Context, f func(*GoogleChromePolicyV1ListPolicySchemasResponse) error) error {
1970	c.ctx_ = ctx
1971	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
1972	for {
1973		x, err := c.Do()
1974		if err != nil {
1975			return err
1976		}
1977		if err := f(x); err != nil {
1978			return err
1979		}
1980		if x.NextPageToken == "" {
1981			return nil
1982		}
1983		c.PageToken(x.NextPageToken)
1984	}
1985}
1986
1987// method id "chromepolicy.media.upload":
1988
1989type MediaUploadCall struct {
1990	s                                           *Service
1991	customer                                    string
1992	googlechromepolicyv1uploadpolicyfilerequest *GoogleChromePolicyV1UploadPolicyFileRequest
1993	urlParams_                                  gensupport.URLParams
1994	mediaInfo_                                  *gensupport.MediaInfo
1995	ctx_                                        context.Context
1996	header_                                     http.Header
1997}
1998
1999// Upload: Creates an enterprise file from the content provided by user.
2000// Returns a public download url for end user.
2001//
2002// - customer: The customer for which the file upload will apply.
2003func (r *MediaService) Upload(customer string, googlechromepolicyv1uploadpolicyfilerequest *GoogleChromePolicyV1UploadPolicyFileRequest) *MediaUploadCall {
2004	c := &MediaUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2005	c.customer = customer
2006	c.googlechromepolicyv1uploadpolicyfilerequest = googlechromepolicyv1uploadpolicyfilerequest
2007	return c
2008}
2009
2010// Media specifies the media to upload in one or more chunks. The chunk
2011// size may be controlled by supplying a MediaOption generated by
2012// googleapi.ChunkSize. The chunk size defaults to
2013// googleapi.DefaultUploadChunkSize.The Content-Type header used in the
2014// upload request will be determined by sniffing the contents of r,
2015// unless a MediaOption generated by googleapi.ContentType is
2016// supplied.
2017// At most one of Media and ResumableMedia may be set.
2018func (c *MediaUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *MediaUploadCall {
2019	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
2020	return c
2021}
2022
2023// ResumableMedia specifies the media to upload in chunks and can be
2024// canceled with ctx.
2025//
2026// Deprecated: use Media instead.
2027//
2028// At most one of Media and ResumableMedia may be set. mediaType
2029// identifies the MIME media type of the upload, such as "image/png". If
2030// mediaType is "", it will be auto-detected. The provided ctx will
2031// supersede any context previously provided to the Context method.
2032func (c *MediaUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *MediaUploadCall {
2033	c.ctx_ = ctx
2034	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
2035	return c
2036}
2037
2038// ProgressUpdater provides a callback function that will be called
2039// after every chunk. It should be a low-latency function in order to
2040// not slow down the upload operation. This should only be called when
2041// using ResumableMedia (as opposed to Media).
2042func (c *MediaUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *MediaUploadCall {
2043	c.mediaInfo_.SetProgressUpdater(pu)
2044	return c
2045}
2046
2047// Fields allows partial responses to be retrieved. See
2048// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2049// for more information.
2050func (c *MediaUploadCall) Fields(s ...googleapi.Field) *MediaUploadCall {
2051	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2052	return c
2053}
2054
2055// Context sets the context to be used in this call's Do method. Any
2056// pending HTTP request will be aborted if the provided context is
2057// canceled.
2058// This context will supersede any context previously provided to the
2059// ResumableMedia method.
2060func (c *MediaUploadCall) Context(ctx context.Context) *MediaUploadCall {
2061	c.ctx_ = ctx
2062	return c
2063}
2064
2065// Header returns an http.Header that can be modified by the caller to
2066// add HTTP headers to the request.
2067func (c *MediaUploadCall) Header() http.Header {
2068	if c.header_ == nil {
2069		c.header_ = make(http.Header)
2070	}
2071	return c.header_
2072}
2073
2074func (c *MediaUploadCall) doRequest(alt string) (*http.Response, error) {
2075	reqHeaders := make(http.Header)
2076	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629")
2077	for k, v := range c.header_ {
2078		reqHeaders[k] = v
2079	}
2080	reqHeaders.Set("User-Agent", c.s.userAgent())
2081	var body io.Reader = nil
2082	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlechromepolicyv1uploadpolicyfilerequest)
2083	if err != nil {
2084		return nil, err
2085	}
2086	reqHeaders.Set("Content-Type", "application/json")
2087	c.urlParams_.Set("alt", alt)
2088	c.urlParams_.Set("prettyPrint", "false")
2089	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+customer}/policies/files:uploadPolicyFile")
2090	if c.mediaInfo_ != nil {
2091		urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/v1/{+customer}/policies/files:uploadPolicyFile")
2092		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
2093	}
2094	if body == nil {
2095		body = new(bytes.Buffer)
2096		reqHeaders.Set("Content-Type", "application/json")
2097	}
2098	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
2099	defer cleanup()
2100	urls += "?" + c.urlParams_.Encode()
2101	req, err := http.NewRequest("POST", urls, body)
2102	if err != nil {
2103		return nil, err
2104	}
2105	req.Header = reqHeaders
2106	req.GetBody = getBody
2107	googleapi.Expand(req.URL, map[string]string{
2108		"customer": c.customer,
2109	})
2110	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2111}
2112
2113// Do executes the "chromepolicy.media.upload" call.
2114// Exactly one of *GoogleChromePolicyV1UploadPolicyFileResponse or error
2115// will be non-nil. Any non-2xx status code is an error. Response
2116// headers are in either
2117// *GoogleChromePolicyV1UploadPolicyFileResponse.ServerResponse.Header
2118// or (if a response was returned at all) in
2119// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
2120// whether the returned error was because http.StatusNotModified was
2121// returned.
2122func (c *MediaUploadCall) Do(opts ...googleapi.CallOption) (*GoogleChromePolicyV1UploadPolicyFileResponse, error) {
2123	gensupport.SetOptions(c.urlParams_, opts...)
2124	res, err := c.doRequest("json")
2125	if res != nil && res.StatusCode == http.StatusNotModified {
2126		if res.Body != nil {
2127			res.Body.Close()
2128		}
2129		return nil, &googleapi.Error{
2130			Code:   res.StatusCode,
2131			Header: res.Header,
2132		}
2133	}
2134	if err != nil {
2135		return nil, err
2136	}
2137	defer googleapi.CloseBody(res)
2138	if err := googleapi.CheckResponse(res); err != nil {
2139		return nil, err
2140	}
2141	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
2142	if rx != nil {
2143		rx.Client = c.s.client
2144		rx.UserAgent = c.s.userAgent()
2145		ctx := c.ctx_
2146		if ctx == nil {
2147			ctx = context.TODO()
2148		}
2149		res, err = rx.Upload(ctx)
2150		if err != nil {
2151			return nil, err
2152		}
2153		defer res.Body.Close()
2154		if err := googleapi.CheckResponse(res); err != nil {
2155			return nil, err
2156		}
2157	}
2158	ret := &GoogleChromePolicyV1UploadPolicyFileResponse{
2159		ServerResponse: googleapi.ServerResponse{
2160			Header:         res.Header,
2161			HTTPStatusCode: res.StatusCode,
2162		},
2163	}
2164	target := &ret
2165	if err := gensupport.DecodeResponse(target, res); err != nil {
2166		return nil, err
2167	}
2168	return ret, nil
2169	// {
2170	//   "description": "Creates an enterprise file from the content provided by user. Returns a public download url for end user.",
2171	//   "flatPath": "v1/customers/{customersId}/policies/files:uploadPolicyFile",
2172	//   "httpMethod": "POST",
2173	//   "id": "chromepolicy.media.upload",
2174	//   "mediaUpload": {
2175	//     "accept": [
2176	//       "*/*"
2177	//     ],
2178	//     "protocols": {
2179	//       "simple": {
2180	//         "multipart": true,
2181	//         "path": "/upload/v1/{+customer}/policies/files:uploadPolicyFile"
2182	//       }
2183	//     }
2184	//   },
2185	//   "parameterOrder": [
2186	//     "customer"
2187	//   ],
2188	//   "parameters": {
2189	//     "customer": {
2190	//       "description": "Required. The customer for which the file upload will apply.",
2191	//       "location": "path",
2192	//       "pattern": "^customers/[^/]+$",
2193	//       "required": true,
2194	//       "type": "string"
2195	//     }
2196	//   },
2197	//   "path": "v1/{+customer}/policies/files:uploadPolicyFile",
2198	//   "request": {
2199	//     "$ref": "GoogleChromePolicyV1UploadPolicyFileRequest"
2200	//   },
2201	//   "response": {
2202	//     "$ref": "GoogleChromePolicyV1UploadPolicyFileResponse"
2203	//   },
2204	//   "scopes": [
2205	//     "https://www.googleapis.com/auth/chrome.management.policy"
2206	//   ],
2207	//   "supportsMediaUpload": true
2208	// }
2209
2210}
2211