Debian Codegraph @

serviceconsumermanagement/v1/serviceconsumermanagement-gen.go

raw
1 // Copyright 2026 Google LLC.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // Code generated file. DO NOT EDIT.
6
7 // Package serviceconsumermanagement provides access to the Service Consumer Management API.
8 //
9 // For product documentation, see: https://cloud.google.com/service-consumer-management/docs/overview
10 //
11 // # Library status
12 //
13 // These client libraries are officially supported by Google. However, this
14 // library is considered complete and is in maintenance mode. This means
15 // that we will address critical bugs and security issues but will not add
16 // any new features.
17 //
18 // When possible, we recommend using our newer
19 // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
20 // that are still actively being worked and iterated on.
21 //
22 // # Creating a client
23 //
24 // Usage example:
25 //
26 // import "google.golang.org/api/serviceconsumermanagement/v1"
27 // ...
28 // ctx := context.Background()
29 // serviceconsumermanagementService, err := serviceconsumermanagement.NewService(ctx)
30 //
31 // In this example, Google Application Default Credentials are used for
32 // authentication. For information on how to create and obtain Application
33 // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
34 //
35 // # Other authentication options
36 //
37 // To use an API key for authentication (note: some APIs do not support API
38 // keys), use [google.golang.org/api/option.WithAPIKey]:
39 //
40 // serviceconsumermanagementService, err := serviceconsumermanagement.NewService(ctx, option.WithAPIKey("AIza..."))
41 //
42 // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
43 // flow, use [google.golang.org/api/option.WithTokenSource]:
44 //
45 // config := &oauth2.Config{...}
46 // // ...
47 // token, err := config.Exchange(ctx, ...)
48 // serviceconsumermanagementService, err := serviceconsumermanagement.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
49 //
50 // See [google.golang.org/api/option.ClientOption] for details on options.
51 package serviceconsumermanagement // import "google.golang.org/api/serviceconsumermanagement/v1"
52
53 import (
54 "bytes"
55 "context"
56 "encoding/json"
57 "errors"
58 "fmt"
59 "io"
60 "log/slog"
61 "net/http"
62 "net/url"
63 "strconv"
64 "strings"
65
66 "github.com/googleapis/gax-go/v2/internallog"
67 googleapi "google.golang.org/api/googleapi"
68 internal "google.golang.org/api/internal"
69 gensupport "google.golang.org/api/internal/gensupport"
70 option "google.golang.org/api/option"
71 internaloption "google.golang.org/api/option/internaloption"
72 htransport "google.golang.org/api/transport/http"
73 )
74
75 // Always reference these packages, just in case the auto-generated code
76 // below doesn't.
77 var _ = bytes.NewBuffer
78 var _ = strconv.Itoa
79 var _ = fmt.Sprintf
80 var _ = json.NewDecoder
81 var _ = io.Copy
82 var _ = url.Parse
83 var _ = gensupport.MarshalJSON
84 var _ = googleapi.Version
85 var _ = errors.New
86 var _ = strings.Replace
87 var _ = context.Canceled
88 var _ = internaloption.WithDefaultEndpoint
89 var _ = internal.Version
90 var _ = internallog.New
91
92 const apiId = "serviceconsumermanagement:v1"
93 const apiName = "serviceconsumermanagement"
94 const apiVersion = "v1"
95 const basePath = "https://serviceconsumermanagement.googleapis.com/"
96 const basePathTemplate = "https://serviceconsumermanagement.UNIVERSE_DOMAIN/"
97 const mtlsBasePath = "https://serviceconsumermanagement.mtls.googleapis.com/"
98
99 // OAuth2 scopes used by this API.
100 const (
101 // See, edit, configure, and delete your Google Cloud data and see the email
102 // address for your Google Account.
103 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
104 )
105
106 // NewService creates a new APIService.
107 func NewService(ctx context.Context, opts ...option.ClientOption) (*APIService, error) {
108 scopesOption := internaloption.WithDefaultScopes(
109 "https://www.googleapis.com/auth/cloud-platform",
110 )
111 // NOTE: prepend, so we don't override user-specified scopes.
112 opts = append([]option.ClientOption{scopesOption}, opts...)
113 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
114 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
115 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
116 opts = append(opts, internaloption.EnableNewAuthLibrary())
117 client, endpoint, err := htransport.NewClient(ctx, opts...)
118 if err != nil {
119 return nil, err
120 }
121 s := &APIService{client: client, BasePath: basePath, logger: internaloption.GetLogger(opts)}
122 s.Operations = NewOperationsService(s)
123 s.Services = NewServicesService(s)
124 if endpoint != "" {
125 s.BasePath = endpoint
126 }
127 return s, nil
128 }
129
130 // New creates a new APIService. It uses the provided http.Client for requests.
131 //
132 // Deprecated: please use NewService instead.
133 // To provide a custom HTTP client, use option.WithHTTPClient.
134 // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
135 func New(client *http.Client) (*APIService, error) {
136 if client == nil {
137 return nil, errors.New("client is nil")
138 }
139 return NewService(context.TODO(), option.WithHTTPClient(client))
140 }
141
142 type APIService struct {
143 client *http.Client
144 logger *slog.Logger
145 BasePath string // API endpoint base URL
146 UserAgent string // optional additional User-Agent fragment
147
148 Operations *OperationsService
149
150 Services *ServicesService
151 }
152
153 func (s *APIService) userAgent() string {
154 if s.UserAgent == "" {
155 return googleapi.UserAgent
156 }
157 return googleapi.UserAgent + " " + s.UserAgent
158 }
159
160 func NewOperationsService(s *APIService) *OperationsService {
161 rs := &OperationsService{s: s}
162 return rs
163 }
164
165 type OperationsService struct {
166 s *APIService
167 }
168
169 func NewServicesService(s *APIService) *ServicesService {
170 rs := &ServicesService{s: s}
171 rs.TenancyUnits = NewServicesTenancyUnitsService(s)
172 return rs
173 }
174
175 type ServicesService struct {
176 s *APIService
177
178 TenancyUnits *ServicesTenancyUnitsService
179 }
180
181 func NewServicesTenancyUnitsService(s *APIService) *ServicesTenancyUnitsService {
182 rs := &ServicesTenancyUnitsService{s: s}
183 return rs
184 }
185
186 type ServicesTenancyUnitsService struct {
187 s *APIService
188 }
189
190 // AddTenantProjectRequest: Request to add a newly created and configured
191 // tenant project to a tenancy unit.
192 type AddTenantProjectRequest struct {
193 // ProjectConfig: Configuration of the new tenant project to be added to
194 // tenancy unit resources.
195 ProjectConfig *TenantProjectConfig `json:"projectConfig,omitempty"`
196 // Tag: Required. Tag of the added project. Must be less than 128 characters.
197 // Required.
198 Tag string `json:"tag,omitempty"`
199 // ForceSendFields is a list of field names (e.g. "ProjectConfig") to
200 // unconditionally include in API requests. By default, fields with empty or
201 // default values are omitted from API requests. See
202 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
203 // details.
204 ForceSendFields []string `json:"-"`
205 // NullFields is a list of field names (e.g. "ProjectConfig") to include in API
206 // requests with the JSON null value. By default, fields with empty values are
207 // omitted from API requests. See
208 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
209 NullFields []string `json:"-"`
210 }
211
212 func (s AddTenantProjectRequest) MarshalJSON() ([]byte, error) {
213 type NoMethod AddTenantProjectRequest
214 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
215 }
216
217 // Api: Api is a light-weight descriptor for an API Interface. Interfaces are
218 // also described as "protocol buffer services" in some contexts, such as by
219 // the "service" keyword in a .proto file, but they are different from API
220 // Services, which represent a concrete implementation of an interface as
221 // opposed to simply a description of methods and bindings. They are also
222 // sometimes simply referred to as "APIs" in other contexts, such as the name
223 // of this message itself. See https://cloud.google.com/apis/design/glossary
224 // for detailed terminology. New usages of this message as an alternative to
225 // ServiceDescriptorProto are strongly discouraged. This message does not
226 // reliability preserve all information necessary to model the schema and
227 // preserve semantics. Instead make use of FileDescriptorSet which preserves
228 // the necessary information.
229 type Api struct {
230 // Edition: The source edition string, only valid when syntax is
231 // SYNTAX_EDITIONS.
232 Edition string `json:"edition,omitempty"`
233 // Methods: The methods of this interface, in unspecified order.
234 Methods []*Method `json:"methods,omitempty"`
235 // Mixins: Included interfaces. See Mixin.
236 Mixins []*Mixin `json:"mixins,omitempty"`
237 // Name: The fully qualified name of this interface, including package name
238 // followed by the interface's simple name.
239 Name string `json:"name,omitempty"`
240 // Options: Any metadata attached to the interface.
241 Options []*Option `json:"options,omitempty"`
242 // SourceContext: Source context for the protocol buffer service represented by
243 // this message.
244 SourceContext *SourceContext `json:"sourceContext,omitempty"`
245 // Syntax: The source syntax of the service.
246 //
247 // Possible values:
248 // "SYNTAX_PROTO2" - Syntax `proto2`.
249 // "SYNTAX_PROTO3" - Syntax `proto3`.
250 // "SYNTAX_EDITIONS" - Syntax `editions`.
251 Syntax string `json:"syntax,omitempty"`
252 // Version: A version string for this interface. If specified, must have the
253 // form `major-version.minor-version`, as in `1.10`. If the minor version is
254 // omitted, it defaults to zero. If the entire version field is empty, the
255 // major version is derived from the package name, as outlined below. If the
256 // field is not empty, the version in the package name will be verified to be
257 // consistent with what is provided here. The versioning schema uses semantic
258 // versioning (http://semver.org) where the major version number indicates a
259 // breaking change and the minor version an additive, non-breaking change. Both
260 // version numbers are signals to users what to expect from different versions,
261 // and should be carefully chosen based on the product plan. The major version
262 // is also reflected in the package name of the interface, which must end in
263 // `v`, as in `google.feature.v1`. For major versions 0 and 1, the suffix can
264 // be omitted. Zero major versions must only be used for experimental, non-GA
265 // interfaces.
266 Version string `json:"version,omitempty"`
267 // ForceSendFields is a list of field names (e.g. "Edition") to unconditionally
268 // include in API requests. By default, fields with empty or default values are
269 // omitted from API requests. See
270 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
271 // details.
272 ForceSendFields []string `json:"-"`
273 // NullFields is a list of field names (e.g. "Edition") to include in API
274 // requests with the JSON null value. By default, fields with empty values are
275 // omitted from API requests. See
276 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
277 NullFields []string `json:"-"`
278 }
279
280 func (s Api) MarshalJSON() ([]byte, error) {
281 type NoMethod Api
282 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
283 }
284
285 // ApplyTenantProjectConfigRequest: Request to apply configuration to an
286 // existing tenant project.
287 type ApplyTenantProjectConfigRequest struct {
288 // ProjectConfig: Configuration that should be applied to the existing tenant
289 // project.
290 ProjectConfig *TenantProjectConfig `json:"projectConfig,omitempty"`
291 // Tag: Required. Tag of the project. Must be less than 128 characters.
292 // Required.
293 Tag string `json:"tag,omitempty"`
294 // ForceSendFields is a list of field names (e.g. "ProjectConfig") to
295 // unconditionally include in API requests. By default, fields with empty or
296 // default values are omitted from API requests. See
297 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
298 // details.
299 ForceSendFields []string `json:"-"`
300 // NullFields is a list of field names (e.g. "ProjectConfig") to include in API
301 // requests with the JSON null value. By default, fields with empty values are
302 // omitted from API requests. See
303 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
304 NullFields []string `json:"-"`
305 }
306
307 func (s ApplyTenantProjectConfigRequest) MarshalJSON() ([]byte, error) {
308 type NoMethod ApplyTenantProjectConfigRequest
309 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
310 }
311
312 // Aspect: Aspect represents Generic aspect. It is used to configure an aspect
313 // without making direct changes to service.proto
314 type Aspect struct {
315 // Kind: The type of this aspect configuration.
316 Kind string `json:"kind,omitempty"`
317 // Rules: Optional. Rules of the Configuration.
318 Rules []*AspectRule `json:"rules,omitempty"`
319 // Spec: Content of the configuration. The underlying schema should be defined
320 // by Aspect owners as protobuf message under `google/api/configaspects/proto`.
321 Spec googleapi.RawMessage `json:"spec,omitempty"`
322 // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally
323 // include in API requests. By default, fields with empty or default values are
324 // omitted from API requests. See
325 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
326 // details.
327 ForceSendFields []string `json:"-"`
328 // NullFields is a list of field names (e.g. "Kind") to include in API requests
329 // with the JSON null value. By default, fields with empty values are omitted
330 // from API requests. See
331 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
332 NullFields []string `json:"-"`
333 }
334
335 func (s Aspect) MarshalJSON() ([]byte, error) {
336 type NoMethod Aspect
337 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
338 }
339
340 // AspectRule: Rule-based configuration for an aspect.
341 type AspectRule struct {
342 // Config: Required. Rules of the configuration. The underlying schema should
343 // be defined by Aspect owners as protobuf message under
344 // `google/api/configaspects/proto`.
345 Config googleapi.RawMessage `json:"config,omitempty"`
346 // Selector: Required. Selects the RPC methods to which this rule applies.
347 // Refer to selector for syntax details.
348 Selector string `json:"selector,omitempty"`
349 // ForceSendFields is a list of field names (e.g. "Config") to unconditionally
350 // include in API requests. By default, fields with empty or default values are
351 // omitted from API requests. See
352 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
353 // details.
354 ForceSendFields []string `json:"-"`
355 // NullFields is a list of field names (e.g. "Config") to include in API
356 // requests with the JSON null value. By default, fields with empty values are
357 // omitted from API requests. See
358 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
359 NullFields []string `json:"-"`
360 }
361
362 func (s AspectRule) MarshalJSON() ([]byte, error) {
363 type NoMethod AspectRule
364 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
365 }
366
367 // AttachTenantProjectRequest: Request to attach an existing project to the
368 // tenancy unit as a new tenant resource.
369 type AttachTenantProjectRequest struct {
370 // ExternalResource: When attaching an external project, this is in the format
371 // of `projects/{project_number}`.
372 ExternalResource string `json:"externalResource,omitempty"`
373 // ReservedResource: When attaching a reserved project already in tenancy
374 // units, this is the tag of a tenant resource under the tenancy unit for the
375 // managed service's service producer project. The reserved tenant resource
376 // must be in an active state.
377 ReservedResource string `json:"reservedResource,omitempty"`
378 // Tag: Required. Tag of the tenant resource after attachment. Must be less
379 // than 128 characters. Required.
380 Tag string `json:"tag,omitempty"`
381 // ForceSendFields is a list of field names (e.g. "ExternalResource") to
382 // unconditionally include in API requests. By default, fields with empty or
383 // default values are omitted from API requests. See
384 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
385 // details.
386 ForceSendFields []string `json:"-"`
387 // NullFields is a list of field names (e.g. "ExternalResource") to include in
388 // API requests with the JSON null value. By default, fields with empty values
389 // are omitted from API requests. See
390 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
391 NullFields []string `json:"-"`
392 }
393
394 func (s AttachTenantProjectRequest) MarshalJSON() ([]byte, error) {
395 type NoMethod AttachTenantProjectRequest
396 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
397 }
398
399 // AuthProvider: Configuration for an authentication provider, including
400 // support for JSON Web Token (JWT)
401 // (https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).
402 type AuthProvider struct {
403 // Audiences: The list of JWT audiences
404 // (https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
405 // that are allowed to access. A JWT containing any of these audiences will be
406 // accepted. When this setting is absent, JWTs with audiences: -
407 // "https://[service.name]/[google.protobuf.Api.name]" -
408 // "https://[service.name]/" will be accepted. For example, if no audiences are
409 // in the setting, LibraryService API will accept JWTs with the following
410 // audiences: -
411 // https://library-example.googleapis.com/google.example.library.v1.LibraryService
412 // - https://library-example.googleapis.com/ Example: audiences:
413 // bookstore_android.apps.googleusercontent.com,
414 // bookstore_web.apps.googleusercontent.com
415 Audiences string `json:"audiences,omitempty"`
416 // AuthorizationUrl: Redirect URL if JWT token is required but not present or
417 // is expired. Implement authorizationUrl of securityDefinitions in OpenAPI
418 // spec.
419 AuthorizationUrl string `json:"authorizationUrl,omitempty"`
420 // Id: The unique identifier of the auth provider. It will be referred to by
421 // `AuthRequirement.provider_id`. Example: "bookstore_auth".
422 Id string `json:"id,omitempty"`
423 // Issuer: Identifies the principal that issued the JWT. See
424 // https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
425 // Usually a URL or an email address. Example: https://securetoken.google.com
426 // Example: [email protected]
427 Issuer string `json:"issuer,omitempty"`
428 // JwksUri: URL of the provider's public key set to validate signature of the
429 // JWT. See OpenID Discovery
430 // (https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
431 // Optional if the key set document: - can be retrieved from OpenID Discovery
432 // (https://openid.net/specs/openid-connect-discovery-1_0.html) of the issuer.
433 // - can be inferred from the email domain of the issuer (e.g. a Google service
434 // account). Example: https://www.googleapis.com/oauth2/v1/certs
435 JwksUri string `json:"jwksUri,omitempty"`
436 // JwtLocations: Defines the locations to extract the JWT. For now it is only
437 // used by the Cloud Endpoints to store the OpenAPI extension
438 // [x-google-jwt-locations]
439 // (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
440 // JWT locations can be one of HTTP headers, URL query parameters or cookies.
441 // The rule is that the first match wins. If not specified, default to use
442 // following 3 locations: 1) Authorization: Bearer 2) x-goog-iap-jwt-assertion
443 // 3) access_token query parameter Default locations can be specified as
444 // followings: jwt_locations: - header: Authorization value_prefix: "Bearer " -
445 // header: x-goog-iap-jwt-assertion - query: access_token
446 JwtLocations []*JwtLocation `json:"jwtLocations,omitempty"`
447 // ForceSendFields is a list of field names (e.g. "Audiences") to
448 // unconditionally include in API requests. By default, fields with empty or
449 // default values are omitted from API requests. See
450 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
451 // details.
452 ForceSendFields []string `json:"-"`
453 // NullFields is a list of field names (e.g. "Audiences") to include in API
454 // requests with the JSON null value. By default, fields with empty values are
455 // omitted from API requests. See
456 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
457 NullFields []string `json:"-"`
458 }
459
460 func (s AuthProvider) MarshalJSON() ([]byte, error) {
461 type NoMethod AuthProvider
462 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
463 }
464
465 // AuthRequirement: User-defined authentication requirements, including support
466 // for JSON Web Token (JWT)
467 // (https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).
468 type AuthRequirement struct {
469 // Audiences: NOTE: This will be deprecated soon, once AuthProvider.audiences
470 // is implemented and accepted in all the runtime components. The list of JWT
471 // audiences
472 // (https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
473 // that are allowed to access. A JWT containing any of these audiences will be
474 // accepted. When this setting is absent, only JWTs with audience
475 // "https://Service_name/API_name" will be accepted. For example, if no
476 // audiences are in the setting, LibraryService API will only accept JWTs with
477 // the following audience
478 // "https://library-example.googleapis.com/google.example.library.v1.LibraryServ
479 // ice". Example: audiences: bookstore_android.apps.googleusercontent.com,
480 // bookstore_web.apps.googleusercontent.com
481 Audiences string `json:"audiences,omitempty"`
482 // ProviderId: id from authentication provider. Example: provider_id:
483 // bookstore_auth
484 ProviderId string `json:"providerId,omitempty"`
485 // ForceSendFields is a list of field names (e.g. "Audiences") to
486 // unconditionally include in API requests. By default, fields with empty or
487 // default values are omitted from API requests. See
488 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
489 // details.
490 ForceSendFields []string `json:"-"`
491 // NullFields is a list of field names (e.g. "Audiences") to include in API
492 // requests with the JSON null value. By default, fields with empty values are
493 // omitted from API requests. See
494 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
495 NullFields []string `json:"-"`
496 }
497
498 func (s AuthRequirement) MarshalJSON() ([]byte, error) {
499 type NoMethod AuthRequirement
500 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
501 }
502
503 // Authentication: `Authentication` defines the authentication configuration
504 // for API methods provided by an API service. Example: name:
505 // calendar.googleapis.com authentication: providers: - id:
506 // google_calendar_auth jwks_uri: https://www.googleapis.com/oauth2/v1/certs
507 // issuer: https://securetoken.google.com rules: - selector: "*" requirements:
508 // provider_id: google_calendar_auth - selector: google.calendar.Delegate
509 // oauth: canonical_scopes: https://www.googleapis.com/auth/calendar.read
510 type Authentication struct {
511 // Providers: Defines a set of authentication providers that a service
512 // supports.
513 Providers []*AuthProvider `json:"providers,omitempty"`
514 // Rules: A list of authentication rules that apply to individual API methods.
515 // **NOTE:** All service configuration rules follow "last one wins" order.
516 Rules []*AuthenticationRule `json:"rules,omitempty"`
517 // ForceSendFields is a list of field names (e.g. "Providers") to
518 // unconditionally include in API requests. By default, fields with empty or
519 // default values are omitted from API requests. See
520 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
521 // details.
522 ForceSendFields []string `json:"-"`
523 // NullFields is a list of field names (e.g. "Providers") to include in API
524 // requests with the JSON null value. By default, fields with empty values are
525 // omitted from API requests. See
526 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
527 NullFields []string `json:"-"`
528 }
529
530 func (s Authentication) MarshalJSON() ([]byte, error) {
531 type NoMethod Authentication
532 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
533 }
534
535 // AuthenticationRule: Authentication rules for the service. By default, if a
536 // method has any authentication requirements, every request must include a
537 // valid credential matching one of the requirements. It's an error to include
538 // more than one kind of credential in a single request. If a method doesn't
539 // have any auth requirements, request credentials will be ignored.
540 type AuthenticationRule struct {
541 // AllowWithoutCredential: If true, the service accepts API keys without any
542 // other credential. This flag only applies to HTTP and gRPC requests.
543 AllowWithoutCredential bool `json:"allowWithoutCredential,omitempty"`
544 // Oauth: The requirements for OAuth credentials.
545 Oauth *OAuthRequirements `json:"oauth,omitempty"`
546 // Requirements: Requirements for additional authentication providers.
547 Requirements []*AuthRequirement `json:"requirements,omitempty"`
548 // Selector: Selects the methods to which this rule applies. Refer to selector
549 // for syntax details.
550 Selector string `json:"selector,omitempty"`
551 // ForceSendFields is a list of field names (e.g. "AllowWithoutCredential") to
552 // unconditionally include in API requests. By default, fields with empty or
553 // default values are omitted from API requests. See
554 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
555 // details.
556 ForceSendFields []string `json:"-"`
557 // NullFields is a list of field names (e.g. "AllowWithoutCredential") to
558 // include in API requests with the JSON null value. By default, fields with
559 // empty values are omitted from API requests. See
560 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
561 NullFields []string `json:"-"`
562 }
563
564 func (s AuthenticationRule) MarshalJSON() ([]byte, error) {
565 type NoMethod AuthenticationRule
566 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
567 }
568
569 // Backend: `Backend` defines the backend configuration for a service.
570 type Backend struct {
571 // Rules: A list of API backend rules that apply to individual API methods.
572 // **NOTE:** All service configuration rules follow "last one wins" order.
573 Rules []*BackendRule `json:"rules,omitempty"`
574 // ForceSendFields is a list of field names (e.g. "Rules") to unconditionally
575 // include in API requests. By default, fields with empty or default values are
576 // omitted from API requests. See
577 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
578 // details.
579 ForceSendFields []string `json:"-"`
580 // NullFields is a list of field names (e.g. "Rules") to include in API
581 // requests with the JSON null value. By default, fields with empty values are
582 // omitted from API requests. See
583 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
584 NullFields []string `json:"-"`
585 }
586
587 func (s Backend) MarshalJSON() ([]byte, error) {
588 type NoMethod Backend
589 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
590 }
591
592 // BackendRule: A backend rule provides configuration for an individual API
593 // element.
594 type BackendRule struct {
595 // Address: The address of the API backend. The scheme is used to determine the
596 // backend protocol and security. The following schemes are accepted: SCHEME
597 // PROTOCOL SECURITY http:// HTTP None https:// HTTP TLS grpc:// gRPC None
598 // grpcs:// gRPC TLS It is recommended to explicitly include a scheme. Leaving
599 // out the scheme may cause constrasting behaviors across platforms. If the
600 // port is unspecified, the default is: - 80 for schemes without TLS - 443 for
601 // schemes with TLS For HTTP backends, use protocol to specify the protocol
602 // version.
603 Address string `json:"address,omitempty"`
604 // Deadline: The number of seconds to wait for a response from a request. The
605 // default varies based on the request protocol and deployment environment.
606 Deadline float64 `json:"deadline,omitempty"`
607 // DisableAuth: When disable_auth is true, a JWT ID token won't be generated
608 // and the original "Authorization" HTTP header will be preserved. If the
609 // header is used to carry the original token and is expected by the backend,
610 // this field must be set to true to preserve the header.
611 DisableAuth bool `json:"disableAuth,omitempty"`
612 // JwtAudience: The JWT audience is used when generating a JWT ID token for the
613 // backend. This ID token will be added in the HTTP "authorization" header, and
614 // sent to the backend.
615 JwtAudience string `json:"jwtAudience,omitempty"`
616 // LoadBalancingPolicy: The load balancing policy used for connection to the
617 // application backend. Defined as an arbitrary string to accomondate custom
618 // load balancing policies supported by the underlying channel, but suggest
619 // most users use one of the standard policies, such as the default,
620 // "RoundRobin".
621 LoadBalancingPolicy string `json:"loadBalancingPolicy,omitempty"`
622 // MinDeadline: Deprecated, do not use.
623 MinDeadline float64 `json:"minDeadline,omitempty"`
624 // OperationDeadline: The number of seconds to wait for the completion of a
625 // long running operation. The default is no deadline.
626 OperationDeadline float64 `json:"operationDeadline,omitempty"`
627 // OverridesByRequestProtocol: The map between request protocol and the backend
628 // address.
629 OverridesByRequestProtocol map[string]BackendRule `json:"overridesByRequestProtocol,omitempty"`
630 // PathTranslation: Path translation specifies how to combine the backend
631 // address with the request path in order to produce the appropriate forwarding
632 // URL for the request. See PathTranslation for more details.
633 //
634 // Possible values:
635 // "PATH_TRANSLATION_UNSPECIFIED"
636 // "CONSTANT_ADDRESS" - Use the backend address as-is, with no modification
637 // to the path. If the URL pattern contains variables, the variable names and
638 // values will be appended to the query string. If a query string parameter and
639 // a URL pattern variable have the same name, this may result in duplicate keys
640 // in the query string. # Examples Given the following operation config: Method
641 // path: /api/company/{cid}/user/{uid} Backend address:
642 // https://example.cloudfunctions.net/getUser Requests to the following request
643 // paths will call the backend at the translated path: Request path:
644 // /api/company/widgetworks/user/johndoe Translated:
645 // https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe
646 // Request path: /api/company/widgetworks/user/johndoe?timezone=EST Translated:
647 // https://example.cloudfunctions.net/getUser?timezone=EST&cid=widgetworks&uid=johndoe
648 // "APPEND_PATH_TO_ADDRESS" - The request path will be appended to the
649 // backend address. # Examples Given the following operation config: Method
650 // path: /api/company/{cid}/user/{uid} Backend address:
651 // https://example.appspot.com Requests to the following request paths will
652 // call the backend at the translated path: Request path:
653 // /api/company/widgetworks/user/johndoe Translated:
654 // https://example.appspot.com/api/company/widgetworks/user/johndoe Request
655 // path: /api/company/widgetworks/user/johndoe?timezone=EST Translated:
656 // https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST
657 PathTranslation string `json:"pathTranslation,omitempty"`
658 // Protocol: The protocol used for sending a request to the backend. The
659 // supported values are "http/1.1" and "h2". The default value is inferred from
660 // the scheme in the address field: SCHEME PROTOCOL http:// http/1.1 https://
661 // http/1.1 grpc:// h2 grpcs:// h2 For secure HTTP backends (https://) that
662 // support HTTP/2, set this field to "h2" for improved performance. Configuring
663 // this field to non-default values is only supported for secure HTTP backends.
664 // This field will be ignored for all other backends. See
665 // https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
666 // for more details on the supported values.
667 Protocol string `json:"protocol,omitempty"`
668 // Selector: Selects the methods to which this rule applies. Refer to selector
669 // for syntax details.
670 Selector string `json:"selector,omitempty"`
671 // ForceSendFields is a list of field names (e.g. "Address") to unconditionally
672 // include in API requests. By default, fields with empty or default values are
673 // omitted from API requests. See
674 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
675 // details.
676 ForceSendFields []string `json:"-"`
677 // NullFields is a list of field names (e.g. "Address") to include in API
678 // requests with the JSON null value. By default, fields with empty values are
679 // omitted from API requests. See
680 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
681 NullFields []string `json:"-"`
682 }
683
684 func (s BackendRule) MarshalJSON() ([]byte, error) {
685 type NoMethod BackendRule
686 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
687 }
688
689 func (s *BackendRule) UnmarshalJSON(data []byte) error {
690 type NoMethod BackendRule
691 var s1 struct {
692 Deadline gensupport.JSONFloat64 `json:"deadline"`
693 MinDeadline gensupport.JSONFloat64 `json:"minDeadline"`
694 OperationDeadline gensupport.JSONFloat64 `json:"operationDeadline"`
695 *NoMethod
696 }
697 s1.NoMethod = (*NoMethod)(s)
698 if err := json.Unmarshal(data, &s1); err != nil {
699 return err
700 }
701 s.Deadline = float64(s1.Deadline)
702 s.MinDeadline = float64(s1.MinDeadline)
703 s.OperationDeadline = float64(s1.OperationDeadline)
704 return nil
705 }
706
707 // BatchingConfigProto: `BatchingConfigProto` defines the batching
708 // configuration for an API method.
709 type BatchingConfigProto struct {
710 // BatchDescriptor: The request and response fields used in batching.
711 BatchDescriptor *BatchingDescriptorProto `json:"batchDescriptor,omitempty"`
712 // Thresholds: The thresholds which trigger a batched request to be sent.
713 Thresholds *BatchingSettingsProto `json:"thresholds,omitempty"`
714 // ForceSendFields is a list of field names (e.g. "BatchDescriptor") to
715 // unconditionally include in API requests. By default, fields with empty or
716 // default values are omitted from API requests. See
717 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
718 // details.
719 ForceSendFields []string `json:"-"`
720 // NullFields is a list of field names (e.g. "BatchDescriptor") to include in
721 // API requests with the JSON null value. By default, fields with empty values
722 // are omitted from API requests. See
723 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
724 NullFields []string `json:"-"`
725 }
726
727 func (s BatchingConfigProto) MarshalJSON() ([]byte, error) {
728 type NoMethod BatchingConfigProto
729 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
730 }
731
732 // BatchingDescriptorProto: `BatchingDescriptorProto` specifies the fields of
733 // the request message to be used for batching, and, optionally, the fields of
734 // the response message to be used for demultiplexing.
735 type BatchingDescriptorProto struct {
736 // BatchedField: The repeated field in the request message to be aggregated by
737 // batching.
738 BatchedField string `json:"batchedField,omitempty"`
739 // DiscriminatorFields: A list of the fields in the request message. Two
740 // requests will be batched together only if the values of every field
741 // specified in `request_discriminator_fields` is equal between the two
742 // requests.
743 DiscriminatorFields []string `json:"discriminatorFields,omitempty"`
744 // SubresponseField: Optional. When present, indicates the field in the
745 // response message to be used to demultiplex the response into multiple
746 // response messages, in correspondence with the multiple request messages
747 // originally batched together.
748 SubresponseField string `json:"subresponseField,omitempty"`
749 // ForceSendFields is a list of field names (e.g. "BatchedField") to
750 // unconditionally include in API requests. By default, fields with empty or
751 // default values are omitted from API requests. See
752 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
753 // details.
754 ForceSendFields []string `json:"-"`
755 // NullFields is a list of field names (e.g. "BatchedField") to include in API
756 // requests with the JSON null value. By default, fields with empty values are
757 // omitted from API requests. See
758 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
759 NullFields []string `json:"-"`
760 }
761
762 func (s BatchingDescriptorProto) MarshalJSON() ([]byte, error) {
763 type NoMethod BatchingDescriptorProto
764 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
765 }
766
767 // BatchingSettingsProto: `BatchingSettingsProto` specifies a set of batching
768 // thresholds, each of which acts as a trigger to send a batch of messages as a
769 // request. At least one threshold must be positive nonzero.
770 type BatchingSettingsProto struct {
771 // DelayThreshold: The duration after which a batch should be sent, starting
772 // from the addition of the first message to that batch.
773 DelayThreshold string `json:"delayThreshold,omitempty"`
774 // ElementCountLimit: The maximum number of elements collected in a batch that
775 // could be accepted by server.
776 ElementCountLimit int64 `json:"elementCountLimit,omitempty"`
777 // ElementCountThreshold: The number of elements of a field collected into a
778 // batch which, if exceeded, causes the batch to be sent.
779 ElementCountThreshold int64 `json:"elementCountThreshold,omitempty"`
780 // FlowControlByteLimit: The maximum size of data allowed by flow control.
781 FlowControlByteLimit int64 `json:"flowControlByteLimit,omitempty"`
782 // FlowControlElementLimit: The maximum number of elements allowed by flow
783 // control.
784 FlowControlElementLimit int64 `json:"flowControlElementLimit,omitempty"`
785 // FlowControlLimitExceededBehavior: The behavior to take when the flow control
786 // limit is exceeded.
787 //
788 // Possible values:
789 // "UNSET_BEHAVIOR" - Default behavior, system-defined.
790 // "THROW_EXCEPTION" - Stop operation, raise error.
791 // "BLOCK" - Pause operation until limit clears.
792 // "IGNORE" - Continue operation, disregard limit.
793 FlowControlLimitExceededBehavior string `json:"flowControlLimitExceededBehavior,omitempty"`
794 // RequestByteLimit: The maximum size of the request that could be accepted by
795 // server.
796 RequestByteLimit int64 `json:"requestByteLimit,omitempty"`
797 // RequestByteThreshold: The aggregated size of the batched field which, if
798 // exceeded, causes the batch to be sent. This size is computed by aggregating
799 // the sizes of the request field to be batched, not of the entire request
800 // message.
801 RequestByteThreshold int64 `json:"requestByteThreshold,omitempty,string"`
802 // ForceSendFields is a list of field names (e.g. "DelayThreshold") to
803 // unconditionally include in API requests. By default, fields with empty or
804 // default values are omitted from API requests. See
805 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
806 // details.
807 ForceSendFields []string `json:"-"`
808 // NullFields is a list of field names (e.g. "DelayThreshold") to include in
809 // API requests with the JSON null value. By default, fields with empty values
810 // are omitted from API requests. See
811 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
812 NullFields []string `json:"-"`
813 }
814
815 func (s BatchingSettingsProto) MarshalJSON() ([]byte, error) {
816 type NoMethod BatchingSettingsProto
817 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
818 }
819
820 // Billing: Billing related configuration of the service. The following example
821 // shows how to configure monitored resources and metrics for billing,
822 // `consumer_destinations` is the only supported destination and the monitored
823 // resources need at least one label key `cloud.googleapis.com/location` to
824 // indicate the location of the billing usage, using different monitored
825 // resources between monitoring and billing is recommended so they can be
826 // evolved independently: monitored_resources: - type:
827 // library.googleapis.com/billing_branch labels: - key:
828 // cloud.googleapis.com/location description: | Predefined label to support
829 // billing location restriction. - key: city description: | Custom label to
830 // define the city where the library branch is located in. - key: name
831 // description: Custom label to define the name of the library branch. metrics:
832 // - name: library.googleapis.com/book/borrowed_count metric_kind: DELTA
833 // value_type: INT64 unit: "1" billing: consumer_destinations: -
834 // monitored_resource: library.googleapis.com/billing_branch metrics: -
835 // library.googleapis.com/book/borrowed_count
836 type Billing struct {
837 // ConsumerDestinations: Billing configurations for sending metrics to the
838 // consumer project. There can be multiple consumer destinations per service,
839 // each one must have a different monitored resource type. A metric can be used
840 // in at most one consumer destination.
841 ConsumerDestinations []*BillingDestination `json:"consumerDestinations,omitempty"`
842 // ForceSendFields is a list of field names (e.g. "ConsumerDestinations") to
843 // unconditionally include in API requests. By default, fields with empty or
844 // default values are omitted from API requests. See
845 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
846 // details.
847 ForceSendFields []string `json:"-"`
848 // NullFields is a list of field names (e.g. "ConsumerDestinations") to include
849 // in API requests with the JSON null value. By default, fields with empty
850 // values are omitted from API requests. See
851 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
852 NullFields []string `json:"-"`
853 }
854
855 func (s Billing) MarshalJSON() ([]byte, error) {
856 type NoMethod Billing
857 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
858 }
859
860 // BillingConfig: Describes the billing configuration for a new tenant project.
861 type BillingConfig struct {
862 // BillingAccount: Name of the billing account. For example
863 // `billingAccounts/012345-567890-ABCDEF`.
864 BillingAccount string `json:"billingAccount,omitempty"`
865 // ForceSendFields is a list of field names (e.g. "BillingAccount") to
866 // unconditionally include in API requests. By default, fields with empty or
867 // default values are omitted from API requests. See
868 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
869 // details.
870 ForceSendFields []string `json:"-"`
871 // NullFields is a list of field names (e.g. "BillingAccount") to include in
872 // API requests with the JSON null value. By default, fields with empty values
873 // are omitted from API requests. See
874 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
875 NullFields []string `json:"-"`
876 }
877
878 func (s BillingConfig) MarshalJSON() ([]byte, error) {
879 type NoMethod BillingConfig
880 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
881 }
882
883 // BillingDestination: Configuration of a specific billing destination
884 // (Currently only support bill against consumer project).
885 type BillingDestination struct {
886 // Metrics: Names of the metrics to report to this billing destination. Each
887 // name must be defined in Service.metrics section.
888 Metrics []string `json:"metrics,omitempty"`
889 // MonitoredResource: The monitored resource type. The type must be defined in
890 // Service.monitored_resources section.
891 MonitoredResource string `json:"monitoredResource,omitempty"`
892 // ForceSendFields is a list of field names (e.g. "Metrics") to unconditionally
893 // include in API requests. By default, fields with empty or default values are
894 // omitted from API requests. See
895 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
896 // details.
897 ForceSendFields []string `json:"-"`
898 // NullFields is a list of field names (e.g. "Metrics") to include in API
899 // requests with the JSON null value. By default, fields with empty values are
900 // omitted from API requests. See
901 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
902 NullFields []string `json:"-"`
903 }
904
905 func (s BillingDestination) MarshalJSON() ([]byte, error) {
906 type NoMethod BillingDestination
907 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
908 }
909
910 // CancelOperationRequest: The request message for Operations.CancelOperation.
911 type CancelOperationRequest struct {
912 }
913
914 // ClientLibrarySettings: Details about how and where to publish client
915 // libraries.
916 type ClientLibrarySettings struct {
917 // CppSettings: Settings for C++ client libraries.
918 CppSettings *CppSettings `json:"cppSettings,omitempty"`
919 // DotnetSettings: Settings for .NET client libraries.
920 DotnetSettings *DotnetSettings `json:"dotnetSettings,omitempty"`
921 // GoSettings: Settings for Go client libraries.
922 GoSettings *GoSettings `json:"goSettings,omitempty"`
923 // JavaSettings: Settings for legacy Java features, supported in the Service
924 // YAML.
925 JavaSettings *JavaSettings `json:"javaSettings,omitempty"`
926 // LaunchStage: Launch stage of this version of the API.
927 //
928 // Possible values:
929 // "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value.
930 // "UNIMPLEMENTED" - The feature is not yet implemented. Users can not use
931 // it.
932 // "PRELAUNCH" - Prelaunch features are hidden from users and are only
933 // visible internally.
934 // "EARLY_ACCESS" - Early Access features are limited to a closed group of
935 // testers. To use these features, you must sign up in advance and sign a
936 // Trusted Tester agreement (which includes confidentiality provisions). These
937 // features may be unstable, changed in backward-incompatible ways, and are not
938 // guaranteed to be released.
939 // "ALPHA" - Alpha is a limited availability test for releases before they
940 // are cleared for widespread use. By Alpha, all significant design issues are
941 // resolved and we are in the process of verifying functionality. Alpha
942 // customers need to apply for access, agree to applicable terms, and have
943 // their projects allowlisted. Alpha releases don't have to be feature
944 // complete, no SLAs are provided, and there are no technical support
945 // obligations, but they will be far enough along that customers can actually
946 // use them in test environments or for limited-use tests -- just like they
947 // would in normal production cases.
948 // "BETA" - Beta is the point at which we are ready to open a release for any
949 // customer to use. There are no SLA or technical support obligations in a Beta
950 // release. Products will be complete from a feature perspective, but may have
951 // some open outstanding issues. Beta releases are suitable for limited
952 // production use cases.
953 // "GA" - GA features are open to all developers and are considered stable
954 // and fully qualified for production use.
955 // "DEPRECATED" - Deprecated features are scheduled to be shut down and
956 // removed. For more information, see the "Deprecation Policy" section of our
957 // [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud
958 // Platform Subject to the Deprecation
959 // Policy](https://cloud.google.com/terms/deprecation) documentation.
960 LaunchStage string `json:"launchStage,omitempty"`
961 // NodeSettings: Settings for Node client libraries.
962 NodeSettings *NodeSettings `json:"nodeSettings,omitempty"`
963 // PhpSettings: Settings for PHP client libraries.
964 PhpSettings *PhpSettings `json:"phpSettings,omitempty"`
965 // PythonSettings: Settings for Python client libraries.
966 PythonSettings *PythonSettings `json:"pythonSettings,omitempty"`
967 // RestNumericEnums: When using transport=rest, the client request will encode
968 // enums as numbers rather than strings.
969 RestNumericEnums bool `json:"restNumericEnums,omitempty"`
970 // RubySettings: Settings for Ruby client libraries.
971 RubySettings *RubySettings `json:"rubySettings,omitempty"`
972 // Version: Version of the API to apply these settings to. This is the full
973 // protobuf package for the API, ending in the version element. Examples:
974 // "google.cloud.speech.v1" and "google.spanner.admin.database.v1".
975 Version string `json:"version,omitempty"`
976 // ForceSendFields is a list of field names (e.g. "CppSettings") to
977 // unconditionally include in API requests. By default, fields with empty or
978 // default values are omitted from API requests. See
979 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
980 // details.
981 ForceSendFields []string `json:"-"`
982 // NullFields is a list of field names (e.g. "CppSettings") to include in API
983 // requests with the JSON null value. By default, fields with empty values are
984 // omitted from API requests. See
985 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
986 NullFields []string `json:"-"`
987 }
988
989 func (s ClientLibrarySettings) MarshalJSON() ([]byte, error) {
990 type NoMethod ClientLibrarySettings
991 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
992 }
993
994 // CommonLanguageSettings: Required information for every language.
995 type CommonLanguageSettings struct {
996 // Destinations: The destination where API teams want this client library to be
997 // published.
998 //
999 // Possible values:
1000 // "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED" - Client libraries will neither
1001 // be generated nor published to package managers.
1002 // "GITHUB" - Generate the client library in a repo under
1003 // github.com/googleapis, but don't publish it to package managers.
1004 // "PACKAGE_MANAGER" - Publish the library to package managers like nuget.org
1005 // and npmjs.com.
1006 Destinations []string `json:"destinations,omitempty"`
1007 // ReferenceDocsUri: Link to automatically generated reference documentation.
1008 // Example: https://cloud.google.com/nodejs/docs/reference/asset/latest
1009 ReferenceDocsUri string `json:"referenceDocsUri,omitempty"`
1010 // SelectiveGapicGeneration: Configuration for which RPCs should be generated
1011 // in the GAPIC client. Note: This field should not be used in most cases.
1012 SelectiveGapicGeneration *SelectiveGapicGeneration `json:"selectiveGapicGeneration,omitempty"`
1013 // ForceSendFields is a list of field names (e.g. "Destinations") to
1014 // unconditionally include in API requests. By default, fields with empty or
1015 // default values are omitted from API requests. See
1016 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1017 // details.
1018 ForceSendFields []string `json:"-"`
1019 // NullFields is a list of field names (e.g. "Destinations") to include in API
1020 // requests with the JSON null value. By default, fields with empty values are
1021 // omitted from API requests. See
1022 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1023 NullFields []string `json:"-"`
1024 }
1025
1026 func (s CommonLanguageSettings) MarshalJSON() ([]byte, error) {
1027 type NoMethod CommonLanguageSettings
1028 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1029 }
1030
1031 // Context: `Context` defines which contexts an API requests. Example: context:
1032 // rules: - selector: "*" requested: - google.rpc.context.ProjectContext -
1033 // google.rpc.context.OriginContext The above specifies that all methods in the
1034 // API request `google.rpc.context.ProjectContext` and
1035 // `google.rpc.context.OriginContext`. Available context types are defined in
1036 // package `google.rpc.context`. This also provides mechanism to allowlist any
1037 // protobuf message extension that can be sent in grpc metadata using
1038 // “x-goog-ext--bin” and “x-goog-ext--jspb” format. For example, list
1039 // any service specific protobuf types that can appear in grpc metadata as
1040 // follows in your yaml file: Example: context: rules: - selector:
1041 // "google.example.library.v1.LibraryService.CreateBook"
1042 // allowed_request_extensions: - google.foo.v1.NewExtension
1043 // allowed_response_extensions: - google.foo.v1.NewExtension You can also
1044 // specify extension ID instead of fully qualified extension name here.
1045 type Context struct {
1046 // Rules: A list of RPC context rules that apply to individual API methods.
1047 // **NOTE:** All service configuration rules follow "last one wins" order.
1048 Rules []*ContextRule `json:"rules,omitempty"`
1049 // ForceSendFields is a list of field names (e.g. "Rules") to unconditionally
1050 // include in API requests. By default, fields with empty or default values are
1051 // omitted from API requests. See
1052 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1053 // details.
1054 ForceSendFields []string `json:"-"`
1055 // NullFields is a list of field names (e.g. "Rules") to include in API
1056 // requests with the JSON null value. By default, fields with empty values are
1057 // omitted from API requests. See
1058 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1059 NullFields []string `json:"-"`
1060 }
1061
1062 func (s Context) MarshalJSON() ([]byte, error) {
1063 type NoMethod Context
1064 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1065 }
1066
1067 // ContextRule: A context rule provides information about the context for an
1068 // individual API element.
1069 type ContextRule struct {
1070 // AllowedRequestExtensions: A list of full type names or extension IDs of
1071 // extensions allowed in grpc side channel from client to backend.
1072 AllowedRequestExtensions []string `json:"allowedRequestExtensions,omitempty"`
1073 // AllowedResponseExtensions: A list of full type names or extension IDs of
1074 // extensions allowed in grpc side channel from backend to client.
1075 AllowedResponseExtensions []string `json:"allowedResponseExtensions,omitempty"`
1076 // Provided: A list of full type names of provided contexts. It is used to
1077 // support propagating HTTP headers and ETags from the response extension.
1078 Provided []string `json:"provided,omitempty"`
1079 // Requested: A list of full type names of requested contexts, only the
1080 // requested context will be made available to the backend.
1081 Requested []string `json:"requested,omitempty"`
1082 // Selector: Selects the methods to which this rule applies. Refer to selector
1083 // for syntax details.
1084 Selector string `json:"selector,omitempty"`
1085 // ForceSendFields is a list of field names (e.g. "AllowedRequestExtensions")
1086 // to unconditionally include in API requests. By default, fields with empty or
1087 // default values are omitted from API requests. See
1088 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1089 // details.
1090 ForceSendFields []string `json:"-"`
1091 // NullFields is a list of field names (e.g. "AllowedRequestExtensions") to
1092 // include in API requests with the JSON null value. By default, fields with
1093 // empty values are omitted from API requests. See
1094 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1095 NullFields []string `json:"-"`
1096 }
1097
1098 func (s ContextRule) MarshalJSON() ([]byte, error) {
1099 type NoMethod ContextRule
1100 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1101 }
1102
1103 // Control: Selects and configures the service controller used by the service.
1104 // Example: control: environment: servicecontrol.googleapis.com
1105 type Control struct {
1106 // Environment: The service controller environment to use. If empty, no control
1107 // plane features (like quota and billing) will be enabled. The recommended
1108 // value for most services is servicecontrol.googleapis.com.
1109 Environment string `json:"environment,omitempty"`
1110 // MethodPolicies: Defines policies applying to the API methods of the service.
1111 MethodPolicies []*MethodPolicy `json:"methodPolicies,omitempty"`
1112 // ForceSendFields is a list of field names (e.g. "Environment") to
1113 // unconditionally include in API requests. By default, fields with empty or
1114 // default values are omitted from API requests. See
1115 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1116 // details.
1117 ForceSendFields []string `json:"-"`
1118 // NullFields is a list of field names (e.g. "Environment") to include in API
1119 // requests with the JSON null value. By default, fields with empty values are
1120 // omitted from API requests. See
1121 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1122 NullFields []string `json:"-"`
1123 }
1124
1125 func (s Control) MarshalJSON() ([]byte, error) {
1126 type NoMethod Control
1127 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1128 }
1129
1130 // CppSettings: Settings for C++ client libraries.
1131 type CppSettings struct {
1132 // Common: Some settings.
1133 Common *CommonLanguageSettings `json:"common,omitempty"`
1134 // ForceSendFields is a list of field names (e.g. "Common") to unconditionally
1135 // include in API requests. By default, fields with empty or default values are
1136 // omitted from API requests. See
1137 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1138 // details.
1139 ForceSendFields []string `json:"-"`
1140 // NullFields is a list of field names (e.g. "Common") to include in API
1141 // requests with the JSON null value. By default, fields with empty values are
1142 // omitted from API requests. See
1143 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1144 NullFields []string `json:"-"`
1145 }
1146
1147 func (s CppSettings) MarshalJSON() ([]byte, error) {
1148 type NoMethod CppSettings
1149 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1150 }
1151
1152 // CreateTenancyUnitRequest: Request to create a tenancy unit for a service
1153 // consumer of a managed service.
1154 type CreateTenancyUnitRequest struct {
1155 // TenancyUnitId: Optional. Optional service producer-provided identifier of
1156 // the tenancy unit. Must be no longer than 40 characters and preferably URI
1157 // friendly. If it isn't provided, a UID for the tenancy unit is automatically
1158 // generated. The identifier must be unique across a managed service. If the
1159 // tenancy unit already exists for the managed service and service consumer
1160 // pair, calling `CreateTenancyUnit` returns the existing tenancy unit if the
1161 // provided identifier is identical or empty, otherwise the call fails.
1162 TenancyUnitId string `json:"tenancyUnitId,omitempty"`
1163 // ForceSendFields is a list of field names (e.g. "TenancyUnitId") to
1164 // unconditionally include in API requests. By default, fields with empty or
1165 // default values are omitted from API requests. See
1166 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1167 // details.
1168 ForceSendFields []string `json:"-"`
1169 // NullFields is a list of field names (e.g. "TenancyUnitId") to include in API
1170 // requests with the JSON null value. By default, fields with empty values are
1171 // omitted from API requests. See
1172 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1173 NullFields []string `json:"-"`
1174 }
1175
1176 func (s CreateTenancyUnitRequest) MarshalJSON() ([]byte, error) {
1177 type NoMethod CreateTenancyUnitRequest
1178 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1179 }
1180
1181 // CustomError: Customize service error responses. For example, list any
1182 // service specific protobuf types that can appear in error detail lists of
1183 // error responses. Example: custom_error: types: - google.foo.v1.CustomError -
1184 // google.foo.v1.AnotherError
1185 type CustomError struct {
1186 // Rules: The list of custom error rules that apply to individual API messages.
1187 // **NOTE:** All service configuration rules follow "last one wins" order.
1188 Rules []*CustomErrorRule `json:"rules,omitempty"`
1189 // Types: The list of custom error detail types, e.g.
1190 // 'google.foo.v1.CustomError'.
1191 Types []string `json:"types,omitempty"`
1192 // ForceSendFields is a list of field names (e.g. "Rules") to unconditionally
1193 // include in API requests. By default, fields with empty or default values are
1194 // omitted from API requests. See
1195 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1196 // details.
1197 ForceSendFields []string `json:"-"`
1198 // NullFields is a list of field names (e.g. "Rules") to include in API
1199 // requests with the JSON null value. By default, fields with empty values are
1200 // omitted from API requests. See
1201 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1202 NullFields []string `json:"-"`
1203 }
1204
1205 func (s CustomError) MarshalJSON() ([]byte, error) {
1206 type NoMethod CustomError
1207 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1208 }
1209
1210 // CustomErrorRule: A custom error rule.
1211 type CustomErrorRule struct {
1212 // IsErrorType: Mark this message as possible payload in error response.
1213 // Otherwise, objects of this type will be filtered when they appear in error
1214 // payload.
1215 IsErrorType bool `json:"isErrorType,omitempty"`
1216 // Selector: Selects messages to which this rule applies. Refer to selector for
1217 // syntax details.
1218 Selector string `json:"selector,omitempty"`
1219 // ForceSendFields is a list of field names (e.g. "IsErrorType") to
1220 // unconditionally include in API requests. By default, fields with empty or
1221 // default values are omitted from API requests. See
1222 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1223 // details.
1224 ForceSendFields []string `json:"-"`
1225 // NullFields is a list of field names (e.g. "IsErrorType") to include in API
1226 // requests with the JSON null value. By default, fields with empty values are
1227 // omitted from API requests. See
1228 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1229 NullFields []string `json:"-"`
1230 }
1231
1232 func (s CustomErrorRule) MarshalJSON() ([]byte, error) {
1233 type NoMethod CustomErrorRule
1234 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1235 }
1236
1237 // CustomHttpPattern: A custom pattern is used for defining custom HTTP verb.
1238 type CustomHttpPattern struct {
1239 // Kind: The name of this custom HTTP verb.
1240 Kind string `json:"kind,omitempty"`
1241 // Path: The path matched by this custom verb.
1242 Path string `json:"path,omitempty"`
1243 // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally
1244 // include in API requests. By default, fields with empty or default values are
1245 // omitted from API requests. See
1246 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1247 // details.
1248 ForceSendFields []string `json:"-"`
1249 // NullFields is a list of field names (e.g. "Kind") to include in API requests
1250 // with the JSON null value. By default, fields with empty values are omitted
1251 // from API requests. See
1252 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1253 NullFields []string `json:"-"`
1254 }
1255
1256 func (s CustomHttpPattern) MarshalJSON() ([]byte, error) {
1257 type NoMethod CustomHttpPattern
1258 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1259 }
1260
1261 // DeleteTenantProjectRequest: Request message to delete tenant project
1262 // resource from the tenancy unit.
1263 type DeleteTenantProjectRequest struct {
1264 // Tag: Required. Tag of the resource within the tenancy unit.
1265 Tag string `json:"tag,omitempty"`
1266 // ForceSendFields is a list of field names (e.g. "Tag") to unconditionally
1267 // include in API requests. By default, fields with empty or default values are
1268 // omitted from API requests. See
1269 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1270 // details.
1271 ForceSendFields []string `json:"-"`
1272 // NullFields is a list of field names (e.g. "Tag") to include in API requests
1273 // with the JSON null value. By default, fields with empty values are omitted
1274 // from API requests. See
1275 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1276 NullFields []string `json:"-"`
1277 }
1278
1279 func (s DeleteTenantProjectRequest) MarshalJSON() ([]byte, error) {
1280 type NoMethod DeleteTenantProjectRequest
1281 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1282 }
1283
1284 // Documentation: `Documentation` provides the information for describing a
1285 // service. Example: documentation: summary: > The Google Calendar API gives
1286 // access to most calendar features. pages: - name: Overview content: (==
1287 // include google/foo/overview.md ==) - name: Tutorial content: (== include
1288 // google/foo/tutorial.md ==) subpages: - name: Java content: (== include
1289 // google/foo/tutorial_java.md ==) rules: - selector:
1290 // google.calendar.Calendar.Get description: > ... - selector:
1291 // google.calendar.Calendar.Put description: > ... Documentation is provided in
1292 // markdown syntax. In addition to standard markdown features, definition
1293 // lists, tables and fenced code blocks are supported. Section headers can be
1294 // provided and are interpreted relative to the section nesting of the context
1295 // where a documentation fragment is embedded. Documentation from the IDL is
1296 // merged with documentation defined via the config at normalization time,
1297 // where documentation provided by config rules overrides IDL provided. A
1298 // number of constructs specific to the API platform are supported in
1299 // documentation text. In order to reference a proto element, the following
1300 // notation can be used: [fully.qualified.proto.name][] To override the display
1301 // text used for the link, this can be used: [display
1302 // text][fully.qualified.proto.name] Text can be excluded from doc using the
1303 // following notation: (-- internal comment --) A few directives are available
1304 // in documentation. Note that directives must appear on a single line to be
1305 // properly identified. The `include` directive includes a markdown file from
1306 // an external source: (== include path/to/file ==) The `resource_for`
1307 // directive marks a message to be the resource of a collection in REST view.
1308 // If it is not specified, tools attempt to infer the resource from the
1309 // operations in a collection: (== resource_for v1.shelves.books ==) The
1310 // directive `suppress_warning` does not directly affect documentation and is
1311 // documented together with service config validation.
1312 type Documentation struct {
1313 // AdditionalIamInfo: Optional information about the IAM configuration. This is
1314 // typically used to link to documentation about a product's IAM roles and
1315 // permissions.
1316 AdditionalIamInfo string `json:"additionalIamInfo,omitempty"`
1317 // DocumentationRootUrl: The URL to the root of documentation.
1318 DocumentationRootUrl string `json:"documentationRootUrl,omitempty"`
1319 // Overview: Declares a single overview page. For example: documentation:
1320 // summary: ... overview: (== include overview.md ==) This is a shortcut for
1321 // the following declaration (using pages style): documentation: summary: ...
1322 // pages: - name: Overview content: (== include overview.md ==) Note: you
1323 // cannot specify both `overview` field and `pages` field.
1324 Overview string `json:"overview,omitempty"`
1325 // Pages: The top level pages for the documentation set.
1326 Pages []*Page `json:"pages,omitempty"`
1327 // Rules: A list of documentation rules that apply to individual API elements.
1328 // **NOTE:** All service configuration rules follow "last one wins" order.
1329 Rules []*DocumentationRule `json:"rules,omitempty"`
1330 // SectionOverrides: Specifies section and content to override the boilerplate
1331 // content. Currently overrides following sections: 1.
1332 // rest.service.client_libraries
1333 SectionOverrides []*Page `json:"sectionOverrides,omitempty"`
1334 // ServiceRootUrl: Specifies the service root url if the default one (the
1335 // service name from the yaml file) is not suitable. This can be seen in any
1336 // fully specified service urls as well as sections that show a base that other
1337 // urls are relative to.
1338 ServiceRootUrl string `json:"serviceRootUrl,omitempty"`
1339 // Summary: A short description of what the service does. The summary must be
1340 // plain text. It becomes the overview of the service displayed in Google Cloud
1341 // Console. NOTE: This field is equivalent to the standard field `description`.
1342 Summary string `json:"summary,omitempty"`
1343 // ForceSendFields is a list of field names (e.g. "AdditionalIamInfo") to
1344 // unconditionally include in API requests. By default, fields with empty or
1345 // default values are omitted from API requests. See
1346 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1347 // details.
1348 ForceSendFields []string `json:"-"`
1349 // NullFields is a list of field names (e.g. "AdditionalIamInfo") to include in
1350 // API requests with the JSON null value. By default, fields with empty values
1351 // are omitted from API requests. See
1352 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1353 NullFields []string `json:"-"`
1354 }
1355
1356 func (s Documentation) MarshalJSON() ([]byte, error) {
1357 type NoMethod Documentation
1358 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1359 }
1360
1361 // DocumentationRule: A documentation rule provides information about
1362 // individual API elements.
1363 type DocumentationRule struct {
1364 // DeprecationDescription: Deprecation description of the selected element(s).
1365 // It can be provided if an element is marked as `deprecated`.
1366 DeprecationDescription string `json:"deprecationDescription,omitempty"`
1367 // Description: Description of the selected proto element (e.g. a message, a
1368 // method, a 'service' definition, or a field). Defaults to leading & trailing
1369 // comments taken from the proto source definition of the proto element.
1370 Description string `json:"description,omitempty"`
1371 // DisableReplacementWords: String of comma or space separated case-sensitive
1372 // words for which method/field name replacement will be disabled.
1373 DisableReplacementWords string `json:"disableReplacementWords,omitempty"`
1374 // Selector: The selector is a comma-separated list of patterns for any element
1375 // such as a method, a field, an enum value. Each pattern is a qualified name
1376 // of the element which may end in "*", indicating a wildcard. Wildcards are
1377 // only allowed at the end and for a whole component of the qualified name,
1378 // i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". A wildcard will match
1379 // one or more components. To specify a default for all applicable elements,
1380 // the whole pattern "*" is used.
1381 Selector string `json:"selector,omitempty"`
1382 // ForceSendFields is a list of field names (e.g. "DeprecationDescription") to
1383 // unconditionally include in API requests. By default, fields with empty or
1384 // default values are omitted from API requests. See
1385 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1386 // details.
1387 ForceSendFields []string `json:"-"`
1388 // NullFields is a list of field names (e.g. "DeprecationDescription") to
1389 // include in API requests with the JSON null value. By default, fields with
1390 // empty values are omitted from API requests. See
1391 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1392 NullFields []string `json:"-"`
1393 }
1394
1395 func (s DocumentationRule) MarshalJSON() ([]byte, error) {
1396 type NoMethod DocumentationRule
1397 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1398 }
1399
1400 // DotnetSettings: Settings for Dotnet client libraries.
1401 type DotnetSettings struct {
1402 // Common: Some settings.
1403 Common *CommonLanguageSettings `json:"common,omitempty"`
1404 // ForcedNamespaceAliases: Namespaces which must be aliased in snippets due to
1405 // a known (but non-generator-predictable) naming collision
1406 ForcedNamespaceAliases []string `json:"forcedNamespaceAliases,omitempty"`
1407 // HandwrittenSignatures: Method signatures (in the form
1408 // "service.method(signature)") which are provided separately, so shouldn't be
1409 // generated. Snippets *calling* these methods are still generated, however.
1410 HandwrittenSignatures []string `json:"handwrittenSignatures,omitempty"`
1411 // IgnoredResources: List of full resource types to ignore during generation.
1412 // This is typically used for API-specific Location resources, which should be
1413 // handled by the generator as if they were actually the common Location
1414 // resources. Example entry: "documentai.googleapis.com/Location"
1415 IgnoredResources []string `json:"ignoredResources,omitempty"`
1416 // RenamedResources: Map from full resource types to the effective short name
1417 // for the resource. This is used when otherwise resource named from different
1418 // services would cause naming collisions. Example entry:
1419 // "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
1420 RenamedResources map[string]string `json:"renamedResources,omitempty"`
1421 // RenamedServices: Map from original service names to renamed versions. This
1422 // is used when the default generated types would cause a naming conflict.
1423 // (Neither name is fully-qualified.) Example: Subscriber to
1424 // SubscriberServiceApi.
1425 RenamedServices map[string]string `json:"renamedServices,omitempty"`
1426 // ForceSendFields is a list of field names (e.g. "Common") to unconditionally
1427 // include in API requests. By default, fields with empty or default values are
1428 // omitted from API requests. See
1429 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1430 // details.
1431 ForceSendFields []string `json:"-"`
1432 // NullFields is a list of field names (e.g. "Common") to include in API
1433 // requests with the JSON null value. By default, fields with empty values are
1434 // omitted from API requests. See
1435 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1436 NullFields []string `json:"-"`
1437 }
1438
1439 func (s DotnetSettings) MarshalJSON() ([]byte, error) {
1440 type NoMethod DotnetSettings
1441 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1442 }
1443
1444 // Empty: A generic empty message that you can re-use to avoid defining
1445 // duplicated empty messages in your APIs. A typical example is to use it as
1446 // the request or the response type of an API method. For instance: service Foo
1447 // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
1448 type Empty struct {
1449 // ServerResponse contains the HTTP response code and headers from the server.
1450 googleapi.ServerResponse `json:"-"`
1451 }
1452
1453 // Endpoint: `Endpoint` describes a network address of a service that serves a
1454 // set of APIs. It is commonly known as a service endpoint. A service may
1455 // expose any number of service endpoints, and all service endpoints share the
1456 // same service definition, such as quota limits and monitoring metrics.
1457 // Example: type: google.api.Service name: library-example.googleapis.com
1458 // endpoints: # Declares network address
1459 // `https://library-example.googleapis.com` # for service
1460 // `library-example.googleapis.com`. The `https` scheme # is implicit for all
1461 // service endpoints. Other schemes may be # supported in the future. - name:
1462 // library-example.googleapis.com allow_cors: false - name:
1463 // content-staging-library-example.googleapis.com # Allows HTTP OPTIONS calls
1464 // to be passed to the API frontend, for it # to decide whether the subsequent
1465 // cross-origin request is allowed # to proceed. allow_cors: true
1466 type Endpoint struct {
1467 // Aliases: Aliases for this endpoint, these will be served by the same UrlMap
1468 // as the parent endpoint, and will be provisioned in the GCP stack for the
1469 // Regional Endpoints.
1470 Aliases []string `json:"aliases,omitempty"`
1471 // AllowCors: Allowing CORS
1472 // (https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka
1473 // cross-domain traffic, would allow the backends served from this endpoint to
1474 // receive and respond to HTTP OPTIONS requests. The response will be used by
1475 // the browser to determine whether the subsequent cross-origin request is
1476 // allowed to proceed.
1477 AllowCors bool `json:"allowCors,omitempty"`
1478 // Name: The canonical name of this endpoint.
1479 Name string `json:"name,omitempty"`
1480 // Target: The specification of an Internet routable address of API frontend
1481 // that will handle requests to this API Endpoint
1482 // (https://cloud.google.com/apis/design/glossary). It should be either a valid
1483 // IPv4 address or a fully-qualified domain name. For example, "8.8.8.8" or
1484 // "myservice.appspot.com".
1485 Target string `json:"target,omitempty"`
1486 // ForceSendFields is a list of field names (e.g. "Aliases") to unconditionally
1487 // include in API requests. By default, fields with empty or default values are
1488 // omitted from API requests. See
1489 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1490 // details.
1491 ForceSendFields []string `json:"-"`
1492 // NullFields is a list of field names (e.g. "Aliases") to include in API
1493 // requests with the JSON null value. By default, fields with empty values are
1494 // omitted from API requests. See
1495 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1496 NullFields []string `json:"-"`
1497 }
1498
1499 func (s Endpoint) MarshalJSON() ([]byte, error) {
1500 type NoMethod Endpoint
1501 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1502 }
1503
1504 // Enum: Enum type definition. New usages of this message as an alternative to
1505 // EnumDescriptorProto are strongly discouraged. This message does not
1506 // reliability preserve all information necessary to model the schema and
1507 // preserve semantics. Instead make use of FileDescriptorSet which preserves
1508 // the necessary information.
1509 type Enum struct {
1510 // Edition: The source edition string, only valid when syntax is
1511 // SYNTAX_EDITIONS.
1512 Edition string `json:"edition,omitempty"`
1513 // Enumvalue: Enum value definitions.
1514 Enumvalue []*EnumValue `json:"enumvalue,omitempty"`
1515 // Name: Enum type name.
1516 Name string `json:"name,omitempty"`
1517 // Options: Protocol buffer options.
1518 Options []*Option `json:"options,omitempty"`
1519 // SourceContext: The source context.
1520 SourceContext *SourceContext `json:"sourceContext,omitempty"`
1521 // Syntax: The source syntax.
1522 //
1523 // Possible values:
1524 // "SYNTAX_PROTO2" - Syntax `proto2`.
1525 // "SYNTAX_PROTO3" - Syntax `proto3`.
1526 // "SYNTAX_EDITIONS" - Syntax `editions`.
1527 Syntax string `json:"syntax,omitempty"`
1528 // ForceSendFields is a list of field names (e.g. "Edition") to unconditionally
1529 // include in API requests. By default, fields with empty or default values are
1530 // omitted from API requests. See
1531 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1532 // details.
1533 ForceSendFields []string `json:"-"`
1534 // NullFields is a list of field names (e.g. "Edition") to include in API
1535 // requests with the JSON null value. By default, fields with empty values are
1536 // omitted from API requests. See
1537 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1538 NullFields []string `json:"-"`
1539 }
1540
1541 func (s Enum) MarshalJSON() ([]byte, error) {
1542 type NoMethod Enum
1543 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1544 }
1545
1546 // EnumValue: Enum value definition. New usages of this message as an
1547 // alternative to EnumValueDescriptorProto are strongly discouraged. This
1548 // message does not reliability preserve all information necessary to model the
1549 // schema and preserve semantics. Instead make use of FileDescriptorSet which
1550 // preserves the necessary information.
1551 type EnumValue struct {
1552 // Name: Enum value name.
1553 Name string `json:"name,omitempty"`
1554 // Number: Enum value number.
1555 Number int64 `json:"number,omitempty"`
1556 // Options: Protocol buffer options.
1557 Options []*Option `json:"options,omitempty"`
1558 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally
1559 // include in API requests. By default, fields with empty or default values are
1560 // omitted from API requests. See
1561 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1562 // details.
1563 ForceSendFields []string `json:"-"`
1564 // NullFields is a list of field names (e.g. "Name") to include in API requests
1565 // with the JSON null value. By default, fields with empty values are omitted
1566 // from API requests. See
1567 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1568 NullFields []string `json:"-"`
1569 }
1570
1571 func (s EnumValue) MarshalJSON() ([]byte, error) {
1572 type NoMethod EnumValue
1573 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1574 }
1575
1576 // ExperimentalFeatures: Experimental features to be included during client
1577 // library generation. These fields will be deprecated once the feature
1578 // graduates and is enabled by default.
1579 type ExperimentalFeatures struct {
1580 // ProtobufPythonicTypesEnabled: Enables generation of protobuf code using new
1581 // types that are more Pythonic which are included in `protobuf>=5.29.x`. This
1582 // feature will be enabled by default 1 month after launching the feature in
1583 // preview packages.
1584 ProtobufPythonicTypesEnabled bool `json:"protobufPythonicTypesEnabled,omitempty"`
1585 // RestAsyncIoEnabled: Enables generation of asynchronous REST clients if
1586 // `rest` transport is enabled. By default, asynchronous REST clients will not
1587 // be generated. This feature will be enabled by default 1 month after
1588 // launching the feature in preview packages.
1589 RestAsyncIoEnabled bool `json:"restAsyncIoEnabled,omitempty"`
1590 // UnversionedPackageDisabled: Disables generation of an unversioned Python
1591 // package for this client library. This means that the module names will need
1592 // to be versioned in import statements. For example `import
1593 // google.cloud.library_v2` instead of `import google.cloud.library`.
1594 UnversionedPackageDisabled bool `json:"unversionedPackageDisabled,omitempty"`
1595 // ForceSendFields is a list of field names (e.g.
1596 // "ProtobufPythonicTypesEnabled") to unconditionally include in API requests.
1597 // By default, fields with empty or default values are omitted from API
1598 // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields
1599 // for more details.
1600 ForceSendFields []string `json:"-"`
1601 // NullFields is a list of field names (e.g. "ProtobufPythonicTypesEnabled") to
1602 // include in API requests with the JSON null value. By default, fields with
1603 // empty values are omitted from API requests. See
1604 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1605 NullFields []string `json:"-"`
1606 }
1607
1608 func (s ExperimentalFeatures) MarshalJSON() ([]byte, error) {
1609 type NoMethod ExperimentalFeatures
1610 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1611 }
1612
1613 // Field: A single field of a message type. New usages of this message as an
1614 // alternative to FieldDescriptorProto are strongly discouraged. This message
1615 // does not reliability preserve all information necessary to model the schema
1616 // and preserve semantics. Instead make use of FileDescriptorSet which
1617 // preserves the necessary information.
1618 type Field struct {
1619 // Cardinality: The field cardinality.
1620 //
1621 // Possible values:
1622 // "CARDINALITY_UNKNOWN" - For fields with unknown cardinality.
1623 // "CARDINALITY_OPTIONAL" - For optional fields.
1624 // "CARDINALITY_REQUIRED" - For required fields. Proto2 syntax only.
1625 // "CARDINALITY_REPEATED" - For repeated fields.
1626 Cardinality string `json:"cardinality,omitempty"`
1627 // DefaultValue: The string value of the default value of this field. Proto2
1628 // syntax only.
1629 DefaultValue string `json:"defaultValue,omitempty"`
1630 // JsonName: The field JSON name.
1631 JsonName string `json:"jsonName,omitempty"`
1632 // Kind: The field type.
1633 //
1634 // Possible values:
1635 // "TYPE_UNKNOWN" - Field type unknown.
1636 // "TYPE_DOUBLE" - Field type double.
1637 // "TYPE_FLOAT" - Field type float.
1638 // "TYPE_INT64" - Field type int64.
1639 // "TYPE_UINT64" - Field type uint64.
1640 // "TYPE_INT32" - Field type int32.
1641 // "TYPE_FIXED64" - Field type fixed64.
1642 // "TYPE_FIXED32" - Field type fixed32.
1643 // "TYPE_BOOL" - Field type bool.
1644 // "TYPE_STRING" - Field type string.
1645 // "TYPE_GROUP" - Field type group. Proto2 syntax only, and deprecated.
1646 // "TYPE_MESSAGE" - Field type message.
1647 // "TYPE_BYTES" - Field type bytes.
1648 // "TYPE_UINT32" - Field type uint32.
1649 // "TYPE_ENUM" - Field type enum.
1650 // "TYPE_SFIXED32" - Field type sfixed32.
1651 // "TYPE_SFIXED64" - Field type sfixed64.
1652 // "TYPE_SINT32" - Field type sint32.
1653 // "TYPE_SINT64" - Field type sint64.
1654 Kind string `json:"kind,omitempty"`
1655 // Name: The field name.
1656 Name string `json:"name,omitempty"`
1657 // Number: The field number.
1658 Number int64 `json:"number,omitempty"`
1659 // OneofIndex: The index of the field type in `Type.oneofs`, for message or
1660 // enumeration types. The first type has index 1; zero means the type is not in
1661 // the list.
1662 OneofIndex int64 `json:"oneofIndex,omitempty"`
1663 // Options: The protocol buffer options.
1664 Options []*Option `json:"options,omitempty"`
1665 // Packed: Whether to use alternative packed wire representation.
1666 Packed bool `json:"packed,omitempty"`
1667 // TypeUrl: The field type URL, without the scheme, for message or enumeration
1668 // types. Example: "type.googleapis.com/google.protobuf.Timestamp".
1669 TypeUrl string `json:"typeUrl,omitempty"`
1670 // ForceSendFields is a list of field names (e.g. "Cardinality") to
1671 // unconditionally include in API requests. By default, fields with empty or
1672 // default values are omitted from API requests. See
1673 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1674 // details.
1675 ForceSendFields []string `json:"-"`
1676 // NullFields is a list of field names (e.g. "Cardinality") to include in API
1677 // requests with the JSON null value. By default, fields with empty values are
1678 // omitted from API requests. See
1679 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1680 NullFields []string `json:"-"`
1681 }
1682
1683 func (s Field) MarshalJSON() ([]byte, error) {
1684 type NoMethod Field
1685 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1686 }
1687
1688 // FieldPolicy: Google API Policy Annotation This message defines a simple API
1689 // policy annotation that can be used to annotate API request and response
1690 // message fields with applicable policies. One field may have multiple
1691 // applicable policies that must all be satisfied before a request can be
1692 // processed. This policy annotation is used to generate the overall policy
1693 // that will be used for automatic runtime policy enforcement and documentation
1694 // generation.
1695 type FieldPolicy struct {
1696 // ResourcePermission: Specifies the required permission(s) for the resource
1697 // referred to by the field. It requires the field contains a valid resource
1698 // reference, and the request must pass the permission checks to proceed. For
1699 // example, "resourcemanager.projects.get".
1700 ResourcePermission string `json:"resourcePermission,omitempty"`
1701 // ResourceType: Specifies the resource type for the resource referred to by
1702 // the field.
1703 ResourceType string `json:"resourceType,omitempty"`
1704 // Selector: Selects one or more request or response message fields to apply
1705 // this `FieldPolicy`. When a `FieldPolicy` is used in proto annotation, the
1706 // selector must be left as empty. The service config generator will
1707 // automatically fill the correct value. When a `FieldPolicy` is used in
1708 // service config, the selector must be a comma-separated string with valid
1709 // request or response field paths, such as "foo.bar" or "foo.bar,foo.baz".
1710 Selector string `json:"selector,omitempty"`
1711 // ForceSendFields is a list of field names (e.g. "ResourcePermission") to
1712 // unconditionally include in API requests. By default, fields with empty or
1713 // default values are omitted from API requests. See
1714 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1715 // details.
1716 ForceSendFields []string `json:"-"`
1717 // NullFields is a list of field names (e.g. "ResourcePermission") to include
1718 // in API requests with the JSON null value. By default, fields with empty
1719 // values are omitted from API requests. See
1720 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1721 NullFields []string `json:"-"`
1722 }
1723
1724 func (s FieldPolicy) MarshalJSON() ([]byte, error) {
1725 type NoMethod FieldPolicy
1726 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1727 }
1728
1729 // GoSettings: Settings for Go client libraries.
1730 type GoSettings struct {
1731 // Common: Some settings.
1732 Common *CommonLanguageSettings `json:"common,omitempty"`
1733 // RenamedServices: Map of service names to renamed services. Keys are the
1734 // package relative service names and values are the name to be used for the
1735 // service client and call options. Example: publishing: go_settings:
1736 // renamed_services: Publisher: TopicAdmin
1737 RenamedServices map[string]string `json:"renamedServices,omitempty"`
1738 // ForceSendFields is a list of field names (e.g. "Common") to unconditionally
1739 // include in API requests. By default, fields with empty or default values are
1740 // omitted from API requests. See
1741 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1742 // details.
1743 ForceSendFields []string `json:"-"`
1744 // NullFields is a list of field names (e.g. "Common") to include in API
1745 // requests with the JSON null value. By default, fields with empty values are
1746 // omitted from API requests. See
1747 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1748 NullFields []string `json:"-"`
1749 }
1750
1751 func (s GoSettings) MarshalJSON() ([]byte, error) {
1752 type NoMethod GoSettings
1753 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1754 }
1755
1756 // Http: Defines the HTTP configuration for an API service. It contains a list
1757 // of HttpRule, each specifying the mapping of an RPC method to one or more
1758 // HTTP REST API methods.
1759 type Http struct {
1760 // FullyDecodeReservedExpansion: When set to true, URL path parameters will be
1761 // fully URI-decoded except in cases of single segment matches in reserved
1762 // expansion, where "%2F" will be left encoded. The default behavior is to not
1763 // decode RFC 6570 reserved characters in multi segment matches.
1764 FullyDecodeReservedExpansion bool `json:"fullyDecodeReservedExpansion,omitempty"`
1765 // Rules: A list of HTTP configuration rules that apply to individual API
1766 // methods. **NOTE:** All service configuration rules follow "last one wins"
1767 // order.
1768 Rules []*HttpRule `json:"rules,omitempty"`
1769 // ForceSendFields is a list of field names (e.g.
1770 // "FullyDecodeReservedExpansion") to unconditionally include in API requests.
1771 // By default, fields with empty or default values are omitted from API
1772 // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields
1773 // for more details.
1774 ForceSendFields []string `json:"-"`
1775 // NullFields is a list of field names (e.g. "FullyDecodeReservedExpansion") to
1776 // include in API requests with the JSON null value. By default, fields with
1777 // empty values are omitted from API requests. See
1778 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1779 NullFields []string `json:"-"`
1780 }
1781
1782 func (s Http) MarshalJSON() ([]byte, error) {
1783 type NoMethod Http
1784 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1785 }
1786
1787 // HttpRule: gRPC Transcoding gRPC Transcoding is a feature for mapping between
1788 // a gRPC method and one or more HTTP REST endpoints. It allows developers to
1789 // build a single API service that supports both gRPC APIs and REST APIs. Many
1790 // systems, including Google APIs (https://github.com/googleapis/googleapis),
1791 // Cloud Endpoints (https://cloud.google.com/endpoints), gRPC Gateway
1792 // (https://github.com/grpc-ecosystem/grpc-gateway), and Envoy
1793 // (https://github.com/envoyproxy/envoy) proxy support this feature and use it
1794 // for large scale production services. `HttpRule` defines the schema of the
1795 // gRPC/REST mapping. The mapping specifies how different portions of the gRPC
1796 // request message are mapped to the URL path, URL query parameters, and HTTP
1797 // request body. It also controls how the gRPC response message is mapped to
1798 // the HTTP response body. `HttpRule` is typically specified as an
1799 // `google.api.http` annotation on the gRPC method. Each mapping specifies a
1800 // URL path template and an HTTP method. The path template may refer to one or
1801 // more fields in the gRPC request message, as long as each field is a
1802 // non-repeated field with a primitive (non-message) type. The path template
1803 // controls how fields of the request message are mapped to the URL path.
1804 // Example: service Messaging { rpc GetMessage(GetMessageRequest) returns
1805 // (Message) { option (google.api.http) = { get: "/v1/{name=messages/*}" }; } }
1806 // message GetMessageRequest { string name = 1; // Mapped to URL path. }
1807 // message Message { string text = 1; // The resource content. } This enables
1808 // an HTTP REST to gRPC mapping as below: - HTTP: `GET /v1/messages/123456` -
1809 // gRPC: `GetMessage(name: "messages/123456")` Any fields in the request
1810 // message which are not bound by the path template automatically become HTTP
1811 // query parameters if there is no HTTP request body. For example: service
1812 // Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option
1813 // (google.api.http) = { get:"/v1/messages/{message_id}" }; } } message
1814 // GetMessageRequest { message SubMessage { string subfield = 1; } string
1815 // message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL
1816 // query parameter `revision`. SubMessage sub = 3; // Mapped to URL query
1817 // parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as
1818 // below: - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo` - gRPC:
1819 // `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield:
1820 // "foo"))` Note that fields which are mapped to URL query parameters must have
1821 // a primitive type or a repeated primitive type or a non-repeated message
1822 // type. In the case of a repeated type, the parameter can be repeated in the
1823 // URL as `...?param=A&param=B`. In the case of a message type, each field of
1824 // the message is mapped to a separate parameter, such as
1825 // `...?foo.a=A&foo.b=B&foo.c=C`. For HTTP methods that allow a request body,
1826 // the `body` field specifies the mapping. Consider a REST update method on the
1827 // message resource collection: service Messaging { rpc
1828 // UpdateMessage(UpdateMessageRequest) returns (Message) { option
1829 // (google.api.http) = { patch: "/v1/messages/{message_id}" body: "message" };
1830 // } } message UpdateMessageRequest { string message_id = 1; // mapped to the
1831 // URL Message message = 2; // mapped to the body } The following HTTP JSON to
1832 // RPC mapping is enabled, where the representation of the JSON in the request
1833 // body is determined by protos JSON encoding: - HTTP: `PATCH
1834 // /v1/messages/123456 { "text": "Hi!" }` - gRPC: `UpdateMessage(message_id:
1835 // "123456" message { text: "Hi!" })` The special name `*` can be used in the
1836 // body mapping to define that every field not bound by the path template
1837 // should be mapped to the request body. This enables the following alternative
1838 // definition of the update method: service Messaging { rpc
1839 // UpdateMessage(Message) returns (Message) { option (google.api.http) = {
1840 // patch: "/v1/messages/{message_id}" body: "*" }; } } message Message { string
1841 // message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is
1842 // enabled: - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }` - gRPC:
1843 // `UpdateMessage(message_id: "123456" text: "Hi!")` Note that when using `*`
1844 // in the body mapping, it is not possible to have HTTP parameters, as all
1845 // fields not bound by the path end in the body. This makes this option more
1846 // rarely used in practice when defining REST APIs. The common usage of `*` is
1847 // in custom methods which don't use the URL at all for transferring data. It
1848 // is possible to define multiple HTTP methods for one RPC by using the
1849 // `additional_bindings` option. Example: service Messaging { rpc
1850 // GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) =
1851 // { get: "/v1/messages/{message_id}" additional_bindings { get:
1852 // "/v1/users/{user_id}/messages/{message_id}" } }; } } message
1853 // GetMessageRequest { string message_id = 1; string user_id = 2; } This
1854 // enables the following two alternative HTTP JSON to RPC mappings: - HTTP:
1855 // `GET /v1/messages/123456` - gRPC: `GetMessage(message_id: "123456")` - HTTP:
1856 // `GET /v1/users/me/messages/123456` - gRPC: `GetMessage(user_id: "me"
1857 // message_id: "123456")` Rules for HTTP mapping 1. Leaf request fields
1858 // (recursive expansion nested messages in the request message) are classified
1859 // into three categories: - Fields referred by the path template. They are
1860 // passed via the URL path. - Fields referred by the HttpRule.body. They are
1861 // passed via the HTTP request body. - All other fields are passed via the URL
1862 // query parameters, and the parameter name is the field path in the request
1863 // message. A repeated field can be represented as multiple query parameters
1864 // under the same name. 2. If HttpRule.body is "*", there is no URL query
1865 // parameter, all fields are passed via URL path and HTTP request body. 3. If
1866 // HttpRule.body is omitted, there is no HTTP request body, all fields are
1867 // passed via URL path and URL query parameters. Path template syntax Template
1868 // = "/" Segments [ Verb ] ; Segments = Segment { "/" Segment } ; Segment = "*"
1869 // | "**" | LITERAL | Variable ; Variable = "{" FieldPath [ "=" Segments ] "}"
1870 // ; FieldPath = IDENT { "." IDENT } ; Verb = ":" LITERAL ; The syntax `*`
1871 // matches a single URL path segment. The syntax `**` matches zero or more URL
1872 // path segments, which must be the last part of the URL path except the
1873 // `Verb`. The syntax `Variable` matches part of the URL path as specified by
1874 // its template. A variable template must not contain other variables. If a
1875 // variable matches a single path segment, its template may be omitted, e.g.
1876 // `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal
1877 // text in the URL path. If the `LITERAL` contains any reserved character, such
1878 // characters should be percent-encoded before the matching. If a variable
1879 // contains exactly one path segment, such as "{var}" or "{var=*}", when
1880 // such a variable is expanded into a URL path on the client side, all
1881 // characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side
1882 // does the reverse decoding. Such variables show up in the Discovery Document
1883 // (https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a
1884 // variable contains multiple path segments, such as "{var=foo/*}" or
1885 // "{var=**}", when such a variable is expanded into a URL path on the client
1886 // side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The
1887 // server side does the reverse decoding, except "%2F" and "%2f" are left
1888 // unchanged. Such variables show up in the Discovery Document
1889 // (https://developers.google.com/discovery/v1/reference/apis) as `{+var}`.
1890 // Using gRPC API Service Configuration gRPC API Service Configuration (service
1891 // config) is a configuration language for configuring a gRPC service to become
1892 // a user-facing product. The service config is simply the YAML representation
1893 // of the `google.api.Service` proto message. As an alternative to annotating
1894 // your proto file, you can configure gRPC transcoding in your service config
1895 // YAML files. You do this by specifying a `HttpRule` that maps the gRPC method
1896 // to a REST endpoint, achieving the same effect as the proto annotation. This
1897 // can be particularly useful if you have a proto that is reused in multiple
1898 // services. Note that any transcoding specified in the service config will
1899 // override any matching transcoding configuration in the proto. The following
1900 // example selects a gRPC method and applies an `HttpRule` to it: http: rules:
1901 // - selector: example.v1.Messaging.GetMessage get:
1902 // /v1/messages/{message_id}/{sub.subfield} Special notes When gRPC Transcoding
1903 // is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion
1904 // must follow the proto3 specification
1905 // (https://developers.google.com/protocol-buffers/docs/proto3#json). While the
1906 // single segment variable follows the semantics of RFC 6570
1907 // (https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion,
1908 // the multi segment variable **does not** follow RFC 6570 Section 3.2.3
1909 // Reserved Expansion. The reason is that the Reserved Expansion does not
1910 // expand special characters like `?` and `#`, which would lead to invalid
1911 // URLs. As the result, gRPC Transcoding uses a custom encoding for multi
1912 // segment variables. The path variables **must not** refer to any repeated or
1913 // mapped field, because client libraries are not capable of handling such
1914 // variable expansion. The path variables **must not** capture the leading "/"
1915 // character. The reason is that the most common use case "{var}" does not
1916 // capture the leading "/" character. For consistency, all path variables must
1917 // share the same behavior. Repeated message fields must not be mapped to URL
1918 // query parameters, because no client library can support such complicated
1919 // mapping. If an API needs to use a JSON array for request or response body,
1920 // it can map the request or response body to a repeated field. However, some
1921 // gRPC Transcoding implementations may not support this feature.
1922 type HttpRule struct {
1923 // AdditionalBindings: Additional HTTP bindings for the selector. Nested
1924 // bindings must not contain an `additional_bindings` field themselves (that
1925 // is, the nesting may only be one level deep).
1926 AdditionalBindings []*HttpRule `json:"additionalBindings,omitempty"`
1927 // Body: The name of the request field whose value is mapped to the HTTP
1928 // request body, or `*` for mapping all request fields not captured by the path
1929 // pattern to the HTTP body, or omitted for not having any HTTP request body.
1930 // NOTE: the referred field must be present at the top-level of the request
1931 // message type.
1932 Body string `json:"body,omitempty"`
1933 // Custom: The custom pattern is used for specifying an HTTP method that is not
1934 // included in the `pattern` field, such as HEAD, or "*" to leave the HTTP
1935 // method unspecified for this rule. The wild-card rule is useful for services
1936 // that provide content to Web (HTML) clients.
1937 Custom *CustomHttpPattern `json:"custom,omitempty"`
1938 // Delete: Maps to HTTP DELETE. Used for deleting a resource.
1939 Delete string `json:"delete,omitempty"`
1940 // Get: Maps to HTTP GET. Used for listing and getting information about
1941 // resources.
1942 Get string `json:"get,omitempty"`
1943 // Patch: Maps to HTTP PATCH. Used for updating a resource.
1944 Patch string `json:"patch,omitempty"`
1945 // Post: Maps to HTTP POST. Used for creating a resource or performing an
1946 // action.
1947 Post string `json:"post,omitempty"`
1948 // Put: Maps to HTTP PUT. Used for replacing a resource.
1949 Put string `json:"put,omitempty"`
1950 // ResponseBody: Optional. The name of the response field whose value is mapped
1951 // to the HTTP response body. When omitted, the entire response message will be
1952 // used as the HTTP response body. NOTE: The referred field must be present at
1953 // the top-level of the response message type.
1954 ResponseBody string `json:"responseBody,omitempty"`
1955 // Selector: Selects a method to which this rule applies. Refer to selector for
1956 // syntax details.
1957 Selector string `json:"selector,omitempty"`
1958 // ForceSendFields is a list of field names (e.g. "AdditionalBindings") to
1959 // unconditionally include in API requests. By default, fields with empty or
1960 // default values are omitted from API requests. See
1961 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1962 // details.
1963 ForceSendFields []string `json:"-"`
1964 // NullFields is a list of field names (e.g. "AdditionalBindings") to include
1965 // in API requests with the JSON null value. By default, fields with empty
1966 // values are omitted from API requests. See
1967 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1968 NullFields []string `json:"-"`
1969 }
1970
1971 func (s HttpRule) MarshalJSON() ([]byte, error) {
1972 type NoMethod HttpRule
1973 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1974 }
1975
1976 // JavaSettings: Settings for Java client libraries.
1977 type JavaSettings struct {
1978 // Common: Some settings.
1979 Common *CommonLanguageSettings `json:"common,omitempty"`
1980 // LibraryPackage: The package name to use in Java. Clobbers the java_package
1981 // option set in the protobuf. This should be used **only** by APIs who have
1982 // already set the language_settings.java.package_name" field in gapic.yaml.
1983 // API teams should use the protobuf java_package option where possible.
1984 // Example of a YAML configuration:: publishing: library_settings:
1985 // java_settings: library_package: com.google.cloud.pubsub.v1
1986 LibraryPackage string `json:"libraryPackage,omitempty"`
1987 // ServiceClassNames: Configure the Java class name to use instead of the
1988 // service's for its corresponding generated GAPIC client. Keys are
1989 // fully-qualified service names as they appear in the protobuf (including the
1990 // full the language_settings.java.interface_names" field in gapic.yaml. API
1991 // teams should otherwise use the service name as it appears in the protobuf.
1992 // Example of a YAML configuration:: publishing: java_settings:
1993 // service_class_names: - google.pubsub.v1.Publisher: TopicAdmin -
1994 // google.pubsub.v1.Subscriber: SubscriptionAdmin
1995 ServiceClassNames map[string]string `json:"serviceClassNames,omitempty"`
1996 // ForceSendFields is a list of field names (e.g. "Common") to unconditionally
1997 // include in API requests. By default, fields with empty or default values are
1998 // omitted from API requests. See
1999 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2000 // details.
2001 ForceSendFields []string `json:"-"`
2002 // NullFields is a list of field names (e.g. "Common") to include in API
2003 // requests with the JSON null value. By default, fields with empty values are
2004 // omitted from API requests. See
2005 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2006 NullFields []string `json:"-"`
2007 }
2008
2009 func (s JavaSettings) MarshalJSON() ([]byte, error) {
2010 type NoMethod JavaSettings
2011 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2012 }
2013
2014 // JwtLocation: Specifies a location to extract JWT from an API request.
2015 type JwtLocation struct {
2016 // Cookie: Specifies cookie name to extract JWT token.
2017 Cookie string `json:"cookie,omitempty"`
2018 // Header: Specifies HTTP header name to extract JWT token.
2019 Header string `json:"header,omitempty"`
2020 // Query: Specifies URL query parameter name to extract JWT token.
2021 Query string `json:"query,omitempty"`
2022 // ValuePrefix: The value prefix. The value format is "value_prefix{token}"
2023 // Only applies to "in" header type. Must be empty for "in" query type. If not
2024 // empty, the header value has to match (case sensitive) this prefix. If not
2025 // matched, JWT will not be extracted. If matched, JWT will be extracted after
2026 // the prefix is removed. For example, for "Authorization: Bearer {JWT}",
2027 // value_prefix="Bearer " with a space at the end.
2028 ValuePrefix string `json:"valuePrefix,omitempty"`
2029 // ForceSendFields is a list of field names (e.g. "Cookie") to unconditionally
2030 // include in API requests. By default, fields with empty or default values are
2031 // omitted from API requests. See
2032 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2033 // details.
2034 ForceSendFields []string `json:"-"`
2035 // NullFields is a list of field names (e.g. "Cookie") to include in API
2036 // requests with the JSON null value. By default, fields with empty values are
2037 // omitted from API requests. See
2038 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2039 NullFields []string `json:"-"`
2040 }
2041
2042 func (s JwtLocation) MarshalJSON() ([]byte, error) {
2043 type NoMethod JwtLocation
2044 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2045 }
2046
2047 // LabelDescriptor: A description of a label.
2048 type LabelDescriptor struct {
2049 // Description: A human-readable description for the label.
2050 Description string `json:"description,omitempty"`
2051 // Key: The label key.
2052 Key string `json:"key,omitempty"`
2053 // ValueType: The type of data that can be assigned to the label.
2054 //
2055 // Possible values:
2056 // "STRING" - A variable-length string. This is the default.
2057 // "BOOL" - Boolean; true or false.
2058 // "INT64" - A 64-bit signed integer.
2059 ValueType string `json:"valueType,omitempty"`
2060 // ForceSendFields is a list of field names (e.g. "Description") to
2061 // unconditionally include in API requests. By default, fields with empty or
2062 // default values are omitted from API requests. See
2063 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2064 // details.
2065 ForceSendFields []string `json:"-"`
2066 // NullFields is a list of field names (e.g. "Description") to include in API
2067 // requests with the JSON null value. By default, fields with empty values are
2068 // omitted from API requests. See
2069 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2070 NullFields []string `json:"-"`
2071 }
2072
2073 func (s LabelDescriptor) MarshalJSON() ([]byte, error) {
2074 type NoMethod LabelDescriptor
2075 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2076 }
2077
2078 // ListOperationsResponse: The response message for Operations.ListOperations.
2079 type ListOperationsResponse struct {
2080 // NextPageToken: The standard List next-page token.
2081 NextPageToken string `json:"nextPageToken,omitempty"`
2082 // Operations: A list of operations that matches the specified filter in the
2083 // request.
2084 Operations []*Operation `json:"operations,omitempty"`
2085 // Unreachable: Unordered list. Unreachable resources. Populated when the
2086 // request sets `ListOperationsRequest.return_partial_success` and reads across
2087 // collections. For example, when attempting to list all resources across all
2088 // supported locations.
2089 Unreachable []string `json:"unreachable,omitempty"`
2090
2091 // ServerResponse contains the HTTP response code and headers from the server.
2092 googleapi.ServerResponse `json:"-"`
2093 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
2094 // unconditionally include in API requests. By default, fields with empty or
2095 // default values are omitted from API requests. See
2096 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2097 // details.
2098 ForceSendFields []string `json:"-"`
2099 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
2100 // requests with the JSON null value. By default, fields with empty values are
2101 // omitted from API requests. See
2102 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2103 NullFields []string `json:"-"`
2104 }
2105
2106 func (s ListOperationsResponse) MarshalJSON() ([]byte, error) {
2107 type NoMethod ListOperationsResponse
2108 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2109 }
2110
2111 // ListTenancyUnitsResponse: Response for the list request.
2112 type ListTenancyUnitsResponse struct {
2113 // NextPageToken: Pagination token for large results.
2114 NextPageToken string `json:"nextPageToken,omitempty"`
2115 // TenancyUnits: Tenancy units matching the request.
2116 TenancyUnits []*TenancyUnit `json:"tenancyUnits,omitempty"`
2117
2118 // ServerResponse contains the HTTP response code and headers from the server.
2119 googleapi.ServerResponse `json:"-"`
2120 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
2121 // unconditionally include in API requests. By default, fields with empty or
2122 // default values are omitted from API requests. See
2123 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2124 // details.
2125 ForceSendFields []string `json:"-"`
2126 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
2127 // requests with the JSON null value. By default, fields with empty values are
2128 // omitted from API requests. See
2129 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2130 NullFields []string `json:"-"`
2131 }
2132
2133 func (s ListTenancyUnitsResponse) MarshalJSON() ([]byte, error) {
2134 type NoMethod ListTenancyUnitsResponse
2135 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2136 }
2137
2138 // LogDescriptor: A description of a log type. Example in YAML format: - name:
2139 // library.googleapis.com/activity_history description: The history of
2140 // borrowing and returning library items. display_name: Activity labels: - key:
2141 // /customer_id description: Identifier of a library customer
2142 type LogDescriptor struct {
2143 // Description: A human-readable description of this log. This information
2144 // appears in the documentation and can contain details.
2145 Description string `json:"description,omitempty"`
2146 // DisplayName: The human-readable name for this log. This information appears
2147 // on the user interface and should be concise.
2148 DisplayName string `json:"displayName,omitempty"`
2149 // Labels: The set of labels that are available to describe a specific log
2150 // entry. Runtime requests that contain labels not specified here are
2151 // considered invalid.
2152 Labels []*LabelDescriptor `json:"labels,omitempty"`
2153 // Name: The name of the log. It must be less than 512 characters long and can
2154 // include the following characters: upper- and lower-case alphanumeric
2155 // characters [A-Za-z0-9], and punctuation characters including slash,
2156 // underscore, hyphen, period [/_-.].
2157 Name string `json:"name,omitempty"`
2158 // ForceSendFields is a list of field names (e.g. "Description") to
2159 // unconditionally include in API requests. By default, fields with empty or
2160 // default values are omitted from API requests. See
2161 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2162 // details.
2163 ForceSendFields []string `json:"-"`
2164 // NullFields is a list of field names (e.g. "Description") to include in API
2165 // requests with the JSON null value. By default, fields with empty values are
2166 // omitted from API requests. See
2167 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2168 NullFields []string `json:"-"`
2169 }
2170
2171 func (s LogDescriptor) MarshalJSON() ([]byte, error) {
2172 type NoMethod LogDescriptor
2173 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2174 }
2175
2176 // Logging: Logging configuration of the service. The following example shows
2177 // how to configure logs to be sent to the producer and consumer projects. In
2178 // the example, the `activity_history` log is sent to both the producer and
2179 // consumer projects, whereas the `purchase_history` log is only sent to the
2180 // producer project. monitored_resources: - type: library.googleapis.com/branch
2181 // labels: - key: /city description: The city where the library branch is
2182 // located in. - key: /name description: The name of the branch. logs: - name:
2183 // activity_history labels: - key: /customer_id - name: purchase_history
2184 // logging: producer_destinations: - monitored_resource:
2185 // library.googleapis.com/branch logs: - activity_history - purchase_history
2186 // consumer_destinations: - monitored_resource: library.googleapis.com/branch
2187 // logs: - activity_history
2188 type Logging struct {
2189 // ConsumerDestinations: Logging configurations for sending logs to the
2190 // consumer project. There can be multiple consumer destinations, each one must
2191 // have a different monitored resource type. A log can be used in at most one
2192 // consumer destination.
2193 ConsumerDestinations []*LoggingDestination `json:"consumerDestinations,omitempty"`
2194 // ProducerDestinations: Logging configurations for sending logs to the
2195 // producer project. There can be multiple producer destinations, each one must
2196 // have a different monitored resource type. A log can be used in at most one
2197 // producer destination.
2198 ProducerDestinations []*LoggingDestination `json:"producerDestinations,omitempty"`
2199 // ForceSendFields is a list of field names (e.g. "ConsumerDestinations") to
2200 // unconditionally include in API requests. By default, fields with empty or
2201 // default values are omitted from API requests. See
2202 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2203 // details.
2204 ForceSendFields []string `json:"-"`
2205 // NullFields is a list of field names (e.g. "ConsumerDestinations") to include
2206 // in API requests with the JSON null value. By default, fields with empty
2207 // values are omitted from API requests. See
2208 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2209 NullFields []string `json:"-"`
2210 }
2211
2212 func (s Logging) MarshalJSON() ([]byte, error) {
2213 type NoMethod Logging
2214 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2215 }
2216
2217 // LoggingDestination: Configuration of a specific logging destination (the
2218 // producer project or the consumer project).
2219 type LoggingDestination struct {
2220 // Logs: Names of the logs to be sent to this destination. Each name must be
2221 // defined in the Service.logs section. If the log name is not a domain scoped
2222 // name, it will be automatically prefixed with the service name followed by
2223 // "/".
2224 Logs []string `json:"logs,omitempty"`
2225 // MonitoredResource: The monitored resource type. The type must be defined in
2226 // the Service.monitored_resources section.
2227 MonitoredResource string `json:"monitoredResource,omitempty"`
2228 // ForceSendFields is a list of field names (e.g. "Logs") to unconditionally
2229 // include in API requests. By default, fields with empty or default values are
2230 // omitted from API requests. See
2231 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2232 // details.
2233 ForceSendFields []string `json:"-"`
2234 // NullFields is a list of field names (e.g. "Logs") to include in API requests
2235 // with the JSON null value. By default, fields with empty values are omitted
2236 // from API requests. See
2237 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2238 NullFields []string `json:"-"`
2239 }
2240
2241 func (s LoggingDestination) MarshalJSON() ([]byte, error) {
2242 type NoMethod LoggingDestination
2243 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2244 }
2245
2246 // LongRunning: Describes settings to use when generating API methods that use
2247 // the long-running operation pattern. All default values below are from those
2248 // used in the client library generators (e.g. Java
2249 // (https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)).
2250 type LongRunning struct {
2251 // InitialPollDelay: Initial delay after which the first poll request will be
2252 // made. Default value: 5 seconds.
2253 InitialPollDelay string `json:"initialPollDelay,omitempty"`
2254 // MaxPollDelay: Maximum time between two subsequent poll requests. Default
2255 // value: 45 seconds.
2256 MaxPollDelay string `json:"maxPollDelay,omitempty"`
2257 // PollDelayMultiplier: Multiplier to gradually increase delay between
2258 // subsequent polls until it reaches max_poll_delay. Default value: 1.5.
2259 PollDelayMultiplier float64 `json:"pollDelayMultiplier,omitempty"`
2260 // TotalPollTimeout: Total polling timeout. Default value: 5 minutes.
2261 TotalPollTimeout string `json:"totalPollTimeout,omitempty"`
2262 // ForceSendFields is a list of field names (e.g. "InitialPollDelay") to
2263 // unconditionally include in API requests. By default, fields with empty or
2264 // default values are omitted from API requests. See
2265 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2266 // details.
2267 ForceSendFields []string `json:"-"`
2268 // NullFields is a list of field names (e.g. "InitialPollDelay") to include in
2269 // API requests with the JSON null value. By default, fields with empty values
2270 // are omitted from API requests. See
2271 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2272 NullFields []string `json:"-"`
2273 }
2274
2275 func (s LongRunning) MarshalJSON() ([]byte, error) {
2276 type NoMethod LongRunning
2277 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2278 }
2279
2280 func (s *LongRunning) UnmarshalJSON(data []byte) error {
2281 type NoMethod LongRunning
2282 var s1 struct {
2283 PollDelayMultiplier gensupport.JSONFloat64 `json:"pollDelayMultiplier"`
2284 *NoMethod
2285 }
2286 s1.NoMethod = (*NoMethod)(s)
2287 if err := json.Unmarshal(data, &s1); err != nil {
2288 return err
2289 }
2290 s.PollDelayMultiplier = float64(s1.PollDelayMultiplier)
2291 return nil
2292 }
2293
2294 // Method: Method represents a method of an API interface. New usages of this
2295 // message as an alternative to MethodDescriptorProto are strongly discouraged.
2296 // This message does not reliability preserve all information necessary to
2297 // model the schema and preserve semantics. Instead make use of
2298 // FileDescriptorSet which preserves the necessary information.
2299 type Method struct {
2300 // Edition: The source edition string, only valid when syntax is
2301 // SYNTAX_EDITIONS. This field should be ignored, instead the edition should be
2302 // inherited from Api. This is similar to Field and EnumValue.
2303 Edition string `json:"edition,omitempty"`
2304 // Name: The simple name of this method.
2305 Name string `json:"name,omitempty"`
2306 // Options: Any metadata attached to the method.
2307 Options []*Option `json:"options,omitempty"`
2308 // RequestStreaming: If true, the request is streamed.
2309 RequestStreaming bool `json:"requestStreaming,omitempty"`
2310 // RequestTypeUrl: A URL of the input message type.
2311 RequestTypeUrl string `json:"requestTypeUrl,omitempty"`
2312 // ResponseStreaming: If true, the response is streamed.
2313 ResponseStreaming bool `json:"responseStreaming,omitempty"`
2314 // ResponseTypeUrl: The URL of the output message type.
2315 ResponseTypeUrl string `json:"responseTypeUrl,omitempty"`
2316 // Syntax: The source syntax of this method. This field should be ignored,
2317 // instead the syntax should be inherited from Api. This is similar to Field
2318 // and EnumValue.
2319 //
2320 // Possible values:
2321 // "SYNTAX_PROTO2" - Syntax `proto2`.
2322 // "SYNTAX_PROTO3" - Syntax `proto3`.
2323 // "SYNTAX_EDITIONS" - Syntax `editions`.
2324 Syntax string `json:"syntax,omitempty"`
2325 // ForceSendFields is a list of field names (e.g. "Edition") to unconditionally
2326 // include in API requests. By default, fields with empty or default values are
2327 // omitted from API requests. See
2328 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2329 // details.
2330 ForceSendFields []string `json:"-"`
2331 // NullFields is a list of field names (e.g. "Edition") to include in API
2332 // requests with the JSON null value. By default, fields with empty values are
2333 // omitted from API requests. See
2334 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2335 NullFields []string `json:"-"`
2336 }
2337
2338 func (s Method) MarshalJSON() ([]byte, error) {
2339 type NoMethod Method
2340 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2341 }
2342
2343 // MethodPolicy: Defines policies applying to an RPC method.
2344 type MethodPolicy struct {
2345 // RequestPolicies: Policies that are applicable to the request message.
2346 RequestPolicies []*FieldPolicy `json:"requestPolicies,omitempty"`
2347 // Selector: Selects a method to which these policies should be enforced, for
2348 // example, "google.pubsub.v1.Subscriber.CreateSubscription". Refer to selector
2349 // for syntax details. NOTE: This field must not be set in the proto
2350 // annotation. It will be automatically filled by the service config compiler .
2351 Selector string `json:"selector,omitempty"`
2352 // ForceSendFields is a list of field names (e.g. "RequestPolicies") to
2353 // unconditionally include in API requests. By default, fields with empty or
2354 // default values are omitted from API requests. See
2355 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2356 // details.
2357 ForceSendFields []string `json:"-"`
2358 // NullFields is a list of field names (e.g. "RequestPolicies") to include in
2359 // API requests with the JSON null value. By default, fields with empty values
2360 // are omitted from API requests. See
2361 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2362 NullFields []string `json:"-"`
2363 }
2364
2365 func (s MethodPolicy) MarshalJSON() ([]byte, error) {
2366 type NoMethod MethodPolicy
2367 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2368 }
2369
2370 // MethodSettings: Describes the generator configuration for a method.
2371 type MethodSettings struct {
2372 // AutoPopulatedFields: List of top-level fields of the request message, that
2373 // should be automatically populated by the client libraries based on their
2374 // (google.api.field_info).format. Currently supported format: UUID4. Example
2375 // of a YAML configuration: publishing: method_settings: - selector:
2376 // google.example.v1.ExampleService.CreateExample auto_populated_fields: -
2377 // request_id
2378 AutoPopulatedFields []string `json:"autoPopulatedFields,omitempty"`
2379 // Batching: Batching configuration for an API method in client libraries.
2380 // Example of a YAML configuration: publishing: method_settings: - selector:
2381 // google.example.v1.ExampleService.BatchCreateExample batching:
2382 // element_count_threshold: 1000 request_byte_threshold: 100000000
2383 // delay_threshold_millis: 10
2384 Batching *BatchingConfigProto `json:"batching,omitempty"`
2385 // LongRunning: Describes settings to use for long-running operations when
2386 // generating API methods for RPCs. Complements RPCs that use the annotations
2387 // in google/longrunning/operations.proto. Example of a YAML configuration::
2388 // publishing: method_settings: - selector:
2389 // google.cloud.speech.v2.Speech.BatchRecognize long_running:
2390 // initial_poll_delay: 60s # 1 minute poll_delay_multiplier: 1.5
2391 // max_poll_delay: 360s # 6 minutes total_poll_timeout: 54000s # 90 minutes
2392 LongRunning *LongRunning `json:"longRunning,omitempty"`
2393 // Selector: The fully qualified name of the method, for which the options
2394 // below apply. This is used to find the method to apply the options. Example:
2395 // publishing: method_settings: - selector:
2396 // google.storage.control.v2.StorageControl.CreateFolder # method settings for
2397 // CreateFolder...
2398 Selector string `json:"selector,omitempty"`
2399 // ForceSendFields is a list of field names (e.g. "AutoPopulatedFields") to
2400 // unconditionally include in API requests. By default, fields with empty or
2401 // default values are omitted from API requests. See
2402 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2403 // details.
2404 ForceSendFields []string `json:"-"`
2405 // NullFields is a list of field names (e.g. "AutoPopulatedFields") to include
2406 // in API requests with the JSON null value. By default, fields with empty
2407 // values are omitted from API requests. See
2408 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2409 NullFields []string `json:"-"`
2410 }
2411
2412 func (s MethodSettings) MarshalJSON() ([]byte, error) {
2413 type NoMethod MethodSettings
2414 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2415 }
2416
2417 // MetricDescriptor: Defines a metric type and its schema. Once a metric
2418 // descriptor is created, deleting or altering it stops data collection and
2419 // makes the metric type's existing data unusable.
2420 type MetricDescriptor struct {
2421 // Description: A detailed description of the metric, which can be used in
2422 // documentation.
2423 Description string `json:"description,omitempty"`
2424 // DisplayName: A concise name for the metric, which can be displayed in user
2425 // interfaces. Use sentence case without an ending period, for example "Request
2426 // count". This field is optional but it is recommended to be set for any
2427 // metrics associated with user-visible concepts, such as Quota.
2428 DisplayName string `json:"displayName,omitempty"`
2429 // Labels: The set of labels that can be used to describe a specific instance
2430 // of this metric type. For example, the
2431 // `appengine.googleapis.com/http/server/response_latencies` metric type has a
2432 // label for the HTTP response code, `response_code`, so you can look at
2433 // latencies for successful responses or just for responses that failed.
2434 Labels []*LabelDescriptor `json:"labels,omitempty"`
2435 // LaunchStage: Optional. The launch stage of the metric definition.
2436 //
2437 // Possible values:
2438 // "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value.
2439 // "UNIMPLEMENTED" - The feature is not yet implemented. Users can not use
2440 // it.
2441 // "PRELAUNCH" - Prelaunch features are hidden from users and are only
2442 // visible internally.
2443 // "EARLY_ACCESS" - Early Access features are limited to a closed group of
2444 // testers. To use these features, you must sign up in advance and sign a
2445 // Trusted Tester agreement (which includes confidentiality provisions). These
2446 // features may be unstable, changed in backward-incompatible ways, and are not
2447 // guaranteed to be released.
2448 // "ALPHA" - Alpha is a limited availability test for releases before they
2449 // are cleared for widespread use. By Alpha, all significant design issues are
2450 // resolved and we are in the process of verifying functionality. Alpha
2451 // customers need to apply for access, agree to applicable terms, and have
2452 // their projects allowlisted. Alpha releases don't have to be feature
2453 // complete, no SLAs are provided, and there are no technical support
2454 // obligations, but they will be far enough along that customers can actually
2455 // use them in test environments or for limited-use tests -- just like they
2456 // would in normal production cases.
2457 // "BETA" - Beta is the point at which we are ready to open a release for any
2458 // customer to use. There are no SLA or technical support obligations in a Beta
2459 // release. Products will be complete from a feature perspective, but may have
2460 // some open outstanding issues. Beta releases are suitable for limited
2461 // production use cases.
2462 // "GA" - GA features are open to all developers and are considered stable
2463 // and fully qualified for production use.
2464 // "DEPRECATED" - Deprecated features are scheduled to be shut down and
2465 // removed. For more information, see the "Deprecation Policy" section of our
2466 // [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud
2467 // Platform Subject to the Deprecation
2468 // Policy](https://cloud.google.com/terms/deprecation) documentation.
2469 LaunchStage string `json:"launchStage,omitempty"`
2470 // Metadata: Optional. Metadata which can be used to guide usage of the metric.
2471 Metadata *MetricDescriptorMetadata `json:"metadata,omitempty"`
2472 // MetricKind: Whether the metric records instantaneous values, changes to a
2473 // value, etc. Some combinations of `metric_kind` and `value_type` might not be
2474 // supported.
2475 //
2476 // Possible values:
2477 // "METRIC_KIND_UNSPECIFIED" - Do not use this default value.
2478 // "GAUGE" - An instantaneous measurement of a value.
2479 // "DELTA" - The change in a value during a time interval.
2480 // "CUMULATIVE" - A value accumulated over a time interval. Cumulative
2481 // measurements in a time series should have the same start time and increasing
2482 // end times, until an event resets the cumulative value to zero and sets a new
2483 // start time for the following points.
2484 MetricKind string `json:"metricKind,omitempty"`
2485 // MonitoredResourceTypes: Read-only. If present, then a time series, which is
2486 // identified partially by a metric type and a MonitoredResourceDescriptor,
2487 // that is associated with this metric type can only be associated with one of
2488 // the monitored resource types listed here.
2489 MonitoredResourceTypes []string `json:"monitoredResourceTypes,omitempty"`
2490 // Name: The resource name of the metric descriptor.
2491 Name string `json:"name,omitempty"`
2492 // Type: The metric type, including its DNS name prefix. The type is not
2493 // URL-encoded. All user-defined metric types have the DNS name
2494 // `custom.googleapis.com` or `external.googleapis.com`. Metric types should
2495 // use a natural hierarchical grouping. For example:
2496 // "custom.googleapis.com/invoice/paid/amount"
2497 // "external.googleapis.com/prometheus/up"
2498 // "appengine.googleapis.com/http/server/response_latencies"
2499 Type string `json:"type,omitempty"`
2500 // Unit: The units in which the metric value is reported. It is only applicable
2501 // if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit`
2502 // defines the representation of the stored metric values. Different systems
2503 // might scale the values to be more easily displayed (so a value of `0.02kBy`
2504 // _might_ be displayed as `20By`, and a value of `3523kBy` _might_ be
2505 // displayed as `3.5MBy`). However, if the `unit` is `kBy`, then the value of
2506 // the metric is always in thousands of bytes, no matter how it might be
2507 // displayed. If you want a custom metric to record the exact number of
2508 // CPU-seconds used by a job, you can create an `INT64 CUMULATIVE` metric whose
2509 // `unit` is `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses
2510 // 12,005 CPU-seconds, then the value is written as `12005`. Alternatively, if
2511 // you want a custom metric to record data in a more granular way, you can
2512 // create a `DOUBLE CUMULATIVE` metric whose `unit` is `ks{CPU}`, and then
2513 // write the value `12.005` (which is `12005/1000`), or use `Kis{CPU}` and
2514 // write `11.723` (which is `12005/1024`). The supported units are a subset of
2515 // The Unified Code for Units of Measure (https://unitsofmeasure.org/ucum.html)
2516 // standard: **Basic units (UNIT)** * `bit` bit * `By` byte * `s` second *
2517 // `min` minute * `h` hour * `d` day * `1` dimensionless **Prefixes (PREFIX)**
2518 // * `k` kilo (10^3) * `M` mega (10^6) * `G` giga (10^9) * `T` tera (10^12) *
2519 // `P` peta (10^15) * `E` exa (10^18) * `Z` zetta (10^21) * `Y` yotta (10^24) *
2520 // `m` milli (10^-3) * `u` micro (10^-6) * `n` nano (10^-9) * `p` pico (10^-12)
2521 // * `f` femto (10^-15) * `a` atto (10^-18) * `z` zepto (10^-21) * `y` yocto
2522 // (10^-24) * `Ki` kibi (2^10) * `Mi` mebi (2^20) * `Gi` gibi (2^30) * `Ti`
2523 // tebi (2^40) * `Pi` pebi (2^50) **Grammar** The grammar also includes these
2524 // connectors: * `/` division or ratio (as an infix operator). For examples,
2525 // `kBy/{email}` or `MiBy/10ms` (although you should almost never have `/s` in
2526 // a metric `unit`; rates should always be computed at query time from the
2527 // underlying cumulative or delta value). * `.` multiplication or composition
2528 // (as an infix operator). For examples, `GBy.d` or `k{watt}.h`. The grammar
2529 // for a unit is as follows: Expression = Component { "." Component } { "/"
2530 // Component } ; Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ] |
2531 // Annotation | "1" ; Annotation = "{" NAME "}" ; Notes: * `Annotation` is just
2532 // a comment if it follows a `UNIT`. If the annotation is used alone, then the
2533 // unit is equivalent to `1`. For examples, `{request}/s == 1/s`,
2534 // `By{transmitted}/s == By/s`. * `NAME` is a sequence of non-blank printable
2535 // ASCII characters not containing `{` or `}`. * `1` represents a unitary
2536 // dimensionless unit (https://en.wikipedia.org/wiki/Dimensionless_quantity) of
2537 // 1, such as in `1/s`. It is typically used when none of the basic units are
2538 // appropriate. For example, "new users per day" can be represented as `1/d` or
2539 // `{new-users}/d` (and a metric value `5` would mean "5 new users).
2540 // Alternatively, "thousands of page views per day" would be represented as
2541 // `1000/d` or `k1/d` or `k{page_views}/d` (and a metric value of `5.3` would
2542 // mean "5300 page views per day"). * `%` represents dimensionless value of
2543 // 1/100, and annotates values giving a percentage (so the metric values are
2544 // typically in the range of 0..100, and a metric value `3` means "3 percent").
2545 // * `10^2.%` indicates a metric contains a ratio, typically in the range 0..1,
2546 // that will be multiplied by 100 and displayed as a percentage (so a metric
2547 // value `0.03` means "3 percent").
2548 Unit string `json:"unit,omitempty"`
2549 // ValueType: Whether the measurement is an integer, a floating-point number,
2550 // etc. Some combinations of `metric_kind` and `value_type` might not be
2551 // supported.
2552 //
2553 // Possible values:
2554 // "VALUE_TYPE_UNSPECIFIED" - Do not use this default value.
2555 // "BOOL" - The value is a boolean. This value type can be used only if the
2556 // metric kind is `GAUGE`.
2557 // "INT64" - The value is a signed 64-bit integer.
2558 // "DOUBLE" - The value is a double precision floating point number.
2559 // "STRING" - The value is a text string. This value type can be used only if
2560 // the metric kind is `GAUGE`.
2561 // "DISTRIBUTION" - The value is a `Distribution`.
2562 // "MONEY" - The value is money.
2563 ValueType string `json:"valueType,omitempty"`
2564 // ForceSendFields is a list of field names (e.g. "Description") to
2565 // unconditionally include in API requests. By default, fields with empty or
2566 // default values are omitted from API requests. See
2567 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2568 // details.
2569 ForceSendFields []string `json:"-"`
2570 // NullFields is a list of field names (e.g. "Description") to include in API
2571 // requests with the JSON null value. By default, fields with empty values are
2572 // omitted from API requests. See
2573 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2574 NullFields []string `json:"-"`
2575 }
2576
2577 func (s MetricDescriptor) MarshalJSON() ([]byte, error) {
2578 type NoMethod MetricDescriptor
2579 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2580 }
2581
2582 // MetricDescriptorMetadata: Additional annotations that can be used to guide
2583 // the usage of a metric.
2584 type MetricDescriptorMetadata struct {
2585 // IngestDelay: The delay of data points caused by ingestion. Data points older
2586 // than this age are guaranteed to be ingested and available to be read,
2587 // excluding data loss due to errors.
2588 IngestDelay string `json:"ingestDelay,omitempty"`
2589 // LaunchStage: Deprecated. Must use the MetricDescriptor.launch_stage instead.
2590 //
2591 // Possible values:
2592 // "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value.
2593 // "UNIMPLEMENTED" - The feature is not yet implemented. Users can not use
2594 // it.
2595 // "PRELAUNCH" - Prelaunch features are hidden from users and are only
2596 // visible internally.
2597 // "EARLY_ACCESS" - Early Access features are limited to a closed group of
2598 // testers. To use these features, you must sign up in advance and sign a
2599 // Trusted Tester agreement (which includes confidentiality provisions). These
2600 // features may be unstable, changed in backward-incompatible ways, and are not
2601 // guaranteed to be released.
2602 // "ALPHA" - Alpha is a limited availability test for releases before they
2603 // are cleared for widespread use. By Alpha, all significant design issues are
2604 // resolved and we are in the process of verifying functionality. Alpha
2605 // customers need to apply for access, agree to applicable terms, and have
2606 // their projects allowlisted. Alpha releases don't have to be feature
2607 // complete, no SLAs are provided, and there are no technical support
2608 // obligations, but they will be far enough along that customers can actually
2609 // use them in test environments or for limited-use tests -- just like they
2610 // would in normal production cases.
2611 // "BETA" - Beta is the point at which we are ready to open a release for any
2612 // customer to use. There are no SLA or technical support obligations in a Beta
2613 // release. Products will be complete from a feature perspective, but may have
2614 // some open outstanding issues. Beta releases are suitable for limited
2615 // production use cases.
2616 // "GA" - GA features are open to all developers and are considered stable
2617 // and fully qualified for production use.
2618 // "DEPRECATED" - Deprecated features are scheduled to be shut down and
2619 // removed. For more information, see the "Deprecation Policy" section of our
2620 // [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud
2621 // Platform Subject to the Deprecation
2622 // Policy](https://cloud.google.com/terms/deprecation) documentation.
2623 LaunchStage string `json:"launchStage,omitempty"`
2624 // SamplePeriod: The sampling period of metric data points. For metrics which
2625 // are written periodically, consecutive data points are stored at this time
2626 // interval, excluding data loss due to errors. Metrics with a higher
2627 // granularity have a smaller sampling period.
2628 SamplePeriod string `json:"samplePeriod,omitempty"`
2629 // TimeSeriesResourceHierarchyLevel: The scope of the timeseries data of the
2630 // metric.
2631 //
2632 // Possible values:
2633 // "TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED" - Do not use this
2634 // default value.
2635 // "PROJECT" - Scopes a metric to a project.
2636 // "ORGANIZATION" - Scopes a metric to an organization.
2637 // "FOLDER" - Scopes a metric to a folder.
2638 TimeSeriesResourceHierarchyLevel []string `json:"timeSeriesResourceHierarchyLevel,omitempty"`
2639 // ForceSendFields is a list of field names (e.g. "IngestDelay") to
2640 // unconditionally include in API requests. By default, fields with empty or
2641 // default values are omitted from API requests. See
2642 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2643 // details.
2644 ForceSendFields []string `json:"-"`
2645 // NullFields is a list of field names (e.g. "IngestDelay") to include in API
2646 // requests with the JSON null value. By default, fields with empty values are
2647 // omitted from API requests. See
2648 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2649 NullFields []string `json:"-"`
2650 }
2651
2652 func (s MetricDescriptorMetadata) MarshalJSON() ([]byte, error) {
2653 type NoMethod MetricDescriptorMetadata
2654 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2655 }
2656
2657 // MetricRule: Bind API methods to metrics. Binding a method to a metric causes
2658 // that metric's configured quota behaviors to apply to the method call.
2659 type MetricRule struct {
2660 // MetricCosts: Metrics to update when the selected methods are called, and the
2661 // associated cost applied to each metric. The key of the map is the metric
2662 // name, and the values are the amount increased for the metric against which
2663 // the quota limits are defined. The value must not be negative.
2664 MetricCosts map[string]string `json:"metricCosts,omitempty"`
2665 // Selector: Selects the methods to which this rule applies. Refer to selector
2666 // for syntax details.
2667 Selector string `json:"selector,omitempty"`
2668 // ForceSendFields is a list of field names (e.g. "MetricCosts") to
2669 // unconditionally include in API requests. By default, fields with empty or
2670 // default values are omitted from API requests. See
2671 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2672 // details.
2673 ForceSendFields []string `json:"-"`
2674 // NullFields is a list of field names (e.g. "MetricCosts") to include in API
2675 // requests with the JSON null value. By default, fields with empty values are
2676 // omitted from API requests. See
2677 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2678 NullFields []string `json:"-"`
2679 }
2680
2681 func (s MetricRule) MarshalJSON() ([]byte, error) {
2682 type NoMethod MetricRule
2683 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2684 }
2685
2686 // Mixin: Declares an API Interface to be included in this interface. The
2687 // including interface must redeclare all the methods from the included
2688 // interface, but documentation and options are inherited as follows: - If
2689 // after comment and whitespace stripping, the documentation string of the
2690 // redeclared method is empty, it will be inherited from the original method. -
2691 // Each annotation belonging to the service config (http, visibility) which is
2692 // not set in the redeclared method will be inherited. - If an http annotation
2693 // is inherited, the path pattern will be modified as follows. Any version
2694 // prefix will be replaced by the version of the including interface plus the
2695 // root path if specified. Example of a simple mixin: package google.acl.v1;
2696 // service AccessControl { // Get the underlying ACL object. rpc
2697 // GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get =
2698 // "/v1/{resource=**}:getAcl"; } } package google.storage.v2; service Storage {
2699 // // rpc GetAcl(GetAclRequest) returns (Acl); // Get a data record. rpc
2700 // GetData(GetDataRequest) returns (Data) { option (google.api.http).get =
2701 // "/v2/{resource=**}"; } } Example of a mixin configuration: apis: - name:
2702 // google.storage.v2.Storage mixins: - name: google.acl.v1.AccessControl The
2703 // mixin construct implies that all methods in `AccessControl` are also
2704 // declared with same name and request/response types in `Storage`. A
2705 // documentation generator or annotation processor will see the effective
2706 // `Storage.GetAcl` method after inheriting documentation and annotations as
2707 // follows: service Storage { // Get the underlying ACL object. rpc
2708 // GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get =
2709 // "/v2/{resource=**}:getAcl"; } ... } Note how the version in the path pattern
2710 // changed from `v1` to `v2`. If the `root` field in the mixin is specified, it
2711 // should be a relative path under which inherited HTTP paths are placed.
2712 // Example: apis: - name: google.storage.v2.Storage mixins: - name:
2713 // google.acl.v1.AccessControl root: acls This implies the following inherited
2714 // HTTP annotation: service Storage { // Get the underlying ACL object. rpc
2715 // GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get =
2716 // "/v2/acls/{resource=**}:getAcl"; } ... }
2717 type Mixin struct {
2718 // Name: The fully qualified name of the interface which is included.
2719 Name string `json:"name,omitempty"`
2720 // Root: If non-empty specifies a path under which inherited HTTP paths are
2721 // rooted.
2722 Root string `json:"root,omitempty"`
2723 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally
2724 // include in API requests. By default, fields with empty or default values are
2725 // omitted from API requests. See
2726 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2727 // details.
2728 ForceSendFields []string `json:"-"`
2729 // NullFields is a list of field names (e.g. "Name") to include in API requests
2730 // with the JSON null value. By default, fields with empty values are omitted
2731 // from API requests. See
2732 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2733 NullFields []string `json:"-"`
2734 }
2735
2736 func (s Mixin) MarshalJSON() ([]byte, error) {
2737 type NoMethod Mixin
2738 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2739 }
2740
2741 // MonitoredResourceDescriptor: An object that describes the schema of a
2742 // MonitoredResource object using a type name and a set of labels. For example,
2743 // the monitored resource descriptor for Google Compute Engine VM instances has
2744 // a type of "gce_instance" and specifies the use of the labels
2745 // "instance_id" and "zone" to identify particular VM instances. Different
2746 // APIs can support different monitored resource types. APIs generally provide
2747 // a `list` method that returns the monitored resource descriptors used by the
2748 // API.
2749 type MonitoredResourceDescriptor struct {
2750 // Description: Optional. A detailed description of the monitored resource type
2751 // that might be used in documentation.
2752 Description string `json:"description,omitempty"`
2753 // DisplayName: Optional. A concise name for the monitored resource type that
2754 // might be displayed in user interfaces. It should be a Title Cased Noun
2755 // Phrase, without any article or other determiners. For example, "Google
2756 // Cloud SQL Database".
2757 DisplayName string `json:"displayName,omitempty"`
2758 // Labels: Required. A set of labels used to describe instances of this
2759 // monitored resource type. For example, an individual Google Cloud SQL
2760 // database is identified by values for the labels "database_id" and
2761 // "zone".
2762 Labels []*LabelDescriptor `json:"labels,omitempty"`
2763 // LaunchStage: Optional. The launch stage of the monitored resource
2764 // definition.
2765 //
2766 // Possible values:
2767 // "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value.
2768 // "UNIMPLEMENTED" - The feature is not yet implemented. Users can not use
2769 // it.
2770 // "PRELAUNCH" - Prelaunch features are hidden from users and are only
2771 // visible internally.
2772 // "EARLY_ACCESS" - Early Access features are limited to a closed group of
2773 // testers. To use these features, you must sign up in advance and sign a
2774 // Trusted Tester agreement (which includes confidentiality provisions). These
2775 // features may be unstable, changed in backward-incompatible ways, and are not
2776 // guaranteed to be released.
2777 // "ALPHA" - Alpha is a limited availability test for releases before they
2778 // are cleared for widespread use. By Alpha, all significant design issues are
2779 // resolved and we are in the process of verifying functionality. Alpha
2780 // customers need to apply for access, agree to applicable terms, and have
2781 // their projects allowlisted. Alpha releases don't have to be feature
2782 // complete, no SLAs are provided, and there are no technical support
2783 // obligations, but they will be far enough along that customers can actually
2784 // use them in test environments or for limited-use tests -- just like they
2785 // would in normal production cases.
2786 // "BETA" - Beta is the point at which we are ready to open a release for any
2787 // customer to use. There are no SLA or technical support obligations in a Beta
2788 // release. Products will be complete from a feature perspective, but may have
2789 // some open outstanding issues. Beta releases are suitable for limited
2790 // production use cases.
2791 // "GA" - GA features are open to all developers and are considered stable
2792 // and fully qualified for production use.
2793 // "DEPRECATED" - Deprecated features are scheduled to be shut down and
2794 // removed. For more information, see the "Deprecation Policy" section of our
2795 // [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud
2796 // Platform Subject to the Deprecation
2797 // Policy](https://cloud.google.com/terms/deprecation) documentation.
2798 LaunchStage string `json:"launchStage,omitempty"`
2799 // Name: Optional. The resource name of the monitored resource descriptor:
2800 // "projects/{project_id}/monitoredResourceDescriptors/{type}" where {type}
2801 // is the value of the `type` field in this object and {project_id} is a
2802 // project ID that provides API-specific context for accessing the type. APIs
2803 // that do not use project information can use the resource name format
2804 // "monitoredResourceDescriptors/{type}".
2805 Name string `json:"name,omitempty"`
2806 // Type: Required. The monitored resource type. For example, the type
2807 // "cloudsql_database" represents databases in Google Cloud SQL. For a list
2808 // of types, see Monitored resource types
2809 // (https://cloud.google.com/monitoring/api/resources) and Logging resource
2810 // types (https://cloud.google.com/logging/docs/api/v2/resource-list).
2811 Type string `json:"type,omitempty"`
2812 // ForceSendFields is a list of field names (e.g. "Description") to
2813 // unconditionally include in API requests. By default, fields with empty or
2814 // default values are omitted from API requests. See
2815 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2816 // details.
2817 ForceSendFields []string `json:"-"`
2818 // NullFields is a list of field names (e.g. "Description") to include in API
2819 // requests with the JSON null value. By default, fields with empty values are
2820 // omitted from API requests. See
2821 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2822 NullFields []string `json:"-"`
2823 }
2824
2825 func (s MonitoredResourceDescriptor) MarshalJSON() ([]byte, error) {
2826 type NoMethod MonitoredResourceDescriptor
2827 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2828 }
2829
2830 // Monitoring: Monitoring configuration of the service. The example below shows
2831 // how to configure monitored resources and metrics for monitoring. In the
2832 // example, a monitored resource and two metrics are defined. The
2833 // `library.googleapis.com/book/returned_count` metric is sent to both producer
2834 // and consumer projects, whereas the `library.googleapis.com/book/num_overdue`
2835 // metric is only sent to the consumer project. monitored_resources: - type:
2836 // library.googleapis.com/Branch display_name: "Library Branch" description: "A
2837 // branch of a library." launch_stage: GA labels: - key: resource_container
2838 // description: "The Cloud container (ie. project id) for the Branch." - key:
2839 // location description: "The location of the library branch." - key: branch_id
2840 // description: "The id of the branch." metrics: - name:
2841 // library.googleapis.com/book/returned_count display_name: "Books Returned"
2842 // description: "The count of books that have been returned." launch_stage: GA
2843 // metric_kind: DELTA value_type: INT64 unit: "1" labels: - key: customer_id
2844 // description: "The id of the customer." - name:
2845 // library.googleapis.com/book/num_overdue display_name: "Books Overdue"
2846 // description: "The current number of overdue books." launch_stage: GA
2847 // metric_kind: GAUGE value_type: INT64 unit: "1" labels: - key: customer_id
2848 // description: "The id of the customer." monitoring: producer_destinations: -
2849 // monitored_resource: library.googleapis.com/Branch metrics: -
2850 // library.googleapis.com/book/returned_count consumer_destinations: -
2851 // monitored_resource: library.googleapis.com/Branch metrics: -
2852 // library.googleapis.com/book/returned_count -
2853 // library.googleapis.com/book/num_overdue
2854 type Monitoring struct {
2855 // ConsumerDestinations: Monitoring configurations for sending metrics to the
2856 // consumer project. There can be multiple consumer destinations. A monitored
2857 // resource type may appear in multiple monitoring destinations if different
2858 // aggregations are needed for different sets of metrics associated with that
2859 // monitored resource type. A monitored resource and metric pair may only be
2860 // used once in the Monitoring configuration.
2861 ConsumerDestinations []*MonitoringDestination `json:"consumerDestinations,omitempty"`
2862 // ProducerDestinations: Monitoring configurations for sending metrics to the
2863 // producer project. There can be multiple producer destinations. A monitored
2864 // resource type may appear in multiple monitoring destinations if different
2865 // aggregations are needed for different sets of metrics associated with that
2866 // monitored resource type. A monitored resource and metric pair may only be
2867 // used once in the Monitoring configuration.
2868 ProducerDestinations []*MonitoringDestination `json:"producerDestinations,omitempty"`
2869 // ForceSendFields is a list of field names (e.g. "ConsumerDestinations") to
2870 // unconditionally include in API requests. By default, fields with empty or
2871 // default values are omitted from API requests. See
2872 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2873 // details.
2874 ForceSendFields []string `json:"-"`
2875 // NullFields is a list of field names (e.g. "ConsumerDestinations") to include
2876 // in API requests with the JSON null value. By default, fields with empty
2877 // values are omitted from API requests. See
2878 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2879 NullFields []string `json:"-"`
2880 }
2881
2882 func (s Monitoring) MarshalJSON() ([]byte, error) {
2883 type NoMethod Monitoring
2884 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2885 }
2886
2887 // MonitoringDestination: Configuration of a specific monitoring destination
2888 // (the producer project or the consumer project).
2889 type MonitoringDestination struct {
2890 // Metrics: Types of the metrics to report to this monitoring destination. Each
2891 // type must be defined in Service.metrics section.
2892 Metrics []string `json:"metrics,omitempty"`
2893 // MonitoredResource: The monitored resource type. The type must be defined in
2894 // Service.monitored_resources section.
2895 MonitoredResource string `json:"monitoredResource,omitempty"`
2896 // ForceSendFields is a list of field names (e.g. "Metrics") to unconditionally
2897 // include in API requests. By default, fields with empty or default values are
2898 // omitted from API requests. See
2899 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2900 // details.
2901 ForceSendFields []string `json:"-"`
2902 // NullFields is a list of field names (e.g. "Metrics") to include in API
2903 // requests with the JSON null value. By default, fields with empty values are
2904 // omitted from API requests. See
2905 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2906 NullFields []string `json:"-"`
2907 }
2908
2909 func (s MonitoringDestination) MarshalJSON() ([]byte, error) {
2910 type NoMethod MonitoringDestination
2911 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2912 }
2913
2914 // NodeSettings: Settings for Node client libraries.
2915 type NodeSettings struct {
2916 // Common: Some settings.
2917 Common *CommonLanguageSettings `json:"common,omitempty"`
2918 // ForceSendFields is a list of field names (e.g. "Common") to unconditionally
2919 // include in API requests. By default, fields with empty or default values are
2920 // omitted from API requests. See
2921 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2922 // details.
2923 ForceSendFields []string `json:"-"`
2924 // NullFields is a list of field names (e.g. "Common") to include in API
2925 // requests with the JSON null value. By default, fields with empty values are
2926 // omitted from API requests. See
2927 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2928 NullFields []string `json:"-"`
2929 }
2930
2931 func (s NodeSettings) MarshalJSON() ([]byte, error) {
2932 type NoMethod NodeSettings
2933 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2934 }
2935
2936 // OAuthRequirements: OAuth scopes are a way to define data and permissions on
2937 // data. For example, there are scopes defined for "Read-only access to Google
2938 // Calendar" and "Access to Cloud Platform". Users can consent to a scope for
2939 // an application, giving it permission to access that data on their behalf.
2940 // OAuth scope specifications should be fairly coarse grained; a user will need
2941 // to see and understand the text description of what your scope means. In most
2942 // cases: use one or at most two OAuth scopes for an entire family of products.
2943 // If your product has multiple APIs, you should probably be sharing the OAuth
2944 // scope across all of those APIs. When you need finer grained OAuth consent
2945 // screens: talk with your product management about how developers will use
2946 // them in practice. Please note that even though each of the canonical scopes
2947 // is enough for a request to be accepted and passed to the backend, a request
2948 // can still fail due to the backend requiring additional scopes or
2949 // permissions.
2950 type OAuthRequirements struct {
2951 // CanonicalScopes: The list of publicly documented OAuth scopes that are
2952 // allowed access. An OAuth token containing any of these scopes will be
2953 // accepted. Example: canonical_scopes:
2954 // https://www.googleapis.com/auth/calendar,
2955 // https://www.googleapis.com/auth/calendar.read
2956 CanonicalScopes string `json:"canonicalScopes,omitempty"`
2957 // ForceSendFields is a list of field names (e.g. "CanonicalScopes") to
2958 // unconditionally include in API requests. By default, fields with empty or
2959 // default values are omitted from API requests. See
2960 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2961 // details.
2962 ForceSendFields []string `json:"-"`
2963 // NullFields is a list of field names (e.g. "CanonicalScopes") to include in
2964 // API requests with the JSON null value. By default, fields with empty values
2965 // are omitted from API requests. See
2966 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2967 NullFields []string `json:"-"`
2968 }
2969
2970 func (s OAuthRequirements) MarshalJSON() ([]byte, error) {
2971 type NoMethod OAuthRequirements
2972 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2973 }
2974
2975 // Operation: This resource represents a long-running operation that is the
2976 // result of a network API call.
2977 type Operation struct {
2978 // Done: If the value is `false`, it means the operation is still in progress.
2979 // If `true`, the operation is completed, and either `error` or `response` is
2980 // available.
2981 Done bool `json:"done,omitempty"`
2982 // Error: The error result of the operation in case of failure or cancellation.
2983 Error *Status `json:"error,omitempty"`
2984 // Metadata: Service-specific metadata associated with the operation. It
2985 // typically contains progress information and common metadata such as create
2986 // time. Some services might not provide such metadata. Any method that returns
2987 // a long-running operation should document the metadata type, if any.
2988 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
2989 // Name: The server-assigned name, which is only unique within the same service
2990 // that originally returns it. If you use the default HTTP mapping, the `name`
2991 // should be a resource name ending with `operations/{unique_id}`.
2992 Name string `json:"name,omitempty"`
2993 // Response: The normal, successful response of the operation. If the original
2994 // method returns no data on success, such as `Delete`, the response is
2995 // `google.protobuf.Empty`. If the original method is standard
2996 // `Get`/`Create`/`Update`, the response should be the resource. For other
2997 // methods, the response should have the type `XxxResponse`, where `Xxx` is the
2998 // original method name. For example, if the original method name is
2999 // `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
3000 Response googleapi.RawMessage `json:"response,omitempty"`
3001
3002 // ServerResponse contains the HTTP response code and headers from the server.
3003 googleapi.ServerResponse `json:"-"`
3004 // ForceSendFields is a list of field names (e.g. "Done") to unconditionally
3005 // include in API requests. By default, fields with empty or default values are
3006 // omitted from API requests. See
3007 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3008 // details.
3009 ForceSendFields []string `json:"-"`
3010 // NullFields is a list of field names (e.g. "Done") to include in API requests
3011 // with the JSON null value. By default, fields with empty values are omitted
3012 // from API requests. See
3013 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3014 NullFields []string `json:"-"`
3015 }
3016
3017 func (s Operation) MarshalJSON() ([]byte, error) {
3018 type NoMethod Operation
3019 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3020 }
3021
3022 // Option: A protocol buffer option, which can be attached to a message, field,
3023 // enumeration, etc. New usages of this message as an alternative to
3024 // FileOptions, MessageOptions, FieldOptions, EnumOptions, EnumValueOptions,
3025 // ServiceOptions, or MethodOptions are strongly discouraged.
3026 type Option struct {
3027 // Name: The option's name. For protobuf built-in options (options defined in
3028 // descriptor.proto), this is the short name. For example, "map_entry". For
3029 // custom options, it should be the fully-qualified name. For example,
3030 // "google.api.http".
3031 Name string `json:"name,omitempty"`
3032 // Value: The option's value packed in an Any message. If the value is a
3033 // primitive, the corresponding wrapper type defined in
3034 // google/protobuf/wrappers.proto should be used. If the value is an enum, it
3035 // should be stored as an int32 value using the google.protobuf.Int32Value
3036 // type.
3037 Value googleapi.RawMessage `json:"value,omitempty"`
3038 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally
3039 // include in API requests. By default, fields with empty or default values are
3040 // omitted from API requests. See
3041 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3042 // details.
3043 ForceSendFields []string `json:"-"`
3044 // NullFields is a list of field names (e.g. "Name") to include in API requests
3045 // with the JSON null value. By default, fields with empty values are omitted
3046 // from API requests. See
3047 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3048 NullFields []string `json:"-"`
3049 }
3050
3051 func (s Option) MarshalJSON() ([]byte, error) {
3052 type NoMethod Option
3053 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3054 }
3055
3056 // Page: Represents a documentation page. A page can contain subpages to
3057 // represent nested documentation set structure.
3058 type Page struct {
3059 // Content: The Markdown content of the page. You can use ```(== include {path}
3060 // ==)``` to include content from a Markdown file. The content can be used to
3061 // produce the documentation page such as HTML format page.
3062 Content string `json:"content,omitempty"`
3063 // Name: The name of the page. It will be used as an identity of the page to
3064 // generate URI of the page, text of the link to this page in navigation, etc.
3065 // The full page name (start from the root page name to this page concatenated
3066 // with `.`) can be used as reference to the page in your documentation. For
3067 // example: pages: - name: Tutorial content: (== include tutorial.md ==)
3068 // subpages: - name: Java content: (== include tutorial_java.md ==) You can
3069 // reference `Java` page using Markdown reference link syntax: `Java`.
3070 Name string `json:"name,omitempty"`
3071 // Subpages: Subpages of this page. The order of subpages specified here will
3072 // be honored in the generated docset.
3073 Subpages []*Page `json:"subpages,omitempty"`
3074 // ForceSendFields is a list of field names (e.g. "Content") to unconditionally
3075 // include in API requests. By default, fields with empty or default values are
3076 // omitted from API requests. See
3077 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3078 // details.
3079 ForceSendFields []string `json:"-"`
3080 // NullFields is a list of field names (e.g. "Content") to include in API
3081 // requests with the JSON null value. By default, fields with empty values are
3082 // omitted from API requests. See
3083 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3084 NullFields []string `json:"-"`
3085 }
3086
3087 func (s Page) MarshalJSON() ([]byte, error) {
3088 type NoMethod Page
3089 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3090 }
3091
3092 // PhpSettings: Settings for Php client libraries.
3093 type PhpSettings struct {
3094 // Common: Some settings.
3095 Common *CommonLanguageSettings `json:"common,omitempty"`
3096 // LibraryPackage: The package name to use in Php. Clobbers the php_namespace
3097 // option set in the protobuf. This should be used **only** by APIs who have
3098 // already set the language_settings.php.package_name" field in gapic.yaml. API
3099 // teams should use the protobuf php_namespace option where possible. Example
3100 // of a YAML configuration:: publishing: library_settings: php_settings:
3101 // library_package: Google\Cloud\PubSub\V1
3102 LibraryPackage string `json:"libraryPackage,omitempty"`
3103 // ForceSendFields is a list of field names (e.g. "Common") to unconditionally
3104 // include in API requests. By default, fields with empty or default values are
3105 // omitted from API requests. See
3106 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3107 // details.
3108 ForceSendFields []string `json:"-"`
3109 // NullFields is a list of field names (e.g. "Common") to include in API
3110 // requests with the JSON null value. By default, fields with empty values are
3111 // omitted from API requests. See
3112 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3113 NullFields []string `json:"-"`
3114 }
3115
3116 func (s PhpSettings) MarshalJSON() ([]byte, error) {
3117 type NoMethod PhpSettings
3118 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3119 }
3120
3121 // PolicyBinding: Translates to IAM Policy bindings (without auditing at this
3122 // level)
3123 type PolicyBinding struct {
3124 // Members: Uses the same format as in IAM policy. `member` must include both a
3125 // prefix and ID. For example, `user:{emailId}`, `serviceAccount:{emailId}`,
3126 // `group:{emailId}`.
3127 Members []string `json:"members,omitempty"`
3128 // Role: Role. (https://cloud.google.com/iam/docs/understanding-roles) For
3129 // example, `roles/viewer`, `roles/editor`, or `roles/owner`.
3130 Role string `json:"role,omitempty"`
3131 // ForceSendFields is a list of field names (e.g. "Members") to unconditionally
3132 // include in API requests. By default, fields with empty or default values are
3133 // omitted from API requests. See
3134 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3135 // details.
3136 ForceSendFields []string `json:"-"`
3137 // NullFields is a list of field names (e.g. "Members") to include in API
3138 // requests with the JSON null value. By default, fields with empty values are
3139 // omitted from API requests. See
3140 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3141 NullFields []string `json:"-"`
3142 }
3143
3144 func (s PolicyBinding) MarshalJSON() ([]byte, error) {
3145 type NoMethod PolicyBinding
3146 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3147 }
3148
3149 // Publishing: This message configures the settings for publishing Google Cloud
3150 // Client libraries (https://cloud.google.com/apis/docs/cloud-client-libraries)
3151 // generated from the service config.
3152 type Publishing struct {
3153 // ApiShortName: Used as a tracking tag when collecting data about the APIs
3154 // developer relations artifacts like docs, packages delivered to package
3155 // managers, etc. Example: "speech".
3156 ApiShortName string `json:"apiShortName,omitempty"`
3157 // CodeownerGithubTeams: GitHub teams to be added to CODEOWNERS in the
3158 // directory in GitHub containing source code for the client libraries for this
3159 // API.
3160 CodeownerGithubTeams []string `json:"codeownerGithubTeams,omitempty"`
3161 // DocTagPrefix: A prefix used in sample code when demarking regions to be
3162 // included in documentation.
3163 DocTagPrefix string `json:"docTagPrefix,omitempty"`
3164 // DocumentationUri: Link to product home page. Example:
3165 // https://cloud.google.com/asset-inventory/docs/overview
3166 DocumentationUri string `json:"documentationUri,omitempty"`
3167 // GithubLabel: GitHub label to apply to issues and pull requests opened for
3168 // this API.
3169 GithubLabel string `json:"githubLabel,omitempty"`
3170 // LibrarySettings: Client library settings. If the same version string appears
3171 // multiple times in this list, then the last one wins. Settings from earlier
3172 // settings with the same version string are discarded.
3173 LibrarySettings []*ClientLibrarySettings `json:"librarySettings,omitempty"`
3174 // MethodSettings: A list of API method settings, e.g. the behavior for methods
3175 // that use the long-running operation pattern.
3176 MethodSettings []*MethodSettings `json:"methodSettings,omitempty"`
3177 // NewIssueUri: Link to a *public* URI where users can report issues. Example:
3178 // https://issuetracker.google.com/issues/new?component=190865&template=1161103
3179 NewIssueUri string `json:"newIssueUri,omitempty"`
3180 // Organization: For whom the client library is being published.
3181 //
3182 // Possible values:
3183 // "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" - Not useful.
3184 // "CLOUD" - Google Cloud Platform Org.
3185 // "ADS" - Ads (Advertising) Org.
3186 // "PHOTOS" - Photos Org.
3187 // "STREET_VIEW" - Street View Org.
3188 // "SHOPPING" - Shopping Org.
3189 // "GEO" - Geo Org.
3190 // "GENERATIVE_AI" - Generative AI - https://developers.generativeai.google
3191 Organization string `json:"organization,omitempty"`
3192 // ProtoReferenceDocumentationUri: Optional link to proto reference
3193 // documentation. Example:
3194 // https://cloud.google.com/pubsub/lite/docs/reference/rpc
3195 ProtoReferenceDocumentationUri string `json:"protoReferenceDocumentationUri,omitempty"`
3196 // RestReferenceDocumentationUri: Optional link to REST reference
3197 // documentation. Example:
3198 // https://cloud.google.com/pubsub/lite/docs/reference/rest
3199 RestReferenceDocumentationUri string `json:"restReferenceDocumentationUri,omitempty"`
3200 // ForceSendFields is a list of field names (e.g. "ApiShortName") to
3201 // unconditionally include in API requests. By default, fields with empty or
3202 // default values are omitted from API requests. See
3203 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3204 // details.
3205 ForceSendFields []string `json:"-"`
3206 // NullFields is a list of field names (e.g. "ApiShortName") to include in API
3207 // requests with the JSON null value. By default, fields with empty values are
3208 // omitted from API requests. See
3209 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3210 NullFields []string `json:"-"`
3211 }
3212
3213 func (s Publishing) MarshalJSON() ([]byte, error) {
3214 type NoMethod Publishing
3215 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3216 }
3217
3218 // PythonSettings: Settings for Python client libraries.
3219 type PythonSettings struct {
3220 // Common: Some settings.
3221 Common *CommonLanguageSettings `json:"common,omitempty"`
3222 // ExperimentalFeatures: Experimental features to be included during client
3223 // library generation.
3224 ExperimentalFeatures *ExperimentalFeatures `json:"experimentalFeatures,omitempty"`
3225 // ForceSendFields is a list of field names (e.g. "Common") to unconditionally
3226 // include in API requests. By default, fields with empty or default values are
3227 // omitted from API requests. See
3228 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3229 // details.
3230 ForceSendFields []string `json:"-"`
3231 // NullFields is a list of field names (e.g. "Common") to include in API
3232 // requests with the JSON null value. By default, fields with empty values are
3233 // omitted from API requests. See
3234 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3235 NullFields []string `json:"-"`
3236 }
3237
3238 func (s PythonSettings) MarshalJSON() ([]byte, error) {
3239 type NoMethod PythonSettings
3240 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3241 }
3242
3243 // Quota: Quota configuration helps to achieve fairness and budgeting in
3244 // service usage. The metric based quota configuration works this way: - The
3245 // service configuration defines a set of metrics. - For API calls, the
3246 // quota.metric_rules maps methods to metrics with corresponding costs. - The
3247 // quota.limits defines limits on the metrics, which will be used for quota
3248 // checks at runtime. An example quota configuration in yaml format: quota:
3249 // limits: - name: apiWriteQpsPerProject metric:
3250 // library.googleapis.com/write_calls unit: "1/min/{project}" # rate limit for
3251 // consumer projects values: STANDARD: 10000 (The metric rules bind all methods
3252 // to the read_calls metric, except for the UpdateBook and DeleteBook methods.
3253 // These two methods are mapped to the write_calls metric, with the UpdateBook
3254 // method consuming at twice rate as the DeleteBook method.) metric_rules: -
3255 // selector: "*" metric_costs: library.googleapis.com/read_calls: 1 - selector:
3256 // google.example.library.v1.LibraryService.UpdateBook metric_costs:
3257 // library.googleapis.com/write_calls: 2 - selector:
3258 // google.example.library.v1.LibraryService.DeleteBook metric_costs:
3259 // library.googleapis.com/write_calls: 1 Corresponding Metric definition:
3260 // metrics: - name: library.googleapis.com/read_calls display_name: Read
3261 // requests metric_kind: DELTA value_type: INT64 - name:
3262 // library.googleapis.com/write_calls display_name: Write requests metric_kind:
3263 // DELTA value_type: INT64
3264 type Quota struct {
3265 // Limits: List of QuotaLimit definitions for the service.
3266 Limits []*QuotaLimit `json:"limits,omitempty"`
3267 // MetricRules: List of MetricRule definitions, each one mapping a selected
3268 // method to one or more metrics.
3269 MetricRules []*MetricRule `json:"metricRules,omitempty"`
3270 // ForceSendFields is a list of field names (e.g. "Limits") to unconditionally
3271 // include in API requests. By default, fields with empty or default values are
3272 // omitted from API requests. See
3273 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3274 // details.
3275 ForceSendFields []string `json:"-"`
3276 // NullFields is a list of field names (e.g. "Limits") to include in API
3277 // requests with the JSON null value. By default, fields with empty values are
3278 // omitted from API requests. See
3279 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3280 NullFields []string `json:"-"`
3281 }
3282
3283 func (s Quota) MarshalJSON() ([]byte, error) {
3284 type NoMethod Quota
3285 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3286 }
3287
3288 // QuotaLimit: `QuotaLimit` defines a specific limit that applies over a
3289 // specified duration for a limit type. There can be at most one limit for a
3290 // duration and limit type combination defined within a `QuotaGroup`.
3291 type QuotaLimit struct {
3292 // DefaultLimit: Default number of tokens that can be consumed during the
3293 // specified duration. This is the number of tokens assigned when a client
3294 // application developer activates the service for his/her project. Specifying
3295 // a value of 0 will block all requests. This can be used if you are
3296 // provisioning quota to selected consumers and blocking others. Similarly, a
3297 // value of -1 will indicate an unlimited quota. No other negative values are
3298 // allowed. Used by group-based quotas only.
3299 DefaultLimit int64 `json:"defaultLimit,omitempty,string"`
3300 // Description: Optional. User-visible, extended description for this quota
3301 // limit. Should be used only when more context is needed to understand this
3302 // limit than provided by the limit's display name (see: `display_name`).
3303 Description string `json:"description,omitempty"`
3304 // DisplayName: User-visible display name for this limit. Optional. If not set,
3305 // the UI will provide a default display name based on the quota configuration.
3306 // This field can be used to override the default display name generated from
3307 // the configuration.
3308 DisplayName string `json:"displayName,omitempty"`
3309 // Duration: Duration of this limit in textual notation. Must be "100s" or
3310 // "1d". Used by group-based quotas only.
3311 Duration string `json:"duration,omitempty"`
3312 // FreeTier: Free tier value displayed in the Developers Console for this
3313 // limit. The free tier is the number of tokens that will be subtracted from
3314 // the billed amount when billing is enabled. This field can only be set on a
3315 // limit with duration "1d", in a billable group; it is invalid on any other
3316 // limit. If this field is not set, it defaults to 0, indicating that there is
3317 // no free tier for this service. Used by group-based quotas only.
3318 FreeTier int64 `json:"freeTier,omitempty,string"`
3319 // MaxLimit: Maximum number of tokens that can be consumed during the specified
3320 // duration. Client application developers can override the default limit up to
3321 // this maximum. If specified, this value cannot be set to a value less than
3322 // the default limit. If not specified, it is set to the default limit. To
3323 // allow clients to apply overrides with no upper bound, set this to -1,
3324 // indicating unlimited maximum quota. Used by group-based quotas only.
3325 MaxLimit int64 `json:"maxLimit,omitempty,string"`
3326 // Metric: The name of the metric this quota limit applies to. The quota limits
3327 // with the same metric will be checked together during runtime. The metric
3328 // must be defined within the service config.
3329 Metric string `json:"metric,omitempty"`
3330 // Name: Name of the quota limit. The name must be provided, and it must be
3331 // unique within the service. The name can only include alphanumeric characters
3332 // as well as '-'. The maximum length of the limit name is 64 characters.
3333 Name string `json:"name,omitempty"`
3334 // Unit: Specify the unit of the quota limit. It uses the same syntax as
3335 // MetricDescriptor.unit. The supported unit kinds are determined by the quota
3336 // backend system. Here are some examples: * "1/min/{project}" for quota per
3337 // minute per project. Note: the order of unit components is insignificant. The
3338 // "1" at the beginning is required to follow the metric unit syntax.
3339 Unit string `json:"unit,omitempty"`
3340 // Values: Tiered limit values. You must specify this as a key:value pair, with
3341 // an integer value that is the maximum number of requests allowed for the
3342 // specified unit. Currently only STANDARD is supported.
3343 Values map[string]string `json:"values,omitempty"`
3344 // ForceSendFields is a list of field names (e.g. "DefaultLimit") to
3345 // unconditionally include in API requests. By default, fields with empty or
3346 // default values are omitted from API requests. See
3347 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3348 // details.
3349 ForceSendFields []string `json:"-"`
3350 // NullFields is a list of field names (e.g. "DefaultLimit") to include in API
3351 // requests with the JSON null value. By default, fields with empty values are
3352 // omitted from API requests. See
3353 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3354 NullFields []string `json:"-"`
3355 }
3356
3357 func (s QuotaLimit) MarshalJSON() ([]byte, error) {
3358 type NoMethod QuotaLimit
3359 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3360 }
3361
3362 // RemoveTenantProjectRequest: Request message to remove a tenant project
3363 // resource from the tenancy unit.
3364 type RemoveTenantProjectRequest struct {
3365 // Tag: Required. Tag of the resource within the tenancy unit.
3366 Tag string `json:"tag,omitempty"`
3367 // ForceSendFields is a list of field names (e.g. "Tag") to unconditionally
3368 // include in API requests. By default, fields with empty or default values are
3369 // omitted from API requests. See
3370 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3371 // details.
3372 ForceSendFields []string `json:"-"`
3373 // NullFields is a list of field names (e.g. "Tag") to include in API requests
3374 // with the JSON null value. By default, fields with empty values are omitted
3375 // from API requests. See
3376 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3377 NullFields []string `json:"-"`
3378 }
3379
3380 func (s RemoveTenantProjectRequest) MarshalJSON() ([]byte, error) {
3381 type NoMethod RemoveTenantProjectRequest
3382 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3383 }
3384
3385 // RubySettings: Settings for Ruby client libraries.
3386 type RubySettings struct {
3387 // Common: Some settings.
3388 Common *CommonLanguageSettings `json:"common,omitempty"`
3389 // ForceSendFields is a list of field names (e.g. "Common") to unconditionally
3390 // include in API requests. By default, fields with empty or default values are
3391 // omitted from API requests. See
3392 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3393 // details.
3394 ForceSendFields []string `json:"-"`
3395 // NullFields is a list of field names (e.g. "Common") to include in API
3396 // requests with the JSON null value. By default, fields with empty values are
3397 // omitted from API requests. See
3398 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3399 NullFields []string `json:"-"`
3400 }
3401
3402 func (s RubySettings) MarshalJSON() ([]byte, error) {
3403 type NoMethod RubySettings
3404 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3405 }
3406
3407 // SearchTenancyUnitsResponse: Response for the search query.
3408 type SearchTenancyUnitsResponse struct {
3409 // NextPageToken: Pagination token for large results.
3410 NextPageToken string `json:"nextPageToken,omitempty"`
3411 // TenancyUnits: Tenancy Units matching the request.
3412 TenancyUnits []*TenancyUnit `json:"tenancyUnits,omitempty"`
3413
3414 // ServerResponse contains the HTTP response code and headers from the server.
3415 googleapi.ServerResponse `json:"-"`
3416 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
3417 // unconditionally include in API requests. By default, fields with empty or
3418 // default values are omitted from API requests. See
3419 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3420 // details.
3421 ForceSendFields []string `json:"-"`
3422 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
3423 // requests with the JSON null value. By default, fields with empty values are
3424 // omitted from API requests. See
3425 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3426 NullFields []string `json:"-"`
3427 }
3428
3429 func (s SearchTenancyUnitsResponse) MarshalJSON() ([]byte, error) {
3430 type NoMethod SearchTenancyUnitsResponse
3431 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3432 }
3433
3434 // SelectiveGapicGeneration: This message is used to configure the generation
3435 // of a subset of the RPCs in a service for client libraries. Note: This
3436 // feature should not be used in most cases.
3437 type SelectiveGapicGeneration struct {
3438 // GenerateOmittedAsInternal: Setting this to true indicates to the client
3439 // generators that methods that would be excluded from the generation should
3440 // instead be generated in a way that indicates these methods should not be
3441 // consumed by end users. How this is expressed is up to individual language
3442 // implementations to decide. Some examples may be: added annotations,
3443 // obfuscated identifiers, or other language idiomatic patterns.
3444 GenerateOmittedAsInternal bool `json:"generateOmittedAsInternal,omitempty"`
3445 // Methods: An allowlist of the fully qualified names of RPCs that should be
3446 // included on public client surfaces.
3447 Methods []string `json:"methods,omitempty"`
3448 // ForceSendFields is a list of field names (e.g. "GenerateOmittedAsInternal")
3449 // to unconditionally include in API requests. By default, fields with empty or
3450 // default values are omitted from API requests. See
3451 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3452 // details.
3453 ForceSendFields []string `json:"-"`
3454 // NullFields is a list of field names (e.g. "GenerateOmittedAsInternal") to
3455 // include in API requests with the JSON null value. By default, fields with
3456 // empty values are omitted from API requests. See
3457 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3458 NullFields []string `json:"-"`
3459 }
3460
3461 func (s SelectiveGapicGeneration) MarshalJSON() ([]byte, error) {
3462 type NoMethod SelectiveGapicGeneration
3463 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3464 }
3465
3466 // Service: `Service` is the root object of Google API service configuration
3467 // (service config). It describes the basic information about a logical
3468 // service, such as the service name and the user-facing title, and delegates
3469 // other aspects to sub-sections. Each sub-section is either a proto message or
3470 // a repeated proto message that configures a specific aspect, such as auth.
3471 // For more information, see each proto message definition. Example: type:
3472 // google.api.Service name: calendar.googleapis.com title: Google Calendar API
3473 // apis: - name: google.calendar.v3.Calendar visibility: rules: - selector:
3474 // "google.calendar.v3.*" restriction: PREVIEW backend: rules: - selector:
3475 // "google.calendar.v3.*" address: calendar.example.com authentication:
3476 // providers: - id: google_calendar_auth jwks_uri:
3477 // https://www.googleapis.com/oauth2/v1/certs issuer:
3478 // https://securetoken.google.com rules: - selector: "*" requirements:
3479 // provider_id: google_calendar_auth
3480 type Service struct {
3481 // Apis: A list of API interfaces exported by this service. Only the `name`
3482 // field of the google.protobuf.Api needs to be provided by the configuration
3483 // author, as the remaining fields will be derived from the IDL during the
3484 // normalization process. It is an error to specify an API interface here which
3485 // cannot be resolved against the associated IDL files.
3486 Apis []*Api `json:"apis,omitempty"`
3487 // Aspects: Configuration aspects. This is a repeated field to allow multiple
3488 // aspects to be configured. The kind field in each ConfigAspect specifies the
3489 // type of aspect. The spec field contains the configuration for that aspect.
3490 // The schema for the spec field is defined by the backend service owners.
3491 Aspects []*Aspect `json:"aspects,omitempty"`
3492 // Authentication: Auth configuration.
3493 Authentication *Authentication `json:"authentication,omitempty"`
3494 // Backend: API backend configuration.
3495 Backend *Backend `json:"backend,omitempty"`
3496 // Billing: Billing configuration.
3497 Billing *Billing `json:"billing,omitempty"`
3498 // ConfigVersion: Obsolete. Do not use. This field has no semantic meaning. The
3499 // service config compiler always sets this field to `3`.
3500 ConfigVersion int64 `json:"configVersion,omitempty"`
3501 // Context: Context configuration.
3502 Context *Context `json:"context,omitempty"`
3503 // Control: Configuration for the service control plane.
3504 Control *Control `json:"control,omitempty"`
3505 // CustomError: Custom error configuration.
3506 CustomError *CustomError `json:"customError,omitempty"`
3507 // Documentation: Additional API documentation.
3508 Documentation *Documentation `json:"documentation,omitempty"`
3509 // Endpoints: Configuration for network endpoints. If this is empty, then an
3510 // endpoint with the same name as the service is automatically generated to
3511 // service all defined APIs.
3512 Endpoints []*Endpoint `json:"endpoints,omitempty"`
3513 // Enums: A list of all enum types included in this API service. Enums
3514 // referenced directly or indirectly by the `apis` are automatically included.
3515 // Enums which are not referenced but shall be included should be listed here
3516 // by name by the configuration author. Example: enums: - name:
3517 // google.someapi.v1.SomeEnum
3518 Enums []*Enum `json:"enums,omitempty"`
3519 // Http: HTTP configuration.
3520 Http *Http `json:"http,omitempty"`
3521 // Id: A unique ID for a specific instance of this message, typically assigned
3522 // by the client for tracking purpose. Must be no longer than 63 characters and
3523 // only lower case letters, digits, '.', '_' and '-' are allowed. If empty, the
3524 // server may choose to generate one instead.
3525 Id string `json:"id,omitempty"`
3526 // Logging: Logging configuration.
3527 Logging *Logging `json:"logging,omitempty"`
3528 // Logs: Defines the logs used by this service.
3529 Logs []*LogDescriptor `json:"logs,omitempty"`
3530 // Metrics: Defines the metrics used by this service.
3531 Metrics []*MetricDescriptor `json:"metrics,omitempty"`
3532 // MonitoredResources: Defines the monitored resources used by this service.
3533 // This is required by the `Service.monitoring` and `Service.logging`
3534 // configurations.
3535 MonitoredResources []*MonitoredResourceDescriptor `json:"monitoredResources,omitempty"`
3536 // Monitoring: Monitoring configuration.
3537 Monitoring *Monitoring `json:"monitoring,omitempty"`
3538 // Name: The service name, which is a DNS-like logical identifier for the
3539 // service, such as `calendar.googleapis.com`. The service name typically goes
3540 // through DNS verification to make sure the owner of the service also owns the
3541 // DNS name.
3542 Name string `json:"name,omitempty"`
3543 // ProducerProjectId: The Google project that owns this service.
3544 ProducerProjectId string `json:"producerProjectId,omitempty"`
3545 // Publishing: Settings for Google Cloud Client libraries
3546 // (https://cloud.google.com/apis/docs/cloud-client-libraries) generated from
3547 // APIs defined as protocol buffers.
3548 Publishing *Publishing `json:"publishing,omitempty"`
3549 // Quota: Quota configuration.
3550 Quota *Quota `json:"quota,omitempty"`
3551 // SourceInfo: Output only. The source information for this configuration if
3552 // available.
3553 SourceInfo *SourceInfo `json:"sourceInfo,omitempty"`
3554 // SystemParameters: System parameter configuration.
3555 SystemParameters *SystemParameters `json:"systemParameters,omitempty"`
3556 // SystemTypes: A list of all proto message types included in this API service.
3557 // It serves similar purpose as [google.api.Service.types], except that these
3558 // types are not needed by user-defined APIs. Therefore, they will not show up
3559 // in the generated discovery doc. This field should only be used to define
3560 // system APIs in ESF.
3561 SystemTypes []*Type `json:"systemTypes,omitempty"`
3562 // Title: The product title for this service, it is the name displayed in
3563 // Google Cloud Console.
3564 Title string `json:"title,omitempty"`
3565 // Types: A list of all proto message types included in this API service. Types
3566 // referenced directly or indirectly by the `apis` are automatically included.
3567 // Messages which are not referenced but shall be included, such as types used
3568 // by the `google.protobuf.Any` type, should be listed here by name by the
3569 // configuration author. Example: types: - name: google.protobuf.Int32
3570 Types []*Type `json:"types,omitempty"`
3571 // Usage: Configuration controlling usage of this service.
3572 Usage *Usage `json:"usage,omitempty"`
3573 // ForceSendFields is a list of field names (e.g. "Apis") to unconditionally
3574 // include in API requests. By default, fields with empty or default values are
3575 // omitted from API requests. See
3576 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3577 // details.
3578 ForceSendFields []string `json:"-"`
3579 // NullFields is a list of field names (e.g. "Apis") to include in API requests
3580 // with the JSON null value. By default, fields with empty values are omitted
3581 // from API requests. See
3582 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3583 NullFields []string `json:"-"`
3584 }
3585
3586 func (s Service) MarshalJSON() ([]byte, error) {
3587 type NoMethod Service
3588 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3589 }
3590
3591 // ServiceAccountConfig: Describes the service account configuration for the
3592 // tenant project.
3593 type ServiceAccountConfig struct {
3594 // AccountId: ID of the IAM service account to be created in tenant project.
3595 // The email format of the service account is "@.iam.gserviceaccount.com". This
3596 // account ID must be unique within tenant project and service producers have
3597 // to guarantee it. The ID must be 6-30 characters long, and match the
3598 // following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])`.
3599 AccountId string `json:"accountId,omitempty"`
3600 // TenantProjectRoles: Roles for the associated service account for the tenant
3601 // project.
3602 TenantProjectRoles []string `json:"tenantProjectRoles,omitempty"`
3603 // ForceSendFields is a list of field names (e.g. "AccountId") to
3604 // unconditionally include in API requests. By default, fields with empty or
3605 // default values are omitted from API requests. See
3606 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3607 // details.
3608 ForceSendFields []string `json:"-"`
3609 // NullFields is a list of field names (e.g. "AccountId") to include in API
3610 // requests with the JSON null value. By default, fields with empty values are
3611 // omitted from API requests. See
3612 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3613 NullFields []string `json:"-"`
3614 }
3615
3616 func (s ServiceAccountConfig) MarshalJSON() ([]byte, error) {
3617 type NoMethod ServiceAccountConfig
3618 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3619 }
3620
3621 // SourceContext: `SourceContext` represents information about the source of a
3622 // protobuf element, like the file in which it is defined.
3623 type SourceContext struct {
3624 // FileName: The path-qualified name of the .proto file that contained the
3625 // associated protobuf element. For example:
3626 // "google/protobuf/source_context.proto".
3627 FileName string `json:"fileName,omitempty"`
3628 // ForceSendFields is a list of field names (e.g. "FileName") to
3629 // unconditionally include in API requests. By default, fields with empty or
3630 // default values are omitted from API requests. See
3631 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3632 // details.
3633 ForceSendFields []string `json:"-"`
3634 // NullFields is a list of field names (e.g. "FileName") to include in API
3635 // requests with the JSON null value. By default, fields with empty values are
3636 // omitted from API requests. See
3637 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3638 NullFields []string `json:"-"`
3639 }
3640
3641 func (s SourceContext) MarshalJSON() ([]byte, error) {
3642 type NoMethod SourceContext
3643 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3644 }
3645
3646 // SourceInfo: Source information used to create a Service Config
3647 type SourceInfo struct {
3648 // SourceFiles: All files used during config generation.
3649 SourceFiles []googleapi.RawMessage `json:"sourceFiles,omitempty"`
3650 // ForceSendFields is a list of field names (e.g. "SourceFiles") to
3651 // unconditionally include in API requests. By default, fields with empty or
3652 // default values are omitted from API requests. See
3653 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3654 // details.
3655 ForceSendFields []string `json:"-"`
3656 // NullFields is a list of field names (e.g. "SourceFiles") to include in API
3657 // requests with the JSON null value. By default, fields with empty values are
3658 // omitted from API requests. See
3659 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3660 NullFields []string `json:"-"`
3661 }
3662
3663 func (s SourceInfo) MarshalJSON() ([]byte, error) {
3664 type NoMethod SourceInfo
3665 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3666 }
3667
3668 // Status: The `Status` type defines a logical error model that is suitable for
3669 // different programming environments, including REST APIs and RPC APIs. It is
3670 // used by gRPC (https://github.com/grpc). Each `Status` message contains three
3671 // pieces of data: error code, error message, and error details. You can find
3672 // out more about this error model and how to work with it in the API Design
3673 // Guide (https://cloud.google.com/apis/design/errors).
3674 type Status struct {
3675 // Code: The status code, which should be an enum value of google.rpc.Code.
3676 Code int64 `json:"code,omitempty"`
3677 // Details: A list of messages that carry the error details. There is a common
3678 // set of message types for APIs to use.
3679 Details []googleapi.RawMessage `json:"details,omitempty"`
3680 // Message: A developer-facing error message, which should be in English. Any
3681 // user-facing error message should be localized and sent in the
3682 // google.rpc.Status.details field, or localized by the client.
3683 Message string `json:"message,omitempty"`
3684 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
3685 // include in API requests. By default, fields with empty or default values are
3686 // omitted from API requests. See
3687 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3688 // details.
3689 ForceSendFields []string `json:"-"`
3690 // NullFields is a list of field names (e.g. "Code") to include in API requests
3691 // with the JSON null value. By default, fields with empty values are omitted
3692 // from API requests. See
3693 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3694 NullFields []string `json:"-"`
3695 }
3696
3697 func (s Status) MarshalJSON() ([]byte, error) {
3698 type NoMethod Status
3699 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3700 }
3701
3702 // SystemParameter: Define a parameter's name and location. The parameter may
3703 // be passed as either an HTTP header or a URL query parameter, and if both are
3704 // passed the behavior is implementation-dependent.
3705 type SystemParameter struct {
3706 // HttpHeader: Define the HTTP header name to use for the parameter. It is case
3707 // insensitive.
3708 HttpHeader string `json:"httpHeader,omitempty"`
3709 // Name: Define the name of the parameter, such as "api_key" . It is case
3710 // sensitive.
3711 Name string `json:"name,omitempty"`
3712 // UrlQueryParameter: Define the URL query parameter name to use for the
3713 // parameter. It is case sensitive.
3714 UrlQueryParameter string `json:"urlQueryParameter,omitempty"`
3715 // ForceSendFields is a list of field names (e.g. "HttpHeader") to
3716 // unconditionally include in API requests. By default, fields with empty or
3717 // default values are omitted from API requests. See
3718 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3719 // details.
3720 ForceSendFields []string `json:"-"`
3721 // NullFields is a list of field names (e.g. "HttpHeader") to include in API
3722 // requests with the JSON null value. By default, fields with empty values are
3723 // omitted from API requests. See
3724 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3725 NullFields []string `json:"-"`
3726 }
3727
3728 func (s SystemParameter) MarshalJSON() ([]byte, error) {
3729 type NoMethod SystemParameter
3730 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3731 }
3732
3733 // SystemParameterRule: Define a system parameter rule mapping system parameter
3734 // definitions to methods.
3735 type SystemParameterRule struct {
3736 // Parameters: Define parameters. Multiple names may be defined for a
3737 // parameter. For a given method call, only one of them should be used. If
3738 // multiple names are used the behavior is implementation-dependent. If none of
3739 // the specified names are present the behavior is parameter-dependent.
3740 Parameters []*SystemParameter `json:"parameters,omitempty"`
3741 // Selector: Selects the methods to which this rule applies. Use '*' to
3742 // indicate all methods in all APIs. Refer to selector for syntax details.
3743 Selector string `json:"selector,omitempty"`
3744 // ForceSendFields is a list of field names (e.g. "Parameters") to
3745 // unconditionally include in API requests. By default, fields with empty or
3746 // default values are omitted from API requests. See
3747 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3748 // details.
3749 ForceSendFields []string `json:"-"`
3750 // NullFields is a list of field names (e.g. "Parameters") to include in API
3751 // requests with the JSON null value. By default, fields with empty values are
3752 // omitted from API requests. See
3753 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3754 NullFields []string `json:"-"`
3755 }
3756
3757 func (s SystemParameterRule) MarshalJSON() ([]byte, error) {
3758 type NoMethod SystemParameterRule
3759 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3760 }
3761
3762 // SystemParameters: ### System parameter configuration A system parameter is a
3763 // special kind of parameter defined by the API system, not by an individual
3764 // API. It is typically mapped to an HTTP header and/or a URL query parameter.
3765 // This configuration specifies which methods change the names of the system
3766 // parameters.
3767 type SystemParameters struct {
3768 // Rules: Define system parameters. The parameters defined here will override
3769 // the default parameters implemented by the system. If this field is missing
3770 // from the service config, default system parameters will be used. Default
3771 // system parameters and names is implementation-dependent. Example: define api
3772 // key for all methods system_parameters rules: - selector: "*" parameters: -
3773 // name: api_key url_query_parameter: api_key Example: define 2 api key names
3774 // for a specific method. system_parameters rules: - selector: "/ListShelves"
3775 // parameters: - name: api_key http_header: Api-Key1 - name: api_key
3776 // http_header: Api-Key2 **NOTE:** All service configuration rules follow "last
3777 // one wins" order.
3778 Rules []*SystemParameterRule `json:"rules,omitempty"`
3779 // ForceSendFields is a list of field names (e.g. "Rules") to unconditionally
3780 // include in API requests. By default, fields with empty or default values are
3781 // omitted from API requests. See
3782 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3783 // details.
3784 ForceSendFields []string `json:"-"`
3785 // NullFields is a list of field names (e.g. "Rules") to include in API
3786 // requests with the JSON null value. By default, fields with empty values are
3787 // omitted from API requests. See
3788 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3789 NullFields []string `json:"-"`
3790 }
3791
3792 func (s SystemParameters) MarshalJSON() ([]byte, error) {
3793 type NoMethod SystemParameters
3794 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3795 }
3796
3797 // TenancyUnit: Representation of a tenancy unit.
3798 type TenancyUnit struct {
3799 // Consumer: Output only. @OutputOnly Cloud resource name of the consumer of
3800 // this service. For example 'projects/123456'.
3801 Consumer string `json:"consumer,omitempty"`
3802 // CreateTime: Output only. @OutputOnly The time this tenancy unit was created.
3803 CreateTime string `json:"createTime,omitempty"`
3804 // Name: Globally unique identifier of this tenancy unit
3805 // "services/{service}/{collection id}/{resource id}/tenancyUnits/{unit}"
3806 Name string `json:"name,omitempty"`
3807 // Service: Output only. Google Cloud API name of the managed service owning
3808 // this tenancy unit. For example 'serviceconsumermanagement.googleapis.com'.
3809 Service string `json:"service,omitempty"`
3810 // TenantResources: Resources constituting the tenancy unit. There can be at
3811 // most 512 tenant resources in a tenancy unit.
3812 TenantResources []*TenantResource `json:"tenantResources,omitempty"`
3813
3814 // ServerResponse contains the HTTP response code and headers from the server.
3815 googleapi.ServerResponse `json:"-"`
3816 // ForceSendFields is a list of field names (e.g. "Consumer") to
3817 // unconditionally include in API requests. By default, fields with empty or
3818 // default values are omitted from API requests. See
3819 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3820 // details.
3821 ForceSendFields []string `json:"-"`
3822 // NullFields is a list of field names (e.g. "Consumer") to include in API
3823 // requests with the JSON null value. By default, fields with empty values are
3824 // omitted from API requests. See
3825 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3826 NullFields []string `json:"-"`
3827 }
3828
3829 func (s TenancyUnit) MarshalJSON() ([]byte, error) {
3830 type NoMethod TenancyUnit
3831 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3832 }
3833
3834 // TenantProjectConfig: This structure defines a tenant project to be added to
3835 // the specified tenancy unit and its initial configuration and properties. A
3836 // project lien is created for the tenant project to prevent the tenant project
3837 // from being deleted accidentally. The lien is deleted as part of tenant
3838 // project removal.
3839 type TenantProjectConfig struct {
3840 // BillingConfig: Billing account properties. The billing account must be
3841 // specified.
3842 BillingConfig *BillingConfig `json:"billingConfig,omitempty"`
3843 // Folder: Folder where project in this tenancy unit must be located This
3844 // folder must have been previously created with the required permissions for
3845 // the caller to create and configure a project in it. Valid folder resource
3846 // names have the format `folders/{folder_number}` (for example,
3847 // `folders/123456`).
3848 Folder string `json:"folder,omitempty"`
3849 // Labels: Labels that are applied to this project.
3850 Labels map[string]string `json:"labels,omitempty"`
3851 // ServiceAccountConfig: Configuration for the IAM service account on the
3852 // tenant project.
3853 ServiceAccountConfig *ServiceAccountConfig `json:"serviceAccountConfig,omitempty"`
3854 // Services: Google Cloud API names of services that are activated on this
3855 // project during provisioning. If any of these services can't be activated,
3856 // the request fails. For example:
3857 // 'compute.googleapis.com','cloudfunctions.googleapis.com'
3858 Services []string `json:"services,omitempty"`
3859 // TenantProjectPolicy: Describes ownership and policies for the new tenant
3860 // project.
3861 TenantProjectPolicy *TenantProjectPolicy `json:"tenantProjectPolicy,omitempty"`
3862 // ForceSendFields is a list of field names (e.g. "BillingConfig") to
3863 // unconditionally include in API requests. By default, fields with empty or
3864 // default values are omitted from API requests. See
3865 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3866 // details.
3867 ForceSendFields []string `json:"-"`
3868 // NullFields is a list of field names (e.g. "BillingConfig") to include in API
3869 // requests with the JSON null value. By default, fields with empty values are
3870 // omitted from API requests. See
3871 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3872 NullFields []string `json:"-"`
3873 }
3874
3875 func (s TenantProjectConfig) MarshalJSON() ([]byte, error) {
3876 type NoMethod TenantProjectConfig
3877 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3878 }
3879
3880 // TenantProjectPolicy: Describes policy settings that can be applied to a
3881 // newly created tenant project.
3882 type TenantProjectPolicy struct {
3883 // PolicyBindings: Policy bindings to be applied to the tenant project, in
3884 // addition to the 'roles/owner' role granted to the Service Consumer
3885 // Management service account.
3886 PolicyBindings []*PolicyBinding `json:"policyBindings,omitempty"`
3887 // ForceSendFields is a list of field names (e.g. "PolicyBindings") to
3888 // unconditionally include in API requests. By default, fields with empty or
3889 // default values are omitted from API requests. See
3890 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3891 // details.
3892 ForceSendFields []string `json:"-"`
3893 // NullFields is a list of field names (e.g. "PolicyBindings") to include in
3894 // API requests with the JSON null value. By default, fields with empty values
3895 // are omitted from API requests. See
3896 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3897 NullFields []string `json:"-"`
3898 }
3899
3900 func (s TenantProjectPolicy) MarshalJSON() ([]byte, error) {
3901 type NoMethod TenantProjectPolicy
3902 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3903 }
3904
3905 // TenantResource: Resource constituting the TenancyUnit.
3906 type TenantResource struct {
3907 // MigratedTenantProject: Output only. The newly created regional resource name
3908 // of the tenant project that has been migrated from a global service. This
3909 // field is only set for migrated tenant projects. Format:
3910 // `services//{collection_id}/{RESOURCE_ID}/locations/{LOCATION}/tenantProjects/
3911 // {TENANT_ID}`.
3912 MigratedTenantProject string `json:"migratedTenantProject,omitempty"`
3913 // Resource: Output only. @OutputOnly Identifier of the tenant resource. For
3914 // cloud projects, it is in the form 'projects/{number}'. For example
3915 // 'projects/123456'.
3916 Resource string `json:"resource,omitempty"`
3917 // Status: Status of tenant resource.
3918 //
3919 // Possible values:
3920 // "STATUS_UNSPECIFIED" - Unspecified status is the default unset value.
3921 // "PENDING_CREATE" - Creation of the tenant resource is ongoing.
3922 // "ACTIVE" - Active resource.
3923 // "PENDING_DELETE" - Deletion of the resource is ongoing.
3924 // "FAILED" - Tenant resource creation or deletion has failed.
3925 // "DELETED" - Tenant resource has been deleted.
3926 Status string `json:"status,omitempty"`
3927 // Tag: Unique per single tenancy unit.
3928 Tag string `json:"tag,omitempty"`
3929 // ForceSendFields is a list of field names (e.g. "MigratedTenantProject") to
3930 // unconditionally include in API requests. By default, fields with empty or
3931 // default values are omitted from API requests. See
3932 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3933 // details.
3934 ForceSendFields []string `json:"-"`
3935 // NullFields is a list of field names (e.g. "MigratedTenantProject") to
3936 // include in API requests with the JSON null value. By default, fields with
3937 // empty values are omitted from API requests. See
3938 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3939 NullFields []string `json:"-"`
3940 }
3941
3942 func (s TenantResource) MarshalJSON() ([]byte, error) {
3943 type NoMethod TenantResource
3944 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3945 }
3946
3947 // Type: A protocol buffer message type. New usages of this message as an
3948 // alternative to DescriptorProto are strongly discouraged. This message does
3949 // not reliability preserve all information necessary to model the schema and
3950 // preserve semantics. Instead make use of FileDescriptorSet which preserves
3951 // the necessary information.
3952 type Type struct {
3953 // Edition: The source edition string, only valid when syntax is
3954 // SYNTAX_EDITIONS.
3955 Edition string `json:"edition,omitempty"`
3956 // Fields: The list of fields.
3957 Fields []*Field `json:"fields,omitempty"`
3958 // Name: The fully qualified message name.
3959 Name string `json:"name,omitempty"`
3960 // Oneofs: The list of types appearing in `oneof` definitions in this type.
3961 Oneofs []string `json:"oneofs,omitempty"`
3962 // Options: The protocol buffer options.
3963 Options []*Option `json:"options,omitempty"`
3964 // SourceContext: The source context.
3965 SourceContext *SourceContext `json:"sourceContext,omitempty"`
3966 // Syntax: The source syntax.
3967 //
3968 // Possible values:
3969 // "SYNTAX_PROTO2" - Syntax `proto2`.
3970 // "SYNTAX_PROTO3" - Syntax `proto3`.
3971 // "SYNTAX_EDITIONS" - Syntax `editions`.
3972 Syntax string `json:"syntax,omitempty"`
3973 // ForceSendFields is a list of field names (e.g. "Edition") to unconditionally
3974 // include in API requests. By default, fields with empty or default values are
3975 // omitted from API requests. See
3976 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3977 // details.
3978 ForceSendFields []string `json:"-"`
3979 // NullFields is a list of field names (e.g. "Edition") to include in API
3980 // requests with the JSON null value. By default, fields with empty values are
3981 // omitted from API requests. See
3982 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3983 NullFields []string `json:"-"`
3984 }
3985
3986 func (s Type) MarshalJSON() ([]byte, error) {
3987 type NoMethod Type
3988 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3989 }
3990
3991 // UndeleteTenantProjectRequest: Request message to undelete tenant project
3992 // resource previously deleted from the tenancy unit.
3993 type UndeleteTenantProjectRequest struct {
3994 // Tag: Required. Tag of the resource within the tenancy unit.
3995 Tag string `json:"tag,omitempty"`
3996 // ForceSendFields is a list of field names (e.g. "Tag") to unconditionally
3997 // include in API requests. By default, fields with empty or default values are
3998 // omitted from API requests. See
3999 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4000 // details.
4001 ForceSendFields []string `json:"-"`
4002 // NullFields is a list of field names (e.g. "Tag") to include in API requests
4003 // with the JSON null value. By default, fields with empty values are omitted
4004 // from API requests. See
4005 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4006 NullFields []string `json:"-"`
4007 }
4008
4009 func (s UndeleteTenantProjectRequest) MarshalJSON() ([]byte, error) {
4010 type NoMethod UndeleteTenantProjectRequest
4011 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4012 }
4013
4014 // Usage: Configuration controlling usage of a service.
4015 type Usage struct {
4016 // ProducerNotificationChannel: The full resource name of a channel used for
4017 // sending notifications to the service producer. Google Service Management
4018 // currently only supports Google Cloud Pub/Sub
4019 // (https://cloud.google.com/pubsub) as a notification channel. To use Google
4020 // Cloud Pub/Sub as the channel, this must be the name of a Cloud Pub/Sub topic
4021 // that uses the Cloud Pub/Sub topic name format documented in
4022 // https://cloud.google.com/pubsub/docs/overview.
4023 ProducerNotificationChannel string `json:"producerNotificationChannel,omitempty"`
4024 // Requirements: Requirements that must be satisfied before a consumer project
4025 // can use the service. Each requirement is of the form /; for example
4026 // 'serviceusage.googleapis.com/billing-enabled'. For Google APIs, a Terms of
4027 // Service requirement must be included here. Google Cloud APIs must include
4028 // "serviceusage.googleapis.com/tos/cloud". Other Google APIs should include
4029 // "serviceusage.googleapis.com/tos/universal". Additional ToS can be included
4030 // based on the business needs.
4031 Requirements []string `json:"requirements,omitempty"`
4032 // Rules: A list of usage rules that apply to individual API methods. **NOTE:**
4033 // All service configuration rules follow "last one wins" order.
4034 Rules []*UsageRule `json:"rules,omitempty"`
4035 // ForceSendFields is a list of field names (e.g.
4036 // "ProducerNotificationChannel") to unconditionally include in API requests.
4037 // By default, fields with empty or default values are omitted from API
4038 // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields
4039 // for more details.
4040 ForceSendFields []string `json:"-"`
4041 // NullFields is a list of field names (e.g. "ProducerNotificationChannel") to
4042 // include in API requests with the JSON null value. By default, fields with
4043 // empty values are omitted from API requests. See
4044 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4045 NullFields []string `json:"-"`
4046 }
4047
4048 func (s Usage) MarshalJSON() ([]byte, error) {
4049 type NoMethod Usage
4050 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4051 }
4052
4053 // UsageRule: Usage configuration rules for the service.
4054 type UsageRule struct {
4055 // AllowUnregisteredCalls: Use this rule to configure unregistered calls for
4056 // the service. Unregistered calls are calls that do not contain consumer
4057 // project identity. (Example: calls that do not contain an API key). WARNING:
4058 // By default, API methods do not allow unregistered calls, and each method
4059 // call must be identified by a consumer project identity.
4060 AllowUnregisteredCalls bool `json:"allowUnregisteredCalls,omitempty"`
4061 // Selector: Selects the methods to which this rule applies. Use '*' to
4062 // indicate all methods in all APIs. Refer to selector for syntax details.
4063 Selector string `json:"selector,omitempty"`
4064 // SkipServiceControl: If true, the selected method should skip service control
4065 // and the control plane features, such as quota and billing, will not be
4066 // available. This flag is used by Google Cloud Endpoints to bypass checks for
4067 // internal methods, such as service health check methods.
4068 SkipServiceControl bool `json:"skipServiceControl,omitempty"`
4069 // ForceSendFields is a list of field names (e.g. "AllowUnregisteredCalls") to
4070 // unconditionally include in API requests. By default, fields with empty or
4071 // default values are omitted from API requests. See
4072 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4073 // details.
4074 ForceSendFields []string `json:"-"`
4075 // NullFields is a list of field names (e.g. "AllowUnregisteredCalls") to
4076 // include in API requests with the JSON null value. By default, fields with
4077 // empty values are omitted from API requests. See
4078 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4079 NullFields []string `json:"-"`
4080 }
4081
4082 func (s UsageRule) MarshalJSON() ([]byte, error) {
4083 type NoMethod UsageRule
4084 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4085 }
4086
4087 // V1AddVisibilityLabelsResponse: Response message for the
4088 // `AddVisibilityLabels` method. This response message is assigned to the
4089 // `response` field of the returned Operation when that operation is done.
4090 type V1AddVisibilityLabelsResponse struct {
4091 // Labels: The updated set of visibility labels for this consumer on this
4092 // service.
4093 Labels []string `json:"labels,omitempty"`
4094 // ForceSendFields is a list of field names (e.g. "Labels") to unconditionally
4095 // include in API requests. By default, fields with empty or default values are
4096 // omitted from API requests. See
4097 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4098 // details.
4099 ForceSendFields []string `json:"-"`
4100 // NullFields is a list of field names (e.g. "Labels") to include in API
4101 // requests with the JSON null value. By default, fields with empty values are
4102 // omitted from API requests. See
4103 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4104 NullFields []string `json:"-"`
4105 }
4106
4107 func (s V1AddVisibilityLabelsResponse) MarshalJSON() ([]byte, error) {
4108 type NoMethod V1AddVisibilityLabelsResponse
4109 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4110 }
4111
4112 // V1Beta1BatchCreateProducerOverridesResponse: Response message for
4113 // BatchCreateProducerOverrides
4114 type V1Beta1BatchCreateProducerOverridesResponse struct {
4115 // Overrides: The overrides that were created.
4116 Overrides []*V1Beta1QuotaOverride `json:"overrides,omitempty"`
4117 // ForceSendFields is a list of field names (e.g. "Overrides") to
4118 // unconditionally include in API requests. By default, fields with empty or
4119 // default values are omitted from API requests. See
4120 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4121 // details.
4122 ForceSendFields []string `json:"-"`
4123 // NullFields is a list of field names (e.g. "Overrides") to include in API
4124 // requests with the JSON null value. By default, fields with empty values are
4125 // omitted from API requests. See
4126 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4127 NullFields []string `json:"-"`
4128 }
4129
4130 func (s V1Beta1BatchCreateProducerOverridesResponse) MarshalJSON() ([]byte, error) {
4131 type NoMethod V1Beta1BatchCreateProducerOverridesResponse
4132 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4133 }
4134
4135 // V1Beta1DisableConsumerResponse: Response message for the `DisableConsumer`
4136 // method. This response message is assigned to the `response` field of the
4137 // returned Operation when that operation is done.
4138 type V1Beta1DisableConsumerResponse struct {
4139 }
4140
4141 // V1Beta1EnableConsumerResponse: Response message for the `EnableConsumer`
4142 // method. This response message is assigned to the `response` field of the
4143 // returned Operation when that operation is done.
4144 type V1Beta1EnableConsumerResponse struct {
4145 }
4146
4147 // V1Beta1GenerateServiceIdentityResponse: Response message for the
4148 // `GenerateServiceIdentity` method. This response message is assigned to the
4149 // `response` field of the returned Operation when that operation is done.
4150 type V1Beta1GenerateServiceIdentityResponse struct {
4151 // Identity: ServiceIdentity that was created or retrieved.
4152 Identity *V1Beta1ServiceIdentity `json:"identity,omitempty"`
4153 // ForceSendFields is a list of field names (e.g. "Identity") to
4154 // unconditionally include in API requests. By default, fields with empty or
4155 // default values are omitted from API requests. See
4156 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4157 // details.
4158 ForceSendFields []string `json:"-"`
4159 // NullFields is a list of field names (e.g. "Identity") to include in API
4160 // requests with the JSON null value. By default, fields with empty values are
4161 // omitted from API requests. See
4162 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4163 NullFields []string `json:"-"`
4164 }
4165
4166 func (s V1Beta1GenerateServiceIdentityResponse) MarshalJSON() ([]byte, error) {
4167 type NoMethod V1Beta1GenerateServiceIdentityResponse
4168 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4169 }
4170
4171 // V1Beta1ImportProducerOverridesResponse: Response message for
4172 // ImportProducerOverrides
4173 type V1Beta1ImportProducerOverridesResponse struct {
4174 // Overrides: The overrides that were created from the imported data.
4175 Overrides []*V1Beta1QuotaOverride `json:"overrides,omitempty"`
4176 // ForceSendFields is a list of field names (e.g. "Overrides") to
4177 // unconditionally include in API requests. By default, fields with empty or
4178 // default values are omitted from API requests. See
4179 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4180 // details.
4181 ForceSendFields []string `json:"-"`
4182 // NullFields is a list of field names (e.g. "Overrides") to include in API
4183 // requests with the JSON null value. By default, fields with empty values are
4184 // omitted from API requests. See
4185 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4186 NullFields []string `json:"-"`
4187 }
4188
4189 func (s V1Beta1ImportProducerOverridesResponse) MarshalJSON() ([]byte, error) {
4190 type NoMethod V1Beta1ImportProducerOverridesResponse
4191 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4192 }
4193
4194 // V1Beta1ImportProducerQuotaPoliciesResponse: Response message for
4195 // ImportProducerQuotaPolicies
4196 type V1Beta1ImportProducerQuotaPoliciesResponse struct {
4197 // Policies: The policies that were created from the imported data.
4198 Policies []*V1Beta1ProducerQuotaPolicy `json:"policies,omitempty"`
4199 // ForceSendFields is a list of field names (e.g. "Policies") to
4200 // unconditionally include in API requests. By default, fields with empty or
4201 // default values are omitted from API requests. See
4202 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4203 // details.
4204 ForceSendFields []string `json:"-"`
4205 // NullFields is a list of field names (e.g. "Policies") to include in API
4206 // requests with the JSON null value. By default, fields with empty values are
4207 // omitted from API requests. See
4208 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4209 NullFields []string `json:"-"`
4210 }
4211
4212 func (s V1Beta1ImportProducerQuotaPoliciesResponse) MarshalJSON() ([]byte, error) {
4213 type NoMethod V1Beta1ImportProducerQuotaPoliciesResponse
4214 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4215 }
4216
4217 // V1Beta1ProducerQuotaPolicy: Quota policy created by service producer.
4218 type V1Beta1ProducerQuotaPolicy struct {
4219 // Container: The cloud resource container at which the quota policy is
4220 // created. The format is {container_type}/{container_number}
4221 Container string `json:"container,omitempty"`
4222 // Dimensions: If this map is nonempty, then this policy applies only to
4223 // specific values for dimensions defined in the limit unit. For example, a
4224 // policy on a limit with the unit 1/{project}/{region} could contain an entry
4225 // with the key "region" and the value "us-east-1"; the policy is only applied
4226 // to quota consumed in that region. This map has the following restrictions: *
4227 // Keys that are not defined in the limit's unit are not valid keys. Any string
4228 // appearing in {brackets} in the unit (besides {project} or {user}) is a
4229 // defined key. * "project" is not a valid key; the project is already
4230 // specified in the parent resource name. * "user" is not a valid key; the API
4231 // does not support quota polcies that apply only to a specific user. * If
4232 // "region" appears as a key, its value must be a valid Cloud region. * If
4233 // "zone" appears as a key, its value must be a valid Cloud zone. * If any
4234 // valid key other than "region" or "zone" appears in the map, then all valid
4235 // keys other than "region" or "zone" must also appear in the map.
4236 Dimensions map[string]string `json:"dimensions,omitempty"`
4237 // Metric: The name of the metric to which this policy applies. An example name
4238 // would be: `compute.googleapis.com/cpus`
4239 Metric string `json:"metric,omitempty"`
4240 // Name: The resource name of the producer policy. An example name would be:
4241 // `services/compute.googleapis.com/organizations/123/consumerQuotaMetrics/compu
4242 // te.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/producerQuotaPolicies/4a3
4243 // f2c1d`
4244 Name string `json:"name,omitempty"`
4245 // PolicyValue: The quota policy value. Can be any nonnegative integer, or -1
4246 // (unlimited quota).
4247 PolicyValue int64 `json:"policyValue,omitempty,string"`
4248 // Unit: The limit unit of the limit to which this policy applies. An example
4249 // unit would be: `1/{project}/{region}` Note that `{project}` and `{region}`
4250 // are not placeholders in this example; the literal characters `{` and `}`
4251 // occur in the string.
4252 Unit string `json:"unit,omitempty"`
4253 // ForceSendFields is a list of field names (e.g. "Container") to
4254 // unconditionally include in API requests. By default, fields with empty or
4255 // default values are omitted from API requests. See
4256 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4257 // details.
4258 ForceSendFields []string `json:"-"`
4259 // NullFields is a list of field names (e.g. "Container") to include in API
4260 // requests with the JSON null value. By default, fields with empty values are
4261 // omitted from API requests. See
4262 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4263 NullFields []string `json:"-"`
4264 }
4265
4266 func (s V1Beta1ProducerQuotaPolicy) MarshalJSON() ([]byte, error) {
4267 type NoMethod V1Beta1ProducerQuotaPolicy
4268 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4269 }
4270
4271 // V1Beta1QuotaOverride: A quota override
4272 type V1Beta1QuotaOverride struct {
4273 // AdminOverrideAncestor: The resource name of the ancestor that requested the
4274 // override. For example: "organizations/12345" or "folders/67890". Used by
4275 // admin overrides only.
4276 AdminOverrideAncestor string `json:"adminOverrideAncestor,omitempty"`
4277 // Dimensions: If this map is nonempty, then this override applies only to
4278 // specific values for dimensions defined in the limit unit. For example, an
4279 // override on a limit with the unit 1/{project}/{region} could contain an
4280 // entry with the key "region" and the value "us-east-1"; the override is only
4281 // applied to quota consumed in that region. This map has the following
4282 // restrictions: * Keys that are not defined in the limit's unit are not valid
4283 // keys. Any string appearing in {brackets} in the unit (besides {project} or
4284 // {user}) is a defined key. * "project" is not a valid key; the project is
4285 // already specified in the parent resource name. * "user" is not a valid key;
4286 // the API does not support quota overrides that apply only to a specific user.
4287 // * If "region" appears as a key, its value must be a valid Cloud region. * If
4288 // "zone" appears as a key, its value must be a valid Cloud zone. * If any
4289 // valid key other than "region" or "zone" appears in the map, then all valid
4290 // keys other than "region" or "zone" must also appear in the map.
4291 Dimensions map[string]string `json:"dimensions,omitempty"`
4292 // Metric: The name of the metric to which this override applies. An example
4293 // name would be: `compute.googleapis.com/cpus`
4294 Metric string `json:"metric,omitempty"`
4295 // Name: The resource name of the producer override. An example name would be:
4296 // `services/compute.googleapis.com/projects/123/consumerQuotaMetrics/compute.go
4297 // ogleapis.com%2Fcpus/limits/%2Fproject%2Fregion/producerOverrides/4a3f2c1d`
4298 Name string `json:"name,omitempty"`
4299 // OverrideValue: The overriding quota limit value. Can be any nonnegative
4300 // integer, or -1 (unlimited quota).
4301 OverrideValue int64 `json:"overrideValue,omitempty,string"`
4302 // Unit: The limit unit of the limit to which this override applies. An example
4303 // unit would be: `1/{project}/{region}` Note that `{project}` and `{region}`
4304 // are not placeholders in this example; the literal characters `{` and `}`
4305 // occur in the string.
4306 Unit string `json:"unit,omitempty"`
4307 // ForceSendFields is a list of field names (e.g. "AdminOverrideAncestor") to
4308 // unconditionally include in API requests. By default, fields with empty or
4309 // default values are omitted from API requests. See
4310 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4311 // details.
4312 ForceSendFields []string `json:"-"`
4313 // NullFields is a list of field names (e.g. "AdminOverrideAncestor") to
4314 // include in API requests with the JSON null value. By default, fields with
4315 // empty values are omitted from API requests. See
4316 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4317 NullFields []string `json:"-"`
4318 }
4319
4320 func (s V1Beta1QuotaOverride) MarshalJSON() ([]byte, error) {
4321 type NoMethod V1Beta1QuotaOverride
4322 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4323 }
4324
4325 // V1Beta1RefreshConsumerResponse: Response message for the `RefreshConsumer`
4326 // method. This response message is assigned to the `response` field of the
4327 // returned Operation when that operation is done.
4328 type V1Beta1RefreshConsumerResponse struct {
4329 }
4330
4331 // V1Beta1ServiceIdentity: A service identity in the Identity and Access
4332 // Management API.
4333 type V1Beta1ServiceIdentity struct {
4334 // Email: The email address of the service identity.
4335 Email string `json:"email,omitempty"`
4336 // Name: P4 service identity resource name. An example name would be:
4337 // `services/serviceconsumermanagement.googleapis.com/projects/123/serviceIdenti
4338 // ties/default`
4339 Name string `json:"name,omitempty"`
4340 // ProjectRole: The project-level IAM role defined in the service agent's grant
4341 // configuration. This is the standard role intended for this service agent.
4342 // This field is populated regardless of the `skip_role_attach` option in the
4343 // request. If `skip_role_attach` is true, the caller can use this value to
4344 // know which role they are responsible for granting.
4345 ProjectRole string `json:"projectRole,omitempty"`
4346 // Tag: The P4 service identity configuration tag. This must be defined in
4347 // activation_grants. If not specified when creating the account, the tag is
4348 // set to "default".
4349 Tag string `json:"tag,omitempty"`
4350 // UniqueId: The unique and stable id of the service identity.
4351 UniqueId string `json:"uniqueId,omitempty"`
4352 // ForceSendFields is a list of field names (e.g. "Email") to unconditionally
4353 // include in API requests. By default, fields with empty or default values are
4354 // omitted from API requests. See
4355 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4356 // details.
4357 ForceSendFields []string `json:"-"`
4358 // NullFields is a list of field names (e.g. "Email") to include in API
4359 // requests with the JSON null value. By default, fields with empty values are
4360 // omitted from API requests. See
4361 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4362 NullFields []string `json:"-"`
4363 }
4364
4365 func (s V1Beta1ServiceIdentity) MarshalJSON() ([]byte, error) {
4366 type NoMethod V1Beta1ServiceIdentity
4367 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4368 }
4369
4370 // V1DefaultIdentity: A default identity in the Identity and Access Management
4371 // API.
4372 type V1DefaultIdentity struct {
4373 // Email: The email address of the default identity. Calling
4374 // GenerateDefaultIdentity with a deleted or purged default identity should
4375 // expect [email protected] placeholder
4376 // email.
4377 Email string `json:"email,omitempty"`
4378 // Name: Default identity resource name. An example name would be:
4379 // `services/serviceconsumermanagement.googleapis.com/projects/123/defaultIdenti
4380 // ty`
4381 Name string `json:"name,omitempty"`
4382 // Tag: The Default Identity tag. If specified when creating the account, the
4383 // tag must be present in activation_grants. If not specified when creating the
4384 // account, the tag is set to the tag specified in activation_grants.
4385 Tag string `json:"tag,omitempty"`
4386 // UniqueId: The unique and stable id of the default identity.
4387 UniqueId string `json:"uniqueId,omitempty"`
4388 // ForceSendFields is a list of field names (e.g. "Email") to unconditionally
4389 // include in API requests. By default, fields with empty or default values are
4390 // omitted from API requests. See
4391 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4392 // details.
4393 ForceSendFields []string `json:"-"`
4394 // NullFields is a list of field names (e.g. "Email") to include in API
4395 // requests with the JSON null value. By default, fields with empty values are
4396 // omitted from API requests. See
4397 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4398 NullFields []string `json:"-"`
4399 }
4400
4401 func (s V1DefaultIdentity) MarshalJSON() ([]byte, error) {
4402 type NoMethod V1DefaultIdentity
4403 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4404 }
4405
4406 // V1DisableConsumerResponse: Response message for the `DisableConsumer`
4407 // method. This response message is assigned to the `response` field of the
4408 // returned Operation when that operation is done.
4409 type V1DisableConsumerResponse struct {
4410 }
4411
4412 // V1EnableConsumerResponse: Response message for the `EnableConsumer` method.
4413 // This response message is assigned to the `response` field of the returned
4414 // Operation when that operation is done.
4415 type V1EnableConsumerResponse struct {
4416 }
4417
4418 // V1GenerateDefaultIdentityResponse: Response message for the
4419 // `GenerateDefaultIdentity` method. This response message is assigned to the
4420 // `response` field of the returned Operation when that operation is done.
4421 type V1GenerateDefaultIdentityResponse struct {
4422 // AttachStatus: Status of the role attachment. Under development
4423 // (go/si-attach-role), currently always return ATTACH_STATUS_UNSPECIFIED)
4424 //
4425 // Possible values:
4426 // "ATTACH_STATUS_UNSPECIFIED" - Indicates that the AttachStatus was not set.
4427 // "ATTACHED" - The default identity was attached to a role successfully in
4428 // this request.
4429 // "ATTACH_SKIPPED" - The request specified that no attempt should be made to
4430 // attach the role.
4431 // "PREVIOUSLY_ATTACHED" - Role was attached to the consumer project at some
4432 // point in time. Tenant manager doesn't make assertion about the current state
4433 // of the identity with respect to the consumer. Role attachment should happen
4434 // only once after activation and cannot be reattached after customer removes
4435 // it. (go/si-attach-role)
4436 // "ATTACH_DENIED_BY_ORG_POLICY" - Role attachment was denied in this request
4437 // by customer set org policy. (go/si-attach-role)
4438 AttachStatus string `json:"attachStatus,omitempty"`
4439 // Identity: DefaultIdentity that was created or retrieved.
4440 Identity *V1DefaultIdentity `json:"identity,omitempty"`
4441 // Role: Role attached to consumer project. Empty if not attached in this
4442 // request. (Under development, currently always return empty.)
4443 Role string `json:"role,omitempty"`
4444 // ForceSendFields is a list of field names (e.g. "AttachStatus") to
4445 // unconditionally include in API requests. By default, fields with empty or
4446 // default values are omitted from API requests. See
4447 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4448 // details.
4449 ForceSendFields []string `json:"-"`
4450 // NullFields is a list of field names (e.g. "AttachStatus") to include in API
4451 // requests with the JSON null value. By default, fields with empty values are
4452 // omitted from API requests. See
4453 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4454 NullFields []string `json:"-"`
4455 }
4456
4457 func (s V1GenerateDefaultIdentityResponse) MarshalJSON() ([]byte, error) {
4458 type NoMethod V1GenerateDefaultIdentityResponse
4459 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4460 }
4461
4462 // V1GenerateServiceAccountResponse: Response message for the
4463 // `GenerateServiceAccount` method. This response message is assigned to the
4464 // `response` field of the returned Operation when that operation is done.
4465 type V1GenerateServiceAccountResponse struct {
4466 // Account: ServiceAccount that was created or retrieved.
4467 Account *V1ServiceAccount `json:"account,omitempty"`
4468 // ForceSendFields is a list of field names (e.g. "Account") to unconditionally
4469 // include in API requests. By default, fields with empty or default values are
4470 // omitted from API requests. See
4471 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4472 // details.
4473 ForceSendFields []string `json:"-"`
4474 // NullFields is a list of field names (e.g. "Account") to include in API
4475 // requests with the JSON null value. By default, fields with empty values are
4476 // omitted from API requests. See
4477 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4478 NullFields []string `json:"-"`
4479 }
4480
4481 func (s V1GenerateServiceAccountResponse) MarshalJSON() ([]byte, error) {
4482 type NoMethod V1GenerateServiceAccountResponse
4483 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4484 }
4485
4486 // V1RefreshConsumerResponse: Response message for the `RefreshConsumer`
4487 // method. This response message is assigned to the `response` field of the
4488 // returned Operation when that operation is done.
4489 type V1RefreshConsumerResponse struct {
4490 }
4491
4492 // V1RemoveVisibilityLabelsResponse: Response message for the
4493 // `RemoveVisibilityLabels` method. This response message is assigned to the
4494 // `response` field of the returned Operation when that operation is done.
4495 type V1RemoveVisibilityLabelsResponse struct {
4496 // Labels: The updated set of visibility labels for this consumer on this
4497 // service.
4498 Labels []string `json:"labels,omitempty"`
4499 // ForceSendFields is a list of field names (e.g. "Labels") to unconditionally
4500 // include in API requests. By default, fields with empty or default values are
4501 // omitted from API requests. See
4502 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4503 // details.
4504 ForceSendFields []string `json:"-"`
4505 // NullFields is a list of field names (e.g. "Labels") to include in API
4506 // requests with the JSON null value. By default, fields with empty values are
4507 // omitted from API requests. See
4508 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4509 NullFields []string `json:"-"`
4510 }
4511
4512 func (s V1RemoveVisibilityLabelsResponse) MarshalJSON() ([]byte, error) {
4513 type NoMethod V1RemoveVisibilityLabelsResponse
4514 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4515 }
4516
4517 // V1ServiceAccount: A service account in the Identity and Access Management
4518 // API.
4519 type V1ServiceAccount struct {
4520 // Email: The email address of the service account.
4521 Email string `json:"email,omitempty"`
4522 // IamAccountName: Deprecated. See b/136209818.
4523 IamAccountName string `json:"iamAccountName,omitempty"`
4524 // Name: P4 SA resource name. An example name would be:
4525 // `services/serviceconsumermanagement.googleapis.com/projects/123/serviceAccoun
4526 // ts/default`
4527 Name string `json:"name,omitempty"`
4528 // Tag: The P4 SA configuration tag. This must be defined in activation_grants.
4529 // If not specified when creating the account, the tag is set to "default".
4530 Tag string `json:"tag,omitempty"`
4531 // UniqueId: The unique and stable id of the service account.
4532 UniqueId string `json:"uniqueId,omitempty"`
4533 // ForceSendFields is a list of field names (e.g. "Email") to unconditionally
4534 // include in API requests. By default, fields with empty or default values are
4535 // omitted from API requests. See
4536 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4537 // details.
4538 ForceSendFields []string `json:"-"`
4539 // NullFields is a list of field names (e.g. "Email") to include in API
4540 // requests with the JSON null value. By default, fields with empty values are
4541 // omitted from API requests. See
4542 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4543 NullFields []string `json:"-"`
4544 }
4545
4546 func (s V1ServiceAccount) MarshalJSON() ([]byte, error) {
4547 type NoMethod V1ServiceAccount
4548 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4549 }
4550
4551 type OperationsCancelCall struct {
4552 s *APIService
4553 name string
4554 canceloperationrequest *CancelOperationRequest
4555 urlParams_ gensupport.URLParams
4556 ctx_ context.Context
4557 header_ http.Header
4558 }
4559
4560 // Cancel: Starts asynchronous cancellation on a long-running operation. The
4561 // server makes a best effort to cancel the operation, but success is not
4562 // guaranteed. If the server doesn't support this method, it returns
4563 // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
4564 // other methods to check whether the cancellation succeeded or whether the
4565 // operation completed despite cancellation. On successful cancellation, the
4566 // operation is not deleted; instead, it becomes an operation with an
4567 // Operation.error value with a google.rpc.Status.code of `1`, corresponding to
4568 // `Code.CANCELLED`.
4569 //
4570 // - name: The name of the operation resource to be cancelled.
4571 func (r *OperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *OperationsCancelCall {
4572 c := &OperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4573 c.name = name
4574 c.canceloperationrequest = canceloperationrequest
4575 return c
4576 }
4577
4578 // Fields allows partial responses to be retrieved. See
4579 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4580 // details.
4581 func (c *OperationsCancelCall) Fields(s ...googleapi.Field) *OperationsCancelCall {
4582 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4583 return c
4584 }
4585
4586 // Context sets the context to be used in this call's Do method.
4587 func (c *OperationsCancelCall) Context(ctx context.Context) *OperationsCancelCall {
4588 c.ctx_ = ctx
4589 return c
4590 }
4591
4592 // Header returns a http.Header that can be modified by the caller to add
4593 // headers to the request.
4594 func (c *OperationsCancelCall) Header() http.Header {
4595 if c.header_ == nil {
4596 c.header_ = make(http.Header)
4597 }
4598 return c.header_
4599 }
4600
4601 func (c *OperationsCancelCall) doRequest(alt string) (*http.Response, error) {
4602 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4603 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.canceloperationrequest)
4604 if err != nil {
4605 return nil, err
4606 }
4607 c.urlParams_.Set("alt", alt)
4608 c.urlParams_.Set("prettyPrint", "false")
4609 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
4610 urls += "?" + c.urlParams_.Encode()
4611 req, err := http.NewRequest("POST", urls, body)
4612 if err != nil {
4613 return nil, err
4614 }
4615 req.Header = reqHeaders
4616 googleapi.Expand(req.URL, map[string]string{
4617 "name": c.name,
4618 })
4619 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "serviceconsumermanagement.operations.cancel", "request", internallog.HTTPRequest(req, body.Bytes()))
4620 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4621 }
4622
4623 // Do executes the "serviceconsumermanagement.operations.cancel" call.
4624 // Any non-2xx status code is an error. Response headers are in either
4625 // *Empty.ServerResponse.Header or (if a response was returned at all) in
4626 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4627 // whether the returned error was because http.StatusNotModified was returned.
4628 func (c *OperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
4629 gensupport.SetOptions(c.urlParams_, opts...)
4630 res, err := c.doRequest("json")
4631 if res != nil && res.StatusCode == http.StatusNotModified {
4632 if res.Body != nil {
4633 res.Body.Close()
4634 }
4635 return nil, gensupport.WrapError(&googleapi.Error{
4636 Code: res.StatusCode,
4637 Header: res.Header,
4638 })
4639 }
4640 if err != nil {
4641 return nil, err
4642 }
4643 defer googleapi.CloseBody(res)
4644 if err := googleapi.CheckResponse(res); err != nil {
4645 return nil, gensupport.WrapError(err)
4646 }
4647 ret := &Empty{
4648 ServerResponse: googleapi.ServerResponse{
4649 Header: res.Header,
4650 HTTPStatusCode: res.StatusCode,
4651 },
4652 }
4653 target := &ret
4654 b, err := gensupport.DecodeResponseBytes(target, res)
4655 if err != nil {
4656 return nil, err
4657 }
4658 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "serviceconsumermanagement.operations.cancel", "response", internallog.HTTPResponse(res, b))
4659 return ret, nil
4660 }
4661
4662 type OperationsDeleteCall struct {
4663 s *APIService
4664 name string
4665 urlParams_ gensupport.URLParams
4666 ctx_ context.Context
4667 header_ http.Header
4668 }
4669
4670 // Delete: Deletes a long-running operation. This method indicates that the
4671 // client is no longer interested in the operation result. It does not cancel
4672 // the operation. If the server doesn't support this method, it returns
4673 // `google.rpc.Code.UNIMPLEMENTED`.
4674 //
4675 // - name: The name of the operation resource to be deleted.
4676 func (r *OperationsService) Delete(name string) *OperationsDeleteCall {
4677 c := &OperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4678 c.name = name
4679 return c
4680 }
4681
4682 // Fields allows partial responses to be retrieved. See
4683 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4684 // details.
4685 func (c *OperationsDeleteCall) Fields(s ...googleapi.Field) *OperationsDeleteCall {
4686 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4687 return c
4688 }
4689
4690 // Context sets the context to be used in this call's Do method.
4691 func (c *OperationsDeleteCall) Context(ctx context.Context) *OperationsDeleteCall {
4692 c.ctx_ = ctx
4693 return c
4694 }
4695
4696 // Header returns a http.Header that can be modified by the caller to add
4697 // headers to the request.
4698 func (c *OperationsDeleteCall) Header() http.Header {
4699 if c.header_ == nil {
4700 c.header_ = make(http.Header)
4701 }
4702 return c.header_
4703 }
4704
4705 func (c *OperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
4706 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4707 c.urlParams_.Set("alt", alt)
4708 c.urlParams_.Set("prettyPrint", "false")
4709 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4710 urls += "?" + c.urlParams_.Encode()
4711 req, err := http.NewRequest("DELETE", urls, nil)
4712 if err != nil {
4713 return nil, err
4714 }
4715 req.Header = reqHeaders
4716 googleapi.Expand(req.URL, map[string]string{
4717 "name": c.name,
4718 })
4719 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "serviceconsumermanagement.operations.delete", "request", internallog.HTTPRequest(req, nil))
4720 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4721 }
4722
4723 // Do executes the "serviceconsumermanagement.operations.delete" call.
4724 // Any non-2xx status code is an error. Response headers are in either
4725 // *Empty.ServerResponse.Header or (if a response was returned at all) in
4726 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4727 // whether the returned error was because http.StatusNotModified was returned.
4728 func (c *OperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
4729 gensupport.SetOptions(c.urlParams_, opts...)
4730 res, err := c.doRequest("json")
4731 if res != nil && res.StatusCode == http.StatusNotModified {
4732 if res.Body != nil {
4733 res.Body.Close()
4734 }
4735 return nil, gensupport.WrapError(&googleapi.Error{
4736 Code: res.StatusCode,
4737 Header: res.Header,
4738 })
4739 }
4740 if err != nil {
4741 return nil, err
4742 }
4743 defer googleapi.CloseBody(res)
4744 if err := googleapi.CheckResponse(res); err != nil {
4745 return nil, gensupport.WrapError(err)
4746 }
4747 ret := &Empty{
4748 ServerResponse: googleapi.ServerResponse{
4749 Header: res.Header,
4750 HTTPStatusCode: res.StatusCode,
4751 },
4752 }
4753 target := &ret
4754 b, err := gensupport.DecodeResponseBytes(target, res)
4755 if err != nil {
4756 return nil, err
4757 }
4758 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "serviceconsumermanagement.operations.delete", "response", internallog.HTTPResponse(res, b))
4759 return ret, nil
4760 }
4761
4762 type OperationsGetCall struct {
4763 s *APIService
4764 name string
4765 urlParams_ gensupport.URLParams
4766 ifNoneMatch_ string
4767 ctx_ context.Context
4768 header_ http.Header
4769 }
4770
4771 // Get: Gets the latest state of a long-running operation. Clients can use this
4772 // method to poll the operation result at intervals as recommended by the API
4773 // service.
4774 //
4775 // - name: The name of the operation resource.
4776 func (r *OperationsService) Get(name string) *OperationsGetCall {
4777 c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4778 c.name = name
4779 return c
4780 }
4781
4782 // Fields allows partial responses to be retrieved. See
4783 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4784 // details.
4785 func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall {
4786 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4787 return c
4788 }
4789
4790 // IfNoneMatch sets an optional parameter which makes the operation fail if the
4791 // object's ETag matches the given value. This is useful for getting updates
4792 // only after the object has changed since the last request.
4793 func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall {
4794 c.ifNoneMatch_ = entityTag
4795 return c
4796 }
4797
4798 // Context sets the context to be used in this call's Do method.
4799 func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall {
4800 c.ctx_ = ctx
4801 return c
4802 }
4803
4804 // Header returns a http.Header that can be modified by the caller to add
4805 // headers to the request.
4806 func (c *OperationsGetCall) Header() http.Header {
4807 if c.header_ == nil {
4808 c.header_ = make(http.Header)
4809 }
4810 return c.header_
4811 }
4812
4813 func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) {
4814 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4815 if c.ifNoneMatch_ != "" {
4816 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4817 }
4818 c.urlParams_.Set("alt", alt)
4819 c.urlParams_.Set("prettyPrint", "false")
4820 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4821 urls += "?" + c.urlParams_.Encode()
4822 req, err := http.NewRequest("GET", urls, nil)
4823 if err != nil {
4824 return nil, err
4825 }
4826 req.Header = reqHeaders
4827 googleapi.Expand(req.URL, map[string]string{
4828 "name": c.name,
4829 })
4830 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "serviceconsumermanagement.operations.get", "request", internallog.HTTPRequest(req, nil))
4831 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4832 }
4833
4834 // Do executes the "serviceconsumermanagement.operations.get" call.
4835 // Any non-2xx status code is an error. Response headers are in either
4836 // *Operation.ServerResponse.Header or (if a response was returned at all) in
4837 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4838 // whether the returned error was because http.StatusNotModified was returned.
4839 func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4840 gensupport.SetOptions(c.urlParams_, opts...)
4841 res, err := c.doRequest("json")
4842 if res != nil && res.StatusCode == http.StatusNotModified {
4843 if res.Body != nil {
4844 res.Body.Close()
4845 }
4846 return nil, gensupport.WrapError(&googleapi.Error{
4847 Code: res.StatusCode,
4848 Header: res.Header,
4849 })
4850 }
4851 if err != nil {
4852 return nil, err
4853 }
4854 defer googleapi.CloseBody(res)
4855 if err := googleapi.CheckResponse(res); err != nil {
4856 return nil, gensupport.WrapError(err)
4857 }
4858 ret := &Operation{
4859 ServerResponse: googleapi.ServerResponse{
4860 Header: res.Header,
4861 HTTPStatusCode: res.StatusCode,
4862 },
4863 }
4864 target := &ret
4865 b, err := gensupport.DecodeResponseBytes(target, res)
4866 if err != nil {
4867 return nil, err
4868 }
4869 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "serviceconsumermanagement.operations.get", "response", internallog.HTTPResponse(res, b))
4870 return ret, nil
4871 }
4872
4873 type OperationsListCall struct {
4874 s *APIService
4875 name string
4876 urlParams_ gensupport.URLParams
4877 ifNoneMatch_ string
4878 ctx_ context.Context
4879 header_ http.Header
4880 }
4881
4882 // List: Lists operations that match the specified filter in the request. If
4883 // the server doesn't support this method, it returns `UNIMPLEMENTED`.
4884 //
4885 // - name: The name of the operation's parent resource.
4886 func (r *OperationsService) List(name string) *OperationsListCall {
4887 c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4888 c.name = name
4889 return c
4890 }
4891
4892 // Filter sets the optional parameter "filter": The standard list filter.
4893 func (c *OperationsListCall) Filter(filter string) *OperationsListCall {
4894 c.urlParams_.Set("filter", filter)
4895 return c
4896 }
4897
4898 // PageSize sets the optional parameter "pageSize": The standard list page
4899 // size.
4900 func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall {
4901 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4902 return c
4903 }
4904
4905 // PageToken sets the optional parameter "pageToken": The standard list page
4906 // token.
4907 func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall {
4908 c.urlParams_.Set("pageToken", pageToken)
4909 return c
4910 }
4911
4912 // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess":
4913 // When set to `true`, operations that are reachable are returned as normal,
4914 // and those that are unreachable are returned in the
4915 // ListOperationsResponse.unreachable field. This can only be `true` when
4916 // reading across collections. For example, when `parent` is set to
4917 // "projects/example/locations/-". This field is not supported by default and
4918 // will result in an `UNIMPLEMENTED` error if set unless explicitly documented
4919 // otherwise in service or product specific documentation.
4920 func (c *OperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *OperationsListCall {
4921 c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess))
4922 return c
4923 }
4924
4925 // Fields allows partial responses to be retrieved. See
4926 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4927 // details.
4928 func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall {
4929 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4930 return c
4931 }
4932
4933 // IfNoneMatch sets an optional parameter which makes the operation fail if the
4934 // object's ETag matches the given value. This is useful for getting updates
4935 // only after the object has changed since the last request.
4936 func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall {
4937 c.ifNoneMatch_ = entityTag
4938 return c
4939 }
4940
4941 // Context sets the context to be used in this call's Do method.
4942 func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall {
4943 c.ctx_ = ctx
4944 return c
4945 }
4946
4947 // Header returns a http.Header that can be modified by the caller to add
4948 // headers to the request.
4949 func (c *OperationsListCall) Header() http.Header {
4950 if c.header_ == nil {
4951 c.header_ = make(http.Header)
4952 }
4953 return c.header_
4954 }
4955
4956 func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) {
4957 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4958 if c.ifNoneMatch_ != "" {
4959 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4960 }
4961 c.urlParams_.Set("alt", alt)
4962 c.urlParams_.Set("prettyPrint", "false")
4963 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4964 urls += "?" + c.urlParams_.Encode()
4965 req, err := http.NewRequest("GET", urls, nil)
4966 if err != nil {
4967 return nil, err
4968 }
4969 req.Header = reqHeaders
4970 googleapi.Expand(req.URL, map[string]string{
4971 "name": c.name,
4972 })
4973 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "serviceconsumermanagement.operations.list", "request", internallog.HTTPRequest(req, nil))
4974 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4975 }
4976
4977 // Do executes the "serviceconsumermanagement.operations.list" call.
4978 // Any non-2xx status code is an error. Response headers are in either
4979 // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
4980 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4981 // check whether the returned error was because http.StatusNotModified was
4982 // returned.
4983 func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
4984 gensupport.SetOptions(c.urlParams_, opts...)
4985 res, err := c.doRequest("json")
4986 if res != nil && res.StatusCode == http.StatusNotModified {
4987 if res.Body != nil {
4988 res.Body.Close()
4989 }
4990 return nil, gensupport.WrapError(&googleapi.Error{
4991 Code: res.StatusCode,
4992 Header: res.Header,
4993 })
4994 }
4995 if err != nil {
4996 return nil, err
4997 }
4998 defer googleapi.CloseBody(res)
4999 if err := googleapi.CheckResponse(res); err != nil {
5000 return nil, gensupport.WrapError(err)
5001 }
5002 ret := &ListOperationsResponse{
5003 ServerResponse: googleapi.ServerResponse{
5004 Header: res.Header,
5005 HTTPStatusCode: res.StatusCode,
5006 },
5007 }
5008 target := &ret
5009 b, err := gensupport.DecodeResponseBytes(target, res)
5010 if err != nil {
5011 return nil, err
5012 }
5013 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "serviceconsumermanagement.operations.list", "response", internallog.HTTPResponse(res, b))
5014 return ret, nil
5015 }
5016
5017 // Pages invokes f for each page of results.
5018 // A non-nil error returned from f will halt the iteration.
5019 // The provided context supersedes any context provided to the Context method.
5020 func (c *OperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
5021 c.ctx_ = ctx
5022 defer c.PageToken(c.urlParams_.Get("pageToken"))
5023 for {
5024 x, err := c.Do()
5025 if err != nil {
5026 return err
5027 }
5028 if err := f(x); err != nil {
5029 return err
5030 }
5031 if x.NextPageToken == "" {
5032 return nil
5033 }
5034 c.PageToken(x.NextPageToken)
5035 }
5036 }
5037
5038 type ServicesSearchCall struct {
5039 s *APIService
5040 parent string
5041 urlParams_ gensupport.URLParams
5042 ifNoneMatch_ string
5043 ctx_ context.Context
5044 header_ http.Header
5045 }
5046
5047 // Search: Search tenancy units for a managed service.
5048 //
5049 // - parent: Service for which search is performed. services/{service}
5050 // {service} the name of a service, for example 'service.googleapis.com'.
5051 func (r *ServicesService) Search(parent string) *ServicesSearchCall {
5052 c := &ServicesSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5053 c.parent = parent
5054 return c
5055 }
5056
5057 // PageSize sets the optional parameter "pageSize": The maximum number of
5058 // results returned by this request. Currently, the default maximum is set to
5059 // 256. If `page_size` <= 256, the request proceeds. Else, the request fails
5060 // with an `TU_INVALID_PAGE_SIZE` error.
5061 func (c *ServicesSearchCall) PageSize(pageSize int64) *ServicesSearchCall {
5062 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5063 return c
5064 }
5065
5066 // PageToken sets the optional parameter "pageToken": The continuation token,
5067 // which is used to page through large result sets. To get the next page of
5068 // results, set this parameter to the value of `nextPageToken` from the
5069 // previous response.
5070 func (c *ServicesSearchCall) PageToken(pageToken string) *ServicesSearchCall {
5071 c.urlParams_.Set("pageToken", pageToken)
5072 return c
5073 }
5074
5075 // Query sets the optional parameter "query": Set a query `{expression}` for
5076 // querying tenancy units. Your `{expression}` must be in the format:
5077 // `field_name=literal_string`. The `field_name` is the name of the field you
5078 // want to compare. Supported fields are `tenant_resources.tag` and
5079 // `tenant_resources.resource`. For example, to search tenancy units that
5080 // contain at least one tenant resource with a given tag 'xyz', use the query
5081 // `tenant_resources.tag=xyz`. To search tenancy units that contain at least
5082 // one tenant resource with a given resource name 'projects/123456', use the
5083 // query `tenant_resources.resource=projects/123456`. Multiple expressions can
5084 // be joined with `AND`s. Tenancy units must match all expressions to be
5085 // included in the result set. For example, `tenant_resources.tag=xyz AND
5086 // tenant_resources.resource=projects/123456`
5087 func (c *ServicesSearchCall) Query(query string) *ServicesSearchCall {
5088 c.urlParams_.Set("query", query)
5089 return c
5090 }
5091
5092 // Fields allows partial responses to be retrieved. See
5093 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5094 // details.
5095 func (c *ServicesSearchCall) Fields(s ...googleapi.Field) *ServicesSearchCall {
5096 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5097 return c
5098 }
5099
5100 // IfNoneMatch sets an optional parameter which makes the operation fail if the
5101 // object's ETag matches the given value. This is useful for getting updates
5102 // only after the object has changed since the last request.
5103 func (c *ServicesSearchCall) IfNoneMatch(entityTag string) *ServicesSearchCall {
5104 c.ifNoneMatch_ = entityTag
5105 return c
5106 }
5107
5108 // Context sets the context to be used in this call's Do method.
5109 func (c *ServicesSearchCall) Context(ctx context.Context) *ServicesSearchCall {
5110 c.ctx_ = ctx
5111 return c
5112 }
5113
5114 // Header returns a http.Header that can be modified by the caller to add
5115 // headers to the request.
5116 func (c *ServicesSearchCall) Header() http.Header {
5117 if c.header_ == nil {
5118 c.header_ = make(http.Header)
5119 }
5120 return c.header_
5121 }
5122
5123 func (c *ServicesSearchCall) doRequest(alt string) (*http.Response, error) {
5124 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5125 if c.ifNoneMatch_ != "" {
5126 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5127 }
5128 c.urlParams_.Set("alt", alt)
5129 c.urlParams_.Set("prettyPrint", "false")
5130 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:search")
5131 urls += "?" + c.urlParams_.Encode()
5132 req, err := http.NewRequest("GET", urls, nil)
5133 if err != nil {
5134 return nil, err
5135 }
5136 req.Header = reqHeaders
5137 googleapi.Expand(req.URL, map[string]string{
5138 "parent": c.parent,
5139 })
5140 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.search", "request", internallog.HTTPRequest(req, nil))
5141 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5142 }
5143
5144 // Do executes the "serviceconsumermanagement.services.search" call.
5145 // Any non-2xx status code is an error. Response headers are in either
5146 // *SearchTenancyUnitsResponse.ServerResponse.Header or (if a response was
5147 // returned at all) in error.(*googleapi.Error).Header. Use
5148 // googleapi.IsNotModified to check whether the returned error was because
5149 // http.StatusNotModified was returned.
5150 func (c *ServicesSearchCall) Do(opts ...googleapi.CallOption) (*SearchTenancyUnitsResponse, error) {
5151 gensupport.SetOptions(c.urlParams_, opts...)
5152 res, err := c.doRequest("json")
5153 if res != nil && res.StatusCode == http.StatusNotModified {
5154 if res.Body != nil {
5155 res.Body.Close()
5156 }
5157 return nil, gensupport.WrapError(&googleapi.Error{
5158 Code: res.StatusCode,
5159 Header: res.Header,
5160 })
5161 }
5162 if err != nil {
5163 return nil, err
5164 }
5165 defer googleapi.CloseBody(res)
5166 if err := googleapi.CheckResponse(res); err != nil {
5167 return nil, gensupport.WrapError(err)
5168 }
5169 ret := &SearchTenancyUnitsResponse{
5170 ServerResponse: googleapi.ServerResponse{
5171 Header: res.Header,
5172 HTTPStatusCode: res.StatusCode,
5173 },
5174 }
5175 target := &ret
5176 b, err := gensupport.DecodeResponseBytes(target, res)
5177 if err != nil {
5178 return nil, err
5179 }
5180 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.search", "response", internallog.HTTPResponse(res, b))
5181 return ret, nil
5182 }
5183
5184 // Pages invokes f for each page of results.
5185 // A non-nil error returned from f will halt the iteration.
5186 // The provided context supersedes any context provided to the Context method.
5187 func (c *ServicesSearchCall) Pages(ctx context.Context, f func(*SearchTenancyUnitsResponse) error) error {
5188 c.ctx_ = ctx
5189 defer c.PageToken(c.urlParams_.Get("pageToken"))
5190 for {
5191 x, err := c.Do()
5192 if err != nil {
5193 return err
5194 }
5195 if err := f(x); err != nil {
5196 return err
5197 }
5198 if x.NextPageToken == "" {
5199 return nil
5200 }
5201 c.PageToken(x.NextPageToken)
5202 }
5203 }
5204
5205 type ServicesTenancyUnitsAddProjectCall struct {
5206 s *APIService
5207 parent string
5208 addtenantprojectrequest *AddTenantProjectRequest
5209 urlParams_ gensupport.URLParams
5210 ctx_ context.Context
5211 header_ http.Header
5212 }
5213
5214 // AddProject: Add a new tenant project to the tenancy unit. There can be a
5215 // maximum of 1024 tenant projects in a tenancy unit. If there are previously
5216 // failed `AddTenantProject` calls, you might need to call
5217 // `RemoveTenantProject` first to resolve them before you can make another call
5218 // to `AddTenantProject` with the same tag. Operation.
5219 //
5220 // - parent: Name of the tenancy unit. Such as
5221 // 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'.
5222 func (r *ServicesTenancyUnitsService) AddProject(parent string, addtenantprojectrequest *AddTenantProjectRequest) *ServicesTenancyUnitsAddProjectCall {
5223 c := &ServicesTenancyUnitsAddProjectCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5224 c.parent = parent
5225 c.addtenantprojectrequest = addtenantprojectrequest
5226 return c
5227 }
5228
5229 // Fields allows partial responses to be retrieved. See
5230 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5231 // details.
5232 func (c *ServicesTenancyUnitsAddProjectCall) Fields(s ...googleapi.Field) *ServicesTenancyUnitsAddProjectCall {
5233 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5234 return c
5235 }
5236
5237 // Context sets the context to be used in this call's Do method.
5238 func (c *ServicesTenancyUnitsAddProjectCall) Context(ctx context.Context) *ServicesTenancyUnitsAddProjectCall {
5239 c.ctx_ = ctx
5240 return c
5241 }
5242
5243 // Header returns a http.Header that can be modified by the caller to add
5244 // headers to the request.
5245 func (c *ServicesTenancyUnitsAddProjectCall) Header() http.Header {
5246 if c.header_ == nil {
5247 c.header_ = make(http.Header)
5248 }
5249 return c.header_
5250 }
5251
5252 func (c *ServicesTenancyUnitsAddProjectCall) doRequest(alt string) (*http.Response, error) {
5253 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5254 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.addtenantprojectrequest)
5255 if err != nil {
5256 return nil, err
5257 }
5258 c.urlParams_.Set("alt", alt)
5259 c.urlParams_.Set("prettyPrint", "false")
5260 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:addProject")
5261 urls += "?" + c.urlParams_.Encode()
5262 req, err := http.NewRequest("POST", urls, body)
5263 if err != nil {
5264 return nil, err
5265 }
5266 req.Header = reqHeaders
5267 googleapi.Expand(req.URL, map[string]string{
5268 "parent": c.parent,
5269 })
5270 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.tenancyUnits.addProject", "request", internallog.HTTPRequest(req, body.Bytes()))
5271 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5272 }
5273
5274 // Do executes the "serviceconsumermanagement.services.tenancyUnits.addProject" call.
5275 // Any non-2xx status code is an error. Response headers are in either
5276 // *Operation.ServerResponse.Header or (if a response was returned at all) in
5277 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
5278 // whether the returned error was because http.StatusNotModified was returned.
5279 func (c *ServicesTenancyUnitsAddProjectCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5280 gensupport.SetOptions(c.urlParams_, opts...)
5281 res, err := c.doRequest("json")
5282 if res != nil && res.StatusCode == http.StatusNotModified {
5283 if res.Body != nil {
5284 res.Body.Close()
5285 }
5286 return nil, gensupport.WrapError(&googleapi.Error{
5287 Code: res.StatusCode,
5288 Header: res.Header,
5289 })
5290 }
5291 if err != nil {
5292 return nil, err
5293 }
5294 defer googleapi.CloseBody(res)
5295 if err := googleapi.CheckResponse(res); err != nil {
5296 return nil, gensupport.WrapError(err)
5297 }
5298 ret := &Operation{
5299 ServerResponse: googleapi.ServerResponse{
5300 Header: res.Header,
5301 HTTPStatusCode: res.StatusCode,
5302 },
5303 }
5304 target := &ret
5305 b, err := gensupport.DecodeResponseBytes(target, res)
5306 if err != nil {
5307 return nil, err
5308 }
5309 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.tenancyUnits.addProject", "response", internallog.HTTPResponse(res, b))
5310 return ret, nil
5311 }
5312
5313 type ServicesTenancyUnitsApplyProjectConfigCall struct {
5314 s *APIService
5315 name string
5316 applytenantprojectconfigrequest *ApplyTenantProjectConfigRequest
5317 urlParams_ gensupport.URLParams
5318 ctx_ context.Context
5319 header_ http.Header
5320 }
5321
5322 // ApplyProjectConfig: Apply a configuration to an existing tenant project.
5323 // This project must exist in an active state and have the original owner
5324 // account. The caller must have permission to add a project to the given
5325 // tenancy unit. The configuration is applied, but any existing settings on the
5326 // project aren't modified. Specified policy bindings are applied. Existing
5327 // bindings aren't modified. Specified services are activated. No service is
5328 // deactivated. If specified, new billing configuration is applied. Omit a
5329 // billing configuration to keep the existing one. A service account in the
5330 // project is created if previously non existed. Specified labels will be
5331 // appended to tenant project, note that the value of existing label key will
5332 // be updated if the same label key is requested. The specified folder is
5333 // ignored, as moving a tenant project to a different folder isn't supported.
5334 // The operation fails if any of the steps fail, but no rollback of already
5335 // applied configuration changes is attempted. Operation.
5336 //
5337 // - name: Name of the tenancy unit. Such as
5338 // 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'.
5339 func (r *ServicesTenancyUnitsService) ApplyProjectConfig(name string, applytenantprojectconfigrequest *ApplyTenantProjectConfigRequest) *ServicesTenancyUnitsApplyProjectConfigCall {
5340 c := &ServicesTenancyUnitsApplyProjectConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5341 c.name = name
5342 c.applytenantprojectconfigrequest = applytenantprojectconfigrequest
5343 return c
5344 }
5345
5346 // Fields allows partial responses to be retrieved. See
5347 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5348 // details.
5349 func (c *ServicesTenancyUnitsApplyProjectConfigCall) Fields(s ...googleapi.Field) *ServicesTenancyUnitsApplyProjectConfigCall {
5350 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5351 return c
5352 }
5353
5354 // Context sets the context to be used in this call's Do method.
5355 func (c *ServicesTenancyUnitsApplyProjectConfigCall) Context(ctx context.Context) *ServicesTenancyUnitsApplyProjectConfigCall {
5356 c.ctx_ = ctx
5357 return c
5358 }
5359
5360 // Header returns a http.Header that can be modified by the caller to add
5361 // headers to the request.
5362 func (c *ServicesTenancyUnitsApplyProjectConfigCall) Header() http.Header {
5363 if c.header_ == nil {
5364 c.header_ = make(http.Header)
5365 }
5366 return c.header_
5367 }
5368
5369 func (c *ServicesTenancyUnitsApplyProjectConfigCall) doRequest(alt string) (*http.Response, error) {
5370 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5371 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.applytenantprojectconfigrequest)
5372 if err != nil {
5373 return nil, err
5374 }
5375 c.urlParams_.Set("alt", alt)
5376 c.urlParams_.Set("prettyPrint", "false")
5377 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:applyProjectConfig")
5378 urls += "?" + c.urlParams_.Encode()
5379 req, err := http.NewRequest("POST", urls, body)
5380 if err != nil {
5381 return nil, err
5382 }
5383 req.Header = reqHeaders
5384 googleapi.Expand(req.URL, map[string]string{
5385 "name": c.name,
5386 })
5387 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.tenancyUnits.applyProjectConfig", "request", internallog.HTTPRequest(req, body.Bytes()))
5388 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5389 }
5390
5391 // Do executes the "serviceconsumermanagement.services.tenancyUnits.applyProjectConfig" call.
5392 // Any non-2xx status code is an error. Response headers are in either
5393 // *Operation.ServerResponse.Header or (if a response was returned at all) in
5394 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
5395 // whether the returned error was because http.StatusNotModified was returned.
5396 func (c *ServicesTenancyUnitsApplyProjectConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5397 gensupport.SetOptions(c.urlParams_, opts...)
5398 res, err := c.doRequest("json")
5399 if res != nil && res.StatusCode == http.StatusNotModified {
5400 if res.Body != nil {
5401 res.Body.Close()
5402 }
5403 return nil, gensupport.WrapError(&googleapi.Error{
5404 Code: res.StatusCode,
5405 Header: res.Header,
5406 })
5407 }
5408 if err != nil {
5409 return nil, err
5410 }
5411 defer googleapi.CloseBody(res)
5412 if err := googleapi.CheckResponse(res); err != nil {
5413 return nil, gensupport.WrapError(err)
5414 }
5415 ret := &Operation{
5416 ServerResponse: googleapi.ServerResponse{
5417 Header: res.Header,
5418 HTTPStatusCode: res.StatusCode,
5419 },
5420 }
5421 target := &ret
5422 b, err := gensupport.DecodeResponseBytes(target, res)
5423 if err != nil {
5424 return nil, err
5425 }
5426 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.tenancyUnits.applyProjectConfig", "response", internallog.HTTPResponse(res, b))
5427 return ret, nil
5428 }
5429
5430 type ServicesTenancyUnitsAttachProjectCall struct {
5431 s *APIService
5432 name string
5433 attachtenantprojectrequest *AttachTenantProjectRequest
5434 urlParams_ gensupport.URLParams
5435 ctx_ context.Context
5436 header_ http.Header
5437 }
5438
5439 // AttachProject: Attach an existing project to the tenancy unit as a new
5440 // tenant resource. The project could either be the tenant project reserved by
5441 // calling `AddTenantProject` under a tenancy unit of a service producer's
5442 // project of a managed service, or from a separate project. The caller is
5443 // checked against a set of permissions as if calling `AddTenantProject` on the
5444 // same service consumer. To trigger the attachment, the targeted tenant
5445 // project must be in a folder. Make sure the ServiceConsumerManagement service
5446 // account is the owner of that project. These two requirements are already met
5447 // if the project is reserved by calling `AddTenantProject`. Operation.
5448 //
5449 // - name: Name of the tenancy unit that the project will be attached to. Such
5450 // as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'.
5451 func (r *ServicesTenancyUnitsService) AttachProject(name string, attachtenantprojectrequest *AttachTenantProjectRequest) *ServicesTenancyUnitsAttachProjectCall {
5452 c := &ServicesTenancyUnitsAttachProjectCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5453 c.name = name
5454 c.attachtenantprojectrequest = attachtenantprojectrequest
5455 return c
5456 }
5457
5458 // Fields allows partial responses to be retrieved. See
5459 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5460 // details.
5461 func (c *ServicesTenancyUnitsAttachProjectCall) Fields(s ...googleapi.Field) *ServicesTenancyUnitsAttachProjectCall {
5462 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5463 return c
5464 }
5465
5466 // Context sets the context to be used in this call's Do method.
5467 func (c *ServicesTenancyUnitsAttachProjectCall) Context(ctx context.Context) *ServicesTenancyUnitsAttachProjectCall {
5468 c.ctx_ = ctx
5469 return c
5470 }
5471
5472 // Header returns a http.Header that can be modified by the caller to add
5473 // headers to the request.
5474 func (c *ServicesTenancyUnitsAttachProjectCall) Header() http.Header {
5475 if c.header_ == nil {
5476 c.header_ = make(http.Header)
5477 }
5478 return c.header_
5479 }
5480
5481 func (c *ServicesTenancyUnitsAttachProjectCall) doRequest(alt string) (*http.Response, error) {
5482 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5483 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.attachtenantprojectrequest)
5484 if err != nil {
5485 return nil, err
5486 }
5487 c.urlParams_.Set("alt", alt)
5488 c.urlParams_.Set("prettyPrint", "false")
5489 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:attachProject")
5490 urls += "?" + c.urlParams_.Encode()
5491 req, err := http.NewRequest("POST", urls, body)
5492 if err != nil {
5493 return nil, err
5494 }
5495 req.Header = reqHeaders
5496 googleapi.Expand(req.URL, map[string]string{
5497 "name": c.name,
5498 })
5499 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.tenancyUnits.attachProject", "request", internallog.HTTPRequest(req, body.Bytes()))
5500 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5501 }
5502
5503 // Do executes the "serviceconsumermanagement.services.tenancyUnits.attachProject" call.
5504 // Any non-2xx status code is an error. Response headers are in either
5505 // *Operation.ServerResponse.Header or (if a response was returned at all) in
5506 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
5507 // whether the returned error was because http.StatusNotModified was returned.
5508 func (c *ServicesTenancyUnitsAttachProjectCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5509 gensupport.SetOptions(c.urlParams_, opts...)
5510 res, err := c.doRequest("json")
5511 if res != nil && res.StatusCode == http.StatusNotModified {
5512 if res.Body != nil {
5513 res.Body.Close()
5514 }
5515 return nil, gensupport.WrapError(&googleapi.Error{
5516 Code: res.StatusCode,
5517 Header: res.Header,
5518 })
5519 }
5520 if err != nil {
5521 return nil, err
5522 }
5523 defer googleapi.CloseBody(res)
5524 if err := googleapi.CheckResponse(res); err != nil {
5525 return nil, gensupport.WrapError(err)
5526 }
5527 ret := &Operation{
5528 ServerResponse: googleapi.ServerResponse{
5529 Header: res.Header,
5530 HTTPStatusCode: res.StatusCode,
5531 },
5532 }
5533 target := &ret
5534 b, err := gensupport.DecodeResponseBytes(target, res)
5535 if err != nil {
5536 return nil, err
5537 }
5538 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.tenancyUnits.attachProject", "response", internallog.HTTPResponse(res, b))
5539 return ret, nil
5540 }
5541
5542 type ServicesTenancyUnitsCreateCall struct {
5543 s *APIService
5544 parent string
5545 createtenancyunitrequest *CreateTenancyUnitRequest
5546 urlParams_ gensupport.URLParams
5547 ctx_ context.Context
5548 header_ http.Header
5549 }
5550
5551 // Create: Creates a tenancy unit with no tenant resources. If tenancy unit
5552 // already exists, it will be returned, however, in this case, returned
5553 // TenancyUnit does not have tenant_resources field set and ListTenancyUnits
5554 // has to be used to get a complete TenancyUnit with all fields populated.
5555 //
5556 // - parent: services/{service}/{collection id}/{resource id} {collection id}
5557 // is the cloud resource collection type representing the service consumer,
5558 // for example 'projects', or 'organizations'. {resource id} is the consumer
5559 // numeric id, such as project number: '123456'. {service} the name of a
5560 // managed service, such as 'service.googleapis.com'. Enables service binding
5561 // using the new tenancy unit.
5562 func (r *ServicesTenancyUnitsService) Create(parent string, createtenancyunitrequest *CreateTenancyUnitRequest) *ServicesTenancyUnitsCreateCall {
5563 c := &ServicesTenancyUnitsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5564 c.parent = parent
5565 c.createtenancyunitrequest = createtenancyunitrequest
5566 return c
5567 }
5568
5569 // Fields allows partial responses to be retrieved. See
5570 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5571 // details.
5572 func (c *ServicesTenancyUnitsCreateCall) Fields(s ...googleapi.Field) *ServicesTenancyUnitsCreateCall {
5573 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5574 return c
5575 }
5576
5577 // Context sets the context to be used in this call's Do method.
5578 func (c *ServicesTenancyUnitsCreateCall) Context(ctx context.Context) *ServicesTenancyUnitsCreateCall {
5579 c.ctx_ = ctx
5580 return c
5581 }
5582
5583 // Header returns a http.Header that can be modified by the caller to add
5584 // headers to the request.
5585 func (c *ServicesTenancyUnitsCreateCall) Header() http.Header {
5586 if c.header_ == nil {
5587 c.header_ = make(http.Header)
5588 }
5589 return c.header_
5590 }
5591
5592 func (c *ServicesTenancyUnitsCreateCall) doRequest(alt string) (*http.Response, error) {
5593 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5594 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.createtenancyunitrequest)
5595 if err != nil {
5596 return nil, err
5597 }
5598 c.urlParams_.Set("alt", alt)
5599 c.urlParams_.Set("prettyPrint", "false")
5600 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/tenancyUnits")
5601 urls += "?" + c.urlParams_.Encode()
5602 req, err := http.NewRequest("POST", urls, body)
5603 if err != nil {
5604 return nil, err
5605 }
5606 req.Header = reqHeaders
5607 googleapi.Expand(req.URL, map[string]string{
5608 "parent": c.parent,
5609 })
5610 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.tenancyUnits.create", "request", internallog.HTTPRequest(req, body.Bytes()))
5611 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5612 }
5613
5614 // Do executes the "serviceconsumermanagement.services.tenancyUnits.create" call.
5615 // Any non-2xx status code is an error. Response headers are in either
5616 // *TenancyUnit.ServerResponse.Header or (if a response was returned at all) in
5617 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
5618 // whether the returned error was because http.StatusNotModified was returned.
5619 func (c *ServicesTenancyUnitsCreateCall) Do(opts ...googleapi.CallOption) (*TenancyUnit, error) {
5620 gensupport.SetOptions(c.urlParams_, opts...)
5621 res, err := c.doRequest("json")
5622 if res != nil && res.StatusCode == http.StatusNotModified {
5623 if res.Body != nil {
5624 res.Body.Close()
5625 }
5626 return nil, gensupport.WrapError(&googleapi.Error{
5627 Code: res.StatusCode,
5628 Header: res.Header,
5629 })
5630 }
5631 if err != nil {
5632 return nil, err
5633 }
5634 defer googleapi.CloseBody(res)
5635 if err := googleapi.CheckResponse(res); err != nil {
5636 return nil, gensupport.WrapError(err)
5637 }
5638 ret := &TenancyUnit{
5639 ServerResponse: googleapi.ServerResponse{
5640 Header: res.Header,
5641 HTTPStatusCode: res.StatusCode,
5642 },
5643 }
5644 target := &ret
5645 b, err := gensupport.DecodeResponseBytes(target, res)
5646 if err != nil {
5647 return nil, err
5648 }
5649 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.tenancyUnits.create", "response", internallog.HTTPResponse(res, b))
5650 return ret, nil
5651 }
5652
5653 type ServicesTenancyUnitsDeleteCall struct {
5654 s *APIService
5655 name string
5656 urlParams_ gensupport.URLParams
5657 ctx_ context.Context
5658 header_ http.Header
5659 }
5660
5661 // Delete: Delete a tenancy unit. Before you delete the tenancy unit, there
5662 // should be no tenant resources in it that aren't in a DELETED state.
5663 // Operation.
5664 //
5665 // - name: Name of the tenancy unit to be deleted.
5666 func (r *ServicesTenancyUnitsService) Delete(name string) *ServicesTenancyUnitsDeleteCall {
5667 c := &ServicesTenancyUnitsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5668 c.name = name
5669 return c
5670 }
5671
5672 // Fields allows partial responses to be retrieved. See
5673 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5674 // details.
5675 func (c *ServicesTenancyUnitsDeleteCall) Fields(s ...googleapi.Field) *ServicesTenancyUnitsDeleteCall {
5676 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5677 return c
5678 }
5679
5680 // Context sets the context to be used in this call's Do method.
5681 func (c *ServicesTenancyUnitsDeleteCall) Context(ctx context.Context) *ServicesTenancyUnitsDeleteCall {
5682 c.ctx_ = ctx
5683 return c
5684 }
5685
5686 // Header returns a http.Header that can be modified by the caller to add
5687 // headers to the request.
5688 func (c *ServicesTenancyUnitsDeleteCall) Header() http.Header {
5689 if c.header_ == nil {
5690 c.header_ = make(http.Header)
5691 }
5692 return c.header_
5693 }
5694
5695 func (c *ServicesTenancyUnitsDeleteCall) doRequest(alt string) (*http.Response, error) {
5696 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5697 c.urlParams_.Set("alt", alt)
5698 c.urlParams_.Set("prettyPrint", "false")
5699 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5700 urls += "?" + c.urlParams_.Encode()
5701 req, err := http.NewRequest("DELETE", urls, nil)
5702 if err != nil {
5703 return nil, err
5704 }
5705 req.Header = reqHeaders
5706 googleapi.Expand(req.URL, map[string]string{
5707 "name": c.name,
5708 })
5709 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.tenancyUnits.delete", "request", internallog.HTTPRequest(req, nil))
5710 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5711 }
5712
5713 // Do executes the "serviceconsumermanagement.services.tenancyUnits.delete" call.
5714 // Any non-2xx status code is an error. Response headers are in either
5715 // *Operation.ServerResponse.Header or (if a response was returned at all) in
5716 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
5717 // whether the returned error was because http.StatusNotModified was returned.
5718 func (c *ServicesTenancyUnitsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5719 gensupport.SetOptions(c.urlParams_, opts...)
5720 res, err := c.doRequest("json")
5721 if res != nil && res.StatusCode == http.StatusNotModified {
5722 if res.Body != nil {
5723 res.Body.Close()
5724 }
5725 return nil, gensupport.WrapError(&googleapi.Error{
5726 Code: res.StatusCode,
5727 Header: res.Header,
5728 })
5729 }
5730 if err != nil {
5731 return nil, err
5732 }
5733 defer googleapi.CloseBody(res)
5734 if err := googleapi.CheckResponse(res); err != nil {
5735 return nil, gensupport.WrapError(err)
5736 }
5737 ret := &Operation{
5738 ServerResponse: googleapi.ServerResponse{
5739 Header: res.Header,
5740 HTTPStatusCode: res.StatusCode,
5741 },
5742 }
5743 target := &ret
5744 b, err := gensupport.DecodeResponseBytes(target, res)
5745 if err != nil {
5746 return nil, err
5747 }
5748 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.tenancyUnits.delete", "response", internallog.HTTPResponse(res, b))
5749 return ret, nil
5750 }
5751
5752 type ServicesTenancyUnitsDeleteProjectCall struct {
5753 s *APIService
5754 name string
5755 deletetenantprojectrequest *DeleteTenantProjectRequest
5756 urlParams_ gensupport.URLParams
5757 ctx_ context.Context
5758 header_ http.Header
5759 }
5760
5761 // DeleteProject: Deletes the specified project resource identified by a tenant
5762 // resource tag. The mothod removes a project lien with a 'TenantManager'
5763 // origin if that was added. It will then attempt to delete the project. If
5764 // that operation fails, this method also fails. After the project has been
5765 // deleted, the tenant resource state is set to DELETED. To permanently remove
5766 // resource metadata, call the `RemoveTenantProject` method. New resources with
5767 // the same tag can't be added if there are existing resources in a DELETED
5768 // state. Operation.
5769 //
5770 // - name: Name of the tenancy unit. Such as
5771 // 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'.
5772 func (r *ServicesTenancyUnitsService) DeleteProject(name string, deletetenantprojectrequest *DeleteTenantProjectRequest) *ServicesTenancyUnitsDeleteProjectCall {
5773 c := &ServicesTenancyUnitsDeleteProjectCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5774 c.name = name
5775 c.deletetenantprojectrequest = deletetenantprojectrequest
5776 return c
5777 }
5778
5779 // Fields allows partial responses to be retrieved. See
5780 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5781 // details.
5782 func (c *ServicesTenancyUnitsDeleteProjectCall) Fields(s ...googleapi.Field) *ServicesTenancyUnitsDeleteProjectCall {
5783 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5784 return c
5785 }
5786
5787 // Context sets the context to be used in this call's Do method.
5788 func (c *ServicesTenancyUnitsDeleteProjectCall) Context(ctx context.Context) *ServicesTenancyUnitsDeleteProjectCall {
5789 c.ctx_ = ctx
5790 return c
5791 }
5792
5793 // Header returns a http.Header that can be modified by the caller to add
5794 // headers to the request.
5795 func (c *ServicesTenancyUnitsDeleteProjectCall) Header() http.Header {
5796 if c.header_ == nil {
5797 c.header_ = make(http.Header)
5798 }
5799 return c.header_
5800 }
5801
5802 func (c *ServicesTenancyUnitsDeleteProjectCall) doRequest(alt string) (*http.Response, error) {
5803 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5804 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.deletetenantprojectrequest)
5805 if err != nil {
5806 return nil, err
5807 }
5808 c.urlParams_.Set("alt", alt)
5809 c.urlParams_.Set("prettyPrint", "false")
5810 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:deleteProject")
5811 urls += "?" + c.urlParams_.Encode()
5812 req, err := http.NewRequest("POST", urls, body)
5813 if err != nil {
5814 return nil, err
5815 }
5816 req.Header = reqHeaders
5817 googleapi.Expand(req.URL, map[string]string{
5818 "name": c.name,
5819 })
5820 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.tenancyUnits.deleteProject", "request", internallog.HTTPRequest(req, body.Bytes()))
5821 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5822 }
5823
5824 // Do executes the "serviceconsumermanagement.services.tenancyUnits.deleteProject" call.
5825 // Any non-2xx status code is an error. Response headers are in either
5826 // *Operation.ServerResponse.Header or (if a response was returned at all) in
5827 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
5828 // whether the returned error was because http.StatusNotModified was returned.
5829 func (c *ServicesTenancyUnitsDeleteProjectCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5830 gensupport.SetOptions(c.urlParams_, opts...)
5831 res, err := c.doRequest("json")
5832 if res != nil && res.StatusCode == http.StatusNotModified {
5833 if res.Body != nil {
5834 res.Body.Close()
5835 }
5836 return nil, gensupport.WrapError(&googleapi.Error{
5837 Code: res.StatusCode,
5838 Header: res.Header,
5839 })
5840 }
5841 if err != nil {
5842 return nil, err
5843 }
5844 defer googleapi.CloseBody(res)
5845 if err := googleapi.CheckResponse(res); err != nil {
5846 return nil, gensupport.WrapError(err)
5847 }
5848 ret := &Operation{
5849 ServerResponse: googleapi.ServerResponse{
5850 Header: res.Header,
5851 HTTPStatusCode: res.StatusCode,
5852 },
5853 }
5854 target := &ret
5855 b, err := gensupport.DecodeResponseBytes(target, res)
5856 if err != nil {
5857 return nil, err
5858 }
5859 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.tenancyUnits.deleteProject", "response", internallog.HTTPResponse(res, b))
5860 return ret, nil
5861 }
5862
5863 type ServicesTenancyUnitsListCall struct {
5864 s *APIService
5865 parent string
5866 urlParams_ gensupport.URLParams
5867 ifNoneMatch_ string
5868 ctx_ context.Context
5869 header_ http.Header
5870 }
5871
5872 // List: Find the tenancy unit for a managed service and service consumer. This
5873 // method shouldn't be used in a service producer's runtime path, for example
5874 // to find the tenant project number when creating VMs. Service producers must
5875 // persist the tenant project's information after the project is created.
5876 //
5877 // - parent: Managed service and service consumer. Required.
5878 // services/{service}/{collection id}/{resource id} {collection id} is the
5879 // cloud resource collection type representing the service consumer, for
5880 // example 'projects', or 'organizations'. {resource id} is the consumer
5881 // numeric id, such as project number: '123456'. {service} the name of a
5882 // service, such as 'service.googleapis.com'.
5883 func (r *ServicesTenancyUnitsService) List(parent string) *ServicesTenancyUnitsListCall {
5884 c := &ServicesTenancyUnitsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5885 c.parent = parent
5886 return c
5887 }
5888
5889 // Filter sets the optional parameter "filter": Filter expression over tenancy
5890 // resources field. Optional.
5891 func (c *ServicesTenancyUnitsListCall) Filter(filter string) *ServicesTenancyUnitsListCall {
5892 c.urlParams_.Set("filter", filter)
5893 return c
5894 }
5895
5896 // PageSize sets the optional parameter "pageSize": The maximum number of
5897 // results returned by this request.
5898 func (c *ServicesTenancyUnitsListCall) PageSize(pageSize int64) *ServicesTenancyUnitsListCall {
5899 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5900 return c
5901 }
5902
5903 // PageToken sets the optional parameter "pageToken": The continuation token,
5904 // which is used to page through large result sets. To get the next page of
5905 // results, set this parameter to the value of `nextPageToken` from the
5906 // previous response.
5907 func (c *ServicesTenancyUnitsListCall) PageToken(pageToken string) *ServicesTenancyUnitsListCall {
5908 c.urlParams_.Set("pageToken", pageToken)
5909 return c
5910 }
5911
5912 // Fields allows partial responses to be retrieved. See
5913 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5914 // details.
5915 func (c *ServicesTenancyUnitsListCall) Fields(s ...googleapi.Field) *ServicesTenancyUnitsListCall {
5916 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5917 return c
5918 }
5919
5920 // IfNoneMatch sets an optional parameter which makes the operation fail if the
5921 // object's ETag matches the given value. This is useful for getting updates
5922 // only after the object has changed since the last request.
5923 func (c *ServicesTenancyUnitsListCall) IfNoneMatch(entityTag string) *ServicesTenancyUnitsListCall {
5924 c.ifNoneMatch_ = entityTag
5925 return c
5926 }
5927
5928 // Context sets the context to be used in this call's Do method.
5929 func (c *ServicesTenancyUnitsListCall) Context(ctx context.Context) *ServicesTenancyUnitsListCall {
5930 c.ctx_ = ctx
5931 return c
5932 }
5933
5934 // Header returns a http.Header that can be modified by the caller to add
5935 // headers to the request.
5936 func (c *ServicesTenancyUnitsListCall) Header() http.Header {
5937 if c.header_ == nil {
5938 c.header_ = make(http.Header)
5939 }
5940 return c.header_
5941 }
5942
5943 func (c *ServicesTenancyUnitsListCall) doRequest(alt string) (*http.Response, error) {
5944 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5945 if c.ifNoneMatch_ != "" {
5946 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5947 }
5948 c.urlParams_.Set("alt", alt)
5949 c.urlParams_.Set("prettyPrint", "false")
5950 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/tenancyUnits")
5951 urls += "?" + c.urlParams_.Encode()
5952 req, err := http.NewRequest("GET", urls, nil)
5953 if err != nil {
5954 return nil, err
5955 }
5956 req.Header = reqHeaders
5957 googleapi.Expand(req.URL, map[string]string{
5958 "parent": c.parent,
5959 })
5960 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.tenancyUnits.list", "request", internallog.HTTPRequest(req, nil))
5961 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5962 }
5963
5964 // Do executes the "serviceconsumermanagement.services.tenancyUnits.list" call.
5965 // Any non-2xx status code is an error. Response headers are in either
5966 // *ListTenancyUnitsResponse.ServerResponse.Header or (if a response was
5967 // returned at all) in error.(*googleapi.Error).Header. Use
5968 // googleapi.IsNotModified to check whether the returned error was because
5969 // http.StatusNotModified was returned.
5970 func (c *ServicesTenancyUnitsListCall) Do(opts ...googleapi.CallOption) (*ListTenancyUnitsResponse, error) {
5971 gensupport.SetOptions(c.urlParams_, opts...)
5972 res, err := c.doRequest("json")
5973 if res != nil && res.StatusCode == http.StatusNotModified {
5974 if res.Body != nil {
5975 res.Body.Close()
5976 }
5977 return nil, gensupport.WrapError(&googleapi.Error{
5978 Code: res.StatusCode,
5979 Header: res.Header,
5980 })
5981 }
5982 if err != nil {
5983 return nil, err
5984 }
5985 defer googleapi.CloseBody(res)
5986 if err := googleapi.CheckResponse(res); err != nil {
5987 return nil, gensupport.WrapError(err)
5988 }
5989 ret := &ListTenancyUnitsResponse{
5990 ServerResponse: googleapi.ServerResponse{
5991 Header: res.Header,
5992 HTTPStatusCode: res.StatusCode,
5993 },
5994 }
5995 target := &ret
5996 b, err := gensupport.DecodeResponseBytes(target, res)
5997 if err != nil {
5998 return nil, err
5999 }
6000 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.tenancyUnits.list", "response", internallog.HTTPResponse(res, b))
6001 return ret, nil
6002 }
6003
6004 // Pages invokes f for each page of results.
6005 // A non-nil error returned from f will halt the iteration.
6006 // The provided context supersedes any context provided to the Context method.
6007 func (c *ServicesTenancyUnitsListCall) Pages(ctx context.Context, f func(*ListTenancyUnitsResponse) error) error {
6008 c.ctx_ = ctx
6009 defer c.PageToken(c.urlParams_.Get("pageToken"))
6010 for {
6011 x, err := c.Do()
6012 if err != nil {
6013 return err
6014 }
6015 if err := f(x); err != nil {
6016 return err
6017 }
6018 if x.NextPageToken == "" {
6019 return nil
6020 }
6021 c.PageToken(x.NextPageToken)
6022 }
6023 }
6024
6025 type ServicesTenancyUnitsRemoveProjectCall struct {
6026 s *APIService
6027 name string
6028 removetenantprojectrequest *RemoveTenantProjectRequest
6029 urlParams_ gensupport.URLParams
6030 ctx_ context.Context
6031 header_ http.Header
6032 }
6033
6034 // RemoveProject: Removes the specified project resource identified by a tenant
6035 // resource tag. The method removes the project lien with 'TenantManager'
6036 // origin if that was added. It then attempts to delete the project. If that
6037 // operation fails, this method also fails. Calls to remove already removed or
6038 // non-existent tenant project succeed. After the project has been deleted, or
6039 // if was already in a DELETED state, resource metadata is permanently removed
6040 // from the tenancy unit. Operation.
6041 //
6042 // - name: Name of the tenancy unit. Such as
6043 // 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'.
6044 func (r *ServicesTenancyUnitsService) RemoveProject(name string, removetenantprojectrequest *RemoveTenantProjectRequest) *ServicesTenancyUnitsRemoveProjectCall {
6045 c := &ServicesTenancyUnitsRemoveProjectCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6046 c.name = name
6047 c.removetenantprojectrequest = removetenantprojectrequest
6048 return c
6049 }
6050
6051 // Fields allows partial responses to be retrieved. See
6052 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6053 // details.
6054 func (c *ServicesTenancyUnitsRemoveProjectCall) Fields(s ...googleapi.Field) *ServicesTenancyUnitsRemoveProjectCall {
6055 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6056 return c
6057 }
6058
6059 // Context sets the context to be used in this call's Do method.
6060 func (c *ServicesTenancyUnitsRemoveProjectCall) Context(ctx context.Context) *ServicesTenancyUnitsRemoveProjectCall {
6061 c.ctx_ = ctx
6062 return c
6063 }
6064
6065 // Header returns a http.Header that can be modified by the caller to add
6066 // headers to the request.
6067 func (c *ServicesTenancyUnitsRemoveProjectCall) Header() http.Header {
6068 if c.header_ == nil {
6069 c.header_ = make(http.Header)
6070 }
6071 return c.header_
6072 }
6073
6074 func (c *ServicesTenancyUnitsRemoveProjectCall) doRequest(alt string) (*http.Response, error) {
6075 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6076 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.removetenantprojectrequest)
6077 if err != nil {
6078 return nil, err
6079 }
6080 c.urlParams_.Set("alt", alt)
6081 c.urlParams_.Set("prettyPrint", "false")
6082 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:removeProject")
6083 urls += "?" + c.urlParams_.Encode()
6084 req, err := http.NewRequest("POST", urls, body)
6085 if err != nil {
6086 return nil, err
6087 }
6088 req.Header = reqHeaders
6089 googleapi.Expand(req.URL, map[string]string{
6090 "name": c.name,
6091 })
6092 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.tenancyUnits.removeProject", "request", internallog.HTTPRequest(req, body.Bytes()))
6093 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6094 }
6095
6096 // Do executes the "serviceconsumermanagement.services.tenancyUnits.removeProject" call.
6097 // Any non-2xx status code is an error. Response headers are in either
6098 // *Operation.ServerResponse.Header or (if a response was returned at all) in
6099 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
6100 // whether the returned error was because http.StatusNotModified was returned.
6101 func (c *ServicesTenancyUnitsRemoveProjectCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6102 gensupport.SetOptions(c.urlParams_, opts...)
6103 res, err := c.doRequest("json")
6104 if res != nil && res.StatusCode == http.StatusNotModified {
6105 if res.Body != nil {
6106 res.Body.Close()
6107 }
6108 return nil, gensupport.WrapError(&googleapi.Error{
6109 Code: res.StatusCode,
6110 Header: res.Header,
6111 })
6112 }
6113 if err != nil {
6114 return nil, err
6115 }
6116 defer googleapi.CloseBody(res)
6117 if err := googleapi.CheckResponse(res); err != nil {
6118 return nil, gensupport.WrapError(err)
6119 }
6120 ret := &Operation{
6121 ServerResponse: googleapi.ServerResponse{
6122 Header: res.Header,
6123 HTTPStatusCode: res.StatusCode,
6124 },
6125 }
6126 target := &ret
6127 b, err := gensupport.DecodeResponseBytes(target, res)
6128 if err != nil {
6129 return nil, err
6130 }
6131 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.tenancyUnits.removeProject", "response", internallog.HTTPResponse(res, b))
6132 return ret, nil
6133 }
6134
6135 type ServicesTenancyUnitsUndeleteProjectCall struct {
6136 s *APIService
6137 name string
6138 undeletetenantprojectrequest *UndeleteTenantProjectRequest
6139 urlParams_ gensupport.URLParams
6140 ctx_ context.Context
6141 header_ http.Header
6142 }
6143
6144 // UndeleteProject: Attempts to undelete a previously deleted tenant project.
6145 // The project must be in a DELETED state. There are no guarantees that an
6146 // undeleted project will be in a fully restored and functional state. Call the
6147 // `ApplyTenantProjectConfig` method to update its configuration and then
6148 // validate all managed service resources. Operation.
6149 //
6150 // - name: Name of the tenancy unit. Such as
6151 // 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'.
6152 func (r *ServicesTenancyUnitsService) UndeleteProject(name string, undeletetenantprojectrequest *UndeleteTenantProjectRequest) *ServicesTenancyUnitsUndeleteProjectCall {
6153 c := &ServicesTenancyUnitsUndeleteProjectCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6154 c.name = name
6155 c.undeletetenantprojectrequest = undeletetenantprojectrequest
6156 return c
6157 }
6158
6159 // Fields allows partial responses to be retrieved. See
6160 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6161 // details.
6162 func (c *ServicesTenancyUnitsUndeleteProjectCall) Fields(s ...googleapi.Field) *ServicesTenancyUnitsUndeleteProjectCall {
6163 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6164 return c
6165 }
6166
6167 // Context sets the context to be used in this call's Do method.
6168 func (c *ServicesTenancyUnitsUndeleteProjectCall) Context(ctx context.Context) *ServicesTenancyUnitsUndeleteProjectCall {
6169 c.ctx_ = ctx
6170 return c
6171 }
6172
6173 // Header returns a http.Header that can be modified by the caller to add
6174 // headers to the request.
6175 func (c *ServicesTenancyUnitsUndeleteProjectCall) Header() http.Header {
6176 if c.header_ == nil {
6177 c.header_ = make(http.Header)
6178 }
6179 return c.header_
6180 }
6181
6182 func (c *ServicesTenancyUnitsUndeleteProjectCall) doRequest(alt string) (*http.Response, error) {
6183 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6184 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.undeletetenantprojectrequest)
6185 if err != nil {
6186 return nil, err
6187 }
6188 c.urlParams_.Set("alt", alt)
6189 c.urlParams_.Set("prettyPrint", "false")
6190 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:undeleteProject")
6191 urls += "?" + c.urlParams_.Encode()
6192 req, err := http.NewRequest("POST", urls, body)
6193 if err != nil {
6194 return nil, err
6195 }
6196 req.Header = reqHeaders
6197 googleapi.Expand(req.URL, map[string]string{
6198 "name": c.name,
6199 })
6200 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.tenancyUnits.undeleteProject", "request", internallog.HTTPRequest(req, body.Bytes()))
6201 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6202 }
6203
6204 // Do executes the "serviceconsumermanagement.services.tenancyUnits.undeleteProject" call.
6205 // Any non-2xx status code is an error. Response headers are in either
6206 // *Operation.ServerResponse.Header or (if a response was returned at all) in
6207 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
6208 // whether the returned error was because http.StatusNotModified was returned.
6209 func (c *ServicesTenancyUnitsUndeleteProjectCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6210 gensupport.SetOptions(c.urlParams_, opts...)
6211 res, err := c.doRequest("json")
6212 if res != nil && res.StatusCode == http.StatusNotModified {
6213 if res.Body != nil {
6214 res.Body.Close()
6215 }
6216 return nil, gensupport.WrapError(&googleapi.Error{
6217 Code: res.StatusCode,
6218 Header: res.Header,
6219 })
6220 }
6221 if err != nil {
6222 return nil, err
6223 }
6224 defer googleapi.CloseBody(res)
6225 if err := googleapi.CheckResponse(res); err != nil {
6226 return nil, gensupport.WrapError(err)
6227 }
6228 ret := &Operation{
6229 ServerResponse: googleapi.ServerResponse{
6230 Header: res.Header,
6231 HTTPStatusCode: res.StatusCode,
6232 },
6233 }
6234 target := &ret
6235 b, err := gensupport.DecodeResponseBytes(target, res)
6236 if err != nil {
6237 return nil, err
6238 }
6239 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.tenancyUnits.undeleteProject", "response", internallog.HTTPResponse(res, b))
6240 return ret, nil
6241 }