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