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/v1"
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/v1"
43
44import (
45	"bytes"
46	"context"
47	"encoding/json"
48	"errors"
49	"fmt"
50	"io"
51	"net/http"
52	"net/url"
53	"strconv"
54	"strings"
55
56	googleapi "google.golang.org/api/googleapi"
57	gensupport "google.golang.org/api/internal/gensupport"
58	option "google.golang.org/api/option"
59	internaloption "google.golang.org/api/option/internaloption"
60	htransport "google.golang.org/api/transport/http"
61)
62
63// Always reference these packages, just in case the auto-generated code
64// below doesn't.
65var _ = bytes.NewBuffer
66var _ = strconv.Itoa
67var _ = fmt.Sprintf
68var _ = json.NewDecoder
69var _ = io.Copy
70var _ = url.Parse
71var _ = gensupport.MarshalJSON
72var _ = googleapi.Version
73var _ = errors.New
74var _ = strings.Replace
75var _ = context.Canceled
76var _ = internaloption.WithDefaultEndpoint
77
78const apiId = "servicecontrol:v1"
79const apiName = "servicecontrol"
80const apiVersion = "v1"
81const basePath = "https://servicecontrol.googleapis.com/"
82const mtlsBasePath = "https://servicecontrol.mtls.googleapis.com/"
83
84// OAuth2 scopes used by this API.
85const (
86	// See, edit, configure, and delete your Google Cloud Platform data
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
155type AllocateInfo struct {
156	// UnusedArguments: A list of label keys that were unused by the server
157	// in processing the request. Thus, for similar requests repeated in a
158	// certain future time window, the caller can choose to ignore these
159	// labels in the requests to achieve better client-side cache hits and
160	// quota aggregation for rate quota. This field is not populated for
161	// allocation quota checks.
162	UnusedArguments []string `json:"unusedArguments,omitempty"`
163
164	// ForceSendFields is a list of field names (e.g. "UnusedArguments") to
165	// unconditionally include in API requests. By default, fields with
166	// empty values are omitted from API requests. However, any non-pointer,
167	// non-interface field appearing in ForceSendFields will be sent to the
168	// server regardless of whether the field is empty or not. This may be
169	// used to include empty fields in Patch requests.
170	ForceSendFields []string `json:"-"`
171
172	// NullFields is a list of field names (e.g. "UnusedArguments") to
173	// include in API requests with the JSON null value. By default, fields
174	// with empty values are omitted from API requests. However, any field
175	// with an empty value appearing in NullFields will be sent to the
176	// server as null. It is an error if a field in this list has a
177	// non-empty value. This may be used to include null fields in Patch
178	// requests.
179	NullFields []string `json:"-"`
180}
181
182func (s *AllocateInfo) MarshalJSON() ([]byte, error) {
183	type NoMethod AllocateInfo
184	raw := NoMethod(*s)
185	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
186}
187
188// AllocateQuotaRequest: Request message for the AllocateQuota method.
189type AllocateQuotaRequest struct {
190	// AllocateOperation: Operation that describes the quota allocation.
191	AllocateOperation *QuotaOperation `json:"allocateOperation,omitempty"`
192
193	// ServiceConfigId: Specifies which version of service configuration
194	// should be used to process the request. If unspecified or no matching
195	// version can be found, the latest one will be used.
196	ServiceConfigId string `json:"serviceConfigId,omitempty"`
197
198	// ForceSendFields is a list of field names (e.g. "AllocateOperation")
199	// to unconditionally include in API requests. By default, fields with
200	// empty values are omitted from API requests. However, any non-pointer,
201	// non-interface field appearing in ForceSendFields will be sent to the
202	// server regardless of whether the field is empty or not. This may be
203	// used to include empty fields in Patch requests.
204	ForceSendFields []string `json:"-"`
205
206	// NullFields is a list of field names (e.g. "AllocateOperation") to
207	// include in API requests with the JSON null value. By default, fields
208	// with empty values are omitted from API requests. However, any field
209	// with an empty value appearing in NullFields will be sent to the
210	// server as null. It is an error if a field in this list has a
211	// non-empty value. This may be used to include null fields in Patch
212	// requests.
213	NullFields []string `json:"-"`
214}
215
216func (s *AllocateQuotaRequest) MarshalJSON() ([]byte, error) {
217	type NoMethod AllocateQuotaRequest
218	raw := NoMethod(*s)
219	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
220}
221
222// AllocateQuotaResponse: Response message for the AllocateQuota method.
223type AllocateQuotaResponse struct {
224	// AllocateErrors: Indicates the decision of the allocate.
225	AllocateErrors []*QuotaError `json:"allocateErrors,omitempty"`
226
227	// AllocateInfo: WARNING: DO NOT use this field until this warning
228	// message is removed.
229	AllocateInfo *AllocateInfo `json:"allocateInfo,omitempty"`
230
231	// OperationId: The same operation_id value used in the
232	// AllocateQuotaRequest. Used for logging and diagnostics purposes.
233	OperationId string `json:"operationId,omitempty"`
234
235	// QuotaMetrics: Quota metrics to indicate the result of allocation.
236	// Depending on the request, one or more of the following metrics will
237	// be included: 1. Per quota group or per quota metric incremental usage
238	// will be specified using the following delta metric :
239	// "serviceruntime.googleapis.com/api/consumer/quota_used_count" 2. The
240	// quota limit reached condition will be specified using the following
241	// boolean metric : "serviceruntime.googleapis.com/quota/exceeded"
242	QuotaMetrics []*MetricValueSet `json:"quotaMetrics,omitempty"`
243
244	// ServiceConfigId: ID of the actual config used to process the request.
245	ServiceConfigId string `json:"serviceConfigId,omitempty"`
246
247	// ServerResponse contains the HTTP response code and headers from the
248	// server.
249	googleapi.ServerResponse `json:"-"`
250
251	// ForceSendFields is a list of field names (e.g. "AllocateErrors") to
252	// unconditionally include in API requests. By default, fields with
253	// empty values are omitted from API requests. However, any non-pointer,
254	// non-interface field appearing in ForceSendFields will be sent to the
255	// server regardless of whether the field is empty or not. This may be
256	// used to include empty fields in Patch requests.
257	ForceSendFields []string `json:"-"`
258
259	// NullFields is a list of field names (e.g. "AllocateErrors") to
260	// include in API requests with the JSON null value. By default, fields
261	// with empty values are omitted from API requests. However, any field
262	// with an empty value appearing in NullFields will be sent to the
263	// server as null. It is an error if a field in this list has a
264	// non-empty value. This may be used to include null fields in Patch
265	// requests.
266	NullFields []string `json:"-"`
267}
268
269func (s *AllocateQuotaResponse) MarshalJSON() ([]byte, error) {
270	type NoMethod AllocateQuotaResponse
271	raw := NoMethod(*s)
272	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
273}
274
275// AttributeValue: The allowed types for [VALUE] in a `[KEY]:[VALUE]`
276// attribute.
277type AttributeValue struct {
278	// BoolValue: A Boolean value represented by `true` or `false`.
279	BoolValue bool `json:"boolValue,omitempty"`
280
281	// IntValue: A 64-bit signed integer.
282	IntValue int64 `json:"intValue,omitempty,string"`
283
284	// StringValue: A string up to 256 bytes long.
285	StringValue *TruncatableString `json:"stringValue,omitempty"`
286
287	// ForceSendFields is a list of field names (e.g. "BoolValue") to
288	// unconditionally include in API requests. By default, fields with
289	// empty values are omitted from API requests. However, any non-pointer,
290	// non-interface field appearing in ForceSendFields will be sent to the
291	// server regardless of whether the field is empty or not. This may be
292	// used to include empty fields in Patch requests.
293	ForceSendFields []string `json:"-"`
294
295	// NullFields is a list of field names (e.g. "BoolValue") to include in
296	// API requests with the JSON null value. By default, fields with empty
297	// values are omitted from API requests. However, any field with an
298	// empty value appearing in NullFields will be sent to the server as
299	// null. It is an error if a field in this list has a non-empty value.
300	// This may be used to include null fields in Patch requests.
301	NullFields []string `json:"-"`
302}
303
304func (s *AttributeValue) MarshalJSON() ([]byte, error) {
305	type NoMethod AttributeValue
306	raw := NoMethod(*s)
307	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
308}
309
310// Attributes: A set of attributes, each in the format `[KEY]:[VALUE]`.
311type Attributes struct {
312	// AttributeMap: The set of attributes. Each attribute's key can be up
313	// to 128 bytes long. The value can be a string up to 256 bytes, a
314	// signed 64-bit integer, or the Boolean values `true` and `false`. For
315	// example: "/instance_id": "my-instance" "/http/user_agent": ""
316	// "/http/request_bytes": 300 "abc.com/myattribute": true
317	AttributeMap map[string]AttributeValue `json:"attributeMap,omitempty"`
318
319	// DroppedAttributesCount: The number of attributes that were discarded.
320	// Attributes can be discarded because their keys are too long or
321	// because there are too many attributes. If this value is 0 then all
322	// attributes are valid.
323	DroppedAttributesCount int64 `json:"droppedAttributesCount,omitempty"`
324
325	// ForceSendFields is a list of field names (e.g. "AttributeMap") to
326	// unconditionally include in API requests. By default, fields with
327	// empty values are omitted from API requests. However, any non-pointer,
328	// non-interface field appearing in ForceSendFields will be sent to the
329	// server regardless of whether the field is empty or not. This may be
330	// used to include empty fields in Patch requests.
331	ForceSendFields []string `json:"-"`
332
333	// NullFields is a list of field names (e.g. "AttributeMap") to include
334	// in API requests with the JSON null value. By default, fields with
335	// empty values are omitted from API requests. However, any field with
336	// an empty value appearing in NullFields will be sent to the server as
337	// null. It is an error if a field in this list has a non-empty value.
338	// This may be used to include null fields in Patch requests.
339	NullFields []string `json:"-"`
340}
341
342func (s *Attributes) MarshalJSON() ([]byte, error) {
343	type NoMethod Attributes
344	raw := NoMethod(*s)
345	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
346}
347
348// AuditLog: Common audit log format for Google Cloud Platform API
349// operations.
350type AuditLog struct {
351	// AuthenticationInfo: Authentication information.
352	AuthenticationInfo *AuthenticationInfo `json:"authenticationInfo,omitempty"`
353
354	// AuthorizationInfo: Authorization information. If there are multiple
355	// resources or permissions involved, then there is one
356	// AuthorizationInfo element for each {resource, permission} tuple.
357	AuthorizationInfo []*AuthorizationInfo `json:"authorizationInfo,omitempty"`
358
359	// Metadata: Other service-specific data about the request, response,
360	// and other information associated with the current audited event.
361	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
362
363	// MethodName: The name of the service method or operation. For API
364	// calls, this should be the name of the API method. For example,
365	// "google.cloud.bigquery.v2.TableService.InsertTable"
366	// "google.logging.v2.ConfigServiceV2.CreateSink"
367	MethodName string `json:"methodName,omitempty"`
368
369	// NumResponseItems: The number of items returned from a List or Query
370	// API method, if applicable.
371	NumResponseItems int64 `json:"numResponseItems,omitempty,string"`
372
373	// Request: The operation request. This may not include all request
374	// parameters, such as those that are too large, privacy-sensitive, or
375	// duplicated elsewhere in the log record. It should never include
376	// user-generated data, such as file contents. When the JSON object
377	// represented here has a proto equivalent, the proto name will be
378	// indicated in the `@type` property.
379	Request googleapi.RawMessage `json:"request,omitempty"`
380
381	// RequestMetadata: Metadata about the operation.
382	RequestMetadata *RequestMetadata `json:"requestMetadata,omitempty"`
383
384	// ResourceLocation: The resource location information.
385	ResourceLocation *ResourceLocation `json:"resourceLocation,omitempty"`
386
387	// ResourceName: The resource or collection that is the target of the
388	// operation. The name is a scheme-less URI, not including the API
389	// service name. For example:
390	// "projects/PROJECT_ID/zones/us-central1-a/instances"
391	// "projects/PROJECT_ID/datasets/DATASET_ID"
392	ResourceName string `json:"resourceName,omitempty"`
393
394	// ResourceOriginalState: The resource's original state before mutation.
395	// Present only for operations which have successfully modified the
396	// targeted resource(s). In general, this field should contain all
397	// changed fields, except those that are already been included in
398	// `request`, `response`, `metadata` or `service_data` fields. When the
399	// JSON object represented here has a proto equivalent, the proto name
400	// will be indicated in the `@type` property.
401	ResourceOriginalState googleapi.RawMessage `json:"resourceOriginalState,omitempty"`
402
403	// Response: The operation response. This may not include all response
404	// elements, such as those that are too large, privacy-sensitive, or
405	// duplicated elsewhere in the log record. It should never include
406	// user-generated data, such as file contents. When the JSON object
407	// represented here has a proto equivalent, the proto name will be
408	// indicated in the `@type` property.
409	Response googleapi.RawMessage `json:"response,omitempty"`
410
411	// ServiceData: Deprecated. Use the `metadata` field instead. Other
412	// service-specific data about the request, response, and other
413	// activities.
414	ServiceData googleapi.RawMessage `json:"serviceData,omitempty"`
415
416	// ServiceName: The name of the API service performing the operation.
417	// For example, "compute.googleapis.com".
418	ServiceName string `json:"serviceName,omitempty"`
419
420	// Status: The status of the overall operation.
421	Status *Status `json:"status,omitempty"`
422
423	// ForceSendFields is a list of field names (e.g. "AuthenticationInfo")
424	// to unconditionally include in API requests. By default, fields with
425	// empty values are omitted from API requests. However, any non-pointer,
426	// non-interface field appearing in ForceSendFields will be sent to the
427	// server regardless of whether the field is empty or not. This may be
428	// used to include empty fields in Patch requests.
429	ForceSendFields []string `json:"-"`
430
431	// NullFields is a list of field names (e.g. "AuthenticationInfo") to
432	// include in API requests with the JSON null value. By default, fields
433	// with empty values are omitted from API requests. However, any field
434	// with an empty value appearing in NullFields will be sent to the
435	// server as null. It is an error if a field in this list has a
436	// non-empty value. This may be used to include null fields in Patch
437	// requests.
438	NullFields []string `json:"-"`
439}
440
441func (s *AuditLog) MarshalJSON() ([]byte, error) {
442	type NoMethod AuditLog
443	raw := NoMethod(*s)
444	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
445}
446
447// Auth: This message defines request authentication attributes.
448// Terminology is based on the JSON Web Token (JWT) standard, but the
449// terms also correlate to concepts in other standards.
450type Auth struct {
451	// AccessLevels: A list of access level resource names that allow
452	// resources to be accessed by authenticated requester. It is part of
453	// Secure GCP processing for the incoming request. An access level
454	// string has the format:
455	// "//{api_service_name}/accessPolicies/{policy_id}/accessLevels/{short_n
456	// ame}" Example:
457	// "//accesscontextmanager.googleapis.com/accessPolicies/MY_POLICY_ID/acc
458	// essLevels/MY_LEVEL"
459	AccessLevels []string `json:"accessLevels,omitempty"`
460
461	// Audiences: The intended audience(s) for this authentication
462	// information. Reflects the audience (`aud`) claim within a JWT. The
463	// audience value(s) depends on the `issuer`, but typically include one
464	// or more of the following pieces of information: * The services
465	// intended to receive the credential. For example,
466	// ["https://pubsub.googleapis.com/",
467	// "https://storage.googleapis.com/"]. * A set of service-based scopes.
468	// For example, ["https://www.googleapis.com/auth/cloud-platform"]. *
469	// The client id of an app, such as the Firebase project id for JWTs
470	// from Firebase Auth. Consult the documentation for the credential
471	// issuer to determine the information provided.
472	Audiences []string `json:"audiences,omitempty"`
473
474	// Claims: Structured claims presented with the credential. JWTs include
475	// `{key: value}` pairs for standard and private claims. The following
476	// is a subset of the standard required and optional claims that would
477	// typically be presented for a Google-based JWT: {'iss':
478	// 'accounts.google.com', 'sub': '113289723416554971153', 'aud':
479	// ['123456789012', 'pubsub.googleapis.com'], 'azp':
480	// '123456789012.apps.googleusercontent.com', 'email':
481	// 'jsmith@example.com', 'iat': 1353601026, 'exp': 1353604926} SAML
482	// assertions are similarly specified, but with an identity provider
483	// dependent structure.
484	Claims googleapi.RawMessage `json:"claims,omitempty"`
485
486	// Presenter: The authorized presenter of the credential. Reflects the
487	// optional Authorized Presenter (`azp`) claim within a JWT or the OAuth
488	// client id. For example, a Google Cloud Platform client id looks as
489	// follows: "123456789012.apps.googleusercontent.com".
490	Presenter string `json:"presenter,omitempty"`
491
492	// Principal: The authenticated principal. Reflects the issuer (`iss`)
493	// and subject (`sub`) claims within a JWT. The issuer and subject
494	// should be `/` delimited, with `/` percent-encoded within the subject
495	// fragment. For Google accounts, the principal format is:
496	// "https://accounts.google.com/{id}"
497	Principal string `json:"principal,omitempty"`
498
499	// ForceSendFields is a list of field names (e.g. "AccessLevels") to
500	// unconditionally include in API requests. By default, fields with
501	// empty values are omitted from API requests. However, any non-pointer,
502	// non-interface field appearing in ForceSendFields will be sent to the
503	// server regardless of whether the field is empty or not. This may be
504	// used to include empty fields in Patch requests.
505	ForceSendFields []string `json:"-"`
506
507	// NullFields is a list of field names (e.g. "AccessLevels") to include
508	// in API requests with the JSON null value. By default, fields with
509	// empty values are omitted from API requests. However, any field with
510	// an empty value appearing in NullFields will be sent to the server as
511	// null. It is an error if a field in this list has a non-empty value.
512	// This may be used to include null fields in Patch requests.
513	NullFields []string `json:"-"`
514}
515
516func (s *Auth) MarshalJSON() ([]byte, error) {
517	type NoMethod Auth
518	raw := NoMethod(*s)
519	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
520}
521
522// AuthenticationInfo: Authentication information for the operation.
523type AuthenticationInfo struct {
524	// AuthoritySelector: The authority selector specified by the requestor,
525	// if any. It is not guaranteed that the principal was allowed to use
526	// this authority.
527	AuthoritySelector string `json:"authoritySelector,omitempty"`
528
529	// PrincipalEmail: The email address of the authenticated user (or
530	// service account on behalf of third party principal) making the
531	// request. For third party identity callers, the `principal_subject`
532	// field is populated instead of this field. For privacy reasons, the
533	// principal email address is sometimes redacted. For more information,
534	// see Caller identities in audit logs
535	// (https://cloud.google.com/logging/docs/audit#user-id).
536	PrincipalEmail string `json:"principalEmail,omitempty"`
537
538	// PrincipalSubject: String representation of identity of requesting
539	// party. Populated for both first and third party identities.
540	PrincipalSubject string `json:"principalSubject,omitempty"`
541
542	// ServiceAccountDelegationInfo: Identity delegation history of an
543	// authenticated service account that makes the request. It contains
544	// information on the real authorities that try to access GCP resources
545	// by delegating on a service account. When multiple authorities
546	// present, they are guaranteed to be sorted based on the original
547	// ordering of the identity delegation events.
548	ServiceAccountDelegationInfo []*ServiceAccountDelegationInfo `json:"serviceAccountDelegationInfo,omitempty"`
549
550	// ServiceAccountKeyName: The name of the service account key used to
551	// create or exchange credentials for authenticating the service account
552	// making the request. This is a scheme-less URI full resource name. For
553	// example:
554	// "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/
555	// keys/{key}"
556	ServiceAccountKeyName string `json:"serviceAccountKeyName,omitempty"`
557
558	// ThirdPartyPrincipal: The third party identification (if any) of the
559	// authenticated user making the request. When the JSON object
560	// represented here has a proto equivalent, the proto name will be
561	// indicated in the `@type` property.
562	ThirdPartyPrincipal googleapi.RawMessage `json:"thirdPartyPrincipal,omitempty"`
563
564	// ForceSendFields is a list of field names (e.g. "AuthoritySelector")
565	// to unconditionally include in API requests. By default, fields with
566	// empty values are omitted from API requests. However, any non-pointer,
567	// non-interface field appearing in ForceSendFields will be sent to the
568	// server regardless of whether the field is empty or not. This may be
569	// used to include empty fields in Patch requests.
570	ForceSendFields []string `json:"-"`
571
572	// NullFields is a list of field names (e.g. "AuthoritySelector") to
573	// include in API requests with the JSON null value. By default, fields
574	// with empty values are omitted from API requests. However, any field
575	// with an empty value appearing in NullFields will be sent to the
576	// server as null. It is an error if a field in this list has a
577	// non-empty value. This may be used to include null fields in Patch
578	// requests.
579	NullFields []string `json:"-"`
580}
581
582func (s *AuthenticationInfo) MarshalJSON() ([]byte, error) {
583	type NoMethod AuthenticationInfo
584	raw := NoMethod(*s)
585	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
586}
587
588// AuthorizationInfo: Authorization information for the operation.
589type AuthorizationInfo struct {
590	// Granted: Whether or not authorization for `resource` and `permission`
591	// was granted.
592	Granted bool `json:"granted,omitempty"`
593
594	// Permission: The required IAM permission.
595	Permission string `json:"permission,omitempty"`
596
597	// Resource: The resource being accessed, as a REST-style or cloud
598	// resource string. For example:
599	// bigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID or
600	// projects/PROJECTID/datasets/DATASETID
601	Resource string `json:"resource,omitempty"`
602
603	// ResourceAttributes: Resource attributes used in IAM condition
604	// evaluation. This field contains resource attributes like resource
605	// type and resource name. To get the whole view of the attributes used
606	// in IAM condition evaluation, the user must also look into
607	// `AuditLog.request_metadata.request_attributes`.
608	ResourceAttributes *Resource `json:"resourceAttributes,omitempty"`
609
610	// ForceSendFields is a list of field names (e.g. "Granted") to
611	// unconditionally include in API requests. By default, fields with
612	// empty values are omitted from API requests. However, any non-pointer,
613	// non-interface field appearing in ForceSendFields will be sent to the
614	// server regardless of whether the field is empty or not. This may be
615	// used to include empty fields in Patch requests.
616	ForceSendFields []string `json:"-"`
617
618	// NullFields is a list of field names (e.g. "Granted") to include in
619	// API requests with the JSON null value. By default, fields with empty
620	// values are omitted from API requests. However, any field with an
621	// empty value appearing in NullFields will be sent to the server as
622	// null. It is an error if a field in this list has a non-empty value.
623	// This may be used to include null fields in Patch requests.
624	NullFields []string `json:"-"`
625}
626
627func (s *AuthorizationInfo) MarshalJSON() ([]byte, error) {
628	type NoMethod AuthorizationInfo
629	raw := NoMethod(*s)
630	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
631}
632
633// CheckError: Defines the errors to be returned in
634// google.api.servicecontrol.v1.CheckResponse.check_errors.
635type CheckError struct {
636	// Code: The error code.
637	//
638	// Possible values:
639	//   "ERROR_CODE_UNSPECIFIED" - This is never used in `CheckResponse`.
640	//   "NOT_FOUND" - The consumer's project id, network container, or
641	// resource container was not found. Same as google.rpc.Code.NOT_FOUND.
642	//   "PERMISSION_DENIED" - The consumer doesn't have access to the
643	// specified resource. Same as google.rpc.Code.PERMISSION_DENIED.
644	//   "RESOURCE_EXHAUSTED" - Quota check failed. Same as
645	// google.rpc.Code.RESOURCE_EXHAUSTED.
646	//   "BUDGET_EXCEEDED" - Budget check failed.
647	//   "DENIAL_OF_SERVICE_DETECTED" - The consumer's request has been
648	// flagged as a DoS attack.
649	//   "LOAD_SHEDDING" - The consumer's request should be rejected in
650	// order to protect the service from being overloaded.
651	//   "ABUSER_DETECTED" - The consumer has been flagged as an abuser.
652	//   "SERVICE_NOT_ACTIVATED" - The consumer hasn't activated the
653	// service.
654	//   "VISIBILITY_DENIED" - The consumer cannot access the service due to
655	// visibility configuration.
656	//   "BILLING_DISABLED" - The consumer cannot access the service because
657	// billing is disabled.
658	//   "PROJECT_DELETED" - The consumer's project has been marked as
659	// deleted (soft deletion).
660	//   "PROJECT_INVALID" - The consumer's project number or id does not
661	// represent a valid project.
662	//   "CONSUMER_INVALID" - The input consumer info does not represent a
663	// valid consumer folder or organization.
664	//   "IP_ADDRESS_BLOCKED" - The IP address of the consumer is invalid
665	// for the specific consumer project.
666	//   "REFERER_BLOCKED" - The referer address of the consumer request is
667	// invalid for the specific consumer project.
668	//   "CLIENT_APP_BLOCKED" - The client application of the consumer
669	// request is invalid for the specific consumer project.
670	//   "API_TARGET_BLOCKED" - The API targeted by this request is invalid
671	// for the specified consumer project.
672	//   "API_KEY_INVALID" - The consumer's API key is invalid.
673	//   "API_KEY_EXPIRED" - The consumer's API Key has expired.
674	//   "API_KEY_NOT_FOUND" - The consumer's API Key was not found in
675	// config record.
676	//   "SPATULA_HEADER_INVALID" - The consumer's spatula header is
677	// invalid.
678	//   "LOAS_ROLE_INVALID" - The consumer's LOAS role is invalid.
679	//   "NO_LOAS_PROJECT" - The consumer's LOAS role has no associated
680	// project.
681	//   "LOAS_PROJECT_DISABLED" - The consumer's LOAS project is not
682	// `ACTIVE` in LoquatV2.
683	//   "SECURITY_POLICY_VIOLATED" - Request is not allowed as per security
684	// policies defined in Org Policy.
685	//   "INVALID_CREDENTIAL" - The credential in the request can not be
686	// verified.
687	//   "LOCATION_POLICY_VIOLATED" - Request is not allowed as per location
688	// policies defined in Org Policy.
689	//   "NAMESPACE_LOOKUP_UNAVAILABLE" - The backend server for looking up
690	// project id/number is unavailable.
691	//   "SERVICE_STATUS_UNAVAILABLE" - The backend server for checking
692	// service status is unavailable.
693	//   "BILLING_STATUS_UNAVAILABLE" - The backend server for checking
694	// billing status is unavailable.
695	//   "QUOTA_CHECK_UNAVAILABLE" - The backend server for checking quota
696	// limits is unavailable.
697	//   "LOAS_PROJECT_LOOKUP_UNAVAILABLE" - The Spanner for looking up LOAS
698	// project is unavailable.
699	//   "CLOUD_RESOURCE_MANAGER_BACKEND_UNAVAILABLE" - Cloud Resource
700	// Manager backend server is unavailable.
701	//   "SECURITY_POLICY_BACKEND_UNAVAILABLE" - NOTE: for customers in the
702	// scope of Beta/GA of https://cloud.google.com/vpc-service-controls,
703	// this error is no longer returned. If the security backend is
704	// unavailable, rpc UNAVAILABLE status will be returned instead. It
705	// should be ignored and should not be used to reject client requests.
706	//   "LOCATION_POLICY_BACKEND_UNAVAILABLE" - Backend server for
707	// evaluating location policy is unavailable.
708	Code string `json:"code,omitempty"`
709
710	// Detail: Free-form text providing details on the error cause of the
711	// error.
712	Detail string `json:"detail,omitempty"`
713
714	// Status: Contains public information about the check error. If
715	// available, `status.code` will be non zero and client can propagate it
716	// out as public error.
717	Status *Status `json:"status,omitempty"`
718
719	// Subject: Subject to whom this error applies. See the specific code
720	// enum for more details on this field. For example: - "project:" -
721	// "folder:" - "organization:"
722	Subject string `json:"subject,omitempty"`
723
724	// ForceSendFields is a list of field names (e.g. "Code") to
725	// unconditionally include in API requests. By default, fields with
726	// empty values are omitted from API requests. However, any non-pointer,
727	// non-interface field appearing in ForceSendFields will be sent to the
728	// server regardless of whether the field is empty or not. This may be
729	// used to include empty fields in Patch requests.
730	ForceSendFields []string `json:"-"`
731
732	// NullFields is a list of field names (e.g. "Code") to include in API
733	// requests with the JSON null value. By default, fields with empty
734	// values are omitted from API requests. However, any field with an
735	// empty value appearing in NullFields will be sent to the server as
736	// null. It is an error if a field in this list has a non-empty value.
737	// This may be used to include null fields in Patch requests.
738	NullFields []string `json:"-"`
739}
740
741func (s *CheckError) MarshalJSON() ([]byte, error) {
742	type NoMethod CheckError
743	raw := NoMethod(*s)
744	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
745}
746
747// CheckInfo: Contains additional information about the check operation.
748type CheckInfo struct {
749	// ConsumerInfo: Consumer info of this check.
750	ConsumerInfo *ConsumerInfo `json:"consumerInfo,omitempty"`
751
752	// UnusedArguments: A list of fields and label keys that are ignored by
753	// the server. The client doesn't need to send them for following
754	// requests to improve performance and allow better aggregation.
755	UnusedArguments []string `json:"unusedArguments,omitempty"`
756
757	// ForceSendFields is a list of field names (e.g. "ConsumerInfo") to
758	// unconditionally include in API requests. By default, fields with
759	// empty values are omitted from API requests. However, any non-pointer,
760	// non-interface field appearing in ForceSendFields will be sent to the
761	// server regardless of whether the field is empty or not. This may be
762	// used to include empty fields in Patch requests.
763	ForceSendFields []string `json:"-"`
764
765	// NullFields is a list of field names (e.g. "ConsumerInfo") to include
766	// in API requests with the JSON null value. By default, fields with
767	// empty values are omitted from API requests. However, any field with
768	// an empty value appearing in NullFields will be sent to the server as
769	// null. It is an error if a field in this list has a non-empty value.
770	// This may be used to include null fields in Patch requests.
771	NullFields []string `json:"-"`
772}
773
774func (s *CheckInfo) MarshalJSON() ([]byte, error) {
775	type NoMethod CheckInfo
776	raw := NoMethod(*s)
777	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
778}
779
780// CheckRequest: Request message for the Check method.
781type CheckRequest struct {
782	// Operation: The operation to be checked.
783	Operation *Operation `json:"operation,omitempty"`
784
785	// RequestProjectSettings: Requests the project settings to be returned
786	// as part of the check response.
787	RequestProjectSettings bool `json:"requestProjectSettings,omitempty"`
788
789	// ServiceConfigId: Specifies which version of service configuration
790	// should be used to process the request. If unspecified or no matching
791	// version can be found, the latest one will be used.
792	ServiceConfigId string `json:"serviceConfigId,omitempty"`
793
794	// SkipActivationCheck: Indicates if service activation check should be
795	// skipped for this request. Default behavior is to perform the check
796	// and apply relevant quota. WARNING: Setting this flag to "true" will
797	// disable quota enforcement.
798	SkipActivationCheck bool `json:"skipActivationCheck,omitempty"`
799
800	// ForceSendFields is a list of field names (e.g. "Operation") to
801	// unconditionally include in API requests. By default, fields with
802	// empty values are omitted from API requests. However, any non-pointer,
803	// non-interface field appearing in ForceSendFields will be sent to the
804	// server regardless of whether the field is empty or not. This may be
805	// used to include empty fields in Patch requests.
806	ForceSendFields []string `json:"-"`
807
808	// NullFields is a list of field names (e.g. "Operation") to include in
809	// API requests with the JSON null value. By default, fields with empty
810	// values are omitted from API requests. However, any field with an
811	// empty value appearing in NullFields will be sent to the server as
812	// null. It is an error if a field in this list has a non-empty value.
813	// This may be used to include null fields in Patch requests.
814	NullFields []string `json:"-"`
815}
816
817func (s *CheckRequest) MarshalJSON() ([]byte, error) {
818	type NoMethod CheckRequest
819	raw := NoMethod(*s)
820	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
821}
822
823// CheckResponse: Response message for the Check method.
824type CheckResponse struct {
825	// CheckErrors: Indicate the decision of the check. If no check errors
826	// are present, the service should process the operation. Otherwise the
827	// service should use the list of errors to determine the appropriate
828	// action.
829	CheckErrors []*CheckError `json:"checkErrors,omitempty"`
830
831	// CheckInfo: Feedback data returned from the server during processing a
832	// Check request.
833	CheckInfo *CheckInfo `json:"checkInfo,omitempty"`
834
835	// OperationId: The same operation_id value used in the CheckRequest.
836	// Used for logging and diagnostics purposes.
837	OperationId string `json:"operationId,omitempty"`
838
839	// QuotaInfo: Quota information for the check request associated with
840	// this response.
841	QuotaInfo *QuotaInfo `json:"quotaInfo,omitempty"`
842
843	// ServiceConfigId: The actual config id used to process the request.
844	ServiceConfigId string `json:"serviceConfigId,omitempty"`
845
846	// ServiceRolloutId: The current service rollout id used to process the
847	// request.
848	ServiceRolloutId string `json:"serviceRolloutId,omitempty"`
849
850	// ServerResponse contains the HTTP response code and headers from the
851	// server.
852	googleapi.ServerResponse `json:"-"`
853
854	// ForceSendFields is a list of field names (e.g. "CheckErrors") to
855	// unconditionally include in API requests. By default, fields with
856	// empty values are omitted from API requests. However, any non-pointer,
857	// non-interface field appearing in ForceSendFields will be sent to the
858	// server regardless of whether the field is empty or not. This may be
859	// used to include empty fields in Patch requests.
860	ForceSendFields []string `json:"-"`
861
862	// NullFields is a list of field names (e.g. "CheckErrors") to include
863	// in API requests with the JSON null value. By default, fields with
864	// empty values are omitted from API requests. However, any field with
865	// an empty value appearing in NullFields will be sent to the server as
866	// null. It is an error if a field in this list has a non-empty value.
867	// This may be used to include null fields in Patch requests.
868	NullFields []string `json:"-"`
869}
870
871func (s *CheckResponse) MarshalJSON() ([]byte, error) {
872	type NoMethod CheckResponse
873	raw := NoMethod(*s)
874	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
875}
876
877// ConsumerInfo: `ConsumerInfo` provides information about the consumer.
878type ConsumerInfo struct {
879	// ConsumerNumber: The consumer identity number, can be Google cloud
880	// project number, folder number or organization number e.g. 1234567890.
881	// A value of 0 indicates no consumer number is found.
882	ConsumerNumber int64 `json:"consumerNumber,omitempty,string"`
883
884	// ProjectNumber: The Google cloud project number, e.g. 1234567890. A
885	// value of 0 indicates no project number is found. NOTE: This field is
886	// deprecated after Chemist support flexible consumer id. New code
887	// should not depend on this field anymore.
888	ProjectNumber int64 `json:"projectNumber,omitempty,string"`
889
890	// Type: The type of the consumer which should have been defined in
891	// Google Resource Manager (https://cloud.google.com/resource-manager/).
892	//
893	// Possible values:
894	//   "CONSUMER_TYPE_UNSPECIFIED" - This is never used.
895	//   "PROJECT" - The consumer is a Google Cloud Project.
896	//   "FOLDER" - The consumer is a Google Cloud Folder.
897	//   "ORGANIZATION" - The consumer is a Google Cloud Organization.
898	//   "SERVICE_SPECIFIC" - Service-specific resource container which is
899	// defined by the service producer to offer their users the ability to
900	// manage service control functionalities at a finer level of
901	// granularity than the PROJECT.
902	Type string `json:"type,omitempty"`
903
904	// ForceSendFields is a list of field names (e.g. "ConsumerNumber") to
905	// unconditionally include in API requests. By default, fields with
906	// empty values are omitted from API requests. However, any non-pointer,
907	// non-interface field appearing in ForceSendFields will be sent to the
908	// server regardless of whether the field is empty or not. This may be
909	// used to include empty fields in Patch requests.
910	ForceSendFields []string `json:"-"`
911
912	// NullFields is a list of field names (e.g. "ConsumerNumber") to
913	// include in API requests with the JSON null value. By default, fields
914	// with empty values are omitted from API requests. However, any field
915	// with an empty value appearing in NullFields will be sent to the
916	// server as null. It is an error if a field in this list has a
917	// non-empty value. This may be used to include null fields in Patch
918	// requests.
919	NullFields []string `json:"-"`
920}
921
922func (s *ConsumerInfo) MarshalJSON() ([]byte, error) {
923	type NoMethod ConsumerInfo
924	raw := NoMethod(*s)
925	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
926}
927
928// Distribution: Distribution represents a frequency distribution of
929// double-valued sample points. It contains the size of the population
930// of sample points plus additional optional information: - the
931// arithmetic mean of the samples - the minimum and maximum of the
932// samples - the sum-squared-deviation of the samples, used to compute
933// variance - a histogram of the values of the sample points
934type Distribution struct {
935	// BucketCounts: The number of samples in each histogram bucket.
936	// `bucket_counts` are optional. If present, they must sum to the
937	// `count` value. The buckets are defined below in `bucket_option`.
938	// There are N buckets. `bucket_counts[0]` is the number of samples in
939	// the underflow bucket. `bucket_counts[1]` to `bucket_counts[N-1]` are
940	// the numbers of samples in each of the finite buckets. And
941	// `bucket_counts[N] is the number of samples in the overflow bucket.
942	// See the comments of `bucket_option` below for more details. Any
943	// suffix of trailing zeros may be omitted.
944	BucketCounts googleapi.Int64s `json:"bucketCounts,omitempty"`
945
946	// Count: The total number of samples in the distribution. Must be >= 0.
947	Count int64 `json:"count,omitempty,string"`
948
949	// Exemplars: Example points. Must be in increasing order of `value`
950	// field.
951	Exemplars []*Exemplar `json:"exemplars,omitempty"`
952
953	// ExplicitBuckets: Buckets with arbitrary user-provided width.
954	ExplicitBuckets *ExplicitBuckets `json:"explicitBuckets,omitempty"`
955
956	// ExponentialBuckets: Buckets with exponentially growing width.
957	ExponentialBuckets *ExponentialBuckets `json:"exponentialBuckets,omitempty"`
958
959	// LinearBuckets: Buckets with constant width.
960	LinearBuckets *LinearBuckets `json:"linearBuckets,omitempty"`
961
962	// Maximum: The maximum of the population of values. Ignored if `count`
963	// is zero.
964	Maximum float64 `json:"maximum,omitempty"`
965
966	// Mean: The arithmetic mean of the samples in the distribution. If
967	// `count` is zero then this field must be zero.
968	Mean float64 `json:"mean,omitempty"`
969
970	// Minimum: The minimum of the population of values. Ignored if `count`
971	// is zero.
972	Minimum float64 `json:"minimum,omitempty"`
973
974	// SumOfSquaredDeviation: The sum of squared deviations from the mean:
975	// Sumi=1..count ((x_i - mean)^2) where each x_i is a sample values. If
976	// `count` is zero then this field must be zero, otherwise validation of
977	// the request fails.
978	SumOfSquaredDeviation float64 `json:"sumOfSquaredDeviation,omitempty"`
979
980	// ForceSendFields is a list of field names (e.g. "BucketCounts") to
981	// unconditionally include in API requests. By default, fields with
982	// empty values are omitted from API requests. However, any non-pointer,
983	// non-interface field appearing in ForceSendFields will be sent to the
984	// server regardless of whether the field is empty or not. This may be
985	// used to include empty fields in Patch requests.
986	ForceSendFields []string `json:"-"`
987
988	// NullFields is a list of field names (e.g. "BucketCounts") to include
989	// in API requests with the JSON null value. By default, fields with
990	// empty values are omitted from API requests. However, any field with
991	// an empty value appearing in NullFields will be sent to the server as
992	// null. It is an error if a field in this list has a non-empty value.
993	// This may be used to include null fields in Patch requests.
994	NullFields []string `json:"-"`
995}
996
997func (s *Distribution) MarshalJSON() ([]byte, error) {
998	type NoMethod Distribution
999	raw := NoMethod(*s)
1000	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1001}
1002
1003func (s *Distribution) UnmarshalJSON(data []byte) error {
1004	type NoMethod Distribution
1005	var s1 struct {
1006		Maximum               gensupport.JSONFloat64 `json:"maximum"`
1007		Mean                  gensupport.JSONFloat64 `json:"mean"`
1008		Minimum               gensupport.JSONFloat64 `json:"minimum"`
1009		SumOfSquaredDeviation gensupport.JSONFloat64 `json:"sumOfSquaredDeviation"`
1010		*NoMethod
1011	}
1012	s1.NoMethod = (*NoMethod)(s)
1013	if err := json.Unmarshal(data, &s1); err != nil {
1014		return err
1015	}
1016	s.Maximum = float64(s1.Maximum)
1017	s.Mean = float64(s1.Mean)
1018	s.Minimum = float64(s1.Minimum)
1019	s.SumOfSquaredDeviation = float64(s1.SumOfSquaredDeviation)
1020	return nil
1021}
1022
1023// Exemplar: Exemplars are example points that may be used to annotate
1024// aggregated distribution values. They are metadata that gives
1025// information about a particular value added to a Distribution bucket,
1026// such as a trace ID that was active when a value was added. They may
1027// contain further information, such as a example values and timestamps,
1028// origin, etc.
1029type Exemplar struct {
1030	// Attachments: Contextual information about the example value. Examples
1031	// are: Trace: type.googleapis.com/google.monitoring.v3.SpanContext
1032	// Literal string: type.googleapis.com/google.protobuf.StringValue
1033	// Labels dropped during aggregation:
1034	// type.googleapis.com/google.monitoring.v3.DroppedLabels There may be
1035	// only a single attachment of any given message type in a single
1036	// exemplar, and this is enforced by the system.
1037	Attachments []googleapi.RawMessage `json:"attachments,omitempty"`
1038
1039	// Timestamp: The observation (sampling) time of the above value.
1040	Timestamp string `json:"timestamp,omitempty"`
1041
1042	// Value: Value of the exemplar point. This value determines to which
1043	// bucket the exemplar belongs.
1044	Value float64 `json:"value,omitempty"`
1045
1046	// ForceSendFields is a list of field names (e.g. "Attachments") to
1047	// unconditionally include in API requests. By default, fields with
1048	// empty values are omitted from API requests. However, any non-pointer,
1049	// non-interface field appearing in ForceSendFields will be sent to the
1050	// server regardless of whether the field is empty or not. This may be
1051	// used to include empty fields in Patch requests.
1052	ForceSendFields []string `json:"-"`
1053
1054	// NullFields is a list of field names (e.g. "Attachments") to include
1055	// in API requests with the JSON null value. By default, fields with
1056	// empty values are omitted from API requests. However, any field with
1057	// an empty value appearing in NullFields will be sent to the server as
1058	// null. It is an error if a field in this list has a non-empty value.
1059	// This may be used to include null fields in Patch requests.
1060	NullFields []string `json:"-"`
1061}
1062
1063func (s *Exemplar) MarshalJSON() ([]byte, error) {
1064	type NoMethod Exemplar
1065	raw := NoMethod(*s)
1066	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1067}
1068
1069func (s *Exemplar) UnmarshalJSON(data []byte) error {
1070	type NoMethod Exemplar
1071	var s1 struct {
1072		Value gensupport.JSONFloat64 `json:"value"`
1073		*NoMethod
1074	}
1075	s1.NoMethod = (*NoMethod)(s)
1076	if err := json.Unmarshal(data, &s1); err != nil {
1077		return err
1078	}
1079	s.Value = float64(s1.Value)
1080	return nil
1081}
1082
1083// ExplicitBuckets: Describing buckets with arbitrary user-provided
1084// width.
1085type ExplicitBuckets struct {
1086	// Bounds: 'bound' is a list of strictly increasing boundaries between
1087	// buckets. Note that a list of length N-1 defines N buckets because of
1088	// fenceposting. See comments on `bucket_options` for details. The i'th
1089	// finite bucket covers the interval [bound[i-1], bound[i]) where i
1090	// ranges from 1 to bound_size() - 1. Note that there are no finite
1091	// buckets at all if 'bound' only contains a single element; in that
1092	// special case the single bound defines the boundary between the
1093	// underflow and overflow buckets. bucket number lower bound upper bound
1094	// i == 0 (underflow) -inf bound[i] 0 < i < bound_size() bound[i-1]
1095	// bound[i] i == bound_size() (overflow) bound[i-1] +inf
1096	Bounds []float64 `json:"bounds,omitempty"`
1097
1098	// ForceSendFields is a list of field names (e.g. "Bounds") to
1099	// unconditionally include in API requests. By default, fields with
1100	// empty values are omitted from API requests. However, any non-pointer,
1101	// non-interface field appearing in ForceSendFields will be sent to the
1102	// server regardless of whether the field is empty or not. This may be
1103	// used to include empty fields in Patch requests.
1104	ForceSendFields []string `json:"-"`
1105
1106	// NullFields is a list of field names (e.g. "Bounds") to include in API
1107	// requests with the JSON null value. By default, fields with empty
1108	// values are omitted from API requests. However, any field with an
1109	// empty value appearing in NullFields will be sent to the server as
1110	// null. It is an error if a field in this list has a non-empty value.
1111	// This may be used to include null fields in Patch requests.
1112	NullFields []string `json:"-"`
1113}
1114
1115func (s *ExplicitBuckets) MarshalJSON() ([]byte, error) {
1116	type NoMethod ExplicitBuckets
1117	raw := NoMethod(*s)
1118	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1119}
1120
1121// ExponentialBuckets: Describing buckets with exponentially growing
1122// width.
1123type ExponentialBuckets struct {
1124	// GrowthFactor: The i'th exponential bucket covers the interval [scale
1125	// * growth_factor^(i-1), scale * growth_factor^i) where i ranges from 1
1126	// to num_finite_buckets inclusive. Must be larger than 1.0.
1127	GrowthFactor float64 `json:"growthFactor,omitempty"`
1128
1129	// NumFiniteBuckets: The number of finite buckets. With the underflow
1130	// and overflow buckets, the total number of buckets is
1131	// `num_finite_buckets` + 2. See comments on `bucket_options` for
1132	// details.
1133	NumFiniteBuckets int64 `json:"numFiniteBuckets,omitempty"`
1134
1135	// Scale: The i'th exponential bucket covers the interval [scale *
1136	// growth_factor^(i-1), scale * growth_factor^i) where i ranges from 1
1137	// to num_finite_buckets inclusive. Must be > 0.
1138	Scale float64 `json:"scale,omitempty"`
1139
1140	// ForceSendFields is a list of field names (e.g. "GrowthFactor") to
1141	// unconditionally include in API requests. By default, fields with
1142	// empty values are omitted from API requests. However, any non-pointer,
1143	// non-interface field appearing in ForceSendFields will be sent to the
1144	// server regardless of whether the field is empty or not. This may be
1145	// used to include empty fields in Patch requests.
1146	ForceSendFields []string `json:"-"`
1147
1148	// NullFields is a list of field names (e.g. "GrowthFactor") to include
1149	// in API requests with the JSON null value. By default, fields with
1150	// empty values are omitted from API requests. However, any field with
1151	// an empty value appearing in NullFields will be sent to the server as
1152	// null. It is an error if a field in this list has a non-empty value.
1153	// This may be used to include null fields in Patch requests.
1154	NullFields []string `json:"-"`
1155}
1156
1157func (s *ExponentialBuckets) MarshalJSON() ([]byte, error) {
1158	type NoMethod ExponentialBuckets
1159	raw := NoMethod(*s)
1160	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1161}
1162
1163func (s *ExponentialBuckets) UnmarshalJSON(data []byte) error {
1164	type NoMethod ExponentialBuckets
1165	var s1 struct {
1166		GrowthFactor gensupport.JSONFloat64 `json:"growthFactor"`
1167		Scale        gensupport.JSONFloat64 `json:"scale"`
1168		*NoMethod
1169	}
1170	s1.NoMethod = (*NoMethod)(s)
1171	if err := json.Unmarshal(data, &s1); err != nil {
1172		return err
1173	}
1174	s.GrowthFactor = float64(s1.GrowthFactor)
1175	s.Scale = float64(s1.Scale)
1176	return nil
1177}
1178
1179// FirstPartyPrincipal: First party identity principal.
1180type FirstPartyPrincipal struct {
1181	// PrincipalEmail: The email address of a Google account. .
1182	PrincipalEmail string `json:"principalEmail,omitempty"`
1183
1184	// ServiceMetadata: Metadata about the service that uses the service
1185	// account. .
1186	ServiceMetadata googleapi.RawMessage `json:"serviceMetadata,omitempty"`
1187
1188	// ForceSendFields is a list of field names (e.g. "PrincipalEmail") to
1189	// unconditionally include in API requests. By default, fields with
1190	// empty values are omitted from API requests. However, any non-pointer,
1191	// non-interface field appearing in ForceSendFields will be sent to the
1192	// server regardless of whether the field is empty or not. This may be
1193	// used to include empty fields in Patch requests.
1194	ForceSendFields []string `json:"-"`
1195
1196	// NullFields is a list of field names (e.g. "PrincipalEmail") to
1197	// include in API requests with the JSON null value. By default, fields
1198	// with empty values are omitted from API requests. However, any field
1199	// with an empty value appearing in NullFields will be sent to the
1200	// server as null. It is an error if a field in this list has a
1201	// non-empty value. This may be used to include null fields in Patch
1202	// requests.
1203	NullFields []string `json:"-"`
1204}
1205
1206func (s *FirstPartyPrincipal) MarshalJSON() ([]byte, error) {
1207	type NoMethod FirstPartyPrincipal
1208	raw := NoMethod(*s)
1209	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1210}
1211
1212// HttpRequest: A common proto for logging HTTP requests. Only contains
1213// semantics defined by the HTTP specification. Product-specific logging
1214// information MUST be defined in a separate message.
1215type HttpRequest struct {
1216	// CacheFillBytes: The number of HTTP response bytes inserted into
1217	// cache. Set only when a cache fill was attempted.
1218	CacheFillBytes int64 `json:"cacheFillBytes,omitempty,string"`
1219
1220	// CacheHit: Whether or not an entity was served from cache (with or
1221	// without validation).
1222	CacheHit bool `json:"cacheHit,omitempty"`
1223
1224	// CacheLookup: Whether or not a cache lookup was attempted.
1225	CacheLookup bool `json:"cacheLookup,omitempty"`
1226
1227	// CacheValidatedWithOriginServer: Whether or not the response was
1228	// validated with the origin server before being served from cache. This
1229	// field is only meaningful if `cache_hit` is True.
1230	CacheValidatedWithOriginServer bool `json:"cacheValidatedWithOriginServer,omitempty"`
1231
1232	// Latency: The request processing latency on the server, from the time
1233	// the request was received until the response was sent.
1234	Latency string `json:"latency,omitempty"`
1235
1236	// Protocol: Protocol used for the request. Examples: "HTTP/1.1",
1237	// "HTTP/2", "websocket"
1238	Protocol string `json:"protocol,omitempty"`
1239
1240	// Referer: The referer URL of the request, as defined in HTTP/1.1
1241	// Header Field Definitions
1242	// (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
1243	Referer string `json:"referer,omitempty"`
1244
1245	// RemoteIp: The IP address (IPv4 or IPv6) of the client that issued the
1246	// HTTP request. Examples: "192.168.1.1",
1247	// "FE80::0202:B3FF:FE1E:8329".
1248	RemoteIp string `json:"remoteIp,omitempty"`
1249
1250	// RequestMethod: The request method. Examples: "GET", "HEAD",
1251	// "PUT", "POST".
1252	RequestMethod string `json:"requestMethod,omitempty"`
1253
1254	// RequestSize: The size of the HTTP request message in bytes, including
1255	// the request headers and the request body.
1256	RequestSize int64 `json:"requestSize,omitempty,string"`
1257
1258	// RequestUrl: The scheme (http, https), the host name, the path, and
1259	// the query portion of the URL that was requested. Example:
1260	// "http://example.com/some/info?color=red".
1261	RequestUrl string `json:"requestUrl,omitempty"`
1262
1263	// ResponseSize: The size of the HTTP response message sent back to the
1264	// client, in bytes, including the response headers and the response
1265	// body.
1266	ResponseSize int64 `json:"responseSize,omitempty,string"`
1267
1268	// ServerIp: The IP address (IPv4 or IPv6) of the origin server that the
1269	// request was sent to.
1270	ServerIp string `json:"serverIp,omitempty"`
1271
1272	// Status: The response code indicating the status of the response.
1273	// Examples: 200, 404.
1274	Status int64 `json:"status,omitempty"`
1275
1276	// UserAgent: The user agent sent by the client. Example: "Mozilla/4.0
1277	// (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)".
1278	UserAgent string `json:"userAgent,omitempty"`
1279
1280	// ForceSendFields is a list of field names (e.g. "CacheFillBytes") to
1281	// unconditionally include in API requests. By default, fields with
1282	// empty values are omitted from API requests. However, any non-pointer,
1283	// non-interface field appearing in ForceSendFields will be sent to the
1284	// server regardless of whether the field is empty or not. This may be
1285	// used to include empty fields in Patch requests.
1286	ForceSendFields []string `json:"-"`
1287
1288	// NullFields is a list of field names (e.g. "CacheFillBytes") to
1289	// include in API requests with the JSON null value. By default, fields
1290	// with empty values are omitted from API requests. However, any field
1291	// with an empty value appearing in NullFields will be sent to the
1292	// server as null. It is an error if a field in this list has a
1293	// non-empty value. This may be used to include null fields in Patch
1294	// requests.
1295	NullFields []string `json:"-"`
1296}
1297
1298func (s *HttpRequest) MarshalJSON() ([]byte, error) {
1299	type NoMethod HttpRequest
1300	raw := NoMethod(*s)
1301	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1302}
1303
1304// LinearBuckets: Describing buckets with constant width.
1305type LinearBuckets struct {
1306	// NumFiniteBuckets: The number of finite buckets. With the underflow
1307	// and overflow buckets, the total number of buckets is
1308	// `num_finite_buckets` + 2. See comments on `bucket_options` for
1309	// details.
1310	NumFiniteBuckets int64 `json:"numFiniteBuckets,omitempty"`
1311
1312	// Offset: The i'th linear bucket covers the interval [offset + (i-1) *
1313	// width, offset + i * width) where i ranges from 1 to
1314	// num_finite_buckets, inclusive.
1315	Offset float64 `json:"offset,omitempty"`
1316
1317	// Width: The i'th linear bucket covers the interval [offset + (i-1) *
1318	// width, offset + i * width) where i ranges from 1 to
1319	// num_finite_buckets, inclusive. Must be strictly positive.
1320	Width float64 `json:"width,omitempty"`
1321
1322	// ForceSendFields is a list of field names (e.g. "NumFiniteBuckets") to
1323	// unconditionally include in API requests. By default, fields with
1324	// empty values are omitted from API requests. However, any non-pointer,
1325	// non-interface field appearing in ForceSendFields will be sent to the
1326	// server regardless of whether the field is empty or not. This may be
1327	// used to include empty fields in Patch requests.
1328	ForceSendFields []string `json:"-"`
1329
1330	// NullFields is a list of field names (e.g. "NumFiniteBuckets") to
1331	// include in API requests with the JSON null value. By default, fields
1332	// with empty values are omitted from API requests. However, any field
1333	// with an empty value appearing in NullFields will be sent to the
1334	// server as null. It is an error if a field in this list has a
1335	// non-empty value. This may be used to include null fields in Patch
1336	// requests.
1337	NullFields []string `json:"-"`
1338}
1339
1340func (s *LinearBuckets) MarshalJSON() ([]byte, error) {
1341	type NoMethod LinearBuckets
1342	raw := NoMethod(*s)
1343	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1344}
1345
1346func (s *LinearBuckets) UnmarshalJSON(data []byte) error {
1347	type NoMethod LinearBuckets
1348	var s1 struct {
1349		Offset gensupport.JSONFloat64 `json:"offset"`
1350		Width  gensupport.JSONFloat64 `json:"width"`
1351		*NoMethod
1352	}
1353	s1.NoMethod = (*NoMethod)(s)
1354	if err := json.Unmarshal(data, &s1); err != nil {
1355		return err
1356	}
1357	s.Offset = float64(s1.Offset)
1358	s.Width = float64(s1.Width)
1359	return nil
1360}
1361
1362// LogEntry: An individual log entry.
1363type LogEntry struct {
1364	// HttpRequest: Optional. Information about the HTTP request associated
1365	// with this log entry, if applicable.
1366	HttpRequest *HttpRequest `json:"httpRequest,omitempty"`
1367
1368	// InsertId: A unique ID for the log entry used for deduplication. If
1369	// omitted, the implementation will generate one based on operation_id.
1370	InsertId string `json:"insertId,omitempty"`
1371
1372	// Labels: A set of user-defined (key, value) data that provides
1373	// additional information about the log entry.
1374	Labels map[string]string `json:"labels,omitempty"`
1375
1376	// Name: Required. The log to which this log entry belongs. Examples:
1377	// "syslog", "book_log".
1378	Name string `json:"name,omitempty"`
1379
1380	// Operation: Optional. Information about an operation associated with
1381	// the log entry, if applicable.
1382	Operation *LogEntryOperation `json:"operation,omitempty"`
1383
1384	// ProtoPayload: The log entry payload, represented as a protocol buffer
1385	// that is expressed as a JSON object. The only accepted type currently
1386	// is AuditLog.
1387	ProtoPayload googleapi.RawMessage `json:"protoPayload,omitempty"`
1388
1389	// Severity: The severity of the log entry. The default value is
1390	// `LogSeverity.DEFAULT`.
1391	//
1392	// Possible values:
1393	//   "DEFAULT" - (0) The log entry has no assigned severity level.
1394	//   "DEBUG" - (100) Debug or trace information.
1395	//   "INFO" - (200) Routine information, such as ongoing status or
1396	// performance.
1397	//   "NOTICE" - (300) Normal but significant events, such as start up,
1398	// shut down, or a configuration change.
1399	//   "WARNING" - (400) Warning events might cause problems.
1400	//   "ERROR" - (500) Error events are likely to cause problems.
1401	//   "CRITICAL" - (600) Critical events cause more severe problems or
1402	// outages.
1403	//   "ALERT" - (700) A person must take an action immediately.
1404	//   "EMERGENCY" - (800) One or more systems are unusable.
1405	Severity string `json:"severity,omitempty"`
1406
1407	// SourceLocation: Optional. Source code location information associated
1408	// with the log entry, if any.
1409	SourceLocation *LogEntrySourceLocation `json:"sourceLocation,omitempty"`
1410
1411	// StructPayload: The log entry payload, represented as a structure that
1412	// is expressed as a JSON object.
1413	StructPayload googleapi.RawMessage `json:"structPayload,omitempty"`
1414
1415	// TextPayload: The log entry payload, represented as a Unicode string
1416	// (UTF-8).
1417	TextPayload string `json:"textPayload,omitempty"`
1418
1419	// Timestamp: The time the event described by the log entry occurred. If
1420	// omitted, defaults to operation start time.
1421	Timestamp string `json:"timestamp,omitempty"`
1422
1423	// Trace: Optional. Resource name of the trace associated with the log
1424	// entry, if any. If this field contains a relative resource name, you
1425	// can assume the name is relative to `//tracing.googleapis.com`.
1426	// Example:
1427	// `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824`
1428	Trace string `json:"trace,omitempty"`
1429
1430	// ForceSendFields is a list of field names (e.g. "HttpRequest") to
1431	// unconditionally include in API requests. By default, fields with
1432	// empty values are omitted from API requests. However, any non-pointer,
1433	// non-interface field appearing in ForceSendFields will be sent to the
1434	// server regardless of whether the field is empty or not. This may be
1435	// used to include empty fields in Patch requests.
1436	ForceSendFields []string `json:"-"`
1437
1438	// NullFields is a list of field names (e.g. "HttpRequest") to include
1439	// in API requests with the JSON null value. By default, fields with
1440	// empty values are omitted from API requests. However, any field with
1441	// an empty value appearing in NullFields will be sent to the server as
1442	// null. It is an error if a field in this list has a non-empty value.
1443	// This may be used to include null fields in Patch requests.
1444	NullFields []string `json:"-"`
1445}
1446
1447func (s *LogEntry) MarshalJSON() ([]byte, error) {
1448	type NoMethod LogEntry
1449	raw := NoMethod(*s)
1450	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1451}
1452
1453// LogEntryOperation: Additional information about a potentially
1454// long-running operation with which a log entry is associated.
1455type LogEntryOperation struct {
1456	// First: Optional. Set this to True if this is the first log entry in
1457	// the operation.
1458	First bool `json:"first,omitempty"`
1459
1460	// Id: Optional. An arbitrary operation identifier. Log entries with the
1461	// same identifier are assumed to be part of the same operation.
1462	Id string `json:"id,omitempty"`
1463
1464	// Last: Optional. Set this to True if this is the last log entry in the
1465	// operation.
1466	Last bool `json:"last,omitempty"`
1467
1468	// Producer: Optional. An arbitrary producer identifier. The combination
1469	// of `id` and `producer` must be globally unique. Examples for
1470	// `producer`: "MyDivision.MyBigCompany.com",
1471	// "github.com/MyProject/MyApplication".
1472	Producer string `json:"producer,omitempty"`
1473
1474	// ForceSendFields is a list of field names (e.g. "First") to
1475	// unconditionally include in API requests. By default, fields with
1476	// empty values are omitted from API requests. However, any non-pointer,
1477	// non-interface field appearing in ForceSendFields will be sent to the
1478	// server regardless of whether the field is empty or not. This may be
1479	// used to include empty fields in Patch requests.
1480	ForceSendFields []string `json:"-"`
1481
1482	// NullFields is a list of field names (e.g. "First") to include in API
1483	// requests with the JSON null value. By default, fields with empty
1484	// values are omitted from API requests. However, any field with an
1485	// empty value appearing in NullFields will be sent to the server as
1486	// null. It is an error if a field in this list has a non-empty value.
1487	// This may be used to include null fields in Patch requests.
1488	NullFields []string `json:"-"`
1489}
1490
1491func (s *LogEntryOperation) MarshalJSON() ([]byte, error) {
1492	type NoMethod LogEntryOperation
1493	raw := NoMethod(*s)
1494	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1495}
1496
1497// LogEntrySourceLocation: Additional information about the source code
1498// location that produced the log entry.
1499type LogEntrySourceLocation struct {
1500	// File: Optional. Source file name. Depending on the runtime
1501	// environment, this might be a simple name or a fully-qualified name.
1502	File string `json:"file,omitempty"`
1503
1504	// Function: Optional. Human-readable name of the function or method
1505	// being invoked, with optional context such as the class or package
1506	// name. This information may be used in contexts such as the logs
1507	// viewer, where a file and line number are less meaningful. The format
1508	// can vary by language. For example: `qual.if.ied.Class.method` (Java),
1509	// `dir/package.func` (Go), `function` (Python).
1510	Function string `json:"function,omitempty"`
1511
1512	// Line: Optional. Line within the source file. 1-based; 0 indicates no
1513	// line number available.
1514	Line int64 `json:"line,omitempty,string"`
1515
1516	// ForceSendFields is a list of field names (e.g. "File") to
1517	// unconditionally include in API requests. By default, fields with
1518	// empty values are omitted from API requests. However, any non-pointer,
1519	// non-interface field appearing in ForceSendFields will be sent to the
1520	// server regardless of whether the field is empty or not. This may be
1521	// used to include empty fields in Patch requests.
1522	ForceSendFields []string `json:"-"`
1523
1524	// NullFields is a list of field names (e.g. "File") to include in API
1525	// requests with the JSON null value. By default, fields with empty
1526	// values are omitted from API requests. However, any field with an
1527	// empty value appearing in NullFields will be sent to the server as
1528	// null. It is an error if a field in this list has a non-empty value.
1529	// This may be used to include null fields in Patch requests.
1530	NullFields []string `json:"-"`
1531}
1532
1533func (s *LogEntrySourceLocation) MarshalJSON() ([]byte, error) {
1534	type NoMethod LogEntrySourceLocation
1535	raw := NoMethod(*s)
1536	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1537}
1538
1539// MetricValue: Represents a single metric value.
1540type MetricValue struct {
1541	// BoolValue: A boolean value.
1542	BoolValue *bool `json:"boolValue,omitempty"`
1543
1544	// DistributionValue: A distribution value.
1545	DistributionValue *Distribution `json:"distributionValue,omitempty"`
1546
1547	// DoubleValue: A double precision floating point value.
1548	DoubleValue *float64 `json:"doubleValue,omitempty"`
1549
1550	// EndTime: The end of the time period over which this metric value's
1551	// measurement applies. If not specified,
1552	// google.api.servicecontrol.v1.Operation.end_time will be used.
1553	EndTime string `json:"endTime,omitempty"`
1554
1555	// Int64Value: A signed 64-bit integer value.
1556	Int64Value *int64 `json:"int64Value,omitempty,string"`
1557
1558	// Labels: The labels describing the metric value. See comments on
1559	// google.api.servicecontrol.v1.Operation.labels for the overriding
1560	// relationship. Note that this map must not contain monitored resource
1561	// labels.
1562	Labels map[string]string `json:"labels,omitempty"`
1563
1564	// MoneyValue: A money value.
1565	MoneyValue *Money `json:"moneyValue,omitempty"`
1566
1567	// StartTime: The start of the time period over which this metric
1568	// value's measurement applies. The time period has different semantics
1569	// for different metric types (cumulative, delta, and gauge). See the
1570	// metric definition documentation in the service configuration for
1571	// details. If not specified,
1572	// google.api.servicecontrol.v1.Operation.start_time will be used.
1573	StartTime string `json:"startTime,omitempty"`
1574
1575	// StringValue: A text string value.
1576	StringValue *string `json:"stringValue,omitempty"`
1577
1578	// ForceSendFields is a list of field names (e.g. "BoolValue") to
1579	// unconditionally include in API requests. By default, fields with
1580	// empty values are omitted from API requests. However, any non-pointer,
1581	// non-interface field appearing in ForceSendFields will be sent to the
1582	// server regardless of whether the field is empty or not. This may be
1583	// used to include empty fields in Patch requests.
1584	ForceSendFields []string `json:"-"`
1585
1586	// NullFields is a list of field names (e.g. "BoolValue") to include in
1587	// API requests with the JSON null value. By default, fields with empty
1588	// values are omitted from API requests. However, any field with an
1589	// empty value appearing in NullFields will be sent to the server as
1590	// null. It is an error if a field in this list has a non-empty value.
1591	// This may be used to include null fields in Patch requests.
1592	NullFields []string `json:"-"`
1593}
1594
1595func (s *MetricValue) MarshalJSON() ([]byte, error) {
1596	type NoMethod MetricValue
1597	raw := NoMethod(*s)
1598	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1599}
1600
1601func (s *MetricValue) UnmarshalJSON(data []byte) error {
1602	type NoMethod MetricValue
1603	var s1 struct {
1604		DoubleValue *gensupport.JSONFloat64 `json:"doubleValue"`
1605		*NoMethod
1606	}
1607	s1.NoMethod = (*NoMethod)(s)
1608	if err := json.Unmarshal(data, &s1); err != nil {
1609		return err
1610	}
1611	if s1.DoubleValue != nil {
1612		s.DoubleValue = (*float64)(s1.DoubleValue)
1613	}
1614	return nil
1615}
1616
1617// MetricValueSet: Represents a set of metric values in the same metric.
1618// Each metric value in the set should have a unique combination of
1619// start time, end time, and label values.
1620type MetricValueSet struct {
1621	// MetricName: The metric name defined in the service configuration.
1622	MetricName string `json:"metricName,omitempty"`
1623
1624	// MetricValues: The values in this metric.
1625	MetricValues []*MetricValue `json:"metricValues,omitempty"`
1626
1627	// ForceSendFields is a list of field names (e.g. "MetricName") to
1628	// unconditionally include in API requests. By default, fields with
1629	// empty values are omitted from API requests. However, any non-pointer,
1630	// non-interface field appearing in ForceSendFields will be sent to the
1631	// server regardless of whether the field is empty or not. This may be
1632	// used to include empty fields in Patch requests.
1633	ForceSendFields []string `json:"-"`
1634
1635	// NullFields is a list of field names (e.g. "MetricName") to include in
1636	// API requests with the JSON null value. By default, fields with empty
1637	// values are omitted from API requests. However, any field with an
1638	// empty value appearing in NullFields will be sent to the server as
1639	// null. It is an error if a field in this list has a non-empty value.
1640	// This may be used to include null fields in Patch requests.
1641	NullFields []string `json:"-"`
1642}
1643
1644func (s *MetricValueSet) MarshalJSON() ([]byte, error) {
1645	type NoMethod MetricValueSet
1646	raw := NoMethod(*s)
1647	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1648}
1649
1650// Money: Represents an amount of money with its currency type.
1651type Money struct {
1652	// CurrencyCode: The three-letter currency code defined in ISO 4217.
1653	CurrencyCode string `json:"currencyCode,omitempty"`
1654
1655	// Nanos: Number of nano (10^-9) units of the amount. The value must be
1656	// between -999,999,999 and +999,999,999 inclusive. If `units` is
1657	// positive, `nanos` must be positive or zero. If `units` is zero,
1658	// `nanos` can be positive, zero, or negative. If `units` is negative,
1659	// `nanos` must be negative or zero. For example $-1.75 is represented
1660	// as `units`=-1 and `nanos`=-750,000,000.
1661	Nanos int64 `json:"nanos,omitempty"`
1662
1663	// Units: The whole units of the amount. For example if `currencyCode`
1664	// is "USD", then 1 unit is one US dollar.
1665	Units int64 `json:"units,omitempty,string"`
1666
1667	// ForceSendFields is a list of field names (e.g. "CurrencyCode") to
1668	// unconditionally include in API requests. By default, fields with
1669	// empty values are omitted from API requests. However, any non-pointer,
1670	// non-interface field appearing in ForceSendFields will be sent to the
1671	// server regardless of whether the field is empty or not. This may be
1672	// used to include empty fields in Patch requests.
1673	ForceSendFields []string `json:"-"`
1674
1675	// NullFields is a list of field names (e.g. "CurrencyCode") to include
1676	// in API requests with the JSON null value. By default, fields with
1677	// empty values are omitted from API requests. However, any field with
1678	// an empty value appearing in NullFields will be sent to the server as
1679	// null. It is an error if a field in this list has a non-empty value.
1680	// This may be used to include null fields in Patch requests.
1681	NullFields []string `json:"-"`
1682}
1683
1684func (s *Money) MarshalJSON() ([]byte, error) {
1685	type NoMethod Money
1686	raw := NoMethod(*s)
1687	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1688}
1689
1690// Operation: Represents information regarding an operation.
1691type Operation struct {
1692	// ConsumerId: Identity of the consumer who is using the service. This
1693	// field should be filled in for the operations initiated by a consumer,
1694	// but not for service-initiated operations that are not related to a
1695	// specific consumer. - This can be in one of the following formats: -
1696	// project:PROJECT_ID, - project`_`number:PROJECT_NUMBER, -
1697	// projects/PROJECT_ID or PROJECT_NUMBER, - folders/FOLDER_NUMBER, -
1698	// organizations/ORGANIZATION_NUMBER, - api`_`key:API_KEY.
1699	ConsumerId string `json:"consumerId,omitempty"`
1700
1701	// EndTime: End time of the operation. Required when the operation is
1702	// used in ServiceController.Report, but optional when the operation is
1703	// used in ServiceController.Check.
1704	EndTime string `json:"endTime,omitempty"`
1705
1706	// Extensions: Unimplemented.
1707	Extensions []googleapi.RawMessage `json:"extensions,omitempty"`
1708
1709	// Importance: DO NOT USE. This is an experimental field.
1710	//
1711	// Possible values:
1712	//   "LOW" - Allows data caching, batching, and aggregation. It provides
1713	// higher performance with higher data loss risk.
1714	//   "HIGH" - Disables data aggregation to minimize data loss. It is for
1715	// operations that contains significant monetary value or audit trail.
1716	// This feature only applies to the client libraries.
1717	//   "DEBUG" - Deprecated. Do not use. Disables data aggregation and
1718	// enables additional validation logic. It should only be used during
1719	// the onboarding process. It is only available to Google internal
1720	// services, and the service must be approved by chemist-dev@google.com
1721	// in order to use this level.
1722	Importance string `json:"importance,omitempty"`
1723
1724	// Labels: Labels describing the operation. Only the following labels
1725	// are allowed: - Labels describing monitored resources as defined in
1726	// the service configuration. - Default labels of metric values. When
1727	// specified, labels defined in the metric value override these default.
1728	// - The following labels defined by Google Cloud Platform: -
1729	// `cloud.googleapis.com/location` describing the location where the
1730	// operation happened, - `servicecontrol.googleapis.com/user_agent`
1731	// describing the user agent of the API request, -
1732	// `servicecontrol.googleapis.com/service_agent` describing the service
1733	// used to handle the API request (e.g. ESP), -
1734	// `servicecontrol.googleapis.com/platform` describing the platform
1735	// where the API is served, such as App Engine, Compute Engine, or
1736	// Kubernetes Engine.
1737	Labels map[string]string `json:"labels,omitempty"`
1738
1739	// LogEntries: Represents information to be logged.
1740	LogEntries []*LogEntry `json:"logEntries,omitempty"`
1741
1742	// MetricValueSets: Represents information about this operation. Each
1743	// MetricValueSet corresponds to a metric defined in the service
1744	// configuration. The data type used in the MetricValueSet must agree
1745	// with the data type specified in the metric definition. Within a
1746	// single operation, it is not allowed to have more than one MetricValue
1747	// instances that have the same metric names and identical label value
1748	// combinations. If a request has such duplicated MetricValue instances,
1749	// the entire request is rejected with an invalid argument error.
1750	MetricValueSets []*MetricValueSet `json:"metricValueSets,omitempty"`
1751
1752	// OperationId: Identity of the operation. This must be unique within
1753	// the scope of the service that generated the operation. If the service
1754	// calls Check() and Report() on the same operation, the two calls
1755	// should carry the same id. UUID version 4 is recommended, though not
1756	// required. In scenarios where an operation is computed from existing
1757	// information and an idempotent id is desirable for deduplication
1758	// purpose, UUID version 5 is recommended. See RFC 4122 for details.
1759	OperationId string `json:"operationId,omitempty"`
1760
1761	// OperationName: Fully qualified name of the operation. Reserved for
1762	// future use.
1763	OperationName string `json:"operationName,omitempty"`
1764
1765	// QuotaProperties: Represents the properties needed for quota check.
1766	// Applicable only if this operation is for a quota check request. If
1767	// this is not specified, no quota check will be performed.
1768	QuotaProperties *QuotaProperties `json:"quotaProperties,omitempty"`
1769
1770	// Resources: The resources that are involved in the operation. The
1771	// maximum supported number of entries in this field is 100.
1772	Resources []*ResourceInfo `json:"resources,omitempty"`
1773
1774	// StartTime: Required. Start time of the operation.
1775	StartTime string `json:"startTime,omitempty"`
1776
1777	// TraceSpans: Unimplemented. A list of Cloud Trace spans. The span
1778	// names shall contain the id of the destination project which can be
1779	// either the produce or the consumer project.
1780	TraceSpans []*TraceSpan `json:"traceSpans,omitempty"`
1781
1782	// UserLabels: Private Preview. This feature is only available for
1783	// approved services. User defined labels for the resource that this
1784	// operation is associated with.
1785	UserLabels map[string]string `json:"userLabels,omitempty"`
1786
1787	// ForceSendFields is a list of field names (e.g. "ConsumerId") to
1788	// unconditionally include in API requests. By default, fields with
1789	// empty values are omitted from API requests. However, any non-pointer,
1790	// non-interface field appearing in ForceSendFields will be sent to the
1791	// server regardless of whether the field is empty or not. This may be
1792	// used to include empty fields in Patch requests.
1793	ForceSendFields []string `json:"-"`
1794
1795	// NullFields is a list of field names (e.g. "ConsumerId") to include in
1796	// API requests with the JSON null value. By default, fields with empty
1797	// values are omitted from API requests. However, any field with an
1798	// empty value appearing in NullFields will be sent to the server as
1799	// null. It is an error if a field in this list has a non-empty value.
1800	// This may be used to include null fields in Patch requests.
1801	NullFields []string `json:"-"`
1802}
1803
1804func (s *Operation) MarshalJSON() ([]byte, error) {
1805	type NoMethod Operation
1806	raw := NoMethod(*s)
1807	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1808}
1809
1810// Peer: This message defines attributes for a node that handles a
1811// network request. The node can be either a service or an application
1812// that sends, forwards, or receives the request. Service peers should
1813// fill in `principal` and `labels` as appropriate.
1814type Peer struct {
1815	// Ip: The IP address of the peer.
1816	Ip string `json:"ip,omitempty"`
1817
1818	// Labels: The labels associated with the peer.
1819	Labels map[string]string `json:"labels,omitempty"`
1820
1821	// Port: The network port of the peer.
1822	Port int64 `json:"port,omitempty,string"`
1823
1824	// Principal: The identity of this peer. Similar to
1825	// `Request.auth.principal`, but relative to the peer instead of the
1826	// request. For example, the idenity associated with a load balancer
1827	// that forwared the request.
1828	Principal string `json:"principal,omitempty"`
1829
1830	// RegionCode: The CLDR country/region code associated with the above IP
1831	// address. If the IP address is private, the `region_code` should
1832	// reflect the physical location where this peer is running.
1833	RegionCode string `json:"regionCode,omitempty"`
1834
1835	// ForceSendFields is a list of field names (e.g. "Ip") to
1836	// unconditionally include in API requests. By default, fields with
1837	// empty values are omitted from API requests. However, any non-pointer,
1838	// non-interface field appearing in ForceSendFields will be sent to the
1839	// server regardless of whether the field is empty or not. This may be
1840	// used to include empty fields in Patch requests.
1841	ForceSendFields []string `json:"-"`
1842
1843	// NullFields is a list of field names (e.g. "Ip") to include in API
1844	// requests with the JSON null value. By default, fields with empty
1845	// values are omitted from API requests. However, any field with an
1846	// empty value appearing in NullFields will be sent to the server as
1847	// null. It is an error if a field in this list has a non-empty value.
1848	// This may be used to include null fields in Patch requests.
1849	NullFields []string `json:"-"`
1850}
1851
1852func (s *Peer) MarshalJSON() ([]byte, error) {
1853	type NoMethod Peer
1854	raw := NoMethod(*s)
1855	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1856}
1857
1858// QuotaError: Represents error information for QuotaOperation.
1859type QuotaError struct {
1860	// Code: Error code.
1861	//
1862	// Possible values:
1863	//   "UNSPECIFIED" - This is never used.
1864	//   "RESOURCE_EXHAUSTED" - Quota allocation failed. Same as
1865	// google.rpc.Code.RESOURCE_EXHAUSTED.
1866	//   "OUT_OF_RANGE" - Quota release failed. This error is ONLY returned
1867	// on a NORMAL release. More formally: if a user requests a release of
1868	// 10 tokens, but only 5 tokens were previously allocated, in a
1869	// BEST_EFFORT release, this will be considered a success, 5 tokens will
1870	// be released, and the result will be "Ok". If this is done in NORMAL
1871	// mode, no tokens will be released, and an OUT_OF_RANGE error will be
1872	// returned. Same as google.rpc.Code.OUT_OF_RANGE.
1873	//   "BILLING_NOT_ACTIVE" - Consumer cannot access the service because
1874	// the service requires active billing.
1875	//   "PROJECT_DELETED" - Consumer's project has been marked as deleted
1876	// (soft deletion).
1877	//   "API_KEY_INVALID" - Specified API key is invalid.
1878	//   "API_KEY_EXPIRED" - Specified API Key has expired.
1879	//   "SPATULA_HEADER_INVALID" - Consumer's spatula header is invalid.
1880	//   "LOAS_ROLE_INVALID" - The consumer's LOAS role is invalid.
1881	//   "NO_LOAS_PROJECT" - The consumer's LOAS role has no associated
1882	// project.
1883	//   "PROJECT_STATUS_UNAVAILABLE" - The backend server for looking up
1884	// project id/number is unavailable.
1885	//   "SERVICE_STATUS_UNAVAILABLE" - The backend server for checking
1886	// service status is unavailable.
1887	//   "BILLING_STATUS_UNAVAILABLE" - The backend server for checking
1888	// billing status is unavailable.
1889	//   "QUOTA_SYSTEM_UNAVAILABLE" - The backend server for checking quota
1890	// limits is unavailable.
1891	Code string `json:"code,omitempty"`
1892
1893	// Description: Free-form text that provides details on the cause of the
1894	// error.
1895	Description string `json:"description,omitempty"`
1896
1897	// Status: Contains additional information about the quota error. If
1898	// available, `status.code` will be non zero.
1899	Status *Status `json:"status,omitempty"`
1900
1901	// Subject: Subject to whom this error applies. See the specific enum
1902	// for more details on this field. For example, "clientip:" or
1903	// "project:".
1904	Subject string `json:"subject,omitempty"`
1905
1906	// ForceSendFields is a list of field names (e.g. "Code") to
1907	// unconditionally include in API requests. By default, fields with
1908	// empty values are omitted from API requests. However, any non-pointer,
1909	// non-interface field appearing in ForceSendFields will be sent to the
1910	// server regardless of whether the field is empty or not. This may be
1911	// used to include empty fields in Patch requests.
1912	ForceSendFields []string `json:"-"`
1913
1914	// NullFields is a list of field names (e.g. "Code") to include in API
1915	// requests with the JSON null value. By default, fields with empty
1916	// values are omitted from API requests. However, any field with an
1917	// empty value appearing in NullFields will be sent to the server as
1918	// null. It is an error if a field in this list has a non-empty value.
1919	// This may be used to include null fields in Patch requests.
1920	NullFields []string `json:"-"`
1921}
1922
1923func (s *QuotaError) MarshalJSON() ([]byte, error) {
1924	type NoMethod QuotaError
1925	raw := NoMethod(*s)
1926	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1927}
1928
1929// QuotaInfo: Contains the quota information for a quota check response.
1930type QuotaInfo struct {
1931	// LimitExceeded: Quota Metrics that have exceeded quota limits. For
1932	// QuotaGroup-based quota, this is QuotaGroup.name For QuotaLimit-based
1933	// quota, this is QuotaLimit.name See: google.api.Quota Deprecated: Use
1934	// quota_metrics to get per quota group limit exceeded status.
1935	LimitExceeded []string `json:"limitExceeded,omitempty"`
1936
1937	// QuotaConsumed: Map of quota group name to the actual number of tokens
1938	// consumed. If the quota check was not successful, then this will not
1939	// be populated due to no quota consumption. We are not merging this
1940	// field with 'quota_metrics' field because of the complexity of scaling
1941	// in Chemist client code base. For simplicity, we will keep this field
1942	// for Castor (that scales quota usage) and 'quota_metrics' for
1943	// SuperQuota (that doesn't scale quota usage).
1944	QuotaConsumed map[string]int64 `json:"quotaConsumed,omitempty"`
1945
1946	// QuotaMetrics: Quota metrics to indicate the usage. Depending on the
1947	// check request, one or more of the following metrics will be included:
1948	// 1. For rate quota, per quota group or per quota metric incremental
1949	// usage will be specified using the following delta metric:
1950	// "serviceruntime.googleapis.com/api/consumer/quota_used_count" 2. For
1951	// allocation quota, per quota metric total usage will be specified
1952	// using the following gauge metric:
1953	// "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
1954	// 3. For both rate quota and allocation quota, the quota limit reached
1955	// condition will be specified using the following boolean metric:
1956	// "serviceruntime.googleapis.com/quota/exceeded"
1957	QuotaMetrics []*MetricValueSet `json:"quotaMetrics,omitempty"`
1958
1959	// ForceSendFields is a list of field names (e.g. "LimitExceeded") to
1960	// unconditionally include in API requests. By default, fields with
1961	// empty values are omitted from API requests. However, any non-pointer,
1962	// non-interface field appearing in ForceSendFields will be sent to the
1963	// server regardless of whether the field is empty or not. This may be
1964	// used to include empty fields in Patch requests.
1965	ForceSendFields []string `json:"-"`
1966
1967	// NullFields is a list of field names (e.g. "LimitExceeded") to include
1968	// in API requests with the JSON null value. By default, fields with
1969	// empty values are omitted from API requests. However, any field with
1970	// an empty value appearing in NullFields will be sent to the server as
1971	// null. It is an error if a field in this list has a non-empty value.
1972	// This may be used to include null fields in Patch requests.
1973	NullFields []string `json:"-"`
1974}
1975
1976func (s *QuotaInfo) MarshalJSON() ([]byte, error) {
1977	type NoMethod QuotaInfo
1978	raw := NoMethod(*s)
1979	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1980}
1981
1982// QuotaOperation: Represents information regarding a quota operation.
1983type QuotaOperation struct {
1984	// ConsumerId: Identity of the consumer for whom this quota operation is
1985	// being performed. This can be in one of the following formats:
1986	// project:, project_number:, api_key:.
1987	ConsumerId string `json:"consumerId,omitempty"`
1988
1989	// Labels: Labels describing the operation.
1990	Labels map[string]string `json:"labels,omitempty"`
1991
1992	// MethodName: Fully qualified name of the API method for which this
1993	// quota operation is requested. This name is used for matching quota
1994	// rules or metric rules and billing status rules defined in service
1995	// configuration. This field should not be set if any of the following
1996	// is true: (1) the quota operation is performed on non-API resources.
1997	// (2) quota_metrics is set because the caller is doing quota override.
1998	// Example of an RPC method name:
1999	// google.example.library.v1.LibraryService.CreateShelf
2000	MethodName string `json:"methodName,omitempty"`
2001
2002	// OperationId: Identity of the operation. This is expected to be unique
2003	// within the scope of the service that generated the operation, and
2004	// guarantees idempotency in case of retries. In order to ensure best
2005	// performance and latency in the Quota backends, operation_ids are
2006	// optimally associated with time, so that related operations can be
2007	// accessed fast in storage. For this reason, the recommended token for
2008	// services that intend to operate at a high QPS is Unix time in nanos +
2009	// UUID
2010	OperationId string `json:"operationId,omitempty"`
2011
2012	// QuotaMetrics: Represents information about this operation. Each
2013	// MetricValueSet corresponds to a metric defined in the service
2014	// configuration. The data type used in the MetricValueSet must agree
2015	// with the data type specified in the metric definition. Within a
2016	// single operation, it is not allowed to have more than one MetricValue
2017	// instances that have the same metric names and identical label value
2018	// combinations. If a request has such duplicated MetricValue instances,
2019	// the entire request is rejected with an invalid argument error. This
2020	// field is mutually exclusive with method_name.
2021	QuotaMetrics []*MetricValueSet `json:"quotaMetrics,omitempty"`
2022
2023	// QuotaMode: Quota mode for this operation.
2024	//
2025	// Possible values:
2026	//   "UNSPECIFIED" - Guard against implicit default. Must not be used.
2027	//   "NORMAL" - For AllocateQuota request, allocates quota for the
2028	// amount specified in the service configuration or specified using the
2029	// quota metrics. If the amount is higher than the available quota,
2030	// allocation error will be returned and no quota will be allocated. If
2031	// multiple quotas are part of the request, and one fails, none of the
2032	// quotas are allocated or released.
2033	//   "BEST_EFFORT" - The operation allocates quota for the amount
2034	// specified in the service configuration or specified using the quota
2035	// metrics. If the amount is higher than the available quota, request
2036	// does not fail but all available quota will be allocated. For rate
2037	// quota, BEST_EFFORT will continue to deduct from other groups even if
2038	// one does not have enough quota. For allocation, it will find the
2039	// minimum available amount across all groups and deduct that amount
2040	// from all the affected groups.
2041	//   "CHECK_ONLY" - For AllocateQuota request, only checks if there is
2042	// enough quota available and does not change the available quota. No
2043	// lock is placed on the available quota either.
2044	//   "QUERY_ONLY" - Unimplemented. When used in AllocateQuotaRequest,
2045	// this returns the effective quota limit(s) in the response, and no
2046	// quota check will be performed. Not supported for other requests, and
2047	// even for AllocateQuotaRequest, this is currently supported only for
2048	// allowlisted services.
2049	//   "ADJUST_ONLY" - The operation allocates quota for the amount
2050	// specified in the service configuration or specified using the quota
2051	// metrics. If the requested amount is higher than the available quota,
2052	// request does not fail and remaining quota would become negative
2053	// (going over the limit). Not supported for Rate Quota.
2054	QuotaMode string `json:"quotaMode,omitempty"`
2055
2056	// ForceSendFields is a list of field names (e.g. "ConsumerId") to
2057	// unconditionally include in API requests. By default, fields with
2058	// empty values are omitted from API requests. However, any non-pointer,
2059	// non-interface field appearing in ForceSendFields will be sent to the
2060	// server regardless of whether the field is empty or not. This may be
2061	// used to include empty fields in Patch requests.
2062	ForceSendFields []string `json:"-"`
2063
2064	// NullFields is a list of field names (e.g. "ConsumerId") to include in
2065	// API requests with the JSON null value. By default, fields with empty
2066	// values are omitted from API requests. However, any field with an
2067	// empty value appearing in NullFields will be sent to the server as
2068	// null. It is an error if a field in this list has a non-empty value.
2069	// This may be used to include null fields in Patch requests.
2070	NullFields []string `json:"-"`
2071}
2072
2073func (s *QuotaOperation) MarshalJSON() ([]byte, error) {
2074	type NoMethod QuotaOperation
2075	raw := NoMethod(*s)
2076	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2077}
2078
2079// QuotaProperties: Represents the properties needed for quota
2080// operations.
2081type QuotaProperties struct {
2082	// QuotaMode: Quota mode for this operation.
2083	//
2084	// Possible values:
2085	//   "ACQUIRE" - Decreases available quota by the cost specified for the
2086	// operation. If cost is higher than available quota, operation fails
2087	// and returns error.
2088	//   "ACQUIRE_BEST_EFFORT" - Decreases available quota by the cost
2089	// specified for the operation. If cost is higher than available quota,
2090	// operation does not fail and available quota goes down to zero but it
2091	// returns error.
2092	//   "CHECK" - Does not change any available quota. Only checks if there
2093	// is enough quota. No lock is placed on the checked tokens neither.
2094	//   "RELEASE" - DEPRECATED: Increases available quota by the operation
2095	// cost specified for the operation.
2096	QuotaMode string `json:"quotaMode,omitempty"`
2097
2098	// ForceSendFields is a list of field names (e.g. "QuotaMode") to
2099	// unconditionally include in API requests. By default, fields with
2100	// empty values are omitted from API requests. However, any non-pointer,
2101	// non-interface field appearing in ForceSendFields will be sent to the
2102	// server regardless of whether the field is empty or not. This may be
2103	// used to include empty fields in Patch requests.
2104	ForceSendFields []string `json:"-"`
2105
2106	// NullFields is a list of field names (e.g. "QuotaMode") to include in
2107	// API requests with the JSON null value. By default, fields with empty
2108	// values are omitted from API requests. However, any field with an
2109	// empty value appearing in NullFields will be sent to the server as
2110	// null. It is an error if a field in this list has a non-empty value.
2111	// This may be used to include null fields in Patch requests.
2112	NullFields []string `json:"-"`
2113}
2114
2115func (s *QuotaProperties) MarshalJSON() ([]byte, error) {
2116	type NoMethod QuotaProperties
2117	raw := NoMethod(*s)
2118	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2119}
2120
2121// ReportError: Represents the processing error of one Operation in the
2122// request.
2123type ReportError struct {
2124	// OperationId: The Operation.operation_id value from the request.
2125	OperationId string `json:"operationId,omitempty"`
2126
2127	// Status: Details of the error when processing the Operation.
2128	Status *Status `json:"status,omitempty"`
2129
2130	// ForceSendFields is a list of field names (e.g. "OperationId") to
2131	// unconditionally include in API requests. By default, fields with
2132	// empty values are omitted from API requests. However, any non-pointer,
2133	// non-interface field appearing in ForceSendFields will be sent to the
2134	// server regardless of whether the field is empty or not. This may be
2135	// used to include empty fields in Patch requests.
2136	ForceSendFields []string `json:"-"`
2137
2138	// NullFields is a list of field names (e.g. "OperationId") to include
2139	// in API requests with the JSON null value. By default, fields with
2140	// empty values are omitted from API requests. However, any field with
2141	// an empty value appearing in NullFields will be sent to the server as
2142	// null. It is an error if a field in this list has a non-empty value.
2143	// This may be used to include null fields in Patch requests.
2144	NullFields []string `json:"-"`
2145}
2146
2147func (s *ReportError) MarshalJSON() ([]byte, error) {
2148	type NoMethod ReportError
2149	raw := NoMethod(*s)
2150	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2151}
2152
2153// ReportRequest: Request message for the Report method.
2154type ReportRequest struct {
2155	// Operations: Operations to be reported. Typically the service should
2156	// report one operation per request. Putting multiple operations into a
2157	// single request is allowed, but should be used only when multiple
2158	// operations are natually available at the time of the report. There is
2159	// no limit on the number of operations in the same ReportRequest,
2160	// however the ReportRequest size should be no larger than 1MB. See
2161	// ReportResponse.report_errors for partial failure behavior.
2162	Operations []*Operation `json:"operations,omitempty"`
2163
2164	// ServiceConfigId: Specifies which version of service config should be
2165	// used to process the request. If unspecified or no matching version
2166	// can be found, the latest one will be used.
2167	ServiceConfigId string `json:"serviceConfigId,omitempty"`
2168
2169	// ForceSendFields is a list of field names (e.g. "Operations") to
2170	// unconditionally include in API requests. By default, fields with
2171	// empty values are omitted from API requests. However, any non-pointer,
2172	// non-interface field appearing in ForceSendFields will be sent to the
2173	// server regardless of whether the field is empty or not. This may be
2174	// used to include empty fields in Patch requests.
2175	ForceSendFields []string `json:"-"`
2176
2177	// NullFields is a list of field names (e.g. "Operations") to include in
2178	// API requests with the JSON null value. By default, fields with empty
2179	// values are omitted from API requests. However, any field with an
2180	// empty value appearing in NullFields will be sent to the server as
2181	// null. It is an error if a field in this list has a non-empty value.
2182	// This may be used to include null fields in Patch requests.
2183	NullFields []string `json:"-"`
2184}
2185
2186func (s *ReportRequest) MarshalJSON() ([]byte, error) {
2187	type NoMethod ReportRequest
2188	raw := NoMethod(*s)
2189	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2190}
2191
2192// ReportResponse: Response message for the Report method.
2193type ReportResponse struct {
2194	// ReportErrors: Partial failures, one for each `Operation` in the
2195	// request that failed processing. There are three possible combinations
2196	// of the RPC status: 1. The combination of a successful RPC status and
2197	// an empty `report_errors` list indicates a complete success where all
2198	// `Operations` in the request are processed successfully. 2. The
2199	// combination of a successful RPC status and a non-empty
2200	// `report_errors` list indicates a partial success where some
2201	// `Operations` in the request succeeded. Each `Operation` that failed
2202	// processing has a corresponding item in this list. 3. A failed RPC
2203	// status indicates a general non-deterministic failure. When this
2204	// happens, it's impossible to know which of the 'Operations' in the
2205	// request succeeded or failed.
2206	ReportErrors []*ReportError `json:"reportErrors,omitempty"`
2207
2208	// ServiceConfigId: The actual config id used to process the request.
2209	ServiceConfigId string `json:"serviceConfigId,omitempty"`
2210
2211	// ServiceRolloutId: The current service rollout id used to process the
2212	// request.
2213	ServiceRolloutId string `json:"serviceRolloutId,omitempty"`
2214
2215	// ServerResponse contains the HTTP response code and headers from the
2216	// server.
2217	googleapi.ServerResponse `json:"-"`
2218
2219	// ForceSendFields is a list of field names (e.g. "ReportErrors") to
2220	// unconditionally include in API requests. By default, fields with
2221	// empty values are omitted from API requests. However, any non-pointer,
2222	// non-interface field appearing in ForceSendFields will be sent to the
2223	// server regardless of whether the field is empty or not. This may be
2224	// used to include empty fields in Patch requests.
2225	ForceSendFields []string `json:"-"`
2226
2227	// NullFields is a list of field names (e.g. "ReportErrors") to include
2228	// in API requests with the JSON null value. By default, fields with
2229	// empty values are omitted from API requests. However, any field with
2230	// an empty value appearing in NullFields will be sent to the server as
2231	// null. It is an error if a field in this list has a non-empty value.
2232	// This may be used to include null fields in Patch requests.
2233	NullFields []string `json:"-"`
2234}
2235
2236func (s *ReportResponse) MarshalJSON() ([]byte, error) {
2237	type NoMethod ReportResponse
2238	raw := NoMethod(*s)
2239	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2240}
2241
2242// Request: This message defines attributes for an HTTP request. If the
2243// actual request is not an HTTP request, the runtime system should try
2244// to map the actual request to an equivalent HTTP request.
2245type Request struct {
2246	// Auth: The request authentication. May be absent for unauthenticated
2247	// requests. Derived from the HTTP request `Authorization` header or
2248	// equivalent.
2249	Auth *Auth `json:"auth,omitempty"`
2250
2251	// Headers: The HTTP request headers. If multiple headers share the same
2252	// key, they must be merged according to the HTTP spec. All header keys
2253	// must be lowercased, because HTTP header keys are case-insensitive.
2254	Headers map[string]string `json:"headers,omitempty"`
2255
2256	// Host: The HTTP request `Host` header value.
2257	Host string `json:"host,omitempty"`
2258
2259	// Id: The unique ID for a request, which can be propagated to
2260	// downstream systems. The ID should have low probability of collision
2261	// within a single day for a specific service.
2262	Id string `json:"id,omitempty"`
2263
2264	// Method: The HTTP request method, such as `GET`, `POST`.
2265	Method string `json:"method,omitempty"`
2266
2267	// Path: The HTTP URL path, excluding the query parameters.
2268	Path string `json:"path,omitempty"`
2269
2270	// Protocol: The network protocol used with the request, such as
2271	// "http/1.1", "spdy/3", "h2", "h2c", "webrtc", "tcp", "udp", "quic".
2272	// See
2273	// https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
2274	// for details.
2275	Protocol string `json:"protocol,omitempty"`
2276
2277	// Query: The HTTP URL query in the format of
2278	// `name1=value1&name2=value2`, as it appears in the first line of the
2279	// HTTP request. No decoding is performed.
2280	Query string `json:"query,omitempty"`
2281
2282	// Reason: A special parameter for request reason. It is used by
2283	// security systems to associate auditing information with a request.
2284	Reason string `json:"reason,omitempty"`
2285
2286	// Scheme: The HTTP URL scheme, such as `http` and `https`.
2287	Scheme string `json:"scheme,omitempty"`
2288
2289	// Size: The HTTP request size in bytes. If unknown, it must be -1.
2290	Size int64 `json:"size,omitempty,string"`
2291
2292	// Time: The timestamp when the `destination` service receives the last
2293	// byte of the request.
2294	Time string `json:"time,omitempty"`
2295
2296	// ForceSendFields is a list of field names (e.g. "Auth") to
2297	// unconditionally include in API requests. By default, fields with
2298	// empty values are omitted from API requests. However, any non-pointer,
2299	// non-interface field appearing in ForceSendFields will be sent to the
2300	// server regardless of whether the field is empty or not. This may be
2301	// used to include empty fields in Patch requests.
2302	ForceSendFields []string `json:"-"`
2303
2304	// NullFields is a list of field names (e.g. "Auth") to include in API
2305	// requests with the JSON null value. By default, fields with empty
2306	// values are omitted from API requests. However, any field with an
2307	// empty value appearing in NullFields will be sent to the server as
2308	// null. It is an error if a field in this list has a non-empty value.
2309	// This may be used to include null fields in Patch requests.
2310	NullFields []string `json:"-"`
2311}
2312
2313func (s *Request) MarshalJSON() ([]byte, error) {
2314	type NoMethod Request
2315	raw := NoMethod(*s)
2316	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2317}
2318
2319// RequestMetadata: Metadata about the request.
2320type RequestMetadata struct {
2321	// CallerIp: The IP address of the caller. For caller from internet,
2322	// this will be public IPv4 or IPv6 address. For caller from a Compute
2323	// Engine VM with external IP address, this will be the VM's external IP
2324	// address. For caller from a Compute Engine VM without external IP
2325	// address, if the VM is in the same organization (or project) as the
2326	// accessed resource, `caller_ip` will be the VM's internal IPv4
2327	// address, otherwise the `caller_ip` will be redacted to
2328	// "gce-internal-ip". See https://cloud.google.com/compute/docs/vpc/ for
2329	// more information.
2330	CallerIp string `json:"callerIp,omitempty"`
2331
2332	// CallerNetwork: The network of the caller. Set only if the network
2333	// host project is part of the same GCP organization (or project) as the
2334	// accessed resource. See https://cloud.google.com/compute/docs/vpc/ for
2335	// more information. This is a scheme-less URI full resource name. For
2336	// example:
2337	// "//compute.googleapis.com/projects/PROJECT_ID/global/networks/NETWORK_
2338	// ID"
2339	CallerNetwork string `json:"callerNetwork,omitempty"`
2340
2341	// CallerSuppliedUserAgent: The user agent of the caller. This
2342	// information is not authenticated and should be treated accordingly.
2343	// For example: + `google-api-python-client/1.4.0`: The request was made
2344	// by the Google API client for Python. + `Cloud SDK Command Line Tool
2345	// apitools-client/1.0 gcloud/0.9.62`: The request was made by the
2346	// Google Cloud SDK CLI (gcloud). + `AppEngine-Google;
2347	// (+http://code.google.com/appengine; appid: s~my-project`: The request
2348	// was made from the `my-project` App Engine app. NOLINT
2349	CallerSuppliedUserAgent string `json:"callerSuppliedUserAgent,omitempty"`
2350
2351	// DestinationAttributes: The destination of a network activity, such as
2352	// accepting a TCP connection. In a multi hop network activity, the
2353	// destination represents the receiver of the last hop. Only two fields
2354	// are used in this message, Peer.port and Peer.ip. These fields are
2355	// optionally populated by those services utilizing the IAM condition
2356	// feature.
2357	DestinationAttributes *Peer `json:"destinationAttributes,omitempty"`
2358
2359	// RequestAttributes: Request attributes used in IAM condition
2360	// evaluation. This field contains request attributes like request time
2361	// and access levels associated with the request. To get the whole view
2362	// of the attributes used in IAM condition evaluation, the user must
2363	// also look into `AuditLog.authentication_info.resource_attributes`.
2364	RequestAttributes *Request `json:"requestAttributes,omitempty"`
2365
2366	// ForceSendFields is a list of field names (e.g. "CallerIp") to
2367	// unconditionally include in API requests. By default, fields with
2368	// empty values are omitted from API requests. However, any non-pointer,
2369	// non-interface field appearing in ForceSendFields will be sent to the
2370	// server regardless of whether the field is empty or not. This may be
2371	// used to include empty fields in Patch requests.
2372	ForceSendFields []string `json:"-"`
2373
2374	// NullFields is a list of field names (e.g. "CallerIp") to include in
2375	// API requests with the JSON null value. By default, fields with empty
2376	// values are omitted from API requests. However, any field with an
2377	// empty value appearing in NullFields will be sent to the server as
2378	// null. It is an error if a field in this list has a non-empty value.
2379	// This may be used to include null fields in Patch requests.
2380	NullFields []string `json:"-"`
2381}
2382
2383func (s *RequestMetadata) MarshalJSON() ([]byte, error) {
2384	type NoMethod RequestMetadata
2385	raw := NoMethod(*s)
2386	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2387}
2388
2389// Resource: This message defines core attributes for a resource. A
2390// resource is an addressable (named) entity provided by the destination
2391// service. For example, a file stored on a network storage service.
2392type Resource struct {
2393	// Annotations: Annotations is an unstructured key-value map stored with
2394	// a resource that may be set by external tools to store and retrieve
2395	// arbitrary metadata. They are not queryable and should be preserved
2396	// when modifying objects. More info:
2397	// https://kubernetes.io/docs/user-guide/annotations
2398	Annotations map[string]string `json:"annotations,omitempty"`
2399
2400	// CreateTime: Output only. The timestamp when the resource was created.
2401	// This may be either the time creation was initiated or when it was
2402	// completed.
2403	CreateTime string `json:"createTime,omitempty"`
2404
2405	// DeleteTime: Output only. The timestamp when the resource was deleted.
2406	// If the resource is not deleted, this must be empty.
2407	DeleteTime string `json:"deleteTime,omitempty"`
2408
2409	// DisplayName: Mutable. The display name set by clients. Must be <= 63
2410	// characters.
2411	DisplayName string `json:"displayName,omitempty"`
2412
2413	// Etag: Output only. An opaque value that uniquely identifies a version
2414	// or generation of a resource. It can be used to confirm that the
2415	// client and server agree on the ordering of a resource being written.
2416	Etag string `json:"etag,omitempty"`
2417
2418	// Labels: The labels or tags on the resource, such as AWS resource tags
2419	// and Kubernetes resource labels.
2420	Labels map[string]string `json:"labels,omitempty"`
2421
2422	// Location: Immutable. The location of the resource. The location
2423	// encoding is specific to the service provider, and new encoding may be
2424	// introduced as the service evolves. For Google Cloud products, the
2425	// encoding is what is used by Google Cloud APIs, such as `us-east1`,
2426	// `aws-us-east-1`, and `azure-eastus2`. The semantics of `location` is
2427	// identical to the `cloud.googleapis.com/location` label used by some
2428	// Google Cloud APIs.
2429	Location string `json:"location,omitempty"`
2430
2431	// Name: The stable identifier (name) of a resource on the `service`. A
2432	// resource can be logically identified as
2433	// "//{resource.service}/{resource.name}". The differences between a
2434	// resource name and a URI are: * Resource name is a logical identifier,
2435	// independent of network protocol and API version. For example,
2436	// `//pubsub.googleapis.com/projects/123/topics/news-feed`. * URI often
2437	// includes protocol and version information, so it can be used directly
2438	// by applications. For example,
2439	// `https://pubsub.googleapis.com/v1/projects/123/topics/news-feed`. See
2440	// https://cloud.google.com/apis/design/resource_names for details.
2441	Name string `json:"name,omitempty"`
2442
2443	// Service: The name of the service that this resource belongs to, such
2444	// as `pubsub.googleapis.com`. The service may be different from the DNS
2445	// hostname that actually serves the request.
2446	Service string `json:"service,omitempty"`
2447
2448	// Type: The type of the resource. The syntax is platform-specific
2449	// because different platforms define their resources differently. For
2450	// Google APIs, the type format must be "{service}/{kind}".
2451	Type string `json:"type,omitempty"`
2452
2453	// Uid: The unique identifier of the resource. UID is unique in the time
2454	// and space for this resource within the scope of the service. It is
2455	// typically generated by the server on successful creation of a
2456	// resource and must not be changed. UID is used to uniquely identify
2457	// resources with resource name reuses. This should be a UUID4.
2458	Uid string `json:"uid,omitempty"`
2459
2460	// UpdateTime: Output only. The timestamp when the resource was last
2461	// updated. Any change to the resource made by users must refresh this
2462	// value. Changes to a resource made by the service should refresh this
2463	// value.
2464	UpdateTime string `json:"updateTime,omitempty"`
2465
2466	// ForceSendFields is a list of field names (e.g. "Annotations") to
2467	// unconditionally include in API requests. By default, fields with
2468	// empty values are omitted from API requests. However, any non-pointer,
2469	// non-interface field appearing in ForceSendFields will be sent to the
2470	// server regardless of whether the field is empty or not. This may be
2471	// used to include empty fields in Patch requests.
2472	ForceSendFields []string `json:"-"`
2473
2474	// NullFields is a list of field names (e.g. "Annotations") to include
2475	// in API requests with the JSON null value. By default, fields with
2476	// empty values are omitted from API requests. However, any field with
2477	// an empty value appearing in NullFields will be sent to the server as
2478	// null. It is an error if a field in this list has a non-empty value.
2479	// This may be used to include null fields in Patch requests.
2480	NullFields []string `json:"-"`
2481}
2482
2483func (s *Resource) MarshalJSON() ([]byte, error) {
2484	type NoMethod Resource
2485	raw := NoMethod(*s)
2486	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2487}
2488
2489// ResourceInfo: Describes a resource associated with this operation.
2490type ResourceInfo struct {
2491	// ResourceContainer: The identifier of the parent of this resource
2492	// instance. Must be in one of the following formats: - `projects/` -
2493	// `folders/` - `organizations/`
2494	ResourceContainer string `json:"resourceContainer,omitempty"`
2495
2496	// ResourceLocation: The location of the resource. If not empty, the
2497	// resource will be checked against location policy. The value must be a
2498	// valid zone, region or multiregion. For example: "europe-west4" or
2499	// "northamerica-northeast1-a"
2500	ResourceLocation string `json:"resourceLocation,omitempty"`
2501
2502	// ResourceName: Name of the resource. This is used for auditing
2503	// purposes.
2504	ResourceName string `json:"resourceName,omitempty"`
2505
2506	// ForceSendFields is a list of field names (e.g. "ResourceContainer")
2507	// to unconditionally include in API requests. By default, fields with
2508	// empty values are omitted from API requests. However, any non-pointer,
2509	// non-interface field appearing in ForceSendFields will be sent to the
2510	// server regardless of whether the field is empty or not. This may be
2511	// used to include empty fields in Patch requests.
2512	ForceSendFields []string `json:"-"`
2513
2514	// NullFields is a list of field names (e.g. "ResourceContainer") to
2515	// include in API requests with the JSON null value. By default, fields
2516	// with empty values are omitted from API requests. However, any field
2517	// with an empty value appearing in NullFields will be sent to the
2518	// server as null. It is an error if a field in this list has a
2519	// non-empty value. This may be used to include null fields in Patch
2520	// requests.
2521	NullFields []string `json:"-"`
2522}
2523
2524func (s *ResourceInfo) MarshalJSON() ([]byte, error) {
2525	type NoMethod ResourceInfo
2526	raw := NoMethod(*s)
2527	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2528}
2529
2530// ResourceLocation: Location information about a resource.
2531type ResourceLocation struct {
2532	// CurrentLocations: The locations of a resource after the execution of
2533	// the operation. Requests to create or delete a location based resource
2534	// must populate the 'current_locations' field and not the
2535	// 'original_locations' field. For example: "europe-west1-a" "us-east1"
2536	// "nam3"
2537	CurrentLocations []string `json:"currentLocations,omitempty"`
2538
2539	// OriginalLocations: The locations of a resource prior to the execution
2540	// of the operation. Requests that mutate the resource's location must
2541	// populate both the 'original_locations' as well as the
2542	// 'current_locations' fields. For example: "europe-west1-a" "us-east1"
2543	// "nam3"
2544	OriginalLocations []string `json:"originalLocations,omitempty"`
2545
2546	// ForceSendFields is a list of field names (e.g. "CurrentLocations") to
2547	// unconditionally include in API requests. By default, fields with
2548	// empty values are omitted from API requests. However, any non-pointer,
2549	// non-interface field appearing in ForceSendFields will be sent to the
2550	// server regardless of whether the field is empty or not. This may be
2551	// used to include empty fields in Patch requests.
2552	ForceSendFields []string `json:"-"`
2553
2554	// NullFields is a list of field names (e.g. "CurrentLocations") to
2555	// include in API requests with the JSON null value. By default, fields
2556	// with empty values are omitted from API requests. However, any field
2557	// with an empty value appearing in NullFields will be sent to the
2558	// server as null. It is an error if a field in this list has a
2559	// non-empty value. This may be used to include null fields in Patch
2560	// requests.
2561	NullFields []string `json:"-"`
2562}
2563
2564func (s *ResourceLocation) MarshalJSON() ([]byte, error) {
2565	type NoMethod ResourceLocation
2566	raw := NoMethod(*s)
2567	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2568}
2569
2570// ServiceAccountDelegationInfo: Identity delegation history of an
2571// authenticated service account.
2572type ServiceAccountDelegationInfo struct {
2573	// FirstPartyPrincipal: First party (Google) identity as the real
2574	// authority.
2575	FirstPartyPrincipal *FirstPartyPrincipal `json:"firstPartyPrincipal,omitempty"`
2576
2577	// PrincipalSubject: A string representing the principal_subject
2578	// associated with the identity. See go/3pical for more info on how
2579	// principal_subject is formatted.
2580	PrincipalSubject string `json:"principalSubject,omitempty"`
2581
2582	// ThirdPartyPrincipal: Third party identity as the real authority.
2583	ThirdPartyPrincipal *ThirdPartyPrincipal `json:"thirdPartyPrincipal,omitempty"`
2584
2585	// ForceSendFields is a list of field names (e.g. "FirstPartyPrincipal")
2586	// to unconditionally include in API requests. By default, fields with
2587	// empty values are omitted from API requests. However, any non-pointer,
2588	// non-interface field appearing in ForceSendFields will be sent to the
2589	// server regardless of whether the field is empty or not. This may be
2590	// used to include empty fields in Patch requests.
2591	ForceSendFields []string `json:"-"`
2592
2593	// NullFields is a list of field names (e.g. "FirstPartyPrincipal") to
2594	// include in API requests with the JSON null value. By default, fields
2595	// with empty values are omitted from API requests. However, any field
2596	// with an empty value appearing in NullFields will be sent to the
2597	// server as null. It is an error if a field in this list has a
2598	// non-empty value. This may be used to include null fields in Patch
2599	// requests.
2600	NullFields []string `json:"-"`
2601}
2602
2603func (s *ServiceAccountDelegationInfo) MarshalJSON() ([]byte, error) {
2604	type NoMethod ServiceAccountDelegationInfo
2605	raw := NoMethod(*s)
2606	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2607}
2608
2609// SpanContext: The context of a span. This is attached to an Exemplar
2610// in Distribution values during aggregation. It contains the name of a
2611// span with format:
2612// projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID]
2613type SpanContext struct {
2614	// SpanName: The resource name of the span. The format is:
2615	// projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID]
2616	// `[TRACE_ID]` is a unique identifier for a trace within a project; it
2617	// is a 32-character hexadecimal encoding of a 16-byte array.
2618	// `[SPAN_ID]` is a unique identifier for a span within a trace; it is a
2619	// 16-character hexadecimal encoding of an 8-byte array.
2620	SpanName string `json:"spanName,omitempty"`
2621
2622	// ForceSendFields is a list of field names (e.g. "SpanName") to
2623	// unconditionally include in API requests. By default, fields with
2624	// empty values are omitted from API requests. However, any non-pointer,
2625	// non-interface field appearing in ForceSendFields will be sent to the
2626	// server regardless of whether the field is empty or not. This may be
2627	// used to include empty fields in Patch requests.
2628	ForceSendFields []string `json:"-"`
2629
2630	// NullFields is a list of field names (e.g. "SpanName") to include in
2631	// API requests with the JSON null value. By default, fields with empty
2632	// values are omitted from API requests. However, any field with an
2633	// empty value appearing in NullFields will be sent to the server as
2634	// null. It is an error if a field in this list has a non-empty value.
2635	// This may be used to include null fields in Patch requests.
2636	NullFields []string `json:"-"`
2637}
2638
2639func (s *SpanContext) MarshalJSON() ([]byte, error) {
2640	type NoMethod SpanContext
2641	raw := NoMethod(*s)
2642	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2643}
2644
2645// Status: The `Status` type defines a logical error model that is
2646// suitable for different programming environments, including REST APIs
2647// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each
2648// `Status` message contains three pieces of data: error code, error
2649// message, and error details. You can find out more about this error
2650// model and how to work with it in the API Design Guide
2651// (https://cloud.google.com/apis/design/errors).
2652type Status struct {
2653	// Code: The status code, which should be an enum value of
2654	// google.rpc.Code.
2655	Code int64 `json:"code,omitempty"`
2656
2657	// Details: A list of messages that carry the error details. There is a
2658	// common set of message types for APIs to use.
2659	Details []googleapi.RawMessage `json:"details,omitempty"`
2660
2661	// Message: A developer-facing error message, which should be in
2662	// English. Any user-facing error message should be localized and sent
2663	// in the google.rpc.Status.details field, or localized by the client.
2664	Message string `json:"message,omitempty"`
2665
2666	// ForceSendFields is a list of field names (e.g. "Code") to
2667	// unconditionally include in API requests. By default, fields with
2668	// empty values are omitted from API requests. However, any non-pointer,
2669	// non-interface field appearing in ForceSendFields will be sent to the
2670	// server regardless of whether the field is empty or not. This may be
2671	// used to include empty fields in Patch requests.
2672	ForceSendFields []string `json:"-"`
2673
2674	// NullFields is a list of field names (e.g. "Code") to include in API
2675	// requests with the JSON null value. By default, fields with empty
2676	// values are omitted from API requests. However, any field with an
2677	// empty value appearing in NullFields will be sent to the server as
2678	// null. It is an error if a field in this list has a non-empty value.
2679	// This may be used to include null fields in Patch requests.
2680	NullFields []string `json:"-"`
2681}
2682
2683func (s *Status) MarshalJSON() ([]byte, error) {
2684	type NoMethod Status
2685	raw := NoMethod(*s)
2686	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2687}
2688
2689// ThirdPartyPrincipal: Third party identity principal.
2690type ThirdPartyPrincipal struct {
2691	// ThirdPartyClaims: Metadata about third party identity.
2692	ThirdPartyClaims googleapi.RawMessage `json:"thirdPartyClaims,omitempty"`
2693
2694	// ForceSendFields is a list of field names (e.g. "ThirdPartyClaims") to
2695	// unconditionally include in API requests. By default, fields with
2696	// empty values are omitted from API requests. However, any non-pointer,
2697	// non-interface field appearing in ForceSendFields will be sent to the
2698	// server regardless of whether the field is empty or not. This may be
2699	// used to include empty fields in Patch requests.
2700	ForceSendFields []string `json:"-"`
2701
2702	// NullFields is a list of field names (e.g. "ThirdPartyClaims") to
2703	// include in API requests with the JSON null value. By default, fields
2704	// with empty values are omitted from API requests. However, any field
2705	// with an empty value appearing in NullFields will be sent to the
2706	// server as null. It is an error if a field in this list has a
2707	// non-empty value. This may be used to include null fields in Patch
2708	// requests.
2709	NullFields []string `json:"-"`
2710}
2711
2712func (s *ThirdPartyPrincipal) MarshalJSON() ([]byte, error) {
2713	type NoMethod ThirdPartyPrincipal
2714	raw := NoMethod(*s)
2715	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2716}
2717
2718// TraceSpan: A span represents a single operation within a trace. Spans
2719// can be nested to form a trace tree. Often, a trace contains a root
2720// span that describes the end-to-end latency, and one or more subspans
2721// for its sub-operations. A trace can also contain multiple root spans,
2722// or none at all. Spans do not need to be contiguous—there may be
2723// gaps or overlaps between spans in a trace.
2724type TraceSpan struct {
2725	// Attributes: A set of attributes on the span. You can have up to 32
2726	// attributes per span.
2727	Attributes *Attributes `json:"attributes,omitempty"`
2728
2729	// ChildSpanCount: An optional number of child spans that were generated
2730	// while this span was active. If set, allows implementation to detect
2731	// missing child spans.
2732	ChildSpanCount int64 `json:"childSpanCount,omitempty"`
2733
2734	// DisplayName: A description of the span's operation (up to 128 bytes).
2735	// Stackdriver Trace displays the description in the Google Cloud
2736	// Platform Console. For example, the display name can be a qualified
2737	// method name or a file name and a line number where the operation is
2738	// called. A best practice is to use the same display name within an
2739	// application and at the same call point. This makes it easier to
2740	// correlate spans in different traces.
2741	DisplayName *TruncatableString `json:"displayName,omitempty"`
2742
2743	// EndTime: The end time of the span. On the client side, this is the
2744	// time kept by the local machine where the span execution ends. On the
2745	// server side, this is the time when the server application handler
2746	// stops running.
2747	EndTime string `json:"endTime,omitempty"`
2748
2749	// Name: The resource name of the span in the following format:
2750	// projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/SPAN_ID is a unique
2751	// identifier for a trace within a project; it is a 32-character
2752	// hexadecimal encoding of a 16-byte array. [SPAN_ID] is a unique
2753	// identifier for a span within a trace; it is a 16-character
2754	// hexadecimal encoding of an 8-byte array.
2755	Name string `json:"name,omitempty"`
2756
2757	// ParentSpanId: The [SPAN_ID] of this span's parent span. If this is a
2758	// root span, then this field must be empty.
2759	ParentSpanId string `json:"parentSpanId,omitempty"`
2760
2761	// SameProcessAsParentSpan: (Optional) Set this parameter to indicate
2762	// whether this span is in the same process as its parent. If you do not
2763	// set this parameter, Stackdriver Trace is unable to take advantage of
2764	// this helpful information.
2765	SameProcessAsParentSpan bool `json:"sameProcessAsParentSpan,omitempty"`
2766
2767	// SpanId: The [SPAN_ID] portion of the span's resource name.
2768	SpanId string `json:"spanId,omitempty"`
2769
2770	// SpanKind: Distinguishes between spans generated in a particular
2771	// context. For example, two spans with the same name may be
2772	// distinguished using `CLIENT` (caller) and `SERVER` (callee) to
2773	// identify an RPC call.
2774	//
2775	// Possible values:
2776	//   "SPAN_KIND_UNSPECIFIED" - Unspecified. Do NOT use as default.
2777	// Implementations MAY assume SpanKind.INTERNAL to be default.
2778	//   "INTERNAL" - Indicates that the span is used internally. Default
2779	// value.
2780	//   "SERVER" - Indicates that the span covers server-side handling of
2781	// an RPC or other remote network request.
2782	//   "CLIENT" - Indicates that the span covers the client-side wrapper
2783	// around an RPC or other remote request.
2784	//   "PRODUCER" - Indicates that the span describes producer sending a
2785	// message to a broker. Unlike client and server, there is no direct
2786	// critical path latency relationship between producer and consumer
2787	// spans (e.g. publishing a message to a pubsub service).
2788	//   "CONSUMER" - Indicates that the span describes consumer receiving a
2789	// message from a broker. Unlike client and server, there is no direct
2790	// critical path latency relationship between producer and consumer
2791	// spans (e.g. receiving a message from a pubsub service subscription).
2792	SpanKind string `json:"spanKind,omitempty"`
2793
2794	// StartTime: The start time of the span. On the client side, this is
2795	// the time kept by the local machine where the span execution starts.
2796	// On the server side, this is the time when the server's application
2797	// handler starts running.
2798	StartTime string `json:"startTime,omitempty"`
2799
2800	// Status: An optional final status for this span.
2801	Status *Status `json:"status,omitempty"`
2802
2803	// ForceSendFields is a list of field names (e.g. "Attributes") to
2804	// unconditionally include in API requests. By default, fields with
2805	// empty values are omitted from API requests. However, any non-pointer,
2806	// non-interface field appearing in ForceSendFields will be sent to the
2807	// server regardless of whether the field is empty or not. This may be
2808	// used to include empty fields in Patch requests.
2809	ForceSendFields []string `json:"-"`
2810
2811	// NullFields is a list of field names (e.g. "Attributes") to include in
2812	// API requests with the JSON null value. By default, fields with empty
2813	// values are omitted from API requests. However, any field with an
2814	// empty value appearing in NullFields will be sent to the server as
2815	// null. It is an error if a field in this list has a non-empty value.
2816	// This may be used to include null fields in Patch requests.
2817	NullFields []string `json:"-"`
2818}
2819
2820func (s *TraceSpan) MarshalJSON() ([]byte, error) {
2821	type NoMethod TraceSpan
2822	raw := NoMethod(*s)
2823	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2824}
2825
2826// TruncatableString: Represents a string that might be shortened to a
2827// specified length.
2828type TruncatableString struct {
2829	// TruncatedByteCount: The number of bytes removed from the original
2830	// string. If this value is 0, then the string was not shortened.
2831	TruncatedByteCount int64 `json:"truncatedByteCount,omitempty"`
2832
2833	// Value: The shortened string. For example, if the original string is
2834	// 500 bytes long and the limit of the string is 128 bytes, then `value`
2835	// contains the first 128 bytes of the 500-byte string. Truncation
2836	// always happens on a UTF8 character boundary. If there are multi-byte
2837	// characters in the string, then the length of the shortened string
2838	// might be less than the size limit.
2839	Value string `json:"value,omitempty"`
2840
2841	// ForceSendFields is a list of field names (e.g. "TruncatedByteCount")
2842	// to unconditionally include in API requests. By default, fields with
2843	// empty values are omitted from API requests. However, any non-pointer,
2844	// non-interface field appearing in ForceSendFields will be sent to the
2845	// server regardless of whether the field is empty or not. This may be
2846	// used to include empty fields in Patch requests.
2847	ForceSendFields []string `json:"-"`
2848
2849	// NullFields is a list of field names (e.g. "TruncatedByteCount") to
2850	// include in API requests with the JSON null value. By default, fields
2851	// with empty values are omitted from API requests. However, any field
2852	// with an empty value appearing in NullFields will be sent to the
2853	// server as null. It is an error if a field in this list has a
2854	// non-empty value. This may be used to include null fields in Patch
2855	// requests.
2856	NullFields []string `json:"-"`
2857}
2858
2859func (s *TruncatableString) MarshalJSON() ([]byte, error) {
2860	type NoMethod TruncatableString
2861	raw := NoMethod(*s)
2862	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2863}
2864
2865// method id "servicecontrol.services.allocateQuota":
2866
2867type ServicesAllocateQuotaCall struct {
2868	s                    *Service
2869	serviceName          string
2870	allocatequotarequest *AllocateQuotaRequest
2871	urlParams_           gensupport.URLParams
2872	ctx_                 context.Context
2873	header_              http.Header
2874}
2875
2876// AllocateQuota: Attempts to allocate quota for the specified consumer.
2877// It should be called before the operation is executed. This method
2878// requires the `servicemanagement.services.quota` permission on the
2879// specified service. For more information, see Cloud IAM
2880// (https://cloud.google.com/iam). **NOTE:** The client **must**
2881// fail-open on server errors `INTERNAL`, `UNKNOWN`,
2882// `DEADLINE_EXCEEDED`, and `UNAVAILABLE`. To ensure system reliability,
2883// the server may inject these errors to prohibit any hard dependency on
2884// the quota functionality.
2885//
2886// - serviceName: Name of the service as specified in the service
2887//   configuration. For example, "pubsub.googleapis.com". See
2888//   google.api.Service for the definition of a service name.
2889func (r *ServicesService) AllocateQuota(serviceName string, allocatequotarequest *AllocateQuotaRequest) *ServicesAllocateQuotaCall {
2890	c := &ServicesAllocateQuotaCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2891	c.serviceName = serviceName
2892	c.allocatequotarequest = allocatequotarequest
2893	return c
2894}
2895
2896// Fields allows partial responses to be retrieved. See
2897// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2898// for more information.
2899func (c *ServicesAllocateQuotaCall) Fields(s ...googleapi.Field) *ServicesAllocateQuotaCall {
2900	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2901	return c
2902}
2903
2904// Context sets the context to be used in this call's Do method. Any
2905// pending HTTP request will be aborted if the provided context is
2906// canceled.
2907func (c *ServicesAllocateQuotaCall) Context(ctx context.Context) *ServicesAllocateQuotaCall {
2908	c.ctx_ = ctx
2909	return c
2910}
2911
2912// Header returns an http.Header that can be modified by the caller to
2913// add HTTP headers to the request.
2914func (c *ServicesAllocateQuotaCall) Header() http.Header {
2915	if c.header_ == nil {
2916		c.header_ = make(http.Header)
2917	}
2918	return c.header_
2919}
2920
2921func (c *ServicesAllocateQuotaCall) doRequest(alt string) (*http.Response, error) {
2922	reqHeaders := make(http.Header)
2923	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502")
2924	for k, v := range c.header_ {
2925		reqHeaders[k] = v
2926	}
2927	reqHeaders.Set("User-Agent", c.s.userAgent())
2928	var body io.Reader = nil
2929	body, err := googleapi.WithoutDataWrapper.JSONReader(c.allocatequotarequest)
2930	if err != nil {
2931		return nil, err
2932	}
2933	reqHeaders.Set("Content-Type", "application/json")
2934	c.urlParams_.Set("alt", alt)
2935	c.urlParams_.Set("prettyPrint", "false")
2936	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/services/{serviceName}:allocateQuota")
2937	urls += "?" + c.urlParams_.Encode()
2938	req, err := http.NewRequest("POST", urls, body)
2939	if err != nil {
2940		return nil, err
2941	}
2942	req.Header = reqHeaders
2943	googleapi.Expand(req.URL, map[string]string{
2944		"serviceName": c.serviceName,
2945	})
2946	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2947}
2948
2949// Do executes the "servicecontrol.services.allocateQuota" call.
2950// Exactly one of *AllocateQuotaResponse or error will be non-nil. Any
2951// non-2xx status code is an error. Response headers are in either
2952// *AllocateQuotaResponse.ServerResponse.Header or (if a response was
2953// returned at all) in error.(*googleapi.Error).Header. Use
2954// googleapi.IsNotModified to check whether the returned error was
2955// because http.StatusNotModified was returned.
2956func (c *ServicesAllocateQuotaCall) Do(opts ...googleapi.CallOption) (*AllocateQuotaResponse, error) {
2957	gensupport.SetOptions(c.urlParams_, opts...)
2958	res, err := c.doRequest("json")
2959	if res != nil && res.StatusCode == http.StatusNotModified {
2960		if res.Body != nil {
2961			res.Body.Close()
2962		}
2963		return nil, &googleapi.Error{
2964			Code:   res.StatusCode,
2965			Header: res.Header,
2966		}
2967	}
2968	if err != nil {
2969		return nil, err
2970	}
2971	defer googleapi.CloseBody(res)
2972	if err := googleapi.CheckResponse(res); err != nil {
2973		return nil, err
2974	}
2975	ret := &AllocateQuotaResponse{
2976		ServerResponse: googleapi.ServerResponse{
2977			Header:         res.Header,
2978			HTTPStatusCode: res.StatusCode,
2979		},
2980	}
2981	target := &ret
2982	if err := gensupport.DecodeResponse(target, res); err != nil {
2983		return nil, err
2984	}
2985	return ret, nil
2986	// {
2987	//   "description": "Attempts to allocate quota for the specified consumer. It should be called before the operation is executed. This method requires the `servicemanagement.services.quota` permission on the specified service. For more information, see [Cloud IAM](https://cloud.google.com/iam). **NOTE:** The client **must** fail-open on server errors `INTERNAL`, `UNKNOWN`, `DEADLINE_EXCEEDED`, and `UNAVAILABLE`. To ensure system reliability, the server may inject these errors to prohibit any hard dependency on the quota functionality.",
2988	//   "flatPath": "v1/services/{serviceName}:allocateQuota",
2989	//   "httpMethod": "POST",
2990	//   "id": "servicecontrol.services.allocateQuota",
2991	//   "parameterOrder": [
2992	//     "serviceName"
2993	//   ],
2994	//   "parameters": {
2995	//     "serviceName": {
2996	//       "description": "Name of the service as specified in the service configuration. For example, `\"pubsub.googleapis.com\"`. See google.api.Service for the definition of a service name.",
2997	//       "location": "path",
2998	//       "required": true,
2999	//       "type": "string"
3000	//     }
3001	//   },
3002	//   "path": "v1/services/{serviceName}:allocateQuota",
3003	//   "request": {
3004	//     "$ref": "AllocateQuotaRequest"
3005	//   },
3006	//   "response": {
3007	//     "$ref": "AllocateQuotaResponse"
3008	//   },
3009	//   "scopes": [
3010	//     "https://www.googleapis.com/auth/cloud-platform",
3011	//     "https://www.googleapis.com/auth/servicecontrol"
3012	//   ]
3013	// }
3014
3015}
3016
3017// method id "servicecontrol.services.check":
3018
3019type ServicesCheckCall struct {
3020	s            *Service
3021	serviceName  string
3022	checkrequest *CheckRequest
3023	urlParams_   gensupport.URLParams
3024	ctx_         context.Context
3025	header_      http.Header
3026}
3027
3028// Check: Checks whether an operation on a service should be allowed to
3029// proceed based on the configuration of the service and related
3030// policies. It must be called before the operation is executed. If
3031// feasible, the client should cache the check results and reuse them
3032// for 60 seconds. In case of any server errors, the client should rely
3033// on the cached results for much longer time to avoid outage. WARNING:
3034// There is general 60s delay for the configuration and policy
3035// propagation, therefore callers MUST NOT depend on the `Check` method
3036// having the latest policy information. NOTE: the CheckRequest has the
3037// size limit of 64KB. This method requires the
3038// `servicemanagement.services.check` permission on the specified
3039// service. For more information, see Cloud IAM
3040// (https://cloud.google.com/iam).
3041//
3042// - serviceName: The service name as specified in its service
3043//   configuration. For example, "pubsub.googleapis.com". See
3044//   google.api.Service
3045//   (https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service)
3046//   for the definition of a service name.
3047func (r *ServicesService) Check(serviceName string, checkrequest *CheckRequest) *ServicesCheckCall {
3048	c := &ServicesCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3049	c.serviceName = serviceName
3050	c.checkrequest = checkrequest
3051	return c
3052}
3053
3054// Fields allows partial responses to be retrieved. See
3055// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3056// for more information.
3057func (c *ServicesCheckCall) Fields(s ...googleapi.Field) *ServicesCheckCall {
3058	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3059	return c
3060}
3061
3062// Context sets the context to be used in this call's Do method. Any
3063// pending HTTP request will be aborted if the provided context is
3064// canceled.
3065func (c *ServicesCheckCall) Context(ctx context.Context) *ServicesCheckCall {
3066	c.ctx_ = ctx
3067	return c
3068}
3069
3070// Header returns an http.Header that can be modified by the caller to
3071// add HTTP headers to the request.
3072func (c *ServicesCheckCall) Header() http.Header {
3073	if c.header_ == nil {
3074		c.header_ = make(http.Header)
3075	}
3076	return c.header_
3077}
3078
3079func (c *ServicesCheckCall) doRequest(alt string) (*http.Response, error) {
3080	reqHeaders := make(http.Header)
3081	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502")
3082	for k, v := range c.header_ {
3083		reqHeaders[k] = v
3084	}
3085	reqHeaders.Set("User-Agent", c.s.userAgent())
3086	var body io.Reader = nil
3087	body, err := googleapi.WithoutDataWrapper.JSONReader(c.checkrequest)
3088	if err != nil {
3089		return nil, err
3090	}
3091	reqHeaders.Set("Content-Type", "application/json")
3092	c.urlParams_.Set("alt", alt)
3093	c.urlParams_.Set("prettyPrint", "false")
3094	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/services/{serviceName}:check")
3095	urls += "?" + c.urlParams_.Encode()
3096	req, err := http.NewRequest("POST", urls, body)
3097	if err != nil {
3098		return nil, err
3099	}
3100	req.Header = reqHeaders
3101	googleapi.Expand(req.URL, map[string]string{
3102		"serviceName": c.serviceName,
3103	})
3104	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3105}
3106
3107// Do executes the "servicecontrol.services.check" call.
3108// Exactly one of *CheckResponse or error will be non-nil. Any non-2xx
3109// status code is an error. Response headers are in either
3110// *CheckResponse.ServerResponse.Header or (if a response was returned
3111// at all) in error.(*googleapi.Error).Header. Use
3112// googleapi.IsNotModified to check whether the returned error was
3113// because http.StatusNotModified was returned.
3114func (c *ServicesCheckCall) Do(opts ...googleapi.CallOption) (*CheckResponse, error) {
3115	gensupport.SetOptions(c.urlParams_, opts...)
3116	res, err := c.doRequest("json")
3117	if res != nil && res.StatusCode == http.StatusNotModified {
3118		if res.Body != nil {
3119			res.Body.Close()
3120		}
3121		return nil, &googleapi.Error{
3122			Code:   res.StatusCode,
3123			Header: res.Header,
3124		}
3125	}
3126	if err != nil {
3127		return nil, err
3128	}
3129	defer googleapi.CloseBody(res)
3130	if err := googleapi.CheckResponse(res); err != nil {
3131		return nil, err
3132	}
3133	ret := &CheckResponse{
3134		ServerResponse: googleapi.ServerResponse{
3135			Header:         res.Header,
3136			HTTPStatusCode: res.StatusCode,
3137		},
3138	}
3139	target := &ret
3140	if err := gensupport.DecodeResponse(target, res); err != nil {
3141		return nil, err
3142	}
3143	return ret, nil
3144	// {
3145	//   "description": "Checks whether an operation on a service should be allowed to proceed based on the configuration of the service and related policies. It must be called before the operation is executed. If feasible, the client should cache the check results and reuse them for 60 seconds. In case of any server errors, the client should rely on the cached results for much longer time to avoid outage. WARNING: There is general 60s delay for the configuration and policy propagation, therefore callers MUST NOT depend on the `Check` method having the latest policy information. NOTE: the CheckRequest has the size limit of 64KB. This method requires the `servicemanagement.services.check` permission on the specified service. For more information, see [Cloud IAM](https://cloud.google.com/iam).",
3146	//   "flatPath": "v1/services/{serviceName}:check",
3147	//   "httpMethod": "POST",
3148	//   "id": "servicecontrol.services.check",
3149	//   "parameterOrder": [
3150	//     "serviceName"
3151	//   ],
3152	//   "parameters": {
3153	//     "serviceName": {
3154	//       "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.",
3155	//       "location": "path",
3156	//       "required": true,
3157	//       "type": "string"
3158	//     }
3159	//   },
3160	//   "path": "v1/services/{serviceName}:check",
3161	//   "request": {
3162	//     "$ref": "CheckRequest"
3163	//   },
3164	//   "response": {
3165	//     "$ref": "CheckResponse"
3166	//   },
3167	//   "scopes": [
3168	//     "https://www.googleapis.com/auth/cloud-platform",
3169	//     "https://www.googleapis.com/auth/servicecontrol"
3170	//   ]
3171	// }
3172
3173}
3174
3175// method id "servicecontrol.services.report":
3176
3177type ServicesReportCall struct {
3178	s             *Service
3179	serviceName   string
3180	reportrequest *ReportRequest
3181	urlParams_    gensupport.URLParams
3182	ctx_          context.Context
3183	header_       http.Header
3184}
3185
3186// Report: Reports operation results to Google Service Control, such as
3187// logs and metrics. It should be called after an operation is
3188// completed. If feasible, the client should aggregate reporting data
3189// for up to 5 seconds to reduce API traffic. Limiting aggregation to 5
3190// seconds is to reduce data loss during client crashes. Clients should
3191// carefully choose the aggregation time window to avoid data loss risk
3192// more than 0.01% for business and compliance reasons. NOTE: the
3193// ReportRequest has the size limit (wire-format byte size) of 1MB. This
3194// method requires the `servicemanagement.services.report` permission on
3195// the specified service. For more information, see Google Cloud IAM
3196// (https://cloud.google.com/iam).
3197//
3198// - serviceName: The service name as specified in its service
3199//   configuration. For example, "pubsub.googleapis.com". See
3200//   google.api.Service
3201//   (https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service)
3202//   for the definition of a service name.
3203func (r *ServicesService) Report(serviceName string, reportrequest *ReportRequest) *ServicesReportCall {
3204	c := &ServicesReportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3205	c.serviceName = serviceName
3206	c.reportrequest = reportrequest
3207	return c
3208}
3209
3210// Fields allows partial responses to be retrieved. See
3211// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3212// for more information.
3213func (c *ServicesReportCall) Fields(s ...googleapi.Field) *ServicesReportCall {
3214	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3215	return c
3216}
3217
3218// Context sets the context to be used in this call's Do method. Any
3219// pending HTTP request will be aborted if the provided context is
3220// canceled.
3221func (c *ServicesReportCall) Context(ctx context.Context) *ServicesReportCall {
3222	c.ctx_ = ctx
3223	return c
3224}
3225
3226// Header returns an http.Header that can be modified by the caller to
3227// add HTTP headers to the request.
3228func (c *ServicesReportCall) Header() http.Header {
3229	if c.header_ == nil {
3230		c.header_ = make(http.Header)
3231	}
3232	return c.header_
3233}
3234
3235func (c *ServicesReportCall) doRequest(alt string) (*http.Response, error) {
3236	reqHeaders := make(http.Header)
3237	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502")
3238	for k, v := range c.header_ {
3239		reqHeaders[k] = v
3240	}
3241	reqHeaders.Set("User-Agent", c.s.userAgent())
3242	var body io.Reader = nil
3243	body, err := googleapi.WithoutDataWrapper.JSONReader(c.reportrequest)
3244	if err != nil {
3245		return nil, err
3246	}
3247	reqHeaders.Set("Content-Type", "application/json")
3248	c.urlParams_.Set("alt", alt)
3249	c.urlParams_.Set("prettyPrint", "false")
3250	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/services/{serviceName}:report")
3251	urls += "?" + c.urlParams_.Encode()
3252	req, err := http.NewRequest("POST", urls, body)
3253	if err != nil {
3254		return nil, err
3255	}
3256	req.Header = reqHeaders
3257	googleapi.Expand(req.URL, map[string]string{
3258		"serviceName": c.serviceName,
3259	})
3260	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3261}
3262
3263// Do executes the "servicecontrol.services.report" call.
3264// Exactly one of *ReportResponse or error will be non-nil. Any non-2xx
3265// status code is an error. Response headers are in either
3266// *ReportResponse.ServerResponse.Header or (if a response was returned
3267// at all) in error.(*googleapi.Error).Header. Use
3268// googleapi.IsNotModified to check whether the returned error was
3269// because http.StatusNotModified was returned.
3270func (c *ServicesReportCall) Do(opts ...googleapi.CallOption) (*ReportResponse, error) {
3271	gensupport.SetOptions(c.urlParams_, opts...)
3272	res, err := c.doRequest("json")
3273	if res != nil && res.StatusCode == http.StatusNotModified {
3274		if res.Body != nil {
3275			res.Body.Close()
3276		}
3277		return nil, &googleapi.Error{
3278			Code:   res.StatusCode,
3279			Header: res.Header,
3280		}
3281	}
3282	if err != nil {
3283		return nil, err
3284	}
3285	defer googleapi.CloseBody(res)
3286	if err := googleapi.CheckResponse(res); err != nil {
3287		return nil, err
3288	}
3289	ret := &ReportResponse{
3290		ServerResponse: googleapi.ServerResponse{
3291			Header:         res.Header,
3292			HTTPStatusCode: res.StatusCode,
3293		},
3294	}
3295	target := &ret
3296	if err := gensupport.DecodeResponse(target, res); err != nil {
3297		return nil, err
3298	}
3299	return ret, nil
3300	// {
3301	//   "description": "Reports operation results to Google Service Control, such as logs and metrics. It should be called after an operation is completed. If feasible, the client should aggregate reporting data for up to 5 seconds to reduce API traffic. Limiting aggregation to 5 seconds is to reduce data loss during client crashes. Clients should carefully choose the aggregation time window to avoid data loss risk more than 0.01% for business and compliance reasons. NOTE: the ReportRequest has the size limit (wire-format byte size) of 1MB. This method requires the `servicemanagement.services.report` permission on the specified service. For more information, see [Google Cloud IAM](https://cloud.google.com/iam).",
3302	//   "flatPath": "v1/services/{serviceName}:report",
3303	//   "httpMethod": "POST",
3304	//   "id": "servicecontrol.services.report",
3305	//   "parameterOrder": [
3306	//     "serviceName"
3307	//   ],
3308	//   "parameters": {
3309	//     "serviceName": {
3310	//       "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.",
3311	//       "location": "path",
3312	//       "required": true,
3313	//       "type": "string"
3314	//     }
3315	//   },
3316	//   "path": "v1/services/{serviceName}:report",
3317	//   "request": {
3318	//     "$ref": "ReportRequest"
3319	//   },
3320	//   "response": {
3321	//     "$ref": "ReportResponse"
3322	//   },
3323	//   "scopes": [
3324	//     "https://www.googleapis.com/auth/cloud-platform",
3325	//     "https://www.googleapis.com/auth/servicecontrol"
3326	//   ]
3327	// }
3328
3329}
3330