1// Copyright 2021 Google LLC.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Code generated file. DO NOT EDIT.
6
7// Package servicecontrol provides access to the Service Control API.
8//
9// For product documentation, see: https://cloud.google.com/service-control/
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/servicecontrol/v2"
16//   ...
17//   ctx := context.Background()
18//   servicecontrolService, err := servicecontrol.NewService(ctx)
19//
20// In this example, Google Application Default Credentials are used for authentication.
21//
22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
23//
24// Other authentication options
25//
26// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
27//
28//   servicecontrolService, err := servicecontrol.NewService(ctx, option.WithScopes(servicecontrol.ServicecontrolScope))
29//
30// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
31//
32//   servicecontrolService, err := servicecontrol.NewService(ctx, option.WithAPIKey("AIza..."))
33//
34// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
35//
36//   config := &oauth2.Config{...}
37//   // ...
38//   token, err := config.Exchange(ctx, ...)
39//   servicecontrolService, err := servicecontrol.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
40//
41// See https://godoc.org/google.golang.org/api/option/ for details on options.
42package servicecontrol // import "google.golang.org/api/servicecontrol/v2"
43
44import (
45	"bytes"
46	"context"
47	"encoding/json"
48	"errors"
49	"fmt"
50	"io"
51	"net/http"
52	"net/url"
53	"strconv"
54	"strings"
55
56	googleapi "google.golang.org/api/googleapi"
57	gensupport "google.golang.org/api/internal/gensupport"
58	option "google.golang.org/api/option"
59	internaloption "google.golang.org/api/option/internaloption"
60	htransport "google.golang.org/api/transport/http"
61)
62
63// Always reference these packages, just in case the auto-generated code
64// below doesn't.
65var _ = bytes.NewBuffer
66var _ = strconv.Itoa
67var _ = fmt.Sprintf
68var _ = json.NewDecoder
69var _ = io.Copy
70var _ = url.Parse
71var _ = gensupport.MarshalJSON
72var _ = googleapi.Version
73var _ = errors.New
74var _ = strings.Replace
75var _ = context.Canceled
76var _ = internaloption.WithDefaultEndpoint
77
78const apiId = "servicecontrol:v2"
79const apiName = "servicecontrol"
80const apiVersion = "v2"
81const basePath = "https://servicecontrol.googleapis.com/"
82const mtlsBasePath = "https://servicecontrol.mtls.googleapis.com/"
83
84// OAuth2 scopes used by this API.
85const (
86	// View and manage your data across Google Cloud Platform services
87	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
88
89	// Manage your Google Service Control data
90	ServicecontrolScope = "https://www.googleapis.com/auth/servicecontrol"
91)
92
93// NewService creates a new Service.
94func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
95	scopesOption := option.WithScopes(
96		"https://www.googleapis.com/auth/cloud-platform",
97		"https://www.googleapis.com/auth/servicecontrol",
98	)
99	// NOTE: prepend, so we don't override user-specified scopes.
100	opts = append([]option.ClientOption{scopesOption}, opts...)
101	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
102	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
103	client, endpoint, err := htransport.NewClient(ctx, opts...)
104	if err != nil {
105		return nil, err
106	}
107	s, err := New(client)
108	if err != nil {
109		return nil, err
110	}
111	if endpoint != "" {
112		s.BasePath = endpoint
113	}
114	return s, nil
115}
116
117// New creates a new Service. It uses the provided http.Client for requests.
118//
119// Deprecated: please use NewService instead.
120// To provide a custom HTTP client, use option.WithHTTPClient.
121// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
122func New(client *http.Client) (*Service, error) {
123	if client == nil {
124		return nil, errors.New("client is nil")
125	}
126	s := &Service{client: client, BasePath: basePath}
127	s.Services = NewServicesService(s)
128	return s, nil
129}
130
131type Service struct {
132	client    *http.Client
133	BasePath  string // API endpoint base URL
134	UserAgent string // optional additional User-Agent fragment
135
136	Services *ServicesService
137}
138
139func (s *Service) userAgent() string {
140	if s.UserAgent == "" {
141		return googleapi.UserAgent
142	}
143	return googleapi.UserAgent + " " + s.UserAgent
144}
145
146func NewServicesService(s *Service) *ServicesService {
147	rs := &ServicesService{s: s}
148	return rs
149}
150
151type ServicesService struct {
152	s *Service
153}
154
155// Api: This message defines attributes associated with API operations,
156// such as a network API request. The terminology is based on the
157// conventions used by Google APIs, Istio, and OpenAPI.
158type Api struct {
159	// Operation: The API operation name. For gRPC requests, it is the fully
160	// qualified API method name, such as
161	// "google.pubsub.v1.Publisher.Publish". For OpenAPI requests, it is the
162	// `operationId`, such as "getPet".
163	Operation string `json:"operation,omitempty"`
164
165	// Protocol: The API protocol used for sending the request, such as
166	// "http", "https", "grpc", or "internal".
167	Protocol string `json:"protocol,omitempty"`
168
169	// Service: The API service name. It is a logical identifier for a
170	// networked API, such as "pubsub.googleapis.com". The naming syntax
171	// depends on the API management system being used for handling the
172	// request.
173	Service string `json:"service,omitempty"`
174
175	// Version: The API version associated with the API operation above,
176	// such as "v1" or "v1alpha1".
177	Version string `json:"version,omitempty"`
178
179	// ForceSendFields is a list of field names (e.g. "Operation") to
180	// unconditionally include in API requests. By default, fields with
181	// empty values are omitted from API requests. However, any non-pointer,
182	// non-interface field appearing in ForceSendFields will be sent to the
183	// server regardless of whether the field is empty or not. This may be
184	// used to include empty fields in Patch requests.
185	ForceSendFields []string `json:"-"`
186
187	// NullFields is a list of field names (e.g. "Operation") to include in
188	// API requests with the JSON null value. By default, fields with empty
189	// values are omitted from API requests. However, any field with an
190	// empty value appearing in NullFields will be sent to the server as
191	// null. It is an error if a field in this list has a non-empty value.
192	// This may be used to include null fields in Patch requests.
193	NullFields []string `json:"-"`
194}
195
196func (s *Api) MarshalJSON() ([]byte, error) {
197	type NoMethod Api
198	raw := NoMethod(*s)
199	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
200}
201
202// AttributeContext: This message defines the standard attribute
203// vocabulary for Google APIs. An attribute is a piece of metadata that
204// describes an activity on a network service. For example, the size of
205// an HTTP request, or the status code of an HTTP response. Each
206// attribute has a type and a name, which is logically defined as a
207// proto message field in `AttributeContext`. The field type becomes the
208// attribute type, and the field path becomes the attribute name. For
209// example, the attribute `source.ip` maps to field
210// `AttributeContext.source.ip`. This message definition is guaranteed
211// not to have any wire breaking change. So you can use it directly for
212// passing attributes across different systems. NOTE: Different system
213// may generate different subset of attributes. Please verify the system
214// specification before relying on an attribute generated a system.
215type AttributeContext struct {
216	// Api: Represents an API operation that is involved to a network
217	// activity.
218	Api *Api `json:"api,omitempty"`
219
220	// Destination: The destination of a network activity, such as accepting
221	// a TCP connection. In a multi hop network activity, the destination
222	// represents the receiver of the last hop.
223	Destination *Peer `json:"destination,omitempty"`
224
225	// Extensions: Supports extensions for advanced use cases, such as logs
226	// and metrics.
227	Extensions []googleapi.RawMessage `json:"extensions,omitempty"`
228
229	// Origin: The origin of a network activity. In a multi hop network
230	// activity, the origin represents the sender of the first hop. For the
231	// first hop, the `source` and the `origin` must have the same content.
232	Origin *Peer `json:"origin,omitempty"`
233
234	// Request: Represents a network request, such as an HTTP request.
235	Request *Request `json:"request,omitempty"`
236
237	// Resource: Represents a target resource that is involved with a
238	// network activity. If multiple resources are involved with an
239	// activity, this must be the primary one.
240	Resource *Resource `json:"resource,omitempty"`
241
242	// Response: Represents a network response, such as an HTTP response.
243	Response *Response `json:"response,omitempty"`
244
245	// Source: The source of a network activity, such as starting a TCP
246	// connection. In a multi hop network activity, the source represents
247	// the sender of the last hop.
248	Source *Peer `json:"source,omitempty"`
249
250	// ForceSendFields is a list of field names (e.g. "Api") to
251	// unconditionally include in API requests. By default, fields with
252	// empty values are omitted from API requests. However, any non-pointer,
253	// non-interface field appearing in ForceSendFields will be sent to the
254	// server regardless of whether the field is empty or not. This may be
255	// used to include empty fields in Patch requests.
256	ForceSendFields []string `json:"-"`
257
258	// NullFields is a list of field names (e.g. "Api") to include in API
259	// requests with the JSON null value. By default, fields with empty
260	// values are omitted from API requests. However, any field with an
261	// empty value appearing in NullFields will be sent to the server as
262	// null. It is an error if a field in this list has a non-empty value.
263	// This may be used to include null fields in Patch requests.
264	NullFields []string `json:"-"`
265}
266
267func (s *AttributeContext) MarshalJSON() ([]byte, error) {
268	type NoMethod AttributeContext
269	raw := NoMethod(*s)
270	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
271}
272
273// AuditLog: Common audit log format for Google Cloud Platform API
274// operations.
275type AuditLog struct {
276	// AuthenticationInfo: Authentication information.
277	AuthenticationInfo *AuthenticationInfo `json:"authenticationInfo,omitempty"`
278
279	// AuthorizationInfo: Authorization information. If there are multiple
280	// resources or permissions involved, then there is one
281	// AuthorizationInfo element for each {resource, permission} tuple.
282	AuthorizationInfo []*AuthorizationInfo `json:"authorizationInfo,omitempty"`
283
284	// Metadata: Other service-specific data about the request, response,
285	// and other information associated with the current audited event.
286	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
287
288	// MethodName: The name of the service method or operation. For API
289	// calls, this should be the name of the API method. For example,
290	// "google.cloud.bigquery.v2.TableService.InsertTable"
291	// "google.logging.v2.ConfigServiceV2.CreateSink"
292	MethodName string `json:"methodName,omitempty"`
293
294	// NumResponseItems: The number of items returned from a List or Query
295	// API method, if applicable.
296	NumResponseItems int64 `json:"numResponseItems,omitempty,string"`
297
298	// Request: The operation request. This may not include all request
299	// parameters, such as those that are too large, privacy-sensitive, or
300	// duplicated elsewhere in the log record. It should never include
301	// user-generated data, such as file contents. When the JSON object
302	// represented here has a proto equivalent, the proto name will be
303	// indicated in the `@type` property.
304	Request googleapi.RawMessage `json:"request,omitempty"`
305
306	// RequestMetadata: Metadata about the operation.
307	RequestMetadata *RequestMetadata `json:"requestMetadata,omitempty"`
308
309	// ResourceLocation: The resource location information.
310	ResourceLocation *ResourceLocation `json:"resourceLocation,omitempty"`
311
312	// ResourceName: The resource or collection that is the target of the
313	// operation. The name is a scheme-less URI, not including the API
314	// service name. For example:
315	// "projects/PROJECT_ID/zones/us-central1-a/instances"
316	// "projects/PROJECT_ID/datasets/DATASET_ID"
317	ResourceName string `json:"resourceName,omitempty"`
318
319	// ResourceOriginalState: The resource's original state before mutation.
320	// Present only for operations which have successfully modified the
321	// targeted resource(s). In general, this field should contain all
322	// changed fields, except those that are already been included in
323	// `request`, `response`, `metadata` or `service_data` fields. When the
324	// JSON object represented here has a proto equivalent, the proto name
325	// will be indicated in the `@type` property.
326	ResourceOriginalState googleapi.RawMessage `json:"resourceOriginalState,omitempty"`
327
328	// Response: The operation response. This may not include all response
329	// elements, such as those that are too large, privacy-sensitive, or
330	// duplicated elsewhere in the log record. It should never include
331	// user-generated data, such as file contents. When the JSON object
332	// represented here has a proto equivalent, the proto name will be
333	// indicated in the `@type` property.
334	Response googleapi.RawMessage `json:"response,omitempty"`
335
336	// ServiceData: Deprecated. Use the `metadata` field instead. Other
337	// service-specific data about the request, response, and other
338	// activities.
339	ServiceData googleapi.RawMessage `json:"serviceData,omitempty"`
340
341	// ServiceName: The name of the API service performing the operation.
342	// For example, "compute.googleapis.com".
343	ServiceName string `json:"serviceName,omitempty"`
344
345	// Status: The status of the overall operation.
346	Status *Status `json:"status,omitempty"`
347
348	// ForceSendFields is a list of field names (e.g. "AuthenticationInfo")
349	// to unconditionally include in API requests. By default, fields with
350	// empty values are omitted from API requests. However, any non-pointer,
351	// non-interface field appearing in ForceSendFields will be sent to the
352	// server regardless of whether the field is empty or not. This may be
353	// used to include empty fields in Patch requests.
354	ForceSendFields []string `json:"-"`
355
356	// NullFields is a list of field names (e.g. "AuthenticationInfo") to
357	// include in API requests with the JSON null value. By default, fields
358	// with empty values are omitted from API requests. However, any field
359	// with an empty value appearing in NullFields will be sent to the
360	// server as null. It is an error if a field in this list has a
361	// non-empty value. This may be used to include null fields in Patch
362	// requests.
363	NullFields []string `json:"-"`
364}
365
366func (s *AuditLog) MarshalJSON() ([]byte, error) {
367	type NoMethod AuditLog
368	raw := NoMethod(*s)
369	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
370}
371
372// Auth: This message defines request authentication attributes.
373// Terminology is based on the JSON Web Token (JWT) standard, but the
374// terms also correlate to concepts in other standards.
375type Auth struct {
376	// AccessLevels: A list of access level resource names that allow
377	// resources to be accessed by authenticated requester. It is part of
378	// Secure GCP processing for the incoming request. An access level
379	// string has the format:
380	// "//{api_service_name}/accessPolicies/{policy_id}/accessLevels/{short_n
381	// ame}" Example:
382	// "//accesscontextmanager.googleapis.com/accessPolicies/MY_POLICY_ID/acc
383	// essLevels/MY_LEVEL"
384	AccessLevels []string `json:"accessLevels,omitempty"`
385
386	// Audiences: The intended audience(s) for this authentication
387	// information. Reflects the audience (`aud`) claim within a JWT. The
388	// audience value(s) depends on the `issuer`, but typically include one
389	// or more of the following pieces of information: * The services
390	// intended to receive the credential. For example,
391	// ["https://pubsub.googleapis.com/",
392	// "https://storage.googleapis.com/"]. * A set of service-based scopes.
393	// For example, ["https://www.googleapis.com/auth/cloud-platform"]. *
394	// The client id of an app, such as the Firebase project id for JWTs
395	// from Firebase Auth. Consult the documentation for the credential
396	// issuer to determine the information provided.
397	Audiences []string `json:"audiences,omitempty"`
398
399	// Claims: Structured claims presented with the credential. JWTs include
400	// `{key: value}` pairs for standard and private claims. The following
401	// is a subset of the standard required and optional claims that would
402	// typically be presented for a Google-based JWT: {'iss':
403	// 'accounts.google.com', 'sub': '113289723416554971153', 'aud':
404	// ['123456789012', 'pubsub.googleapis.com'], 'azp':
405	// '123456789012.apps.googleusercontent.com', 'email':
406	// 'jsmith@example.com', 'iat': 1353601026, 'exp': 1353604926} SAML
407	// assertions are similarly specified, but with an identity provider
408	// dependent structure.
409	Claims googleapi.RawMessage `json:"claims,omitempty"`
410
411	// Presenter: The authorized presenter of the credential. Reflects the
412	// optional Authorized Presenter (`azp`) claim within a JWT or the OAuth
413	// client id. For example, a Google Cloud Platform client id looks as
414	// follows: "123456789012.apps.googleusercontent.com".
415	Presenter string `json:"presenter,omitempty"`
416
417	// Principal: The authenticated principal. Reflects the issuer (`iss`)
418	// and subject (`sub`) claims within a JWT. The issuer and subject
419	// should be `/` delimited, with `/` percent-encoded within the subject
420	// fragment. For Google accounts, the principal format is:
421	// "https://accounts.google.com/{id}"
422	Principal string `json:"principal,omitempty"`
423
424	// ForceSendFields is a list of field names (e.g. "AccessLevels") to
425	// unconditionally include in API requests. By default, fields with
426	// empty values are omitted from API requests. However, any non-pointer,
427	// non-interface field appearing in ForceSendFields will be sent to the
428	// server regardless of whether the field is empty or not. This may be
429	// used to include empty fields in Patch requests.
430	ForceSendFields []string `json:"-"`
431
432	// NullFields is a list of field names (e.g. "AccessLevels") to include
433	// in API requests with the JSON null value. By default, fields with
434	// empty values are omitted from API requests. However, any field with
435	// an empty value appearing in NullFields will be sent to the server as
436	// null. It is an error if a field in this list has a non-empty value.
437	// This may be used to include null fields in Patch requests.
438	NullFields []string `json:"-"`
439}
440
441func (s *Auth) MarshalJSON() ([]byte, error) {
442	type NoMethod Auth
443	raw := NoMethod(*s)
444	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
445}
446
447// AuthenticationInfo: Authentication information for the operation.
448type AuthenticationInfo struct {
449	// AuthoritySelector: The authority selector specified by the requestor,
450	// if any. It is not guaranteed that the principal was allowed to use
451	// this authority.
452	AuthoritySelector string `json:"authoritySelector,omitempty"`
453
454	// PrincipalEmail: The email address of the authenticated user (or
455	// service account on behalf of third party principal) making the
456	// request. For third party identity callers, the `principal_subject`
457	// field is populated instead of this field. For privacy reasons, the
458	// principal email address is sometimes redacted. For more information,
459	// see Caller identities in audit logs
460	// (https://cloud.google.com/logging/docs/audit#user-id).
461	PrincipalEmail string `json:"principalEmail,omitempty"`
462
463	// PrincipalSubject: String representation of identity of requesting
464	// party. Populated for both first and third party identities.
465	PrincipalSubject string `json:"principalSubject,omitempty"`
466
467	// ServiceAccountDelegationInfo: Identity delegation history of an
468	// authenticated service account that makes the request. It contains
469	// information on the real authorities that try to access GCP resources
470	// by delegating on a service account. When multiple authorities
471	// present, they are guaranteed to be sorted based on the original
472	// ordering of the identity delegation events.
473	ServiceAccountDelegationInfo []*ServiceAccountDelegationInfo `json:"serviceAccountDelegationInfo,omitempty"`
474
475	// ServiceAccountKeyName: The name of the service account key used to
476	// create or exchange credentials for authenticating the service account
477	// making the request. This is a scheme-less URI full resource name. For
478	// example:
479	// "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/
480	// keys/{key}"
481	ServiceAccountKeyName string `json:"serviceAccountKeyName,omitempty"`
482
483	// ThirdPartyPrincipal: The third party identification (if any) of the
484	// authenticated user making the request. When the JSON object
485	// represented here has a proto equivalent, the proto name will be
486	// indicated in the `@type` property.
487	ThirdPartyPrincipal googleapi.RawMessage `json:"thirdPartyPrincipal,omitempty"`
488
489	// ForceSendFields is a list of field names (e.g. "AuthoritySelector")
490	// to unconditionally include in API requests. By default, fields with
491	// empty values are omitted from API requests. However, any non-pointer,
492	// non-interface field appearing in ForceSendFields will be sent to the
493	// server regardless of whether the field is empty or not. This may be
494	// used to include empty fields in Patch requests.
495	ForceSendFields []string `json:"-"`
496
497	// NullFields is a list of field names (e.g. "AuthoritySelector") to
498	// include in API requests with the JSON null value. By default, fields
499	// with empty values are omitted from API requests. However, any field
500	// with an empty value appearing in NullFields will be sent to the
501	// server as null. It is an error if a field in this list has a
502	// non-empty value. This may be used to include null fields in Patch
503	// requests.
504	NullFields []string `json:"-"`
505}
506
507func (s *AuthenticationInfo) MarshalJSON() ([]byte, error) {
508	type NoMethod AuthenticationInfo
509	raw := NoMethod(*s)
510	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
511}
512
513// AuthorizationInfo: Authorization information for the operation.
514type AuthorizationInfo struct {
515	// Granted: Whether or not authorization for `resource` and `permission`
516	// was granted.
517	Granted bool `json:"granted,omitempty"`
518
519	// Permission: The required IAM permission.
520	Permission string `json:"permission,omitempty"`
521
522	// Resource: The resource being accessed, as a REST-style or cloud
523	// resource string. For example:
524	// bigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID or
525	// projects/PROJECTID/datasets/DATASETID
526	Resource string `json:"resource,omitempty"`
527
528	// ResourceAttributes: Resource attributes used in IAM condition
529	// evaluation. This field contains resource attributes like resource
530	// type and resource name. To get the whole view of the attributes used
531	// in IAM condition evaluation, the user must also look into
532	// `AuditLog.request_metadata.request_attributes`.
533	ResourceAttributes *Resource `json:"resourceAttributes,omitempty"`
534
535	// ForceSendFields is a list of field names (e.g. "Granted") to
536	// unconditionally include in API requests. By default, fields with
537	// empty values are omitted from API requests. However, any non-pointer,
538	// non-interface field appearing in ForceSendFields will be sent to the
539	// server regardless of whether the field is empty or not. This may be
540	// used to include empty fields in Patch requests.
541	ForceSendFields []string `json:"-"`
542
543	// NullFields is a list of field names (e.g. "Granted") to include in
544	// API requests with the JSON null value. By default, fields with empty
545	// values are omitted from API requests. However, any field with an
546	// empty value appearing in NullFields will be sent to the server as
547	// null. It is an error if a field in this list has a non-empty value.
548	// This may be used to include null fields in Patch requests.
549	NullFields []string `json:"-"`
550}
551
552func (s *AuthorizationInfo) MarshalJSON() ([]byte, error) {
553	type NoMethod AuthorizationInfo
554	raw := NoMethod(*s)
555	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
556}
557
558// CheckRequest: Request message for the Check method.
559type CheckRequest struct {
560	// Attributes: Describes attributes about the operation being executed
561	// by the service.
562	Attributes *AttributeContext `json:"attributes,omitempty"`
563
564	// Flags: Optional. Contains a comma-separated list of flags.
565	Flags string `json:"flags,omitempty"`
566
567	// Resources: Describes the resources and the policies applied to each
568	// resource.
569	Resources []*ResourceInfo `json:"resources,omitempty"`
570
571	// ServiceConfigId: Specifies the version of the service configuration
572	// that should be used to process the request. Must not be empty. Set
573	// this field to 'latest' to specify using the latest configuration.
574	ServiceConfigId string `json:"serviceConfigId,omitempty"`
575
576	// ForceSendFields is a list of field names (e.g. "Attributes") to
577	// unconditionally include in API requests. By default, fields with
578	// empty values are omitted from API requests. However, any non-pointer,
579	// non-interface field appearing in ForceSendFields will be sent to the
580	// server regardless of whether the field is empty or not. This may be
581	// used to include empty fields in Patch requests.
582	ForceSendFields []string `json:"-"`
583
584	// NullFields is a list of field names (e.g. "Attributes") to include in
585	// API requests with the JSON null value. By default, fields with empty
586	// values are omitted from API requests. However, any field with an
587	// empty value appearing in NullFields will be sent to the server as
588	// null. It is an error if a field in this list has a non-empty value.
589	// This may be used to include null fields in Patch requests.
590	NullFields []string `json:"-"`
591}
592
593func (s *CheckRequest) MarshalJSON() ([]byte, error) {
594	type NoMethod CheckRequest
595	raw := NoMethod(*s)
596	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
597}
598
599// CheckResponse: Response message for the Check method.
600type CheckResponse struct {
601	// Headers: Returns a set of request contexts generated from the
602	// `CheckRequest`.
603	Headers map[string]string `json:"headers,omitempty"`
604
605	// Status: An 'OK' status allows the operation. Any other status
606	// indicates a denial; google.rpc.Status.details () would contain
607	// additional details about the denial.
608	Status *Status `json:"status,omitempty"`
609
610	// ServerResponse contains the HTTP response code and headers from the
611	// server.
612	googleapi.ServerResponse `json:"-"`
613
614	// ForceSendFields is a list of field names (e.g. "Headers") to
615	// unconditionally include in API requests. By default, fields with
616	// empty values are omitted from API requests. However, any non-pointer,
617	// non-interface field appearing in ForceSendFields will be sent to the
618	// server regardless of whether the field is empty or not. This may be
619	// used to include empty fields in Patch requests.
620	ForceSendFields []string `json:"-"`
621
622	// NullFields is a list of field names (e.g. "Headers") to include in
623	// API requests with the JSON null value. By default, fields with empty
624	// values are omitted from API requests. However, any field with an
625	// empty value appearing in NullFields will be sent to the server as
626	// null. It is an error if a field in this list has a non-empty value.
627	// This may be used to include null fields in Patch requests.
628	NullFields []string `json:"-"`
629}
630
631func (s *CheckResponse) MarshalJSON() ([]byte, error) {
632	type NoMethod CheckResponse
633	raw := NoMethod(*s)
634	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
635}
636
637// FirstPartyPrincipal: First party identity principal.
638type FirstPartyPrincipal struct {
639	// PrincipalEmail: The email address of a Google account. .
640	PrincipalEmail string `json:"principalEmail,omitempty"`
641
642	// ServiceMetadata: Metadata about the service that uses the service
643	// account. .
644	ServiceMetadata googleapi.RawMessage `json:"serviceMetadata,omitempty"`
645
646	// ForceSendFields is a list of field names (e.g. "PrincipalEmail") to
647	// unconditionally include in API requests. By default, fields with
648	// empty values are omitted from API requests. However, any non-pointer,
649	// non-interface field appearing in ForceSendFields will be sent to the
650	// server regardless of whether the field is empty or not. This may be
651	// used to include empty fields in Patch requests.
652	ForceSendFields []string `json:"-"`
653
654	// NullFields is a list of field names (e.g. "PrincipalEmail") to
655	// include in API requests with the JSON null value. By default, fields
656	// with empty values are omitted from API requests. However, any field
657	// with an empty value appearing in NullFields will be sent to the
658	// server as null. It is an error if a field in this list has a
659	// non-empty value. This may be used to include null fields in Patch
660	// requests.
661	NullFields []string `json:"-"`
662}
663
664func (s *FirstPartyPrincipal) MarshalJSON() ([]byte, error) {
665	type NoMethod FirstPartyPrincipal
666	raw := NoMethod(*s)
667	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
668}
669
670// Peer: This message defines attributes for a node that handles a
671// network request. The node can be either a service or an application
672// that sends, forwards, or receives the request. Service peers should
673// fill in `principal` and `labels` as appropriate.
674type Peer struct {
675	// Ip: The IP address of the peer.
676	Ip string `json:"ip,omitempty"`
677
678	// Labels: The labels associated with the peer.
679	Labels map[string]string `json:"labels,omitempty"`
680
681	// Port: The network port of the peer.
682	Port int64 `json:"port,omitempty,string"`
683
684	// Principal: The identity of this peer. Similar to
685	// `Request.auth.principal`, but relative to the peer instead of the
686	// request. For example, the idenity associated with a load balancer
687	// that forwared the request.
688	Principal string `json:"principal,omitempty"`
689
690	// RegionCode: The CLDR country/region code associated with the above IP
691	// address. If the IP address is private, the `region_code` should
692	// reflect the physical location where this peer is running.
693	RegionCode string `json:"regionCode,omitempty"`
694
695	// ForceSendFields is a list of field names (e.g. "Ip") to
696	// unconditionally include in API requests. By default, fields with
697	// empty values are omitted from API requests. However, any non-pointer,
698	// non-interface field appearing in ForceSendFields will be sent to the
699	// server regardless of whether the field is empty or not. This may be
700	// used to include empty fields in Patch requests.
701	ForceSendFields []string `json:"-"`
702
703	// NullFields is a list of field names (e.g. "Ip") to include in API
704	// requests with the JSON null value. By default, fields with empty
705	// values are omitted from API requests. However, any field with an
706	// empty value appearing in NullFields will be sent to the server as
707	// null. It is an error if a field in this list has a non-empty value.
708	// This may be used to include null fields in Patch requests.
709	NullFields []string `json:"-"`
710}
711
712func (s *Peer) MarshalJSON() ([]byte, error) {
713	type NoMethod Peer
714	raw := NoMethod(*s)
715	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
716}
717
718// ReportRequest: Request message for the Report method.
719type ReportRequest struct {
720	// Operations: Describes the list of operations to be reported. Each
721	// operation is represented as an AttributeContext, and contains all
722	// attributes around an API access.
723	Operations []*AttributeContext `json:"operations,omitempty"`
724
725	// ServiceConfigId: Specifies the version of the service configuration
726	// that should be used to process the request. Must not be empty. Set
727	// this field to 'latest' to specify using the latest configuration.
728	ServiceConfigId string `json:"serviceConfigId,omitempty"`
729
730	// ForceSendFields is a list of field names (e.g. "Operations") to
731	// unconditionally include in API requests. By default, fields with
732	// empty values are omitted from API requests. However, any non-pointer,
733	// non-interface field appearing in ForceSendFields will be sent to the
734	// server regardless of whether the field is empty or not. This may be
735	// used to include empty fields in Patch requests.
736	ForceSendFields []string `json:"-"`
737
738	// NullFields is a list of field names (e.g. "Operations") to include in
739	// API requests with the JSON null value. By default, fields with empty
740	// values are omitted from API requests. However, any field with an
741	// empty value appearing in NullFields will be sent to the server as
742	// null. It is an error if a field in this list has a non-empty value.
743	// This may be used to include null fields in Patch requests.
744	NullFields []string `json:"-"`
745}
746
747func (s *ReportRequest) MarshalJSON() ([]byte, error) {
748	type NoMethod ReportRequest
749	raw := NoMethod(*s)
750	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
751}
752
753// ReportResponse: Response message for the Report method. If the
754// request contains any invalid data, the server returns an RPC error.
755type ReportResponse struct {
756	// ServerResponse contains the HTTP response code and headers from the
757	// server.
758	googleapi.ServerResponse `json:"-"`
759}
760
761// Request: This message defines attributes for an HTTP request. If the
762// actual request is not an HTTP request, the runtime system should try
763// to map the actual request to an equivalent HTTP request.
764type Request struct {
765	// Auth: The request authentication. May be absent for unauthenticated
766	// requests. Derived from the HTTP request `Authorization` header or
767	// equivalent.
768	Auth *Auth `json:"auth,omitempty"`
769
770	// Headers: The HTTP request headers. If multiple headers share the same
771	// key, they must be merged according to the HTTP spec. All header keys
772	// must be lowercased, because HTTP header keys are case-insensitive.
773	Headers map[string]string `json:"headers,omitempty"`
774
775	// Host: The HTTP request `Host` header value.
776	Host string `json:"host,omitempty"`
777
778	// Id: The unique ID for a request, which can be propagated to
779	// downstream systems. The ID should have low probability of collision
780	// within a single day for a specific service.
781	Id string `json:"id,omitempty"`
782
783	// Method: The HTTP request method, such as `GET`, `POST`.
784	Method string `json:"method,omitempty"`
785
786	// Path: The HTTP URL path.
787	Path string `json:"path,omitempty"`
788
789	// Protocol: The network protocol used with the request, such as
790	// "http/1.1", "spdy/3", "h2", "h2c", "webrtc", "tcp", "udp", "quic".
791	// See
792	// https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
793	// for details.
794	Protocol string `json:"protocol,omitempty"`
795
796	// Query: The HTTP URL query in the format of
797	// `name1=value1&name2=value2`, as it appears in the first line of the
798	// HTTP request. No decoding is performed.
799	Query string `json:"query,omitempty"`
800
801	// Reason: A special parameter for request reason. It is used by
802	// security systems to associate auditing information with a request.
803	Reason string `json:"reason,omitempty"`
804
805	// Scheme: The HTTP URL scheme, such as `http` and `https`.
806	Scheme string `json:"scheme,omitempty"`
807
808	// Size: The HTTP request size in bytes. If unknown, it must be -1.
809	Size int64 `json:"size,omitempty,string"`
810
811	// Time: The timestamp when the `destination` service receives the last
812	// byte of the request.
813	Time string `json:"time,omitempty"`
814
815	// ForceSendFields is a list of field names (e.g. "Auth") to
816	// unconditionally include in API requests. By default, fields with
817	// empty values are omitted from API requests. However, any non-pointer,
818	// non-interface field appearing in ForceSendFields will be sent to the
819	// server regardless of whether the field is empty or not. This may be
820	// used to include empty fields in Patch requests.
821	ForceSendFields []string `json:"-"`
822
823	// NullFields is a list of field names (e.g. "Auth") to include in API
824	// requests with the JSON null value. By default, fields with empty
825	// values are omitted from API requests. However, any field with an
826	// empty value appearing in NullFields will be sent to the server as
827	// null. It is an error if a field in this list has a non-empty value.
828	// This may be used to include null fields in Patch requests.
829	NullFields []string `json:"-"`
830}
831
832func (s *Request) MarshalJSON() ([]byte, error) {
833	type NoMethod Request
834	raw := NoMethod(*s)
835	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
836}
837
838// RequestMetadata: Metadata about the request.
839type RequestMetadata struct {
840	// CallerIp: The IP address of the caller. For caller from internet,
841	// this will be public IPv4 or IPv6 address. For caller from a Compute
842	// Engine VM with external IP address, this will be the VM's external IP
843	// address. For caller from a Compute Engine VM without external IP
844	// address, if the VM is in the same organization (or project) as the
845	// accessed resource, `caller_ip` will be the VM's internal IPv4
846	// address, otherwise the `caller_ip` will be redacted to
847	// "gce-internal-ip". See https://cloud.google.com/compute/docs/vpc/ for
848	// more information.
849	CallerIp string `json:"callerIp,omitempty"`
850
851	// CallerNetwork: The network of the caller. Set only if the network
852	// host project is part of the same GCP organization (or project) as the
853	// accessed resource. See https://cloud.google.com/compute/docs/vpc/ for
854	// more information. This is a scheme-less URI full resource name. For
855	// example:
856	// "//compute.googleapis.com/projects/PROJECT_ID/global/networks/NETWORK_
857	// ID"
858	CallerNetwork string `json:"callerNetwork,omitempty"`
859
860	// CallerSuppliedUserAgent: The user agent of the caller. This
861	// information is not authenticated and should be treated accordingly.
862	// For example: + `google-api-python-client/1.4.0`: The request was made
863	// by the Google API client for Python. + `Cloud SDK Command Line Tool
864	// apitools-client/1.0 gcloud/0.9.62`: The request was made by the
865	// Google Cloud SDK CLI (gcloud). + `AppEngine-Google;
866	// (+http://code.google.com/appengine; appid: s~my-project`: The request
867	// was made from the `my-project` App Engine app. NOLINT
868	CallerSuppliedUserAgent string `json:"callerSuppliedUserAgent,omitempty"`
869
870	// DestinationAttributes: The destination of a network activity, such as
871	// accepting a TCP connection. In a multi hop network activity, the
872	// destination represents the receiver of the last hop. Only two fields
873	// are used in this message, Peer.port and Peer.ip. These fields are
874	// optionally populated by those services utilizing the IAM condition
875	// feature.
876	DestinationAttributes *Peer `json:"destinationAttributes,omitempty"`
877
878	// RequestAttributes: Request attributes used in IAM condition
879	// evaluation. This field contains request attributes like request time
880	// and access levels associated with the request. To get the whole view
881	// of the attributes used in IAM condition evaluation, the user must
882	// also look into `AuditLog.authentication_info.resource_attributes`.
883	RequestAttributes *Request `json:"requestAttributes,omitempty"`
884
885	// ForceSendFields is a list of field names (e.g. "CallerIp") to
886	// unconditionally include in API requests. By default, fields with
887	// empty values are omitted from API requests. However, any non-pointer,
888	// non-interface field appearing in ForceSendFields will be sent to the
889	// server regardless of whether the field is empty or not. This may be
890	// used to include empty fields in Patch requests.
891	ForceSendFields []string `json:"-"`
892
893	// NullFields is a list of field names (e.g. "CallerIp") to include in
894	// API requests with the JSON null value. By default, fields with empty
895	// values are omitted from API requests. However, any field with an
896	// empty value appearing in NullFields will be sent to the server as
897	// null. It is an error if a field in this list has a non-empty value.
898	// This may be used to include null fields in Patch requests.
899	NullFields []string `json:"-"`
900}
901
902func (s *RequestMetadata) MarshalJSON() ([]byte, error) {
903	type NoMethod RequestMetadata
904	raw := NoMethod(*s)
905	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
906}
907
908// Resource: This message defines core attributes for a resource. A
909// resource is an addressable (named) entity provided by the destination
910// service. For example, a file stored on a network storage service.
911type Resource struct {
912	// Annotations: Annotations is an unstructured key-value map stored with
913	// a resource that may be set by external tools to store and retrieve
914	// arbitrary metadata. They are not queryable and should be preserved
915	// when modifying objects. More info:
916	// https://kubernetes.io/docs/user-guide/annotations
917	Annotations map[string]string `json:"annotations,omitempty"`
918
919	// CreateTime: Output only. The timestamp when the resource was created.
920	// This may be either the time creation was initiated or when it was
921	// completed.
922	CreateTime string `json:"createTime,omitempty"`
923
924	// DeleteTime: Output only. The timestamp when the resource was deleted.
925	// If the resource is not deleted, this must be empty.
926	DeleteTime string `json:"deleteTime,omitempty"`
927
928	// DisplayName: Mutable. The display name set by clients. Must be <= 63
929	// characters.
930	DisplayName string `json:"displayName,omitempty"`
931
932	// Etag: Output only. An opaque value that uniquely identifies a version
933	// or generation of a resource. It can be used to confirm that the
934	// client and server agree on the ordering of a resource being written.
935	Etag string `json:"etag,omitempty"`
936
937	// Labels: The labels or tags on the resource, such as AWS resource tags
938	// and Kubernetes resource labels.
939	Labels map[string]string `json:"labels,omitempty"`
940
941	// Location: Immutable. The location of the resource. The location
942	// encoding is specific to the service provider, and new encoding may be
943	// introduced as the service evolves. For Google Cloud products, the
944	// encoding is what is used by Google Cloud APIs, such as `us-east1`,
945	// `aws-us-east-1`, and `azure-eastus2`. The semantics of `location` is
946	// identical to the `cloud.googleapis.com/location` label used by some
947	// Google Cloud APIs.
948	Location string `json:"location,omitempty"`
949
950	// Name: The stable identifier (name) of a resource on the `service`. A
951	// resource can be logically identified as
952	// "//{resource.service}/{resource.name}". The differences between a
953	// resource name and a URI are: * Resource name is a logical identifier,
954	// independent of network protocol and API version. For example,
955	// `//pubsub.googleapis.com/projects/123/topics/news-feed`. * URI often
956	// includes protocol and version information, so it can be used directly
957	// by applications. For example,
958	// `https://pubsub.googleapis.com/v1/projects/123/topics/news-feed`. See
959	// https://cloud.google.com/apis/design/resource_names for details.
960	Name string `json:"name,omitempty"`
961
962	// Service: The name of the service that this resource belongs to, such
963	// as `pubsub.googleapis.com`. The service may be different from the DNS
964	// hostname that actually serves the request.
965	Service string `json:"service,omitempty"`
966
967	// Type: The type of the resource. The syntax is platform-specific
968	// because different platforms define their resources differently. For
969	// Google APIs, the type format must be "{service}/{kind}".
970	Type string `json:"type,omitempty"`
971
972	// Uid: The unique identifier of the resource. UID is unique in the time
973	// and space for this resource within the scope of the service. It is
974	// typically generated by the server on successful creation of a
975	// resource and must not be changed. UID is used to uniquely identify
976	// resources with resource name reuses. This should be a UUID4.
977	Uid string `json:"uid,omitempty"`
978
979	// UpdateTime: Output only. The timestamp when the resource was last
980	// updated. Any change to the resource made by users must refresh this
981	// value. Changes to a resource made by the service should refresh this
982	// value.
983	UpdateTime string `json:"updateTime,omitempty"`
984
985	// ForceSendFields is a list of field names (e.g. "Annotations") to
986	// unconditionally include in API requests. By default, fields with
987	// empty values are omitted from API requests. However, any non-pointer,
988	// non-interface field appearing in ForceSendFields will be sent to the
989	// server regardless of whether the field is empty or not. This may be
990	// used to include empty fields in Patch requests.
991	ForceSendFields []string `json:"-"`
992
993	// NullFields is a list of field names (e.g. "Annotations") to include
994	// in API requests with the JSON null value. By default, fields with
995	// empty values are omitted from API requests. However, any field with
996	// an empty value appearing in NullFields will be sent to the server as
997	// null. It is an error if a field in this list has a non-empty value.
998	// This may be used to include null fields in Patch requests.
999	NullFields []string `json:"-"`
1000}
1001
1002func (s *Resource) MarshalJSON() ([]byte, error) {
1003	type NoMethod Resource
1004	raw := NoMethod(*s)
1005	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1006}
1007
1008// ResourceInfo: Describes a resource referenced in the request.
1009type ResourceInfo struct {
1010	// Name: The name of the resource referenced in the request.
1011	Name string `json:"name,omitempty"`
1012
1013	// Permission: The resource permission needed for this request. The
1014	// format must be "{service}/{plural}.{verb}".
1015	Permission string `json:"permission,omitempty"`
1016
1017	// Type: The resource type in the format of "{service}/{kind}".
1018	Type string `json:"type,omitempty"`
1019
1020	// ForceSendFields is a list of field names (e.g. "Name") to
1021	// unconditionally include in API requests. By default, fields with
1022	// empty values are omitted from API requests. However, any non-pointer,
1023	// non-interface field appearing in ForceSendFields will be sent to the
1024	// server regardless of whether the field is empty or not. This may be
1025	// used to include empty fields in Patch requests.
1026	ForceSendFields []string `json:"-"`
1027
1028	// NullFields is a list of field names (e.g. "Name") to include in API
1029	// requests with the JSON null value. By default, fields with empty
1030	// values are omitted from API requests. However, any field with an
1031	// empty value appearing in NullFields will be sent to the server as
1032	// null. It is an error if a field in this list has a non-empty value.
1033	// This may be used to include null fields in Patch requests.
1034	NullFields []string `json:"-"`
1035}
1036
1037func (s *ResourceInfo) MarshalJSON() ([]byte, error) {
1038	type NoMethod ResourceInfo
1039	raw := NoMethod(*s)
1040	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1041}
1042
1043// ResourceLocation: Location information about a resource.
1044type ResourceLocation struct {
1045	// CurrentLocations: The locations of a resource after the execution of
1046	// the operation. Requests to create or delete a location based resource
1047	// must populate the 'current_locations' field and not the
1048	// 'original_locations' field. For example: "europe-west1-a" "us-east1"
1049	// "nam3"
1050	CurrentLocations []string `json:"currentLocations,omitempty"`
1051
1052	// OriginalLocations: The locations of a resource prior to the execution
1053	// of the operation. Requests that mutate the resource's location must
1054	// populate both the 'original_locations' as well as the
1055	// 'current_locations' fields. For example: "europe-west1-a" "us-east1"
1056	// "nam3"
1057	OriginalLocations []string `json:"originalLocations,omitempty"`
1058
1059	// ForceSendFields is a list of field names (e.g. "CurrentLocations") to
1060	// unconditionally include in API requests. By default, fields with
1061	// empty values are omitted from API requests. However, any non-pointer,
1062	// non-interface field appearing in ForceSendFields will be sent to the
1063	// server regardless of whether the field is empty or not. This may be
1064	// used to include empty fields in Patch requests.
1065	ForceSendFields []string `json:"-"`
1066
1067	// NullFields is a list of field names (e.g. "CurrentLocations") to
1068	// include in API requests with the JSON null value. By default, fields
1069	// with empty values are omitted from API requests. However, any field
1070	// with an empty value appearing in NullFields will be sent to the
1071	// server as null. It is an error if a field in this list has a
1072	// non-empty value. This may be used to include null fields in Patch
1073	// requests.
1074	NullFields []string `json:"-"`
1075}
1076
1077func (s *ResourceLocation) MarshalJSON() ([]byte, error) {
1078	type NoMethod ResourceLocation
1079	raw := NoMethod(*s)
1080	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1081}
1082
1083// Response: This message defines attributes for a typical network
1084// response. It generally models semantics of an HTTP response.
1085type Response struct {
1086	// BackendLatency: The length of time it takes the backend service to
1087	// fully respond to a request. Measured from when the destination
1088	// service starts to send the request to the backend until when the
1089	// destination service receives the complete response from the backend.
1090	BackendLatency string `json:"backendLatency,omitempty"`
1091
1092	// Code: The HTTP response status code, such as `200` and `404`.
1093	Code int64 `json:"code,omitempty,string"`
1094
1095	// Headers: The HTTP response headers. If multiple headers share the
1096	// same key, they must be merged according to HTTP spec. All header keys
1097	// must be lowercased, because HTTP header keys are case-insensitive.
1098	Headers map[string]string `json:"headers,omitempty"`
1099
1100	// Size: The HTTP response size in bytes. If unknown, it must be -1.
1101	Size int64 `json:"size,omitempty,string"`
1102
1103	// Time: The timestamp when the `destination` service sends the last
1104	// byte of the response.
1105	Time string `json:"time,omitempty"`
1106
1107	// ForceSendFields is a list of field names (e.g. "BackendLatency") to
1108	// unconditionally include in API requests. By default, fields with
1109	// empty values are omitted from API requests. However, any non-pointer,
1110	// non-interface field appearing in ForceSendFields will be sent to the
1111	// server regardless of whether the field is empty or not. This may be
1112	// used to include empty fields in Patch requests.
1113	ForceSendFields []string `json:"-"`
1114
1115	// NullFields is a list of field names (e.g. "BackendLatency") to
1116	// include in API requests with the JSON null value. By default, fields
1117	// with empty values are omitted from API requests. However, any field
1118	// with an empty value appearing in NullFields will be sent to the
1119	// server as null. It is an error if a field in this list has a
1120	// non-empty value. This may be used to include null fields in Patch
1121	// requests.
1122	NullFields []string `json:"-"`
1123}
1124
1125func (s *Response) MarshalJSON() ([]byte, error) {
1126	type NoMethod Response
1127	raw := NoMethod(*s)
1128	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1129}
1130
1131// ServiceAccountDelegationInfo: Identity delegation history of an
1132// authenticated service account.
1133type ServiceAccountDelegationInfo struct {
1134	// FirstPartyPrincipal: First party (Google) identity as the real
1135	// authority.
1136	FirstPartyPrincipal *FirstPartyPrincipal `json:"firstPartyPrincipal,omitempty"`
1137
1138	// PrincipalSubject: A string representing the principal_subject
1139	// associated with the identity. See go/3pical for more info on how
1140	// principal_subject is formatted.
1141	PrincipalSubject string `json:"principalSubject,omitempty"`
1142
1143	// ThirdPartyPrincipal: Third party identity as the real authority.
1144	ThirdPartyPrincipal *ThirdPartyPrincipal `json:"thirdPartyPrincipal,omitempty"`
1145
1146	// ForceSendFields is a list of field names (e.g. "FirstPartyPrincipal")
1147	// to unconditionally include in API requests. By default, fields with
1148	// empty values are omitted from API requests. However, any non-pointer,
1149	// non-interface field appearing in ForceSendFields will be sent to the
1150	// server regardless of whether the field is empty or not. This may be
1151	// used to include empty fields in Patch requests.
1152	ForceSendFields []string `json:"-"`
1153
1154	// NullFields is a list of field names (e.g. "FirstPartyPrincipal") to
1155	// include in API requests with the JSON null value. By default, fields
1156	// with empty values are omitted from API requests. However, any field
1157	// with an empty value appearing in NullFields will be sent to the
1158	// server as null. It is an error if a field in this list has a
1159	// non-empty value. This may be used to include null fields in Patch
1160	// requests.
1161	NullFields []string `json:"-"`
1162}
1163
1164func (s *ServiceAccountDelegationInfo) MarshalJSON() ([]byte, error) {
1165	type NoMethod ServiceAccountDelegationInfo
1166	raw := NoMethod(*s)
1167	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1168}
1169
1170// SpanContext: The context of a span, attached to Exemplars in
1171// Distribution values during aggregation. It contains the name of a
1172// span with format:
1173// projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID]
1174type SpanContext struct {
1175	// SpanName: The resource name of the span. The format is:
1176	// projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID]
1177	// `[TRACE_ID]` is a unique identifier for a trace within a project; it
1178	// is a 32-character hexadecimal encoding of a 16-byte array.
1179	// `[SPAN_ID]` is a unique identifier for a span within a trace; it is a
1180	// 16-character hexadecimal encoding of an 8-byte array.
1181	SpanName string `json:"spanName,omitempty"`
1182
1183	// ForceSendFields is a list of field names (e.g. "SpanName") to
1184	// unconditionally include in API requests. By default, fields with
1185	// empty values are omitted from API requests. However, any non-pointer,
1186	// non-interface field appearing in ForceSendFields will be sent to the
1187	// server regardless of whether the field is empty or not. This may be
1188	// used to include empty fields in Patch requests.
1189	ForceSendFields []string `json:"-"`
1190
1191	// NullFields is a list of field names (e.g. "SpanName") to include in
1192	// API requests with the JSON null value. By default, fields with empty
1193	// values are omitted from API requests. However, any field with an
1194	// empty value appearing in NullFields will be sent to the server as
1195	// null. It is an error if a field in this list has a non-empty value.
1196	// This may be used to include null fields in Patch requests.
1197	NullFields []string `json:"-"`
1198}
1199
1200func (s *SpanContext) MarshalJSON() ([]byte, error) {
1201	type NoMethod SpanContext
1202	raw := NoMethod(*s)
1203	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1204}
1205
1206// Status: The `Status` type defines a logical error model that is
1207// suitable for different programming environments, including REST APIs
1208// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each
1209// `Status` message contains three pieces of data: error code, error
1210// message, and error details. You can find out more about this error
1211// model and how to work with it in the API Design Guide
1212// (https://cloud.google.com/apis/design/errors).
1213type Status struct {
1214	// Code: The status code, which should be an enum value of
1215	// google.rpc.Code.
1216	Code int64 `json:"code,omitempty"`
1217
1218	// Details: A list of messages that carry the error details. There is a
1219	// common set of message types for APIs to use.
1220	Details []googleapi.RawMessage `json:"details,omitempty"`
1221
1222	// Message: A developer-facing error message, which should be in
1223	// English. Any user-facing error message should be localized and sent
1224	// in the google.rpc.Status.details field, or localized by the client.
1225	Message string `json:"message,omitempty"`
1226
1227	// ForceSendFields is a list of field names (e.g. "Code") to
1228	// unconditionally include in API requests. By default, fields with
1229	// empty values are omitted from API requests. However, any non-pointer,
1230	// non-interface field appearing in ForceSendFields will be sent to the
1231	// server regardless of whether the field is empty or not. This may be
1232	// used to include empty fields in Patch requests.
1233	ForceSendFields []string `json:"-"`
1234
1235	// NullFields is a list of field names (e.g. "Code") to include in API
1236	// requests with the JSON null value. By default, fields with empty
1237	// values are omitted from API requests. However, any field with an
1238	// empty value appearing in NullFields will be sent to the server as
1239	// null. It is an error if a field in this list has a non-empty value.
1240	// This may be used to include null fields in Patch requests.
1241	NullFields []string `json:"-"`
1242}
1243
1244func (s *Status) MarshalJSON() ([]byte, error) {
1245	type NoMethod Status
1246	raw := NoMethod(*s)
1247	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1248}
1249
1250// ThirdPartyPrincipal: Third party identity principal.
1251type ThirdPartyPrincipal struct {
1252	// ThirdPartyClaims: Metadata about third party identity.
1253	ThirdPartyClaims googleapi.RawMessage `json:"thirdPartyClaims,omitempty"`
1254
1255	// ForceSendFields is a list of field names (e.g. "ThirdPartyClaims") to
1256	// unconditionally include in API requests. By default, fields with
1257	// empty values are omitted from API requests. However, any non-pointer,
1258	// non-interface field appearing in ForceSendFields will be sent to the
1259	// server regardless of whether the field is empty or not. This may be
1260	// used to include empty fields in Patch requests.
1261	ForceSendFields []string `json:"-"`
1262
1263	// NullFields is a list of field names (e.g. "ThirdPartyClaims") to
1264	// include in API requests with the JSON null value. By default, fields
1265	// with empty values are omitted from API requests. However, any field
1266	// with an empty value appearing in NullFields will be sent to the
1267	// server as null. It is an error if a field in this list has a
1268	// non-empty value. This may be used to include null fields in Patch
1269	// requests.
1270	NullFields []string `json:"-"`
1271}
1272
1273func (s *ThirdPartyPrincipal) MarshalJSON() ([]byte, error) {
1274	type NoMethod ThirdPartyPrincipal
1275	raw := NoMethod(*s)
1276	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1277}
1278
1279// method id "servicecontrol.services.check":
1280
1281type ServicesCheckCall struct {
1282	s            *Service
1283	serviceName  string
1284	checkrequest *CheckRequest
1285	urlParams_   gensupport.URLParams
1286	ctx_         context.Context
1287	header_      http.Header
1288}
1289
1290// Check: Private Preview. This feature is only available for approved
1291// services. This method provides admission control for services that
1292// are integrated with Service Infrastructure (/service-infrastructure).
1293// It checks whether an operation should be allowed based on the service
1294// configuration and relevant policies. It must be called before the
1295// operation is executed. For more information, see Admission Control
1296// (/service-infrastructure/docs/admission-control). NOTE: The admission
1297// control has an expected policy propagation delay of 60s. The caller
1298// **must** not depend on the most recent policy changes. NOTE: The
1299// admission control has a hard limit of 1 referenced resources per
1300// call. If an operation refers to more than 1 resources, the caller
1301// must call the Check method multiple times. This method requires the
1302// `servicemanagement.services.check` permission on the specified
1303// service. For more information, see Service Control API Access Control
1304// (https://cloud.google.com/service-infrastructure/docs/service-control/access-control).
1305func (r *ServicesService) Check(serviceName string, checkrequest *CheckRequest) *ServicesCheckCall {
1306	c := &ServicesCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1307	c.serviceName = serviceName
1308	c.checkrequest = checkrequest
1309	return c
1310}
1311
1312// Fields allows partial responses to be retrieved. See
1313// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1314// for more information.
1315func (c *ServicesCheckCall) Fields(s ...googleapi.Field) *ServicesCheckCall {
1316	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1317	return c
1318}
1319
1320// Context sets the context to be used in this call's Do method. Any
1321// pending HTTP request will be aborted if the provided context is
1322// canceled.
1323func (c *ServicesCheckCall) Context(ctx context.Context) *ServicesCheckCall {
1324	c.ctx_ = ctx
1325	return c
1326}
1327
1328// Header returns an http.Header that can be modified by the caller to
1329// add HTTP headers to the request.
1330func (c *ServicesCheckCall) Header() http.Header {
1331	if c.header_ == nil {
1332		c.header_ = make(http.Header)
1333	}
1334	return c.header_
1335}
1336
1337func (c *ServicesCheckCall) doRequest(alt string) (*http.Response, error) {
1338	reqHeaders := make(http.Header)
1339	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
1340	for k, v := range c.header_ {
1341		reqHeaders[k] = v
1342	}
1343	reqHeaders.Set("User-Agent", c.s.userAgent())
1344	var body io.Reader = nil
1345	body, err := googleapi.WithoutDataWrapper.JSONReader(c.checkrequest)
1346	if err != nil {
1347		return nil, err
1348	}
1349	reqHeaders.Set("Content-Type", "application/json")
1350	c.urlParams_.Set("alt", alt)
1351	c.urlParams_.Set("prettyPrint", "false")
1352	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/services/{serviceName}:check")
1353	urls += "?" + c.urlParams_.Encode()
1354	req, err := http.NewRequest("POST", urls, body)
1355	if err != nil {
1356		return nil, err
1357	}
1358	req.Header = reqHeaders
1359	googleapi.Expand(req.URL, map[string]string{
1360		"serviceName": c.serviceName,
1361	})
1362	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1363}
1364
1365// Do executes the "servicecontrol.services.check" call.
1366// Exactly one of *CheckResponse or error will be non-nil. Any non-2xx
1367// status code is an error. Response headers are in either
1368// *CheckResponse.ServerResponse.Header or (if a response was returned
1369// at all) in error.(*googleapi.Error).Header. Use
1370// googleapi.IsNotModified to check whether the returned error was
1371// because http.StatusNotModified was returned.
1372func (c *ServicesCheckCall) Do(opts ...googleapi.CallOption) (*CheckResponse, error) {
1373	gensupport.SetOptions(c.urlParams_, opts...)
1374	res, err := c.doRequest("json")
1375	if res != nil && res.StatusCode == http.StatusNotModified {
1376		if res.Body != nil {
1377			res.Body.Close()
1378		}
1379		return nil, &googleapi.Error{
1380			Code:   res.StatusCode,
1381			Header: res.Header,
1382		}
1383	}
1384	if err != nil {
1385		return nil, err
1386	}
1387	defer googleapi.CloseBody(res)
1388	if err := googleapi.CheckResponse(res); err != nil {
1389		return nil, err
1390	}
1391	ret := &CheckResponse{
1392		ServerResponse: googleapi.ServerResponse{
1393			Header:         res.Header,
1394			HTTPStatusCode: res.StatusCode,
1395		},
1396	}
1397	target := &ret
1398	if err := gensupport.DecodeResponse(target, res); err != nil {
1399		return nil, err
1400	}
1401	return ret, nil
1402	// {
1403	//   "description": "Private Preview. This feature is only available for approved services. This method provides admission control for services that are integrated with [Service Infrastructure](/service-infrastructure). It checks whether an operation should be allowed based on the service configuration and relevant policies. It must be called before the operation is executed. For more information, see [Admission Control](/service-infrastructure/docs/admission-control). NOTE: The admission control has an expected policy propagation delay of 60s. The caller **must** not depend on the most recent policy changes. NOTE: The admission control has a hard limit of 1 referenced resources per call. If an operation refers to more than 1 resources, the caller must call the Check method multiple times. This method requires the `servicemanagement.services.check` permission on the specified service. For more information, see [Service Control API Access Control](https://cloud.google.com/service-infrastructure/docs/service-control/access-control).",
1404	//   "flatPath": "v2/services/{serviceName}:check",
1405	//   "httpMethod": "POST",
1406	//   "id": "servicecontrol.services.check",
1407	//   "parameterOrder": [
1408	//     "serviceName"
1409	//   ],
1410	//   "parameters": {
1411	//     "serviceName": {
1412	//       "description": "The service name as specified in its service configuration. For example, `\"pubsub.googleapis.com\"`. See [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) for the definition of a service name.",
1413	//       "location": "path",
1414	//       "required": true,
1415	//       "type": "string"
1416	//     }
1417	//   },
1418	//   "path": "v2/services/{serviceName}:check",
1419	//   "request": {
1420	//     "$ref": "CheckRequest"
1421	//   },
1422	//   "response": {
1423	//     "$ref": "CheckResponse"
1424	//   },
1425	//   "scopes": [
1426	//     "https://www.googleapis.com/auth/cloud-platform",
1427	//     "https://www.googleapis.com/auth/servicecontrol"
1428	//   ]
1429	// }
1430
1431}
1432
1433// method id "servicecontrol.services.report":
1434
1435type ServicesReportCall struct {
1436	s             *Service
1437	serviceName   string
1438	reportrequest *ReportRequest
1439	urlParams_    gensupport.URLParams
1440	ctx_          context.Context
1441	header_       http.Header
1442}
1443
1444// Report: Private Preview. This feature is only available for approved
1445// services. This method provides telemetry reporting for services that
1446// are integrated with Service Infrastructure (/service-infrastructure).
1447// It reports a list of operations that have occurred on a service. It
1448// must be called after the operations have been executed. For more
1449// information, see Telemetry Reporting
1450// (/service-infrastructure/docs/telemetry-reporting). NOTE: The
1451// telemetry reporting has a hard limit of 1000 operations and 1MB per
1452// Report call. It is recommended to have no more than 100 operations
1453// per call. This method requires the
1454// `servicemanagement.services.report` permission on the specified
1455// service. For more information, see Service Control API Access Control
1456// (https://cloud.google.com/service-infrastructure/docs/service-control/access-control).
1457func (r *ServicesService) Report(serviceName string, reportrequest *ReportRequest) *ServicesReportCall {
1458	c := &ServicesReportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1459	c.serviceName = serviceName
1460	c.reportrequest = reportrequest
1461	return c
1462}
1463
1464// Fields allows partial responses to be retrieved. See
1465// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1466// for more information.
1467func (c *ServicesReportCall) Fields(s ...googleapi.Field) *ServicesReportCall {
1468	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1469	return c
1470}
1471
1472// Context sets the context to be used in this call's Do method. Any
1473// pending HTTP request will be aborted if the provided context is
1474// canceled.
1475func (c *ServicesReportCall) Context(ctx context.Context) *ServicesReportCall {
1476	c.ctx_ = ctx
1477	return c
1478}
1479
1480// Header returns an http.Header that can be modified by the caller to
1481// add HTTP headers to the request.
1482func (c *ServicesReportCall) Header() http.Header {
1483	if c.header_ == nil {
1484		c.header_ = make(http.Header)
1485	}
1486	return c.header_
1487}
1488
1489func (c *ServicesReportCall) doRequest(alt string) (*http.Response, error) {
1490	reqHeaders := make(http.Header)
1491	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
1492	for k, v := range c.header_ {
1493		reqHeaders[k] = v
1494	}
1495	reqHeaders.Set("User-Agent", c.s.userAgent())
1496	var body io.Reader = nil
1497	body, err := googleapi.WithoutDataWrapper.JSONReader(c.reportrequest)
1498	if err != nil {
1499		return nil, err
1500	}
1501	reqHeaders.Set("Content-Type", "application/json")
1502	c.urlParams_.Set("alt", alt)
1503	c.urlParams_.Set("prettyPrint", "false")
1504	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/services/{serviceName}:report")
1505	urls += "?" + c.urlParams_.Encode()
1506	req, err := http.NewRequest("POST", urls, body)
1507	if err != nil {
1508		return nil, err
1509	}
1510	req.Header = reqHeaders
1511	googleapi.Expand(req.URL, map[string]string{
1512		"serviceName": c.serviceName,
1513	})
1514	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1515}
1516
1517// Do executes the "servicecontrol.services.report" call.
1518// Exactly one of *ReportResponse or error will be non-nil. Any non-2xx
1519// status code is an error. Response headers are in either
1520// *ReportResponse.ServerResponse.Header or (if a response was returned
1521// at all) in error.(*googleapi.Error).Header. Use
1522// googleapi.IsNotModified to check whether the returned error was
1523// because http.StatusNotModified was returned.
1524func (c *ServicesReportCall) Do(opts ...googleapi.CallOption) (*ReportResponse, error) {
1525	gensupport.SetOptions(c.urlParams_, opts...)
1526	res, err := c.doRequest("json")
1527	if res != nil && res.StatusCode == http.StatusNotModified {
1528		if res.Body != nil {
1529			res.Body.Close()
1530		}
1531		return nil, &googleapi.Error{
1532			Code:   res.StatusCode,
1533			Header: res.Header,
1534		}
1535	}
1536	if err != nil {
1537		return nil, err
1538	}
1539	defer googleapi.CloseBody(res)
1540	if err := googleapi.CheckResponse(res); err != nil {
1541		return nil, err
1542	}
1543	ret := &ReportResponse{
1544		ServerResponse: googleapi.ServerResponse{
1545			Header:         res.Header,
1546			HTTPStatusCode: res.StatusCode,
1547		},
1548	}
1549	target := &ret
1550	if err := gensupport.DecodeResponse(target, res); err != nil {
1551		return nil, err
1552	}
1553	return ret, nil
1554	// {
1555	//   "description": "Private Preview. This feature is only available for approved services. This method provides telemetry reporting for services that are integrated with [Service Infrastructure](/service-infrastructure). It reports a list of operations that have occurred on a service. It must be called after the operations have been executed. For more information, see [Telemetry Reporting](/service-infrastructure/docs/telemetry-reporting). NOTE: The telemetry reporting has a hard limit of 1000 operations and 1MB per Report call. It is recommended to have no more than 100 operations per call. This method requires the `servicemanagement.services.report` permission on the specified service. For more information, see [Service Control API Access Control](https://cloud.google.com/service-infrastructure/docs/service-control/access-control).",
1556	//   "flatPath": "v2/services/{serviceName}:report",
1557	//   "httpMethod": "POST",
1558	//   "id": "servicecontrol.services.report",
1559	//   "parameterOrder": [
1560	//     "serviceName"
1561	//   ],
1562	//   "parameters": {
1563	//     "serviceName": {
1564	//       "description": "The service name as specified in its service configuration. For example, `\"pubsub.googleapis.com\"`. See [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) for the definition of a service name.",
1565	//       "location": "path",
1566	//       "required": true,
1567	//       "type": "string"
1568	//     }
1569	//   },
1570	//   "path": "v2/services/{serviceName}:report",
1571	//   "request": {
1572	//     "$ref": "ReportRequest"
1573	//   },
1574	//   "response": {
1575	//     "$ref": "ReportResponse"
1576	//   },
1577	//   "scopes": [
1578	//     "https://www.googleapis.com/auth/cloud-platform",
1579	//     "https://www.googleapis.com/auth/servicecontrol"
1580	//   ]
1581	// }
1582
1583}
1584