Debian Codegraph @

chromepolicy/v1/chromepolicy-gen.go

raw symbols SCIP
1 // Copyright 2026 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 // # Library status
12 //
13 // These client libraries are officially supported by Google. However, this
14 // library is considered complete and is in maintenance mode. This means
15 // that we will address critical bugs and security issues but will not add
16 // any new features.
17 //
18 // When possible, we recommend using our newer
19 // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
20 // that are still actively being worked and iterated on.
21 //
22 // # Creating a client
23 //
24 // Usage example:
25 //
26 // import "google.golang.org/api/chromepolicy/v1"
27 // ...
28 // ctx := context.Background()
29 // chromepolicyService, err := chromepolicy.NewService(ctx)
30 //
31 // In this example, Google Application Default Credentials are used for
32 // authentication. For information on how to create and obtain Application
33 // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
34 //
35 // # Other authentication options
36 //
37 // By default, all available scopes (see "Constants") are used to authenticate.
38 // To restrict scopes, use [google.golang.org/api/option.WithScopes]:
39 //
40 // chromepolicyService, err := chromepolicy.NewService(ctx, option.WithScopes(chromepolicy.ChromeManagementPolicyReadonlyScope))
41 //
42 // To use an API key for authentication (note: some APIs do not support API
43 // keys), use [google.golang.org/api/option.WithAPIKey]:
44 //
45 // chromepolicyService, err := chromepolicy.NewService(ctx, option.WithAPIKey("AIza..."))
46 //
47 // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
48 // flow, use [google.golang.org/api/option.WithTokenSource]:
49 //
50 // config := &oauth2.Config{...}
51 // // ...
52 // token, err := config.Exchange(ctx, ...)
53 // chromepolicyService, err := chromepolicy.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
54 //
55 // See [google.golang.org/api/option.ClientOption] for details on options.
56 package chromepolicy // import "google.golang.org/api/chromepolicy/v1"
57
58 import (
59 "bytes"
60 "context"
61 "encoding/json"
62 "errors"
63 "fmt"
64 "io"
65 "log/slog"
66 "net/http"
67 "net/url"
68 "strconv"
69 "strings"
70
71 "github.com/googleapis/gax-go/v2/internallog"
72 googleapi "google.golang.org/api/googleapi"
73 internal "google.golang.org/api/internal"
74 gensupport "google.golang.org/api/internal/gensupport"
75 option "google.golang.org/api/option"
76 internaloption "google.golang.org/api/option/internaloption"
77 htransport "google.golang.org/api/transport/http"
78 )
79
80 // Always reference these packages, just in case the auto-generated code
81 // below doesn't.
82 var _ = bytes.NewBuffer
83 var _ = strconv.Itoa
84 var _ = fmt.Sprintf
85 var _ = json.NewDecoder
86 var _ = io.Copy
87 var _ = url.Parse
88 var _ = gensupport.MarshalJSON
89 var _ = googleapi.Version
90 var _ = errors.New
91 var _ = strings.Replace
92 var _ = context.Canceled
93 var _ = internaloption.WithDefaultEndpoint
94 var _ = internal.Version
95 var _ = internallog.New
96
97 const apiId = "chromepolicy:v1"
98 const apiName = "chromepolicy"
99 const apiVersion = "v1"
100 const basePath = "https://chromepolicy.googleapis.com/"
101 const basePathTemplate = "https://chromepolicy.UNIVERSE_DOMAIN/"
102 const mtlsBasePath = "https://chromepolicy.mtls.googleapis.com/"
103
104 // OAuth2 scopes used by this API.
105 const (
106 // See, edit, create or delete policies applied to ChromeOS and Chrome Browsers
107 // managed within your organization
108 ChromeManagementPolicyScope = "https://www.googleapis.com/auth/chrome.management.policy"
109
110 // See policies applied to ChromeOS and Chrome Browsers managed within your
111 // organization
112 ChromeManagementPolicyReadonlyScope = "https://www.googleapis.com/auth/chrome.management.policy.readonly"
113 )
114
115 // NewService creates a new Service.
116 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
117 scopesOption := internaloption.WithDefaultScopes(
118 "https://www.googleapis.com/auth/chrome.management.policy",
119 "https://www.googleapis.com/auth/chrome.management.policy.readonly",
120 )
121 // NOTE: prepend, so we don't override user-specified scopes.
122 opts = append([]option.ClientOption{scopesOption}, opts...)
123 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
124 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
125 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
126 opts = append(opts, internaloption.EnableNewAuthLibrary())
127 client, endpoint, err := htransport.NewClient(ctx, opts...)
128 if err != nil {
129 return nil, err
130 }
131 s := &Service{client: client, BasePath: basePath, logger: internaloption.GetLogger(opts)}
132 s.Customers = NewCustomersService(s)
133 s.Media = NewMediaService(s)
134 if endpoint != "" {
135 s.BasePath = endpoint
136 }
137 return s, nil
138 }
139
140 // New creates a new Service. It uses the provided http.Client for requests.
141 //
142 // Deprecated: please use NewService instead.
143 // To provide a custom HTTP client, use option.WithHTTPClient.
144 // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
145 func New(client *http.Client) (*Service, error) {
146 if client == nil {
147 return nil, errors.New("client is nil")
148 }
149 return NewService(context.TODO(), option.WithHTTPClient(client))
150 }
151
152 type Service struct {
153 client *http.Client
154 logger *slog.Logger
155 BasePath string // API endpoint base URL
156 UserAgent string // optional additional User-Agent fragment
157
158 Customers *CustomersService
159
160 Media *MediaService
161 }
162
163 func (s *Service) userAgent() string {
164 if s.UserAgent == "" {
165 return googleapi.UserAgent
166 }
167 return googleapi.UserAgent + " " + s.UserAgent
168 }
169
170 func NewCustomersService(s *Service) *CustomersService {
171 rs := &CustomersService{s: s}
172 rs.Policies = NewCustomersPoliciesService(s)
173 rs.PolicySchemas = NewCustomersPolicySchemasService(s)
174 return rs
175 }
176
177 type CustomersService struct {
178 s *Service
179
180 Policies *CustomersPoliciesService
181
182 PolicySchemas *CustomersPolicySchemasService
183 }
184
185 func NewCustomersPoliciesService(s *Service) *CustomersPoliciesService {
186 rs := &CustomersPoliciesService{s: s}
187 rs.Groups = NewCustomersPoliciesGroupsService(s)
188 rs.Networks = NewCustomersPoliciesNetworksService(s)
189 rs.Orgunits = NewCustomersPoliciesOrgunitsService(s)
190 return rs
191 }
192
193 type CustomersPoliciesService struct {
194 s *Service
195
196 Groups *CustomersPoliciesGroupsService
197
198 Networks *CustomersPoliciesNetworksService
199
200 Orgunits *CustomersPoliciesOrgunitsService
201 }
202
203 func NewCustomersPoliciesGroupsService(s *Service) *CustomersPoliciesGroupsService {
204 rs := &CustomersPoliciesGroupsService{s: s}
205 return rs
206 }
207
208 type CustomersPoliciesGroupsService struct {
209 s *Service
210 }
211
212 func NewCustomersPoliciesNetworksService(s *Service) *CustomersPoliciesNetworksService {
213 rs := &CustomersPoliciesNetworksService{s: s}
214 return rs
215 }
216
217 type CustomersPoliciesNetworksService struct {
218 s *Service
219 }
220
221 func NewCustomersPoliciesOrgunitsService(s *Service) *CustomersPoliciesOrgunitsService {
222 rs := &CustomersPoliciesOrgunitsService{s: s}
223 return rs
224 }
225
226 type CustomersPoliciesOrgunitsService struct {
227 s *Service
228 }
229
230 func NewCustomersPolicySchemasService(s *Service) *CustomersPolicySchemasService {
231 rs := &CustomersPolicySchemasService{s: s}
232 return rs
233 }
234
235 type CustomersPolicySchemasService struct {
236 s *Service
237 }
238
239 func NewMediaService(s *Service) *MediaService {
240 rs := &MediaService{s: s}
241 return rs
242 }
243
244 type MediaService struct {
245 s *Service
246 }
247
248 // GoogleChromePolicyVersionsV1AdditionalTargetKeyName: Additional key names
249 // that will be used to identify the target of the policy value.
250 type GoogleChromePolicyVersionsV1AdditionalTargetKeyName struct {
251 // Key: Key name.
252 Key string `json:"key,omitempty"`
253 // KeyDescription: Key description.
254 KeyDescription string `json:"keyDescription,omitempty"`
255 // ForceSendFields is a list of field names (e.g. "Key") to unconditionally
256 // include in API requests. By default, fields with empty or default values are
257 // omitted from API requests. See
258 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
259 // details.
260 ForceSendFields []string `json:"-"`
261 // NullFields is a list of field names (e.g. "Key") to include in API requests
262 // with the JSON null value. By default, fields with empty values are omitted
263 // from API requests. See
264 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
265 NullFields []string `json:"-"`
266 }
267
268 func (s GoogleChromePolicyVersionsV1AdditionalTargetKeyName) MarshalJSON() ([]byte, error) {
269 type NoMethod GoogleChromePolicyVersionsV1AdditionalTargetKeyName
270 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
271 }
272
273 // GoogleChromePolicyVersionsV1BatchDeleteGroupPoliciesRequest: Request message
274 // for specifying that multiple policy values will be deleted.
275 type GoogleChromePolicyVersionsV1BatchDeleteGroupPoliciesRequest struct {
276 // Requests: List of policies that will be deleted as defined by the
277 // `requests`. All requests in the list must follow these restrictions: 1. All
278 // schemas in the list must have the same root namespace. 2. All
279 // `policyTargetKey.targetResource` values must point to a group resource. 3.
280 // All `policyTargetKey` values must have the same `app_id` key name in the
281 // `additionalTargetKeys`. 4. No two modification requests can reference the
282 // same `policySchema` + ` policyTargetKey` pair.
283 Requests []*GoogleChromePolicyVersionsV1DeleteGroupPolicyRequest `json:"requests,omitempty"`
284 // ForceSendFields is a list of field names (e.g. "Requests") to
285 // unconditionally include in API requests. By default, fields with empty or
286 // default values are omitted from API requests. See
287 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
288 // details.
289 ForceSendFields []string `json:"-"`
290 // NullFields is a list of field names (e.g. "Requests") to include in API
291 // requests with the JSON null value. By default, fields with empty values are
292 // omitted from API requests. See
293 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
294 NullFields []string `json:"-"`
295 }
296
297 func (s GoogleChromePolicyVersionsV1BatchDeleteGroupPoliciesRequest) MarshalJSON() ([]byte, error) {
298 type NoMethod GoogleChromePolicyVersionsV1BatchDeleteGroupPoliciesRequest
299 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
300 }
301
302 // GoogleChromePolicyVersionsV1BatchInheritOrgUnitPoliciesRequest: Request
303 // message for specifying that multiple policy values inherit their value from
304 // their parents.
305 type GoogleChromePolicyVersionsV1BatchInheritOrgUnitPoliciesRequest struct {
306 // Requests: List of policies that have to inherit their values as defined by
307 // the `requests`. All requests in the list must follow these restrictions: 1.
308 // All schemas in the list must have the same root namespace. 2. All
309 // `policyTargetKey.targetResource` values must point to an org unit resource.
310 // 3. All `policyTargetKey` values must have the same key names in the `
311 // additionalTargetKeys`. This also means if one of the targets has an empty
312 // `additionalTargetKeys` map, all of the targets must have an empty
313 // `additionalTargetKeys` map. 4. No two modification requests can reference
314 // the same `policySchema` + ` policyTargetKey` pair.
315 Requests []*GoogleChromePolicyVersionsV1InheritOrgUnitPolicyRequest `json:"requests,omitempty"`
316 // ForceSendFields is a list of field names (e.g. "Requests") to
317 // unconditionally include in API requests. By default, fields with empty or
318 // default values are omitted from API requests. See
319 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
320 // details.
321 ForceSendFields []string `json:"-"`
322 // NullFields is a list of field names (e.g. "Requests") to include in API
323 // requests with the JSON null value. By default, fields with empty values are
324 // omitted from API requests. See
325 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
326 NullFields []string `json:"-"`
327 }
328
329 func (s GoogleChromePolicyVersionsV1BatchInheritOrgUnitPoliciesRequest) MarshalJSON() ([]byte, error) {
330 type NoMethod GoogleChromePolicyVersionsV1BatchInheritOrgUnitPoliciesRequest
331 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
332 }
333
334 // GoogleChromePolicyVersionsV1BatchModifyGroupPoliciesRequest: Request message
335 // for modifying multiple policy values for a specific group-based target.
336 type GoogleChromePolicyVersionsV1BatchModifyGroupPoliciesRequest struct {
337 // Requests: List of policies to modify as defined by the `requests`. All
338 // requests in the list must follow these restrictions: 1. All schemas in the
339 // list must have the same root namespace. 2. All
340 // `policyTargetKey.targetResource` values must point to a group resource. 3.
341 // All `policyTargetKey` values must have the same `app_id` key name in the
342 // `additionalTargetKeys`. 4. No two modification requests can reference the
343 // same `policySchema` + ` policyTargetKey` pair.
344 Requests []*GoogleChromePolicyVersionsV1ModifyGroupPolicyRequest `json:"requests,omitempty"`
345 // ForceSendFields is a list of field names (e.g. "Requests") to
346 // unconditionally include in API requests. By default, fields with empty or
347 // default values are omitted from API requests. See
348 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
349 // details.
350 ForceSendFields []string `json:"-"`
351 // NullFields is a list of field names (e.g. "Requests") to include in API
352 // requests with the JSON null value. By default, fields with empty values are
353 // omitted from API requests. See
354 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
355 NullFields []string `json:"-"`
356 }
357
358 func (s GoogleChromePolicyVersionsV1BatchModifyGroupPoliciesRequest) MarshalJSON() ([]byte, error) {
359 type NoMethod GoogleChromePolicyVersionsV1BatchModifyGroupPoliciesRequest
360 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
361 }
362
363 // GoogleChromePolicyVersionsV1BatchModifyOrgUnitPoliciesRequest: Request
364 // message for modifying multiple policy values for a specific target.
365 type GoogleChromePolicyVersionsV1BatchModifyOrgUnitPoliciesRequest struct {
366 // Requests: List of policies to modify as defined by the `requests`. All
367 // requests in the list must follow these restrictions: 1. All schemas in the
368 // list must have the same root namespace. 2. All
369 // `policyTargetKey.targetResource` values must point to an org unit resource.
370 // 3. All `policyTargetKey` values must have the same key names in the `
371 // additionalTargetKeys`. This also means if one of the targets has an empty
372 // `additionalTargetKeys` map, all of the targets must have an empty
373 // `additionalTargetKeys` map. 4. No two modification requests can reference
374 // the same `policySchema` + ` policyTargetKey` pair.
375 Requests []*GoogleChromePolicyVersionsV1ModifyOrgUnitPolicyRequest `json:"requests,omitempty"`
376 // ForceSendFields is a list of field names (e.g. "Requests") to
377 // unconditionally include in API requests. By default, fields with empty or
378 // default values are omitted from API requests. See
379 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
380 // details.
381 ForceSendFields []string `json:"-"`
382 // NullFields is a list of field names (e.g. "Requests") to include in API
383 // requests with the JSON null value. By default, fields with empty values are
384 // omitted from API requests. See
385 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
386 NullFields []string `json:"-"`
387 }
388
389 func (s GoogleChromePolicyVersionsV1BatchModifyOrgUnitPoliciesRequest) MarshalJSON() ([]byte, error) {
390 type NoMethod GoogleChromePolicyVersionsV1BatchModifyOrgUnitPoliciesRequest
391 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
392 }
393
394 // GoogleChromePolicyVersionsV1CertificateReference: Error information for
395 // removing of a specific certificate on a specific target. A reference to a
396 // certificate.
397 type GoogleChromePolicyVersionsV1CertificateReference struct {
398 // Network: Output only. The name of the referencing network.
399 Network string `json:"network,omitempty"`
400 // OrgUnitId: Output only. The obfuscated id of the org unit the referencing
401 // network is in.
402 OrgUnitId string `json:"orgUnitId,omitempty"`
403 // ForceSendFields is a list of field names (e.g. "Network") to unconditionally
404 // include in API requests. By default, fields with empty or default values are
405 // omitted from API requests. See
406 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
407 // details.
408 ForceSendFields []string `json:"-"`
409 // NullFields is a list of field names (e.g. "Network") to include in API
410 // requests with the JSON null value. By default, fields with empty values are
411 // omitted from API requests. See
412 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
413 NullFields []string `json:"-"`
414 }
415
416 func (s GoogleChromePolicyVersionsV1CertificateReference) MarshalJSON() ([]byte, error) {
417 type NoMethod GoogleChromePolicyVersionsV1CertificateReference
418 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
419 }
420
421 // GoogleChromePolicyVersionsV1DefineCertificateRequest: Request object for
422 // creating a certificate.
423 type GoogleChromePolicyVersionsV1DefineCertificateRequest struct {
424 // CeritificateName: Optional. The optional name of the certificate. If not
425 // specified, the certificate issuer will be used as the name.
426 CeritificateName string `json:"ceritificateName,omitempty"`
427 // Certificate: Required. The raw contents of the .PEM, .CRT, or .CER file.
428 Certificate string `json:"certificate,omitempty"`
429 // Settings: Optional. Certificate settings within the
430 // chrome.networks.certificates namespace.
431 Settings []*GoogleChromePolicyVersionsV1NetworkSetting `json:"settings,omitempty"`
432 // TargetResource: Required. The target resource on which this certificate is
433 // applied. The following resources are supported: * Organizational Unit
434 // ("orgunits/{orgunit_id}")
435 TargetResource string `json:"targetResource,omitempty"`
436 // ForceSendFields is a list of field names (e.g. "CeritificateName") to
437 // unconditionally include in API requests. By default, fields with empty or
438 // default values are omitted from API requests. See
439 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
440 // details.
441 ForceSendFields []string `json:"-"`
442 // NullFields is a list of field names (e.g. "CeritificateName") to include in
443 // API requests with the JSON null value. By default, fields with empty values
444 // are omitted from API requests. See
445 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
446 NullFields []string `json:"-"`
447 }
448
449 func (s GoogleChromePolicyVersionsV1DefineCertificateRequest) MarshalJSON() ([]byte, error) {
450 type NoMethod GoogleChromePolicyVersionsV1DefineCertificateRequest
451 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
452 }
453
454 // GoogleChromePolicyVersionsV1DefineCertificateResponse: Response object for
455 // creating a certificate.
456 type GoogleChromePolicyVersionsV1DefineCertificateResponse struct {
457 // NetworkId: The guid of the certificate created by the action.
458 NetworkId string `json:"networkId,omitempty"`
459 // Settings: the affiliated settings of the certificate (NOT IMPLEMENTED)
460 Settings []*GoogleChromePolicyVersionsV1NetworkSetting `json:"settings,omitempty"`
461 // TargetResource: the resource at which the certificate is defined.
462 TargetResource string `json:"targetResource,omitempty"`
463
464 // ServerResponse contains the HTTP response code and headers from the server.
465 googleapi.ServerResponse `json:"-"`
466 // ForceSendFields is a list of field names (e.g. "NetworkId") to
467 // unconditionally include in API requests. By default, fields with empty or
468 // default values are omitted from API requests. See
469 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
470 // details.
471 ForceSendFields []string `json:"-"`
472 // NullFields is a list of field names (e.g. "NetworkId") to include in API
473 // requests with the JSON null value. By default, fields with empty values are
474 // omitted from API requests. See
475 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
476 NullFields []string `json:"-"`
477 }
478
479 func (s GoogleChromePolicyVersionsV1DefineCertificateResponse) MarshalJSON() ([]byte, error) {
480 type NoMethod GoogleChromePolicyVersionsV1DefineCertificateResponse
481 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
482 }
483
484 // GoogleChromePolicyVersionsV1DefineNetworkRequest: Request object for
485 // creating a new network.
486 type GoogleChromePolicyVersionsV1DefineNetworkRequest struct {
487 // Name: Required. Name of the new created network.
488 Name string `json:"name,omitempty"`
489 // Settings: Required. Detailed network settings.
490 Settings []*GoogleChromePolicyVersionsV1NetworkSetting `json:"settings,omitempty"`
491 // TargetResource: Required. The target resource on which this new network will
492 // be defined. The following resources are supported: * Organizational Unit
493 // ("orgunits/{orgunit_id}")
494 TargetResource string `json:"targetResource,omitempty"`
495 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally
496 // include in API requests. By default, fields with empty or default values are
497 // omitted from API requests. See
498 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
499 // details.
500 ForceSendFields []string `json:"-"`
501 // NullFields is a list of field names (e.g. "Name") to include in API requests
502 // with the JSON null value. By default, fields with empty values are omitted
503 // from API requests. See
504 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
505 NullFields []string `json:"-"`
506 }
507
508 func (s GoogleChromePolicyVersionsV1DefineNetworkRequest) MarshalJSON() ([]byte, error) {
509 type NoMethod GoogleChromePolicyVersionsV1DefineNetworkRequest
510 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
511 }
512
513 // GoogleChromePolicyVersionsV1DefineNetworkResponse: Response object for
514 // creating a network.
515 type GoogleChromePolicyVersionsV1DefineNetworkResponse struct {
516 // NetworkId: Network ID of the new created network.
517 NetworkId string `json:"networkId,omitempty"`
518 // Settings: Detailed network settings of the new created network
519 Settings []*GoogleChromePolicyVersionsV1NetworkSetting `json:"settings,omitempty"`
520 // TargetResource: The target resource on which this new network will be
521 // defined. The following resources are supported: * Organizational Unit
522 // ("orgunits/{orgunit_id}")
523 TargetResource string `json:"targetResource,omitempty"`
524
525 // ServerResponse contains the HTTP response code and headers from the server.
526 googleapi.ServerResponse `json:"-"`
527 // ForceSendFields is a list of field names (e.g. "NetworkId") to
528 // unconditionally include in API requests. By default, fields with empty or
529 // default values are omitted from API requests. See
530 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
531 // details.
532 ForceSendFields []string `json:"-"`
533 // NullFields is a list of field names (e.g. "NetworkId") to include in API
534 // requests with the JSON null value. By default, fields with empty values are
535 // omitted from API requests. See
536 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
537 NullFields []string `json:"-"`
538 }
539
540 func (s GoogleChromePolicyVersionsV1DefineNetworkResponse) MarshalJSON() ([]byte, error) {
541 type NoMethod GoogleChromePolicyVersionsV1DefineNetworkResponse
542 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
543 }
544
545 // GoogleChromePolicyVersionsV1DeleteGroupPolicyRequest: Request parameters for
546 // deleting the policy value of a specific group target.
547 type GoogleChromePolicyVersionsV1DeleteGroupPolicyRequest struct {
548 // PolicySchema: The fully qualified name of the policy schema that is being
549 // inherited.
550 PolicySchema string `json:"policySchema,omitempty"`
551 // PolicyTargetKey: Required. The key of the target for which we want to modify
552 // a policy. The target resource must point to a Group.
553 PolicyTargetKey *GoogleChromePolicyVersionsV1PolicyTargetKey `json:"policyTargetKey,omitempty"`
554 // ForceSendFields is a list of field names (e.g. "PolicySchema") to
555 // unconditionally include in API requests. By default, fields with empty or
556 // default values are omitted from API requests. See
557 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
558 // details.
559 ForceSendFields []string `json:"-"`
560 // NullFields is a list of field names (e.g. "PolicySchema") to include in API
561 // requests with the JSON null value. By default, fields with empty values are
562 // omitted from API requests. See
563 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
564 NullFields []string `json:"-"`
565 }
566
567 func (s GoogleChromePolicyVersionsV1DeleteGroupPolicyRequest) MarshalJSON() ([]byte, error) {
568 type NoMethod GoogleChromePolicyVersionsV1DeleteGroupPolicyRequest
569 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
570 }
571
572 // GoogleChromePolicyVersionsV1FieldConstraints: Information about any range
573 // constraints.
574 type GoogleChromePolicyVersionsV1FieldConstraints struct {
575 // NumericRangeConstraint: The allowed range for numeric fields.
576 NumericRangeConstraint *GoogleChromePolicyVersionsV1NumericRangeConstraint `json:"numericRangeConstraint,omitempty"`
577 // UploadedFileConstraints: Constraints on the uploaded file of a file policy.
578 // If present, this policy requires a URL that can be fetched by uploading a
579 // file with the constraints specified in this proto.
580 UploadedFileConstraints *GoogleChromePolicyVersionsV1UploadedFileConstraints `json:"uploadedFileConstraints,omitempty"`
581 // ForceSendFields is a list of field names (e.g. "NumericRangeConstraint") to
582 // unconditionally include in API requests. By default, fields with empty or
583 // default values are omitted from API requests. See
584 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
585 // details.
586 ForceSendFields []string `json:"-"`
587 // NullFields is a list of field names (e.g. "NumericRangeConstraint") to
588 // include in API requests with the JSON null value. By default, fields with
589 // empty values are omitted from API requests. See
590 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
591 NullFields []string `json:"-"`
592 }
593
594 func (s GoogleChromePolicyVersionsV1FieldConstraints) MarshalJSON() ([]byte, error) {
595 type NoMethod GoogleChromePolicyVersionsV1FieldConstraints
596 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
597 }
598
599 // GoogleChromePolicyVersionsV1InheritOrgUnitPolicyRequest: Request parameters
600 // for inheriting policy value of a specific org unit target from the policy
601 // value of its parent org unit.
602 type GoogleChromePolicyVersionsV1InheritOrgUnitPolicyRequest struct {
603 // PolicySchema: The fully qualified name of the policy schema that is being
604 // inherited.
605 PolicySchema string `json:"policySchema,omitempty"`
606 // PolicyTargetKey: Required. The key of the target for which we want to modify
607 // a policy. The target resource must point to an Org Unit.
608 PolicyTargetKey *GoogleChromePolicyVersionsV1PolicyTargetKey `json:"policyTargetKey,omitempty"`
609 // ForceSendFields is a list of field names (e.g. "PolicySchema") to
610 // unconditionally include in API requests. By default, fields with empty or
611 // default values are omitted from API requests. See
612 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
613 // details.
614 ForceSendFields []string `json:"-"`
615 // NullFields is a list of field names (e.g. "PolicySchema") to include in API
616 // requests with the JSON null value. By default, fields with empty values are
617 // omitted from API requests. See
618 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
619 NullFields []string `json:"-"`
620 }
621
622 func (s GoogleChromePolicyVersionsV1InheritOrgUnitPolicyRequest) MarshalJSON() ([]byte, error) {
623 type NoMethod GoogleChromePolicyVersionsV1InheritOrgUnitPolicyRequest
624 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
625 }
626
627 // GoogleChromePolicyVersionsV1ListGroupPriorityOrderingRequest: Request
628 // message for listing the group priority ordering of an app.
629 type GoogleChromePolicyVersionsV1ListGroupPriorityOrderingRequest struct {
630 // PolicyNamespace: The namespace of the policy type for the request.
631 PolicyNamespace string `json:"policyNamespace,omitempty"`
632 // PolicySchema: The schema name of the policy for the request.
633 PolicySchema string `json:"policySchema,omitempty"`
634 // PolicyTargetKey: Required. The key of the target for which we want to
635 // retrieve the group priority ordering. The target resource must point to an
636 // app.
637 PolicyTargetKey *GoogleChromePolicyVersionsV1PolicyTargetKey `json:"policyTargetKey,omitempty"`
638 // ForceSendFields is a list of field names (e.g. "PolicyNamespace") to
639 // unconditionally include in API requests. By default, fields with empty or
640 // default values are omitted from API requests. See
641 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
642 // details.
643 ForceSendFields []string `json:"-"`
644 // NullFields is a list of field names (e.g. "PolicyNamespace") to include in
645 // API requests with the JSON null value. By default, fields with empty values
646 // are omitted from API requests. See
647 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
648 NullFields []string `json:"-"`
649 }
650
651 func (s GoogleChromePolicyVersionsV1ListGroupPriorityOrderingRequest) MarshalJSON() ([]byte, error) {
652 type NoMethod GoogleChromePolicyVersionsV1ListGroupPriorityOrderingRequest
653 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
654 }
655
656 // GoogleChromePolicyVersionsV1ListGroupPriorityOrderingResponse: Response
657 // message for listing the group priority ordering of an app.
658 type GoogleChromePolicyVersionsV1ListGroupPriorityOrderingResponse struct {
659 // GroupIds: Output only. The group IDs, in priority ordering.
660 GroupIds []string `json:"groupIds,omitempty"`
661 // PolicyNamespace: Output only. The namespace of the policy type of the group
662 // IDs.
663 PolicyNamespace string `json:"policyNamespace,omitempty"`
664 // PolicySchema: Output only. The schema name of the policy for the group IDs.
665 PolicySchema string `json:"policySchema,omitempty"`
666 // PolicyTargetKey: Output only. The target resource for which the group
667 // priority ordering has been retrieved.
668 PolicyTargetKey *GoogleChromePolicyVersionsV1PolicyTargetKey `json:"policyTargetKey,omitempty"`
669
670 // ServerResponse contains the HTTP response code and headers from the server.
671 googleapi.ServerResponse `json:"-"`
672 // ForceSendFields is a list of field names (e.g. "GroupIds") to
673 // unconditionally include in API requests. By default, fields with empty or
674 // default values are omitted from API requests. See
675 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
676 // details.
677 ForceSendFields []string `json:"-"`
678 // NullFields is a list of field names (e.g. "GroupIds") to include in API
679 // requests with the JSON null value. By default, fields with empty values are
680 // omitted from API requests. See
681 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
682 NullFields []string `json:"-"`
683 }
684
685 func (s GoogleChromePolicyVersionsV1ListGroupPriorityOrderingResponse) MarshalJSON() ([]byte, error) {
686 type NoMethod GoogleChromePolicyVersionsV1ListGroupPriorityOrderingResponse
687 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
688 }
689
690 // GoogleChromePolicyVersionsV1ListPolicySchemasResponse: Response message for
691 // listing policy schemas that match a filter.
692 type GoogleChromePolicyVersionsV1ListPolicySchemasResponse struct {
693 // NextPageToken: The page token used to get the next page of policy schemas.
694 NextPageToken string `json:"nextPageToken,omitempty"`
695 // PolicySchemas: The list of policy schemas that match the query.
696 PolicySchemas []*GoogleChromePolicyVersionsV1PolicySchema `json:"policySchemas,omitempty"`
697
698 // ServerResponse contains the HTTP response code and headers from the server.
699 googleapi.ServerResponse `json:"-"`
700 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
701 // unconditionally include in API requests. By default, fields with empty or
702 // default values are omitted from API requests. See
703 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
704 // details.
705 ForceSendFields []string `json:"-"`
706 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
707 // requests with the JSON null value. By default, fields with empty values are
708 // omitted from API requests. See
709 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
710 NullFields []string `json:"-"`
711 }
712
713 func (s GoogleChromePolicyVersionsV1ListPolicySchemasResponse) MarshalJSON() ([]byte, error) {
714 type NoMethod GoogleChromePolicyVersionsV1ListPolicySchemasResponse
715 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
716 }
717
718 // GoogleChromePolicyVersionsV1ModifyGroupPolicyRequest: Request parameters for
719 // modifying a policy value for a specific group target.
720 type GoogleChromePolicyVersionsV1ModifyGroupPolicyRequest struct {
721 // PolicyTargetKey: Required. The key of the target for which we want to modify
722 // a policy. The target resource must point to a Group.
723 PolicyTargetKey *GoogleChromePolicyVersionsV1PolicyTargetKey `json:"policyTargetKey,omitempty"`
724 // PolicyValue: The new value for the policy.
725 PolicyValue *GoogleChromePolicyVersionsV1PolicyValue `json:"policyValue,omitempty"`
726 // UpdateMask: Required. Policy fields to update. Only fields in this mask will
727 // be updated; other fields in `policy_value` will be ignored (even if they
728 // have values). If a field is in this list it must have a value in
729 // 'policy_value'.
730 UpdateMask string `json:"updateMask,omitempty"`
731 // ForceSendFields is a list of field names (e.g. "PolicyTargetKey") to
732 // unconditionally include in API requests. By default, fields with empty or
733 // default values are omitted from API requests. See
734 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
735 // details.
736 ForceSendFields []string `json:"-"`
737 // NullFields is a list of field names (e.g. "PolicyTargetKey") to include in
738 // API requests with the JSON null value. By default, fields with empty values
739 // are omitted from API requests. See
740 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
741 NullFields []string `json:"-"`
742 }
743
744 func (s GoogleChromePolicyVersionsV1ModifyGroupPolicyRequest) MarshalJSON() ([]byte, error) {
745 type NoMethod GoogleChromePolicyVersionsV1ModifyGroupPolicyRequest
746 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
747 }
748
749 // GoogleChromePolicyVersionsV1ModifyOrgUnitPolicyRequest: Request parameters
750 // for modifying a policy value for a specific org unit target.
751 type GoogleChromePolicyVersionsV1ModifyOrgUnitPolicyRequest struct {
752 // PolicyTargetKey: Required. The key of the target for which we want to modify
753 // a policy. The target resource must point to an Org Unit.
754 PolicyTargetKey *GoogleChromePolicyVersionsV1PolicyTargetKey `json:"policyTargetKey,omitempty"`
755 // PolicyValue: The new value for the policy.
756 PolicyValue *GoogleChromePolicyVersionsV1PolicyValue `json:"policyValue,omitempty"`
757 // UpdateMask: Required. Policy fields to update. Only fields in this mask will
758 // be updated; other fields in `policy_value` will be ignored (even if they
759 // have values). If a field is in this list it must have a value in
760 // 'policy_value'.
761 UpdateMask string `json:"updateMask,omitempty"`
762 // ForceSendFields is a list of field names (e.g. "PolicyTargetKey") to
763 // unconditionally include in API requests. By default, fields with empty or
764 // default values are omitted from API requests. See
765 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
766 // details.
767 ForceSendFields []string `json:"-"`
768 // NullFields is a list of field names (e.g. "PolicyTargetKey") to include in
769 // API requests with the JSON null value. By default, fields with empty values
770 // are omitted from API requests. See
771 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
772 NullFields []string `json:"-"`
773 }
774
775 func (s GoogleChromePolicyVersionsV1ModifyOrgUnitPolicyRequest) MarshalJSON() ([]byte, error) {
776 type NoMethod GoogleChromePolicyVersionsV1ModifyOrgUnitPolicyRequest
777 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
778 }
779
780 // GoogleChromePolicyVersionsV1NetworkSetting: A network setting contains
781 // network configurations. It adheres to the PolicyAPI formats defined under
782 // the namespace chrome.networks.{wifi/ethernet/cellular/vpn}.Details
783 type GoogleChromePolicyVersionsV1NetworkSetting struct {
784 // PolicySchema: The fully qualified name of the network setting.
785 PolicySchema string `json:"policySchema,omitempty"`
786 // Value: The value of the network setting.
787 Value googleapi.RawMessage `json:"value,omitempty"`
788 // ForceSendFields is a list of field names (e.g. "PolicySchema") to
789 // unconditionally include in API requests. By default, fields with empty or
790 // default values are omitted from API requests. See
791 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
792 // details.
793 ForceSendFields []string `json:"-"`
794 // NullFields is a list of field names (e.g. "PolicySchema") to include in API
795 // requests with the JSON null value. By default, fields with empty values are
796 // omitted from API requests. See
797 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
798 NullFields []string `json:"-"`
799 }
800
801 func (s GoogleChromePolicyVersionsV1NetworkSetting) MarshalJSON() ([]byte, error) {
802 type NoMethod GoogleChromePolicyVersionsV1NetworkSetting
803 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
804 }
805
806 // GoogleChromePolicyVersionsV1NumericRangeConstraint: A constraint on upper
807 // and/or lower bounds, with at least one being set.
808 type GoogleChromePolicyVersionsV1NumericRangeConstraint struct {
809 // Maximum: Maximum value.
810 Maximum int64 `json:"maximum,omitempty,string"`
811 // Minimum: Minimum value.
812 Minimum int64 `json:"minimum,omitempty,string"`
813 // ForceSendFields is a list of field names (e.g. "Maximum") to unconditionally
814 // include in API requests. By default, fields with empty or default values are
815 // omitted from API requests. See
816 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
817 // details.
818 ForceSendFields []string `json:"-"`
819 // NullFields is a list of field names (e.g. "Maximum") to include in API
820 // requests with the JSON null value. By default, fields with empty values are
821 // omitted from API requests. See
822 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
823 NullFields []string `json:"-"`
824 }
825
826 func (s GoogleChromePolicyVersionsV1NumericRangeConstraint) MarshalJSON() ([]byte, error) {
827 type NoMethod GoogleChromePolicyVersionsV1NumericRangeConstraint
828 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
829 }
830
831 // GoogleChromePolicyVersionsV1PolicyApiLifecycle: Lifecycle information.
832 type GoogleChromePolicyVersionsV1PolicyApiLifecycle struct {
833 // DeprecatedInFavorOf: In the event that this policy was deprecated in favor
834 // of another policy, the fully qualified namespace(s) of the new policies as
835 // they will show in PolicyAPI. Could only be set if policy_api_lifecycle_stage
836 // is API_DEPRECATED.
837 DeprecatedInFavorOf []string `json:"deprecatedInFavorOf,omitempty"`
838 // Description: Description about current life cycle.
839 Description string `json:"description,omitempty"`
840 // EndSupport: End supporting date for current policy. Attempting to modify a
841 // policy after its end support date will result in a Bad Request (400 error).
842 // Could only be set if policy_api_lifecycle_stage is API_DEPRECATED.
843 EndSupport *GoogleTypeDate `json:"endSupport,omitempty"`
844 // PolicyApiLifecycleStage: Indicates current life cycle stage of the policy
845 // API.
846 //
847 // Possible values:
848 // "API_UNSPECIFIED" - Policy Api Lifecycle is Unspecified.
849 // "API_PREVIEW" - Policy is not working yet, but giving developers heads up
850 // on format. This stage can transfer to API_DEVELOPEMNT or API_CURRENT.
851 // "API_DEVELOPMENT" - Policy can change format in backward incompatible way
852 // (breaking change). This stage can transfer to API_CURRENT or API_DEPRECATED.
853 // This could be used for policies launched only to TTs or launched to selected
854 // customers for emergency usage.
855 // "API_CURRENT" - Policy in official format. Policy can change format in
856 // backward compatible way (non-breaking change). Example: this policy can
857 // introduce a new field, which is considered non-breaking change, when field
858 // masks are properly utilized. This stage can transfer to API_DEPRECATED.
859 // "API_DEPRECATED" - Please stop using this policy. This policy is
860 // deprecated and may/will be removed in the future. Most likely a new policy
861 // was introduced to replace this one.
862 PolicyApiLifecycleStage string `json:"policyApiLifecycleStage,omitempty"`
863 // ScheduledToDeprecatePolicies: Corresponding to deprecated_in_favor_of, the
864 // fully qualified namespace(s) of the old policies that will be deprecated
865 // because of introduction of this policy.
866 ScheduledToDeprecatePolicies []string `json:"scheduledToDeprecatePolicies,omitempty"`
867 // ForceSendFields is a list of field names (e.g. "DeprecatedInFavorOf") to
868 // unconditionally include in API requests. By default, fields with empty or
869 // default values are omitted from API requests. See
870 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
871 // details.
872 ForceSendFields []string `json:"-"`
873 // NullFields is a list of field names (e.g. "DeprecatedInFavorOf") to include
874 // in API requests with the JSON null value. By default, fields with empty
875 // values are omitted from API requests. See
876 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
877 NullFields []string `json:"-"`
878 }
879
880 func (s GoogleChromePolicyVersionsV1PolicyApiLifecycle) MarshalJSON() ([]byte, error) {
881 type NoMethod GoogleChromePolicyVersionsV1PolicyApiLifecycle
882 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
883 }
884
885 // GoogleChromePolicyVersionsV1PolicyModificationError: Error information for a
886 // modification request of a specific policy on a specific target.
887 type GoogleChromePolicyVersionsV1PolicyModificationError struct {
888 // Errors: Output only. The non-field errors related to the modification.
889 Errors []string `json:"errors,omitempty"`
890 // FieldErrors: Output only. The error messages related to the modification.
891 FieldErrors []*GoogleChromePolicyVersionsV1PolicyModificationFieldError `json:"fieldErrors,omitempty"`
892 // PolicySchema: Output only. The specific policy schema modification that had
893 // an error.
894 PolicySchema string `json:"policySchema,omitempty"`
895 // PolicyTargetKey: Output only. The specific policy target modification that
896 // had error.
897 PolicyTargetKey *GoogleChromePolicyVersionsV1PolicyTargetKey `json:"policyTargetKey,omitempty"`
898 // ForceSendFields is a list of field names (e.g. "Errors") to unconditionally
899 // include in API requests. By default, fields with empty or default values are
900 // omitted from API requests. See
901 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
902 // details.
903 ForceSendFields []string `json:"-"`
904 // NullFields is a list of field names (e.g. "Errors") to include in API
905 // requests with the JSON null value. By default, fields with empty values are
906 // omitted from API requests. See
907 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
908 NullFields []string `json:"-"`
909 }
910
911 func (s GoogleChromePolicyVersionsV1PolicyModificationError) MarshalJSON() ([]byte, error) {
912 type NoMethod GoogleChromePolicyVersionsV1PolicyModificationError
913 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
914 }
915
916 // GoogleChromePolicyVersionsV1PolicyModificationErrorDetails: Details of the
917 // errors encountered during a policy modification request. This message will
918 // be returned as part of the details of a google.rpc.Status returned to the
919 // user when there is an error in their request.
920 type GoogleChromePolicyVersionsV1PolicyModificationErrorDetails struct {
921 // ModificationErrors: Output only. List of specific policy modifications
922 // errors that may have occurred during a modifying request.
923 ModificationErrors []*GoogleChromePolicyVersionsV1PolicyModificationError `json:"modificationErrors,omitempty"`
924 // ForceSendFields is a list of field names (e.g. "ModificationErrors") to
925 // unconditionally include in API requests. By default, fields with empty or
926 // default values are omitted from API requests. See
927 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
928 // details.
929 ForceSendFields []string `json:"-"`
930 // NullFields is a list of field names (e.g. "ModificationErrors") to include
931 // in API requests with the JSON null value. By default, fields with empty
932 // values are omitted from API requests. See
933 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
934 NullFields []string `json:"-"`
935 }
936
937 func (s GoogleChromePolicyVersionsV1PolicyModificationErrorDetails) MarshalJSON() ([]byte, error) {
938 type NoMethod GoogleChromePolicyVersionsV1PolicyModificationErrorDetails
939 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
940 }
941
942 // GoogleChromePolicyVersionsV1PolicyModificationFieldError: Error information
943 // for a modification request of a specific field on a specific policy.
944 type GoogleChromePolicyVersionsV1PolicyModificationFieldError struct {
945 // Error: Output only. The error message related to the field.
946 Error string `json:"error,omitempty"`
947 // Field: Output only. The name of the field with the error.
948 Field string `json:"field,omitempty"`
949 // ForceSendFields is a list of field names (e.g. "Error") to unconditionally
950 // include in API requests. By default, fields with empty or default values are
951 // omitted from API requests. See
952 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
953 // details.
954 ForceSendFields []string `json:"-"`
955 // NullFields is a list of field names (e.g. "Error") to include in API
956 // requests with the JSON null value. By default, fields with empty values are
957 // omitted from API requests. See
958 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
959 NullFields []string `json:"-"`
960 }
961
962 func (s GoogleChromePolicyVersionsV1PolicyModificationFieldError) MarshalJSON() ([]byte, error) {
963 type NoMethod GoogleChromePolicyVersionsV1PolicyModificationFieldError
964 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
965 }
966
967 // GoogleChromePolicyVersionsV1PolicySchema: Resource representing a policy
968 // schema.
969 type GoogleChromePolicyVersionsV1PolicySchema struct {
970 // AccessRestrictions: Output only. Specific access restrictions related to
971 // this policy.
972 AccessRestrictions []string `json:"accessRestrictions,omitempty"`
973 // AdditionalTargetKeyNames: Output only. Additional key names that will be
974 // used to identify the target of the policy value. When specifying a
975 // `policyTargetKey`, each of the additional keys specified here will have to
976 // be included in the `additionalTargetKeys` map.
977 AdditionalTargetKeyNames []*GoogleChromePolicyVersionsV1AdditionalTargetKeyName `json:"additionalTargetKeyNames,omitempty"`
978 // CategoryTitle: Title of the category in which a setting belongs.
979 CategoryTitle string `json:"categoryTitle,omitempty"`
980 // Definition: Schema definition using proto descriptor.
981 Definition *Proto2FileDescriptorProto `json:"definition,omitempty"`
982 // FieldDescriptions: Output only. Detailed description of each field that is
983 // part of the schema. Fields are suggested to be displayed by the ordering in
984 // this list, not by field number.
985 FieldDescriptions []*GoogleChromePolicyVersionsV1PolicySchemaFieldDescription `json:"fieldDescriptions,omitempty"`
986 // Name: Format: name=customers/{customer}/policySchemas/{schema_namespace}
987 Name string `json:"name,omitempty"`
988 // Notices: Output only. Special notice messages related to setting certain
989 // values in certain fields in the schema.
990 Notices []*GoogleChromePolicyVersionsV1PolicySchemaNoticeDescription `json:"notices,omitempty"`
991 // PolicyApiLifecycle: Output only. Current lifecycle information.
992 PolicyApiLifecycle *GoogleChromePolicyVersionsV1PolicyApiLifecycle `json:"policyApiLifecycle,omitempty"`
993 // PolicyDescription: Output only. Description about the policy schema for user
994 // consumption.
995 PolicyDescription string `json:"policyDescription,omitempty"`
996 // SchemaName: Output only. The fully qualified name of the policy schema. This
997 // value is used to fill the field `policy_schema` in PolicyValue when calling
998 // BatchInheritOrgUnitPolicies BatchModifyOrgUnitPolicies
999 // BatchModifyGroupPolicies or BatchDeleteGroupPolicies.
1000 SchemaName string `json:"schemaName,omitempty"`
1001 // SupportUri: Output only. URI to related support article for this schema.
1002 SupportUri string `json:"supportUri,omitempty"`
1003 // SupportedPlatforms: Output only. List indicates that the policy will only
1004 // apply to devices/users on these platforms.
1005 //
1006 // Possible values:
1007 // "PLATFORM_UNSPECIFIED" - Unspecified platform.
1008 // "CHROME_OS" - ChromeOS.
1009 // "CHROME_BROWSER" - Chrome Browser for OSX/Windows/Linux.
1010 // "CHROME_BROWSER_FOR_ANDROID" - Chrome Browser for Android.
1011 // "CHROME_BROWSER_FOR_IOS" - Chrome Browser for iOS.
1012 SupportedPlatforms []string `json:"supportedPlatforms,omitempty"`
1013 // ValidTargetResources: Output only. Information about applicable target
1014 // resources for the policy.
1015 //
1016 // Possible values:
1017 // "TARGET_RESOURCE_UNSPECIFIED" - Unspecified target resource.
1018 // "ORG_UNIT" - Organizational Unit target resource.
1019 // "GROUP" - Group target resource.
1020 ValidTargetResources []string `json:"validTargetResources,omitempty"`
1021
1022 // ServerResponse contains the HTTP response code and headers from the server.
1023 googleapi.ServerResponse `json:"-"`
1024 // ForceSendFields is a list of field names (e.g. "AccessRestrictions") to
1025 // unconditionally include in API requests. By default, fields with empty or
1026 // default values are omitted from API requests. See
1027 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1028 // details.
1029 ForceSendFields []string `json:"-"`
1030 // NullFields is a list of field names (e.g. "AccessRestrictions") to include
1031 // in API requests with the JSON null value. By default, fields with empty
1032 // values are omitted from API requests. See
1033 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1034 NullFields []string `json:"-"`
1035 }
1036
1037 func (s GoogleChromePolicyVersionsV1PolicySchema) MarshalJSON() ([]byte, error) {
1038 type NoMethod GoogleChromePolicyVersionsV1PolicySchema
1039 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1040 }
1041
1042 // GoogleChromePolicyVersionsV1PolicySchemaFieldDependencies: The field and the
1043 // value it must have for another field to be allowed to be set.
1044 type GoogleChromePolicyVersionsV1PolicySchemaFieldDependencies struct {
1045 // SourceField: The source field which this field depends on.
1046 SourceField string `json:"sourceField,omitempty"`
1047 // SourceFieldValue: The value which the source field must have for this field
1048 // to be allowed to be set.
1049 SourceFieldValue string `json:"sourceFieldValue,omitempty"`
1050 // ForceSendFields is a list of field names (e.g. "SourceField") to
1051 // unconditionally include in API requests. By default, fields with empty or
1052 // default values are omitted from API requests. See
1053 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1054 // details.
1055 ForceSendFields []string `json:"-"`
1056 // NullFields is a list of field names (e.g. "SourceField") to include in API
1057 // requests with the JSON null value. By default, fields with empty values are
1058 // omitted from API requests. See
1059 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1060 NullFields []string `json:"-"`
1061 }
1062
1063 func (s GoogleChromePolicyVersionsV1PolicySchemaFieldDependencies) MarshalJSON() ([]byte, error) {
1064 type NoMethod GoogleChromePolicyVersionsV1PolicySchemaFieldDependencies
1065 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1066 }
1067
1068 // GoogleChromePolicyVersionsV1PolicySchemaFieldDescription: Provides detailed
1069 // information for a particular field that is part of a PolicySchema.
1070 type GoogleChromePolicyVersionsV1PolicySchemaFieldDescription struct {
1071 // DefaultValue: Output only. Client default if the policy is unset.
1072 DefaultValue interface{} `json:"defaultValue,omitempty"`
1073 // Description: Deprecated. Use name and field_description instead. The
1074 // description for the field.
1075 Description string `json:"description,omitempty"`
1076 // Field: Output only. The name of the field for associated with this
1077 // description.
1078 Field string `json:"field,omitempty"`
1079 // FieldConstraints: Output only. Information on any input constraints
1080 // associated on the values for the field.
1081 FieldConstraints *GoogleChromePolicyVersionsV1FieldConstraints `json:"fieldConstraints,omitempty"`
1082 // FieldDependencies: Output only. Provides a list of fields and values. At
1083 // least one of the fields must have the corresponding value in order for this
1084 // field to be allowed to be set.
1085 FieldDependencies []*GoogleChromePolicyVersionsV1PolicySchemaFieldDependencies `json:"fieldDependencies,omitempty"`
1086 // FieldDescription: Output only. The description of the field.
1087 FieldDescription string `json:"fieldDescription,omitempty"`
1088 // InputConstraint: Output only. Any input constraints associated on the values
1089 // for the field.
1090 InputConstraint string `json:"inputConstraint,omitempty"`
1091 // KnownValueDescriptions: Output only. If the field has a set of known values,
1092 // this field will provide a description for these values.
1093 KnownValueDescriptions []*GoogleChromePolicyVersionsV1PolicySchemaFieldKnownValueDescription `json:"knownValueDescriptions,omitempty"`
1094 // Name: Output only. The name of the field.
1095 Name string `json:"name,omitempty"`
1096 // NestedFieldDescriptions: Output only. Provides the description of the fields
1097 // nested in this field, if the field is a message type that defines multiple
1098 // fields. Fields are suggested to be displayed by the ordering in this list,
1099 // not by field number.
1100 NestedFieldDescriptions []*GoogleChromePolicyVersionsV1PolicySchemaFieldDescription `json:"nestedFieldDescriptions,omitempty"`
1101 // RequiredItems: Output only. Provides a list of fields that are required to
1102 // be set if this field has a certain value.
1103 RequiredItems []*GoogleChromePolicyVersionsV1PolicySchemaRequiredItems `json:"requiredItems,omitempty"`
1104 // ForceSendFields is a list of field names (e.g. "DefaultValue") to
1105 // unconditionally include in API requests. By default, fields with empty or
1106 // default values are omitted from API requests. See
1107 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1108 // details.
1109 ForceSendFields []string `json:"-"`
1110 // NullFields is a list of field names (e.g. "DefaultValue") to include in API
1111 // requests with the JSON null value. By default, fields with empty values are
1112 // omitted from API requests. See
1113 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1114 NullFields []string `json:"-"`
1115 }
1116
1117 func (s GoogleChromePolicyVersionsV1PolicySchemaFieldDescription) MarshalJSON() ([]byte, error) {
1118 type NoMethod GoogleChromePolicyVersionsV1PolicySchemaFieldDescription
1119 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1120 }
1121
1122 // GoogleChromePolicyVersionsV1PolicySchemaFieldKnownValueDescription: Provides
1123 // detailed information about a known value that is allowed for a particular
1124 // field in a PolicySchema.
1125 type GoogleChromePolicyVersionsV1PolicySchemaFieldKnownValueDescription struct {
1126 // Description: Output only. Additional description for this value.
1127 Description string `json:"description,omitempty"`
1128 // FieldDependencies: Output only. Field conditions required for this value to
1129 // be valid.
1130 FieldDependencies []*GoogleChromePolicyVersionsV1PolicySchemaFieldDependencies `json:"fieldDependencies,omitempty"`
1131 // Value: Output only. The string represenstation of the value that can be set
1132 // for the field.
1133 Value string `json:"value,omitempty"`
1134 // ForceSendFields is a list of field names (e.g. "Description") to
1135 // unconditionally include in API requests. By default, fields with empty or
1136 // default values are omitted from API requests. See
1137 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1138 // details.
1139 ForceSendFields []string `json:"-"`
1140 // NullFields is a list of field names (e.g. "Description") to include in API
1141 // requests with the JSON null value. By default, fields with empty values are
1142 // omitted from API requests. See
1143 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1144 NullFields []string `json:"-"`
1145 }
1146
1147 func (s GoogleChromePolicyVersionsV1PolicySchemaFieldKnownValueDescription) MarshalJSON() ([]byte, error) {
1148 type NoMethod GoogleChromePolicyVersionsV1PolicySchemaFieldKnownValueDescription
1149 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1150 }
1151
1152 // GoogleChromePolicyVersionsV1PolicySchemaNoticeDescription: Provides special
1153 // notice messages related to a particular value in a field that is part of a
1154 // PolicySchema.
1155 type GoogleChromePolicyVersionsV1PolicySchemaNoticeDescription struct {
1156 // AcknowledgementRequired: Output only. Whether the user needs to acknowledge
1157 // the notice message before the value can be set.
1158 AcknowledgementRequired bool `json:"acknowledgementRequired,omitempty"`
1159 // Field: Output only. The field name associated with the notice.
1160 Field string `json:"field,omitempty"`
1161 // NoticeMessage: Output only. The notice message associate with the value of
1162 // the field.
1163 NoticeMessage string `json:"noticeMessage,omitempty"`
1164 // NoticeValue: Output only. The value of the field that has a notice. When
1165 // setting the field to this value, the user may be required to acknowledge the
1166 // notice message in order for the value to be set.
1167 NoticeValue string `json:"noticeValue,omitempty"`
1168 // ForceSendFields is a list of field names (e.g. "AcknowledgementRequired") to
1169 // unconditionally include in API requests. By default, fields with empty or
1170 // default values are omitted from API requests. See
1171 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1172 // details.
1173 ForceSendFields []string `json:"-"`
1174 // NullFields is a list of field names (e.g. "AcknowledgementRequired") to
1175 // include in API requests with the JSON null value. By default, fields with
1176 // empty values are omitted from API requests. See
1177 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1178 NullFields []string `json:"-"`
1179 }
1180
1181 func (s GoogleChromePolicyVersionsV1PolicySchemaNoticeDescription) MarshalJSON() ([]byte, error) {
1182 type NoMethod GoogleChromePolicyVersionsV1PolicySchemaNoticeDescription
1183 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1184 }
1185
1186 // GoogleChromePolicyVersionsV1PolicySchemaRequiredItems: The fields that will
1187 // become required based on the value of this field.
1188 type GoogleChromePolicyVersionsV1PolicySchemaRequiredItems struct {
1189 // FieldConditions: The value(s) of the field that provoke required field
1190 // enforcement. An empty field_conditions implies that any value assigned to
1191 // this field will provoke required field enforcement.
1192 FieldConditions []string `json:"fieldConditions,omitempty"`
1193 // RequiredFields: The fields that are required as a consequence of the field
1194 // conditions.
1195 RequiredFields []string `json:"requiredFields,omitempty"`
1196 // ForceSendFields is a list of field names (e.g. "FieldConditions") to
1197 // unconditionally include in API requests. By default, fields with empty or
1198 // default values are omitted from API requests. See
1199 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1200 // details.
1201 ForceSendFields []string `json:"-"`
1202 // NullFields is a list of field names (e.g. "FieldConditions") to include in
1203 // API requests with the JSON null value. By default, fields with empty values
1204 // are omitted from API requests. See
1205 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1206 NullFields []string `json:"-"`
1207 }
1208
1209 func (s GoogleChromePolicyVersionsV1PolicySchemaRequiredItems) MarshalJSON() ([]byte, error) {
1210 type NoMethod GoogleChromePolicyVersionsV1PolicySchemaRequiredItems
1211 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1212 }
1213
1214 // GoogleChromePolicyVersionsV1PolicyTargetKey: The key used to identify the
1215 // target on which the policy will be applied.
1216 type GoogleChromePolicyVersionsV1PolicyTargetKey struct {
1217 // AdditionalTargetKeys: Map containing the additional target key name and
1218 // value pairs used to further identify the target of the policy.
1219 AdditionalTargetKeys map[string]string `json:"additionalTargetKeys,omitempty"`
1220 // TargetResource: The target resource on which this policy is applied. The
1221 // following resources are supported: * Organizational Unit
1222 // ("orgunits/{orgunit_id}") * Group ("groups/{group_id}")
1223 TargetResource string `json:"targetResource,omitempty"`
1224 // ForceSendFields is a list of field names (e.g. "AdditionalTargetKeys") to
1225 // unconditionally include in API requests. By default, fields with empty or
1226 // default values are omitted from API requests. See
1227 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1228 // details.
1229 ForceSendFields []string `json:"-"`
1230 // NullFields is a list of field names (e.g. "AdditionalTargetKeys") to include
1231 // in API requests with the JSON null value. By default, fields with empty
1232 // values are omitted from API requests. See
1233 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1234 NullFields []string `json:"-"`
1235 }
1236
1237 func (s GoogleChromePolicyVersionsV1PolicyTargetKey) MarshalJSON() ([]byte, error) {
1238 type NoMethod GoogleChromePolicyVersionsV1PolicyTargetKey
1239 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1240 }
1241
1242 // GoogleChromePolicyVersionsV1PolicyValue: A particular value for a policy
1243 // managed by the service.
1244 type GoogleChromePolicyVersionsV1PolicyValue struct {
1245 // PolicySchema: The fully qualified name of the policy schema associated with
1246 // this policy.
1247 PolicySchema string `json:"policySchema,omitempty"`
1248 // Value: The value of the policy that is compatible with the schema that it is
1249 // associated with.
1250 Value googleapi.RawMessage `json:"value,omitempty"`
1251 // ForceSendFields is a list of field names (e.g. "PolicySchema") to
1252 // unconditionally include in API requests. By default, fields with empty or
1253 // default values are omitted from API requests. See
1254 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1255 // details.
1256 ForceSendFields []string `json:"-"`
1257 // NullFields is a list of field names (e.g. "PolicySchema") to include in API
1258 // requests with the JSON null value. By default, fields with empty values are
1259 // omitted from API requests. See
1260 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1261 NullFields []string `json:"-"`
1262 }
1263
1264 func (s GoogleChromePolicyVersionsV1PolicyValue) MarshalJSON() ([]byte, error) {
1265 type NoMethod GoogleChromePolicyVersionsV1PolicyValue
1266 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1267 }
1268
1269 // GoogleChromePolicyVersionsV1RemoveCertificateErrorDetails: Details of the
1270 // errors encountered during a remove certificate request. This message will be
1271 // returned as part of the details of a google.rpc.Status returned to the user
1272 // when there is an error in their request.
1273 type GoogleChromePolicyVersionsV1RemoveCertificateErrorDetails struct {
1274 // CertificateReferences: Output only. If the certificate was not removed, a
1275 // list of references to the certificate that prevented it from being removed.
1276 // Only unreferenced certificates can be removed.
1277 CertificateReferences []*GoogleChromePolicyVersionsV1CertificateReference `json:"certificateReferences,omitempty"`
1278 // ForceSendFields is a list of field names (e.g. "CertificateReferences") to
1279 // unconditionally include in API requests. By default, fields with empty or
1280 // default values are omitted from API requests. See
1281 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1282 // details.
1283 ForceSendFields []string `json:"-"`
1284 // NullFields is a list of field names (e.g. "CertificateReferences") to
1285 // include in API requests with the JSON null value. By default, fields with
1286 // empty values are omitted from API requests. See
1287 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1288 NullFields []string `json:"-"`
1289 }
1290
1291 func (s GoogleChromePolicyVersionsV1RemoveCertificateErrorDetails) MarshalJSON() ([]byte, error) {
1292 type NoMethod GoogleChromePolicyVersionsV1RemoveCertificateErrorDetails
1293 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1294 }
1295
1296 // GoogleChromePolicyVersionsV1RemoveCertificateRequest: Request object for
1297 // removing a certificate.
1298 type GoogleChromePolicyVersionsV1RemoveCertificateRequest struct {
1299 // NetworkId: Required. The GUID of the certificate to remove.
1300 NetworkId string `json:"networkId,omitempty"`
1301 // TargetResource: Required. The target resource on which this certificate will
1302 // be removed. The following resources are supported: * Organizational Unit
1303 // ("orgunits/{orgunit_id}")
1304 TargetResource string `json:"targetResource,omitempty"`
1305 // ForceSendFields is a list of field names (e.g. "NetworkId") to
1306 // unconditionally include in API requests. By default, fields with empty or
1307 // default values are omitted from API requests. See
1308 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1309 // details.
1310 ForceSendFields []string `json:"-"`
1311 // NullFields is a list of field names (e.g. "NetworkId") to include in API
1312 // requests with the JSON null value. By default, fields with empty values are
1313 // omitted from API requests. See
1314 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1315 NullFields []string `json:"-"`
1316 }
1317
1318 func (s GoogleChromePolicyVersionsV1RemoveCertificateRequest) MarshalJSON() ([]byte, error) {
1319 type NoMethod GoogleChromePolicyVersionsV1RemoveCertificateRequest
1320 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1321 }
1322
1323 // GoogleChromePolicyVersionsV1RemoveCertificateResponse: Response object for
1324 // removing a certificate.
1325 type GoogleChromePolicyVersionsV1RemoveCertificateResponse struct {
1326 // ServerResponse contains the HTTP response code and headers from the server.
1327 googleapi.ServerResponse `json:"-"`
1328 }
1329
1330 // GoogleChromePolicyVersionsV1RemoveNetworkRequest: Request object for
1331 // removing a network
1332 type GoogleChromePolicyVersionsV1RemoveNetworkRequest struct {
1333 // NetworkId: Required. The GUID of the network to remove.
1334 NetworkId string `json:"networkId,omitempty"`
1335 // TargetResource: Required. The target resource on which this network will be
1336 // removed. The following resources are supported: * Organizational Unit
1337 // ("orgunits/{orgunit_id}")
1338 TargetResource string `json:"targetResource,omitempty"`
1339 // ForceSendFields is a list of field names (e.g. "NetworkId") to
1340 // unconditionally include in API requests. By default, fields with empty or
1341 // default values are omitted from API requests. See
1342 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1343 // details.
1344 ForceSendFields []string `json:"-"`
1345 // NullFields is a list of field names (e.g. "NetworkId") to include in API
1346 // requests with the JSON null value. By default, fields with empty values are
1347 // omitted from API requests. See
1348 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1349 NullFields []string `json:"-"`
1350 }
1351
1352 func (s GoogleChromePolicyVersionsV1RemoveNetworkRequest) MarshalJSON() ([]byte, error) {
1353 type NoMethod GoogleChromePolicyVersionsV1RemoveNetworkRequest
1354 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1355 }
1356
1357 // GoogleChromePolicyVersionsV1RemoveNetworkResponse: Response object for
1358 // removing a network.
1359 type GoogleChromePolicyVersionsV1RemoveNetworkResponse struct {
1360 // ServerResponse contains the HTTP response code and headers from the server.
1361 googleapi.ServerResponse `json:"-"`
1362 }
1363
1364 // GoogleChromePolicyVersionsV1ResolveRequest: Request message for getting the
1365 // resolved policy value for a specific target.
1366 type GoogleChromePolicyVersionsV1ResolveRequest struct {
1367 // PageSize: The maximum number of policies to return, defaults to 100 and has
1368 // a maximum of 1000.
1369 PageSize int64 `json:"pageSize,omitempty"`
1370 // PageToken: The page token used to retrieve a specific page of the request.
1371 PageToken string `json:"pageToken,omitempty"`
1372 // PolicySchemaFilter: Required. The schema filter to apply to the resolve
1373 // request. Specify a schema name to view a particular schema, for example:
1374 // chrome.users.ShowLogoutButton Wildcards are supported, but only in the leaf
1375 // portion of the schema name. Wildcards cannot be used in namespace directly.
1376 // Please read
1377 // https://developers.google.com/chrome/policy/guides/policy-schemas for
1378 // details on schema namespaces. For example: Valid: "chrome.users.*",
1379 // "chrome.users.apps.*", "chrome.printers.*" Invalid: "*", "*.users",
1380 // "chrome.*", "chrome.*.apps.*"
1381 PolicySchemaFilter string `json:"policySchemaFilter,omitempty"`
1382 // PolicyTargetKey: Required. The key of the target resource on which the
1383 // policies should be resolved.
1384 PolicyTargetKey *GoogleChromePolicyVersionsV1PolicyTargetKey `json:"policyTargetKey,omitempty"`
1385 // ForceSendFields is a list of field names (e.g. "PageSize") to
1386 // unconditionally include in API requests. By default, fields with empty or
1387 // default values are omitted from API requests. See
1388 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1389 // details.
1390 ForceSendFields []string `json:"-"`
1391 // NullFields is a list of field names (e.g. "PageSize") to include in API
1392 // requests with the JSON null value. By default, fields with empty values are
1393 // omitted from API requests. See
1394 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1395 NullFields []string `json:"-"`
1396 }
1397
1398 func (s GoogleChromePolicyVersionsV1ResolveRequest) MarshalJSON() ([]byte, error) {
1399 type NoMethod GoogleChromePolicyVersionsV1ResolveRequest
1400 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1401 }
1402
1403 // GoogleChromePolicyVersionsV1ResolveResponse: Response message for getting
1404 // the resolved policy value for a specific target.
1405 type GoogleChromePolicyVersionsV1ResolveResponse struct {
1406 // NextPageToken: The page token used to get the next set of resolved policies
1407 // found by the request.
1408 NextPageToken string `json:"nextPageToken,omitempty"`
1409 // ResolvedPolicies: The list of resolved policies found by the resolve
1410 // request.
1411 ResolvedPolicies []*GoogleChromePolicyVersionsV1ResolvedPolicy `json:"resolvedPolicies,omitempty"`
1412
1413 // ServerResponse contains the HTTP response code and headers from the server.
1414 googleapi.ServerResponse `json:"-"`
1415 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
1416 // unconditionally include in API requests. By default, fields with empty or
1417 // default values are omitted from API requests. See
1418 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1419 // details.
1420 ForceSendFields []string `json:"-"`
1421 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
1422 // requests with the JSON null value. By default, fields with empty values are
1423 // omitted from API requests. See
1424 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1425 NullFields []string `json:"-"`
1426 }
1427
1428 func (s GoogleChromePolicyVersionsV1ResolveResponse) MarshalJSON() ([]byte, error) {
1429 type NoMethod GoogleChromePolicyVersionsV1ResolveResponse
1430 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1431 }
1432
1433 // GoogleChromePolicyVersionsV1ResolvedPolicy: The resolved value of a policy
1434 // for a given target.
1435 type GoogleChromePolicyVersionsV1ResolvedPolicy struct {
1436 // AddedSourceKey: Output only. The added source key establishes at which level
1437 // an entity was explicitly added for management. This is useful for certain
1438 // type of policies that are only applied if they are explicitly added for
1439 // management. For example: apps and networks. An entity can only be deleted
1440 // from management in an Organizational Unit that it was explicitly added to.
1441 // If this is not present it means that the policy is managed without the need
1442 // to explicitly add an entity, for example: standard user or device policies.
1443 AddedSourceKey *GoogleChromePolicyVersionsV1PolicyTargetKey `json:"addedSourceKey,omitempty"`
1444 // SourceKey: Output only. The source resource from which this policy value is
1445 // obtained. May be the same as `targetKey` if the policy is directly modified
1446 // on the target, otherwise it would be another resource from which the policy
1447 // gets its value (if applicable). If not present, the source is the default
1448 // value for the customer.
1449 SourceKey *GoogleChromePolicyVersionsV1PolicyTargetKey `json:"sourceKey,omitempty"`
1450 // TargetKey: Output only. The target resource for which the resolved policy
1451 // value applies.
1452 TargetKey *GoogleChromePolicyVersionsV1PolicyTargetKey `json:"targetKey,omitempty"`
1453 // Value: Output only. The resolved value of the policy.
1454 Value *GoogleChromePolicyVersionsV1PolicyValue `json:"value,omitempty"`
1455 // ForceSendFields is a list of field names (e.g. "AddedSourceKey") to
1456 // unconditionally include in API requests. By default, fields with empty or
1457 // default values are omitted from API requests. See
1458 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1459 // details.
1460 ForceSendFields []string `json:"-"`
1461 // NullFields is a list of field names (e.g. "AddedSourceKey") to include in
1462 // API requests with the JSON null value. By default, fields with empty values
1463 // are omitted from API requests. See
1464 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1465 NullFields []string `json:"-"`
1466 }
1467
1468 func (s GoogleChromePolicyVersionsV1ResolvedPolicy) MarshalJSON() ([]byte, error) {
1469 type NoMethod GoogleChromePolicyVersionsV1ResolvedPolicy
1470 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1471 }
1472
1473 // GoogleChromePolicyVersionsV1UpdateGroupPriorityOrderingRequest: Request
1474 // message for updating the group priority ordering of an app.
1475 type GoogleChromePolicyVersionsV1UpdateGroupPriorityOrderingRequest struct {
1476 // GroupIds: Required. The group IDs, in desired priority ordering.
1477 GroupIds []string `json:"groupIds,omitempty"`
1478 // PolicyNamespace: The namespace of the policy type for the request.
1479 PolicyNamespace string `json:"policyNamespace,omitempty"`
1480 // PolicySchema: The schema name of the policy for the request.
1481 PolicySchema string `json:"policySchema,omitempty"`
1482 // PolicyTargetKey: Required. The key of the target for which we want to update
1483 // the group priority ordering. The target resource must point to an app.
1484 PolicyTargetKey *GoogleChromePolicyVersionsV1PolicyTargetKey `json:"policyTargetKey,omitempty"`
1485 // ForceSendFields is a list of field names (e.g. "GroupIds") to
1486 // unconditionally include in API requests. By default, fields with empty or
1487 // default values are omitted from API requests. See
1488 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1489 // details.
1490 ForceSendFields []string `json:"-"`
1491 // NullFields is a list of field names (e.g. "GroupIds") to include in API
1492 // requests with the JSON null value. By default, fields with empty values are
1493 // omitted from API requests. See
1494 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1495 NullFields []string `json:"-"`
1496 }
1497
1498 func (s GoogleChromePolicyVersionsV1UpdateGroupPriorityOrderingRequest) MarshalJSON() ([]byte, error) {
1499 type NoMethod GoogleChromePolicyVersionsV1UpdateGroupPriorityOrderingRequest
1500 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1501 }
1502
1503 // GoogleChromePolicyVersionsV1UploadPolicyFileRequest: Request message for
1504 // uploading a file for a policy.
1505 type GoogleChromePolicyVersionsV1UploadPolicyFileRequest struct {
1506 // PolicyField: Required. The fully qualified policy schema and field name this
1507 // file is uploaded for. This information will be used to validate the content
1508 // type of the file.
1509 PolicyField string `json:"policyField,omitempty"`
1510 // ForceSendFields is a list of field names (e.g. "PolicyField") to
1511 // unconditionally include in API requests. By default, fields with empty or
1512 // default values are omitted from API requests. See
1513 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1514 // details.
1515 ForceSendFields []string `json:"-"`
1516 // NullFields is a list of field names (e.g. "PolicyField") to include in API
1517 // requests with the JSON null value. By default, fields with empty values are
1518 // omitted from API requests. See
1519 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1520 NullFields []string `json:"-"`
1521 }
1522
1523 func (s GoogleChromePolicyVersionsV1UploadPolicyFileRequest) MarshalJSON() ([]byte, error) {
1524 type NoMethod GoogleChromePolicyVersionsV1UploadPolicyFileRequest
1525 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1526 }
1527
1528 // GoogleChromePolicyVersionsV1UploadPolicyFileResponse: Response message for
1529 // downloading an uploaded file.
1530 type GoogleChromePolicyVersionsV1UploadPolicyFileResponse struct {
1531 // DownloadUri: The uri for end user to download the file.
1532 DownloadUri string `json:"downloadUri,omitempty"`
1533
1534 // ServerResponse contains the HTTP response code and headers from the server.
1535 googleapi.ServerResponse `json:"-"`
1536 // ForceSendFields is a list of field names (e.g. "DownloadUri") to
1537 // unconditionally include in API requests. By default, fields with empty or
1538 // default values are omitted from API requests. See
1539 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1540 // details.
1541 ForceSendFields []string `json:"-"`
1542 // NullFields is a list of field names (e.g. "DownloadUri") to include in API
1543 // requests with the JSON null value. By default, fields with empty values are
1544 // omitted from API requests. See
1545 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1546 NullFields []string `json:"-"`
1547 }
1548
1549 func (s GoogleChromePolicyVersionsV1UploadPolicyFileResponse) MarshalJSON() ([]byte, error) {
1550 type NoMethod GoogleChromePolicyVersionsV1UploadPolicyFileResponse
1551 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1552 }
1553
1554 // GoogleChromePolicyVersionsV1UploadedFileConstraints: Constraints on the
1555 // uploaded file of a file policy.
1556 type GoogleChromePolicyVersionsV1UploadedFileConstraints struct {
1557 // SizeLimitBytes: The size limit of uploaded files for a setting, in bytes.
1558 SizeLimitBytes int64 `json:"sizeLimitBytes,omitempty,string"`
1559 // SupportedContentTypes: File types that can be uploaded for a setting.
1560 //
1561 // Possible values:
1562 // "CONTENT_TYPE_UNSPECIFIED" - Unspecified content type.
1563 // "CONTENT_TYPE_PLAIN_TEXT" - Plain text.
1564 // "CONTENT_TYPE_HTML" - HTML.
1565 // "CONTENT_TYPE_IMAGE_JPEG" - JPEG.
1566 // "CONTENT_TYPE_IMAGE_GIF" - GIF.
1567 // "CONTENT_TYPE_IMAGE_PNG" - PNG.
1568 // "CONTENT_TYPE_JSON" - JSON.
1569 // "CONTENT_TYPE_ZIP" - ZIP.
1570 // "CONTENT_TYPE_GZIP" - GZIP.
1571 // "CONTENT_TYPE_CSV" - CSV.
1572 // "CONTENT_TYPE_YAML" - YAML.
1573 // "CONTENT_TYPE_IMAGE_WEBP" - WEBP.
1574 SupportedContentTypes []string `json:"supportedContentTypes,omitempty"`
1575 // ForceSendFields is a list of field names (e.g. "SizeLimitBytes") to
1576 // unconditionally include in API requests. By default, fields with empty or
1577 // default values are omitted from API requests. See
1578 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1579 // details.
1580 ForceSendFields []string `json:"-"`
1581 // NullFields is a list of field names (e.g. "SizeLimitBytes") to include in
1582 // API requests with the JSON null value. By default, fields with empty values
1583 // are omitted from API requests. See
1584 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1585 NullFields []string `json:"-"`
1586 }
1587
1588 func (s GoogleChromePolicyVersionsV1UploadedFileConstraints) MarshalJSON() ([]byte, error) {
1589 type NoMethod GoogleChromePolicyVersionsV1UploadedFileConstraints
1590 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1591 }
1592
1593 // GoogleProtobufEmpty: A generic empty message that you can re-use to avoid
1594 // defining duplicated empty messages in your APIs. A typical example is to use
1595 // it as the request or the response type of an API method. For instance:
1596 // service Foo { rpc Bar(google.protobuf.Empty) returns
1597 // (google.protobuf.Empty); }
1598 type GoogleProtobufEmpty struct {
1599 // ServerResponse contains the HTTP response code and headers from the server.
1600 googleapi.ServerResponse `json:"-"`
1601 }
1602
1603 // GoogleTypeDate: Represents a whole or partial calendar date, such as a
1604 // birthday. The time of day and time zone are either specified elsewhere or
1605 // are insignificant. The date is relative to the Gregorian Calendar. This can
1606 // represent one of the following: * A full date, with non-zero year, month,
1607 // and day values. * A month and day, with a zero year (for example, an
1608 // anniversary). * A year on its own, with a zero month and a zero day. * A
1609 // year and month, with a zero day (for example, a credit card expiration
1610 // date). Related types: * google.type.TimeOfDay * google.type.DateTime *
1611 // google.protobuf.Timestamp
1612 type GoogleTypeDate struct {
1613 // Day: Day of a month. Must be from 1 to 31 and valid for the year and month,
1614 // or 0 to specify a year by itself or a year and month where the day isn't
1615 // significant.
1616 Day int64 `json:"day,omitempty"`
1617 // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year without
1618 // a month and day.
1619 Month int64 `json:"month,omitempty"`
1620 // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date
1621 // without a year.
1622 Year int64 `json:"year,omitempty"`
1623 // ForceSendFields is a list of field names (e.g. "Day") to unconditionally
1624 // include in API requests. By default, fields with empty or default values are
1625 // omitted from API requests. See
1626 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1627 // details.
1628 ForceSendFields []string `json:"-"`
1629 // NullFields is a list of field names (e.g. "Day") to include in API requests
1630 // with the JSON null value. By default, fields with empty values are omitted
1631 // from API requests. See
1632 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1633 NullFields []string `json:"-"`
1634 }
1635
1636 func (s GoogleTypeDate) MarshalJSON() ([]byte, error) {
1637 type NoMethod GoogleTypeDate
1638 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1639 }
1640
1641 // Proto2DescriptorProto: Describes a message type.
1642 type Proto2DescriptorProto struct {
1643 EnumType []*Proto2EnumDescriptorProto `json:"enumType,omitempty"`
1644 Field []*Proto2FieldDescriptorProto `json:"field,omitempty"`
1645 Name string `json:"name,omitempty"`
1646 NestedType []*Proto2DescriptorProto `json:"nestedType,omitempty"`
1647 OneofDecl []*Proto2OneofDescriptorProto `json:"oneofDecl,omitempty"`
1648 // Visibility: Support for `export` and `local` keywords on enums.
1649 //
1650 // Possible values:
1651 // "VISIBILITY_UNSET"
1652 // "VISIBILITY_LOCAL"
1653 // "VISIBILITY_EXPORT"
1654 Visibility string `json:"visibility,omitempty"`
1655 // ForceSendFields is a list of field names (e.g. "EnumType") to
1656 // unconditionally include in API requests. By default, fields with empty or
1657 // default values are omitted from API requests. See
1658 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1659 // details.
1660 ForceSendFields []string `json:"-"`
1661 // NullFields is a list of field names (e.g. "EnumType") to include in API
1662 // requests with the JSON null value. By default, fields with empty values are
1663 // omitted from API requests. See
1664 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1665 NullFields []string `json:"-"`
1666 }
1667
1668 func (s Proto2DescriptorProto) MarshalJSON() ([]byte, error) {
1669 type NoMethod Proto2DescriptorProto
1670 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1671 }
1672
1673 // Proto2EnumDescriptorProto: Describes an enum type.
1674 type Proto2EnumDescriptorProto struct {
1675 Name string `json:"name,omitempty"`
1676 Value []*Proto2EnumValueDescriptorProto `json:"value,omitempty"`
1677 // Visibility: Support for `export` and `local` keywords on enums.
1678 //
1679 // Possible values:
1680 // "VISIBILITY_UNSET"
1681 // "VISIBILITY_LOCAL"
1682 // "VISIBILITY_EXPORT"
1683 Visibility string `json:"visibility,omitempty"`
1684 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally
1685 // include in API requests. By default, fields with empty or default values are
1686 // omitted from API requests. See
1687 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1688 // details.
1689 ForceSendFields []string `json:"-"`
1690 // NullFields is a list of field names (e.g. "Name") to include in API requests
1691 // with the JSON null value. By default, fields with empty values are omitted
1692 // from API requests. See
1693 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1694 NullFields []string `json:"-"`
1695 }
1696
1697 func (s Proto2EnumDescriptorProto) MarshalJSON() ([]byte, error) {
1698 type NoMethod Proto2EnumDescriptorProto
1699 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1700 }
1701
1702 // Proto2EnumValueDescriptorProto: Describes a value within an enum.
1703 type Proto2EnumValueDescriptorProto struct {
1704 Name string `json:"name,omitempty"`
1705 Number int64 `json:"number,omitempty"`
1706 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally
1707 // include in API requests. By default, fields with empty or default values are
1708 // omitted from API requests. See
1709 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1710 // details.
1711 ForceSendFields []string `json:"-"`
1712 // NullFields is a list of field names (e.g. "Name") to include in API requests
1713 // with the JSON null value. By default, fields with empty values are omitted
1714 // from API requests. See
1715 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1716 NullFields []string `json:"-"`
1717 }
1718
1719 func (s Proto2EnumValueDescriptorProto) MarshalJSON() ([]byte, error) {
1720 type NoMethod Proto2EnumValueDescriptorProto
1721 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1722 }
1723
1724 // Proto2FieldDescriptorProto: Describes a field within a message.
1725 type Proto2FieldDescriptorProto struct {
1726 // DefaultValue: For numeric types, contains the original text representation
1727 // of the value. For booleans, "true" or "false". For strings, contains the
1728 // default text contents (not escaped in any way). For bytes, contains the C
1729 // escaped value. All bytes >= 128 are escaped.
1730 DefaultValue string `json:"defaultValue,omitempty"`
1731 // JsonName: JSON name of this field. The value is set by protocol compiler. If
1732 // the user has set a "json_name" option on this field, that option's value
1733 // will be used. Otherwise, it's deduced from the field's name by converting it
1734 // to camelCase.
1735 JsonName string `json:"jsonName,omitempty"`
1736 // Possible values:
1737 // "LABEL_OPTIONAL" - 0 is reserved for errors
1738 // "LABEL_REPEATED"
1739 // "LABEL_REQUIRED" - The required label is only allowed in proto2. In proto3
1740 // and Editions it's explicitly prohibited. In Editions, the `field_presence`
1741 // feature can be used to get this behavior.
1742 Label string `json:"label,omitempty"`
1743 Name string `json:"name,omitempty"`
1744 Number int64 `json:"number,omitempty"`
1745 // OneofIndex: If set, gives the index of a oneof in the containing type's
1746 // oneof_decl list. This field is a member of that oneof.
1747 OneofIndex int64 `json:"oneofIndex,omitempty"`
1748 // Proto3Optional: If true, this is a proto3 "optional". When a proto3 field is
1749 // optional, it tracks presence regardless of field type. When proto3_optional
1750 // is true, this field must belong to a oneof to signal to old proto3 clients
1751 // that presence is tracked for this field. This oneof is known as a
1752 // "synthetic" oneof, and this field must be its sole member (each proto3
1753 // optional field gets its own synthetic oneof). Synthetic oneofs exist in the
1754 // descriptor only, and do not generate any API. Synthetic oneofs must be
1755 // ordered after all "real" oneofs. For message fields, proto3_optional doesn't
1756 // create any semantic change, since non-repeated message fields always track
1757 // presence. However it still indicates the semantic detail of whether the user
1758 // wrote "optional" or not. This can be useful for round-tripping the .proto
1759 // file. For consistency we give message fields a synthetic oneof also, even
1760 // though it is not required to track presence. This is especially important
1761 // because the parser can't tell if a field is a message or an enum, so it must
1762 // always create a synthetic oneof. Proto2 optional fields do not set this
1763 // flag, because they already indicate optional with `LABEL_OPTIONAL`.
1764 Proto3Optional bool `json:"proto3Optional,omitempty"`
1765 // Type: If type_name is set, this need not be set. If both this and type_name
1766 // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
1767 //
1768 // Possible values:
1769 // "TYPE_DOUBLE" - 0 is reserved for errors. Order is weird for historical
1770 // reasons.
1771 // "TYPE_FLOAT"
1772 // "TYPE_INT64" - Not ZigZag encoded. Negative numbers take 10 bytes. Use
1773 // TYPE_SINT64 if negative values are likely.
1774 // "TYPE_UINT64"
1775 // "TYPE_INT32" - Not ZigZag encoded. Negative numbers take 10 bytes. Use
1776 // TYPE_SINT32 if negative values are likely.
1777 // "TYPE_FIXED64"
1778 // "TYPE_FIXED32"
1779 // "TYPE_BOOL"
1780 // "TYPE_STRING"
1781 // "TYPE_GROUP" - Tag-delimited aggregate. Group type is deprecated and not
1782 // supported after proto2. However, Proto3 implementations should still be able
1783 // to parse the group wire format and treat group fields as unknown fields. In
1784 // Editions, the group wire format can be enabled via the `message_encoding`
1785 // feature.
1786 // "TYPE_MESSAGE" - Length-delimited aggregate.
1787 // "TYPE_BYTES" - New in version 2.
1788 // "TYPE_UINT32"
1789 // "TYPE_ENUM"
1790 // "TYPE_SFIXED32"
1791 // "TYPE_SFIXED64"
1792 // "TYPE_SINT32" - Uses ZigZag encoding.
1793 // "TYPE_SINT64" - Uses ZigZag encoding.
1794 Type string `json:"type,omitempty"`
1795 // TypeName: For message and enum types, this is the name of the type. If the
1796 // name starts with a '.', it is fully-qualified. Otherwise, C++-like scoping
1797 // rules are used to find the type (i.e. first the nested types within this
1798 // message are searched, then within the parent, on up to the root namespace).
1799 TypeName string `json:"typeName,omitempty"`
1800 // ForceSendFields is a list of field names (e.g. "DefaultValue") to
1801 // unconditionally include in API requests. By default, fields with empty or
1802 // default values are omitted from API requests. See
1803 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1804 // details.
1805 ForceSendFields []string `json:"-"`
1806 // NullFields is a list of field names (e.g. "DefaultValue") to include in API
1807 // requests with the JSON null value. By default, fields with empty values are
1808 // omitted from API requests. See
1809 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1810 NullFields []string `json:"-"`
1811 }
1812
1813 func (s Proto2FieldDescriptorProto) MarshalJSON() ([]byte, error) {
1814 type NoMethod Proto2FieldDescriptorProto
1815 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1816 }
1817
1818 // Proto2FileDescriptorProto: Describes a complete .proto file.
1819 type Proto2FileDescriptorProto struct {
1820 // EditionDeprecated: copybara:strip_begin TODO(b/297898292) Deprecate and
1821 // remove this field in favor of enums. copybara:strip_end
1822 EditionDeprecated string `json:"editionDeprecated,omitempty"`
1823 EnumType []*Proto2EnumDescriptorProto `json:"enumType,omitempty"`
1824 // MessageType: All top-level definitions in this file.
1825 MessageType []*Proto2DescriptorProto `json:"messageType,omitempty"`
1826 // Name: file name, relative to root of source tree
1827 Name string `json:"name,omitempty"`
1828 // OptionDependency: Names of files imported by this file purely for the
1829 // purpose of providing option extensions. These are excluded from the
1830 // dependency list above.
1831 OptionDependency []string `json:"optionDependency,omitempty"`
1832 // Package: e.g. "foo", "foo.bar", etc.
1833 Package string `json:"package,omitempty"`
1834 // Syntax: The syntax of the proto file. The supported values are "proto2",
1835 // "proto3", and "editions". If `edition` is present, this value must be
1836 // "editions". WARNING: This field should only be used by protobuf plugins or
1837 // special cases like the proto compiler. Other uses are discouraged and
1838 // developers should rely on the protoreflect APIs for their client language.
1839 Syntax string `json:"syntax,omitempty"`
1840 // ForceSendFields is a list of field names (e.g. "EditionDeprecated") to
1841 // unconditionally include in API requests. By default, fields with empty or
1842 // default values are omitted from API requests. See
1843 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1844 // details.
1845 ForceSendFields []string `json:"-"`
1846 // NullFields is a list of field names (e.g. "EditionDeprecated") to include in
1847 // API requests with the JSON null value. By default, fields with empty values
1848 // are omitted from API requests. See
1849 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1850 NullFields []string `json:"-"`
1851 }
1852
1853 func (s Proto2FileDescriptorProto) MarshalJSON() ([]byte, error) {
1854 type NoMethod Proto2FileDescriptorProto
1855 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1856 }
1857
1858 // Proto2OneofDescriptorProto: Describes a oneof.
1859 type Proto2OneofDescriptorProto struct {
1860 Name string `json:"name,omitempty"`
1861 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally
1862 // include in API requests. By default, fields with empty or default values are
1863 // omitted from API requests. See
1864 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1865 // details.
1866 ForceSendFields []string `json:"-"`
1867 // NullFields is a list of field names (e.g. "Name") to include in API requests
1868 // with the JSON null value. By default, fields with empty values are omitted
1869 // from API requests. See
1870 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1871 NullFields []string `json:"-"`
1872 }
1873
1874 func (s Proto2OneofDescriptorProto) MarshalJSON() ([]byte, error) {
1875 type NoMethod Proto2OneofDescriptorProto
1876 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1877 }
1878
1879 type CustomersPoliciesResolveCall struct {
1880 s *Service
1881 customer string
1882 googlechromepolicyversionsv1resolverequest *GoogleChromePolicyVersionsV1ResolveRequest
1883 urlParams_ gensupport.URLParams
1884 ctx_ context.Context
1885 header_ http.Header
1886 }
1887
1888 // Resolve: Gets the resolved policy values for a list of policies that match a
1889 // search query.
1890 //
1891 // - customer: ID of the G Suite account or literal "my_customer" for the
1892 // customer associated to the request.
1893 func (r *CustomersPoliciesService) Resolve(customer string, googlechromepolicyversionsv1resolverequest *GoogleChromePolicyVersionsV1ResolveRequest) *CustomersPoliciesResolveCall {
1894 c := &CustomersPoliciesResolveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1895 c.customer = customer
1896 c.googlechromepolicyversionsv1resolverequest = googlechromepolicyversionsv1resolverequest
1897 return c
1898 }
1899
1900 // Fields allows partial responses to be retrieved. See
1901 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
1902 // details.
1903 func (c *CustomersPoliciesResolveCall) Fields(s ...googleapi.Field) *CustomersPoliciesResolveCall {
1904 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1905 return c
1906 }
1907
1908 // Context sets the context to be used in this call's Do method.
1909 func (c *CustomersPoliciesResolveCall) Context(ctx context.Context) *CustomersPoliciesResolveCall {
1910 c.ctx_ = ctx
1911 return c
1912 }
1913
1914 // Header returns a http.Header that can be modified by the caller to add
1915 // headers to the request.
1916 func (c *CustomersPoliciesResolveCall) Header() http.Header {
1917 if c.header_ == nil {
1918 c.header_ = make(http.Header)
1919 }
1920 return c.header_
1921 }
1922
1923 func (c *CustomersPoliciesResolveCall) doRequest(alt string) (*http.Response, error) {
1924 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
1925 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlechromepolicyversionsv1resolverequest)
1926 if err != nil {
1927 return nil, err
1928 }
1929 c.urlParams_.Set("alt", alt)
1930 c.urlParams_.Set("prettyPrint", "false")
1931 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+customer}/policies:resolve")
1932 urls += "?" + c.urlParams_.Encode()
1933 req, err := http.NewRequest("POST", urls, body)
1934 if err != nil {
1935 return nil, err
1936 }
1937 req.Header = reqHeaders
1938 googleapi.Expand(req.URL, map[string]string{
1939 "customer": c.customer,
1940 })
1941 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "chromepolicy.customers.policies.resolve", "request", internallog.HTTPRequest(req, body.Bytes()))
1942 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1943 }
1944
1945 // Do executes the "chromepolicy.customers.policies.resolve" call.
1946 // Any non-2xx status code is an error. Response headers are in either
1947 // *GoogleChromePolicyVersionsV1ResolveResponse.ServerResponse.Header or (if a
1948 // response was returned at all) in error.(*googleapi.Error).Header. Use
1949 // googleapi.IsNotModified to check whether the returned error was because
1950 // http.StatusNotModified was returned.
1951 func (c *CustomersPoliciesResolveCall) Do(opts ...googleapi.CallOption) (*GoogleChromePolicyVersionsV1ResolveResponse, error) {
1952 gensupport.SetOptions(c.urlParams_, opts...)
1953 res, err := c.doRequest("json")
1954 if res != nil && res.StatusCode == http.StatusNotModified {
1955 if res.Body != nil {
1956 res.Body.Close()
1957 }
1958 return nil, gensupport.WrapError(&googleapi.Error{
1959 Code: res.StatusCode,
1960 Header: res.Header,
1961 })
1962 }
1963 if err != nil {
1964 return nil, err
1965 }
1966 defer googleapi.CloseBody(res)
1967 if err := googleapi.CheckResponse(res); err != nil {
1968 return nil, gensupport.WrapError(err)
1969 }
1970 ret := &GoogleChromePolicyVersionsV1ResolveResponse{
1971 ServerResponse: googleapi.ServerResponse{
1972 Header: res.Header,
1973 HTTPStatusCode: res.StatusCode,
1974 },
1975 }
1976 target := &ret
1977 b, err := gensupport.DecodeResponseBytes(target, res)
1978 if err != nil {
1979 return nil, err
1980 }
1981 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "chromepolicy.customers.policies.resolve", "response", internallog.HTTPResponse(res, b))
1982 return ret, nil
1983 }
1984
1985 // Pages invokes f for each page of results.
1986 // A non-nil error returned from f will halt the iteration.
1987 // The provided context supersedes any context provided to the Context method.
1988 func (c *CustomersPoliciesResolveCall) Pages(ctx context.Context, f func(*GoogleChromePolicyVersionsV1ResolveResponse) error) error {
1989 c.ctx_ = ctx
1990 defer func(pt string) { c.googlechromepolicyversionsv1resolverequest.PageToken = pt }(c.googlechromepolicyversionsv1resolverequest.PageToken)
1991 for {
1992 x, err := c.Do()
1993 if err != nil {
1994 return err
1995 }
1996 if err := f(x); err != nil {
1997 return err
1998 }
1999 if x.NextPageToken == "" {
2000 return nil
2001 }
2002 c.googlechromepolicyversionsv1resolverequest.PageToken = x.NextPageToken
2003 }
2004 }
2005
2006 type CustomersPoliciesGroupsBatchDeleteCall struct {
2007 s *Service
2008 customer string
2009 googlechromepolicyversionsv1batchdeletegrouppoliciesrequest *GoogleChromePolicyVersionsV1BatchDeleteGroupPoliciesRequest
2010 urlParams_ gensupport.URLParams
2011 ctx_ context.Context
2012 header_ http.Header
2013 }
2014
2015 // BatchDelete: Delete multiple policy values that are applied to a specific
2016 // group. All targets must have the same target format. That is to say that
2017 // they must point to the same target resource and must have the same keys
2018 // specified in `additionalTargetKeyNames`, though the values for those keys
2019 // may be different. On failure the request will return the error details as
2020 // part of the google.rpc.Status.
2021 //
2022 // - customer: ID of the Google Workspace account or literal "my_customer" for
2023 // the customer associated to the request.
2024 func (r *CustomersPoliciesGroupsService) BatchDelete(customer string, googlechromepolicyversionsv1batchdeletegrouppoliciesrequest *GoogleChromePolicyVersionsV1BatchDeleteGroupPoliciesRequest) *CustomersPoliciesGroupsBatchDeleteCall {
2025 c := &CustomersPoliciesGroupsBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2026 c.customer = customer
2027 c.googlechromepolicyversionsv1batchdeletegrouppoliciesrequest = googlechromepolicyversionsv1batchdeletegrouppoliciesrequest
2028 return c
2029 }
2030
2031 // Fields allows partial responses to be retrieved. See
2032 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
2033 // details.
2034 func (c *CustomersPoliciesGroupsBatchDeleteCall) Fields(s ...googleapi.Field) *CustomersPoliciesGroupsBatchDeleteCall {
2035 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2036 return c
2037 }
2038
2039 // Context sets the context to be used in this call's Do method.
2040 func (c *CustomersPoliciesGroupsBatchDeleteCall) Context(ctx context.Context) *CustomersPoliciesGroupsBatchDeleteCall {
2041 c.ctx_ = ctx
2042 return c
2043 }
2044
2045 // Header returns a http.Header that can be modified by the caller to add
2046 // headers to the request.
2047 func (c *CustomersPoliciesGroupsBatchDeleteCall) Header() http.Header {
2048 if c.header_ == nil {
2049 c.header_ = make(http.Header)
2050 }
2051 return c.header_
2052 }
2053
2054 func (c *CustomersPoliciesGroupsBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
2055 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2056 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlechromepolicyversionsv1batchdeletegrouppoliciesrequest)
2057 if err != nil {
2058 return nil, err
2059 }
2060 c.urlParams_.Set("alt", alt)
2061 c.urlParams_.Set("prettyPrint", "false")
2062 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+customer}/policies/groups:batchDelete")
2063 urls += "?" + c.urlParams_.Encode()
2064 req, err := http.NewRequest("POST", urls, body)
2065 if err != nil {
2066 return nil, err
2067 }
2068 req.Header = reqHeaders
2069 googleapi.Expand(req.URL, map[string]string{
2070 "customer": c.customer,
2071 })
2072 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "chromepolicy.customers.policies.groups.batchDelete", "request", internallog.HTTPRequest(req, body.Bytes()))
2073 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2074 }
2075
2076 // Do executes the "chromepolicy.customers.policies.groups.batchDelete" call.
2077 // Any non-2xx status code is an error. Response headers are in either
2078 // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at
2079 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
2080 // check whether the returned error was because http.StatusNotModified was
2081 // returned.
2082 func (c *CustomersPoliciesGroupsBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
2083 gensupport.SetOptions(c.urlParams_, opts...)
2084 res, err := c.doRequest("json")
2085 if res != nil && res.StatusCode == http.StatusNotModified {
2086 if res.Body != nil {
2087 res.Body.Close()
2088 }
2089 return nil, gensupport.WrapError(&googleapi.Error{
2090 Code: res.StatusCode,
2091 Header: res.Header,
2092 })
2093 }
2094 if err != nil {
2095 return nil, err
2096 }
2097 defer googleapi.CloseBody(res)
2098 if err := googleapi.CheckResponse(res); err != nil {
2099 return nil, gensupport.WrapError(err)
2100 }
2101 ret := &GoogleProtobufEmpty{
2102 ServerResponse: googleapi.ServerResponse{
2103 Header: res.Header,
2104 HTTPStatusCode: res.StatusCode,
2105 },
2106 }
2107 target := &ret
2108 b, err := gensupport.DecodeResponseBytes(target, res)
2109 if err != nil {
2110 return nil, err
2111 }
2112 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "chromepolicy.customers.policies.groups.batchDelete", "response", internallog.HTTPResponse(res, b))
2113 return ret, nil
2114 }
2115
2116 type CustomersPoliciesGroupsBatchModifyCall struct {
2117 s *Service
2118 customer string
2119 googlechromepolicyversionsv1batchmodifygrouppoliciesrequest *GoogleChromePolicyVersionsV1BatchModifyGroupPoliciesRequest
2120 urlParams_ gensupport.URLParams
2121 ctx_ context.Context
2122 header_ http.Header
2123 }
2124
2125 // BatchModify: Modify multiple policy values that are applied to a specific
2126 // group. All targets must have the same target format. That is to say that
2127 // they must point to the same target resource and must have the same keys
2128 // specified in `additionalTargetKeyNames`, though the values for those keys
2129 // may be different. On failure the request will return the error details as
2130 // part of the google.rpc.Status.
2131 //
2132 // - customer: ID of the Google Workspace account or literal "my_customer" for
2133 // the customer associated to the request.
2134 func (r *CustomersPoliciesGroupsService) BatchModify(customer string, googlechromepolicyversionsv1batchmodifygrouppoliciesrequest *GoogleChromePolicyVersionsV1BatchModifyGroupPoliciesRequest) *CustomersPoliciesGroupsBatchModifyCall {
2135 c := &CustomersPoliciesGroupsBatchModifyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2136 c.customer = customer
2137 c.googlechromepolicyversionsv1batchmodifygrouppoliciesrequest = googlechromepolicyversionsv1batchmodifygrouppoliciesrequest
2138 return c
2139 }
2140
2141 // Fields allows partial responses to be retrieved. See
2142 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
2143 // details.
2144 func (c *CustomersPoliciesGroupsBatchModifyCall) Fields(s ...googleapi.Field) *CustomersPoliciesGroupsBatchModifyCall {
2145 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2146 return c
2147 }
2148
2149 // Context sets the context to be used in this call's Do method.
2150 func (c *CustomersPoliciesGroupsBatchModifyCall) Context(ctx context.Context) *CustomersPoliciesGroupsBatchModifyCall {
2151 c.ctx_ = ctx
2152 return c
2153 }
2154
2155 // Header returns a http.Header that can be modified by the caller to add
2156 // headers to the request.
2157 func (c *CustomersPoliciesGroupsBatchModifyCall) Header() http.Header {
2158 if c.header_ == nil {
2159 c.header_ = make(http.Header)
2160 }
2161 return c.header_
2162 }
2163
2164 func (c *CustomersPoliciesGroupsBatchModifyCall) doRequest(alt string) (*http.Response, error) {
2165 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2166 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlechromepolicyversionsv1batchmodifygrouppoliciesrequest)
2167 if err != nil {
2168 return nil, err
2169 }
2170 c.urlParams_.Set("alt", alt)
2171 c.urlParams_.Set("prettyPrint", "false")
2172 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+customer}/policies/groups:batchModify")
2173 urls += "?" + c.urlParams_.Encode()
2174 req, err := http.NewRequest("POST", urls, body)
2175 if err != nil {
2176 return nil, err
2177 }
2178 req.Header = reqHeaders
2179 googleapi.Expand(req.URL, map[string]string{
2180 "customer": c.customer,
2181 })
2182 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "chromepolicy.customers.policies.groups.batchModify", "request", internallog.HTTPRequest(req, body.Bytes()))
2183 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2184 }
2185
2186 // Do executes the "chromepolicy.customers.policies.groups.batchModify" call.
2187 // Any non-2xx status code is an error. Response headers are in either
2188 // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at
2189 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
2190 // check whether the returned error was because http.StatusNotModified was
2191 // returned.
2192 func (c *CustomersPoliciesGroupsBatchModifyCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
2193 gensupport.SetOptions(c.urlParams_, opts...)
2194 res, err := c.doRequest("json")
2195 if res != nil && res.StatusCode == http.StatusNotModified {
2196 if res.Body != nil {
2197 res.Body.Close()
2198 }
2199 return nil, gensupport.WrapError(&googleapi.Error{
2200 Code: res.StatusCode,
2201 Header: res.Header,
2202 })
2203 }
2204 if err != nil {
2205 return nil, err
2206 }
2207 defer googleapi.CloseBody(res)
2208 if err := googleapi.CheckResponse(res); err != nil {
2209 return nil, gensupport.WrapError(err)
2210 }
2211 ret := &GoogleProtobufEmpty{
2212 ServerResponse: googleapi.ServerResponse{
2213 Header: res.Header,
2214 HTTPStatusCode: res.StatusCode,
2215 },
2216 }
2217 target := &ret
2218 b, err := gensupport.DecodeResponseBytes(target, res)
2219 if err != nil {
2220 return nil, err
2221 }
2222 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "chromepolicy.customers.policies.groups.batchModify", "response", internallog.HTTPResponse(res, b))
2223 return ret, nil
2224 }
2225
2226 type CustomersPoliciesGroupsListGroupPriorityOrderingCall struct {
2227 s *Service
2228 customer string
2229 googlechromepolicyversionsv1listgrouppriorityorderingrequest *GoogleChromePolicyVersionsV1ListGroupPriorityOrderingRequest
2230 urlParams_ gensupport.URLParams
2231 ctx_ context.Context
2232 header_ http.Header
2233 }
2234
2235 // ListGroupPriorityOrdering: Retrieve a group priority ordering for an app.
2236 // The target app must be supplied in `additionalTargetKeyNames` in the
2237 // PolicyTargetKey. On failure the request will return the error details as
2238 // part of the google.rpc.Status.
2239 //
2240 // - customer: ID of the Google Workspace account or literal "my_customer" for
2241 // the customer associated to the request.
2242 func (r *CustomersPoliciesGroupsService) ListGroupPriorityOrdering(customer string, googlechromepolicyversionsv1listgrouppriorityorderingrequest *GoogleChromePolicyVersionsV1ListGroupPriorityOrderingRequest) *CustomersPoliciesGroupsListGroupPriorityOrderingCall {
2243 c := &CustomersPoliciesGroupsListGroupPriorityOrderingCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2244 c.customer = customer
2245 c.googlechromepolicyversionsv1listgrouppriorityorderingrequest = googlechromepolicyversionsv1listgrouppriorityorderingrequest
2246 return c
2247 }
2248
2249 // Fields allows partial responses to be retrieved. See
2250 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
2251 // details.
2252 func (c *CustomersPoliciesGroupsListGroupPriorityOrderingCall) Fields(s ...googleapi.Field) *CustomersPoliciesGroupsListGroupPriorityOrderingCall {
2253 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2254 return c
2255 }
2256
2257 // Context sets the context to be used in this call's Do method.
2258 func (c *CustomersPoliciesGroupsListGroupPriorityOrderingCall) Context(ctx context.Context) *CustomersPoliciesGroupsListGroupPriorityOrderingCall {
2259 c.ctx_ = ctx
2260 return c
2261 }
2262
2263 // Header returns a http.Header that can be modified by the caller to add
2264 // headers to the request.
2265 func (c *CustomersPoliciesGroupsListGroupPriorityOrderingCall) Header() http.Header {
2266 if c.header_ == nil {
2267 c.header_ = make(http.Header)
2268 }
2269 return c.header_
2270 }
2271
2272 func (c *CustomersPoliciesGroupsListGroupPriorityOrderingCall) doRequest(alt string) (*http.Response, error) {
2273 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2274 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlechromepolicyversionsv1listgrouppriorityorderingrequest)
2275 if err != nil {
2276 return nil, err
2277 }
2278 c.urlParams_.Set("alt", alt)
2279 c.urlParams_.Set("prettyPrint", "false")
2280 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+customer}/policies/groups:listGroupPriorityOrdering")
2281 urls += "?" + c.urlParams_.Encode()
2282 req, err := http.NewRequest("POST", urls, body)
2283 if err != nil {
2284 return nil, err
2285 }
2286 req.Header = reqHeaders
2287 googleapi.Expand(req.URL, map[string]string{
2288 "customer": c.customer,
2289 })
2290 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "chromepolicy.customers.policies.groups.listGroupPriorityOrdering", "request", internallog.HTTPRequest(req, body.Bytes()))
2291 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2292 }
2293
2294 // Do executes the "chromepolicy.customers.policies.groups.listGroupPriorityOrdering" call.
2295 // Any non-2xx status code is an error. Response headers are in either
2296 // *GoogleChromePolicyVersionsV1ListGroupPriorityOrderingResponse.ServerResponse
2297 // .Header or (if a response was returned at all) in
2298 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
2299 // whether the returned error was because http.StatusNotModified was returned.
2300 func (c *CustomersPoliciesGroupsListGroupPriorityOrderingCall) Do(opts ...googleapi.CallOption) (*GoogleChromePolicyVersionsV1ListGroupPriorityOrderingResponse, error) {
2301 gensupport.SetOptions(c.urlParams_, opts...)
2302 res, err := c.doRequest("json")
2303 if res != nil && res.StatusCode == http.StatusNotModified {
2304 if res.Body != nil {
2305 res.Body.Close()
2306 }
2307 return nil, gensupport.WrapError(&googleapi.Error{
2308 Code: res.StatusCode,
2309 Header: res.Header,
2310 })
2311 }
2312 if err != nil {
2313 return nil, err
2314 }
2315 defer googleapi.CloseBody(res)
2316 if err := googleapi.CheckResponse(res); err != nil {
2317 return nil, gensupport.WrapError(err)
2318 }
2319 ret := &GoogleChromePolicyVersionsV1ListGroupPriorityOrderingResponse{
2320 ServerResponse: googleapi.ServerResponse{
2321 Header: res.Header,
2322 HTTPStatusCode: res.StatusCode,
2323 },
2324 }
2325 target := &ret
2326 b, err := gensupport.DecodeResponseBytes(target, res)
2327 if err != nil {
2328 return nil, err
2329 }
2330 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "chromepolicy.customers.policies.groups.listGroupPriorityOrdering", "response", internallog.HTTPResponse(res, b))
2331 return ret, nil
2332 }
2333
2334 type CustomersPoliciesGroupsUpdateGroupPriorityOrderingCall struct {
2335 s *Service
2336 customer string
2337 googlechromepolicyversionsv1updategrouppriorityorderingrequest *GoogleChromePolicyVersionsV1UpdateGroupPriorityOrderingRequest
2338 urlParams_ gensupport.URLParams
2339 ctx_ context.Context
2340 header_ http.Header
2341 }
2342
2343 // UpdateGroupPriorityOrdering: Update a group priority ordering for an app.
2344 // The target app must be supplied in `additionalTargetKeyNames` in the
2345 // PolicyTargetKey. On failure the request will return the error details as
2346 // part of the google.rpc.Status.
2347 //
2348 // - customer: ID of the Google Workspace account or literal "my_customer" for
2349 // the customer associated to the request.
2350 func (r *CustomersPoliciesGroupsService) UpdateGroupPriorityOrdering(customer string, googlechromepolicyversionsv1updategrouppriorityorderingrequest *GoogleChromePolicyVersionsV1UpdateGroupPriorityOrderingRequest) *CustomersPoliciesGroupsUpdateGroupPriorityOrderingCall {
2351 c := &CustomersPoliciesGroupsUpdateGroupPriorityOrderingCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2352 c.customer = customer
2353 c.googlechromepolicyversionsv1updategrouppriorityorderingrequest = googlechromepolicyversionsv1updategrouppriorityorderingrequest
2354 return c
2355 }
2356
2357 // Fields allows partial responses to be retrieved. See
2358 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
2359 // details.
2360 func (c *CustomersPoliciesGroupsUpdateGroupPriorityOrderingCall) Fields(s ...googleapi.Field) *CustomersPoliciesGroupsUpdateGroupPriorityOrderingCall {
2361 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2362 return c
2363 }
2364
2365 // Context sets the context to be used in this call's Do method.
2366 func (c *CustomersPoliciesGroupsUpdateGroupPriorityOrderingCall) Context(ctx context.Context) *CustomersPoliciesGroupsUpdateGroupPriorityOrderingCall {
2367 c.ctx_ = ctx
2368 return c
2369 }
2370
2371 // Header returns a http.Header that can be modified by the caller to add
2372 // headers to the request.
2373 func (c *CustomersPoliciesGroupsUpdateGroupPriorityOrderingCall) Header() http.Header {
2374 if c.header_ == nil {
2375 c.header_ = make(http.Header)
2376 }
2377 return c.header_
2378 }
2379
2380 func (c *CustomersPoliciesGroupsUpdateGroupPriorityOrderingCall) doRequest(alt string) (*http.Response, error) {
2381 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2382 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlechromepolicyversionsv1updategrouppriorityorderingrequest)
2383 if err != nil {
2384 return nil, err
2385 }
2386 c.urlParams_.Set("alt", alt)
2387 c.urlParams_.Set("prettyPrint", "false")
2388 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+customer}/policies/groups:updateGroupPriorityOrdering")
2389 urls += "?" + c.urlParams_.Encode()
2390 req, err := http.NewRequest("POST", urls, body)
2391 if err != nil {
2392 return nil, err
2393 }
2394 req.Header = reqHeaders
2395 googleapi.Expand(req.URL, map[string]string{
2396 "customer": c.customer,
2397 })
2398 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "chromepolicy.customers.policies.groups.updateGroupPriorityOrdering", "request", internallog.HTTPRequest(req, body.Bytes()))
2399 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2400 }
2401
2402 // Do executes the "chromepolicy.customers.policies.groups.updateGroupPriorityOrdering" call.
2403 // Any non-2xx status code is an error. Response headers are in either
2404 // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at
2405 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
2406 // check whether the returned error was because http.StatusNotModified was
2407 // returned.
2408 func (c *CustomersPoliciesGroupsUpdateGroupPriorityOrderingCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
2409 gensupport.SetOptions(c.urlParams_, opts...)
2410 res, err := c.doRequest("json")
2411 if res != nil && res.StatusCode == http.StatusNotModified {
2412 if res.Body != nil {
2413 res.Body.Close()
2414 }
2415 return nil, gensupport.WrapError(&googleapi.Error{
2416 Code: res.StatusCode,
2417 Header: res.Header,
2418 })
2419 }
2420 if err != nil {
2421 return nil, err
2422 }
2423 defer googleapi.CloseBody(res)
2424 if err := googleapi.CheckResponse(res); err != nil {
2425 return nil, gensupport.WrapError(err)
2426 }
2427 ret := &GoogleProtobufEmpty{
2428 ServerResponse: googleapi.ServerResponse{
2429 Header: res.Header,
2430 HTTPStatusCode: res.StatusCode,
2431 },
2432 }
2433 target := &ret
2434 b, err := gensupport.DecodeResponseBytes(target, res)
2435 if err != nil {
2436 return nil, err
2437 }
2438 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "chromepolicy.customers.policies.groups.updateGroupPriorityOrdering", "response", internallog.HTTPResponse(res, b))
2439 return ret, nil
2440 }
2441
2442 type CustomersPoliciesNetworksDefineCertificateCall struct {
2443 s *Service
2444 customer string
2445 googlechromepolicyversionsv1definecertificaterequest *GoogleChromePolicyVersionsV1DefineCertificateRequest
2446 urlParams_ gensupport.URLParams
2447 ctx_ context.Context
2448 header_ http.Header
2449 }
2450
2451 // DefineCertificate: Creates a certificate at a specified OU for a customer.
2452 //
2453 // - customer: The customer for which the certificate will apply.
2454 func (r *CustomersPoliciesNetworksService) DefineCertificate(customer string, googlechromepolicyversionsv1definecertificaterequest *GoogleChromePolicyVersionsV1DefineCertificateRequest) *CustomersPoliciesNetworksDefineCertificateCall {
2455 c := &CustomersPoliciesNetworksDefineCertificateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2456 c.customer = customer
2457 c.googlechromepolicyversionsv1definecertificaterequest = googlechromepolicyversionsv1definecertificaterequest
2458 return c
2459 }
2460
2461 // Fields allows partial responses to be retrieved. See
2462 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
2463 // details.
2464 func (c *CustomersPoliciesNetworksDefineCertificateCall) Fields(s ...googleapi.Field) *CustomersPoliciesNetworksDefineCertificateCall {
2465 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2466 return c
2467 }
2468
2469 // Context sets the context to be used in this call's Do method.
2470 func (c *CustomersPoliciesNetworksDefineCertificateCall) Context(ctx context.Context) *CustomersPoliciesNetworksDefineCertificateCall {
2471 c.ctx_ = ctx
2472 return c
2473 }
2474
2475 // Header returns a http.Header that can be modified by the caller to add
2476 // headers to the request.
2477 func (c *CustomersPoliciesNetworksDefineCertificateCall) Header() http.Header {
2478 if c.header_ == nil {
2479 c.header_ = make(http.Header)
2480 }
2481 return c.header_
2482 }
2483
2484 func (c *CustomersPoliciesNetworksDefineCertificateCall) doRequest(alt string) (*http.Response, error) {
2485 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2486 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlechromepolicyversionsv1definecertificaterequest)
2487 if err != nil {
2488 return nil, err
2489 }
2490 c.urlParams_.Set("alt", alt)
2491 c.urlParams_.Set("prettyPrint", "false")
2492 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+customer}/policies/networks:defineCertificate")
2493 urls += "?" + c.urlParams_.Encode()
2494 req, err := http.NewRequest("POST", urls, body)
2495 if err != nil {
2496 return nil, err
2497 }
2498 req.Header = reqHeaders
2499 googleapi.Expand(req.URL, map[string]string{
2500 "customer": c.customer,
2501 })
2502 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "chromepolicy.customers.policies.networks.defineCertificate", "request", internallog.HTTPRequest(req, body.Bytes()))
2503 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2504 }
2505
2506 // Do executes the "chromepolicy.customers.policies.networks.defineCertificate" call.
2507 // Any non-2xx status code is an error. Response headers are in either
2508 // *GoogleChromePolicyVersionsV1DefineCertificateResponse.ServerResponse.Header
2509 // or (if a response was returned at all) in error.(*googleapi.Error).Header.
2510 // Use googleapi.IsNotModified to check whether the returned error was because
2511 // http.StatusNotModified was returned.
2512 func (c *CustomersPoliciesNetworksDefineCertificateCall) Do(opts ...googleapi.CallOption) (*GoogleChromePolicyVersionsV1DefineCertificateResponse, error) {
2513 gensupport.SetOptions(c.urlParams_, opts...)
2514 res, err := c.doRequest("json")
2515 if res != nil && res.StatusCode == http.StatusNotModified {
2516 if res.Body != nil {
2517 res.Body.Close()
2518 }
2519 return nil, gensupport.WrapError(&googleapi.Error{
2520 Code: res.StatusCode,
2521 Header: res.Header,
2522 })
2523 }
2524 if err != nil {
2525 return nil, err
2526 }
2527 defer googleapi.CloseBody(res)
2528 if err := googleapi.CheckResponse(res); err != nil {
2529 return nil, gensupport.WrapError(err)
2530 }
2531 ret := &GoogleChromePolicyVersionsV1DefineCertificateResponse{
2532 ServerResponse: googleapi.ServerResponse{
2533 Header: res.Header,
2534 HTTPStatusCode: res.StatusCode,
2535 },
2536 }
2537 target := &ret
2538 b, err := gensupport.DecodeResponseBytes(target, res)
2539 if err != nil {
2540 return nil, err
2541 }
2542 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "chromepolicy.customers.policies.networks.defineCertificate", "response", internallog.HTTPResponse(res, b))
2543 return ret, nil
2544 }
2545
2546 type CustomersPoliciesNetworksDefineNetworkCall struct {
2547 s *Service
2548 customer string
2549 googlechromepolicyversionsv1definenetworkrequest *GoogleChromePolicyVersionsV1DefineNetworkRequest
2550 urlParams_ gensupport.URLParams
2551 ctx_ context.Context
2552 header_ http.Header
2553 }
2554
2555 // DefineNetwork: Define a new network.
2556 //
2557 // - customer: The customer who will own this new network.
2558 func (r *CustomersPoliciesNetworksService) DefineNetwork(customer string, googlechromepolicyversionsv1definenetworkrequest *GoogleChromePolicyVersionsV1DefineNetworkRequest) *CustomersPoliciesNetworksDefineNetworkCall {
2559 c := &CustomersPoliciesNetworksDefineNetworkCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2560 c.customer = customer
2561 c.googlechromepolicyversionsv1definenetworkrequest = googlechromepolicyversionsv1definenetworkrequest
2562 return c
2563 }
2564
2565 // Fields allows partial responses to be retrieved. See
2566 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
2567 // details.
2568 func (c *CustomersPoliciesNetworksDefineNetworkCall) Fields(s ...googleapi.Field) *CustomersPoliciesNetworksDefineNetworkCall {
2569 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2570 return c
2571 }
2572
2573 // Context sets the context to be used in this call's Do method.
2574 func (c *CustomersPoliciesNetworksDefineNetworkCall) Context(ctx context.Context) *CustomersPoliciesNetworksDefineNetworkCall {
2575 c.ctx_ = ctx
2576 return c
2577 }
2578
2579 // Header returns a http.Header that can be modified by the caller to add
2580 // headers to the request.
2581 func (c *CustomersPoliciesNetworksDefineNetworkCall) Header() http.Header {
2582 if c.header_ == nil {
2583 c.header_ = make(http.Header)
2584 }
2585 return c.header_
2586 }
2587
2588 func (c *CustomersPoliciesNetworksDefineNetworkCall) doRequest(alt string) (*http.Response, error) {
2589 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2590 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlechromepolicyversionsv1definenetworkrequest)
2591 if err != nil {
2592 return nil, err
2593 }
2594 c.urlParams_.Set("alt", alt)
2595 c.urlParams_.Set("prettyPrint", "false")
2596 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+customer}/policies/networks:defineNetwork")
2597 urls += "?" + c.urlParams_.Encode()
2598 req, err := http.NewRequest("POST", urls, body)
2599 if err != nil {
2600 return nil, err
2601 }
2602 req.Header = reqHeaders
2603 googleapi.Expand(req.URL, map[string]string{
2604 "customer": c.customer,
2605 })
2606 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "chromepolicy.customers.policies.networks.defineNetwork", "request", internallog.HTTPRequest(req, body.Bytes()))
2607 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2608 }
2609
2610 // Do executes the "chromepolicy.customers.policies.networks.defineNetwork" call.
2611 // Any non-2xx status code is an error. Response headers are in either
2612 // *GoogleChromePolicyVersionsV1DefineNetworkResponse.ServerResponse.Header or
2613 // (if a response was returned at all) in error.(*googleapi.Error).Header. Use
2614 // googleapi.IsNotModified to check whether the returned error was because
2615 // http.StatusNotModified was returned.
2616 func (c *CustomersPoliciesNetworksDefineNetworkCall) Do(opts ...googleapi.CallOption) (*GoogleChromePolicyVersionsV1DefineNetworkResponse, error) {
2617 gensupport.SetOptions(c.urlParams_, opts...)
2618 res, err := c.doRequest("json")
2619 if res != nil && res.StatusCode == http.StatusNotModified {
2620 if res.Body != nil {
2621 res.Body.Close()
2622 }
2623 return nil, gensupport.WrapError(&googleapi.Error{
2624 Code: res.StatusCode,
2625 Header: res.Header,
2626 })
2627 }
2628 if err != nil {
2629 return nil, err
2630 }
2631 defer googleapi.CloseBody(res)
2632 if err := googleapi.CheckResponse(res); err != nil {
2633 return nil, gensupport.WrapError(err)
2634 }
2635 ret := &GoogleChromePolicyVersionsV1DefineNetworkResponse{
2636 ServerResponse: googleapi.ServerResponse{
2637 Header: res.Header,
2638 HTTPStatusCode: res.StatusCode,
2639 },
2640 }
2641 target := &ret
2642 b, err := gensupport.DecodeResponseBytes(target, res)
2643 if err != nil {
2644 return nil, err
2645 }
2646 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "chromepolicy.customers.policies.networks.defineNetwork", "response", internallog.HTTPResponse(res, b))
2647 return ret, nil
2648 }
2649
2650 type CustomersPoliciesNetworksRemoveCertificateCall struct {
2651 s *Service
2652 customer string
2653 googlechromepolicyversionsv1removecertificaterequest *GoogleChromePolicyVersionsV1RemoveCertificateRequest
2654 urlParams_ gensupport.URLParams
2655 ctx_ context.Context
2656 header_ http.Header
2657 }
2658
2659 // RemoveCertificate: Remove an existing certificate by guid.
2660 //
2661 // - customer: The customer whose certificate will be removed.
2662 func (r *CustomersPoliciesNetworksService) RemoveCertificate(customer string, googlechromepolicyversionsv1removecertificaterequest *GoogleChromePolicyVersionsV1RemoveCertificateRequest) *CustomersPoliciesNetworksRemoveCertificateCall {
2663 c := &CustomersPoliciesNetworksRemoveCertificateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2664 c.customer = customer
2665 c.googlechromepolicyversionsv1removecertificaterequest = googlechromepolicyversionsv1removecertificaterequest
2666 return c
2667 }
2668
2669 // Fields allows partial responses to be retrieved. See
2670 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
2671 // details.
2672 func (c *CustomersPoliciesNetworksRemoveCertificateCall) Fields(s ...googleapi.Field) *CustomersPoliciesNetworksRemoveCertificateCall {
2673 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2674 return c
2675 }
2676
2677 // Context sets the context to be used in this call's Do method.
2678 func (c *CustomersPoliciesNetworksRemoveCertificateCall) Context(ctx context.Context) *CustomersPoliciesNetworksRemoveCertificateCall {
2679 c.ctx_ = ctx
2680 return c
2681 }
2682
2683 // Header returns a http.Header that can be modified by the caller to add
2684 // headers to the request.
2685 func (c *CustomersPoliciesNetworksRemoveCertificateCall) Header() http.Header {
2686 if c.header_ == nil {
2687 c.header_ = make(http.Header)
2688 }
2689 return c.header_
2690 }
2691
2692 func (c *CustomersPoliciesNetworksRemoveCertificateCall) doRequest(alt string) (*http.Response, error) {
2693 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2694 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlechromepolicyversionsv1removecertificaterequest)
2695 if err != nil {
2696 return nil, err
2697 }
2698 c.urlParams_.Set("alt", alt)
2699 c.urlParams_.Set("prettyPrint", "false")
2700 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+customer}/policies/networks:removeCertificate")
2701 urls += "?" + c.urlParams_.Encode()
2702 req, err := http.NewRequest("POST", urls, body)
2703 if err != nil {
2704 return nil, err
2705 }
2706 req.Header = reqHeaders
2707 googleapi.Expand(req.URL, map[string]string{
2708 "customer": c.customer,
2709 })
2710 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "chromepolicy.customers.policies.networks.removeCertificate", "request", internallog.HTTPRequest(req, body.Bytes()))
2711 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2712 }
2713
2714 // Do executes the "chromepolicy.customers.policies.networks.removeCertificate" call.
2715 // Any non-2xx status code is an error. Response headers are in either
2716 // *GoogleChromePolicyVersionsV1RemoveCertificateResponse.ServerResponse.Header
2717 // or (if a response was returned at all) in error.(*googleapi.Error).Header.
2718 // Use googleapi.IsNotModified to check whether the returned error was because
2719 // http.StatusNotModified was returned.
2720 func (c *CustomersPoliciesNetworksRemoveCertificateCall) Do(opts ...googleapi.CallOption) (*GoogleChromePolicyVersionsV1RemoveCertificateResponse, error) {
2721 gensupport.SetOptions(c.urlParams_, opts...)
2722 res, err := c.doRequest("json")
2723 if res != nil && res.StatusCode == http.StatusNotModified {
2724 if res.Body != nil {
2725 res.Body.Close()
2726 }
2727 return nil, gensupport.WrapError(&googleapi.Error{
2728 Code: res.StatusCode,
2729 Header: res.Header,
2730 })
2731 }
2732 if err != nil {
2733 return nil, err
2734 }
2735 defer googleapi.CloseBody(res)
2736 if err := googleapi.CheckResponse(res); err != nil {
2737 return nil, gensupport.WrapError(err)
2738 }
2739 ret := &GoogleChromePolicyVersionsV1RemoveCertificateResponse{
2740 ServerResponse: googleapi.ServerResponse{
2741 Header: res.Header,
2742 HTTPStatusCode: res.StatusCode,
2743 },
2744 }
2745 target := &ret
2746 b, err := gensupport.DecodeResponseBytes(target, res)
2747 if err != nil {
2748 return nil, err
2749 }
2750 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "chromepolicy.customers.policies.networks.removeCertificate", "response", internallog.HTTPResponse(res, b))
2751 return ret, nil
2752 }
2753
2754 type CustomersPoliciesNetworksRemoveNetworkCall struct {
2755 s *Service
2756 customer string
2757 googlechromepolicyversionsv1removenetworkrequest *GoogleChromePolicyVersionsV1RemoveNetworkRequest
2758 urlParams_ gensupport.URLParams
2759 ctx_ context.Context
2760 header_ http.Header
2761 }
2762
2763 // RemoveNetwork: Remove an existing network by guid.
2764 //
2765 // - customer: The customer whose network will be removed.
2766 func (r *CustomersPoliciesNetworksService) RemoveNetwork(customer string, googlechromepolicyversionsv1removenetworkrequest *GoogleChromePolicyVersionsV1RemoveNetworkRequest) *CustomersPoliciesNetworksRemoveNetworkCall {
2767 c := &CustomersPoliciesNetworksRemoveNetworkCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2768 c.customer = customer
2769 c.googlechromepolicyversionsv1removenetworkrequest = googlechromepolicyversionsv1removenetworkrequest
2770 return c
2771 }
2772
2773 // Fields allows partial responses to be retrieved. See
2774 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
2775 // details.
2776 func (c *CustomersPoliciesNetworksRemoveNetworkCall) Fields(s ...googleapi.Field) *CustomersPoliciesNetworksRemoveNetworkCall {
2777 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2778 return c
2779 }
2780
2781 // Context sets the context to be used in this call's Do method.
2782 func (c *CustomersPoliciesNetworksRemoveNetworkCall) Context(ctx context.Context) *CustomersPoliciesNetworksRemoveNetworkCall {
2783 c.ctx_ = ctx
2784 return c
2785 }
2786
2787 // Header returns a http.Header that can be modified by the caller to add
2788 // headers to the request.
2789 func (c *CustomersPoliciesNetworksRemoveNetworkCall) Header() http.Header {
2790 if c.header_ == nil {
2791 c.header_ = make(http.Header)
2792 }
2793 return c.header_
2794 }
2795
2796 func (c *CustomersPoliciesNetworksRemoveNetworkCall) doRequest(alt string) (*http.Response, error) {
2797 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2798 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlechromepolicyversionsv1removenetworkrequest)
2799 if err != nil {
2800 return nil, err
2801 }
2802 c.urlParams_.Set("alt", alt)
2803 c.urlParams_.Set("prettyPrint", "false")
2804 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+customer}/policies/networks:removeNetwork")
2805 urls += "?" + c.urlParams_.Encode()
2806 req, err := http.NewRequest("POST", urls, body)
2807 if err != nil {
2808 return nil, err
2809 }
2810 req.Header = reqHeaders
2811 googleapi.Expand(req.URL, map[string]string{
2812 "customer": c.customer,
2813 })
2814 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "chromepolicy.customers.policies.networks.removeNetwork", "request", internallog.HTTPRequest(req, body.Bytes()))
2815 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2816 }
2817
2818 // Do executes the "chromepolicy.customers.policies.networks.removeNetwork" call.
2819 // Any non-2xx status code is an error. Response headers are in either
2820 // *GoogleChromePolicyVersionsV1RemoveNetworkResponse.ServerResponse.Header or
2821 // (if a response was returned at all) in error.(*googleapi.Error).Header. Use
2822 // googleapi.IsNotModified to check whether the returned error was because
2823 // http.StatusNotModified was returned.
2824 func (c *CustomersPoliciesNetworksRemoveNetworkCall) Do(opts ...googleapi.CallOption) (*GoogleChromePolicyVersionsV1RemoveNetworkResponse, error) {
2825 gensupport.SetOptions(c.urlParams_, opts...)
2826 res, err := c.doRequest("json")
2827 if res != nil && res.StatusCode == http.StatusNotModified {
2828 if res.Body != nil {
2829 res.Body.Close()
2830 }
2831 return nil, gensupport.WrapError(&googleapi.Error{
2832 Code: res.StatusCode,
2833 Header: res.Header,
2834 })
2835 }
2836 if err != nil {
2837 return nil, err
2838 }
2839 defer googleapi.CloseBody(res)
2840 if err := googleapi.CheckResponse(res); err != nil {
2841 return nil, gensupport.WrapError(err)
2842 }
2843 ret := &GoogleChromePolicyVersionsV1RemoveNetworkResponse{
2844 ServerResponse: googleapi.ServerResponse{
2845 Header: res.Header,
2846 HTTPStatusCode: res.StatusCode,
2847 },
2848 }
2849 target := &ret
2850 b, err := gensupport.DecodeResponseBytes(target, res)
2851 if err != nil {
2852 return nil, err
2853 }
2854 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "chromepolicy.customers.policies.networks.removeNetwork", "response", internallog.HTTPResponse(res, b))
2855 return ret, nil
2856 }
2857
2858 type CustomersPoliciesOrgunitsBatchInheritCall struct {
2859 s *Service
2860 customer string
2861 googlechromepolicyversionsv1batchinheritorgunitpoliciesrequest *GoogleChromePolicyVersionsV1BatchInheritOrgUnitPoliciesRequest
2862 urlParams_ gensupport.URLParams
2863 ctx_ context.Context
2864 header_ http.Header
2865 }
2866
2867 // BatchInherit: Modify multiple policy values that are applied to a specific
2868 // org unit so that they now inherit the value from a parent (if applicable).
2869 // All targets must have the same target format. That is to say that they must
2870 // point to the same target resource and must have the same keys specified in
2871 // `additionalTargetKeyNames`, though the values for those keys may be
2872 // different. On failure the request will return the error details as part of
2873 // the google.rpc.Status.
2874 //
2875 // - customer: ID of the G Suite account or literal "my_customer" for the
2876 // customer associated to the request.
2877 func (r *CustomersPoliciesOrgunitsService) BatchInherit(customer string, googlechromepolicyversionsv1batchinheritorgunitpoliciesrequest *GoogleChromePolicyVersionsV1BatchInheritOrgUnitPoliciesRequest) *CustomersPoliciesOrgunitsBatchInheritCall {
2878 c := &CustomersPoliciesOrgunitsBatchInheritCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2879 c.customer = customer
2880 c.googlechromepolicyversionsv1batchinheritorgunitpoliciesrequest = googlechromepolicyversionsv1batchinheritorgunitpoliciesrequest
2881 return c
2882 }
2883
2884 // Fields allows partial responses to be retrieved. See
2885 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
2886 // details.
2887 func (c *CustomersPoliciesOrgunitsBatchInheritCall) Fields(s ...googleapi.Field) *CustomersPoliciesOrgunitsBatchInheritCall {
2888 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2889 return c
2890 }
2891
2892 // Context sets the context to be used in this call's Do method.
2893 func (c *CustomersPoliciesOrgunitsBatchInheritCall) Context(ctx context.Context) *CustomersPoliciesOrgunitsBatchInheritCall {
2894 c.ctx_ = ctx
2895 return c
2896 }
2897
2898 // Header returns a http.Header that can be modified by the caller to add
2899 // headers to the request.
2900 func (c *CustomersPoliciesOrgunitsBatchInheritCall) Header() http.Header {
2901 if c.header_ == nil {
2902 c.header_ = make(http.Header)
2903 }
2904 return c.header_
2905 }
2906
2907 func (c *CustomersPoliciesOrgunitsBatchInheritCall) doRequest(alt string) (*http.Response, error) {
2908 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2909 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlechromepolicyversionsv1batchinheritorgunitpoliciesrequest)
2910 if err != nil {
2911 return nil, err
2912 }
2913 c.urlParams_.Set("alt", alt)
2914 c.urlParams_.Set("prettyPrint", "false")
2915 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+customer}/policies/orgunits:batchInherit")
2916 urls += "?" + c.urlParams_.Encode()
2917 req, err := http.NewRequest("POST", urls, body)
2918 if err != nil {
2919 return nil, err
2920 }
2921 req.Header = reqHeaders
2922 googleapi.Expand(req.URL, map[string]string{
2923 "customer": c.customer,
2924 })
2925 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "chromepolicy.customers.policies.orgunits.batchInherit", "request", internallog.HTTPRequest(req, body.Bytes()))
2926 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2927 }
2928
2929 // Do executes the "chromepolicy.customers.policies.orgunits.batchInherit" call.
2930 // Any non-2xx status code is an error. Response headers are in either
2931 // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at
2932 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
2933 // check whether the returned error was because http.StatusNotModified was
2934 // returned.
2935 func (c *CustomersPoliciesOrgunitsBatchInheritCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
2936 gensupport.SetOptions(c.urlParams_, opts...)
2937 res, err := c.doRequest("json")
2938 if res != nil && res.StatusCode == http.StatusNotModified {
2939 if res.Body != nil {
2940 res.Body.Close()
2941 }
2942 return nil, gensupport.WrapError(&googleapi.Error{
2943 Code: res.StatusCode,
2944 Header: res.Header,
2945 })
2946 }
2947 if err != nil {
2948 return nil, err
2949 }
2950 defer googleapi.CloseBody(res)
2951 if err := googleapi.CheckResponse(res); err != nil {
2952 return nil, gensupport.WrapError(err)
2953 }
2954 ret := &GoogleProtobufEmpty{
2955 ServerResponse: googleapi.ServerResponse{
2956 Header: res.Header,
2957 HTTPStatusCode: res.StatusCode,
2958 },
2959 }
2960 target := &ret
2961 b, err := gensupport.DecodeResponseBytes(target, res)
2962 if err != nil {
2963 return nil, err
2964 }
2965 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "chromepolicy.customers.policies.orgunits.batchInherit", "response", internallog.HTTPResponse(res, b))
2966 return ret, nil
2967 }
2968
2969 type CustomersPoliciesOrgunitsBatchModifyCall struct {
2970 s *Service
2971 customer string
2972 googlechromepolicyversionsv1batchmodifyorgunitpoliciesrequest *GoogleChromePolicyVersionsV1BatchModifyOrgUnitPoliciesRequest
2973 urlParams_ gensupport.URLParams
2974 ctx_ context.Context
2975 header_ http.Header
2976 }
2977
2978 // BatchModify: Modify multiple policy values that are applied to a specific
2979 // org unit. All targets must have the same target format. That is to say that
2980 // they must point to the same target resource and must have the same keys
2981 // specified in `additionalTargetKeyNames`, though the values for those keys
2982 // may be different. On failure the request will return the error details as
2983 // part of the google.rpc.Status.
2984 //
2985 // - customer: ID of the G Suite account or literal "my_customer" for the
2986 // customer associated to the request.
2987 func (r *CustomersPoliciesOrgunitsService) BatchModify(customer string, googlechromepolicyversionsv1batchmodifyorgunitpoliciesrequest *GoogleChromePolicyVersionsV1BatchModifyOrgUnitPoliciesRequest) *CustomersPoliciesOrgunitsBatchModifyCall {
2988 c := &CustomersPoliciesOrgunitsBatchModifyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2989 c.customer = customer
2990 c.googlechromepolicyversionsv1batchmodifyorgunitpoliciesrequest = googlechromepolicyversionsv1batchmodifyorgunitpoliciesrequest
2991 return c
2992 }
2993
2994 // Fields allows partial responses to be retrieved. See
2995 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
2996 // details.
2997 func (c *CustomersPoliciesOrgunitsBatchModifyCall) Fields(s ...googleapi.Field) *CustomersPoliciesOrgunitsBatchModifyCall {
2998 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2999 return c
3000 }
3001
3002 // Context sets the context to be used in this call's Do method.
3003 func (c *CustomersPoliciesOrgunitsBatchModifyCall) Context(ctx context.Context) *CustomersPoliciesOrgunitsBatchModifyCall {
3004 c.ctx_ = ctx
3005 return c
3006 }
3007
3008 // Header returns a http.Header that can be modified by the caller to add
3009 // headers to the request.
3010 func (c *CustomersPoliciesOrgunitsBatchModifyCall) Header() http.Header {
3011 if c.header_ == nil {
3012 c.header_ = make(http.Header)
3013 }
3014 return c.header_
3015 }
3016
3017 func (c *CustomersPoliciesOrgunitsBatchModifyCall) doRequest(alt string) (*http.Response, error) {
3018 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3019 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlechromepolicyversionsv1batchmodifyorgunitpoliciesrequest)
3020 if err != nil {
3021 return nil, err
3022 }
3023 c.urlParams_.Set("alt", alt)
3024 c.urlParams_.Set("prettyPrint", "false")
3025 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+customer}/policies/orgunits:batchModify")
3026 urls += "?" + c.urlParams_.Encode()
3027 req, err := http.NewRequest("POST", urls, body)
3028 if err != nil {
3029 return nil, err
3030 }
3031 req.Header = reqHeaders
3032 googleapi.Expand(req.URL, map[string]string{
3033 "customer": c.customer,
3034 })
3035 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "chromepolicy.customers.policies.orgunits.batchModify", "request", internallog.HTTPRequest(req, body.Bytes()))
3036 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3037 }
3038
3039 // Do executes the "chromepolicy.customers.policies.orgunits.batchModify" call.
3040 // Any non-2xx status code is an error. Response headers are in either
3041 // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at
3042 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3043 // check whether the returned error was because http.StatusNotModified was
3044 // returned.
3045 func (c *CustomersPoliciesOrgunitsBatchModifyCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
3046 gensupport.SetOptions(c.urlParams_, opts...)
3047 res, err := c.doRequest("json")
3048 if res != nil && res.StatusCode == http.StatusNotModified {
3049 if res.Body != nil {
3050 res.Body.Close()
3051 }
3052 return nil, gensupport.WrapError(&googleapi.Error{
3053 Code: res.StatusCode,
3054 Header: res.Header,
3055 })
3056 }
3057 if err != nil {
3058 return nil, err
3059 }
3060 defer googleapi.CloseBody(res)
3061 if err := googleapi.CheckResponse(res); err != nil {
3062 return nil, gensupport.WrapError(err)
3063 }
3064 ret := &GoogleProtobufEmpty{
3065 ServerResponse: googleapi.ServerResponse{
3066 Header: res.Header,
3067 HTTPStatusCode: res.StatusCode,
3068 },
3069 }
3070 target := &ret
3071 b, err := gensupport.DecodeResponseBytes(target, res)
3072 if err != nil {
3073 return nil, err
3074 }
3075 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "chromepolicy.customers.policies.orgunits.batchModify", "response", internallog.HTTPResponse(res, b))
3076 return ret, nil
3077 }
3078
3079 type CustomersPolicySchemasGetCall struct {
3080 s *Service
3081 name string
3082 urlParams_ gensupport.URLParams
3083 ifNoneMatch_ string
3084 ctx_ context.Context
3085 header_ http.Header
3086 }
3087
3088 // Get: Get a specific policy schema for a customer by its resource name.
3089 //
3090 // - name: The policy schema resource name to query.
3091 func (r *CustomersPolicySchemasService) Get(name string) *CustomersPolicySchemasGetCall {
3092 c := &CustomersPolicySchemasGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3093 c.name = name
3094 return c
3095 }
3096
3097 // Fields allows partial responses to be retrieved. See
3098 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3099 // details.
3100 func (c *CustomersPolicySchemasGetCall) Fields(s ...googleapi.Field) *CustomersPolicySchemasGetCall {
3101 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3102 return c
3103 }
3104
3105 // IfNoneMatch sets an optional parameter which makes the operation fail if the
3106 // object's ETag matches the given value. This is useful for getting updates
3107 // only after the object has changed since the last request.
3108 func (c *CustomersPolicySchemasGetCall) IfNoneMatch(entityTag string) *CustomersPolicySchemasGetCall {
3109 c.ifNoneMatch_ = entityTag
3110 return c
3111 }
3112
3113 // Context sets the context to be used in this call's Do method.
3114 func (c *CustomersPolicySchemasGetCall) Context(ctx context.Context) *CustomersPolicySchemasGetCall {
3115 c.ctx_ = ctx
3116 return c
3117 }
3118
3119 // Header returns a http.Header that can be modified by the caller to add
3120 // headers to the request.
3121 func (c *CustomersPolicySchemasGetCall) Header() http.Header {
3122 if c.header_ == nil {
3123 c.header_ = make(http.Header)
3124 }
3125 return c.header_
3126 }
3127
3128 func (c *CustomersPolicySchemasGetCall) doRequest(alt string) (*http.Response, error) {
3129 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3130 if c.ifNoneMatch_ != "" {
3131 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3132 }
3133 c.urlParams_.Set("alt", alt)
3134 c.urlParams_.Set("prettyPrint", "false")
3135 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3136 urls += "?" + c.urlParams_.Encode()
3137 req, err := http.NewRequest("GET", urls, nil)
3138 if err != nil {
3139 return nil, err
3140 }
3141 req.Header = reqHeaders
3142 googleapi.Expand(req.URL, map[string]string{
3143 "name": c.name,
3144 })
3145 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "chromepolicy.customers.policySchemas.get", "request", internallog.HTTPRequest(req, nil))
3146 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3147 }
3148
3149 // Do executes the "chromepolicy.customers.policySchemas.get" call.
3150 // Any non-2xx status code is an error. Response headers are in either
3151 // *GoogleChromePolicyVersionsV1PolicySchema.ServerResponse.Header or (if a
3152 // response was returned at all) in error.(*googleapi.Error).Header. Use
3153 // googleapi.IsNotModified to check whether the returned error was because
3154 // http.StatusNotModified was returned.
3155 func (c *CustomersPolicySchemasGetCall) Do(opts ...googleapi.CallOption) (*GoogleChromePolicyVersionsV1PolicySchema, error) {
3156 gensupport.SetOptions(c.urlParams_, opts...)
3157 res, err := c.doRequest("json")
3158 if res != nil && res.StatusCode == http.StatusNotModified {
3159 if res.Body != nil {
3160 res.Body.Close()
3161 }
3162 return nil, gensupport.WrapError(&googleapi.Error{
3163 Code: res.StatusCode,
3164 Header: res.Header,
3165 })
3166 }
3167 if err != nil {
3168 return nil, err
3169 }
3170 defer googleapi.CloseBody(res)
3171 if err := googleapi.CheckResponse(res); err != nil {
3172 return nil, gensupport.WrapError(err)
3173 }
3174 ret := &GoogleChromePolicyVersionsV1PolicySchema{
3175 ServerResponse: googleapi.ServerResponse{
3176 Header: res.Header,
3177 HTTPStatusCode: res.StatusCode,
3178 },
3179 }
3180 target := &ret
3181 b, err := gensupport.DecodeResponseBytes(target, res)
3182 if err != nil {
3183 return nil, err
3184 }
3185 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "chromepolicy.customers.policySchemas.get", "response", internallog.HTTPResponse(res, b))
3186 return ret, nil
3187 }
3188
3189 type CustomersPolicySchemasListCall struct {
3190 s *Service
3191 parent string
3192 urlParams_ gensupport.URLParams
3193 ifNoneMatch_ string
3194 ctx_ context.Context
3195 header_ http.Header
3196 }
3197
3198 // List: Gets a list of policy schemas that match a specified filter value for
3199 // a given customer.
3200 //
3201 // - parent: The customer for which the listing request will apply.
3202 func (r *CustomersPolicySchemasService) List(parent string) *CustomersPolicySchemasListCall {
3203 c := &CustomersPolicySchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3204 c.parent = parent
3205 return c
3206 }
3207
3208 // Filter sets the optional parameter "filter": The schema filter used to find
3209 // a particular schema based on fields like its resource name, description and
3210 // `additionalTargetKeyNames`.
3211 func (c *CustomersPolicySchemasListCall) Filter(filter string) *CustomersPolicySchemasListCall {
3212 c.urlParams_.Set("filter", filter)
3213 return c
3214 }
3215
3216 // PageSize sets the optional parameter "pageSize": The maximum number of
3217 // policy schemas to return, defaults to 100 and has a maximum of 1000.
3218 func (c *CustomersPolicySchemasListCall) PageSize(pageSize int64) *CustomersPolicySchemasListCall {
3219 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3220 return c
3221 }
3222
3223 // PageToken sets the optional parameter "pageToken": The page token used to
3224 // retrieve a specific page of the listing request.
3225 func (c *CustomersPolicySchemasListCall) PageToken(pageToken string) *CustomersPolicySchemasListCall {
3226 c.urlParams_.Set("pageToken", pageToken)
3227 return c
3228 }
3229
3230 // Fields allows partial responses to be retrieved. See
3231 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3232 // details.
3233 func (c *CustomersPolicySchemasListCall) Fields(s ...googleapi.Field) *CustomersPolicySchemasListCall {
3234 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3235 return c
3236 }
3237
3238 // IfNoneMatch sets an optional parameter which makes the operation fail if the
3239 // object's ETag matches the given value. This is useful for getting updates
3240 // only after the object has changed since the last request.
3241 func (c *CustomersPolicySchemasListCall) IfNoneMatch(entityTag string) *CustomersPolicySchemasListCall {
3242 c.ifNoneMatch_ = entityTag
3243 return c
3244 }
3245
3246 // Context sets the context to be used in this call's Do method.
3247 func (c *CustomersPolicySchemasListCall) Context(ctx context.Context) *CustomersPolicySchemasListCall {
3248 c.ctx_ = ctx
3249 return c
3250 }
3251
3252 // Header returns a http.Header that can be modified by the caller to add
3253 // headers to the request.
3254 func (c *CustomersPolicySchemasListCall) Header() http.Header {
3255 if c.header_ == nil {
3256 c.header_ = make(http.Header)
3257 }
3258 return c.header_
3259 }
3260
3261 func (c *CustomersPolicySchemasListCall) doRequest(alt string) (*http.Response, error) {
3262 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3263 if c.ifNoneMatch_ != "" {
3264 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3265 }
3266 c.urlParams_.Set("alt", alt)
3267 c.urlParams_.Set("prettyPrint", "false")
3268 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/policySchemas")
3269 urls += "?" + c.urlParams_.Encode()
3270 req, err := http.NewRequest("GET", urls, nil)
3271 if err != nil {
3272 return nil, err
3273 }
3274 req.Header = reqHeaders
3275 googleapi.Expand(req.URL, map[string]string{
3276 "parent": c.parent,
3277 })
3278 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "chromepolicy.customers.policySchemas.list", "request", internallog.HTTPRequest(req, nil))
3279 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3280 }
3281
3282 // Do executes the "chromepolicy.customers.policySchemas.list" call.
3283 // Any non-2xx status code is an error. Response headers are in either
3284 // *GoogleChromePolicyVersionsV1ListPolicySchemasResponse.ServerResponse.Header
3285 // or (if a response was returned at all) in error.(*googleapi.Error).Header.
3286 // Use googleapi.IsNotModified to check whether the returned error was because
3287 // http.StatusNotModified was returned.
3288 func (c *CustomersPolicySchemasListCall) Do(opts ...googleapi.CallOption) (*GoogleChromePolicyVersionsV1ListPolicySchemasResponse, error) {
3289 gensupport.SetOptions(c.urlParams_, opts...)
3290 res, err := c.doRequest("json")
3291 if res != nil && res.StatusCode == http.StatusNotModified {
3292 if res.Body != nil {
3293 res.Body.Close()
3294 }
3295 return nil, gensupport.WrapError(&googleapi.Error{
3296 Code: res.StatusCode,
3297 Header: res.Header,
3298 })
3299 }
3300 if err != nil {
3301 return nil, err
3302 }
3303 defer googleapi.CloseBody(res)
3304 if err := googleapi.CheckResponse(res); err != nil {
3305 return nil, gensupport.WrapError(err)
3306 }
3307 ret := &GoogleChromePolicyVersionsV1ListPolicySchemasResponse{
3308 ServerResponse: googleapi.ServerResponse{
3309 Header: res.Header,
3310 HTTPStatusCode: res.StatusCode,
3311 },
3312 }
3313 target := &ret
3314 b, err := gensupport.DecodeResponseBytes(target, res)
3315 if err != nil {
3316 return nil, err
3317 }
3318 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "chromepolicy.customers.policySchemas.list", "response", internallog.HTTPResponse(res, b))
3319 return ret, nil
3320 }
3321
3322 // Pages invokes f for each page of results.
3323 // A non-nil error returned from f will halt the iteration.
3324 // The provided context supersedes any context provided to the Context method.
3325 func (c *CustomersPolicySchemasListCall) Pages(ctx context.Context, f func(*GoogleChromePolicyVersionsV1ListPolicySchemasResponse) error) error {
3326 c.ctx_ = ctx
3327 defer c.PageToken(c.urlParams_.Get("pageToken"))
3328 for {
3329 x, err := c.Do()
3330 if err != nil {
3331 return err
3332 }
3333 if err := f(x); err != nil {
3334 return err
3335 }
3336 if x.NextPageToken == "" {
3337 return nil
3338 }
3339 c.PageToken(x.NextPageToken)
3340 }
3341 }
3342
3343 type MediaUploadCall struct {
3344 s *Service
3345 customer string
3346 googlechromepolicyversionsv1uploadpolicyfilerequest *GoogleChromePolicyVersionsV1UploadPolicyFileRequest
3347 urlParams_ gensupport.URLParams
3348 mediaInfo_ *gensupport.MediaInfo
3349 ctx_ context.Context
3350 header_ http.Header
3351 }
3352
3353 // Upload: Creates an enterprise file from the content provided by user.
3354 // Returns a public download url for end user.
3355 //
3356 // - customer: The customer for which the file upload will apply.
3357 func (r *MediaService) Upload(customer string, googlechromepolicyversionsv1uploadpolicyfilerequest *GoogleChromePolicyVersionsV1UploadPolicyFileRequest) *MediaUploadCall {
3358 c := &MediaUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3359 c.customer = customer
3360 c.googlechromepolicyversionsv1uploadpolicyfilerequest = googlechromepolicyversionsv1uploadpolicyfilerequest
3361 return c
3362 }
3363
3364 // Media specifies the media to upload in one or more chunks. The chunk size
3365 // may be controlled by supplying a MediaOption generated by
3366 // googleapi.ChunkSize. The chunk size defaults to
3367 // googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload
3368 // request will be determined by sniffing the contents of r, unless a
3369 // MediaOption generated by googleapi.ContentType is supplied.
3370 // At most one of Media and ResumableMedia may be set.
3371 func (c *MediaUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *MediaUploadCall {
3372 c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
3373 return c
3374 }
3375
3376 // ResumableMedia specifies the media to upload in chunks and can be canceled
3377 // with ctx.
3378 //
3379 // Deprecated: use Media instead.
3380 //
3381 // At most one of Media and ResumableMedia may be set. mediaType identifies the
3382 // MIME media type of the upload, such as "image/png". If mediaType is "", it
3383 // will be auto-detected. The provided ctx will supersede any context
3384 // previously provided to the Context method.
3385 func (c *MediaUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *MediaUploadCall {
3386 c.ctx_ = ctx
3387 c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
3388 return c
3389 }
3390
3391 // ProgressUpdater provides a callback function that will be called after every
3392 // chunk. It should be a low-latency function in order to not slow down the
3393 // upload operation. This should only be called when using ResumableMedia (as
3394 // opposed to Media).
3395 func (c *MediaUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *MediaUploadCall {
3396 c.mediaInfo_.SetProgressUpdater(pu)
3397 return c
3398 }
3399
3400 // Fields allows partial responses to be retrieved. See
3401 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3402 // details.
3403 func (c *MediaUploadCall) Fields(s ...googleapi.Field) *MediaUploadCall {
3404 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3405 return c
3406 }
3407
3408 // Context sets the context to be used in this call's Do method.
3409 // This context will supersede any context previously provided to the
3410 // ResumableMedia method.
3411 func (c *MediaUploadCall) Context(ctx context.Context) *MediaUploadCall {
3412 c.ctx_ = ctx
3413 return c
3414 }
3415
3416 // Header returns a http.Header that can be modified by the caller to add
3417 // headers to the request.
3418 func (c *MediaUploadCall) Header() http.Header {
3419 if c.header_ == nil {
3420 c.header_ = make(http.Header)
3421 }
3422 return c.header_
3423 }
3424
3425 func (c *MediaUploadCall) doRequest(alt string) (*http.Response, error) {
3426 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3427 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlechromepolicyversionsv1uploadpolicyfilerequest)
3428 if err != nil {
3429 return nil, err
3430 }
3431 c.urlParams_.Set("alt", alt)
3432 c.urlParams_.Set("prettyPrint", "false")
3433 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+customer}/policies/files:uploadPolicyFile")
3434 if c.mediaInfo_ != nil {
3435 urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/v1/{+customer}/policies/files:uploadPolicyFile")
3436 c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
3437 }
3438 newBody, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
3439 defer cleanup()
3440 urls += "?" + c.urlParams_.Encode()
3441 req, err := http.NewRequest("POST", urls, newBody)
3442 if err != nil {
3443 return nil, err
3444 }
3445 req.Header = reqHeaders
3446 req.GetBody = getBody
3447 googleapi.Expand(req.URL, map[string]string{
3448 "customer": c.customer,
3449 })
3450 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "chromepolicy.media.upload", "request", internallog.HTTPRequest(req, body.Bytes()))
3451 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3452 }
3453
3454 // Do executes the "chromepolicy.media.upload" call.
3455 // Any non-2xx status code is an error. Response headers are in either
3456 // *GoogleChromePolicyVersionsV1UploadPolicyFileResponse.ServerResponse.Header
3457 // or (if a response was returned at all) in error.(*googleapi.Error).Header.
3458 // Use googleapi.IsNotModified to check whether the returned error was because
3459 // http.StatusNotModified was returned.
3460 func (c *MediaUploadCall) Do(opts ...googleapi.CallOption) (*GoogleChromePolicyVersionsV1UploadPolicyFileResponse, error) {
3461 gensupport.SetOptions(c.urlParams_, opts...)
3462 res, err := c.doRequest("json")
3463 if res != nil && res.StatusCode == http.StatusNotModified {
3464 if res.Body != nil {
3465 res.Body.Close()
3466 }
3467 return nil, gensupport.WrapError(&googleapi.Error{
3468 Code: res.StatusCode,
3469 Header: res.Header,
3470 })
3471 }
3472 if err != nil {
3473 return nil, err
3474 }
3475 defer googleapi.CloseBody(res)
3476 if err := googleapi.CheckResponse(res); err != nil {
3477 return nil, gensupport.WrapError(err)
3478 }
3479 rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
3480 if rx != nil {
3481 rx.Client = c.s.client
3482 rx.UserAgent = c.s.userAgent()
3483 ctx := c.ctx_
3484 if ctx == nil {
3485 ctx = context.TODO()
3486 }
3487 res, err = rx.Upload(ctx)
3488 if err != nil {
3489 return nil, err
3490 }
3491 defer res.Body.Close()
3492 if err := googleapi.CheckResponse(res); err != nil {
3493 return nil, gensupport.WrapError(err)
3494 }
3495 }
3496 ret := &GoogleChromePolicyVersionsV1UploadPolicyFileResponse{
3497 ServerResponse: googleapi.ServerResponse{
3498 Header: res.Header,
3499 HTTPStatusCode: res.StatusCode,
3500 },
3501 }
3502 target := &ret
3503 b, err := gensupport.DecodeResponseBytes(target, res)
3504 if err != nil {
3505 return nil, err
3506 }
3507 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "chromepolicy.media.upload", "response", internallog.HTTPResponse(res, b))
3508 return ret, nil
3509 }