1// Copyright 2020 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 privateca provides access to the Certificate Authority API. 8// 9// For product documentation, see: https://cloud.google.com/ 10// 11// Creating a client 12// 13// Usage example: 14// 15// import "google.golang.org/api/privateca/v1beta1" 16// ... 17// ctx := context.Background() 18// privatecaService, err := privateca.NewService(ctx) 19// 20// In this example, Google Application Default Credentials are used for authentication. 21// 22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. 23// 24// Other authentication options 25// 26// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: 27// 28// privatecaService, err := privateca.NewService(ctx, option.WithAPIKey("AIza...")) 29// 30// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: 31// 32// config := &oauth2.Config{...} 33// // ... 34// token, err := config.Exchange(ctx, ...) 35// privatecaService, err := privateca.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 36// 37// See https://godoc.org/google.golang.org/api/option/ for details on options. 38package privateca // import "google.golang.org/api/privateca/v1beta1" 39 40import ( 41 "bytes" 42 "context" 43 "encoding/json" 44 "errors" 45 "fmt" 46 "io" 47 "net/http" 48 "net/url" 49 "strconv" 50 "strings" 51 52 googleapi "google.golang.org/api/googleapi" 53 gensupport "google.golang.org/api/internal/gensupport" 54 option "google.golang.org/api/option" 55 internaloption "google.golang.org/api/option/internaloption" 56 htransport "google.golang.org/api/transport/http" 57) 58 59// Always reference these packages, just in case the auto-generated code 60// below doesn't. 61var _ = bytes.NewBuffer 62var _ = strconv.Itoa 63var _ = fmt.Sprintf 64var _ = json.NewDecoder 65var _ = io.Copy 66var _ = url.Parse 67var _ = gensupport.MarshalJSON 68var _ = googleapi.Version 69var _ = errors.New 70var _ = strings.Replace 71var _ = context.Canceled 72var _ = internaloption.WithDefaultEndpoint 73 74const apiId = "privateca:v1beta1" 75const apiName = "privateca" 76const apiVersion = "v1beta1" 77const basePath = "https://privateca.googleapis.com/" 78const mtlsBasePath = "https://privateca.mtls.googleapis.com/" 79 80// OAuth2 scopes used by this API. 81const ( 82 // View and manage your data across Google Cloud Platform services 83 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 84) 85 86// NewService creates a new Service. 87func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 88 scopesOption := option.WithScopes( 89 "https://www.googleapis.com/auth/cloud-platform", 90 ) 91 // NOTE: prepend, so we don't override user-specified scopes. 92 opts = append([]option.ClientOption{scopesOption}, opts...) 93 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 94 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 95 client, endpoint, err := htransport.NewClient(ctx, opts...) 96 if err != nil { 97 return nil, err 98 } 99 s, err := New(client) 100 if err != nil { 101 return nil, err 102 } 103 if endpoint != "" { 104 s.BasePath = endpoint 105 } 106 return s, nil 107} 108 109// New creates a new Service. It uses the provided http.Client for requests. 110// 111// Deprecated: please use NewService instead. 112// To provide a custom HTTP client, use option.WithHTTPClient. 113// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 114func New(client *http.Client) (*Service, error) { 115 if client == nil { 116 return nil, errors.New("client is nil") 117 } 118 s := &Service{client: client, BasePath: basePath} 119 s.Projects = NewProjectsService(s) 120 return s, nil 121} 122 123type Service struct { 124 client *http.Client 125 BasePath string // API endpoint base URL 126 UserAgent string // optional additional User-Agent fragment 127 128 Projects *ProjectsService 129} 130 131func (s *Service) userAgent() string { 132 if s.UserAgent == "" { 133 return googleapi.UserAgent 134 } 135 return googleapi.UserAgent + " " + s.UserAgent 136} 137 138func NewProjectsService(s *Service) *ProjectsService { 139 rs := &ProjectsService{s: s} 140 rs.Locations = NewProjectsLocationsService(s) 141 return rs 142} 143 144type ProjectsService struct { 145 s *Service 146 147 Locations *ProjectsLocationsService 148} 149 150func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { 151 rs := &ProjectsLocationsService{s: s} 152 rs.CertificateAuthorities = NewProjectsLocationsCertificateAuthoritiesService(s) 153 rs.Operations = NewProjectsLocationsOperationsService(s) 154 rs.ReusableConfigs = NewProjectsLocationsReusableConfigsService(s) 155 return rs 156} 157 158type ProjectsLocationsService struct { 159 s *Service 160 161 CertificateAuthorities *ProjectsLocationsCertificateAuthoritiesService 162 163 Operations *ProjectsLocationsOperationsService 164 165 ReusableConfigs *ProjectsLocationsReusableConfigsService 166} 167 168func NewProjectsLocationsCertificateAuthoritiesService(s *Service) *ProjectsLocationsCertificateAuthoritiesService { 169 rs := &ProjectsLocationsCertificateAuthoritiesService{s: s} 170 rs.CertificateRevocationLists = NewProjectsLocationsCertificateAuthoritiesCertificateRevocationListsService(s) 171 rs.Certificates = NewProjectsLocationsCertificateAuthoritiesCertificatesService(s) 172 return rs 173} 174 175type ProjectsLocationsCertificateAuthoritiesService struct { 176 s *Service 177 178 CertificateRevocationLists *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsService 179 180 Certificates *ProjectsLocationsCertificateAuthoritiesCertificatesService 181} 182 183func NewProjectsLocationsCertificateAuthoritiesCertificateRevocationListsService(s *Service) *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsService { 184 rs := &ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsService{s: s} 185 return rs 186} 187 188type ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsService struct { 189 s *Service 190} 191 192func NewProjectsLocationsCertificateAuthoritiesCertificatesService(s *Service) *ProjectsLocationsCertificateAuthoritiesCertificatesService { 193 rs := &ProjectsLocationsCertificateAuthoritiesCertificatesService{s: s} 194 return rs 195} 196 197type ProjectsLocationsCertificateAuthoritiesCertificatesService struct { 198 s *Service 199} 200 201func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { 202 rs := &ProjectsLocationsOperationsService{s: s} 203 return rs 204} 205 206type ProjectsLocationsOperationsService struct { 207 s *Service 208} 209 210func NewProjectsLocationsReusableConfigsService(s *Service) *ProjectsLocationsReusableConfigsService { 211 rs := &ProjectsLocationsReusableConfigsService{s: s} 212 return rs 213} 214 215type ProjectsLocationsReusableConfigsService struct { 216 s *Service 217} 218 219// AccessUrls: URLs where a CertificateAuthority will publish content. 220type AccessUrls struct { 221 // CaCertificateAccessUrl: The URL where this CertificateAuthority's CA 222 // certificate is published. This will only be set for CAs that have 223 // been activated. 224 CaCertificateAccessUrl string `json:"caCertificateAccessUrl,omitempty"` 225 226 // CrlAccessUrl: The URL where this CertificateAuthority's CRLs are 227 // published. This will only be set for CAs that have been activated. 228 CrlAccessUrl string `json:"crlAccessUrl,omitempty"` 229 230 // ForceSendFields is a list of field names (e.g. 231 // "CaCertificateAccessUrl") to unconditionally include in API requests. 232 // By default, fields with empty values are omitted from API requests. 233 // However, any non-pointer, non-interface field appearing in 234 // ForceSendFields will be sent to the server regardless of whether the 235 // field is empty or not. This may be used to include empty fields in 236 // Patch requests. 237 ForceSendFields []string `json:"-"` 238 239 // NullFields is a list of field names (e.g. "CaCertificateAccessUrl") 240 // to include in API requests with the JSON null value. By default, 241 // fields with empty values are omitted from API requests. However, any 242 // field with an empty value appearing in NullFields will be sent to the 243 // server as null. It is an error if a field in this list has a 244 // non-empty value. This may be used to include null fields in Patch 245 // requests. 246 NullFields []string `json:"-"` 247} 248 249func (s *AccessUrls) MarshalJSON() ([]byte, error) { 250 type NoMethod AccessUrls 251 raw := NoMethod(*s) 252 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 253} 254 255// ActivateCertificateAuthorityRequest: Request message for 256// CertificateAuthorityService.ActivateCertificateAuthority. 257type ActivateCertificateAuthorityRequest struct { 258 // PemCaCertificate: Required. The signed CA certificate issued from 259 // FetchCertificateAuthorityCsrResponse.pem_csr. 260 PemCaCertificate string `json:"pemCaCertificate,omitempty"` 261 262 // RequestId: Optional. An ID to identify requests. Specify a unique 263 // request ID so that if you must retry your request, the server will 264 // know to ignore the request if it has already been completed. The 265 // server will guarantee that for at least 60 minutes since the first 266 // request. For example, consider a situation where you make an initial 267 // request and t he request times out. If you make the request again 268 // with the same request ID, the server can check if original operation 269 // with the same request ID was received, and if so, will ignore the 270 // second request. This prevents clients from accidentally creating 271 // duplicate commitments. The request ID must be a valid UUID with the 272 // exception that zero UUID is not supported 273 // (00000000-0000-0000-0000-000000000000). 274 RequestId string `json:"requestId,omitempty"` 275 276 // SubordinateConfig: Required. Must include information about the 277 // issuer of 'pem_ca_certificate', and any further issuers until the 278 // self-signed CA. 279 SubordinateConfig *SubordinateConfig `json:"subordinateConfig,omitempty"` 280 281 // ForceSendFields is a list of field names (e.g. "PemCaCertificate") to 282 // unconditionally include in API requests. By default, fields with 283 // empty values are omitted from API requests. However, any non-pointer, 284 // non-interface field appearing in ForceSendFields will be sent to the 285 // server regardless of whether the field is empty or not. This may be 286 // used to include empty fields in Patch requests. 287 ForceSendFields []string `json:"-"` 288 289 // NullFields is a list of field names (e.g. "PemCaCertificate") to 290 // include in API requests with the JSON null value. By default, fields 291 // with empty values are omitted from API requests. However, any field 292 // with an empty value appearing in NullFields will be sent to the 293 // server as null. It is an error if a field in this list has a 294 // non-empty value. This may be used to include null fields in Patch 295 // requests. 296 NullFields []string `json:"-"` 297} 298 299func (s *ActivateCertificateAuthorityRequest) MarshalJSON() ([]byte, error) { 300 type NoMethod ActivateCertificateAuthorityRequest 301 raw := NoMethod(*s) 302 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 303} 304 305type AllowedConfigList struct { 306 // AllowedConfigValues: Required. All Certificates issued by the 307 // CertificateAuthority must match at least one listed 308 // ReusableConfigWrapper. If a ReusableConfigWrapper has an empty field, 309 // any value will be allowed for that field. 310 AllowedConfigValues []*ReusableConfigWrapper `json:"allowedConfigValues,omitempty"` 311 312 // ForceSendFields is a list of field names (e.g. "AllowedConfigValues") 313 // to unconditionally include in API requests. By default, fields with 314 // empty values are omitted from API requests. However, any non-pointer, 315 // non-interface field appearing in ForceSendFields will be sent to the 316 // server regardless of whether the field is empty or not. This may be 317 // used to include empty fields in Patch requests. 318 ForceSendFields []string `json:"-"` 319 320 // NullFields is a list of field names (e.g. "AllowedConfigValues") to 321 // include in API requests with the JSON null value. By default, fields 322 // with empty values are omitted from API requests. However, any field 323 // with an empty value appearing in NullFields will be sent to the 324 // server as null. It is an error if a field in this list has a 325 // non-empty value. This may be used to include null fields in Patch 326 // requests. 327 NullFields []string `json:"-"` 328} 329 330func (s *AllowedConfigList) MarshalJSON() ([]byte, error) { 331 type NoMethod AllowedConfigList 332 raw := NoMethod(*s) 333 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 334} 335 336// AllowedSubjectAltNames: AllowedSubjectAltNames specifies the allowed 337// values for SubjectAltNames by the CertificateAuthority when issuing 338// Certificates. 339type AllowedSubjectAltNames struct { 340 // AllowCustomSans: Optional. Specifies if to allow custom X509Extension 341 // values. 342 AllowCustomSans bool `json:"allowCustomSans,omitempty"` 343 344 // AllowGlobbingDnsWildcards: Optional. Specifies if glob patterns used 345 // for allowed_dns_names allow wildcard certificates. If this is set, 346 // certificate requests with wildcard domains will be permitted to match 347 // a glob pattern specified in allowed_dns_names. Otherwise, certificate 348 // requests with wildcard domains will be permitted only if 349 // allowed_dns_names contains a literal wildcard. 350 AllowGlobbingDnsWildcards bool `json:"allowGlobbingDnsWildcards,omitempty"` 351 352 // AllowedDnsNames: Optional. Contains valid, fully-qualified host 353 // names. Glob patterns are also supported. To allow an explicit 354 // wildcard certificate, escape with backlash (i.e. "\*"). E.g. for 355 // globbed entries: '*bar.com' will allow 'foo.bar.com', but not 356 // '*.bar.com', unless the allow_globbing_dns_wildcards field is set. 357 // E.g. for wildcard entries: '\*.bar.com' will allow '*.bar.com', but 358 // not 'foo.bar.com'. 359 AllowedDnsNames []string `json:"allowedDnsNames,omitempty"` 360 361 // AllowedEmailAddresses: Optional. Contains valid RFC 2822 E-mail 362 // addresses. Glob patterns are also supported. 363 AllowedEmailAddresses []string `json:"allowedEmailAddresses,omitempty"` 364 365 // AllowedIps: Optional. Contains valid 32-bit IPv4 addresses and subnet 366 // ranges or RFC 4291 IPv6 addresses and subnet ranges. Subnet ranges 367 // are specified using the '/' notation (e.g. 10.0.0.0/8, 368 // 2001:700:300:1800::/64). Glob patterns are supported only for ip 369 // address entries (i.e. not for subnet ranges). 370 AllowedIps []string `json:"allowedIps,omitempty"` 371 372 // AllowedUris: Optional. Contains valid RFC 3986 URIs. Glob patterns 373 // are also supported. To match across path seperators (i.e. '/') use 374 // the double star glob pattern (i.e. '**'). 375 AllowedUris []string `json:"allowedUris,omitempty"` 376 377 // ForceSendFields is a list of field names (e.g. "AllowCustomSans") to 378 // unconditionally include in API requests. By default, fields with 379 // empty values are omitted from API requests. However, any non-pointer, 380 // non-interface field appearing in ForceSendFields will be sent to the 381 // server regardless of whether the field is empty or not. This may be 382 // used to include empty fields in Patch requests. 383 ForceSendFields []string `json:"-"` 384 385 // NullFields is a list of field names (e.g. "AllowCustomSans") to 386 // include in API requests with the JSON null value. By default, fields 387 // with empty values are omitted from API requests. However, any field 388 // with an empty value appearing in NullFields will be sent to the 389 // server as null. It is an error if a field in this list has a 390 // non-empty value. This may be used to include null fields in Patch 391 // requests. 392 NullFields []string `json:"-"` 393} 394 395func (s *AllowedSubjectAltNames) MarshalJSON() ([]byte, error) { 396 type NoMethod AllowedSubjectAltNames 397 raw := NoMethod(*s) 398 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 399} 400 401// AuditConfig: Specifies the audit configuration for a service. The 402// configuration determines which permission types are logged, and what 403// identities, if any, are exempted from logging. An AuditConfig must 404// have one or more AuditLogConfigs. If there are AuditConfigs for both 405// `allServices` and a specific service, the union of the two 406// AuditConfigs is used for that service: the log_types specified in 407// each AuditConfig are enabled, and the exempted_members in each 408// AuditLogConfig are exempted. Example Policy with multiple 409// AuditConfigs: { "audit_configs": [ { "service": "allServices", 410// "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": 411// [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { 412// "log_type": "ADMIN_READ" } ] }, { "service": 413// "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": 414// "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ 415// "user:aliya@example.com" ] } ] } ] } For sampleservice, this policy 416// enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts 417// jose@example.com from DATA_READ logging, and aliya@example.com from 418// DATA_WRITE logging. 419type AuditConfig struct { 420 // AuditLogConfigs: The configuration for logging of each type of 421 // permission. 422 AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"` 423 424 // Service: Specifies a service that will be enabled for audit logging. 425 // For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. 426 // `allServices` is a special value that covers all services. 427 Service string `json:"service,omitempty"` 428 429 // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to 430 // unconditionally include in API requests. By default, fields with 431 // empty values are omitted from API requests. However, any non-pointer, 432 // non-interface field appearing in ForceSendFields will be sent to the 433 // server regardless of whether the field is empty or not. This may be 434 // used to include empty fields in Patch requests. 435 ForceSendFields []string `json:"-"` 436 437 // NullFields is a list of field names (e.g. "AuditLogConfigs") to 438 // include in API requests with the JSON null value. By default, fields 439 // with empty values are omitted from API requests. However, any field 440 // with an empty value appearing in NullFields will be sent to the 441 // server as null. It is an error if a field in this list has a 442 // non-empty value. This may be used to include null fields in Patch 443 // requests. 444 NullFields []string `json:"-"` 445} 446 447func (s *AuditConfig) MarshalJSON() ([]byte, error) { 448 type NoMethod AuditConfig 449 raw := NoMethod(*s) 450 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 451} 452 453// AuditLogConfig: Provides the configuration for logging a type of 454// permissions. Example: { "audit_log_configs": [ { "log_type": 455// "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { 456// "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and 457// 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ 458// logging. 459type AuditLogConfig struct { 460 // ExemptedMembers: Specifies the identities that do not cause logging 461 // for this type of permission. Follows the same format of 462 // Binding.members. 463 ExemptedMembers []string `json:"exemptedMembers,omitempty"` 464 465 // LogType: The log type that this config enables. 466 // 467 // Possible values: 468 // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. 469 // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy 470 // "DATA_WRITE" - Data writes. Example: CloudSQL Users create 471 // "DATA_READ" - Data reads. Example: CloudSQL Users list 472 LogType string `json:"logType,omitempty"` 473 474 // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to 475 // unconditionally include in API requests. By default, fields with 476 // empty values are omitted from API requests. However, any non-pointer, 477 // non-interface field appearing in ForceSendFields will be sent to the 478 // server regardless of whether the field is empty or not. This may be 479 // used to include empty fields in Patch requests. 480 ForceSendFields []string `json:"-"` 481 482 // NullFields is a list of field names (e.g. "ExemptedMembers") to 483 // include in API requests with the JSON null value. By default, fields 484 // with empty values are omitted from API requests. However, any field 485 // with an empty value appearing in NullFields will be sent to the 486 // server as null. It is an error if a field in this list has a 487 // non-empty value. This may be used to include null fields in Patch 488 // requests. 489 NullFields []string `json:"-"` 490} 491 492func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { 493 type NoMethod AuditLogConfig 494 raw := NoMethod(*s) 495 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 496} 497 498// Binding: Associates `members` with a `role`. 499type Binding struct { 500 // Condition: The condition that is associated with this binding. If the 501 // condition evaluates to `true`, then this binding applies to the 502 // current request. If the condition evaluates to `false`, then this 503 // binding does not apply to the current request. However, a different 504 // role binding might grant the same role to one or more of the members 505 // in this binding. To learn which resources support conditions in their 506 // IAM policies, see the [IAM 507 // documentation](https://cloud.google.com/iam/help/conditions/resource-p 508 // olicies). 509 Condition *Expr `json:"condition,omitempty"` 510 511 // Members: Specifies the identities requesting access for a Cloud 512 // Platform resource. `members` can have the following values: * 513 // `allUsers`: A special identifier that represents anyone who is on the 514 // internet; with or without a Google account. * 515 // `allAuthenticatedUsers`: A special identifier that represents anyone 516 // who is authenticated with a Google account or a service account. * 517 // `user:{emailid}`: An email address that represents a specific Google 518 // account. For example, `alice@example.com` . * 519 // `serviceAccount:{emailid}`: An email address that represents a 520 // service account. For example, 521 // `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An 522 // email address that represents a Google group. For example, 523 // `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An 524 // email address (plus unique identifier) representing a user that has 525 // been recently deleted. For example, 526 // `alice@example.com?uid=123456789012345678901`. If the user is 527 // recovered, this value reverts to `user:{emailid}` and the recovered 528 // user retains the role in the binding. * 529 // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address 530 // (plus unique identifier) representing a service account that has been 531 // recently deleted. For example, 532 // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. 533 // If the service account is undeleted, this value reverts to 534 // `serviceAccount:{emailid}` and the undeleted service account retains 535 // the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: 536 // An email address (plus unique identifier) representing a Google group 537 // that has been recently deleted. For example, 538 // `admins@example.com?uid=123456789012345678901`. If the group is 539 // recovered, this value reverts to `group:{emailid}` and the recovered 540 // group retains the role in the binding. * `domain:{domain}`: The G 541 // Suite domain (primary) that represents all the users of that domain. 542 // For example, `google.com` or `example.com`. 543 Members []string `json:"members,omitempty"` 544 545 // Role: Role that is assigned to `members`. For example, 546 // `roles/viewer`, `roles/editor`, or `roles/owner`. 547 Role string `json:"role,omitempty"` 548 549 // ForceSendFields is a list of field names (e.g. "Condition") to 550 // unconditionally include in API requests. By default, fields with 551 // empty values are omitted from API requests. However, any non-pointer, 552 // non-interface field appearing in ForceSendFields will be sent to the 553 // server regardless of whether the field is empty or not. This may be 554 // used to include empty fields in Patch requests. 555 ForceSendFields []string `json:"-"` 556 557 // NullFields is a list of field names (e.g. "Condition") to include in 558 // API requests with the JSON null value. By default, fields with empty 559 // values are omitted from API requests. However, any field with an 560 // empty value appearing in NullFields will be sent to the server as 561 // null. It is an error if a field in this list has a non-empty value. 562 // This may be used to include null fields in Patch requests. 563 NullFields []string `json:"-"` 564} 565 566func (s *Binding) MarshalJSON() ([]byte, error) { 567 type NoMethod Binding 568 raw := NoMethod(*s) 569 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 570} 571 572// CaOptions: Describes values that are relevant in a CA certificate. 573type CaOptions struct { 574 // IsCa: Optional. Refers to the "CA" X.509 extension, which is a 575 // boolean value. When this value is missing, the extension will be 576 // omitted from the CA certificate. 577 IsCa bool `json:"isCa,omitempty"` 578 579 // MaxIssuerPathLength: Optional. Refers to the path length restriction 580 // X.509 extension. For a CA certificate, this value describes the depth 581 // of subordinate CA certificates that are allowed. If this value is 582 // less than 0, the request will fail. If this value is missing, the max 583 // path length will be omitted from the CA certificate. 584 MaxIssuerPathLength int64 `json:"maxIssuerPathLength,omitempty"` 585 586 // ForceSendFields is a list of field names (e.g. "IsCa") to 587 // unconditionally include in API requests. By default, fields with 588 // empty values are omitted from API requests. However, any non-pointer, 589 // non-interface field appearing in ForceSendFields will be sent to the 590 // server regardless of whether the field is empty or not. This may be 591 // used to include empty fields in Patch requests. 592 ForceSendFields []string `json:"-"` 593 594 // NullFields is a list of field names (e.g. "IsCa") to include in API 595 // requests with the JSON null value. By default, fields with empty 596 // values are omitted from API requests. However, any field with an 597 // empty value appearing in NullFields will be sent to the server as 598 // null. It is an error if a field in this list has a non-empty value. 599 // This may be used to include null fields in Patch requests. 600 NullFields []string `json:"-"` 601} 602 603func (s *CaOptions) MarshalJSON() ([]byte, error) { 604 type NoMethod CaOptions 605 raw := NoMethod(*s) 606 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 607} 608 609// CancelOperationRequest: The request message for 610// Operations.CancelOperation. 611type CancelOperationRequest struct { 612} 613 614// Certificate: A Certificate corresponds to a signed X.509 certificate 615// issued by a CertificateAuthority. 616type Certificate struct { 617 // CertificateDescription: Output only. A structured description of the 618 // issued X.509 certificate. 619 CertificateDescription *CertificateDescription `json:"certificateDescription,omitempty"` 620 621 // Config: Immutable. A description of the certificate and key that does 622 // not require X.509 or ASN.1. 623 Config *CertificateConfig `json:"config,omitempty"` 624 625 // CreateTime: Output only. The time at which this Certificate was 626 // created. 627 CreateTime string `json:"createTime,omitempty"` 628 629 // Labels: Optional. Labels with user-defined metadata. 630 Labels map[string]string `json:"labels,omitempty"` 631 632 // Lifetime: Required. Immutable. The desired lifetime of a certificate. 633 // Used to create the "not_before_time" and "not_after_time" fields 634 // inside an X.509 certificate. Note that the lifetime may be truncated 635 // if it would extend past the life of any certificate authority in the 636 // issuing chain. 637 Lifetime string `json:"lifetime,omitempty"` 638 639 // Name: Output only. The resource path for this Certificate in the 640 // format 641 // `projects/*/locations/*/certificateAuthorities/*/certificates/*`. 642 Name string `json:"name,omitempty"` 643 644 // PemCertificate: Output only. The pem-encoded, signed X.509 645 // certificate. 646 PemCertificate string `json:"pemCertificate,omitempty"` 647 648 // PemCertificateChain: Output only. The chain that may be used to 649 // verify the X.509 certificate. Expected to be in issuer-to-root order 650 // according to RFC 5246. 651 PemCertificateChain []string `json:"pemCertificateChain,omitempty"` 652 653 // PemCsr: Immutable. A pem-encoded X.509 certificate signing request 654 // (CSR). 655 PemCsr string `json:"pemCsr,omitempty"` 656 657 // RevocationDetails: Output only. Details regarding the revocation of 658 // this Certificate. This Certificate is considered revoked if and only 659 // if this field is present. 660 RevocationDetails *RevocationDetails `json:"revocationDetails,omitempty"` 661 662 // UpdateTime: Output only. The time at which this Certificate was 663 // updated. 664 UpdateTime string `json:"updateTime,omitempty"` 665 666 // ServerResponse contains the HTTP response code and headers from the 667 // server. 668 googleapi.ServerResponse `json:"-"` 669 670 // ForceSendFields is a list of field names (e.g. 671 // "CertificateDescription") to unconditionally include in API requests. 672 // By default, fields with empty values are omitted from API requests. 673 // However, any non-pointer, non-interface field appearing in 674 // ForceSendFields will be sent to the server regardless of whether the 675 // field is empty or not. This may be used to include empty fields in 676 // Patch requests. 677 ForceSendFields []string `json:"-"` 678 679 // NullFields is a list of field names (e.g. "CertificateDescription") 680 // to include in API requests with the JSON null value. By default, 681 // fields with empty values are omitted from API requests. However, any 682 // field with an empty value appearing in NullFields will be sent to the 683 // server as null. It is an error if a field in this list has a 684 // non-empty value. This may be used to include null fields in Patch 685 // requests. 686 NullFields []string `json:"-"` 687} 688 689func (s *Certificate) MarshalJSON() ([]byte, error) { 690 type NoMethod Certificate 691 raw := NoMethod(*s) 692 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 693} 694 695// CertificateAuthority: A CertificateAuthority represents an individual 696// Certificate Authority. A CertificateAuthority can be used to create 697// Certificates. 698type CertificateAuthority struct { 699 // AccessUrls: Output only. URLs for accessing content published by this 700 // CA, such as the CA certificate and CRLs. 701 AccessUrls *AccessUrls `json:"accessUrls,omitempty"` 702 703 // CaCertificateDescriptions: Output only. A structured description of 704 // this CertificateAuthority's CA certificate and its issuers. Ordered 705 // as self-to-root. 706 CaCertificateDescriptions []*CertificateDescription `json:"caCertificateDescriptions,omitempty"` 707 708 // CertificatePolicy: Optional. The CertificateAuthorityPolicy to 709 // enforce when issuing Certificates from this CertificateAuthority. 710 CertificatePolicy *CertificateAuthorityPolicy `json:"certificatePolicy,omitempty"` 711 712 // Config: Required. Immutable. The config used to create a self-signed 713 // X.509 certificate or CSR. 714 Config *CertificateConfig `json:"config,omitempty"` 715 716 // CreateTime: Output only. The time at which this CertificateAuthority 717 // was created. 718 CreateTime string `json:"createTime,omitempty"` 719 720 // DeleteTime: Output only. The time at which this CertificateAuthority 721 // will be deleted, if scheduled for deletion. 722 DeleteTime string `json:"deleteTime,omitempty"` 723 724 // GcsBucket: Immutable. The name of a Cloud Storage bucket where this 725 // CertificateAuthority will publish content, such as the CA certificate 726 // and CRLs. This must be a bucket name, without any prefixes (such as 727 // `gs://`) or suffixes (such as `.googleapis.com`). For example, to use 728 // a bucket named `my-bucket`, you would simply specify `my-bucket`. If 729 // not specified, a managed bucket will be created. 730 GcsBucket string `json:"gcsBucket,omitempty"` 731 732 // IssuingOptions: Optional. The IssuingOptions to follow when issuing 733 // Certificates from this CertificateAuthority. 734 IssuingOptions *IssuingOptions `json:"issuingOptions,omitempty"` 735 736 // KeySpec: Required. Immutable. Used when issuing certificates for this 737 // CertificateAuthority. If this CertificateAuthority is a self-signed 738 // CertificateAuthority, this key is also used to sign the self-signed 739 // CA certificate. Otherwise, it is used to sign a CSR. 740 KeySpec *KeyVersionSpec `json:"keySpec,omitempty"` 741 742 // Labels: Optional. Labels with user-defined metadata. 743 Labels map[string]string `json:"labels,omitempty"` 744 745 // Lifetime: Required. The desired lifetime of the CA certificate. Used 746 // to create the "not_before_time" and "not_after_time" fields inside an 747 // X.509 certificate. 748 Lifetime string `json:"lifetime,omitempty"` 749 750 // Name: Output only. The resource name for this CertificateAuthority in 751 // the format `projects/*/locations/*/certificateAuthorities/*`. 752 Name string `json:"name,omitempty"` 753 754 // PemCaCertificates: Output only. This CertificateAuthority's 755 // certificate chain, including the current CertificateAuthority's 756 // certificate. Ordered such that the root issuer is the final element 757 // (consistent with RFC 5246). For a self-signed CA, this will only list 758 // the current CertificateAuthority's certificate. 759 PemCaCertificates []string `json:"pemCaCertificates,omitempty"` 760 761 // State: Output only. The State for this CertificateAuthority. 762 // 763 // Possible values: 764 // "STATE_UNSPECIFIED" - Not specified. 765 // "ENABLED" - Certificates can be issued from this CA. CRLs will be 766 // generated for this CA. 767 // "DISABLED" - Certificates cannot be issued from this CA. CRLs will 768 // still be generated. 769 // "PENDING_ACTIVATION" - Certificates cannot be issued from this CA. 770 // CRLs will not be generated. 771 // "PENDING_DELETION" - Certificates cannot be issued from this CA. 772 // CRLs will not be generated. 773 State string `json:"state,omitempty"` 774 775 // SubordinateConfig: Optional. If this is a subordinate 776 // CertificateAuthority, this field will be set with the subordinate 777 // configuration, which describes its issuers. This may be updated, but 778 // this CertificateAuthority must continue to validate. 779 SubordinateConfig *SubordinateConfig `json:"subordinateConfig,omitempty"` 780 781 // Tier: Required. Immutable. The Tier of this CertificateAuthority. 782 // 783 // Possible values: 784 // "TIER_UNSPECIFIED" - Not specified. 785 // "ENTERPRISE" - Enterprise tier. 786 // "DEVOPS" - DevOps tier. 787 Tier string `json:"tier,omitempty"` 788 789 // Type: Required. Immutable. The Type of this CertificateAuthority. 790 // 791 // Possible values: 792 // "TYPE_UNSPECIFIED" - Not specified. 793 // "SELF_SIGNED" - Self-signed CA. 794 // "SUBORDINATE" - Subordinate CA. Could be issued by a Private CA 795 // CertificateAuthority or an unmanaged CA. 796 Type string `json:"type,omitempty"` 797 798 // UpdateTime: Output only. The time at which this CertificateAuthority 799 // was updated. 800 UpdateTime string `json:"updateTime,omitempty"` 801 802 // ServerResponse contains the HTTP response code and headers from the 803 // server. 804 googleapi.ServerResponse `json:"-"` 805 806 // ForceSendFields is a list of field names (e.g. "AccessUrls") to 807 // unconditionally include in API requests. By default, fields with 808 // empty values are omitted from API requests. However, any non-pointer, 809 // non-interface field appearing in ForceSendFields will be sent to the 810 // server regardless of whether the field is empty or not. This may be 811 // used to include empty fields in Patch requests. 812 ForceSendFields []string `json:"-"` 813 814 // NullFields is a list of field names (e.g. "AccessUrls") to include in 815 // API requests with the JSON null value. By default, fields with empty 816 // values are omitted from API requests. However, any field with an 817 // empty value appearing in NullFields will be sent to the server as 818 // null. It is an error if a field in this list has a non-empty value. 819 // This may be used to include null fields in Patch requests. 820 NullFields []string `json:"-"` 821} 822 823func (s *CertificateAuthority) MarshalJSON() ([]byte, error) { 824 type NoMethod CertificateAuthority 825 raw := NoMethod(*s) 826 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 827} 828 829// CertificateAuthorityPolicy: The issuing policy for a 830// CertificateAuthority. Certificates will not be successfully issued 831// from this CertificateAuthority if they violate the policy. 832type CertificateAuthorityPolicy struct { 833 // AllowedCommonNames: Optional. If any value is specified here, then 834 // all Certificates issued by the CertificateAuthority must match at 835 // least one listed value. If no value is specified, all values will be 836 // allowed for this fied. Glob patterns are also supported. 837 AllowedCommonNames []string `json:"allowedCommonNames,omitempty"` 838 839 // AllowedConfigList: Optional. All Certificates issued by the 840 // CertificateAuthority must match at least one listed 841 // ReusableConfigWrapper in the list. 842 AllowedConfigList *AllowedConfigList `json:"allowedConfigList,omitempty"` 843 844 // AllowedIssuanceModes: Optional. If specified, then only methods 845 // allowed in the IssuanceModes may be used to issue Certificates. 846 AllowedIssuanceModes *IssuanceModes `json:"allowedIssuanceModes,omitempty"` 847 848 // AllowedLocationsAndOrganizations: Optional. If any Subject is 849 // specified here, then all Certificates issued by the 850 // CertificateAuthority must match at least one listed Subject. If a 851 // Subject has an empty field, any value will be allowed for that field. 852 AllowedLocationsAndOrganizations []*Subject `json:"allowedLocationsAndOrganizations,omitempty"` 853 854 // AllowedSans: Optional. If a AllowedSubjectAltNames is specified here, 855 // then all Certificates issued by the CertificateAuthority must match 856 // AllowedSubjectAltNames. If no value or an empty value is specified, 857 // any value will be allowed for the SubjectAltNames field. 858 AllowedSans *AllowedSubjectAltNames `json:"allowedSans,omitempty"` 859 860 // MaximumLifetime: Optional. The maximum lifetime allowed by the 861 // CertificateAuthority. Note that if the any part if the issuing chain 862 // expires before a Certificate's requested maximum_lifetime, the 863 // effective lifetime will be explicitly truncated. 864 MaximumLifetime string `json:"maximumLifetime,omitempty"` 865 866 // OverwriteConfigValues: Optional. All Certificates issued by the 867 // CertificateAuthority will use the provided configuration values, 868 // overwriting any requested configuration values. 869 OverwriteConfigValues *ReusableConfigWrapper `json:"overwriteConfigValues,omitempty"` 870 871 // ForceSendFields is a list of field names (e.g. "AllowedCommonNames") 872 // to unconditionally include in API requests. By default, fields with 873 // empty values are omitted from API requests. However, any non-pointer, 874 // non-interface field appearing in ForceSendFields will be sent to the 875 // server regardless of whether the field is empty or not. This may be 876 // used to include empty fields in Patch requests. 877 ForceSendFields []string `json:"-"` 878 879 // NullFields is a list of field names (e.g. "AllowedCommonNames") to 880 // include in API requests with the JSON null value. By default, fields 881 // with empty values are omitted from API requests. However, any field 882 // with an empty value appearing in NullFields will be sent to the 883 // server as null. It is an error if a field in this list has a 884 // non-empty value. This may be used to include null fields in Patch 885 // requests. 886 NullFields []string `json:"-"` 887} 888 889func (s *CertificateAuthorityPolicy) MarshalJSON() ([]byte, error) { 890 type NoMethod CertificateAuthorityPolicy 891 raw := NoMethod(*s) 892 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 893} 894 895// CertificateConfig: A CertificateConfig describes an X.509 certificate 896// or CSR that is to be created, as an alternative to using ASN.1. 897type CertificateConfig struct { 898 // PublicKey: Optional. The public key that corresponds to this config. 899 // This is, for example, used when issuing Certificates, but not when 900 // creating a self-signed CertificateAuthority or CertificateAuthority 901 // CSR. 902 PublicKey *PublicKey `json:"publicKey,omitempty"` 903 904 // ReusableConfig: Required. Describes how some of the technical fields 905 // in a certificate should be populated. 906 ReusableConfig *ReusableConfigWrapper `json:"reusableConfig,omitempty"` 907 908 // SubjectConfig: Required. Specifies some of the values in a 909 // certificate that are related to the subject. 910 SubjectConfig *SubjectConfig `json:"subjectConfig,omitempty"` 911 912 // ForceSendFields is a list of field names (e.g. "PublicKey") to 913 // unconditionally include in API requests. By default, fields with 914 // empty values are omitted from API requests. However, any non-pointer, 915 // non-interface field appearing in ForceSendFields will be sent to the 916 // server regardless of whether the field is empty or not. This may be 917 // used to include empty fields in Patch requests. 918 ForceSendFields []string `json:"-"` 919 920 // NullFields is a list of field names (e.g. "PublicKey") to include in 921 // API requests with the JSON null value. By default, fields with empty 922 // values are omitted from API requests. However, any field with an 923 // empty value appearing in NullFields will be sent to the server as 924 // null. It is an error if a field in this list has a non-empty value. 925 // This may be used to include null fields in Patch requests. 926 NullFields []string `json:"-"` 927} 928 929func (s *CertificateConfig) MarshalJSON() ([]byte, error) { 930 type NoMethod CertificateConfig 931 raw := NoMethod(*s) 932 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 933} 934 935// CertificateDescription: A CertificateDescription describes an X.509 936// certificate or CSR that has been issued, as an alternative to using 937// ASN.1 / X.509. 938type CertificateDescription struct { 939 // AiaIssuingCertificateUrls: Describes lists of issuer CA certificate 940 // URLs that appear in the "Authority Information Access" extension in 941 // the certificate. 942 AiaIssuingCertificateUrls []string `json:"aiaIssuingCertificateUrls,omitempty"` 943 944 // AuthorityKeyId: Identifies the subject_key_id of the parent 945 // certificate, per https://tools.ietf.org/html/rfc5280#section-4.2.1.1 946 AuthorityKeyId *KeyId `json:"authorityKeyId,omitempty"` 947 948 // CertFingerprint: The hash of the x.509 certificate. 949 CertFingerprint *CertificateFingerprint `json:"certFingerprint,omitempty"` 950 951 // ConfigValues: Describes some of the technical fields in a 952 // certificate. 953 ConfigValues *ReusableConfigValues `json:"configValues,omitempty"` 954 955 // CrlDistributionPoints: Describes a list of locations to obtain CRL 956 // information, i.e. the DistributionPoint.fullName described by 957 // https://tools.ietf.org/html/rfc5280#section-4.2.1.13 958 CrlDistributionPoints []string `json:"crlDistributionPoints,omitempty"` 959 960 // PublicKey: The public key that corresponds to an issued certificate. 961 PublicKey *PublicKey `json:"publicKey,omitempty"` 962 963 // SubjectDescription: Describes some of the values in a certificate 964 // that are related to the subject and lifetime. 965 SubjectDescription *SubjectDescription `json:"subjectDescription,omitempty"` 966 967 // SubjectKeyId: Provides a means of identifiying certificates that 968 // contain a particular public key, per 969 // https://tools.ietf.org/html/rfc5280#section-4.2.1.2. 970 SubjectKeyId *KeyId `json:"subjectKeyId,omitempty"` 971 972 // ForceSendFields is a list of field names (e.g. 973 // "AiaIssuingCertificateUrls") to unconditionally include in API 974 // requests. By default, fields with empty values are omitted from API 975 // requests. However, any non-pointer, non-interface field appearing in 976 // ForceSendFields will be sent to the server regardless of whether the 977 // field is empty or not. This may be used to include empty fields in 978 // Patch requests. 979 ForceSendFields []string `json:"-"` 980 981 // NullFields is a list of field names (e.g. 982 // "AiaIssuingCertificateUrls") to include in API requests with the JSON 983 // null value. By default, fields with empty values are omitted from API 984 // requests. However, any field with an empty value appearing in 985 // NullFields will be sent to the server as null. It is an error if a 986 // field in this list has a non-empty value. This may be used to include 987 // null fields in Patch requests. 988 NullFields []string `json:"-"` 989} 990 991func (s *CertificateDescription) MarshalJSON() ([]byte, error) { 992 type NoMethod CertificateDescription 993 raw := NoMethod(*s) 994 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 995} 996 997// CertificateFingerprint: A group of fingerprints for the x509 998// certificate. 999type CertificateFingerprint struct { 1000 // Sha256Hash: The SHA 256 hash, encoded in hexadecimal, of the DER x509 1001 // certificate. 1002 Sha256Hash string `json:"sha256Hash,omitempty"` 1003 1004 // ForceSendFields is a list of field names (e.g. "Sha256Hash") to 1005 // unconditionally include in API requests. By default, fields with 1006 // empty values are omitted from API requests. However, any non-pointer, 1007 // non-interface field appearing in ForceSendFields will be sent to the 1008 // server regardless of whether the field is empty or not. This may be 1009 // used to include empty fields in Patch requests. 1010 ForceSendFields []string `json:"-"` 1011 1012 // NullFields is a list of field names (e.g. "Sha256Hash") to include in 1013 // API requests with the JSON null value. By default, fields with empty 1014 // values are omitted from API requests. However, any field with an 1015 // empty value appearing in NullFields will be sent to the server as 1016 // null. It is an error if a field in this list has a non-empty value. 1017 // This may be used to include null fields in Patch requests. 1018 NullFields []string `json:"-"` 1019} 1020 1021func (s *CertificateFingerprint) MarshalJSON() ([]byte, error) { 1022 type NoMethod CertificateFingerprint 1023 raw := NoMethod(*s) 1024 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1025} 1026 1027// CertificateRevocationList: A CertificateRevocationList corresponds to 1028// a signed X.509 certificate Revocation List (CRL). A CRL contains the 1029// serial numbers of certificates that should no longer be trusted. 1030type CertificateRevocationList struct { 1031 // AccessUrl: Output only. The location where 'pem_crl' can be accessed. 1032 AccessUrl string `json:"accessUrl,omitempty"` 1033 1034 // CreateTime: Output only. The time at which this 1035 // CertificateRevocationList was created. 1036 CreateTime string `json:"createTime,omitempty"` 1037 1038 // Labels: Optional. Labels with user-defined metadata. 1039 Labels map[string]string `json:"labels,omitempty"` 1040 1041 // Name: Output only. The resource path for this 1042 // CertificateRevocationList in the format 1043 // `projects/*/locations/*/certificateAuthorities/*/ 1044 // certificateRevocationLists/*`. 1045 Name string `json:"name,omitempty"` 1046 1047 // PemCrl: Output only. The PEM-encoded X.509 CRL. 1048 PemCrl string `json:"pemCrl,omitempty"` 1049 1050 // RevokedCertificates: Output only. The revoked serial numbers that 1051 // appear in pem_crl. 1052 RevokedCertificates []*RevokedCertificate `json:"revokedCertificates,omitempty"` 1053 1054 // SequenceNumber: Output only. The CRL sequence number that appears in 1055 // pem_crl. 1056 SequenceNumber int64 `json:"sequenceNumber,omitempty,string"` 1057 1058 // State: Output only. The State for this CertificateRevocationList. 1059 // 1060 // Possible values: 1061 // "STATE_UNSPECIFIED" - Not specified. 1062 // "ACTIVE" - The CertificateRevocationList is up to date. 1063 // "SUPERSEDED" - The CertificateRevocationList is no longer current. 1064 State string `json:"state,omitempty"` 1065 1066 // UpdateTime: Output only. The time at which this 1067 // CertificateRevocationList was updated. 1068 UpdateTime string `json:"updateTime,omitempty"` 1069 1070 // ServerResponse contains the HTTP response code and headers from the 1071 // server. 1072 googleapi.ServerResponse `json:"-"` 1073 1074 // ForceSendFields is a list of field names (e.g. "AccessUrl") to 1075 // unconditionally include in API requests. By default, fields with 1076 // empty values are omitted from API requests. However, any non-pointer, 1077 // non-interface field appearing in ForceSendFields will be sent to the 1078 // server regardless of whether the field is empty or not. This may be 1079 // used to include empty fields in Patch requests. 1080 ForceSendFields []string `json:"-"` 1081 1082 // NullFields is a list of field names (e.g. "AccessUrl") to include in 1083 // API requests with the JSON null value. By default, fields with empty 1084 // values are omitted from API requests. However, any field with an 1085 // empty value appearing in NullFields will be sent to the server as 1086 // null. It is an error if a field in this list has a non-empty value. 1087 // This may be used to include null fields in Patch requests. 1088 NullFields []string `json:"-"` 1089} 1090 1091func (s *CertificateRevocationList) MarshalJSON() ([]byte, error) { 1092 type NoMethod CertificateRevocationList 1093 raw := NoMethod(*s) 1094 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1095} 1096 1097// DisableCertificateAuthorityRequest: Request message for 1098// CertificateAuthorityService.DisableCertificateAuthority. 1099type DisableCertificateAuthorityRequest struct { 1100 // RequestId: Optional. An ID to identify requests. Specify a unique 1101 // request ID so that if you must retry your request, the server will 1102 // know to ignore the request if it has already been completed. The 1103 // server will guarantee that for at least 60 minutes since the first 1104 // request. For example, consider a situation where you make an initial 1105 // request and t he request times out. If you make the request again 1106 // with the same request ID, the server can check if original operation 1107 // with the same request ID was received, and if so, will ignore the 1108 // second request. This prevents clients from accidentally creating 1109 // duplicate commitments. The request ID must be a valid UUID with the 1110 // exception that zero UUID is not supported 1111 // (00000000-0000-0000-0000-000000000000). 1112 RequestId string `json:"requestId,omitempty"` 1113 1114 // ForceSendFields is a list of field names (e.g. "RequestId") to 1115 // unconditionally include in API requests. By default, fields with 1116 // empty values are omitted from API requests. However, any non-pointer, 1117 // non-interface field appearing in ForceSendFields will be sent to the 1118 // server regardless of whether the field is empty or not. This may be 1119 // used to include empty fields in Patch requests. 1120 ForceSendFields []string `json:"-"` 1121 1122 // NullFields is a list of field names (e.g. "RequestId") to include in 1123 // API requests with the JSON null value. By default, fields with empty 1124 // values are omitted from API requests. However, any field with an 1125 // empty value appearing in NullFields will be sent to the server as 1126 // null. It is an error if a field in this list has a non-empty value. 1127 // This may be used to include null fields in Patch requests. 1128 NullFields []string `json:"-"` 1129} 1130 1131func (s *DisableCertificateAuthorityRequest) MarshalJSON() ([]byte, error) { 1132 type NoMethod DisableCertificateAuthorityRequest 1133 raw := NoMethod(*s) 1134 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1135} 1136 1137// Empty: A generic empty message that you can re-use to avoid defining 1138// duplicated empty messages in your APIs. A typical example is to use 1139// it as the request or the response type of an API method. For 1140// instance: service Foo { rpc Bar(google.protobuf.Empty) returns 1141// (google.protobuf.Empty); } The JSON representation for `Empty` is 1142// empty JSON object `{}`. 1143type Empty struct { 1144 // ServerResponse contains the HTTP response code and headers from the 1145 // server. 1146 googleapi.ServerResponse `json:"-"` 1147} 1148 1149// EnableCertificateAuthorityRequest: Request message for 1150// CertificateAuthorityService.EnableCertificateAuthority. 1151type EnableCertificateAuthorityRequest struct { 1152 // RequestId: Optional. An ID to identify requests. Specify a unique 1153 // request ID so that if you must retry your request, the server will 1154 // know to ignore the request if it has already been completed. The 1155 // server will guarantee that for at least 60 minutes since the first 1156 // request. For example, consider a situation where you make an initial 1157 // request and t he request times out. If you make the request again 1158 // with the same request ID, the server can check if original operation 1159 // with the same request ID was received, and if so, will ignore the 1160 // second request. This prevents clients from accidentally creating 1161 // duplicate commitments. The request ID must be a valid UUID with the 1162 // exception that zero UUID is not supported 1163 // (00000000-0000-0000-0000-000000000000). 1164 RequestId string `json:"requestId,omitempty"` 1165 1166 // ForceSendFields is a list of field names (e.g. "RequestId") to 1167 // unconditionally include in API requests. By default, fields with 1168 // empty values are omitted from API requests. However, any non-pointer, 1169 // non-interface field appearing in ForceSendFields will be sent to the 1170 // server regardless of whether the field is empty or not. This may be 1171 // used to include empty fields in Patch requests. 1172 ForceSendFields []string `json:"-"` 1173 1174 // NullFields is a list of field names (e.g. "RequestId") to include in 1175 // API requests with the JSON null value. By default, fields with empty 1176 // values are omitted from API requests. However, any field with an 1177 // empty value appearing in NullFields will be sent to the server as 1178 // null. It is an error if a field in this list has a non-empty value. 1179 // This may be used to include null fields in Patch requests. 1180 NullFields []string `json:"-"` 1181} 1182 1183func (s *EnableCertificateAuthorityRequest) MarshalJSON() ([]byte, error) { 1184 type NoMethod EnableCertificateAuthorityRequest 1185 raw := NoMethod(*s) 1186 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1187} 1188 1189// Expr: Represents a textual expression in the Common Expression 1190// Language (CEL) syntax. CEL is a C-like expression language. The 1191// syntax and semantics of CEL are documented at 1192// https://github.com/google/cel-spec. Example (Comparison): title: 1193// "Summary size limit" description: "Determines if a summary is less 1194// than 100 chars" expression: "document.summary.size() < 100" Example 1195// (Equality): title: "Requestor is owner" description: "Determines if 1196// requestor is the document owner" expression: "document.owner == 1197// request.auth.claims.email" Example (Logic): title: "Public documents" 1198// description: "Determine whether the document should be publicly 1199// visible" expression: "document.type != 'private' && document.type != 1200// 'internal'" Example (Data Manipulation): title: "Notification string" 1201// description: "Create a notification string with a timestamp." 1202// expression: "'New message received at ' + 1203// string(document.create_time)" The exact variables and functions that 1204// may be referenced within an expression are determined by the service 1205// that evaluates it. See the service documentation for additional 1206// information. 1207type Expr struct { 1208 // Description: Optional. Description of the expression. This is a 1209 // longer text which describes the expression, e.g. when hovered over it 1210 // in a UI. 1211 Description string `json:"description,omitempty"` 1212 1213 // Expression: Textual representation of an expression in Common 1214 // Expression Language syntax. 1215 Expression string `json:"expression,omitempty"` 1216 1217 // Location: Optional. String indicating the location of the expression 1218 // for error reporting, e.g. a file name and a position in the file. 1219 Location string `json:"location,omitempty"` 1220 1221 // Title: Optional. Title for the expression, i.e. a short string 1222 // describing its purpose. This can be used e.g. in UIs which allow to 1223 // enter the expression. 1224 Title string `json:"title,omitempty"` 1225 1226 // ForceSendFields is a list of field names (e.g. "Description") to 1227 // unconditionally include in API requests. By default, fields with 1228 // empty values are omitted from API requests. However, any non-pointer, 1229 // non-interface field appearing in ForceSendFields will be sent to the 1230 // server regardless of whether the field is empty or not. This may be 1231 // used to include empty fields in Patch requests. 1232 ForceSendFields []string `json:"-"` 1233 1234 // NullFields is a list of field names (e.g. "Description") to include 1235 // in API requests with the JSON null value. By default, fields with 1236 // empty values are omitted from API requests. However, any field with 1237 // an empty value appearing in NullFields will be sent to the server as 1238 // null. It is an error if a field in this list has a non-empty value. 1239 // This may be used to include null fields in Patch requests. 1240 NullFields []string `json:"-"` 1241} 1242 1243func (s *Expr) MarshalJSON() ([]byte, error) { 1244 type NoMethod Expr 1245 raw := NoMethod(*s) 1246 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1247} 1248 1249// ExtendedKeyUsageOptions: KeyUsage.ExtendedKeyUsageOptions has fields 1250// that correspond to certain common OIDs that could be specified as an 1251// extended key usage value. 1252type ExtendedKeyUsageOptions struct { 1253 // ClientAuth: Corresponds to OID 1.3.6.1.5.5.7.3.2. Officially 1254 // described as "TLS WWW client authentication", though regularly used 1255 // for non-WWW TLS. 1256 ClientAuth bool `json:"clientAuth,omitempty"` 1257 1258 // CodeSigning: Corresponds to OID 1.3.6.1.5.5.7.3.3. Officially 1259 // described as "Signing of downloadable executable code client 1260 // authentication". 1261 CodeSigning bool `json:"codeSigning,omitempty"` 1262 1263 // EmailProtection: Corresponds to OID 1.3.6.1.5.5.7.3.4. Officially 1264 // described as "Email protection". 1265 EmailProtection bool `json:"emailProtection,omitempty"` 1266 1267 // OcspSigning: Corresponds to OID 1.3.6.1.5.5.7.3.9. Officially 1268 // described as "Signing OCSP responses". 1269 OcspSigning bool `json:"ocspSigning,omitempty"` 1270 1271 // ServerAuth: Corresponds to OID 1.3.6.1.5.5.7.3.1. Officially 1272 // described as "TLS WWW server authentication", though regularly used 1273 // for non-WWW TLS. 1274 ServerAuth bool `json:"serverAuth,omitempty"` 1275 1276 // TimeStamping: Corresponds to OID 1.3.6.1.5.5.7.3.8. Officially 1277 // described as "Binding the hash of an object to a time". 1278 TimeStamping bool `json:"timeStamping,omitempty"` 1279 1280 // ForceSendFields is a list of field names (e.g. "ClientAuth") to 1281 // unconditionally include in API requests. By default, fields with 1282 // empty values are omitted from API requests. However, any non-pointer, 1283 // non-interface field appearing in ForceSendFields will be sent to the 1284 // server regardless of whether the field is empty or not. This may be 1285 // used to include empty fields in Patch requests. 1286 ForceSendFields []string `json:"-"` 1287 1288 // NullFields is a list of field names (e.g. "ClientAuth") to include in 1289 // API requests with the JSON null value. By default, fields with empty 1290 // values are omitted from API requests. However, any field with an 1291 // empty value appearing in NullFields will be sent to the server as 1292 // null. It is an error if a field in this list has a non-empty value. 1293 // This may be used to include null fields in Patch requests. 1294 NullFields []string `json:"-"` 1295} 1296 1297func (s *ExtendedKeyUsageOptions) MarshalJSON() ([]byte, error) { 1298 type NoMethod ExtendedKeyUsageOptions 1299 raw := NoMethod(*s) 1300 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1301} 1302 1303// FetchCertificateAuthorityCsrResponse: Response message for 1304// CertificateAuthorityService.FetchCertificateAuthorityCsr. 1305type FetchCertificateAuthorityCsrResponse struct { 1306 // PemCsr: Output only. The PEM-encoded signed certificate signing 1307 // request (CSR). 1308 PemCsr string `json:"pemCsr,omitempty"` 1309 1310 // ServerResponse contains the HTTP response code and headers from the 1311 // server. 1312 googleapi.ServerResponse `json:"-"` 1313 1314 // ForceSendFields is a list of field names (e.g. "PemCsr") to 1315 // unconditionally include in API requests. By default, fields with 1316 // empty values are omitted from API requests. However, any non-pointer, 1317 // non-interface field appearing in ForceSendFields will be sent to the 1318 // server regardless of whether the field is empty or not. This may be 1319 // used to include empty fields in Patch requests. 1320 ForceSendFields []string `json:"-"` 1321 1322 // NullFields is a list of field names (e.g. "PemCsr") to include in API 1323 // requests with the JSON null value. By default, fields with empty 1324 // values are omitted from API requests. However, any field with an 1325 // empty value appearing in NullFields will be sent to the server as 1326 // null. It is an error if a field in this list has a non-empty value. 1327 // This may be used to include null fields in Patch requests. 1328 NullFields []string `json:"-"` 1329} 1330 1331func (s *FetchCertificateAuthorityCsrResponse) MarshalJSON() ([]byte, error) { 1332 type NoMethod FetchCertificateAuthorityCsrResponse 1333 raw := NoMethod(*s) 1334 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1335} 1336 1337// IssuanceModes: IssuanceModes specifies the allowed ways in which 1338// Certificates may be requested from this CertificateAuthority. 1339type IssuanceModes struct { 1340 // AllowConfigBasedIssuance: Required. When true, allows callers to 1341 // create Certificates by specifying a CertificateConfig. 1342 AllowConfigBasedIssuance bool `json:"allowConfigBasedIssuance,omitempty"` 1343 1344 // AllowCsrBasedIssuance: Required. When true, allows callers to create 1345 // Certificates by specifying a CSR. 1346 AllowCsrBasedIssuance bool `json:"allowCsrBasedIssuance,omitempty"` 1347 1348 // ForceSendFields is a list of field names (e.g. 1349 // "AllowConfigBasedIssuance") to unconditionally include in API 1350 // requests. By default, fields with empty values are omitted from API 1351 // requests. However, any non-pointer, non-interface field appearing in 1352 // ForceSendFields will be sent to the server regardless of whether the 1353 // field is empty or not. This may be used to include empty fields in 1354 // Patch requests. 1355 ForceSendFields []string `json:"-"` 1356 1357 // NullFields is a list of field names (e.g. "AllowConfigBasedIssuance") 1358 // to include in API requests with the JSON null value. By default, 1359 // fields with empty values are omitted from API requests. However, any 1360 // field with an empty value appearing in NullFields will be sent to the 1361 // server as null. It is an error if a field in this list has a 1362 // non-empty value. This may be used to include null fields in Patch 1363 // requests. 1364 NullFields []string `json:"-"` 1365} 1366 1367func (s *IssuanceModes) MarshalJSON() ([]byte, error) { 1368 type NoMethod IssuanceModes 1369 raw := NoMethod(*s) 1370 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1371} 1372 1373// IssuingOptions: Options that affect all certificates issued by a 1374// CertificateAuthority. 1375type IssuingOptions struct { 1376 // IncludeCaCertUrl: Required. When true, includes a URL to the issuing 1377 // CA certificate in the "authority information access" X.509 extension. 1378 IncludeCaCertUrl bool `json:"includeCaCertUrl,omitempty"` 1379 1380 // IncludeCrlAccessUrl: Required. When true, includes a URL to the CRL 1381 // corresponding to certificates issued from a CertificateAuthority. 1382 // CRLs will expire 7 days from their creation. However, we will rebuild 1383 // daily. CRLs are also rebuilt shortly after a certificate is revoked. 1384 IncludeCrlAccessUrl bool `json:"includeCrlAccessUrl,omitempty"` 1385 1386 // ForceSendFields is a list of field names (e.g. "IncludeCaCertUrl") to 1387 // unconditionally include in API requests. By default, fields with 1388 // empty values are omitted from API requests. However, any non-pointer, 1389 // non-interface field appearing in ForceSendFields will be sent to the 1390 // server regardless of whether the field is empty or not. This may be 1391 // used to include empty fields in Patch requests. 1392 ForceSendFields []string `json:"-"` 1393 1394 // NullFields is a list of field names (e.g. "IncludeCaCertUrl") to 1395 // include in API requests with the JSON null value. By default, fields 1396 // with empty values are omitted from API requests. However, any field 1397 // with an empty value appearing in NullFields will be sent to the 1398 // server as null. It is an error if a field in this list has a 1399 // non-empty value. This may be used to include null fields in Patch 1400 // requests. 1401 NullFields []string `json:"-"` 1402} 1403 1404func (s *IssuingOptions) MarshalJSON() ([]byte, error) { 1405 type NoMethod IssuingOptions 1406 raw := NoMethod(*s) 1407 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1408} 1409 1410// KeyId: A KeyId identifies a specific public key, usually by hashing 1411// the public key. 1412type KeyId struct { 1413 // KeyId: Optional. The value of this KeyId encoded in lowercase 1414 // hexadecimal. This is most likely the 160 bit SHA-1 hash of the public 1415 // key. 1416 KeyId string `json:"keyId,omitempty"` 1417 1418 // ForceSendFields is a list of field names (e.g. "KeyId") to 1419 // unconditionally include in API requests. By default, fields with 1420 // empty values are omitted from API requests. However, any non-pointer, 1421 // non-interface field appearing in ForceSendFields will be sent to the 1422 // server regardless of whether the field is empty or not. This may be 1423 // used to include empty fields in Patch requests. 1424 ForceSendFields []string `json:"-"` 1425 1426 // NullFields is a list of field names (e.g. "KeyId") to include in API 1427 // requests with the JSON null value. By default, fields with empty 1428 // values are omitted from API requests. However, any field with an 1429 // empty value appearing in NullFields will be sent to the server as 1430 // null. It is an error if a field in this list has a non-empty value. 1431 // This may be used to include null fields in Patch requests. 1432 NullFields []string `json:"-"` 1433} 1434 1435func (s *KeyId) MarshalJSON() ([]byte, error) { 1436 type NoMethod KeyId 1437 raw := NoMethod(*s) 1438 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1439} 1440 1441// KeyUsage: A KeyUsage describes key usage values that may appear in an 1442// X.509 certificate. 1443type KeyUsage struct { 1444 // BaseKeyUsage: Describes high-level ways in which a key may be used. 1445 BaseKeyUsage *KeyUsageOptions `json:"baseKeyUsage,omitempty"` 1446 1447 // ExtendedKeyUsage: Detailed scenarios in which a key may be used. 1448 ExtendedKeyUsage *ExtendedKeyUsageOptions `json:"extendedKeyUsage,omitempty"` 1449 1450 // UnknownExtendedKeyUsages: Used to describe extended key usages that 1451 // are not listed in the KeyUsage.ExtendedKeyUsageOptions message. 1452 UnknownExtendedKeyUsages []*ObjectId `json:"unknownExtendedKeyUsages,omitempty"` 1453 1454 // ForceSendFields is a list of field names (e.g. "BaseKeyUsage") to 1455 // unconditionally include in API requests. By default, fields with 1456 // empty values are omitted from API requests. However, any non-pointer, 1457 // non-interface field appearing in ForceSendFields will be sent to the 1458 // server regardless of whether the field is empty or not. This may be 1459 // used to include empty fields in Patch requests. 1460 ForceSendFields []string `json:"-"` 1461 1462 // NullFields is a list of field names (e.g. "BaseKeyUsage") to include 1463 // in API requests with the JSON null value. By default, fields with 1464 // empty values are omitted from API requests. However, any field with 1465 // an empty value appearing in NullFields will be sent to the server as 1466 // null. It is an error if a field in this list has a non-empty value. 1467 // This may be used to include null fields in Patch requests. 1468 NullFields []string `json:"-"` 1469} 1470 1471func (s *KeyUsage) MarshalJSON() ([]byte, error) { 1472 type NoMethod KeyUsage 1473 raw := NoMethod(*s) 1474 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1475} 1476 1477// KeyUsageOptions: KeyUsage.KeyUsageOptions corresponds to the key 1478// usage values described in 1479// https://tools.ietf.org/html/rfc5280#section-4.2.1.3. 1480type KeyUsageOptions struct { 1481 // CertSign: The key may be used to sign certificates. 1482 CertSign bool `json:"certSign,omitempty"` 1483 1484 // ContentCommitment: The key may be used for cryptographic commitments. 1485 // Note that this may also be referred to as "non-repudiation". 1486 ContentCommitment bool `json:"contentCommitment,omitempty"` 1487 1488 // CrlSign: The key may be used sign certificate revocation lists. 1489 CrlSign bool `json:"crlSign,omitempty"` 1490 1491 // DataEncipherment: The key may be used to encipher data. 1492 DataEncipherment bool `json:"dataEncipherment,omitempty"` 1493 1494 // DecipherOnly: The key may be used to decipher only. 1495 DecipherOnly bool `json:"decipherOnly,omitempty"` 1496 1497 // DigitalSignature: The key may be used for digital signatures. 1498 DigitalSignature bool `json:"digitalSignature,omitempty"` 1499 1500 // EncipherOnly: The key may be used to encipher only. 1501 EncipherOnly bool `json:"encipherOnly,omitempty"` 1502 1503 // KeyAgreement: The key may be used in a key agreement protocol. 1504 KeyAgreement bool `json:"keyAgreement,omitempty"` 1505 1506 // KeyEncipherment: The key may be used to encipher other keys. 1507 KeyEncipherment bool `json:"keyEncipherment,omitempty"` 1508 1509 // ForceSendFields is a list of field names (e.g. "CertSign") to 1510 // unconditionally include in API requests. By default, fields with 1511 // empty values are omitted from API requests. However, any non-pointer, 1512 // non-interface field appearing in ForceSendFields will be sent to the 1513 // server regardless of whether the field is empty or not. This may be 1514 // used to include empty fields in Patch requests. 1515 ForceSendFields []string `json:"-"` 1516 1517 // NullFields is a list of field names (e.g. "CertSign") to include in 1518 // API requests with the JSON null value. By default, fields with empty 1519 // values are omitted from API requests. However, any field with an 1520 // empty value appearing in NullFields will be sent to the server as 1521 // null. It is an error if a field in this list has a non-empty value. 1522 // This may be used to include null fields in Patch requests. 1523 NullFields []string `json:"-"` 1524} 1525 1526func (s *KeyUsageOptions) MarshalJSON() ([]byte, error) { 1527 type NoMethod KeyUsageOptions 1528 raw := NoMethod(*s) 1529 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1530} 1531 1532// KeyVersionSpec: A Cloud KMS key configuration that a 1533// CertificateAuthority will use. 1534type KeyVersionSpec struct { 1535 // Algorithm: Required. The algorithm to use for creating a managed 1536 // Cloud KMS key for a for a simplified experience. All managed keys 1537 // will be have their ProtectionLevel as `HSM`. 1538 // 1539 // Possible values: 1540 // "SIGN_HASH_ALGORITHM_UNSPECIFIED" - Not specified. 1541 // "RSA_PSS_2048_SHA256" - maps to 1542 // CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_2048_SHA256 1543 // "RSA_PSS_3072_SHA256" - maps to CryptoKeyVersionAlgorithm. 1544 // RSA_SIGN_PSS_3072_SHA256 1545 // "RSA_PSS_4096_SHA256" - maps to 1546 // CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_4096_SHA256 1547 // "RSA_PKCS1_2048_SHA256" - maps to 1548 // CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_2048_SHA256 1549 // "RSA_PKCS1_3072_SHA256" - maps to 1550 // CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_3072_SHA256 1551 // "RSA_PKCS1_4096_SHA256" - maps to 1552 // CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_4096_SHA256 1553 // "EC_P256_SHA256" - maps to 1554 // CryptoKeyVersionAlgorithm.EC_SIGN_P256_SHA256 1555 // "EC_P384_SHA384" - maps to 1556 // CryptoKeyVersionAlgorithm.EC_SIGN_P384_SHA384 1557 Algorithm string `json:"algorithm,omitempty"` 1558 1559 // CloudKmsKeyVersion: Required. The resource name for an existing Cloud 1560 // KMS CryptoKeyVersion in the format 1561 // `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. 1562 // This option enables full flexibility in the key's capabilities and 1563 // properties. 1564 CloudKmsKeyVersion string `json:"cloudKmsKeyVersion,omitempty"` 1565 1566 // ForceSendFields is a list of field names (e.g. "Algorithm") to 1567 // unconditionally include in API requests. By default, fields with 1568 // empty values are omitted from API requests. However, any non-pointer, 1569 // non-interface field appearing in ForceSendFields will be sent to the 1570 // server regardless of whether the field is empty or not. This may be 1571 // used to include empty fields in Patch requests. 1572 ForceSendFields []string `json:"-"` 1573 1574 // NullFields is a list of field names (e.g. "Algorithm") to include in 1575 // API requests with the JSON null value. By default, fields with empty 1576 // values are omitted from API requests. However, any field with an 1577 // empty value appearing in NullFields will be sent to the server as 1578 // null. It is an error if a field in this list has a non-empty value. 1579 // This may be used to include null fields in Patch requests. 1580 NullFields []string `json:"-"` 1581} 1582 1583func (s *KeyVersionSpec) MarshalJSON() ([]byte, error) { 1584 type NoMethod KeyVersionSpec 1585 raw := NoMethod(*s) 1586 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1587} 1588 1589// ListCertificateAuthoritiesResponse: Response message for 1590// CertificateAuthorityService.ListCertificateAuthorities. 1591type ListCertificateAuthoritiesResponse struct { 1592 // CertificateAuthorities: The list of CertificateAuthorities. 1593 CertificateAuthorities []*CertificateAuthority `json:"certificateAuthorities,omitempty"` 1594 1595 // NextPageToken: A token to retrieve next page of results. Pass this 1596 // value in ListCertificateAuthoritiesRequest.next_page_token to 1597 // retrieve the next page of results. 1598 NextPageToken string `json:"nextPageToken,omitempty"` 1599 1600 // Unreachable: A list of locations (e.g. "us-west1") that could not be 1601 // reached. 1602 Unreachable []string `json:"unreachable,omitempty"` 1603 1604 // ServerResponse contains the HTTP response code and headers from the 1605 // server. 1606 googleapi.ServerResponse `json:"-"` 1607 1608 // ForceSendFields is a list of field names (e.g. 1609 // "CertificateAuthorities") to unconditionally include in API requests. 1610 // By default, fields with empty values are omitted from API requests. 1611 // However, any non-pointer, non-interface field appearing in 1612 // ForceSendFields will be sent to the server regardless of whether the 1613 // field is empty or not. This may be used to include empty fields in 1614 // Patch requests. 1615 ForceSendFields []string `json:"-"` 1616 1617 // NullFields is a list of field names (e.g. "CertificateAuthorities") 1618 // to include in API requests with the JSON null value. By default, 1619 // fields with empty values are omitted from API requests. However, any 1620 // field with an empty value appearing in NullFields will be sent to the 1621 // server as null. It is an error if a field in this list has a 1622 // non-empty value. This may be used to include null fields in Patch 1623 // requests. 1624 NullFields []string `json:"-"` 1625} 1626 1627func (s *ListCertificateAuthoritiesResponse) MarshalJSON() ([]byte, error) { 1628 type NoMethod ListCertificateAuthoritiesResponse 1629 raw := NoMethod(*s) 1630 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1631} 1632 1633// ListCertificateRevocationListsResponse: Response message for 1634// CertificateAuthorityService.ListCertificateRevocationLists. 1635type ListCertificateRevocationListsResponse struct { 1636 // CertificateRevocationLists: The list of CertificateRevocationLists. 1637 CertificateRevocationLists []*CertificateRevocationList `json:"certificateRevocationLists,omitempty"` 1638 1639 // NextPageToken: A token to retrieve next page of results. Pass this 1640 // value in ListCertificateRevocationListsRequest.next_page_token to 1641 // retrieve the next page of results. 1642 NextPageToken string `json:"nextPageToken,omitempty"` 1643 1644 // Unreachable: A list of locations (e.g. "us-west1") that could not be 1645 // reached. 1646 Unreachable []string `json:"unreachable,omitempty"` 1647 1648 // ServerResponse contains the HTTP response code and headers from the 1649 // server. 1650 googleapi.ServerResponse `json:"-"` 1651 1652 // ForceSendFields is a list of field names (e.g. 1653 // "CertificateRevocationLists") to unconditionally include in API 1654 // requests. By default, fields with empty values are omitted from API 1655 // requests. However, any non-pointer, non-interface field appearing in 1656 // ForceSendFields will be sent to the server regardless of whether the 1657 // field is empty or not. This may be used to include empty fields in 1658 // Patch requests. 1659 ForceSendFields []string `json:"-"` 1660 1661 // NullFields is a list of field names (e.g. 1662 // "CertificateRevocationLists") to include in API requests with the 1663 // JSON null value. By default, fields with empty values are omitted 1664 // from API requests. However, any field with an empty value appearing 1665 // in NullFields will be sent to the server as null. It is an error if a 1666 // field in this list has a non-empty value. This may be used to include 1667 // null fields in Patch requests. 1668 NullFields []string `json:"-"` 1669} 1670 1671func (s *ListCertificateRevocationListsResponse) MarshalJSON() ([]byte, error) { 1672 type NoMethod ListCertificateRevocationListsResponse 1673 raw := NoMethod(*s) 1674 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1675} 1676 1677// ListCertificatesResponse: Response message for 1678// CertificateAuthorityService.ListCertificates. 1679type ListCertificatesResponse struct { 1680 // Certificates: The list of Certificates. 1681 Certificates []*Certificate `json:"certificates,omitempty"` 1682 1683 // NextPageToken: A token to retrieve next page of results. Pass this 1684 // value in ListCertificatesRequest.next_page_token to retrieve the next 1685 // page of results. 1686 NextPageToken string `json:"nextPageToken,omitempty"` 1687 1688 // Unreachable: A list of locations (e.g. "us-west1") that could not be 1689 // reached. 1690 Unreachable []string `json:"unreachable,omitempty"` 1691 1692 // ServerResponse contains the HTTP response code and headers from the 1693 // server. 1694 googleapi.ServerResponse `json:"-"` 1695 1696 // ForceSendFields is a list of field names (e.g. "Certificates") to 1697 // unconditionally include in API requests. By default, fields with 1698 // empty values are omitted from API requests. However, any non-pointer, 1699 // non-interface field appearing in ForceSendFields will be sent to the 1700 // server regardless of whether the field is empty or not. This may be 1701 // used to include empty fields in Patch requests. 1702 ForceSendFields []string `json:"-"` 1703 1704 // NullFields is a list of field names (e.g. "Certificates") to include 1705 // in API requests with the JSON null value. By default, fields with 1706 // empty values are omitted from API requests. However, any field with 1707 // an empty value appearing in NullFields will be sent to the server as 1708 // null. It is an error if a field in this list has a non-empty value. 1709 // This may be used to include null fields in Patch requests. 1710 NullFields []string `json:"-"` 1711} 1712 1713func (s *ListCertificatesResponse) MarshalJSON() ([]byte, error) { 1714 type NoMethod ListCertificatesResponse 1715 raw := NoMethod(*s) 1716 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1717} 1718 1719// ListLocationsResponse: The response message for 1720// Locations.ListLocations. 1721type ListLocationsResponse struct { 1722 // Locations: A list of locations that matches the specified filter in 1723 // the request. 1724 Locations []*Location `json:"locations,omitempty"` 1725 1726 // NextPageToken: The standard List next-page token. 1727 NextPageToken string `json:"nextPageToken,omitempty"` 1728 1729 // ServerResponse contains the HTTP response code and headers from the 1730 // server. 1731 googleapi.ServerResponse `json:"-"` 1732 1733 // ForceSendFields is a list of field names (e.g. "Locations") to 1734 // unconditionally include in API requests. By default, fields with 1735 // empty values are omitted from API requests. However, any non-pointer, 1736 // non-interface field appearing in ForceSendFields will be sent to the 1737 // server regardless of whether the field is empty or not. This may be 1738 // used to include empty fields in Patch requests. 1739 ForceSendFields []string `json:"-"` 1740 1741 // NullFields is a list of field names (e.g. "Locations") to include in 1742 // API requests with the JSON null value. By default, fields with empty 1743 // values are omitted from API requests. However, any field with an 1744 // empty value appearing in NullFields will be sent to the server as 1745 // null. It is an error if a field in this list has a non-empty value. 1746 // This may be used to include null fields in Patch requests. 1747 NullFields []string `json:"-"` 1748} 1749 1750func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { 1751 type NoMethod ListLocationsResponse 1752 raw := NoMethod(*s) 1753 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1754} 1755 1756// ListOperationsResponse: The response message for 1757// Operations.ListOperations. 1758type ListOperationsResponse struct { 1759 // NextPageToken: The standard List next-page token. 1760 NextPageToken string `json:"nextPageToken,omitempty"` 1761 1762 // Operations: A list of operations that matches the specified filter in 1763 // the request. 1764 Operations []*Operation `json:"operations,omitempty"` 1765 1766 // ServerResponse contains the HTTP response code and headers from the 1767 // server. 1768 googleapi.ServerResponse `json:"-"` 1769 1770 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 1771 // unconditionally include in API requests. By default, fields with 1772 // empty values are omitted from API requests. However, any non-pointer, 1773 // non-interface field appearing in ForceSendFields will be sent to the 1774 // server regardless of whether the field is empty or not. This may be 1775 // used to include empty fields in Patch requests. 1776 ForceSendFields []string `json:"-"` 1777 1778 // NullFields is a list of field names (e.g. "NextPageToken") to include 1779 // in API requests with the JSON null value. By default, fields with 1780 // empty values are omitted from API requests. However, any field with 1781 // an empty value appearing in NullFields will be sent to the server as 1782 // null. It is an error if a field in this list has a non-empty value. 1783 // This may be used to include null fields in Patch requests. 1784 NullFields []string `json:"-"` 1785} 1786 1787func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { 1788 type NoMethod ListOperationsResponse 1789 raw := NoMethod(*s) 1790 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1791} 1792 1793// ListReusableConfigsResponse: Response message for 1794// CertificateAuthorityService.ListReusableConfigs. 1795type ListReusableConfigsResponse struct { 1796 // NextPageToken: A token to retrieve next page of results. Pass this 1797 // value in ListReusableConfigsRequest.next_page_token to retrieve the 1798 // next page of results. 1799 NextPageToken string `json:"nextPageToken,omitempty"` 1800 1801 // ReusableConfigs: The list of ReusableConfigs. 1802 ReusableConfigs []*ReusableConfig `json:"reusableConfigs,omitempty"` 1803 1804 // Unreachable: A list of locations (e.g. "us-west1") that could not be 1805 // reached. 1806 Unreachable []string `json:"unreachable,omitempty"` 1807 1808 // ServerResponse contains the HTTP response code and headers from the 1809 // server. 1810 googleapi.ServerResponse `json:"-"` 1811 1812 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 1813 // unconditionally include in API requests. By default, fields with 1814 // empty values are omitted from API requests. However, any non-pointer, 1815 // non-interface field appearing in ForceSendFields will be sent to the 1816 // server regardless of whether the field is empty or not. This may be 1817 // used to include empty fields in Patch requests. 1818 ForceSendFields []string `json:"-"` 1819 1820 // NullFields is a list of field names (e.g. "NextPageToken") to include 1821 // in API requests with the JSON null value. By default, fields with 1822 // empty values are omitted from API requests. However, any field with 1823 // an empty value appearing in NullFields will be sent to the server as 1824 // null. It is an error if a field in this list has a non-empty value. 1825 // This may be used to include null fields in Patch requests. 1826 NullFields []string `json:"-"` 1827} 1828 1829func (s *ListReusableConfigsResponse) MarshalJSON() ([]byte, error) { 1830 type NoMethod ListReusableConfigsResponse 1831 raw := NoMethod(*s) 1832 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1833} 1834 1835// Location: A resource that represents Google Cloud Platform location. 1836type Location struct { 1837 // DisplayName: The friendly name for this location, typically a nearby 1838 // city name. For example, "Tokyo". 1839 DisplayName string `json:"displayName,omitempty"` 1840 1841 // Labels: Cross-service attributes for the location. For example 1842 // {"cloud.googleapis.com/region": "us-east1"} 1843 Labels map[string]string `json:"labels,omitempty"` 1844 1845 // LocationId: The canonical id for this location. For example: 1846 // "us-east1". 1847 LocationId string `json:"locationId,omitempty"` 1848 1849 // Metadata: Service-specific metadata. For example the available 1850 // capacity at the given location. 1851 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 1852 1853 // Name: Resource name for the location, which may vary between 1854 // implementations. For example: 1855 // "projects/example-project/locations/us-east1" 1856 Name string `json:"name,omitempty"` 1857 1858 // ServerResponse contains the HTTP response code and headers from the 1859 // server. 1860 googleapi.ServerResponse `json:"-"` 1861 1862 // ForceSendFields is a list of field names (e.g. "DisplayName") to 1863 // unconditionally include in API requests. By default, fields with 1864 // empty values are omitted from API requests. However, any non-pointer, 1865 // non-interface field appearing in ForceSendFields will be sent to the 1866 // server regardless of whether the field is empty or not. This may be 1867 // used to include empty fields in Patch requests. 1868 ForceSendFields []string `json:"-"` 1869 1870 // NullFields is a list of field names (e.g. "DisplayName") to include 1871 // in API requests with the JSON null value. By default, fields with 1872 // empty values are omitted from API requests. However, any field with 1873 // an empty value appearing in NullFields will be sent to the server as 1874 // null. It is an error if a field in this list has a non-empty value. 1875 // This may be used to include null fields in Patch requests. 1876 NullFields []string `json:"-"` 1877} 1878 1879func (s *Location) MarshalJSON() ([]byte, error) { 1880 type NoMethod Location 1881 raw := NoMethod(*s) 1882 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1883} 1884 1885// ObjectId: An ObjectId specifies an object identifier (OID). These 1886// provide context and describe types in ASN.1 messages. 1887type ObjectId struct { 1888 // ObjectIdPath: Required. The parts of an OID path. The most 1889 // significant parts of the path come first. 1890 ObjectIdPath []int64 `json:"objectIdPath,omitempty"` 1891 1892 // ForceSendFields is a list of field names (e.g. "ObjectIdPath") to 1893 // unconditionally include in API requests. By default, fields with 1894 // empty values are omitted from API requests. However, any non-pointer, 1895 // non-interface field appearing in ForceSendFields will be sent to the 1896 // server regardless of whether the field is empty or not. This may be 1897 // used to include empty fields in Patch requests. 1898 ForceSendFields []string `json:"-"` 1899 1900 // NullFields is a list of field names (e.g. "ObjectIdPath") to include 1901 // in API requests with the JSON null value. By default, fields with 1902 // empty values are omitted from API requests. However, any field with 1903 // an empty value appearing in NullFields will be sent to the server as 1904 // null. It is an error if a field in this list has a non-empty value. 1905 // This may be used to include null fields in Patch requests. 1906 NullFields []string `json:"-"` 1907} 1908 1909func (s *ObjectId) MarshalJSON() ([]byte, error) { 1910 type NoMethod ObjectId 1911 raw := NoMethod(*s) 1912 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1913} 1914 1915// Operation: This resource represents a long-running operation that is 1916// the result of a network API call. 1917type Operation struct { 1918 // Done: If the value is `false`, it means the operation is still in 1919 // progress. If `true`, the operation is completed, and either `error` 1920 // or `response` is available. 1921 Done bool `json:"done,omitempty"` 1922 1923 // Error: The error result of the operation in case of failure or 1924 // cancellation. 1925 Error *Status `json:"error,omitempty"` 1926 1927 // Metadata: Service-specific metadata associated with the operation. It 1928 // typically contains progress information and common metadata such as 1929 // create time. Some services might not provide such metadata. Any 1930 // method that returns a long-running operation should document the 1931 // metadata type, if any. 1932 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 1933 1934 // Name: The server-assigned name, which is only unique within the same 1935 // service that originally returns it. If you use the default HTTP 1936 // mapping, the `name` should be a resource name ending with 1937 // `operations/{unique_id}`. 1938 Name string `json:"name,omitempty"` 1939 1940 // Response: The normal response of the operation in case of success. If 1941 // the original method returns no data on success, such as `Delete`, the 1942 // response is `google.protobuf.Empty`. If the original method is 1943 // standard `Get`/`Create`/`Update`, the response should be the 1944 // resource. For other methods, the response should have the type 1945 // `XxxResponse`, where `Xxx` is the original method name. For example, 1946 // if the original method name is `TakeSnapshot()`, the inferred 1947 // response type is `TakeSnapshotResponse`. 1948 Response googleapi.RawMessage `json:"response,omitempty"` 1949 1950 // ServerResponse contains the HTTP response code and headers from the 1951 // server. 1952 googleapi.ServerResponse `json:"-"` 1953 1954 // ForceSendFields is a list of field names (e.g. "Done") to 1955 // unconditionally include in API requests. By default, fields with 1956 // empty values are omitted from API requests. However, any non-pointer, 1957 // non-interface field appearing in ForceSendFields will be sent to the 1958 // server regardless of whether the field is empty or not. This may be 1959 // used to include empty fields in Patch requests. 1960 ForceSendFields []string `json:"-"` 1961 1962 // NullFields is a list of field names (e.g. "Done") to include in API 1963 // requests with the JSON null value. By default, fields with empty 1964 // values are omitted from API requests. However, any field with an 1965 // empty value appearing in NullFields will be sent to the server as 1966 // null. It is an error if a field in this list has a non-empty value. 1967 // This may be used to include null fields in Patch requests. 1968 NullFields []string `json:"-"` 1969} 1970 1971func (s *Operation) MarshalJSON() ([]byte, error) { 1972 type NoMethod Operation 1973 raw := NoMethod(*s) 1974 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1975} 1976 1977// OperationMetadata: Represents the metadata of the long-running 1978// operation. 1979type OperationMetadata struct { 1980 // ApiVersion: Output only. API version used to start the operation. 1981 ApiVersion string `json:"apiVersion,omitempty"` 1982 1983 // CreateTime: Output only. The time the operation was created. 1984 CreateTime string `json:"createTime,omitempty"` 1985 1986 // EndTime: Output only. The time the operation finished running. 1987 EndTime string `json:"endTime,omitempty"` 1988 1989 // RequestedCancellation: Output only. Identifies whether the user has 1990 // requested cancellation of the operation. Operations that have 1991 // successfully been cancelled have Operation.error value with a 1992 // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. 1993 RequestedCancellation bool `json:"requestedCancellation,omitempty"` 1994 1995 // StatusMessage: Output only. Human-readable status of the operation, 1996 // if any. 1997 StatusMessage string `json:"statusMessage,omitempty"` 1998 1999 // Target: Output only. Server-defined resource path for the target of 2000 // the operation. 2001 Target string `json:"target,omitempty"` 2002 2003 // Verb: Output only. Name of the verb executed by the operation. 2004 Verb string `json:"verb,omitempty"` 2005 2006 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 2007 // unconditionally include in API requests. By default, fields with 2008 // empty values are omitted from API requests. However, any non-pointer, 2009 // non-interface field appearing in ForceSendFields will be sent to the 2010 // server regardless of whether the field is empty or not. This may be 2011 // used to include empty fields in Patch requests. 2012 ForceSendFields []string `json:"-"` 2013 2014 // NullFields is a list of field names (e.g. "ApiVersion") to include in 2015 // API requests with the JSON null value. By default, fields with empty 2016 // values are omitted from API requests. However, any field with an 2017 // empty value appearing in NullFields will be sent to the server as 2018 // null. It is an error if a field in this list has a non-empty value. 2019 // This may be used to include null fields in Patch requests. 2020 NullFields []string `json:"-"` 2021} 2022 2023func (s *OperationMetadata) MarshalJSON() ([]byte, error) { 2024 type NoMethod OperationMetadata 2025 raw := NoMethod(*s) 2026 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2027} 2028 2029// Policy: An Identity and Access Management (IAM) policy, which 2030// specifies access controls for Google Cloud resources. A `Policy` is a 2031// collection of `bindings`. A `binding` binds one or more `members` to 2032// a single `role`. Members can be user accounts, service accounts, 2033// Google groups, and domains (such as G Suite). A `role` is a named 2034// list of permissions; each `role` can be an IAM predefined role or a 2035// user-created custom role. For some types of Google Cloud resources, a 2036// `binding` can also specify a `condition`, which is a logical 2037// expression that allows access to a resource only if the expression 2038// evaluates to `true`. A condition can add constraints based on 2039// attributes of the request, the resource, or both. To learn which 2040// resources support conditions in their IAM policies, see the [IAM 2041// documentation](https://cloud.google.com/iam/help/conditions/resource-p 2042// olicies). **JSON example:** { "bindings": [ { "role": 2043// "roles/resourcemanager.organizationAdmin", "members": [ 2044// "user:mike@example.com", "group:admins@example.com", 2045// "domain:google.com", 2046// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { 2047// "role": "roles/resourcemanager.organizationViewer", "members": [ 2048// "user:eve@example.com" ], "condition": { "title": "expirable access", 2049// "description": "Does not grant access after Sep 2020", "expression": 2050// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], 2051// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - 2052// members: - user:mike@example.com - group:admins@example.com - 2053// domain:google.com - 2054// serviceAccount:my-project-id@appspot.gserviceaccount.com role: 2055// roles/resourcemanager.organizationAdmin - members: - 2056// user:eve@example.com role: roles/resourcemanager.organizationViewer 2057// condition: title: expirable access description: Does not grant access 2058// after Sep 2020 expression: request.time < 2059// timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 2060// 3 For a description of IAM and its features, see the [IAM 2061// documentation](https://cloud.google.com/iam/docs/). 2062type Policy struct { 2063 // AuditConfigs: Specifies cloud audit logging configuration for this 2064 // policy. 2065 AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` 2066 2067 // Bindings: Associates a list of `members` to a `role`. Optionally, may 2068 // specify a `condition` that determines how and when the `bindings` are 2069 // applied. Each of the `bindings` must contain at least one member. 2070 Bindings []*Binding `json:"bindings,omitempty"` 2071 2072 // Etag: `etag` is used for optimistic concurrency control as a way to 2073 // help prevent simultaneous updates of a policy from overwriting each 2074 // other. It is strongly suggested that systems make use of the `etag` 2075 // in the read-modify-write cycle to perform policy updates in order to 2076 // avoid race conditions: An `etag` is returned in the response to 2077 // `getIamPolicy`, and systems are expected to put that etag in the 2078 // request to `setIamPolicy` to ensure that their change will be applied 2079 // to the same version of the policy. **Important:** If you use IAM 2080 // Conditions, you must include the `etag` field whenever you call 2081 // `setIamPolicy`. If you omit this field, then IAM allows you to 2082 // overwrite a version `3` policy with a version `1` policy, and all of 2083 // the conditions in the version `3` policy are lost. 2084 Etag string `json:"etag,omitempty"` 2085 2086 // Version: Specifies the format of the policy. Valid values are `0`, 2087 // `1`, and `3`. Requests that specify an invalid value are rejected. 2088 // Any operation that affects conditional role bindings must specify 2089 // version `3`. This requirement applies to the following operations: * 2090 // Getting a policy that includes a conditional role binding * Adding a 2091 // conditional role binding to a policy * Changing a conditional role 2092 // binding in a policy * Removing any role binding, with or without a 2093 // condition, from a policy that includes conditions **Important:** If 2094 // you use IAM Conditions, you must include the `etag` field whenever 2095 // you call `setIamPolicy`. If you omit this field, then IAM allows you 2096 // to overwrite a version `3` policy with a version `1` policy, and all 2097 // of the conditions in the version `3` policy are lost. If a policy 2098 // does not include any conditions, operations on that policy may 2099 // specify any valid version or leave the field unset. To learn which 2100 // resources support conditions in their IAM policies, see the [IAM 2101 // documentation](https://cloud.google.com/iam/help/conditions/resource-p 2102 // olicies). 2103 Version int64 `json:"version,omitempty"` 2104 2105 // ServerResponse contains the HTTP response code and headers from the 2106 // server. 2107 googleapi.ServerResponse `json:"-"` 2108 2109 // ForceSendFields is a list of field names (e.g. "AuditConfigs") to 2110 // unconditionally include in API requests. By default, fields with 2111 // empty values are omitted from API requests. However, any non-pointer, 2112 // non-interface field appearing in ForceSendFields will be sent to the 2113 // server regardless of whether the field is empty or not. This may be 2114 // used to include empty fields in Patch requests. 2115 ForceSendFields []string `json:"-"` 2116 2117 // NullFields is a list of field names (e.g. "AuditConfigs") to include 2118 // in API requests with the JSON null value. By default, fields with 2119 // empty values are omitted from API requests. However, any field with 2120 // an empty value appearing in NullFields will be sent to the server as 2121 // null. It is an error if a field in this list has a non-empty value. 2122 // This may be used to include null fields in Patch requests. 2123 NullFields []string `json:"-"` 2124} 2125 2126func (s *Policy) MarshalJSON() ([]byte, error) { 2127 type NoMethod Policy 2128 raw := NoMethod(*s) 2129 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2130} 2131 2132// PublicKey: A PublicKey describes a public key. 2133type PublicKey struct { 2134 // Key: Required. A public key. When this is specified in a request, the 2135 // padding and encoding can be any of the options described by the 2136 // respective 'KeyType' value. When this is generated by the service, it 2137 // will always be an RFC 5280 2138 // [SubjectPublicKeyInfo](https://tools.ietf.org/html/rfc5280#section-4.1 2139 // ) structure containing an algorithm identifier and a key. 2140 Key string `json:"key,omitempty"` 2141 2142 // Type: Required. The type of public key. 2143 // 2144 // Possible values: 2145 // "KEY_TYPE_UNSPECIFIED" - Default unspecified value. 2146 // "PEM_RSA_KEY" - A PEM-encoded PKCS#1/RFC 3447 RSAPrivateKey 2147 // structure, or an RFC 5280 2148 // [SubjectPublicKeyInfo](https://tools.ietf.org/html/rfc5280#section-4.1 2149 // ) structure containing the former. 2150 // "PEM_EC_KEY" - A PEM-encoded compressed NIST 2151 // P-256/secp256r1/prime256v1 or P-384 key, or an RFC 5280 2152 // [SubjectPublicKeyInfo](https://tools.ietf.org/html/rfc5280#section-4.1 2153 // ) structure containing the former. 2154 Type string `json:"type,omitempty"` 2155 2156 // ForceSendFields is a list of field names (e.g. "Key") to 2157 // unconditionally include in API requests. By default, fields with 2158 // empty values are omitted from API requests. However, any non-pointer, 2159 // non-interface field appearing in ForceSendFields will be sent to the 2160 // server regardless of whether the field is empty or not. This may be 2161 // used to include empty fields in Patch requests. 2162 ForceSendFields []string `json:"-"` 2163 2164 // NullFields is a list of field names (e.g. "Key") to include in API 2165 // requests with the JSON null value. By default, fields with empty 2166 // values are omitted from API requests. However, any field with an 2167 // empty value appearing in NullFields will be sent to the server as 2168 // null. It is an error if a field in this list has a non-empty value. 2169 // This may be used to include null fields in Patch requests. 2170 NullFields []string `json:"-"` 2171} 2172 2173func (s *PublicKey) MarshalJSON() ([]byte, error) { 2174 type NoMethod PublicKey 2175 raw := NoMethod(*s) 2176 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2177} 2178 2179// RestoreCertificateAuthorityRequest: Request message for 2180// CertificateAuthorityService.RestoreCertificateAuthority. 2181type RestoreCertificateAuthorityRequest struct { 2182 // RequestId: Optional. An ID to identify requests. Specify a unique 2183 // request ID so that if you must retry your request, the server will 2184 // know to ignore the request if it has already been completed. The 2185 // server will guarantee that for at least 60 minutes since the first 2186 // request. For example, consider a situation where you make an initial 2187 // request and t he request times out. If you make the request again 2188 // with the same request ID, the server can check if original operation 2189 // with the same request ID was received, and if so, will ignore the 2190 // second request. This prevents clients from accidentally creating 2191 // duplicate commitments. The request ID must be a valid UUID with the 2192 // exception that zero UUID is not supported 2193 // (00000000-0000-0000-0000-000000000000). 2194 RequestId string `json:"requestId,omitempty"` 2195 2196 // ForceSendFields is a list of field names (e.g. "RequestId") to 2197 // unconditionally include in API requests. By default, fields with 2198 // empty values are omitted from API requests. However, any non-pointer, 2199 // non-interface field appearing in ForceSendFields will be sent to the 2200 // server regardless of whether the field is empty or not. This may be 2201 // used to include empty fields in Patch requests. 2202 ForceSendFields []string `json:"-"` 2203 2204 // NullFields is a list of field names (e.g. "RequestId") to include in 2205 // API requests with the JSON null value. By default, fields with empty 2206 // values are omitted from API requests. However, any field with an 2207 // empty value appearing in NullFields will be sent to the server as 2208 // null. It is an error if a field in this list has a non-empty value. 2209 // This may be used to include null fields in Patch requests. 2210 NullFields []string `json:"-"` 2211} 2212 2213func (s *RestoreCertificateAuthorityRequest) MarshalJSON() ([]byte, error) { 2214 type NoMethod RestoreCertificateAuthorityRequest 2215 raw := NoMethod(*s) 2216 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2217} 2218 2219// ReusableConfig: A ReusableConfig refers to a managed 2220// ReusableConfigValues. Those, in turn, are used to describe certain 2221// fields of an X.509 certificate, such as the key usage fields, fields 2222// specific to CA certificates, certificate policy extensions and custom 2223// extensions. 2224type ReusableConfig struct { 2225 // CreateTime: Output only. The time at which this ReusableConfig was 2226 // created. 2227 CreateTime string `json:"createTime,omitempty"` 2228 2229 // Description: Optional. A human-readable description of scenarios 2230 // these ReusableConfigValues may be compatible with. 2231 Description string `json:"description,omitempty"` 2232 2233 // Labels: Optional. Labels with user-defined metadata. 2234 Labels map[string]string `json:"labels,omitempty"` 2235 2236 // Name: Output only. The resource path for this ReusableConfig in the 2237 // format `projects/*/locations/*/reusableConfigs/*`. 2238 Name string `json:"name,omitempty"` 2239 2240 // UpdateTime: Output only. The time at which this ReusableConfig was 2241 // updated. 2242 UpdateTime string `json:"updateTime,omitempty"` 2243 2244 // Values: Required. The config values. 2245 Values *ReusableConfigValues `json:"values,omitempty"` 2246 2247 // ServerResponse contains the HTTP response code and headers from the 2248 // server. 2249 googleapi.ServerResponse `json:"-"` 2250 2251 // ForceSendFields is a list of field names (e.g. "CreateTime") to 2252 // unconditionally include in API requests. By default, fields with 2253 // empty values are omitted from API requests. However, any non-pointer, 2254 // non-interface field appearing in ForceSendFields will be sent to the 2255 // server regardless of whether the field is empty or not. This may be 2256 // used to include empty fields in Patch requests. 2257 ForceSendFields []string `json:"-"` 2258 2259 // NullFields is a list of field names (e.g. "CreateTime") to include in 2260 // API requests with the JSON null value. By default, fields with empty 2261 // values are omitted from API requests. However, any field with an 2262 // empty value appearing in NullFields will be sent to the server as 2263 // null. It is an error if a field in this list has a non-empty value. 2264 // This may be used to include null fields in Patch requests. 2265 NullFields []string `json:"-"` 2266} 2267 2268func (s *ReusableConfig) MarshalJSON() ([]byte, error) { 2269 type NoMethod ReusableConfig 2270 raw := NoMethod(*s) 2271 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2272} 2273 2274// ReusableConfigValues: A ReusableConfigValues is used to describe 2275// certain fields of an X.509 certificate, such as the key usage fields, 2276// fields specific to CA certificates, certificate policy extensions and 2277// custom extensions. 2278type ReusableConfigValues struct { 2279 // AdditionalExtensions: Optional. Describes custom X.509 extensions. 2280 AdditionalExtensions []*X509Extension `json:"additionalExtensions,omitempty"` 2281 2282 // AiaOcspServers: Optional. Describes Online Certificate Status 2283 // Protocol (OCSP) endpoint addresses that appear in the "Authority 2284 // Information Access" extension in the certificate. 2285 AiaOcspServers []string `json:"aiaOcspServers,omitempty"` 2286 2287 // CaOptions: Optional. Describes options in this ReusableConfigValues 2288 // that are relevant in a CA certificate. 2289 CaOptions *CaOptions `json:"caOptions,omitempty"` 2290 2291 // KeyUsage: Optional. Indicates the intended use for keys that 2292 // correspond to a certificate. 2293 KeyUsage *KeyUsage `json:"keyUsage,omitempty"` 2294 2295 // PolicyIds: Optional. Describes the X.509 certificate policy object 2296 // identifiers, per https://tools.ietf.org/html/rfc5280#section-4.2.1.4. 2297 PolicyIds []*ObjectId `json:"policyIds,omitempty"` 2298 2299 // ForceSendFields is a list of field names (e.g. 2300 // "AdditionalExtensions") to unconditionally include in API requests. 2301 // By default, fields with empty values are omitted from API requests. 2302 // However, any non-pointer, non-interface field appearing in 2303 // ForceSendFields will be sent to the server regardless of whether the 2304 // field is empty or not. This may be used to include empty fields in 2305 // Patch requests. 2306 ForceSendFields []string `json:"-"` 2307 2308 // NullFields is a list of field names (e.g. "AdditionalExtensions") to 2309 // include in API requests with the JSON null value. By default, fields 2310 // with empty values are omitted from API requests. However, any field 2311 // with an empty value appearing in NullFields will be sent to the 2312 // server as null. It is an error if a field in this list has a 2313 // non-empty value. This may be used to include null fields in Patch 2314 // requests. 2315 NullFields []string `json:"-"` 2316} 2317 2318func (s *ReusableConfigValues) MarshalJSON() ([]byte, error) { 2319 type NoMethod ReusableConfigValues 2320 raw := NoMethod(*s) 2321 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2322} 2323 2324// ReusableConfigWrapper: A ReusableConfigWrapper describes values that 2325// may assist in creating an X.509 certificate, or a reference to a 2326// pre-defined set of values. 2327type ReusableConfigWrapper struct { 2328 // ReusableConfig: Required. A resource path to a ReusableConfig in the 2329 // format `projects/*/locations/*/reusableConfigs/*`. 2330 ReusableConfig string `json:"reusableConfig,omitempty"` 2331 2332 // ReusableConfigValues: Required. A user-specified inline 2333 // ReusableConfigValues. 2334 ReusableConfigValues *ReusableConfigValues `json:"reusableConfigValues,omitempty"` 2335 2336 // ForceSendFields is a list of field names (e.g. "ReusableConfig") to 2337 // unconditionally include in API requests. By default, fields with 2338 // empty values are omitted from API requests. However, any non-pointer, 2339 // non-interface field appearing in ForceSendFields will be sent to the 2340 // server regardless of whether the field is empty or not. This may be 2341 // used to include empty fields in Patch requests. 2342 ForceSendFields []string `json:"-"` 2343 2344 // NullFields is a list of field names (e.g. "ReusableConfig") to 2345 // include in API requests with the JSON null value. By default, fields 2346 // with empty values are omitted from API requests. However, any field 2347 // with an empty value appearing in NullFields will be sent to the 2348 // server as null. It is an error if a field in this list has a 2349 // non-empty value. This may be used to include null fields in Patch 2350 // requests. 2351 NullFields []string `json:"-"` 2352} 2353 2354func (s *ReusableConfigWrapper) MarshalJSON() ([]byte, error) { 2355 type NoMethod ReusableConfigWrapper 2356 raw := NoMethod(*s) 2357 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2358} 2359 2360// RevocationDetails: Describes fields that are relavent to the 2361// revocation of a Certificate. 2362type RevocationDetails struct { 2363 // RevocationState: Indicates why a Certificate was revoked. 2364 // 2365 // Possible values: 2366 // "REVOCATION_REASON_UNSPECIFIED" - Default unspecified value. This 2367 // value does indicate that a Certificate has been revoked, but that a 2368 // reason has not been recorded. 2369 // "KEY_COMPROMISE" - Key material for this Certificate may have 2370 // leaked. 2371 // "CERTIFICATE_AUTHORITY_COMPROMISE" - The key material for a 2372 // certificate authority in the issuing path may have leaked. 2373 // "AFFILIATION_CHANGED" - The subject or other attributes in this 2374 // Certificate have changed. 2375 // "SUPERSEDED" - This Certificate has been superseded. 2376 // "CESSATION_OF_OPERATION" - This Certificate or entities in the 2377 // issuing path have ceased to operate. 2378 // "CERTIFICATE_HOLD" - This Certificate should not be considered 2379 // valid, it is expected that it may become valid in the future. 2380 // "PRIVILEGE_WITHDRAWN" - This Certificate no longer has permission 2381 // to assert the listed attributes. 2382 // "ATTRIBUTE_AUTHORITY_COMPROMISE" - The authority which determines 2383 // appropriate attributes for a Certificate may have been compromised. 2384 RevocationState string `json:"revocationState,omitempty"` 2385 2386 // RevocationTime: The time at which this Certificate was revoked. 2387 RevocationTime string `json:"revocationTime,omitempty"` 2388 2389 // ForceSendFields is a list of field names (e.g. "RevocationState") to 2390 // unconditionally include in API requests. By default, fields with 2391 // empty values are omitted from API requests. However, any non-pointer, 2392 // non-interface field appearing in ForceSendFields will be sent to the 2393 // server regardless of whether the field is empty or not. This may be 2394 // used to include empty fields in Patch requests. 2395 ForceSendFields []string `json:"-"` 2396 2397 // NullFields is a list of field names (e.g. "RevocationState") to 2398 // include in API requests with the JSON null value. By default, fields 2399 // with empty values are omitted from API requests. However, any field 2400 // with an empty value appearing in NullFields will be sent to the 2401 // server as null. It is an error if a field in this list has a 2402 // non-empty value. This may be used to include null fields in Patch 2403 // requests. 2404 NullFields []string `json:"-"` 2405} 2406 2407func (s *RevocationDetails) MarshalJSON() ([]byte, error) { 2408 type NoMethod RevocationDetails 2409 raw := NoMethod(*s) 2410 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2411} 2412 2413// RevokeCertificateRequest: Request message for 2414// CertificateAuthorityService.RevokeCertificate. 2415type RevokeCertificateRequest struct { 2416 // Reason: Required. The RevocationReason for revoking this certificate. 2417 // 2418 // Possible values: 2419 // "REVOCATION_REASON_UNSPECIFIED" - Default unspecified value. This 2420 // value does indicate that a Certificate has been revoked, but that a 2421 // reason has not been recorded. 2422 // "KEY_COMPROMISE" - Key material for this Certificate may have 2423 // leaked. 2424 // "CERTIFICATE_AUTHORITY_COMPROMISE" - The key material for a 2425 // certificate authority in the issuing path may have leaked. 2426 // "AFFILIATION_CHANGED" - The subject or other attributes in this 2427 // Certificate have changed. 2428 // "SUPERSEDED" - This Certificate has been superseded. 2429 // "CESSATION_OF_OPERATION" - This Certificate or entities in the 2430 // issuing path have ceased to operate. 2431 // "CERTIFICATE_HOLD" - This Certificate should not be considered 2432 // valid, it is expected that it may become valid in the future. 2433 // "PRIVILEGE_WITHDRAWN" - This Certificate no longer has permission 2434 // to assert the listed attributes. 2435 // "ATTRIBUTE_AUTHORITY_COMPROMISE" - The authority which determines 2436 // appropriate attributes for a Certificate may have been compromised. 2437 Reason string `json:"reason,omitempty"` 2438 2439 // RequestId: Optional. An ID to identify requests. Specify a unique 2440 // request ID so that if you must retry your request, the server will 2441 // know to ignore the request if it has already been completed. The 2442 // server will guarantee that for at least 60 minutes since the first 2443 // request. For example, consider a situation where you make an initial 2444 // request and t he request times out. If you make the request again 2445 // with the same request ID, the server can check if original operation 2446 // with the same request ID was received, and if so, will ignore the 2447 // second request. This prevents clients from accidentally creating 2448 // duplicate commitments. The request ID must be a valid UUID with the 2449 // exception that zero UUID is not supported 2450 // (00000000-0000-0000-0000-000000000000). 2451 RequestId string `json:"requestId,omitempty"` 2452 2453 // ForceSendFields is a list of field names (e.g. "Reason") to 2454 // unconditionally include in API requests. By default, fields with 2455 // empty values are omitted from API requests. However, any non-pointer, 2456 // non-interface field appearing in ForceSendFields will be sent to the 2457 // server regardless of whether the field is empty or not. This may be 2458 // used to include empty fields in Patch requests. 2459 ForceSendFields []string `json:"-"` 2460 2461 // NullFields is a list of field names (e.g. "Reason") to include in API 2462 // requests with the JSON null value. By default, fields with empty 2463 // values are omitted from API requests. However, any field with an 2464 // empty value appearing in NullFields will be sent to the server as 2465 // null. It is an error if a field in this list has a non-empty value. 2466 // This may be used to include null fields in Patch requests. 2467 NullFields []string `json:"-"` 2468} 2469 2470func (s *RevokeCertificateRequest) MarshalJSON() ([]byte, error) { 2471 type NoMethod RevokeCertificateRequest 2472 raw := NoMethod(*s) 2473 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2474} 2475 2476// RevokedCertificate: Describes a revoked Certificate. 2477type RevokedCertificate struct { 2478 // Certificate: The resource path for the Certificate in the format 2479 // `projects/*/locations/*/certificateAuthorities/*/certificates/*`. 2480 Certificate string `json:"certificate,omitempty"` 2481 2482 // HexSerialNumber: The serial number of the Certificate. 2483 HexSerialNumber string `json:"hexSerialNumber,omitempty"` 2484 2485 // RevocationReason: The reason the Certificate was revoked. 2486 // 2487 // Possible values: 2488 // "REVOCATION_REASON_UNSPECIFIED" - Default unspecified value. This 2489 // value does indicate that a Certificate has been revoked, but that a 2490 // reason has not been recorded. 2491 // "KEY_COMPROMISE" - Key material for this Certificate may have 2492 // leaked. 2493 // "CERTIFICATE_AUTHORITY_COMPROMISE" - The key material for a 2494 // certificate authority in the issuing path may have leaked. 2495 // "AFFILIATION_CHANGED" - The subject or other attributes in this 2496 // Certificate have changed. 2497 // "SUPERSEDED" - This Certificate has been superseded. 2498 // "CESSATION_OF_OPERATION" - This Certificate or entities in the 2499 // issuing path have ceased to operate. 2500 // "CERTIFICATE_HOLD" - This Certificate should not be considered 2501 // valid, it is expected that it may become valid in the future. 2502 // "PRIVILEGE_WITHDRAWN" - This Certificate no longer has permission 2503 // to assert the listed attributes. 2504 // "ATTRIBUTE_AUTHORITY_COMPROMISE" - The authority which determines 2505 // appropriate attributes for a Certificate may have been compromised. 2506 RevocationReason string `json:"revocationReason,omitempty"` 2507 2508 // ForceSendFields is a list of field names (e.g. "Certificate") to 2509 // unconditionally include in API requests. By default, fields with 2510 // empty values are omitted from API requests. However, any non-pointer, 2511 // non-interface field appearing in ForceSendFields will be sent to the 2512 // server regardless of whether the field is empty or not. This may be 2513 // used to include empty fields in Patch requests. 2514 ForceSendFields []string `json:"-"` 2515 2516 // NullFields is a list of field names (e.g. "Certificate") to include 2517 // in API requests with the JSON null value. By default, fields with 2518 // empty values are omitted from API requests. However, any field with 2519 // an empty value appearing in NullFields will be sent to the server as 2520 // null. It is an error if a field in this list has a non-empty value. 2521 // This may be used to include null fields in Patch requests. 2522 NullFields []string `json:"-"` 2523} 2524 2525func (s *RevokedCertificate) MarshalJSON() ([]byte, error) { 2526 type NoMethod RevokedCertificate 2527 raw := NoMethod(*s) 2528 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2529} 2530 2531// ScheduleDeleteCertificateAuthorityRequest: Request message for 2532// CertificateAuthorityService.ScheduleDeleteCertificateAuthority. 2533type ScheduleDeleteCertificateAuthorityRequest struct { 2534 // RequestId: Optional. An ID to identify requests. Specify a unique 2535 // request ID so that if you must retry your request, the server will 2536 // know to ignore the request if it has already been completed. The 2537 // server will guarantee that for at least 60 minutes since the first 2538 // request. For example, consider a situation where you make an initial 2539 // request and t he request times out. If you make the request again 2540 // with the same request ID, the server can check if original operation 2541 // with the same request ID was received, and if so, will ignore the 2542 // second request. This prevents clients from accidentally creating 2543 // duplicate commitments. The request ID must be a valid UUID with the 2544 // exception that zero UUID is not supported 2545 // (00000000-0000-0000-0000-000000000000). 2546 RequestId string `json:"requestId,omitempty"` 2547 2548 // ForceSendFields is a list of field names (e.g. "RequestId") to 2549 // unconditionally include in API requests. By default, fields with 2550 // empty values are omitted from API requests. However, any non-pointer, 2551 // non-interface field appearing in ForceSendFields will be sent to the 2552 // server regardless of whether the field is empty or not. This may be 2553 // used to include empty fields in Patch requests. 2554 ForceSendFields []string `json:"-"` 2555 2556 // NullFields is a list of field names (e.g. "RequestId") to include in 2557 // API requests with the JSON null value. By default, fields with empty 2558 // values are omitted from API requests. However, any field with an 2559 // empty value appearing in NullFields will be sent to the server as 2560 // null. It is an error if a field in this list has a non-empty value. 2561 // This may be used to include null fields in Patch requests. 2562 NullFields []string `json:"-"` 2563} 2564 2565func (s *ScheduleDeleteCertificateAuthorityRequest) MarshalJSON() ([]byte, error) { 2566 type NoMethod ScheduleDeleteCertificateAuthorityRequest 2567 raw := NoMethod(*s) 2568 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2569} 2570 2571// SetIamPolicyRequest: Request message for `SetIamPolicy` method. 2572type SetIamPolicyRequest struct { 2573 // Policy: REQUIRED: The complete policy to be applied to the 2574 // `resource`. The size of the policy is limited to a few 10s of KB. An 2575 // empty policy is a valid policy but certain Cloud Platform services 2576 // (such as Projects) might reject them. 2577 Policy *Policy `json:"policy,omitempty"` 2578 2579 // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the 2580 // policy to modify. Only the fields in the mask will be modified. If no 2581 // mask is provided, the following default mask is used: `paths: 2582 // "bindings, etag" 2583 UpdateMask string `json:"updateMask,omitempty"` 2584 2585 // ForceSendFields is a list of field names (e.g. "Policy") to 2586 // unconditionally include in API requests. By default, fields with 2587 // empty values are omitted from API requests. However, any non-pointer, 2588 // non-interface field appearing in ForceSendFields will be sent to the 2589 // server regardless of whether the field is empty or not. This may be 2590 // used to include empty fields in Patch requests. 2591 ForceSendFields []string `json:"-"` 2592 2593 // NullFields is a list of field names (e.g. "Policy") to include in API 2594 // requests with the JSON null value. By default, fields with empty 2595 // values are omitted from API requests. However, any field with an 2596 // empty value appearing in NullFields will be sent to the server as 2597 // null. It is an error if a field in this list has a non-empty value. 2598 // This may be used to include null fields in Patch requests. 2599 NullFields []string `json:"-"` 2600} 2601 2602func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { 2603 type NoMethod SetIamPolicyRequest 2604 raw := NoMethod(*s) 2605 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2606} 2607 2608// Status: The `Status` type defines a logical error model that is 2609// suitable for different programming environments, including REST APIs 2610// and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each 2611// `Status` message contains three pieces of data: error code, error 2612// message, and error details. You can find out more about this error 2613// model and how to work with it in the [API Design 2614// Guide](https://cloud.google.com/apis/design/errors). 2615type Status struct { 2616 // Code: The status code, which should be an enum value of 2617 // google.rpc.Code. 2618 Code int64 `json:"code,omitempty"` 2619 2620 // Details: A list of messages that carry the error details. There is a 2621 // common set of message types for APIs to use. 2622 Details []googleapi.RawMessage `json:"details,omitempty"` 2623 2624 // Message: A developer-facing error message, which should be in 2625 // English. Any user-facing error message should be localized and sent 2626 // in the google.rpc.Status.details field, or localized by the client. 2627 Message string `json:"message,omitempty"` 2628 2629 // ForceSendFields is a list of field names (e.g. "Code") to 2630 // unconditionally include in API requests. By default, fields with 2631 // empty values are omitted from API requests. However, any non-pointer, 2632 // non-interface field appearing in ForceSendFields will be sent to the 2633 // server regardless of whether the field is empty or not. This may be 2634 // used to include empty fields in Patch requests. 2635 ForceSendFields []string `json:"-"` 2636 2637 // NullFields is a list of field names (e.g. "Code") to include in API 2638 // requests with the JSON null value. By default, fields with empty 2639 // values are omitted from API requests. However, any field with an 2640 // empty value appearing in NullFields will be sent to the server as 2641 // null. It is an error if a field in this list has a non-empty value. 2642 // This may be used to include null fields in Patch requests. 2643 NullFields []string `json:"-"` 2644} 2645 2646func (s *Status) MarshalJSON() ([]byte, error) { 2647 type NoMethod Status 2648 raw := NoMethod(*s) 2649 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2650} 2651 2652// Subject: Subject describes parts of a distinguished name that, in 2653// turn, describes the subject of the certificate. 2654type Subject struct { 2655 // CountryCode: The country code of the subject. 2656 CountryCode string `json:"countryCode,omitempty"` 2657 2658 // Locality: The locality or city of the subject. 2659 Locality string `json:"locality,omitempty"` 2660 2661 // Organization: The organization of the subject. 2662 Organization string `json:"organization,omitempty"` 2663 2664 // OrganizationalUnit: The organizational_unit of the subject. 2665 OrganizationalUnit string `json:"organizationalUnit,omitempty"` 2666 2667 // PostalCode: The postal code of the subject. 2668 PostalCode string `json:"postalCode,omitempty"` 2669 2670 // Province: The province, territory, or regional state of the subject. 2671 Province string `json:"province,omitempty"` 2672 2673 // StreetAddress: The street address of the subject. 2674 StreetAddress string `json:"streetAddress,omitempty"` 2675 2676 // ForceSendFields is a list of field names (e.g. "CountryCode") to 2677 // unconditionally include in API requests. By default, fields with 2678 // empty values are omitted from API requests. However, any non-pointer, 2679 // non-interface field appearing in ForceSendFields will be sent to the 2680 // server regardless of whether the field is empty or not. This may be 2681 // used to include empty fields in Patch requests. 2682 ForceSendFields []string `json:"-"` 2683 2684 // NullFields is a list of field names (e.g. "CountryCode") to include 2685 // in API requests with the JSON null value. By default, fields with 2686 // empty values are omitted from API requests. However, any field with 2687 // an empty value appearing in NullFields will be sent to the server as 2688 // null. It is an error if a field in this list has a non-empty value. 2689 // This may be used to include null fields in Patch requests. 2690 NullFields []string `json:"-"` 2691} 2692 2693func (s *Subject) MarshalJSON() ([]byte, error) { 2694 type NoMethod Subject 2695 raw := NoMethod(*s) 2696 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2697} 2698 2699// SubjectAltNames: SubjectAltNames corresponds to a more modern way of 2700// listing what the asserted identity is in a certificate (i.e., 2701// compared to the "common name" in the distinguished name). 2702type SubjectAltNames struct { 2703 // CustomSans: Contains additional subject alternative name values. 2704 CustomSans []*X509Extension `json:"customSans,omitempty"` 2705 2706 // DnsNames: Contains only valid, fully-qualified host names. 2707 DnsNames []string `json:"dnsNames,omitempty"` 2708 2709 // EmailAddresses: Contains only valid RFC 2822 E-mail addresses. 2710 EmailAddresses []string `json:"emailAddresses,omitempty"` 2711 2712 // IpAddresses: Contains only valid 32-bit IPv4 addresses or RFC 4291 2713 // IPv6 addresses. 2714 IpAddresses []string `json:"ipAddresses,omitempty"` 2715 2716 // Uris: Contains only valid RFC 3986 URIs. 2717 Uris []string `json:"uris,omitempty"` 2718 2719 // ForceSendFields is a list of field names (e.g. "CustomSans") to 2720 // unconditionally include in API requests. By default, fields with 2721 // empty values are omitted from API requests. However, any non-pointer, 2722 // non-interface field appearing in ForceSendFields will be sent to the 2723 // server regardless of whether the field is empty or not. This may be 2724 // used to include empty fields in Patch requests. 2725 ForceSendFields []string `json:"-"` 2726 2727 // NullFields is a list of field names (e.g. "CustomSans") to include in 2728 // API requests with the JSON null value. By default, fields with empty 2729 // values are omitted from API requests. However, any field with an 2730 // empty value appearing in NullFields will be sent to the server as 2731 // null. It is an error if a field in this list has a non-empty value. 2732 // This may be used to include null fields in Patch requests. 2733 NullFields []string `json:"-"` 2734} 2735 2736func (s *SubjectAltNames) MarshalJSON() ([]byte, error) { 2737 type NoMethod SubjectAltNames 2738 raw := NoMethod(*s) 2739 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2740} 2741 2742// SubjectConfig: These values are used to create the distinguished name 2743// and subject alternative name fields in an X.509 certificate. 2744type SubjectConfig struct { 2745 // CommonName: Optional. The "common name" of the distinguished name. 2746 CommonName string `json:"commonName,omitempty"` 2747 2748 // Subject: Required. Contains distinguished name fields such as the 2749 // location and organization. 2750 Subject *Subject `json:"subject,omitempty"` 2751 2752 // SubjectAltName: Optional. The subject alternative name fields. 2753 SubjectAltName *SubjectAltNames `json:"subjectAltName,omitempty"` 2754 2755 // ForceSendFields is a list of field names (e.g. "CommonName") to 2756 // unconditionally include in API requests. By default, fields with 2757 // empty values are omitted from API requests. However, any non-pointer, 2758 // non-interface field appearing in ForceSendFields will be sent to the 2759 // server regardless of whether the field is empty or not. This may be 2760 // used to include empty fields in Patch requests. 2761 ForceSendFields []string `json:"-"` 2762 2763 // NullFields is a list of field names (e.g. "CommonName") to include in 2764 // API requests with the JSON null value. By default, fields with empty 2765 // values are omitted from API requests. However, any field with an 2766 // empty value appearing in NullFields will be sent to the server as 2767 // null. It is an error if a field in this list has a non-empty value. 2768 // This may be used to include null fields in Patch requests. 2769 NullFields []string `json:"-"` 2770} 2771 2772func (s *SubjectConfig) MarshalJSON() ([]byte, error) { 2773 type NoMethod SubjectConfig 2774 raw := NoMethod(*s) 2775 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2776} 2777 2778// SubjectDescription: These values describe fields in an issued X.509 2779// certificate such as the distinguished name, subject alternative 2780// names, serial number, and lifetime. 2781type SubjectDescription struct { 2782 // CommonName: The "common name" of the distinguished name. 2783 CommonName string `json:"commonName,omitempty"` 2784 2785 // HexSerialNumber: The serial number encoded in lowercase hexadecimal. 2786 HexSerialNumber string `json:"hexSerialNumber,omitempty"` 2787 2788 // Lifetime: For convenience, the actual lifetime of an issued 2789 // certificate. Corresponds to 'not_after_time' - 'not_before_time'. 2790 Lifetime string `json:"lifetime,omitempty"` 2791 2792 // NotAfterTime: The time at which the certificate expires. 2793 NotAfterTime string `json:"notAfterTime,omitempty"` 2794 2795 // NotBeforeTime: The time at which the certificate becomes valid. 2796 NotBeforeTime string `json:"notBeforeTime,omitempty"` 2797 2798 // Subject: Contains distinguished name fields such as the location and 2799 // organization. 2800 Subject *Subject `json:"subject,omitempty"` 2801 2802 // SubjectAltName: The subject alternative name fields. 2803 SubjectAltName *SubjectAltNames `json:"subjectAltName,omitempty"` 2804 2805 // ForceSendFields is a list of field names (e.g. "CommonName") to 2806 // unconditionally include in API requests. By default, fields with 2807 // empty values are omitted from API requests. However, any non-pointer, 2808 // non-interface field appearing in ForceSendFields will be sent to the 2809 // server regardless of whether the field is empty or not. This may be 2810 // used to include empty fields in Patch requests. 2811 ForceSendFields []string `json:"-"` 2812 2813 // NullFields is a list of field names (e.g. "CommonName") to include in 2814 // API requests with the JSON null value. By default, fields with empty 2815 // values are omitted from API requests. However, any field with an 2816 // empty value appearing in NullFields will be sent to the server as 2817 // null. It is an error if a field in this list has a non-empty value. 2818 // This may be used to include null fields in Patch requests. 2819 NullFields []string `json:"-"` 2820} 2821 2822func (s *SubjectDescription) MarshalJSON() ([]byte, error) { 2823 type NoMethod SubjectDescription 2824 raw := NoMethod(*s) 2825 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2826} 2827 2828// SubordinateConfig: Describes a subordinate CA's issuers. This is 2829// either a resource path to a known issuing CertificateAuthority, or a 2830// PEM issuer certificate chain. 2831type SubordinateConfig struct { 2832 // CertificateAuthority: Required. This can refer to a 2833 // CertificateAuthority in the same project that was used to create a 2834 // subordinate CertificateAuthority. This field is used for information 2835 // and usability purposes only. The resource name is in the format 2836 // `projects/*/locations/*/certificateAuthorities/*`. 2837 CertificateAuthority string `json:"certificateAuthority,omitempty"` 2838 2839 // PemIssuerChain: Required. Contains the PEM certificate chain for the 2840 // issuers of this CertificateAuthority, but not pem certificate for 2841 // this CA itself. 2842 PemIssuerChain *SubordinateConfigChain `json:"pemIssuerChain,omitempty"` 2843 2844 // ForceSendFields is a list of field names (e.g. 2845 // "CertificateAuthority") to unconditionally include in API requests. 2846 // By default, fields with empty values are omitted from API requests. 2847 // However, any non-pointer, non-interface field appearing in 2848 // ForceSendFields will be sent to the server regardless of whether the 2849 // field is empty or not. This may be used to include empty fields in 2850 // Patch requests. 2851 ForceSendFields []string `json:"-"` 2852 2853 // NullFields is a list of field names (e.g. "CertificateAuthority") to 2854 // include in API requests with the JSON null value. By default, fields 2855 // with empty values are omitted from API requests. However, any field 2856 // with an empty value appearing in NullFields will be sent to the 2857 // server as null. It is an error if a field in this list has a 2858 // non-empty value. This may be used to include null fields in Patch 2859 // requests. 2860 NullFields []string `json:"-"` 2861} 2862 2863func (s *SubordinateConfig) MarshalJSON() ([]byte, error) { 2864 type NoMethod SubordinateConfig 2865 raw := NoMethod(*s) 2866 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2867} 2868 2869// SubordinateConfigChain: This message describes a subordinate CA's 2870// issuer certificate chain. This wrapper exists for compatibility 2871// reasons. 2872type SubordinateConfigChain struct { 2873 // PemCertificates: Required. Expected to be in leaf-to-root order 2874 // according to RFC 5246. 2875 PemCertificates []string `json:"pemCertificates,omitempty"` 2876 2877 // ForceSendFields is a list of field names (e.g. "PemCertificates") to 2878 // unconditionally include in API requests. By default, fields with 2879 // empty values are omitted from API requests. However, any non-pointer, 2880 // non-interface field appearing in ForceSendFields will be sent to the 2881 // server regardless of whether the field is empty or not. This may be 2882 // used to include empty fields in Patch requests. 2883 ForceSendFields []string `json:"-"` 2884 2885 // NullFields is a list of field names (e.g. "PemCertificates") to 2886 // include in API requests with the JSON null value. By default, fields 2887 // with empty values are omitted from API requests. However, any field 2888 // with an empty value appearing in NullFields will be sent to the 2889 // server as null. It is an error if a field in this list has a 2890 // non-empty value. This may be used to include null fields in Patch 2891 // requests. 2892 NullFields []string `json:"-"` 2893} 2894 2895func (s *SubordinateConfigChain) MarshalJSON() ([]byte, error) { 2896 type NoMethod SubordinateConfigChain 2897 raw := NoMethod(*s) 2898 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2899} 2900 2901// TestIamPermissionsRequest: Request message for `TestIamPermissions` 2902// method. 2903type TestIamPermissionsRequest struct { 2904 // Permissions: The set of permissions to check for the `resource`. 2905 // Permissions with wildcards (such as '*' or 'storage.*') are not 2906 // allowed. For more information see [IAM 2907 // Overview](https://cloud.google.com/iam/docs/overview#permissions). 2908 Permissions []string `json:"permissions,omitempty"` 2909 2910 // ForceSendFields is a list of field names (e.g. "Permissions") to 2911 // unconditionally include in API requests. By default, fields with 2912 // empty values are omitted from API requests. However, any non-pointer, 2913 // non-interface field appearing in ForceSendFields will be sent to the 2914 // server regardless of whether the field is empty or not. This may be 2915 // used to include empty fields in Patch requests. 2916 ForceSendFields []string `json:"-"` 2917 2918 // NullFields is a list of field names (e.g. "Permissions") to include 2919 // in API requests with the JSON null value. By default, fields with 2920 // empty values are omitted from API requests. However, any field with 2921 // an empty value appearing in NullFields will be sent to the server as 2922 // null. It is an error if a field in this list has a non-empty value. 2923 // This may be used to include null fields in Patch requests. 2924 NullFields []string `json:"-"` 2925} 2926 2927func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { 2928 type NoMethod TestIamPermissionsRequest 2929 raw := NoMethod(*s) 2930 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2931} 2932 2933// TestIamPermissionsResponse: Response message for `TestIamPermissions` 2934// method. 2935type TestIamPermissionsResponse struct { 2936 // Permissions: A subset of `TestPermissionsRequest.permissions` that 2937 // the caller is allowed. 2938 Permissions []string `json:"permissions,omitempty"` 2939 2940 // ServerResponse contains the HTTP response code and headers from the 2941 // server. 2942 googleapi.ServerResponse `json:"-"` 2943 2944 // ForceSendFields is a list of field names (e.g. "Permissions") to 2945 // unconditionally include in API requests. By default, fields with 2946 // empty values are omitted from API requests. However, any non-pointer, 2947 // non-interface field appearing in ForceSendFields will be sent to the 2948 // server regardless of whether the field is empty or not. This may be 2949 // used to include empty fields in Patch requests. 2950 ForceSendFields []string `json:"-"` 2951 2952 // NullFields is a list of field names (e.g. "Permissions") to include 2953 // in API requests with the JSON null value. By default, fields with 2954 // empty values are omitted from API requests. However, any field with 2955 // an empty value appearing in NullFields will be sent to the server as 2956 // null. It is an error if a field in this list has a non-empty value. 2957 // This may be used to include null fields in Patch requests. 2958 NullFields []string `json:"-"` 2959} 2960 2961func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { 2962 type NoMethod TestIamPermissionsResponse 2963 raw := NoMethod(*s) 2964 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2965} 2966 2967// X509Extension: An X509Extension specifies an X.509 extension, which 2968// may be used in different parts of X.509 objects like certificates, 2969// CSRs, and CRLs. 2970type X509Extension struct { 2971 // Critical: Required. Indicates whether or not this extension is 2972 // critical (i.e., if the client does not know how to handle this 2973 // extension, the client should consider this to be an error). 2974 Critical bool `json:"critical,omitempty"` 2975 2976 // ObjectId: Required. The OID for this X.509 extension. 2977 ObjectId *ObjectId `json:"objectId,omitempty"` 2978 2979 // Value: Required. The value of this X.509 extension. 2980 Value string `json:"value,omitempty"` 2981 2982 // ForceSendFields is a list of field names (e.g. "Critical") to 2983 // unconditionally include in API requests. By default, fields with 2984 // empty values are omitted from API requests. However, any non-pointer, 2985 // non-interface field appearing in ForceSendFields will be sent to the 2986 // server regardless of whether the field is empty or not. This may be 2987 // used to include empty fields in Patch requests. 2988 ForceSendFields []string `json:"-"` 2989 2990 // NullFields is a list of field names (e.g. "Critical") to include in 2991 // API requests with the JSON null value. By default, fields with empty 2992 // values are omitted from API requests. However, any field with an 2993 // empty value appearing in NullFields will be sent to the server as 2994 // null. It is an error if a field in this list has a non-empty value. 2995 // This may be used to include null fields in Patch requests. 2996 NullFields []string `json:"-"` 2997} 2998 2999func (s *X509Extension) MarshalJSON() ([]byte, error) { 3000 type NoMethod X509Extension 3001 raw := NoMethod(*s) 3002 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3003} 3004 3005// method id "privateca.projects.locations.get": 3006 3007type ProjectsLocationsGetCall struct { 3008 s *Service 3009 name string 3010 urlParams_ gensupport.URLParams 3011 ifNoneMatch_ string 3012 ctx_ context.Context 3013 header_ http.Header 3014} 3015 3016// Get: Gets information about a location. 3017func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { 3018 c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3019 c.name = name 3020 return c 3021} 3022 3023// Fields allows partial responses to be retrieved. See 3024// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3025// for more information. 3026func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { 3027 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3028 return c 3029} 3030 3031// IfNoneMatch sets the optional parameter which makes the operation 3032// fail if the object's ETag matches the given value. This is useful for 3033// getting updates only after the object has changed since the last 3034// request. Use googleapi.IsNotModified to check whether the response 3035// error from Do is the result of In-None-Match. 3036func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { 3037 c.ifNoneMatch_ = entityTag 3038 return c 3039} 3040 3041// Context sets the context to be used in this call's Do method. Any 3042// pending HTTP request will be aborted if the provided context is 3043// canceled. 3044func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { 3045 c.ctx_ = ctx 3046 return c 3047} 3048 3049// Header returns an http.Header that can be modified by the caller to 3050// add HTTP headers to the request. 3051func (c *ProjectsLocationsGetCall) Header() http.Header { 3052 if c.header_ == nil { 3053 c.header_ = make(http.Header) 3054 } 3055 return c.header_ 3056} 3057 3058func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { 3059 reqHeaders := make(http.Header) 3060 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 3061 for k, v := range c.header_ { 3062 reqHeaders[k] = v 3063 } 3064 reqHeaders.Set("User-Agent", c.s.userAgent()) 3065 if c.ifNoneMatch_ != "" { 3066 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3067 } 3068 var body io.Reader = nil 3069 c.urlParams_.Set("alt", alt) 3070 c.urlParams_.Set("prettyPrint", "false") 3071 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 3072 urls += "?" + c.urlParams_.Encode() 3073 req, err := http.NewRequest("GET", urls, body) 3074 if err != nil { 3075 return nil, err 3076 } 3077 req.Header = reqHeaders 3078 googleapi.Expand(req.URL, map[string]string{ 3079 "name": c.name, 3080 }) 3081 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3082} 3083 3084// Do executes the "privateca.projects.locations.get" call. 3085// Exactly one of *Location or error will be non-nil. Any non-2xx status 3086// code is an error. Response headers are in either 3087// *Location.ServerResponse.Header or (if a response was returned at 3088// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 3089// to check whether the returned error was because 3090// http.StatusNotModified was returned. 3091func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { 3092 gensupport.SetOptions(c.urlParams_, opts...) 3093 res, err := c.doRequest("json") 3094 if res != nil && res.StatusCode == http.StatusNotModified { 3095 if res.Body != nil { 3096 res.Body.Close() 3097 } 3098 return nil, &googleapi.Error{ 3099 Code: res.StatusCode, 3100 Header: res.Header, 3101 } 3102 } 3103 if err != nil { 3104 return nil, err 3105 } 3106 defer googleapi.CloseBody(res) 3107 if err := googleapi.CheckResponse(res); err != nil { 3108 return nil, err 3109 } 3110 ret := &Location{ 3111 ServerResponse: googleapi.ServerResponse{ 3112 Header: res.Header, 3113 HTTPStatusCode: res.StatusCode, 3114 }, 3115 } 3116 target := &ret 3117 if err := gensupport.DecodeResponse(target, res); err != nil { 3118 return nil, err 3119 } 3120 return ret, nil 3121 // { 3122 // "description": "Gets information about a location.", 3123 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}", 3124 // "httpMethod": "GET", 3125 // "id": "privateca.projects.locations.get", 3126 // "parameterOrder": [ 3127 // "name" 3128 // ], 3129 // "parameters": { 3130 // "name": { 3131 // "description": "Resource name for the location.", 3132 // "location": "path", 3133 // "pattern": "^projects/[^/]+/locations/[^/]+$", 3134 // "required": true, 3135 // "type": "string" 3136 // } 3137 // }, 3138 // "path": "v1beta1/{+name}", 3139 // "response": { 3140 // "$ref": "Location" 3141 // }, 3142 // "scopes": [ 3143 // "https://www.googleapis.com/auth/cloud-platform" 3144 // ] 3145 // } 3146 3147} 3148 3149// method id "privateca.projects.locations.list": 3150 3151type ProjectsLocationsListCall struct { 3152 s *Service 3153 name string 3154 urlParams_ gensupport.URLParams 3155 ifNoneMatch_ string 3156 ctx_ context.Context 3157 header_ http.Header 3158} 3159 3160// List: Lists information about the supported locations for this 3161// service. 3162func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { 3163 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3164 c.name = name 3165 return c 3166} 3167 3168// Filter sets the optional parameter "filter": The standard list 3169// filter. 3170func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { 3171 c.urlParams_.Set("filter", filter) 3172 return c 3173} 3174 3175// PageSize sets the optional parameter "pageSize": The standard list 3176// page size. 3177func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { 3178 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 3179 return c 3180} 3181 3182// PageToken sets the optional parameter "pageToken": The standard list 3183// page token. 3184func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { 3185 c.urlParams_.Set("pageToken", pageToken) 3186 return c 3187} 3188 3189// Fields allows partial responses to be retrieved. See 3190// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3191// for more information. 3192func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { 3193 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3194 return c 3195} 3196 3197// IfNoneMatch sets the optional parameter which makes the operation 3198// fail if the object's ETag matches the given value. This is useful for 3199// getting updates only after the object has changed since the last 3200// request. Use googleapi.IsNotModified to check whether the response 3201// error from Do is the result of In-None-Match. 3202func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { 3203 c.ifNoneMatch_ = entityTag 3204 return c 3205} 3206 3207// Context sets the context to be used in this call's Do method. Any 3208// pending HTTP request will be aborted if the provided context is 3209// canceled. 3210func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { 3211 c.ctx_ = ctx 3212 return c 3213} 3214 3215// Header returns an http.Header that can be modified by the caller to 3216// add HTTP headers to the request. 3217func (c *ProjectsLocationsListCall) Header() http.Header { 3218 if c.header_ == nil { 3219 c.header_ = make(http.Header) 3220 } 3221 return c.header_ 3222} 3223 3224func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { 3225 reqHeaders := make(http.Header) 3226 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 3227 for k, v := range c.header_ { 3228 reqHeaders[k] = v 3229 } 3230 reqHeaders.Set("User-Agent", c.s.userAgent()) 3231 if c.ifNoneMatch_ != "" { 3232 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3233 } 3234 var body io.Reader = nil 3235 c.urlParams_.Set("alt", alt) 3236 c.urlParams_.Set("prettyPrint", "false") 3237 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/locations") 3238 urls += "?" + c.urlParams_.Encode() 3239 req, err := http.NewRequest("GET", urls, body) 3240 if err != nil { 3241 return nil, err 3242 } 3243 req.Header = reqHeaders 3244 googleapi.Expand(req.URL, map[string]string{ 3245 "name": c.name, 3246 }) 3247 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3248} 3249 3250// Do executes the "privateca.projects.locations.list" call. 3251// Exactly one of *ListLocationsResponse or error will be non-nil. Any 3252// non-2xx status code is an error. Response headers are in either 3253// *ListLocationsResponse.ServerResponse.Header or (if a response was 3254// returned at all) in error.(*googleapi.Error).Header. Use 3255// googleapi.IsNotModified to check whether the returned error was 3256// because http.StatusNotModified was returned. 3257func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { 3258 gensupport.SetOptions(c.urlParams_, opts...) 3259 res, err := c.doRequest("json") 3260 if res != nil && res.StatusCode == http.StatusNotModified { 3261 if res.Body != nil { 3262 res.Body.Close() 3263 } 3264 return nil, &googleapi.Error{ 3265 Code: res.StatusCode, 3266 Header: res.Header, 3267 } 3268 } 3269 if err != nil { 3270 return nil, err 3271 } 3272 defer googleapi.CloseBody(res) 3273 if err := googleapi.CheckResponse(res); err != nil { 3274 return nil, err 3275 } 3276 ret := &ListLocationsResponse{ 3277 ServerResponse: googleapi.ServerResponse{ 3278 Header: res.Header, 3279 HTTPStatusCode: res.StatusCode, 3280 }, 3281 } 3282 target := &ret 3283 if err := gensupport.DecodeResponse(target, res); err != nil { 3284 return nil, err 3285 } 3286 return ret, nil 3287 // { 3288 // "description": "Lists information about the supported locations for this service.", 3289 // "flatPath": "v1beta1/projects/{projectsId}/locations", 3290 // "httpMethod": "GET", 3291 // "id": "privateca.projects.locations.list", 3292 // "parameterOrder": [ 3293 // "name" 3294 // ], 3295 // "parameters": { 3296 // "filter": { 3297 // "description": "The standard list filter.", 3298 // "location": "query", 3299 // "type": "string" 3300 // }, 3301 // "name": { 3302 // "description": "The resource that owns the locations collection, if applicable.", 3303 // "location": "path", 3304 // "pattern": "^projects/[^/]+$", 3305 // "required": true, 3306 // "type": "string" 3307 // }, 3308 // "pageSize": { 3309 // "description": "The standard list page size.", 3310 // "format": "int32", 3311 // "location": "query", 3312 // "type": "integer" 3313 // }, 3314 // "pageToken": { 3315 // "description": "The standard list page token.", 3316 // "location": "query", 3317 // "type": "string" 3318 // } 3319 // }, 3320 // "path": "v1beta1/{+name}/locations", 3321 // "response": { 3322 // "$ref": "ListLocationsResponse" 3323 // }, 3324 // "scopes": [ 3325 // "https://www.googleapis.com/auth/cloud-platform" 3326 // ] 3327 // } 3328 3329} 3330 3331// Pages invokes f for each page of results. 3332// A non-nil error returned from f will halt the iteration. 3333// The provided context supersedes any context provided to the Context method. 3334func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { 3335 c.ctx_ = ctx 3336 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 3337 for { 3338 x, err := c.Do() 3339 if err != nil { 3340 return err 3341 } 3342 if err := f(x); err != nil { 3343 return err 3344 } 3345 if x.NextPageToken == "" { 3346 return nil 3347 } 3348 c.PageToken(x.NextPageToken) 3349 } 3350} 3351 3352// method id "privateca.projects.locations.certificateAuthorities.activate": 3353 3354type ProjectsLocationsCertificateAuthoritiesActivateCall struct { 3355 s *Service 3356 name string 3357 activatecertificateauthorityrequest *ActivateCertificateAuthorityRequest 3358 urlParams_ gensupport.URLParams 3359 ctx_ context.Context 3360 header_ http.Header 3361} 3362 3363// Activate: Activate a CertificateAuthority that is in state 3364// PENDING_ACTIVATION and is of type SUBORDINATE. After the parent 3365// Certificate Authority signs a certificate signing request from 3366// FetchCertificateAuthorityCsr, this method can complete the activation 3367// process. 3368func (r *ProjectsLocationsCertificateAuthoritiesService) Activate(name string, activatecertificateauthorityrequest *ActivateCertificateAuthorityRequest) *ProjectsLocationsCertificateAuthoritiesActivateCall { 3369 c := &ProjectsLocationsCertificateAuthoritiesActivateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3370 c.name = name 3371 c.activatecertificateauthorityrequest = activatecertificateauthorityrequest 3372 return c 3373} 3374 3375// Fields allows partial responses to be retrieved. See 3376// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3377// for more information. 3378func (c *ProjectsLocationsCertificateAuthoritiesActivateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateAuthoritiesActivateCall { 3379 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3380 return c 3381} 3382 3383// Context sets the context to be used in this call's Do method. Any 3384// pending HTTP request will be aborted if the provided context is 3385// canceled. 3386func (c *ProjectsLocationsCertificateAuthoritiesActivateCall) Context(ctx context.Context) *ProjectsLocationsCertificateAuthoritiesActivateCall { 3387 c.ctx_ = ctx 3388 return c 3389} 3390 3391// Header returns an http.Header that can be modified by the caller to 3392// add HTTP headers to the request. 3393func (c *ProjectsLocationsCertificateAuthoritiesActivateCall) Header() http.Header { 3394 if c.header_ == nil { 3395 c.header_ = make(http.Header) 3396 } 3397 return c.header_ 3398} 3399 3400func (c *ProjectsLocationsCertificateAuthoritiesActivateCall) doRequest(alt string) (*http.Response, error) { 3401 reqHeaders := make(http.Header) 3402 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 3403 for k, v := range c.header_ { 3404 reqHeaders[k] = v 3405 } 3406 reqHeaders.Set("User-Agent", c.s.userAgent()) 3407 var body io.Reader = nil 3408 body, err := googleapi.WithoutDataWrapper.JSONReader(c.activatecertificateauthorityrequest) 3409 if err != nil { 3410 return nil, err 3411 } 3412 reqHeaders.Set("Content-Type", "application/json") 3413 c.urlParams_.Set("alt", alt) 3414 c.urlParams_.Set("prettyPrint", "false") 3415 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:activate") 3416 urls += "?" + c.urlParams_.Encode() 3417 req, err := http.NewRequest("POST", urls, body) 3418 if err != nil { 3419 return nil, err 3420 } 3421 req.Header = reqHeaders 3422 googleapi.Expand(req.URL, map[string]string{ 3423 "name": c.name, 3424 }) 3425 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3426} 3427 3428// Do executes the "privateca.projects.locations.certificateAuthorities.activate" call. 3429// Exactly one of *Operation or error will be non-nil. Any non-2xx 3430// status code is an error. Response headers are in either 3431// *Operation.ServerResponse.Header or (if a response was returned at 3432// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 3433// to check whether the returned error was because 3434// http.StatusNotModified was returned. 3435func (c *ProjectsLocationsCertificateAuthoritiesActivateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 3436 gensupport.SetOptions(c.urlParams_, opts...) 3437 res, err := c.doRequest("json") 3438 if res != nil && res.StatusCode == http.StatusNotModified { 3439 if res.Body != nil { 3440 res.Body.Close() 3441 } 3442 return nil, &googleapi.Error{ 3443 Code: res.StatusCode, 3444 Header: res.Header, 3445 } 3446 } 3447 if err != nil { 3448 return nil, err 3449 } 3450 defer googleapi.CloseBody(res) 3451 if err := googleapi.CheckResponse(res); err != nil { 3452 return nil, err 3453 } 3454 ret := &Operation{ 3455 ServerResponse: googleapi.ServerResponse{ 3456 Header: res.Header, 3457 HTTPStatusCode: res.StatusCode, 3458 }, 3459 } 3460 target := &ret 3461 if err := gensupport.DecodeResponse(target, res); err != nil { 3462 return nil, err 3463 } 3464 return ret, nil 3465 // { 3466 // "description": "Activate a CertificateAuthority that is in state PENDING_ACTIVATION and is of type SUBORDINATE. After the parent Certificate Authority signs a certificate signing request from FetchCertificateAuthorityCsr, this method can complete the activation process.", 3467 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/certificateAuthorities/{certificateAuthoritiesId}:activate", 3468 // "httpMethod": "POST", 3469 // "id": "privateca.projects.locations.certificateAuthorities.activate", 3470 // "parameterOrder": [ 3471 // "name" 3472 // ], 3473 // "parameters": { 3474 // "name": { 3475 // "description": "Required. The resource name for this CertificateAuthority in the format `projects/*/locations/*/certificateAuthorities/*`.", 3476 // "location": "path", 3477 // "pattern": "^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+$", 3478 // "required": true, 3479 // "type": "string" 3480 // } 3481 // }, 3482 // "path": "v1beta1/{+name}:activate", 3483 // "request": { 3484 // "$ref": "ActivateCertificateAuthorityRequest" 3485 // }, 3486 // "response": { 3487 // "$ref": "Operation" 3488 // }, 3489 // "scopes": [ 3490 // "https://www.googleapis.com/auth/cloud-platform" 3491 // ] 3492 // } 3493 3494} 3495 3496// method id "privateca.projects.locations.certificateAuthorities.create": 3497 3498type ProjectsLocationsCertificateAuthoritiesCreateCall struct { 3499 s *Service 3500 parent string 3501 certificateauthority *CertificateAuthority 3502 urlParams_ gensupport.URLParams 3503 ctx_ context.Context 3504 header_ http.Header 3505} 3506 3507// Create: Create a new CertificateAuthority in a given Project and 3508// Location. 3509func (r *ProjectsLocationsCertificateAuthoritiesService) Create(parent string, certificateauthority *CertificateAuthority) *ProjectsLocationsCertificateAuthoritiesCreateCall { 3510 c := &ProjectsLocationsCertificateAuthoritiesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3511 c.parent = parent 3512 c.certificateauthority = certificateauthority 3513 return c 3514} 3515 3516// CertificateAuthorityId sets the optional parameter 3517// "certificateAuthorityId": Required. It must be unique within a 3518// location and match the regular expression `[a-zA-Z0-9_-]{1,63}` 3519func (c *ProjectsLocationsCertificateAuthoritiesCreateCall) CertificateAuthorityId(certificateAuthorityId string) *ProjectsLocationsCertificateAuthoritiesCreateCall { 3520 c.urlParams_.Set("certificateAuthorityId", certificateAuthorityId) 3521 return c 3522} 3523 3524// RequestId sets the optional parameter "requestId": An ID to identify 3525// requests. Specify a unique request ID so that if you must retry your 3526// request, the server will know to ignore the request if it has already 3527// been completed. The server will guarantee that for at least 60 3528// minutes since the first request. For example, consider a situation 3529// where you make an initial request and t he request times out. If you 3530// make the request again with the same request ID, the server can check 3531// if original operation with the same request ID was received, and if 3532// so, will ignore the second request. This prevents clients from 3533// accidentally creating duplicate commitments. The request ID must be a 3534// valid UUID with the exception that zero UUID is not supported 3535// (00000000-0000-0000-0000-000000000000). 3536func (c *ProjectsLocationsCertificateAuthoritiesCreateCall) RequestId(requestId string) *ProjectsLocationsCertificateAuthoritiesCreateCall { 3537 c.urlParams_.Set("requestId", requestId) 3538 return c 3539} 3540 3541// Fields allows partial responses to be retrieved. See 3542// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3543// for more information. 3544func (c *ProjectsLocationsCertificateAuthoritiesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateAuthoritiesCreateCall { 3545 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3546 return c 3547} 3548 3549// Context sets the context to be used in this call's Do method. Any 3550// pending HTTP request will be aborted if the provided context is 3551// canceled. 3552func (c *ProjectsLocationsCertificateAuthoritiesCreateCall) Context(ctx context.Context) *ProjectsLocationsCertificateAuthoritiesCreateCall { 3553 c.ctx_ = ctx 3554 return c 3555} 3556 3557// Header returns an http.Header that can be modified by the caller to 3558// add HTTP headers to the request. 3559func (c *ProjectsLocationsCertificateAuthoritiesCreateCall) Header() http.Header { 3560 if c.header_ == nil { 3561 c.header_ = make(http.Header) 3562 } 3563 return c.header_ 3564} 3565 3566func (c *ProjectsLocationsCertificateAuthoritiesCreateCall) doRequest(alt string) (*http.Response, error) { 3567 reqHeaders := make(http.Header) 3568 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 3569 for k, v := range c.header_ { 3570 reqHeaders[k] = v 3571 } 3572 reqHeaders.Set("User-Agent", c.s.userAgent()) 3573 var body io.Reader = nil 3574 body, err := googleapi.WithoutDataWrapper.JSONReader(c.certificateauthority) 3575 if err != nil { 3576 return nil, err 3577 } 3578 reqHeaders.Set("Content-Type", "application/json") 3579 c.urlParams_.Set("alt", alt) 3580 c.urlParams_.Set("prettyPrint", "false") 3581 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/certificateAuthorities") 3582 urls += "?" + c.urlParams_.Encode() 3583 req, err := http.NewRequest("POST", urls, body) 3584 if err != nil { 3585 return nil, err 3586 } 3587 req.Header = reqHeaders 3588 googleapi.Expand(req.URL, map[string]string{ 3589 "parent": c.parent, 3590 }) 3591 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3592} 3593 3594// Do executes the "privateca.projects.locations.certificateAuthorities.create" call. 3595// Exactly one of *Operation or error will be non-nil. Any non-2xx 3596// status code is an error. Response headers are in either 3597// *Operation.ServerResponse.Header or (if a response was returned at 3598// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 3599// to check whether the returned error was because 3600// http.StatusNotModified was returned. 3601func (c *ProjectsLocationsCertificateAuthoritiesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 3602 gensupport.SetOptions(c.urlParams_, opts...) 3603 res, err := c.doRequest("json") 3604 if res != nil && res.StatusCode == http.StatusNotModified { 3605 if res.Body != nil { 3606 res.Body.Close() 3607 } 3608 return nil, &googleapi.Error{ 3609 Code: res.StatusCode, 3610 Header: res.Header, 3611 } 3612 } 3613 if err != nil { 3614 return nil, err 3615 } 3616 defer googleapi.CloseBody(res) 3617 if err := googleapi.CheckResponse(res); err != nil { 3618 return nil, err 3619 } 3620 ret := &Operation{ 3621 ServerResponse: googleapi.ServerResponse{ 3622 Header: res.Header, 3623 HTTPStatusCode: res.StatusCode, 3624 }, 3625 } 3626 target := &ret 3627 if err := gensupport.DecodeResponse(target, res); err != nil { 3628 return nil, err 3629 } 3630 return ret, nil 3631 // { 3632 // "description": "Create a new CertificateAuthority in a given Project and Location.", 3633 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/certificateAuthorities", 3634 // "httpMethod": "POST", 3635 // "id": "privateca.projects.locations.certificateAuthorities.create", 3636 // "parameterOrder": [ 3637 // "parent" 3638 // ], 3639 // "parameters": { 3640 // "certificateAuthorityId": { 3641 // "description": "Required. It must be unique within a location and match the regular expression `[a-zA-Z0-9_-]{1,63}`", 3642 // "location": "query", 3643 // "type": "string" 3644 // }, 3645 // "parent": { 3646 // "description": "Required. The resource name of the location associated with the CertificateAuthorities, in the format `projects/*/locations/*`.", 3647 // "location": "path", 3648 // "pattern": "^projects/[^/]+/locations/[^/]+$", 3649 // "required": true, 3650 // "type": "string" 3651 // }, 3652 // "requestId": { 3653 // "description": "Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", 3654 // "location": "query", 3655 // "type": "string" 3656 // } 3657 // }, 3658 // "path": "v1beta1/{+parent}/certificateAuthorities", 3659 // "request": { 3660 // "$ref": "CertificateAuthority" 3661 // }, 3662 // "response": { 3663 // "$ref": "Operation" 3664 // }, 3665 // "scopes": [ 3666 // "https://www.googleapis.com/auth/cloud-platform" 3667 // ] 3668 // } 3669 3670} 3671 3672// method id "privateca.projects.locations.certificateAuthorities.disable": 3673 3674type ProjectsLocationsCertificateAuthoritiesDisableCall struct { 3675 s *Service 3676 name string 3677 disablecertificateauthorityrequest *DisableCertificateAuthorityRequest 3678 urlParams_ gensupport.URLParams 3679 ctx_ context.Context 3680 header_ http.Header 3681} 3682 3683// Disable: Disable a CertificateAuthority. 3684func (r *ProjectsLocationsCertificateAuthoritiesService) Disable(name string, disablecertificateauthorityrequest *DisableCertificateAuthorityRequest) *ProjectsLocationsCertificateAuthoritiesDisableCall { 3685 c := &ProjectsLocationsCertificateAuthoritiesDisableCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3686 c.name = name 3687 c.disablecertificateauthorityrequest = disablecertificateauthorityrequest 3688 return c 3689} 3690 3691// Fields allows partial responses to be retrieved. See 3692// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3693// for more information. 3694func (c *ProjectsLocationsCertificateAuthoritiesDisableCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateAuthoritiesDisableCall { 3695 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3696 return c 3697} 3698 3699// Context sets the context to be used in this call's Do method. Any 3700// pending HTTP request will be aborted if the provided context is 3701// canceled. 3702func (c *ProjectsLocationsCertificateAuthoritiesDisableCall) Context(ctx context.Context) *ProjectsLocationsCertificateAuthoritiesDisableCall { 3703 c.ctx_ = ctx 3704 return c 3705} 3706 3707// Header returns an http.Header that can be modified by the caller to 3708// add HTTP headers to the request. 3709func (c *ProjectsLocationsCertificateAuthoritiesDisableCall) Header() http.Header { 3710 if c.header_ == nil { 3711 c.header_ = make(http.Header) 3712 } 3713 return c.header_ 3714} 3715 3716func (c *ProjectsLocationsCertificateAuthoritiesDisableCall) doRequest(alt string) (*http.Response, error) { 3717 reqHeaders := make(http.Header) 3718 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 3719 for k, v := range c.header_ { 3720 reqHeaders[k] = v 3721 } 3722 reqHeaders.Set("User-Agent", c.s.userAgent()) 3723 var body io.Reader = nil 3724 body, err := googleapi.WithoutDataWrapper.JSONReader(c.disablecertificateauthorityrequest) 3725 if err != nil { 3726 return nil, err 3727 } 3728 reqHeaders.Set("Content-Type", "application/json") 3729 c.urlParams_.Set("alt", alt) 3730 c.urlParams_.Set("prettyPrint", "false") 3731 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:disable") 3732 urls += "?" + c.urlParams_.Encode() 3733 req, err := http.NewRequest("POST", urls, body) 3734 if err != nil { 3735 return nil, err 3736 } 3737 req.Header = reqHeaders 3738 googleapi.Expand(req.URL, map[string]string{ 3739 "name": c.name, 3740 }) 3741 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3742} 3743 3744// Do executes the "privateca.projects.locations.certificateAuthorities.disable" call. 3745// Exactly one of *Operation or error will be non-nil. Any non-2xx 3746// status code is an error. Response headers are in either 3747// *Operation.ServerResponse.Header or (if a response was returned at 3748// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 3749// to check whether the returned error was because 3750// http.StatusNotModified was returned. 3751func (c *ProjectsLocationsCertificateAuthoritiesDisableCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 3752 gensupport.SetOptions(c.urlParams_, opts...) 3753 res, err := c.doRequest("json") 3754 if res != nil && res.StatusCode == http.StatusNotModified { 3755 if res.Body != nil { 3756 res.Body.Close() 3757 } 3758 return nil, &googleapi.Error{ 3759 Code: res.StatusCode, 3760 Header: res.Header, 3761 } 3762 } 3763 if err != nil { 3764 return nil, err 3765 } 3766 defer googleapi.CloseBody(res) 3767 if err := googleapi.CheckResponse(res); err != nil { 3768 return nil, err 3769 } 3770 ret := &Operation{ 3771 ServerResponse: googleapi.ServerResponse{ 3772 Header: res.Header, 3773 HTTPStatusCode: res.StatusCode, 3774 }, 3775 } 3776 target := &ret 3777 if err := gensupport.DecodeResponse(target, res); err != nil { 3778 return nil, err 3779 } 3780 return ret, nil 3781 // { 3782 // "description": "Disable a CertificateAuthority.", 3783 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/certificateAuthorities/{certificateAuthoritiesId}:disable", 3784 // "httpMethod": "POST", 3785 // "id": "privateca.projects.locations.certificateAuthorities.disable", 3786 // "parameterOrder": [ 3787 // "name" 3788 // ], 3789 // "parameters": { 3790 // "name": { 3791 // "description": "Required. The resource name for this CertificateAuthority in the format `projects/*/locations/*/certificateAuthorities/*`.", 3792 // "location": "path", 3793 // "pattern": "^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+$", 3794 // "required": true, 3795 // "type": "string" 3796 // } 3797 // }, 3798 // "path": "v1beta1/{+name}:disable", 3799 // "request": { 3800 // "$ref": "DisableCertificateAuthorityRequest" 3801 // }, 3802 // "response": { 3803 // "$ref": "Operation" 3804 // }, 3805 // "scopes": [ 3806 // "https://www.googleapis.com/auth/cloud-platform" 3807 // ] 3808 // } 3809 3810} 3811 3812// method id "privateca.projects.locations.certificateAuthorities.enable": 3813 3814type ProjectsLocationsCertificateAuthoritiesEnableCall struct { 3815 s *Service 3816 name string 3817 enablecertificateauthorityrequest *EnableCertificateAuthorityRequest 3818 urlParams_ gensupport.URLParams 3819 ctx_ context.Context 3820 header_ http.Header 3821} 3822 3823// Enable: Enable a CertificateAuthority. 3824func (r *ProjectsLocationsCertificateAuthoritiesService) Enable(name string, enablecertificateauthorityrequest *EnableCertificateAuthorityRequest) *ProjectsLocationsCertificateAuthoritiesEnableCall { 3825 c := &ProjectsLocationsCertificateAuthoritiesEnableCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3826 c.name = name 3827 c.enablecertificateauthorityrequest = enablecertificateauthorityrequest 3828 return c 3829} 3830 3831// Fields allows partial responses to be retrieved. See 3832// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3833// for more information. 3834func (c *ProjectsLocationsCertificateAuthoritiesEnableCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateAuthoritiesEnableCall { 3835 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3836 return c 3837} 3838 3839// Context sets the context to be used in this call's Do method. Any 3840// pending HTTP request will be aborted if the provided context is 3841// canceled. 3842func (c *ProjectsLocationsCertificateAuthoritiesEnableCall) Context(ctx context.Context) *ProjectsLocationsCertificateAuthoritiesEnableCall { 3843 c.ctx_ = ctx 3844 return c 3845} 3846 3847// Header returns an http.Header that can be modified by the caller to 3848// add HTTP headers to the request. 3849func (c *ProjectsLocationsCertificateAuthoritiesEnableCall) Header() http.Header { 3850 if c.header_ == nil { 3851 c.header_ = make(http.Header) 3852 } 3853 return c.header_ 3854} 3855 3856func (c *ProjectsLocationsCertificateAuthoritiesEnableCall) doRequest(alt string) (*http.Response, error) { 3857 reqHeaders := make(http.Header) 3858 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 3859 for k, v := range c.header_ { 3860 reqHeaders[k] = v 3861 } 3862 reqHeaders.Set("User-Agent", c.s.userAgent()) 3863 var body io.Reader = nil 3864 body, err := googleapi.WithoutDataWrapper.JSONReader(c.enablecertificateauthorityrequest) 3865 if err != nil { 3866 return nil, err 3867 } 3868 reqHeaders.Set("Content-Type", "application/json") 3869 c.urlParams_.Set("alt", alt) 3870 c.urlParams_.Set("prettyPrint", "false") 3871 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:enable") 3872 urls += "?" + c.urlParams_.Encode() 3873 req, err := http.NewRequest("POST", urls, body) 3874 if err != nil { 3875 return nil, err 3876 } 3877 req.Header = reqHeaders 3878 googleapi.Expand(req.URL, map[string]string{ 3879 "name": c.name, 3880 }) 3881 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3882} 3883 3884// Do executes the "privateca.projects.locations.certificateAuthorities.enable" call. 3885// Exactly one of *Operation or error will be non-nil. Any non-2xx 3886// status code is an error. Response headers are in either 3887// *Operation.ServerResponse.Header or (if a response was returned at 3888// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 3889// to check whether the returned error was because 3890// http.StatusNotModified was returned. 3891func (c *ProjectsLocationsCertificateAuthoritiesEnableCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 3892 gensupport.SetOptions(c.urlParams_, opts...) 3893 res, err := c.doRequest("json") 3894 if res != nil && res.StatusCode == http.StatusNotModified { 3895 if res.Body != nil { 3896 res.Body.Close() 3897 } 3898 return nil, &googleapi.Error{ 3899 Code: res.StatusCode, 3900 Header: res.Header, 3901 } 3902 } 3903 if err != nil { 3904 return nil, err 3905 } 3906 defer googleapi.CloseBody(res) 3907 if err := googleapi.CheckResponse(res); err != nil { 3908 return nil, err 3909 } 3910 ret := &Operation{ 3911 ServerResponse: googleapi.ServerResponse{ 3912 Header: res.Header, 3913 HTTPStatusCode: res.StatusCode, 3914 }, 3915 } 3916 target := &ret 3917 if err := gensupport.DecodeResponse(target, res); err != nil { 3918 return nil, err 3919 } 3920 return ret, nil 3921 // { 3922 // "description": "Enable a CertificateAuthority.", 3923 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/certificateAuthorities/{certificateAuthoritiesId}:enable", 3924 // "httpMethod": "POST", 3925 // "id": "privateca.projects.locations.certificateAuthorities.enable", 3926 // "parameterOrder": [ 3927 // "name" 3928 // ], 3929 // "parameters": { 3930 // "name": { 3931 // "description": "Required. The resource name for this CertificateAuthority in the format `projects/*/locations/*/certificateAuthorities/*`.", 3932 // "location": "path", 3933 // "pattern": "^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+$", 3934 // "required": true, 3935 // "type": "string" 3936 // } 3937 // }, 3938 // "path": "v1beta1/{+name}:enable", 3939 // "request": { 3940 // "$ref": "EnableCertificateAuthorityRequest" 3941 // }, 3942 // "response": { 3943 // "$ref": "Operation" 3944 // }, 3945 // "scopes": [ 3946 // "https://www.googleapis.com/auth/cloud-platform" 3947 // ] 3948 // } 3949 3950} 3951 3952// method id "privateca.projects.locations.certificateAuthorities.fetch": 3953 3954type ProjectsLocationsCertificateAuthoritiesFetchCall struct { 3955 s *Service 3956 name string 3957 urlParams_ gensupport.URLParams 3958 ifNoneMatch_ string 3959 ctx_ context.Context 3960 header_ http.Header 3961} 3962 3963// Fetch: Fetch a certificate signing request (CSR) from a 3964// CertificateAuthority that is in state PENDING_ACTIVATION and is of 3965// type SUBORDINATE. The CSR must then be signed by the desired parent 3966// Certificate Authority, which could be another CertificateAuthority 3967// resource, or could be an on-prem certificate authority. See also 3968// ActivateCertificateAuthority. 3969func (r *ProjectsLocationsCertificateAuthoritiesService) Fetch(name string) *ProjectsLocationsCertificateAuthoritiesFetchCall { 3970 c := &ProjectsLocationsCertificateAuthoritiesFetchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3971 c.name = name 3972 return c 3973} 3974 3975// Fields allows partial responses to be retrieved. See 3976// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3977// for more information. 3978func (c *ProjectsLocationsCertificateAuthoritiesFetchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateAuthoritiesFetchCall { 3979 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3980 return c 3981} 3982 3983// IfNoneMatch sets the optional parameter which makes the operation 3984// fail if the object's ETag matches the given value. This is useful for 3985// getting updates only after the object has changed since the last 3986// request. Use googleapi.IsNotModified to check whether the response 3987// error from Do is the result of In-None-Match. 3988func (c *ProjectsLocationsCertificateAuthoritiesFetchCall) IfNoneMatch(entityTag string) *ProjectsLocationsCertificateAuthoritiesFetchCall { 3989 c.ifNoneMatch_ = entityTag 3990 return c 3991} 3992 3993// Context sets the context to be used in this call's Do method. Any 3994// pending HTTP request will be aborted if the provided context is 3995// canceled. 3996func (c *ProjectsLocationsCertificateAuthoritiesFetchCall) Context(ctx context.Context) *ProjectsLocationsCertificateAuthoritiesFetchCall { 3997 c.ctx_ = ctx 3998 return c 3999} 4000 4001// Header returns an http.Header that can be modified by the caller to 4002// add HTTP headers to the request. 4003func (c *ProjectsLocationsCertificateAuthoritiesFetchCall) Header() http.Header { 4004 if c.header_ == nil { 4005 c.header_ = make(http.Header) 4006 } 4007 return c.header_ 4008} 4009 4010func (c *ProjectsLocationsCertificateAuthoritiesFetchCall) doRequest(alt string) (*http.Response, error) { 4011 reqHeaders := make(http.Header) 4012 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 4013 for k, v := range c.header_ { 4014 reqHeaders[k] = v 4015 } 4016 reqHeaders.Set("User-Agent", c.s.userAgent()) 4017 if c.ifNoneMatch_ != "" { 4018 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4019 } 4020 var body io.Reader = nil 4021 c.urlParams_.Set("alt", alt) 4022 c.urlParams_.Set("prettyPrint", "false") 4023 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:fetch") 4024 urls += "?" + c.urlParams_.Encode() 4025 req, err := http.NewRequest("GET", urls, body) 4026 if err != nil { 4027 return nil, err 4028 } 4029 req.Header = reqHeaders 4030 googleapi.Expand(req.URL, map[string]string{ 4031 "name": c.name, 4032 }) 4033 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4034} 4035 4036// Do executes the "privateca.projects.locations.certificateAuthorities.fetch" call. 4037// Exactly one of *FetchCertificateAuthorityCsrResponse or error will be 4038// non-nil. Any non-2xx status code is an error. Response headers are in 4039// either *FetchCertificateAuthorityCsrResponse.ServerResponse.Header or 4040// (if a response was returned at all) in 4041// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4042// whether the returned error was because http.StatusNotModified was 4043// returned. 4044func (c *ProjectsLocationsCertificateAuthoritiesFetchCall) Do(opts ...googleapi.CallOption) (*FetchCertificateAuthorityCsrResponse, error) { 4045 gensupport.SetOptions(c.urlParams_, opts...) 4046 res, err := c.doRequest("json") 4047 if res != nil && res.StatusCode == http.StatusNotModified { 4048 if res.Body != nil { 4049 res.Body.Close() 4050 } 4051 return nil, &googleapi.Error{ 4052 Code: res.StatusCode, 4053 Header: res.Header, 4054 } 4055 } 4056 if err != nil { 4057 return nil, err 4058 } 4059 defer googleapi.CloseBody(res) 4060 if err := googleapi.CheckResponse(res); err != nil { 4061 return nil, err 4062 } 4063 ret := &FetchCertificateAuthorityCsrResponse{ 4064 ServerResponse: googleapi.ServerResponse{ 4065 Header: res.Header, 4066 HTTPStatusCode: res.StatusCode, 4067 }, 4068 } 4069 target := &ret 4070 if err := gensupport.DecodeResponse(target, res); err != nil { 4071 return nil, err 4072 } 4073 return ret, nil 4074 // { 4075 // "description": "Fetch a certificate signing request (CSR) from a CertificateAuthority that is in state PENDING_ACTIVATION and is of type SUBORDINATE. The CSR must then be signed by the desired parent Certificate Authority, which could be another CertificateAuthority resource, or could be an on-prem certificate authority. See also ActivateCertificateAuthority.", 4076 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/certificateAuthorities/{certificateAuthoritiesId}:fetch", 4077 // "httpMethod": "GET", 4078 // "id": "privateca.projects.locations.certificateAuthorities.fetch", 4079 // "parameterOrder": [ 4080 // "name" 4081 // ], 4082 // "parameters": { 4083 // "name": { 4084 // "description": "Required. The resource name for this CertificateAuthority in the format `projects/*/locations/*/certificateAuthorities/*`.", 4085 // "location": "path", 4086 // "pattern": "^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+$", 4087 // "required": true, 4088 // "type": "string" 4089 // } 4090 // }, 4091 // "path": "v1beta1/{+name}:fetch", 4092 // "response": { 4093 // "$ref": "FetchCertificateAuthorityCsrResponse" 4094 // }, 4095 // "scopes": [ 4096 // "https://www.googleapis.com/auth/cloud-platform" 4097 // ] 4098 // } 4099 4100} 4101 4102// method id "privateca.projects.locations.certificateAuthorities.get": 4103 4104type ProjectsLocationsCertificateAuthoritiesGetCall struct { 4105 s *Service 4106 name string 4107 urlParams_ gensupport.URLParams 4108 ifNoneMatch_ string 4109 ctx_ context.Context 4110 header_ http.Header 4111} 4112 4113// Get: Returns a CertificateAuthority. 4114func (r *ProjectsLocationsCertificateAuthoritiesService) Get(name string) *ProjectsLocationsCertificateAuthoritiesGetCall { 4115 c := &ProjectsLocationsCertificateAuthoritiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4116 c.name = name 4117 return c 4118} 4119 4120// Fields allows partial responses to be retrieved. See 4121// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4122// for more information. 4123func (c *ProjectsLocationsCertificateAuthoritiesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateAuthoritiesGetCall { 4124 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4125 return c 4126} 4127 4128// IfNoneMatch sets the optional parameter which makes the operation 4129// fail if the object's ETag matches the given value. This is useful for 4130// getting updates only after the object has changed since the last 4131// request. Use googleapi.IsNotModified to check whether the response 4132// error from Do is the result of In-None-Match. 4133func (c *ProjectsLocationsCertificateAuthoritiesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCertificateAuthoritiesGetCall { 4134 c.ifNoneMatch_ = entityTag 4135 return c 4136} 4137 4138// Context sets the context to be used in this call's Do method. Any 4139// pending HTTP request will be aborted if the provided context is 4140// canceled. 4141func (c *ProjectsLocationsCertificateAuthoritiesGetCall) Context(ctx context.Context) *ProjectsLocationsCertificateAuthoritiesGetCall { 4142 c.ctx_ = ctx 4143 return c 4144} 4145 4146// Header returns an http.Header that can be modified by the caller to 4147// add HTTP headers to the request. 4148func (c *ProjectsLocationsCertificateAuthoritiesGetCall) Header() http.Header { 4149 if c.header_ == nil { 4150 c.header_ = make(http.Header) 4151 } 4152 return c.header_ 4153} 4154 4155func (c *ProjectsLocationsCertificateAuthoritiesGetCall) doRequest(alt string) (*http.Response, error) { 4156 reqHeaders := make(http.Header) 4157 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 4158 for k, v := range c.header_ { 4159 reqHeaders[k] = v 4160 } 4161 reqHeaders.Set("User-Agent", c.s.userAgent()) 4162 if c.ifNoneMatch_ != "" { 4163 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4164 } 4165 var body io.Reader = nil 4166 c.urlParams_.Set("alt", alt) 4167 c.urlParams_.Set("prettyPrint", "false") 4168 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 4169 urls += "?" + c.urlParams_.Encode() 4170 req, err := http.NewRequest("GET", urls, body) 4171 if err != nil { 4172 return nil, err 4173 } 4174 req.Header = reqHeaders 4175 googleapi.Expand(req.URL, map[string]string{ 4176 "name": c.name, 4177 }) 4178 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4179} 4180 4181// Do executes the "privateca.projects.locations.certificateAuthorities.get" call. 4182// Exactly one of *CertificateAuthority or error will be non-nil. Any 4183// non-2xx status code is an error. Response headers are in either 4184// *CertificateAuthority.ServerResponse.Header or (if a response was 4185// returned at all) in error.(*googleapi.Error).Header. Use 4186// googleapi.IsNotModified to check whether the returned error was 4187// because http.StatusNotModified was returned. 4188func (c *ProjectsLocationsCertificateAuthoritiesGetCall) Do(opts ...googleapi.CallOption) (*CertificateAuthority, error) { 4189 gensupport.SetOptions(c.urlParams_, opts...) 4190 res, err := c.doRequest("json") 4191 if res != nil && res.StatusCode == http.StatusNotModified { 4192 if res.Body != nil { 4193 res.Body.Close() 4194 } 4195 return nil, &googleapi.Error{ 4196 Code: res.StatusCode, 4197 Header: res.Header, 4198 } 4199 } 4200 if err != nil { 4201 return nil, err 4202 } 4203 defer googleapi.CloseBody(res) 4204 if err := googleapi.CheckResponse(res); err != nil { 4205 return nil, err 4206 } 4207 ret := &CertificateAuthority{ 4208 ServerResponse: googleapi.ServerResponse{ 4209 Header: res.Header, 4210 HTTPStatusCode: res.StatusCode, 4211 }, 4212 } 4213 target := &ret 4214 if err := gensupport.DecodeResponse(target, res); err != nil { 4215 return nil, err 4216 } 4217 return ret, nil 4218 // { 4219 // "description": "Returns a CertificateAuthority.", 4220 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/certificateAuthorities/{certificateAuthoritiesId}", 4221 // "httpMethod": "GET", 4222 // "id": "privateca.projects.locations.certificateAuthorities.get", 4223 // "parameterOrder": [ 4224 // "name" 4225 // ], 4226 // "parameters": { 4227 // "name": { 4228 // "description": "Required. The name of the CertificateAuthority to get.", 4229 // "location": "path", 4230 // "pattern": "^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+$", 4231 // "required": true, 4232 // "type": "string" 4233 // } 4234 // }, 4235 // "path": "v1beta1/{+name}", 4236 // "response": { 4237 // "$ref": "CertificateAuthority" 4238 // }, 4239 // "scopes": [ 4240 // "https://www.googleapis.com/auth/cloud-platform" 4241 // ] 4242 // } 4243 4244} 4245 4246// method id "privateca.projects.locations.certificateAuthorities.getIamPolicy": 4247 4248type ProjectsLocationsCertificateAuthoritiesGetIamPolicyCall struct { 4249 s *Service 4250 resource string 4251 urlParams_ gensupport.URLParams 4252 ifNoneMatch_ string 4253 ctx_ context.Context 4254 header_ http.Header 4255} 4256 4257// GetIamPolicy: Gets the access control policy for a resource. Returns 4258// an empty policy if the resource exists and does not have a policy 4259// set. 4260func (r *ProjectsLocationsCertificateAuthoritiesService) GetIamPolicy(resource string) *ProjectsLocationsCertificateAuthoritiesGetIamPolicyCall { 4261 c := &ProjectsLocationsCertificateAuthoritiesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4262 c.resource = resource 4263 return c 4264} 4265 4266// OptionsRequestedPolicyVersion sets the optional parameter 4267// "options.requestedPolicyVersion": The policy format version to be 4268// returned. Valid values are 0, 1, and 3. Requests specifying an 4269// invalid value will be rejected. Requests for policies with any 4270// conditional bindings must specify version 3. Policies without any 4271// conditional bindings may specify any valid value or leave the field 4272// unset. To learn which resources support conditions in their IAM 4273// policies, see the [IAM 4274// documentation](https://cloud.google.com/iam/help/conditions/resource-p 4275// olicies). 4276func (c *ProjectsLocationsCertificateAuthoritiesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsCertificateAuthoritiesGetIamPolicyCall { 4277 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) 4278 return c 4279} 4280 4281// Fields allows partial responses to be retrieved. See 4282// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4283// for more information. 4284func (c *ProjectsLocationsCertificateAuthoritiesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateAuthoritiesGetIamPolicyCall { 4285 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4286 return c 4287} 4288 4289// IfNoneMatch sets the optional parameter which makes the operation 4290// fail if the object's ETag matches the given value. This is useful for 4291// getting updates only after the object has changed since the last 4292// request. Use googleapi.IsNotModified to check whether the response 4293// error from Do is the result of In-None-Match. 4294func (c *ProjectsLocationsCertificateAuthoritiesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsCertificateAuthoritiesGetIamPolicyCall { 4295 c.ifNoneMatch_ = entityTag 4296 return c 4297} 4298 4299// Context sets the context to be used in this call's Do method. Any 4300// pending HTTP request will be aborted if the provided context is 4301// canceled. 4302func (c *ProjectsLocationsCertificateAuthoritiesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsCertificateAuthoritiesGetIamPolicyCall { 4303 c.ctx_ = ctx 4304 return c 4305} 4306 4307// Header returns an http.Header that can be modified by the caller to 4308// add HTTP headers to the request. 4309func (c *ProjectsLocationsCertificateAuthoritiesGetIamPolicyCall) Header() http.Header { 4310 if c.header_ == nil { 4311 c.header_ = make(http.Header) 4312 } 4313 return c.header_ 4314} 4315 4316func (c *ProjectsLocationsCertificateAuthoritiesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 4317 reqHeaders := make(http.Header) 4318 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 4319 for k, v := range c.header_ { 4320 reqHeaders[k] = v 4321 } 4322 reqHeaders.Set("User-Agent", c.s.userAgent()) 4323 if c.ifNoneMatch_ != "" { 4324 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4325 } 4326 var body io.Reader = nil 4327 c.urlParams_.Set("alt", alt) 4328 c.urlParams_.Set("prettyPrint", "false") 4329 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy") 4330 urls += "?" + c.urlParams_.Encode() 4331 req, err := http.NewRequest("GET", urls, body) 4332 if err != nil { 4333 return nil, err 4334 } 4335 req.Header = reqHeaders 4336 googleapi.Expand(req.URL, map[string]string{ 4337 "resource": c.resource, 4338 }) 4339 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4340} 4341 4342// Do executes the "privateca.projects.locations.certificateAuthorities.getIamPolicy" call. 4343// Exactly one of *Policy or error will be non-nil. Any non-2xx status 4344// code is an error. Response headers are in either 4345// *Policy.ServerResponse.Header or (if a response was returned at all) 4346// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 4347// check whether the returned error was because http.StatusNotModified 4348// was returned. 4349func (c *ProjectsLocationsCertificateAuthoritiesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 4350 gensupport.SetOptions(c.urlParams_, opts...) 4351 res, err := c.doRequest("json") 4352 if res != nil && res.StatusCode == http.StatusNotModified { 4353 if res.Body != nil { 4354 res.Body.Close() 4355 } 4356 return nil, &googleapi.Error{ 4357 Code: res.StatusCode, 4358 Header: res.Header, 4359 } 4360 } 4361 if err != nil { 4362 return nil, err 4363 } 4364 defer googleapi.CloseBody(res) 4365 if err := googleapi.CheckResponse(res); err != nil { 4366 return nil, err 4367 } 4368 ret := &Policy{ 4369 ServerResponse: googleapi.ServerResponse{ 4370 Header: res.Header, 4371 HTTPStatusCode: res.StatusCode, 4372 }, 4373 } 4374 target := &ret 4375 if err := gensupport.DecodeResponse(target, res); err != nil { 4376 return nil, err 4377 } 4378 return ret, nil 4379 // { 4380 // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", 4381 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/certificateAuthorities/{certificateAuthoritiesId}:getIamPolicy", 4382 // "httpMethod": "GET", 4383 // "id": "privateca.projects.locations.certificateAuthorities.getIamPolicy", 4384 // "parameterOrder": [ 4385 // "resource" 4386 // ], 4387 // "parameters": { 4388 // "options.requestedPolicyVersion": { 4389 // "description": "Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", 4390 // "format": "int32", 4391 // "location": "query", 4392 // "type": "integer" 4393 // }, 4394 // "resource": { 4395 // "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", 4396 // "location": "path", 4397 // "pattern": "^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+$", 4398 // "required": true, 4399 // "type": "string" 4400 // } 4401 // }, 4402 // "path": "v1beta1/{+resource}:getIamPolicy", 4403 // "response": { 4404 // "$ref": "Policy" 4405 // }, 4406 // "scopes": [ 4407 // "https://www.googleapis.com/auth/cloud-platform" 4408 // ] 4409 // } 4410 4411} 4412 4413// method id "privateca.projects.locations.certificateAuthorities.list": 4414 4415type ProjectsLocationsCertificateAuthoritiesListCall struct { 4416 s *Service 4417 parent string 4418 urlParams_ gensupport.URLParams 4419 ifNoneMatch_ string 4420 ctx_ context.Context 4421 header_ http.Header 4422} 4423 4424// List: Lists CertificateAuthorities. 4425func (r *ProjectsLocationsCertificateAuthoritiesService) List(parent string) *ProjectsLocationsCertificateAuthoritiesListCall { 4426 c := &ProjectsLocationsCertificateAuthoritiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4427 c.parent = parent 4428 return c 4429} 4430 4431// Filter sets the optional parameter "filter": Only include resources 4432// that match the filter in the response. 4433func (c *ProjectsLocationsCertificateAuthoritiesListCall) Filter(filter string) *ProjectsLocationsCertificateAuthoritiesListCall { 4434 c.urlParams_.Set("filter", filter) 4435 return c 4436} 4437 4438// OrderBy sets the optional parameter "orderBy": Specify how the 4439// results should be sorted. 4440func (c *ProjectsLocationsCertificateAuthoritiesListCall) OrderBy(orderBy string) *ProjectsLocationsCertificateAuthoritiesListCall { 4441 c.urlParams_.Set("orderBy", orderBy) 4442 return c 4443} 4444 4445// PageSize sets the optional parameter "pageSize": Limit on the number 4446// of CertificateAuthorities to include in the response. Further 4447// CertificateAuthorities can subsequently be obtained by including the 4448// ListCertificateAuthoritiesResponse.next_page_token in a subsequent 4449// request. If unspecified, the server will pick an appropriate default. 4450func (c *ProjectsLocationsCertificateAuthoritiesListCall) PageSize(pageSize int64) *ProjectsLocationsCertificateAuthoritiesListCall { 4451 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 4452 return c 4453} 4454 4455// PageToken sets the optional parameter "pageToken": Pagination token, 4456// returned earlier via 4457// ListCertificateAuthoritiesResponse.next_page_token. 4458func (c *ProjectsLocationsCertificateAuthoritiesListCall) PageToken(pageToken string) *ProjectsLocationsCertificateAuthoritiesListCall { 4459 c.urlParams_.Set("pageToken", pageToken) 4460 return c 4461} 4462 4463// Fields allows partial responses to be retrieved. See 4464// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4465// for more information. 4466func (c *ProjectsLocationsCertificateAuthoritiesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateAuthoritiesListCall { 4467 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4468 return c 4469} 4470 4471// IfNoneMatch sets the optional parameter which makes the operation 4472// fail if the object's ETag matches the given value. This is useful for 4473// getting updates only after the object has changed since the last 4474// request. Use googleapi.IsNotModified to check whether the response 4475// error from Do is the result of In-None-Match. 4476func (c *ProjectsLocationsCertificateAuthoritiesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCertificateAuthoritiesListCall { 4477 c.ifNoneMatch_ = entityTag 4478 return c 4479} 4480 4481// Context sets the context to be used in this call's Do method. Any 4482// pending HTTP request will be aborted if the provided context is 4483// canceled. 4484func (c *ProjectsLocationsCertificateAuthoritiesListCall) Context(ctx context.Context) *ProjectsLocationsCertificateAuthoritiesListCall { 4485 c.ctx_ = ctx 4486 return c 4487} 4488 4489// Header returns an http.Header that can be modified by the caller to 4490// add HTTP headers to the request. 4491func (c *ProjectsLocationsCertificateAuthoritiesListCall) Header() http.Header { 4492 if c.header_ == nil { 4493 c.header_ = make(http.Header) 4494 } 4495 return c.header_ 4496} 4497 4498func (c *ProjectsLocationsCertificateAuthoritiesListCall) doRequest(alt string) (*http.Response, error) { 4499 reqHeaders := make(http.Header) 4500 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 4501 for k, v := range c.header_ { 4502 reqHeaders[k] = v 4503 } 4504 reqHeaders.Set("User-Agent", c.s.userAgent()) 4505 if c.ifNoneMatch_ != "" { 4506 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4507 } 4508 var body io.Reader = nil 4509 c.urlParams_.Set("alt", alt) 4510 c.urlParams_.Set("prettyPrint", "false") 4511 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/certificateAuthorities") 4512 urls += "?" + c.urlParams_.Encode() 4513 req, err := http.NewRequest("GET", urls, body) 4514 if err != nil { 4515 return nil, err 4516 } 4517 req.Header = reqHeaders 4518 googleapi.Expand(req.URL, map[string]string{ 4519 "parent": c.parent, 4520 }) 4521 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4522} 4523 4524// Do executes the "privateca.projects.locations.certificateAuthorities.list" call. 4525// Exactly one of *ListCertificateAuthoritiesResponse or error will be 4526// non-nil. Any non-2xx status code is an error. Response headers are in 4527// either *ListCertificateAuthoritiesResponse.ServerResponse.Header or 4528// (if a response was returned at all) in 4529// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4530// whether the returned error was because http.StatusNotModified was 4531// returned. 4532func (c *ProjectsLocationsCertificateAuthoritiesListCall) Do(opts ...googleapi.CallOption) (*ListCertificateAuthoritiesResponse, error) { 4533 gensupport.SetOptions(c.urlParams_, opts...) 4534 res, err := c.doRequest("json") 4535 if res != nil && res.StatusCode == http.StatusNotModified { 4536 if res.Body != nil { 4537 res.Body.Close() 4538 } 4539 return nil, &googleapi.Error{ 4540 Code: res.StatusCode, 4541 Header: res.Header, 4542 } 4543 } 4544 if err != nil { 4545 return nil, err 4546 } 4547 defer googleapi.CloseBody(res) 4548 if err := googleapi.CheckResponse(res); err != nil { 4549 return nil, err 4550 } 4551 ret := &ListCertificateAuthoritiesResponse{ 4552 ServerResponse: googleapi.ServerResponse{ 4553 Header: res.Header, 4554 HTTPStatusCode: res.StatusCode, 4555 }, 4556 } 4557 target := &ret 4558 if err := gensupport.DecodeResponse(target, res); err != nil { 4559 return nil, err 4560 } 4561 return ret, nil 4562 // { 4563 // "description": "Lists CertificateAuthorities.", 4564 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/certificateAuthorities", 4565 // "httpMethod": "GET", 4566 // "id": "privateca.projects.locations.certificateAuthorities.list", 4567 // "parameterOrder": [ 4568 // "parent" 4569 // ], 4570 // "parameters": { 4571 // "filter": { 4572 // "description": "Optional. Only include resources that match the filter in the response.", 4573 // "location": "query", 4574 // "type": "string" 4575 // }, 4576 // "orderBy": { 4577 // "description": "Optional. Specify how the results should be sorted.", 4578 // "location": "query", 4579 // "type": "string" 4580 // }, 4581 // "pageSize": { 4582 // "description": "Optional. Limit on the number of CertificateAuthorities to include in the response. Further CertificateAuthorities can subsequently be obtained by including the ListCertificateAuthoritiesResponse.next_page_token in a subsequent request. If unspecified, the server will pick an appropriate default.", 4583 // "format": "int32", 4584 // "location": "query", 4585 // "type": "integer" 4586 // }, 4587 // "pageToken": { 4588 // "description": "Optional. Pagination token, returned earlier via ListCertificateAuthoritiesResponse.next_page_token.", 4589 // "location": "query", 4590 // "type": "string" 4591 // }, 4592 // "parent": { 4593 // "description": "Required. The resource name of the location associated with the CertificateAuthorities, in the format `projects/*/locations/*`.", 4594 // "location": "path", 4595 // "pattern": "^projects/[^/]+/locations/[^/]+$", 4596 // "required": true, 4597 // "type": "string" 4598 // } 4599 // }, 4600 // "path": "v1beta1/{+parent}/certificateAuthorities", 4601 // "response": { 4602 // "$ref": "ListCertificateAuthoritiesResponse" 4603 // }, 4604 // "scopes": [ 4605 // "https://www.googleapis.com/auth/cloud-platform" 4606 // ] 4607 // } 4608 4609} 4610 4611// Pages invokes f for each page of results. 4612// A non-nil error returned from f will halt the iteration. 4613// The provided context supersedes any context provided to the Context method. 4614func (c *ProjectsLocationsCertificateAuthoritiesListCall) Pages(ctx context.Context, f func(*ListCertificateAuthoritiesResponse) error) error { 4615 c.ctx_ = ctx 4616 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 4617 for { 4618 x, err := c.Do() 4619 if err != nil { 4620 return err 4621 } 4622 if err := f(x); err != nil { 4623 return err 4624 } 4625 if x.NextPageToken == "" { 4626 return nil 4627 } 4628 c.PageToken(x.NextPageToken) 4629 } 4630} 4631 4632// method id "privateca.projects.locations.certificateAuthorities.patch": 4633 4634type ProjectsLocationsCertificateAuthoritiesPatchCall struct { 4635 s *Service 4636 name string 4637 certificateauthority *CertificateAuthority 4638 urlParams_ gensupport.URLParams 4639 ctx_ context.Context 4640 header_ http.Header 4641} 4642 4643// Patch: Update a CertificateAuthority. 4644func (r *ProjectsLocationsCertificateAuthoritiesService) Patch(name string, certificateauthority *CertificateAuthority) *ProjectsLocationsCertificateAuthoritiesPatchCall { 4645 c := &ProjectsLocationsCertificateAuthoritiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4646 c.name = name 4647 c.certificateauthority = certificateauthority 4648 return c 4649} 4650 4651// RequestId sets the optional parameter "requestId": An ID to identify 4652// requests. Specify a unique request ID so that if you must retry your 4653// request, the server will know to ignore the request if it has already 4654// been completed. The server will guarantee that for at least 60 4655// minutes since the first request. For example, consider a situation 4656// where you make an initial request and t he request times out. If you 4657// make the request again with the same request ID, the server can check 4658// if original operation with the same request ID was received, and if 4659// so, will ignore the second request. This prevents clients from 4660// accidentally creating duplicate commitments. The request ID must be a 4661// valid UUID with the exception that zero UUID is not supported 4662// (00000000-0000-0000-0000-000000000000). 4663func (c *ProjectsLocationsCertificateAuthoritiesPatchCall) RequestId(requestId string) *ProjectsLocationsCertificateAuthoritiesPatchCall { 4664 c.urlParams_.Set("requestId", requestId) 4665 return c 4666} 4667 4668// UpdateMask sets the optional parameter "updateMask": Required. A list 4669// of fields to be updated in this request. 4670func (c *ProjectsLocationsCertificateAuthoritiesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCertificateAuthoritiesPatchCall { 4671 c.urlParams_.Set("updateMask", updateMask) 4672 return c 4673} 4674 4675// Fields allows partial responses to be retrieved. See 4676// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4677// for more information. 4678func (c *ProjectsLocationsCertificateAuthoritiesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateAuthoritiesPatchCall { 4679 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4680 return c 4681} 4682 4683// Context sets the context to be used in this call's Do method. Any 4684// pending HTTP request will be aborted if the provided context is 4685// canceled. 4686func (c *ProjectsLocationsCertificateAuthoritiesPatchCall) Context(ctx context.Context) *ProjectsLocationsCertificateAuthoritiesPatchCall { 4687 c.ctx_ = ctx 4688 return c 4689} 4690 4691// Header returns an http.Header that can be modified by the caller to 4692// add HTTP headers to the request. 4693func (c *ProjectsLocationsCertificateAuthoritiesPatchCall) Header() http.Header { 4694 if c.header_ == nil { 4695 c.header_ = make(http.Header) 4696 } 4697 return c.header_ 4698} 4699 4700func (c *ProjectsLocationsCertificateAuthoritiesPatchCall) doRequest(alt string) (*http.Response, error) { 4701 reqHeaders := make(http.Header) 4702 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 4703 for k, v := range c.header_ { 4704 reqHeaders[k] = v 4705 } 4706 reqHeaders.Set("User-Agent", c.s.userAgent()) 4707 var body io.Reader = nil 4708 body, err := googleapi.WithoutDataWrapper.JSONReader(c.certificateauthority) 4709 if err != nil { 4710 return nil, err 4711 } 4712 reqHeaders.Set("Content-Type", "application/json") 4713 c.urlParams_.Set("alt", alt) 4714 c.urlParams_.Set("prettyPrint", "false") 4715 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 4716 urls += "?" + c.urlParams_.Encode() 4717 req, err := http.NewRequest("PATCH", urls, body) 4718 if err != nil { 4719 return nil, err 4720 } 4721 req.Header = reqHeaders 4722 googleapi.Expand(req.URL, map[string]string{ 4723 "name": c.name, 4724 }) 4725 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4726} 4727 4728// Do executes the "privateca.projects.locations.certificateAuthorities.patch" call. 4729// Exactly one of *Operation or error will be non-nil. Any non-2xx 4730// status code is an error. Response headers are in either 4731// *Operation.ServerResponse.Header or (if a response was returned at 4732// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 4733// to check whether the returned error was because 4734// http.StatusNotModified was returned. 4735func (c *ProjectsLocationsCertificateAuthoritiesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 4736 gensupport.SetOptions(c.urlParams_, opts...) 4737 res, err := c.doRequest("json") 4738 if res != nil && res.StatusCode == http.StatusNotModified { 4739 if res.Body != nil { 4740 res.Body.Close() 4741 } 4742 return nil, &googleapi.Error{ 4743 Code: res.StatusCode, 4744 Header: res.Header, 4745 } 4746 } 4747 if err != nil { 4748 return nil, err 4749 } 4750 defer googleapi.CloseBody(res) 4751 if err := googleapi.CheckResponse(res); err != nil { 4752 return nil, err 4753 } 4754 ret := &Operation{ 4755 ServerResponse: googleapi.ServerResponse{ 4756 Header: res.Header, 4757 HTTPStatusCode: res.StatusCode, 4758 }, 4759 } 4760 target := &ret 4761 if err := gensupport.DecodeResponse(target, res); err != nil { 4762 return nil, err 4763 } 4764 return ret, nil 4765 // { 4766 // "description": "Update a CertificateAuthority.", 4767 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/certificateAuthorities/{certificateAuthoritiesId}", 4768 // "httpMethod": "PATCH", 4769 // "id": "privateca.projects.locations.certificateAuthorities.patch", 4770 // "parameterOrder": [ 4771 // "name" 4772 // ], 4773 // "parameters": { 4774 // "name": { 4775 // "description": "Output only. The resource name for this CertificateAuthority in the format `projects/*/locations/*/certificateAuthorities/*`.", 4776 // "location": "path", 4777 // "pattern": "^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+$", 4778 // "required": true, 4779 // "type": "string" 4780 // }, 4781 // "requestId": { 4782 // "description": "Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", 4783 // "location": "query", 4784 // "type": "string" 4785 // }, 4786 // "updateMask": { 4787 // "description": "Required. A list of fields to be updated in this request.", 4788 // "format": "google-fieldmask", 4789 // "location": "query", 4790 // "type": "string" 4791 // } 4792 // }, 4793 // "path": "v1beta1/{+name}", 4794 // "request": { 4795 // "$ref": "CertificateAuthority" 4796 // }, 4797 // "response": { 4798 // "$ref": "Operation" 4799 // }, 4800 // "scopes": [ 4801 // "https://www.googleapis.com/auth/cloud-platform" 4802 // ] 4803 // } 4804 4805} 4806 4807// method id "privateca.projects.locations.certificateAuthorities.restore": 4808 4809type ProjectsLocationsCertificateAuthoritiesRestoreCall struct { 4810 s *Service 4811 name string 4812 restorecertificateauthorityrequest *RestoreCertificateAuthorityRequest 4813 urlParams_ gensupport.URLParams 4814 ctx_ context.Context 4815 header_ http.Header 4816} 4817 4818// Restore: Restore a CertificateAuthority that is scheduled for 4819// deletion. 4820func (r *ProjectsLocationsCertificateAuthoritiesService) Restore(name string, restorecertificateauthorityrequest *RestoreCertificateAuthorityRequest) *ProjectsLocationsCertificateAuthoritiesRestoreCall { 4821 c := &ProjectsLocationsCertificateAuthoritiesRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4822 c.name = name 4823 c.restorecertificateauthorityrequest = restorecertificateauthorityrequest 4824 return c 4825} 4826 4827// Fields allows partial responses to be retrieved. See 4828// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4829// for more information. 4830func (c *ProjectsLocationsCertificateAuthoritiesRestoreCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateAuthoritiesRestoreCall { 4831 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4832 return c 4833} 4834 4835// Context sets the context to be used in this call's Do method. Any 4836// pending HTTP request will be aborted if the provided context is 4837// canceled. 4838func (c *ProjectsLocationsCertificateAuthoritiesRestoreCall) Context(ctx context.Context) *ProjectsLocationsCertificateAuthoritiesRestoreCall { 4839 c.ctx_ = ctx 4840 return c 4841} 4842 4843// Header returns an http.Header that can be modified by the caller to 4844// add HTTP headers to the request. 4845func (c *ProjectsLocationsCertificateAuthoritiesRestoreCall) Header() http.Header { 4846 if c.header_ == nil { 4847 c.header_ = make(http.Header) 4848 } 4849 return c.header_ 4850} 4851 4852func (c *ProjectsLocationsCertificateAuthoritiesRestoreCall) doRequest(alt string) (*http.Response, error) { 4853 reqHeaders := make(http.Header) 4854 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 4855 for k, v := range c.header_ { 4856 reqHeaders[k] = v 4857 } 4858 reqHeaders.Set("User-Agent", c.s.userAgent()) 4859 var body io.Reader = nil 4860 body, err := googleapi.WithoutDataWrapper.JSONReader(c.restorecertificateauthorityrequest) 4861 if err != nil { 4862 return nil, err 4863 } 4864 reqHeaders.Set("Content-Type", "application/json") 4865 c.urlParams_.Set("alt", alt) 4866 c.urlParams_.Set("prettyPrint", "false") 4867 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:restore") 4868 urls += "?" + c.urlParams_.Encode() 4869 req, err := http.NewRequest("POST", urls, body) 4870 if err != nil { 4871 return nil, err 4872 } 4873 req.Header = reqHeaders 4874 googleapi.Expand(req.URL, map[string]string{ 4875 "name": c.name, 4876 }) 4877 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4878} 4879 4880// Do executes the "privateca.projects.locations.certificateAuthorities.restore" call. 4881// Exactly one of *Operation or error will be non-nil. Any non-2xx 4882// status code is an error. Response headers are in either 4883// *Operation.ServerResponse.Header or (if a response was returned at 4884// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 4885// to check whether the returned error was because 4886// http.StatusNotModified was returned. 4887func (c *ProjectsLocationsCertificateAuthoritiesRestoreCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 4888 gensupport.SetOptions(c.urlParams_, opts...) 4889 res, err := c.doRequest("json") 4890 if res != nil && res.StatusCode == http.StatusNotModified { 4891 if res.Body != nil { 4892 res.Body.Close() 4893 } 4894 return nil, &googleapi.Error{ 4895 Code: res.StatusCode, 4896 Header: res.Header, 4897 } 4898 } 4899 if err != nil { 4900 return nil, err 4901 } 4902 defer googleapi.CloseBody(res) 4903 if err := googleapi.CheckResponse(res); err != nil { 4904 return nil, err 4905 } 4906 ret := &Operation{ 4907 ServerResponse: googleapi.ServerResponse{ 4908 Header: res.Header, 4909 HTTPStatusCode: res.StatusCode, 4910 }, 4911 } 4912 target := &ret 4913 if err := gensupport.DecodeResponse(target, res); err != nil { 4914 return nil, err 4915 } 4916 return ret, nil 4917 // { 4918 // "description": "Restore a CertificateAuthority that is scheduled for deletion.", 4919 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/certificateAuthorities/{certificateAuthoritiesId}:restore", 4920 // "httpMethod": "POST", 4921 // "id": "privateca.projects.locations.certificateAuthorities.restore", 4922 // "parameterOrder": [ 4923 // "name" 4924 // ], 4925 // "parameters": { 4926 // "name": { 4927 // "description": "Required. The resource name for this CertificateAuthority in the format `projects/*/locations/*/certificateAuthorities/*`.", 4928 // "location": "path", 4929 // "pattern": "^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+$", 4930 // "required": true, 4931 // "type": "string" 4932 // } 4933 // }, 4934 // "path": "v1beta1/{+name}:restore", 4935 // "request": { 4936 // "$ref": "RestoreCertificateAuthorityRequest" 4937 // }, 4938 // "response": { 4939 // "$ref": "Operation" 4940 // }, 4941 // "scopes": [ 4942 // "https://www.googleapis.com/auth/cloud-platform" 4943 // ] 4944 // } 4945 4946} 4947 4948// method id "privateca.projects.locations.certificateAuthorities.scheduleDelete": 4949 4950type ProjectsLocationsCertificateAuthoritiesScheduleDeleteCall struct { 4951 s *Service 4952 name string 4953 scheduledeletecertificateauthorityrequest *ScheduleDeleteCertificateAuthorityRequest 4954 urlParams_ gensupport.URLParams 4955 ctx_ context.Context 4956 header_ http.Header 4957} 4958 4959// ScheduleDelete: Schedule a CertificateAuthority for deletion. 4960func (r *ProjectsLocationsCertificateAuthoritiesService) ScheduleDelete(name string, scheduledeletecertificateauthorityrequest *ScheduleDeleteCertificateAuthorityRequest) *ProjectsLocationsCertificateAuthoritiesScheduleDeleteCall { 4961 c := &ProjectsLocationsCertificateAuthoritiesScheduleDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4962 c.name = name 4963 c.scheduledeletecertificateauthorityrequest = scheduledeletecertificateauthorityrequest 4964 return c 4965} 4966 4967// Fields allows partial responses to be retrieved. See 4968// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4969// for more information. 4970func (c *ProjectsLocationsCertificateAuthoritiesScheduleDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateAuthoritiesScheduleDeleteCall { 4971 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4972 return c 4973} 4974 4975// Context sets the context to be used in this call's Do method. Any 4976// pending HTTP request will be aborted if the provided context is 4977// canceled. 4978func (c *ProjectsLocationsCertificateAuthoritiesScheduleDeleteCall) Context(ctx context.Context) *ProjectsLocationsCertificateAuthoritiesScheduleDeleteCall { 4979 c.ctx_ = ctx 4980 return c 4981} 4982 4983// Header returns an http.Header that can be modified by the caller to 4984// add HTTP headers to the request. 4985func (c *ProjectsLocationsCertificateAuthoritiesScheduleDeleteCall) Header() http.Header { 4986 if c.header_ == nil { 4987 c.header_ = make(http.Header) 4988 } 4989 return c.header_ 4990} 4991 4992func (c *ProjectsLocationsCertificateAuthoritiesScheduleDeleteCall) doRequest(alt string) (*http.Response, error) { 4993 reqHeaders := make(http.Header) 4994 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 4995 for k, v := range c.header_ { 4996 reqHeaders[k] = v 4997 } 4998 reqHeaders.Set("User-Agent", c.s.userAgent()) 4999 var body io.Reader = nil 5000 body, err := googleapi.WithoutDataWrapper.JSONReader(c.scheduledeletecertificateauthorityrequest) 5001 if err != nil { 5002 return nil, err 5003 } 5004 reqHeaders.Set("Content-Type", "application/json") 5005 c.urlParams_.Set("alt", alt) 5006 c.urlParams_.Set("prettyPrint", "false") 5007 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:scheduleDelete") 5008 urls += "?" + c.urlParams_.Encode() 5009 req, err := http.NewRequest("POST", urls, body) 5010 if err != nil { 5011 return nil, err 5012 } 5013 req.Header = reqHeaders 5014 googleapi.Expand(req.URL, map[string]string{ 5015 "name": c.name, 5016 }) 5017 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5018} 5019 5020// Do executes the "privateca.projects.locations.certificateAuthorities.scheduleDelete" call. 5021// Exactly one of *Operation or error will be non-nil. Any non-2xx 5022// status code is an error. Response headers are in either 5023// *Operation.ServerResponse.Header or (if a response was returned at 5024// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 5025// to check whether the returned error was because 5026// http.StatusNotModified was returned. 5027func (c *ProjectsLocationsCertificateAuthoritiesScheduleDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 5028 gensupport.SetOptions(c.urlParams_, opts...) 5029 res, err := c.doRequest("json") 5030 if res != nil && res.StatusCode == http.StatusNotModified { 5031 if res.Body != nil { 5032 res.Body.Close() 5033 } 5034 return nil, &googleapi.Error{ 5035 Code: res.StatusCode, 5036 Header: res.Header, 5037 } 5038 } 5039 if err != nil { 5040 return nil, err 5041 } 5042 defer googleapi.CloseBody(res) 5043 if err := googleapi.CheckResponse(res); err != nil { 5044 return nil, err 5045 } 5046 ret := &Operation{ 5047 ServerResponse: googleapi.ServerResponse{ 5048 Header: res.Header, 5049 HTTPStatusCode: res.StatusCode, 5050 }, 5051 } 5052 target := &ret 5053 if err := gensupport.DecodeResponse(target, res); err != nil { 5054 return nil, err 5055 } 5056 return ret, nil 5057 // { 5058 // "description": "Schedule a CertificateAuthority for deletion.", 5059 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/certificateAuthorities/{certificateAuthoritiesId}:scheduleDelete", 5060 // "httpMethod": "POST", 5061 // "id": "privateca.projects.locations.certificateAuthorities.scheduleDelete", 5062 // "parameterOrder": [ 5063 // "name" 5064 // ], 5065 // "parameters": { 5066 // "name": { 5067 // "description": "Required. The resource name for this CertificateAuthority in the format `projects/*/locations/*/certificateAuthorities/*`.", 5068 // "location": "path", 5069 // "pattern": "^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+$", 5070 // "required": true, 5071 // "type": "string" 5072 // } 5073 // }, 5074 // "path": "v1beta1/{+name}:scheduleDelete", 5075 // "request": { 5076 // "$ref": "ScheduleDeleteCertificateAuthorityRequest" 5077 // }, 5078 // "response": { 5079 // "$ref": "Operation" 5080 // }, 5081 // "scopes": [ 5082 // "https://www.googleapis.com/auth/cloud-platform" 5083 // ] 5084 // } 5085 5086} 5087 5088// method id "privateca.projects.locations.certificateAuthorities.setIamPolicy": 5089 5090type ProjectsLocationsCertificateAuthoritiesSetIamPolicyCall struct { 5091 s *Service 5092 resource string 5093 setiampolicyrequest *SetIamPolicyRequest 5094 urlParams_ gensupport.URLParams 5095 ctx_ context.Context 5096 header_ http.Header 5097} 5098 5099// SetIamPolicy: Sets the access control policy on the specified 5100// resource. Replaces any existing policy. Can return `NOT_FOUND`, 5101// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. 5102func (r *ProjectsLocationsCertificateAuthoritiesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsCertificateAuthoritiesSetIamPolicyCall { 5103 c := &ProjectsLocationsCertificateAuthoritiesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5104 c.resource = resource 5105 c.setiampolicyrequest = setiampolicyrequest 5106 return c 5107} 5108 5109// Fields allows partial responses to be retrieved. See 5110// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5111// for more information. 5112func (c *ProjectsLocationsCertificateAuthoritiesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateAuthoritiesSetIamPolicyCall { 5113 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5114 return c 5115} 5116 5117// Context sets the context to be used in this call's Do method. Any 5118// pending HTTP request will be aborted if the provided context is 5119// canceled. 5120func (c *ProjectsLocationsCertificateAuthoritiesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsCertificateAuthoritiesSetIamPolicyCall { 5121 c.ctx_ = ctx 5122 return c 5123} 5124 5125// Header returns an http.Header that can be modified by the caller to 5126// add HTTP headers to the request. 5127func (c *ProjectsLocationsCertificateAuthoritiesSetIamPolicyCall) Header() http.Header { 5128 if c.header_ == nil { 5129 c.header_ = make(http.Header) 5130 } 5131 return c.header_ 5132} 5133 5134func (c *ProjectsLocationsCertificateAuthoritiesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 5135 reqHeaders := make(http.Header) 5136 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 5137 for k, v := range c.header_ { 5138 reqHeaders[k] = v 5139 } 5140 reqHeaders.Set("User-Agent", c.s.userAgent()) 5141 var body io.Reader = nil 5142 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 5143 if err != nil { 5144 return nil, err 5145 } 5146 reqHeaders.Set("Content-Type", "application/json") 5147 c.urlParams_.Set("alt", alt) 5148 c.urlParams_.Set("prettyPrint", "false") 5149 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy") 5150 urls += "?" + c.urlParams_.Encode() 5151 req, err := http.NewRequest("POST", urls, body) 5152 if err != nil { 5153 return nil, err 5154 } 5155 req.Header = reqHeaders 5156 googleapi.Expand(req.URL, map[string]string{ 5157 "resource": c.resource, 5158 }) 5159 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5160} 5161 5162// Do executes the "privateca.projects.locations.certificateAuthorities.setIamPolicy" call. 5163// Exactly one of *Policy or error will be non-nil. Any non-2xx status 5164// code is an error. Response headers are in either 5165// *Policy.ServerResponse.Header or (if a response was returned at all) 5166// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 5167// check whether the returned error was because http.StatusNotModified 5168// was returned. 5169func (c *ProjectsLocationsCertificateAuthoritiesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 5170 gensupport.SetOptions(c.urlParams_, opts...) 5171 res, err := c.doRequest("json") 5172 if res != nil && res.StatusCode == http.StatusNotModified { 5173 if res.Body != nil { 5174 res.Body.Close() 5175 } 5176 return nil, &googleapi.Error{ 5177 Code: res.StatusCode, 5178 Header: res.Header, 5179 } 5180 } 5181 if err != nil { 5182 return nil, err 5183 } 5184 defer googleapi.CloseBody(res) 5185 if err := googleapi.CheckResponse(res); err != nil { 5186 return nil, err 5187 } 5188 ret := &Policy{ 5189 ServerResponse: googleapi.ServerResponse{ 5190 Header: res.Header, 5191 HTTPStatusCode: res.StatusCode, 5192 }, 5193 } 5194 target := &ret 5195 if err := gensupport.DecodeResponse(target, res); err != nil { 5196 return nil, err 5197 } 5198 return ret, nil 5199 // { 5200 // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", 5201 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/certificateAuthorities/{certificateAuthoritiesId}:setIamPolicy", 5202 // "httpMethod": "POST", 5203 // "id": "privateca.projects.locations.certificateAuthorities.setIamPolicy", 5204 // "parameterOrder": [ 5205 // "resource" 5206 // ], 5207 // "parameters": { 5208 // "resource": { 5209 // "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", 5210 // "location": "path", 5211 // "pattern": "^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+$", 5212 // "required": true, 5213 // "type": "string" 5214 // } 5215 // }, 5216 // "path": "v1beta1/{+resource}:setIamPolicy", 5217 // "request": { 5218 // "$ref": "SetIamPolicyRequest" 5219 // }, 5220 // "response": { 5221 // "$ref": "Policy" 5222 // }, 5223 // "scopes": [ 5224 // "https://www.googleapis.com/auth/cloud-platform" 5225 // ] 5226 // } 5227 5228} 5229 5230// method id "privateca.projects.locations.certificateAuthorities.testIamPermissions": 5231 5232type ProjectsLocationsCertificateAuthoritiesTestIamPermissionsCall struct { 5233 s *Service 5234 resource string 5235 testiampermissionsrequest *TestIamPermissionsRequest 5236 urlParams_ gensupport.URLParams 5237 ctx_ context.Context 5238 header_ http.Header 5239} 5240 5241// TestIamPermissions: Returns permissions that a caller has on the 5242// specified resource. If the resource does not exist, this will return 5243// an empty set of permissions, not a `NOT_FOUND` error. Note: This 5244// operation is designed to be used for building permission-aware UIs 5245// and command-line tools, not for authorization checking. This 5246// operation may "fail open" without warning. 5247func (r *ProjectsLocationsCertificateAuthoritiesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsCertificateAuthoritiesTestIamPermissionsCall { 5248 c := &ProjectsLocationsCertificateAuthoritiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5249 c.resource = resource 5250 c.testiampermissionsrequest = testiampermissionsrequest 5251 return c 5252} 5253 5254// Fields allows partial responses to be retrieved. See 5255// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5256// for more information. 5257func (c *ProjectsLocationsCertificateAuthoritiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateAuthoritiesTestIamPermissionsCall { 5258 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5259 return c 5260} 5261 5262// Context sets the context to be used in this call's Do method. Any 5263// pending HTTP request will be aborted if the provided context is 5264// canceled. 5265func (c *ProjectsLocationsCertificateAuthoritiesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsCertificateAuthoritiesTestIamPermissionsCall { 5266 c.ctx_ = ctx 5267 return c 5268} 5269 5270// Header returns an http.Header that can be modified by the caller to 5271// add HTTP headers to the request. 5272func (c *ProjectsLocationsCertificateAuthoritiesTestIamPermissionsCall) Header() http.Header { 5273 if c.header_ == nil { 5274 c.header_ = make(http.Header) 5275 } 5276 return c.header_ 5277} 5278 5279func (c *ProjectsLocationsCertificateAuthoritiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 5280 reqHeaders := make(http.Header) 5281 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 5282 for k, v := range c.header_ { 5283 reqHeaders[k] = v 5284 } 5285 reqHeaders.Set("User-Agent", c.s.userAgent()) 5286 var body io.Reader = nil 5287 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 5288 if err != nil { 5289 return nil, err 5290 } 5291 reqHeaders.Set("Content-Type", "application/json") 5292 c.urlParams_.Set("alt", alt) 5293 c.urlParams_.Set("prettyPrint", "false") 5294 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions") 5295 urls += "?" + c.urlParams_.Encode() 5296 req, err := http.NewRequest("POST", urls, body) 5297 if err != nil { 5298 return nil, err 5299 } 5300 req.Header = reqHeaders 5301 googleapi.Expand(req.URL, map[string]string{ 5302 "resource": c.resource, 5303 }) 5304 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5305} 5306 5307// Do executes the "privateca.projects.locations.certificateAuthorities.testIamPermissions" call. 5308// Exactly one of *TestIamPermissionsResponse or error will be non-nil. 5309// Any non-2xx status code is an error. Response headers are in either 5310// *TestIamPermissionsResponse.ServerResponse.Header or (if a response 5311// was returned at all) in error.(*googleapi.Error).Header. Use 5312// googleapi.IsNotModified to check whether the returned error was 5313// because http.StatusNotModified was returned. 5314func (c *ProjectsLocationsCertificateAuthoritiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 5315 gensupport.SetOptions(c.urlParams_, opts...) 5316 res, err := c.doRequest("json") 5317 if res != nil && res.StatusCode == http.StatusNotModified { 5318 if res.Body != nil { 5319 res.Body.Close() 5320 } 5321 return nil, &googleapi.Error{ 5322 Code: res.StatusCode, 5323 Header: res.Header, 5324 } 5325 } 5326 if err != nil { 5327 return nil, err 5328 } 5329 defer googleapi.CloseBody(res) 5330 if err := googleapi.CheckResponse(res); err != nil { 5331 return nil, err 5332 } 5333 ret := &TestIamPermissionsResponse{ 5334 ServerResponse: googleapi.ServerResponse{ 5335 Header: res.Header, 5336 HTTPStatusCode: res.StatusCode, 5337 }, 5338 } 5339 target := &ret 5340 if err := gensupport.DecodeResponse(target, res); err != nil { 5341 return nil, err 5342 } 5343 return ret, nil 5344 // { 5345 // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", 5346 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/certificateAuthorities/{certificateAuthoritiesId}:testIamPermissions", 5347 // "httpMethod": "POST", 5348 // "id": "privateca.projects.locations.certificateAuthorities.testIamPermissions", 5349 // "parameterOrder": [ 5350 // "resource" 5351 // ], 5352 // "parameters": { 5353 // "resource": { 5354 // "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", 5355 // "location": "path", 5356 // "pattern": "^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+$", 5357 // "required": true, 5358 // "type": "string" 5359 // } 5360 // }, 5361 // "path": "v1beta1/{+resource}:testIamPermissions", 5362 // "request": { 5363 // "$ref": "TestIamPermissionsRequest" 5364 // }, 5365 // "response": { 5366 // "$ref": "TestIamPermissionsResponse" 5367 // }, 5368 // "scopes": [ 5369 // "https://www.googleapis.com/auth/cloud-platform" 5370 // ] 5371 // } 5372 5373} 5374 5375// method id "privateca.projects.locations.certificateAuthorities.certificateRevocationLists.get": 5376 5377type ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsGetCall struct { 5378 s *Service 5379 name string 5380 urlParams_ gensupport.URLParams 5381 ifNoneMatch_ string 5382 ctx_ context.Context 5383 header_ http.Header 5384} 5385 5386// Get: Returns a CertificateRevocationList. 5387func (r *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsService) Get(name string) *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsGetCall { 5388 c := &ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5389 c.name = name 5390 return c 5391} 5392 5393// Fields allows partial responses to be retrieved. See 5394// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5395// for more information. 5396func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsGetCall { 5397 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5398 return c 5399} 5400 5401// IfNoneMatch sets the optional parameter which makes the operation 5402// fail if the object's ETag matches the given value. This is useful for 5403// getting updates only after the object has changed since the last 5404// request. Use googleapi.IsNotModified to check whether the response 5405// error from Do is the result of In-None-Match. 5406func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsGetCall { 5407 c.ifNoneMatch_ = entityTag 5408 return c 5409} 5410 5411// Context sets the context to be used in this call's Do method. Any 5412// pending HTTP request will be aborted if the provided context is 5413// canceled. 5414func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsGetCall) Context(ctx context.Context) *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsGetCall { 5415 c.ctx_ = ctx 5416 return c 5417} 5418 5419// Header returns an http.Header that can be modified by the caller to 5420// add HTTP headers to the request. 5421func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsGetCall) Header() http.Header { 5422 if c.header_ == nil { 5423 c.header_ = make(http.Header) 5424 } 5425 return c.header_ 5426} 5427 5428func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsGetCall) doRequest(alt string) (*http.Response, error) { 5429 reqHeaders := make(http.Header) 5430 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 5431 for k, v := range c.header_ { 5432 reqHeaders[k] = v 5433 } 5434 reqHeaders.Set("User-Agent", c.s.userAgent()) 5435 if c.ifNoneMatch_ != "" { 5436 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5437 } 5438 var body io.Reader = nil 5439 c.urlParams_.Set("alt", alt) 5440 c.urlParams_.Set("prettyPrint", "false") 5441 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 5442 urls += "?" + c.urlParams_.Encode() 5443 req, err := http.NewRequest("GET", 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 "privateca.projects.locations.certificateAuthorities.certificateRevocationLists.get" call. 5455// Exactly one of *CertificateRevocationList or error will be non-nil. 5456// Any non-2xx status code is an error. Response headers are in either 5457// *CertificateRevocationList.ServerResponse.Header or (if a response 5458// was returned at all) in error.(*googleapi.Error).Header. Use 5459// googleapi.IsNotModified to check whether the returned error was 5460// because http.StatusNotModified was returned. 5461func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsGetCall) Do(opts ...googleapi.CallOption) (*CertificateRevocationList, error) { 5462 gensupport.SetOptions(c.urlParams_, opts...) 5463 res, err := c.doRequest("json") 5464 if res != nil && res.StatusCode == http.StatusNotModified { 5465 if res.Body != nil { 5466 res.Body.Close() 5467 } 5468 return nil, &googleapi.Error{ 5469 Code: res.StatusCode, 5470 Header: res.Header, 5471 } 5472 } 5473 if err != nil { 5474 return nil, err 5475 } 5476 defer googleapi.CloseBody(res) 5477 if err := googleapi.CheckResponse(res); err != nil { 5478 return nil, err 5479 } 5480 ret := &CertificateRevocationList{ 5481 ServerResponse: googleapi.ServerResponse{ 5482 Header: res.Header, 5483 HTTPStatusCode: res.StatusCode, 5484 }, 5485 } 5486 target := &ret 5487 if err := gensupport.DecodeResponse(target, res); err != nil { 5488 return nil, err 5489 } 5490 return ret, nil 5491 // { 5492 // "description": "Returns a CertificateRevocationList.", 5493 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/certificateAuthorities/{certificateAuthoritiesId}/certificateRevocationLists/{certificateRevocationListsId}", 5494 // "httpMethod": "GET", 5495 // "id": "privateca.projects.locations.certificateAuthorities.certificateRevocationLists.get", 5496 // "parameterOrder": [ 5497 // "name" 5498 // ], 5499 // "parameters": { 5500 // "name": { 5501 // "description": "Required. The name of the CertificateRevocationList to get.", 5502 // "location": "path", 5503 // "pattern": "^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+$", 5504 // "required": true, 5505 // "type": "string" 5506 // } 5507 // }, 5508 // "path": "v1beta1/{+name}", 5509 // "response": { 5510 // "$ref": "CertificateRevocationList" 5511 // }, 5512 // "scopes": [ 5513 // "https://www.googleapis.com/auth/cloud-platform" 5514 // ] 5515 // } 5516 5517} 5518 5519// method id "privateca.projects.locations.certificateAuthorities.certificateRevocationLists.getIamPolicy": 5520 5521type ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsGetIamPolicyCall struct { 5522 s *Service 5523 resource string 5524 urlParams_ gensupport.URLParams 5525 ifNoneMatch_ string 5526 ctx_ context.Context 5527 header_ http.Header 5528} 5529 5530// GetIamPolicy: Gets the access control policy for a resource. Returns 5531// an empty policy if the resource exists and does not have a policy 5532// set. 5533func (r *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsService) GetIamPolicy(resource string) *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsGetIamPolicyCall { 5534 c := &ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5535 c.resource = resource 5536 return c 5537} 5538 5539// OptionsRequestedPolicyVersion sets the optional parameter 5540// "options.requestedPolicyVersion": The policy format version to be 5541// returned. Valid values are 0, 1, and 3. Requests specifying an 5542// invalid value will be rejected. Requests for policies with any 5543// conditional bindings must specify version 3. Policies without any 5544// conditional bindings may specify any valid value or leave the field 5545// unset. To learn which resources support conditions in their IAM 5546// policies, see the [IAM 5547// documentation](https://cloud.google.com/iam/help/conditions/resource-p 5548// olicies). 5549func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsGetIamPolicyCall { 5550 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) 5551 return c 5552} 5553 5554// Fields allows partial responses to be retrieved. See 5555// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5556// for more information. 5557func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsGetIamPolicyCall { 5558 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5559 return c 5560} 5561 5562// IfNoneMatch sets the optional parameter which makes the operation 5563// fail if the object's ETag matches the given value. This is useful for 5564// getting updates only after the object has changed since the last 5565// request. Use googleapi.IsNotModified to check whether the response 5566// error from Do is the result of In-None-Match. 5567func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsGetIamPolicyCall { 5568 c.ifNoneMatch_ = entityTag 5569 return c 5570} 5571 5572// Context sets the context to be used in this call's Do method. Any 5573// pending HTTP request will be aborted if the provided context is 5574// canceled. 5575func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsGetIamPolicyCall { 5576 c.ctx_ = ctx 5577 return c 5578} 5579 5580// Header returns an http.Header that can be modified by the caller to 5581// add HTTP headers to the request. 5582func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsGetIamPolicyCall) Header() http.Header { 5583 if c.header_ == nil { 5584 c.header_ = make(http.Header) 5585 } 5586 return c.header_ 5587} 5588 5589func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 5590 reqHeaders := make(http.Header) 5591 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 5592 for k, v := range c.header_ { 5593 reqHeaders[k] = v 5594 } 5595 reqHeaders.Set("User-Agent", c.s.userAgent()) 5596 if c.ifNoneMatch_ != "" { 5597 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5598 } 5599 var body io.Reader = nil 5600 c.urlParams_.Set("alt", alt) 5601 c.urlParams_.Set("prettyPrint", "false") 5602 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy") 5603 urls += "?" + c.urlParams_.Encode() 5604 req, err := http.NewRequest("GET", urls, body) 5605 if err != nil { 5606 return nil, err 5607 } 5608 req.Header = reqHeaders 5609 googleapi.Expand(req.URL, map[string]string{ 5610 "resource": c.resource, 5611 }) 5612 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5613} 5614 5615// Do executes the "privateca.projects.locations.certificateAuthorities.certificateRevocationLists.getIamPolicy" call. 5616// Exactly one of *Policy or error will be non-nil. Any non-2xx status 5617// code is an error. Response headers are in either 5618// *Policy.ServerResponse.Header or (if a response was returned at all) 5619// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 5620// check whether the returned error was because http.StatusNotModified 5621// was returned. 5622func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 5623 gensupport.SetOptions(c.urlParams_, opts...) 5624 res, err := c.doRequest("json") 5625 if res != nil && res.StatusCode == http.StatusNotModified { 5626 if res.Body != nil { 5627 res.Body.Close() 5628 } 5629 return nil, &googleapi.Error{ 5630 Code: res.StatusCode, 5631 Header: res.Header, 5632 } 5633 } 5634 if err != nil { 5635 return nil, err 5636 } 5637 defer googleapi.CloseBody(res) 5638 if err := googleapi.CheckResponse(res); err != nil { 5639 return nil, err 5640 } 5641 ret := &Policy{ 5642 ServerResponse: googleapi.ServerResponse{ 5643 Header: res.Header, 5644 HTTPStatusCode: res.StatusCode, 5645 }, 5646 } 5647 target := &ret 5648 if err := gensupport.DecodeResponse(target, res); err != nil { 5649 return nil, err 5650 } 5651 return ret, nil 5652 // { 5653 // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", 5654 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/certificateAuthorities/{certificateAuthoritiesId}/certificateRevocationLists/{certificateRevocationListsId}:getIamPolicy", 5655 // "httpMethod": "GET", 5656 // "id": "privateca.projects.locations.certificateAuthorities.certificateRevocationLists.getIamPolicy", 5657 // "parameterOrder": [ 5658 // "resource" 5659 // ], 5660 // "parameters": { 5661 // "options.requestedPolicyVersion": { 5662 // "description": "Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", 5663 // "format": "int32", 5664 // "location": "query", 5665 // "type": "integer" 5666 // }, 5667 // "resource": { 5668 // "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", 5669 // "location": "path", 5670 // "pattern": "^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+$", 5671 // "required": true, 5672 // "type": "string" 5673 // } 5674 // }, 5675 // "path": "v1beta1/{+resource}:getIamPolicy", 5676 // "response": { 5677 // "$ref": "Policy" 5678 // }, 5679 // "scopes": [ 5680 // "https://www.googleapis.com/auth/cloud-platform" 5681 // ] 5682 // } 5683 5684} 5685 5686// method id "privateca.projects.locations.certificateAuthorities.certificateRevocationLists.list": 5687 5688type ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsListCall struct { 5689 s *Service 5690 parent string 5691 urlParams_ gensupport.URLParams 5692 ifNoneMatch_ string 5693 ctx_ context.Context 5694 header_ http.Header 5695} 5696 5697// List: Lists CertificateRevocationLists. 5698func (r *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsService) List(parent string) *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsListCall { 5699 c := &ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5700 c.parent = parent 5701 return c 5702} 5703 5704// Filter sets the optional parameter "filter": Only include resources 5705// that match the filter in the response. 5706func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsListCall) Filter(filter string) *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsListCall { 5707 c.urlParams_.Set("filter", filter) 5708 return c 5709} 5710 5711// OrderBy sets the optional parameter "orderBy": Specify how the 5712// results should be sorted. 5713func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsListCall) OrderBy(orderBy string) *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsListCall { 5714 c.urlParams_.Set("orderBy", orderBy) 5715 return c 5716} 5717 5718// PageSize sets the optional parameter "pageSize": Limit on the number 5719// of CertificateRevocationLists to include in the response. Further 5720// CertificateRevocationLists can subsequently be obtained by including 5721// the ListCertificateRevocationListsResponse.next_page_token in a 5722// subsequent request. If unspecified, the server will pick an 5723// appropriate default. 5724func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsListCall) PageSize(pageSize int64) *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsListCall { 5725 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 5726 return c 5727} 5728 5729// PageToken sets the optional parameter "pageToken": Pagination token, 5730// returned earlier via 5731// ListCertificateRevocationListsResponse.next_page_token. 5732func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsListCall) PageToken(pageToken string) *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsListCall { 5733 c.urlParams_.Set("pageToken", pageToken) 5734 return c 5735} 5736 5737// Fields allows partial responses to be retrieved. See 5738// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5739// for more information. 5740func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsListCall { 5741 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5742 return c 5743} 5744 5745// IfNoneMatch sets the optional parameter which makes the operation 5746// fail if the object's ETag matches the given value. This is useful for 5747// getting updates only after the object has changed since the last 5748// request. Use googleapi.IsNotModified to check whether the response 5749// error from Do is the result of In-None-Match. 5750func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsListCall { 5751 c.ifNoneMatch_ = entityTag 5752 return c 5753} 5754 5755// Context sets the context to be used in this call's Do method. Any 5756// pending HTTP request will be aborted if the provided context is 5757// canceled. 5758func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsListCall) Context(ctx context.Context) *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsListCall { 5759 c.ctx_ = ctx 5760 return c 5761} 5762 5763// Header returns an http.Header that can be modified by the caller to 5764// add HTTP headers to the request. 5765func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsListCall) Header() http.Header { 5766 if c.header_ == nil { 5767 c.header_ = make(http.Header) 5768 } 5769 return c.header_ 5770} 5771 5772func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsListCall) doRequest(alt string) (*http.Response, error) { 5773 reqHeaders := make(http.Header) 5774 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 5775 for k, v := range c.header_ { 5776 reqHeaders[k] = v 5777 } 5778 reqHeaders.Set("User-Agent", c.s.userAgent()) 5779 if c.ifNoneMatch_ != "" { 5780 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5781 } 5782 var body io.Reader = nil 5783 c.urlParams_.Set("alt", alt) 5784 c.urlParams_.Set("prettyPrint", "false") 5785 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/certificateRevocationLists") 5786 urls += "?" + c.urlParams_.Encode() 5787 req, err := http.NewRequest("GET", urls, body) 5788 if err != nil { 5789 return nil, err 5790 } 5791 req.Header = reqHeaders 5792 googleapi.Expand(req.URL, map[string]string{ 5793 "parent": c.parent, 5794 }) 5795 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5796} 5797 5798// Do executes the "privateca.projects.locations.certificateAuthorities.certificateRevocationLists.list" call. 5799// Exactly one of *ListCertificateRevocationListsResponse or error will 5800// be non-nil. Any non-2xx status code is an error. Response headers are 5801// in either 5802// *ListCertificateRevocationListsResponse.ServerResponse.Header or (if 5803// a response was returned at all) in error.(*googleapi.Error).Header. 5804// Use googleapi.IsNotModified to check whether the returned error was 5805// because http.StatusNotModified was returned. 5806func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsListCall) Do(opts ...googleapi.CallOption) (*ListCertificateRevocationListsResponse, error) { 5807 gensupport.SetOptions(c.urlParams_, opts...) 5808 res, err := c.doRequest("json") 5809 if res != nil && res.StatusCode == http.StatusNotModified { 5810 if res.Body != nil { 5811 res.Body.Close() 5812 } 5813 return nil, &googleapi.Error{ 5814 Code: res.StatusCode, 5815 Header: res.Header, 5816 } 5817 } 5818 if err != nil { 5819 return nil, err 5820 } 5821 defer googleapi.CloseBody(res) 5822 if err := googleapi.CheckResponse(res); err != nil { 5823 return nil, err 5824 } 5825 ret := &ListCertificateRevocationListsResponse{ 5826 ServerResponse: googleapi.ServerResponse{ 5827 Header: res.Header, 5828 HTTPStatusCode: res.StatusCode, 5829 }, 5830 } 5831 target := &ret 5832 if err := gensupport.DecodeResponse(target, res); err != nil { 5833 return nil, err 5834 } 5835 return ret, nil 5836 // { 5837 // "description": "Lists CertificateRevocationLists.", 5838 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/certificateAuthorities/{certificateAuthoritiesId}/certificateRevocationLists", 5839 // "httpMethod": "GET", 5840 // "id": "privateca.projects.locations.certificateAuthorities.certificateRevocationLists.list", 5841 // "parameterOrder": [ 5842 // "parent" 5843 // ], 5844 // "parameters": { 5845 // "filter": { 5846 // "description": "Optional. Only include resources that match the filter in the response.", 5847 // "location": "query", 5848 // "type": "string" 5849 // }, 5850 // "orderBy": { 5851 // "description": "Optional. Specify how the results should be sorted.", 5852 // "location": "query", 5853 // "type": "string" 5854 // }, 5855 // "pageSize": { 5856 // "description": "Optional. Limit on the number of CertificateRevocationLists to include in the response. Further CertificateRevocationLists can subsequently be obtained by including the ListCertificateRevocationListsResponse.next_page_token in a subsequent request. If unspecified, the server will pick an appropriate default.", 5857 // "format": "int32", 5858 // "location": "query", 5859 // "type": "integer" 5860 // }, 5861 // "pageToken": { 5862 // "description": "Optional. Pagination token, returned earlier via ListCertificateRevocationListsResponse.next_page_token.", 5863 // "location": "query", 5864 // "type": "string" 5865 // }, 5866 // "parent": { 5867 // "description": "Required. The resource name of the location associated with the CertificateRevocationLists, in the format `projects/*/locations/*/certificateauthorities/*`.", 5868 // "location": "path", 5869 // "pattern": "^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+$", 5870 // "required": true, 5871 // "type": "string" 5872 // } 5873 // }, 5874 // "path": "v1beta1/{+parent}/certificateRevocationLists", 5875 // "response": { 5876 // "$ref": "ListCertificateRevocationListsResponse" 5877 // }, 5878 // "scopes": [ 5879 // "https://www.googleapis.com/auth/cloud-platform" 5880 // ] 5881 // } 5882 5883} 5884 5885// Pages invokes f for each page of results. 5886// A non-nil error returned from f will halt the iteration. 5887// The provided context supersedes any context provided to the Context method. 5888func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsListCall) Pages(ctx context.Context, f func(*ListCertificateRevocationListsResponse) error) error { 5889 c.ctx_ = ctx 5890 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 5891 for { 5892 x, err := c.Do() 5893 if err != nil { 5894 return err 5895 } 5896 if err := f(x); err != nil { 5897 return err 5898 } 5899 if x.NextPageToken == "" { 5900 return nil 5901 } 5902 c.PageToken(x.NextPageToken) 5903 } 5904} 5905 5906// method id "privateca.projects.locations.certificateAuthorities.certificateRevocationLists.patch": 5907 5908type ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsPatchCall struct { 5909 s *Service 5910 name string 5911 certificaterevocationlist *CertificateRevocationList 5912 urlParams_ gensupport.URLParams 5913 ctx_ context.Context 5914 header_ http.Header 5915} 5916 5917// Patch: Update a CertificateRevocationList. 5918func (r *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsService) Patch(name string, certificaterevocationlist *CertificateRevocationList) *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsPatchCall { 5919 c := &ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5920 c.name = name 5921 c.certificaterevocationlist = certificaterevocationlist 5922 return c 5923} 5924 5925// RequestId sets the optional parameter "requestId": An ID to identify 5926// requests. Specify a unique request ID so that if you must retry your 5927// request, the server will know to ignore the request if it has already 5928// been completed. The server will guarantee that for at least 60 5929// minutes since the first request. For example, consider a situation 5930// where you make an initial request and t he request times out. If you 5931// make the request again with the same request ID, the server can check 5932// if original operation with the same request ID was received, and if 5933// so, will ignore the second request. This prevents clients from 5934// accidentally creating duplicate commitments. The request ID must be a 5935// valid UUID with the exception that zero UUID is not supported 5936// (00000000-0000-0000-0000-000000000000). 5937func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsPatchCall) RequestId(requestId string) *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsPatchCall { 5938 c.urlParams_.Set("requestId", requestId) 5939 return c 5940} 5941 5942// UpdateMask sets the optional parameter "updateMask": Required. A list 5943// of fields to be updated in this request. 5944func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsPatchCall { 5945 c.urlParams_.Set("updateMask", updateMask) 5946 return c 5947} 5948 5949// Fields allows partial responses to be retrieved. See 5950// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5951// for more information. 5952func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsPatchCall { 5953 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5954 return c 5955} 5956 5957// Context sets the context to be used in this call's Do method. Any 5958// pending HTTP request will be aborted if the provided context is 5959// canceled. 5960func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsPatchCall) Context(ctx context.Context) *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsPatchCall { 5961 c.ctx_ = ctx 5962 return c 5963} 5964 5965// Header returns an http.Header that can be modified by the caller to 5966// add HTTP headers to the request. 5967func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsPatchCall) Header() http.Header { 5968 if c.header_ == nil { 5969 c.header_ = make(http.Header) 5970 } 5971 return c.header_ 5972} 5973 5974func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsPatchCall) doRequest(alt string) (*http.Response, error) { 5975 reqHeaders := make(http.Header) 5976 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 5977 for k, v := range c.header_ { 5978 reqHeaders[k] = v 5979 } 5980 reqHeaders.Set("User-Agent", c.s.userAgent()) 5981 var body io.Reader = nil 5982 body, err := googleapi.WithoutDataWrapper.JSONReader(c.certificaterevocationlist) 5983 if err != nil { 5984 return nil, err 5985 } 5986 reqHeaders.Set("Content-Type", "application/json") 5987 c.urlParams_.Set("alt", alt) 5988 c.urlParams_.Set("prettyPrint", "false") 5989 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 5990 urls += "?" + c.urlParams_.Encode() 5991 req, err := http.NewRequest("PATCH", urls, body) 5992 if err != nil { 5993 return nil, err 5994 } 5995 req.Header = reqHeaders 5996 googleapi.Expand(req.URL, map[string]string{ 5997 "name": c.name, 5998 }) 5999 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6000} 6001 6002// Do executes the "privateca.projects.locations.certificateAuthorities.certificateRevocationLists.patch" call. 6003// Exactly one of *Operation or error will be non-nil. Any non-2xx 6004// status code is an error. Response headers are in either 6005// *Operation.ServerResponse.Header or (if a response was returned at 6006// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6007// to check whether the returned error was because 6008// http.StatusNotModified was returned. 6009func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 6010 gensupport.SetOptions(c.urlParams_, opts...) 6011 res, err := c.doRequest("json") 6012 if res != nil && res.StatusCode == http.StatusNotModified { 6013 if res.Body != nil { 6014 res.Body.Close() 6015 } 6016 return nil, &googleapi.Error{ 6017 Code: res.StatusCode, 6018 Header: res.Header, 6019 } 6020 } 6021 if err != nil { 6022 return nil, err 6023 } 6024 defer googleapi.CloseBody(res) 6025 if err := googleapi.CheckResponse(res); err != nil { 6026 return nil, err 6027 } 6028 ret := &Operation{ 6029 ServerResponse: googleapi.ServerResponse{ 6030 Header: res.Header, 6031 HTTPStatusCode: res.StatusCode, 6032 }, 6033 } 6034 target := &ret 6035 if err := gensupport.DecodeResponse(target, res); err != nil { 6036 return nil, err 6037 } 6038 return ret, nil 6039 // { 6040 // "description": "Update a CertificateRevocationList.", 6041 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/certificateAuthorities/{certificateAuthoritiesId}/certificateRevocationLists/{certificateRevocationListsId}", 6042 // "httpMethod": "PATCH", 6043 // "id": "privateca.projects.locations.certificateAuthorities.certificateRevocationLists.patch", 6044 // "parameterOrder": [ 6045 // "name" 6046 // ], 6047 // "parameters": { 6048 // "name": { 6049 // "description": "Output only. The resource path for this CertificateRevocationList in the format `projects/*/locations/*/certificateAuthorities/*/ certificateRevocationLists/*`.", 6050 // "location": "path", 6051 // "pattern": "^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+$", 6052 // "required": true, 6053 // "type": "string" 6054 // }, 6055 // "requestId": { 6056 // "description": "Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", 6057 // "location": "query", 6058 // "type": "string" 6059 // }, 6060 // "updateMask": { 6061 // "description": "Required. A list of fields to be updated in this request.", 6062 // "format": "google-fieldmask", 6063 // "location": "query", 6064 // "type": "string" 6065 // } 6066 // }, 6067 // "path": "v1beta1/{+name}", 6068 // "request": { 6069 // "$ref": "CertificateRevocationList" 6070 // }, 6071 // "response": { 6072 // "$ref": "Operation" 6073 // }, 6074 // "scopes": [ 6075 // "https://www.googleapis.com/auth/cloud-platform" 6076 // ] 6077 // } 6078 6079} 6080 6081// method id "privateca.projects.locations.certificateAuthorities.certificateRevocationLists.setIamPolicy": 6082 6083type ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsSetIamPolicyCall struct { 6084 s *Service 6085 resource string 6086 setiampolicyrequest *SetIamPolicyRequest 6087 urlParams_ gensupport.URLParams 6088 ctx_ context.Context 6089 header_ http.Header 6090} 6091 6092// SetIamPolicy: Sets the access control policy on the specified 6093// resource. Replaces any existing policy. Can return `NOT_FOUND`, 6094// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. 6095func (r *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsSetIamPolicyCall { 6096 c := &ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6097 c.resource = resource 6098 c.setiampolicyrequest = setiampolicyrequest 6099 return c 6100} 6101 6102// Fields allows partial responses to be retrieved. See 6103// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6104// for more information. 6105func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsSetIamPolicyCall { 6106 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6107 return c 6108} 6109 6110// Context sets the context to be used in this call's Do method. Any 6111// pending HTTP request will be aborted if the provided context is 6112// canceled. 6113func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsSetIamPolicyCall { 6114 c.ctx_ = ctx 6115 return c 6116} 6117 6118// Header returns an http.Header that can be modified by the caller to 6119// add HTTP headers to the request. 6120func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsSetIamPolicyCall) Header() http.Header { 6121 if c.header_ == nil { 6122 c.header_ = make(http.Header) 6123 } 6124 return c.header_ 6125} 6126 6127func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 6128 reqHeaders := make(http.Header) 6129 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 6130 for k, v := range c.header_ { 6131 reqHeaders[k] = v 6132 } 6133 reqHeaders.Set("User-Agent", c.s.userAgent()) 6134 var body io.Reader = nil 6135 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 6136 if err != nil { 6137 return nil, err 6138 } 6139 reqHeaders.Set("Content-Type", "application/json") 6140 c.urlParams_.Set("alt", alt) 6141 c.urlParams_.Set("prettyPrint", "false") 6142 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy") 6143 urls += "?" + c.urlParams_.Encode() 6144 req, err := http.NewRequest("POST", urls, body) 6145 if err != nil { 6146 return nil, err 6147 } 6148 req.Header = reqHeaders 6149 googleapi.Expand(req.URL, map[string]string{ 6150 "resource": c.resource, 6151 }) 6152 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6153} 6154 6155// Do executes the "privateca.projects.locations.certificateAuthorities.certificateRevocationLists.setIamPolicy" call. 6156// Exactly one of *Policy or error will be non-nil. Any non-2xx status 6157// code is an error. Response headers are in either 6158// *Policy.ServerResponse.Header or (if a response was returned at all) 6159// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 6160// check whether the returned error was because http.StatusNotModified 6161// was returned. 6162func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 6163 gensupport.SetOptions(c.urlParams_, opts...) 6164 res, err := c.doRequest("json") 6165 if res != nil && res.StatusCode == http.StatusNotModified { 6166 if res.Body != nil { 6167 res.Body.Close() 6168 } 6169 return nil, &googleapi.Error{ 6170 Code: res.StatusCode, 6171 Header: res.Header, 6172 } 6173 } 6174 if err != nil { 6175 return nil, err 6176 } 6177 defer googleapi.CloseBody(res) 6178 if err := googleapi.CheckResponse(res); err != nil { 6179 return nil, err 6180 } 6181 ret := &Policy{ 6182 ServerResponse: googleapi.ServerResponse{ 6183 Header: res.Header, 6184 HTTPStatusCode: res.StatusCode, 6185 }, 6186 } 6187 target := &ret 6188 if err := gensupport.DecodeResponse(target, res); err != nil { 6189 return nil, err 6190 } 6191 return ret, nil 6192 // { 6193 // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", 6194 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/certificateAuthorities/{certificateAuthoritiesId}/certificateRevocationLists/{certificateRevocationListsId}:setIamPolicy", 6195 // "httpMethod": "POST", 6196 // "id": "privateca.projects.locations.certificateAuthorities.certificateRevocationLists.setIamPolicy", 6197 // "parameterOrder": [ 6198 // "resource" 6199 // ], 6200 // "parameters": { 6201 // "resource": { 6202 // "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", 6203 // "location": "path", 6204 // "pattern": "^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+$", 6205 // "required": true, 6206 // "type": "string" 6207 // } 6208 // }, 6209 // "path": "v1beta1/{+resource}:setIamPolicy", 6210 // "request": { 6211 // "$ref": "SetIamPolicyRequest" 6212 // }, 6213 // "response": { 6214 // "$ref": "Policy" 6215 // }, 6216 // "scopes": [ 6217 // "https://www.googleapis.com/auth/cloud-platform" 6218 // ] 6219 // } 6220 6221} 6222 6223// method id "privateca.projects.locations.certificateAuthorities.certificateRevocationLists.testIamPermissions": 6224 6225type ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsTestIamPermissionsCall struct { 6226 s *Service 6227 resource string 6228 testiampermissionsrequest *TestIamPermissionsRequest 6229 urlParams_ gensupport.URLParams 6230 ctx_ context.Context 6231 header_ http.Header 6232} 6233 6234// TestIamPermissions: Returns permissions that a caller has on the 6235// specified resource. If the resource does not exist, this will return 6236// an empty set of permissions, not a `NOT_FOUND` error. Note: This 6237// operation is designed to be used for building permission-aware UIs 6238// and command-line tools, not for authorization checking. This 6239// operation may "fail open" without warning. 6240func (r *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsTestIamPermissionsCall { 6241 c := &ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6242 c.resource = resource 6243 c.testiampermissionsrequest = testiampermissionsrequest 6244 return c 6245} 6246 6247// Fields allows partial responses to be retrieved. See 6248// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6249// for more information. 6250func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsTestIamPermissionsCall { 6251 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6252 return c 6253} 6254 6255// Context sets the context to be used in this call's Do method. Any 6256// pending HTTP request will be aborted if the provided context is 6257// canceled. 6258func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsTestIamPermissionsCall { 6259 c.ctx_ = ctx 6260 return c 6261} 6262 6263// Header returns an http.Header that can be modified by the caller to 6264// add HTTP headers to the request. 6265func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsTestIamPermissionsCall) Header() http.Header { 6266 if c.header_ == nil { 6267 c.header_ = make(http.Header) 6268 } 6269 return c.header_ 6270} 6271 6272func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 6273 reqHeaders := make(http.Header) 6274 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 6275 for k, v := range c.header_ { 6276 reqHeaders[k] = v 6277 } 6278 reqHeaders.Set("User-Agent", c.s.userAgent()) 6279 var body io.Reader = nil 6280 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 6281 if err != nil { 6282 return nil, err 6283 } 6284 reqHeaders.Set("Content-Type", "application/json") 6285 c.urlParams_.Set("alt", alt) 6286 c.urlParams_.Set("prettyPrint", "false") 6287 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions") 6288 urls += "?" + c.urlParams_.Encode() 6289 req, err := http.NewRequest("POST", urls, body) 6290 if err != nil { 6291 return nil, err 6292 } 6293 req.Header = reqHeaders 6294 googleapi.Expand(req.URL, map[string]string{ 6295 "resource": c.resource, 6296 }) 6297 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6298} 6299 6300// Do executes the "privateca.projects.locations.certificateAuthorities.certificateRevocationLists.testIamPermissions" call. 6301// Exactly one of *TestIamPermissionsResponse or error will be non-nil. 6302// Any non-2xx status code is an error. Response headers are in either 6303// *TestIamPermissionsResponse.ServerResponse.Header or (if a response 6304// was returned at all) in error.(*googleapi.Error).Header. Use 6305// googleapi.IsNotModified to check whether the returned error was 6306// because http.StatusNotModified was returned. 6307func (c *ProjectsLocationsCertificateAuthoritiesCertificateRevocationListsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 6308 gensupport.SetOptions(c.urlParams_, opts...) 6309 res, err := c.doRequest("json") 6310 if res != nil && res.StatusCode == http.StatusNotModified { 6311 if res.Body != nil { 6312 res.Body.Close() 6313 } 6314 return nil, &googleapi.Error{ 6315 Code: res.StatusCode, 6316 Header: res.Header, 6317 } 6318 } 6319 if err != nil { 6320 return nil, err 6321 } 6322 defer googleapi.CloseBody(res) 6323 if err := googleapi.CheckResponse(res); err != nil { 6324 return nil, err 6325 } 6326 ret := &TestIamPermissionsResponse{ 6327 ServerResponse: googleapi.ServerResponse{ 6328 Header: res.Header, 6329 HTTPStatusCode: res.StatusCode, 6330 }, 6331 } 6332 target := &ret 6333 if err := gensupport.DecodeResponse(target, res); err != nil { 6334 return nil, err 6335 } 6336 return ret, nil 6337 // { 6338 // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", 6339 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/certificateAuthorities/{certificateAuthoritiesId}/certificateRevocationLists/{certificateRevocationListsId}:testIamPermissions", 6340 // "httpMethod": "POST", 6341 // "id": "privateca.projects.locations.certificateAuthorities.certificateRevocationLists.testIamPermissions", 6342 // "parameterOrder": [ 6343 // "resource" 6344 // ], 6345 // "parameters": { 6346 // "resource": { 6347 // "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", 6348 // "location": "path", 6349 // "pattern": "^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+$", 6350 // "required": true, 6351 // "type": "string" 6352 // } 6353 // }, 6354 // "path": "v1beta1/{+resource}:testIamPermissions", 6355 // "request": { 6356 // "$ref": "TestIamPermissionsRequest" 6357 // }, 6358 // "response": { 6359 // "$ref": "TestIamPermissionsResponse" 6360 // }, 6361 // "scopes": [ 6362 // "https://www.googleapis.com/auth/cloud-platform" 6363 // ] 6364 // } 6365 6366} 6367 6368// method id "privateca.projects.locations.certificateAuthorities.certificates.create": 6369 6370type ProjectsLocationsCertificateAuthoritiesCertificatesCreateCall struct { 6371 s *Service 6372 parent string 6373 certificate *Certificate 6374 urlParams_ gensupport.URLParams 6375 ctx_ context.Context 6376 header_ http.Header 6377} 6378 6379// Create: Create a new Certificate in a given Project, Location from a 6380// particular CertificateAuthority. 6381func (r *ProjectsLocationsCertificateAuthoritiesCertificatesService) Create(parent string, certificate *Certificate) *ProjectsLocationsCertificateAuthoritiesCertificatesCreateCall { 6382 c := &ProjectsLocationsCertificateAuthoritiesCertificatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6383 c.parent = parent 6384 c.certificate = certificate 6385 return c 6386} 6387 6388// CertificateId sets the optional parameter "certificateId": It must be 6389// unique within a location and match the regular expression 6390// `[a-zA-Z0-9_-]{1,63}`. This field is required when using a 6391// CertificateAuthority in the Enterprise CertificateAuthority.Tier, but 6392// is optional and its value is ignored otherwise. 6393func (c *ProjectsLocationsCertificateAuthoritiesCertificatesCreateCall) CertificateId(certificateId string) *ProjectsLocationsCertificateAuthoritiesCertificatesCreateCall { 6394 c.urlParams_.Set("certificateId", certificateId) 6395 return c 6396} 6397 6398// RequestId sets the optional parameter "requestId": An ID to identify 6399// requests. Specify a unique request ID so that if you must retry your 6400// request, the server will know to ignore the request if it has already 6401// been completed. The server will guarantee that for at least 60 6402// minutes since the first request. For example, consider a situation 6403// where you make an initial request and t he request times out. If you 6404// make the request again with the same request ID, the server can check 6405// if original operation with the same request ID was received, and if 6406// so, will ignore the second request. This prevents clients from 6407// accidentally creating duplicate commitments. The request ID must be a 6408// valid UUID with the exception that zero UUID is not supported 6409// (00000000-0000-0000-0000-000000000000). 6410func (c *ProjectsLocationsCertificateAuthoritiesCertificatesCreateCall) RequestId(requestId string) *ProjectsLocationsCertificateAuthoritiesCertificatesCreateCall { 6411 c.urlParams_.Set("requestId", requestId) 6412 return c 6413} 6414 6415// Fields allows partial responses to be retrieved. See 6416// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6417// for more information. 6418func (c *ProjectsLocationsCertificateAuthoritiesCertificatesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateAuthoritiesCertificatesCreateCall { 6419 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6420 return c 6421} 6422 6423// Context sets the context to be used in this call's Do method. Any 6424// pending HTTP request will be aborted if the provided context is 6425// canceled. 6426func (c *ProjectsLocationsCertificateAuthoritiesCertificatesCreateCall) Context(ctx context.Context) *ProjectsLocationsCertificateAuthoritiesCertificatesCreateCall { 6427 c.ctx_ = ctx 6428 return c 6429} 6430 6431// Header returns an http.Header that can be modified by the caller to 6432// add HTTP headers to the request. 6433func (c *ProjectsLocationsCertificateAuthoritiesCertificatesCreateCall) Header() http.Header { 6434 if c.header_ == nil { 6435 c.header_ = make(http.Header) 6436 } 6437 return c.header_ 6438} 6439 6440func (c *ProjectsLocationsCertificateAuthoritiesCertificatesCreateCall) doRequest(alt string) (*http.Response, error) { 6441 reqHeaders := make(http.Header) 6442 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 6443 for k, v := range c.header_ { 6444 reqHeaders[k] = v 6445 } 6446 reqHeaders.Set("User-Agent", c.s.userAgent()) 6447 var body io.Reader = nil 6448 body, err := googleapi.WithoutDataWrapper.JSONReader(c.certificate) 6449 if err != nil { 6450 return nil, err 6451 } 6452 reqHeaders.Set("Content-Type", "application/json") 6453 c.urlParams_.Set("alt", alt) 6454 c.urlParams_.Set("prettyPrint", "false") 6455 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/certificates") 6456 urls += "?" + c.urlParams_.Encode() 6457 req, err := http.NewRequest("POST", urls, body) 6458 if err != nil { 6459 return nil, err 6460 } 6461 req.Header = reqHeaders 6462 googleapi.Expand(req.URL, map[string]string{ 6463 "parent": c.parent, 6464 }) 6465 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6466} 6467 6468// Do executes the "privateca.projects.locations.certificateAuthorities.certificates.create" call. 6469// Exactly one of *Certificate or error will be non-nil. Any non-2xx 6470// status code is an error. Response headers are in either 6471// *Certificate.ServerResponse.Header or (if a response was returned at 6472// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6473// to check whether the returned error was because 6474// http.StatusNotModified was returned. 6475func (c *ProjectsLocationsCertificateAuthoritiesCertificatesCreateCall) Do(opts ...googleapi.CallOption) (*Certificate, error) { 6476 gensupport.SetOptions(c.urlParams_, opts...) 6477 res, err := c.doRequest("json") 6478 if res != nil && res.StatusCode == http.StatusNotModified { 6479 if res.Body != nil { 6480 res.Body.Close() 6481 } 6482 return nil, &googleapi.Error{ 6483 Code: res.StatusCode, 6484 Header: res.Header, 6485 } 6486 } 6487 if err != nil { 6488 return nil, err 6489 } 6490 defer googleapi.CloseBody(res) 6491 if err := googleapi.CheckResponse(res); err != nil { 6492 return nil, err 6493 } 6494 ret := &Certificate{ 6495 ServerResponse: googleapi.ServerResponse{ 6496 Header: res.Header, 6497 HTTPStatusCode: res.StatusCode, 6498 }, 6499 } 6500 target := &ret 6501 if err := gensupport.DecodeResponse(target, res); err != nil { 6502 return nil, err 6503 } 6504 return ret, nil 6505 // { 6506 // "description": "Create a new Certificate in a given Project, Location from a particular CertificateAuthority.", 6507 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/certificateAuthorities/{certificateAuthoritiesId}/certificates", 6508 // "httpMethod": "POST", 6509 // "id": "privateca.projects.locations.certificateAuthorities.certificates.create", 6510 // "parameterOrder": [ 6511 // "parent" 6512 // ], 6513 // "parameters": { 6514 // "certificateId": { 6515 // "description": "Optional. It must be unique within a location and match the regular expression `[a-zA-Z0-9_-]{1,63}`. This field is required when using a CertificateAuthority in the Enterprise CertificateAuthority.Tier, but is optional and its value is ignored otherwise.", 6516 // "location": "query", 6517 // "type": "string" 6518 // }, 6519 // "parent": { 6520 // "description": "Required. The resource name of the location and CertificateAuthority associated with the Certificate, in the format `projects/*/locations/*/certificateAuthorities/*`.", 6521 // "location": "path", 6522 // "pattern": "^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+$", 6523 // "required": true, 6524 // "type": "string" 6525 // }, 6526 // "requestId": { 6527 // "description": "Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", 6528 // "location": "query", 6529 // "type": "string" 6530 // } 6531 // }, 6532 // "path": "v1beta1/{+parent}/certificates", 6533 // "request": { 6534 // "$ref": "Certificate" 6535 // }, 6536 // "response": { 6537 // "$ref": "Certificate" 6538 // }, 6539 // "scopes": [ 6540 // "https://www.googleapis.com/auth/cloud-platform" 6541 // ] 6542 // } 6543 6544} 6545 6546// method id "privateca.projects.locations.certificateAuthorities.certificates.get": 6547 6548type ProjectsLocationsCertificateAuthoritiesCertificatesGetCall struct { 6549 s *Service 6550 name string 6551 urlParams_ gensupport.URLParams 6552 ifNoneMatch_ string 6553 ctx_ context.Context 6554 header_ http.Header 6555} 6556 6557// Get: Returns a Certificate. 6558func (r *ProjectsLocationsCertificateAuthoritiesCertificatesService) Get(name string) *ProjectsLocationsCertificateAuthoritiesCertificatesGetCall { 6559 c := &ProjectsLocationsCertificateAuthoritiesCertificatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6560 c.name = name 6561 return c 6562} 6563 6564// Fields allows partial responses to be retrieved. See 6565// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6566// for more information. 6567func (c *ProjectsLocationsCertificateAuthoritiesCertificatesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateAuthoritiesCertificatesGetCall { 6568 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6569 return c 6570} 6571 6572// IfNoneMatch sets the optional parameter which makes the operation 6573// fail if the object's ETag matches the given value. This is useful for 6574// getting updates only after the object has changed since the last 6575// request. Use googleapi.IsNotModified to check whether the response 6576// error from Do is the result of In-None-Match. 6577func (c *ProjectsLocationsCertificateAuthoritiesCertificatesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCertificateAuthoritiesCertificatesGetCall { 6578 c.ifNoneMatch_ = entityTag 6579 return c 6580} 6581 6582// Context sets the context to be used in this call's Do method. Any 6583// pending HTTP request will be aborted if the provided context is 6584// canceled. 6585func (c *ProjectsLocationsCertificateAuthoritiesCertificatesGetCall) Context(ctx context.Context) *ProjectsLocationsCertificateAuthoritiesCertificatesGetCall { 6586 c.ctx_ = ctx 6587 return c 6588} 6589 6590// Header returns an http.Header that can be modified by the caller to 6591// add HTTP headers to the request. 6592func (c *ProjectsLocationsCertificateAuthoritiesCertificatesGetCall) Header() http.Header { 6593 if c.header_ == nil { 6594 c.header_ = make(http.Header) 6595 } 6596 return c.header_ 6597} 6598 6599func (c *ProjectsLocationsCertificateAuthoritiesCertificatesGetCall) doRequest(alt string) (*http.Response, error) { 6600 reqHeaders := make(http.Header) 6601 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 6602 for k, v := range c.header_ { 6603 reqHeaders[k] = v 6604 } 6605 reqHeaders.Set("User-Agent", c.s.userAgent()) 6606 if c.ifNoneMatch_ != "" { 6607 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6608 } 6609 var body io.Reader = nil 6610 c.urlParams_.Set("alt", alt) 6611 c.urlParams_.Set("prettyPrint", "false") 6612 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 6613 urls += "?" + c.urlParams_.Encode() 6614 req, err := http.NewRequest("GET", urls, body) 6615 if err != nil { 6616 return nil, err 6617 } 6618 req.Header = reqHeaders 6619 googleapi.Expand(req.URL, map[string]string{ 6620 "name": c.name, 6621 }) 6622 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6623} 6624 6625// Do executes the "privateca.projects.locations.certificateAuthorities.certificates.get" call. 6626// Exactly one of *Certificate or error will be non-nil. Any non-2xx 6627// status code is an error. Response headers are in either 6628// *Certificate.ServerResponse.Header or (if a response was returned at 6629// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6630// to check whether the returned error was because 6631// http.StatusNotModified was returned. 6632func (c *ProjectsLocationsCertificateAuthoritiesCertificatesGetCall) Do(opts ...googleapi.CallOption) (*Certificate, error) { 6633 gensupport.SetOptions(c.urlParams_, opts...) 6634 res, err := c.doRequest("json") 6635 if res != nil && res.StatusCode == http.StatusNotModified { 6636 if res.Body != nil { 6637 res.Body.Close() 6638 } 6639 return nil, &googleapi.Error{ 6640 Code: res.StatusCode, 6641 Header: res.Header, 6642 } 6643 } 6644 if err != nil { 6645 return nil, err 6646 } 6647 defer googleapi.CloseBody(res) 6648 if err := googleapi.CheckResponse(res); err != nil { 6649 return nil, err 6650 } 6651 ret := &Certificate{ 6652 ServerResponse: googleapi.ServerResponse{ 6653 Header: res.Header, 6654 HTTPStatusCode: res.StatusCode, 6655 }, 6656 } 6657 target := &ret 6658 if err := gensupport.DecodeResponse(target, res); err != nil { 6659 return nil, err 6660 } 6661 return ret, nil 6662 // { 6663 // "description": "Returns a Certificate.", 6664 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/certificateAuthorities/{certificateAuthoritiesId}/certificates/{certificatesId}", 6665 // "httpMethod": "GET", 6666 // "id": "privateca.projects.locations.certificateAuthorities.certificates.get", 6667 // "parameterOrder": [ 6668 // "name" 6669 // ], 6670 // "parameters": { 6671 // "name": { 6672 // "description": "Required. The name of the Certificate to get.", 6673 // "location": "path", 6674 // "pattern": "^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/certificates/[^/]+$", 6675 // "required": true, 6676 // "type": "string" 6677 // } 6678 // }, 6679 // "path": "v1beta1/{+name}", 6680 // "response": { 6681 // "$ref": "Certificate" 6682 // }, 6683 // "scopes": [ 6684 // "https://www.googleapis.com/auth/cloud-platform" 6685 // ] 6686 // } 6687 6688} 6689 6690// method id "privateca.projects.locations.certificateAuthorities.certificates.list": 6691 6692type ProjectsLocationsCertificateAuthoritiesCertificatesListCall struct { 6693 s *Service 6694 parent string 6695 urlParams_ gensupport.URLParams 6696 ifNoneMatch_ string 6697 ctx_ context.Context 6698 header_ http.Header 6699} 6700 6701// List: Lists Certificates. 6702func (r *ProjectsLocationsCertificateAuthoritiesCertificatesService) List(parent string) *ProjectsLocationsCertificateAuthoritiesCertificatesListCall { 6703 c := &ProjectsLocationsCertificateAuthoritiesCertificatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6704 c.parent = parent 6705 return c 6706} 6707 6708// Filter sets the optional parameter "filter": Only include resources 6709// that match the filter in the response. For details on supported 6710// filters and syntax, see [Certificates Filtering 6711// documentation](https://cloud.google.com/certificate-authority-service/ 6712// docs/sorting-filtering-certificates#filtering_support). 6713func (c *ProjectsLocationsCertificateAuthoritiesCertificatesListCall) Filter(filter string) *ProjectsLocationsCertificateAuthoritiesCertificatesListCall { 6714 c.urlParams_.Set("filter", filter) 6715 return c 6716} 6717 6718// OrderBy sets the optional parameter "orderBy": Specify how the 6719// results should be sorted. For details on supported fields and syntax, 6720// see [Certificates Sorting 6721// documentation](https://cloud.google.com/certificate-authority-service/ 6722// docs/sorting-filtering-certificates#sorting_support). 6723func (c *ProjectsLocationsCertificateAuthoritiesCertificatesListCall) OrderBy(orderBy string) *ProjectsLocationsCertificateAuthoritiesCertificatesListCall { 6724 c.urlParams_.Set("orderBy", orderBy) 6725 return c 6726} 6727 6728// PageSize sets the optional parameter "pageSize": Limit on the number 6729// of Certificates to include in the response. Further Certificates can 6730// subsequently be obtained by including the 6731// ListCertificatesResponse.next_page_token in a subsequent request. If 6732// unspecified, the server will pick an appropriate default. 6733func (c *ProjectsLocationsCertificateAuthoritiesCertificatesListCall) PageSize(pageSize int64) *ProjectsLocationsCertificateAuthoritiesCertificatesListCall { 6734 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 6735 return c 6736} 6737 6738// PageToken sets the optional parameter "pageToken": Pagination token, 6739// returned earlier via ListCertificatesResponse.next_page_token. 6740func (c *ProjectsLocationsCertificateAuthoritiesCertificatesListCall) PageToken(pageToken string) *ProjectsLocationsCertificateAuthoritiesCertificatesListCall { 6741 c.urlParams_.Set("pageToken", pageToken) 6742 return c 6743} 6744 6745// Fields allows partial responses to be retrieved. See 6746// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6747// for more information. 6748func (c *ProjectsLocationsCertificateAuthoritiesCertificatesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateAuthoritiesCertificatesListCall { 6749 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6750 return c 6751} 6752 6753// IfNoneMatch sets the optional parameter which makes the operation 6754// fail if the object's ETag matches the given value. This is useful for 6755// getting updates only after the object has changed since the last 6756// request. Use googleapi.IsNotModified to check whether the response 6757// error from Do is the result of In-None-Match. 6758func (c *ProjectsLocationsCertificateAuthoritiesCertificatesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCertificateAuthoritiesCertificatesListCall { 6759 c.ifNoneMatch_ = entityTag 6760 return c 6761} 6762 6763// Context sets the context to be used in this call's Do method. Any 6764// pending HTTP request will be aborted if the provided context is 6765// canceled. 6766func (c *ProjectsLocationsCertificateAuthoritiesCertificatesListCall) Context(ctx context.Context) *ProjectsLocationsCertificateAuthoritiesCertificatesListCall { 6767 c.ctx_ = ctx 6768 return c 6769} 6770 6771// Header returns an http.Header that can be modified by the caller to 6772// add HTTP headers to the request. 6773func (c *ProjectsLocationsCertificateAuthoritiesCertificatesListCall) Header() http.Header { 6774 if c.header_ == nil { 6775 c.header_ = make(http.Header) 6776 } 6777 return c.header_ 6778} 6779 6780func (c *ProjectsLocationsCertificateAuthoritiesCertificatesListCall) doRequest(alt string) (*http.Response, error) { 6781 reqHeaders := make(http.Header) 6782 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 6783 for k, v := range c.header_ { 6784 reqHeaders[k] = v 6785 } 6786 reqHeaders.Set("User-Agent", c.s.userAgent()) 6787 if c.ifNoneMatch_ != "" { 6788 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6789 } 6790 var body io.Reader = nil 6791 c.urlParams_.Set("alt", alt) 6792 c.urlParams_.Set("prettyPrint", "false") 6793 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/certificates") 6794 urls += "?" + c.urlParams_.Encode() 6795 req, err := http.NewRequest("GET", urls, body) 6796 if err != nil { 6797 return nil, err 6798 } 6799 req.Header = reqHeaders 6800 googleapi.Expand(req.URL, map[string]string{ 6801 "parent": c.parent, 6802 }) 6803 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6804} 6805 6806// Do executes the "privateca.projects.locations.certificateAuthorities.certificates.list" call. 6807// Exactly one of *ListCertificatesResponse or error will be non-nil. 6808// Any non-2xx status code is an error. Response headers are in either 6809// *ListCertificatesResponse.ServerResponse.Header or (if a response was 6810// returned at all) in error.(*googleapi.Error).Header. Use 6811// googleapi.IsNotModified to check whether the returned error was 6812// because http.StatusNotModified was returned. 6813func (c *ProjectsLocationsCertificateAuthoritiesCertificatesListCall) Do(opts ...googleapi.CallOption) (*ListCertificatesResponse, error) { 6814 gensupport.SetOptions(c.urlParams_, opts...) 6815 res, err := c.doRequest("json") 6816 if res != nil && res.StatusCode == http.StatusNotModified { 6817 if res.Body != nil { 6818 res.Body.Close() 6819 } 6820 return nil, &googleapi.Error{ 6821 Code: res.StatusCode, 6822 Header: res.Header, 6823 } 6824 } 6825 if err != nil { 6826 return nil, err 6827 } 6828 defer googleapi.CloseBody(res) 6829 if err := googleapi.CheckResponse(res); err != nil { 6830 return nil, err 6831 } 6832 ret := &ListCertificatesResponse{ 6833 ServerResponse: googleapi.ServerResponse{ 6834 Header: res.Header, 6835 HTTPStatusCode: res.StatusCode, 6836 }, 6837 } 6838 target := &ret 6839 if err := gensupport.DecodeResponse(target, res); err != nil { 6840 return nil, err 6841 } 6842 return ret, nil 6843 // { 6844 // "description": "Lists Certificates.", 6845 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/certificateAuthorities/{certificateAuthoritiesId}/certificates", 6846 // "httpMethod": "GET", 6847 // "id": "privateca.projects.locations.certificateAuthorities.certificates.list", 6848 // "parameterOrder": [ 6849 // "parent" 6850 // ], 6851 // "parameters": { 6852 // "filter": { 6853 // "description": "Optional. Only include resources that match the filter in the response. For details on supported filters and syntax, see [Certificates Filtering documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support).", 6854 // "location": "query", 6855 // "type": "string" 6856 // }, 6857 // "orderBy": { 6858 // "description": "Optional. Specify how the results should be sorted. For details on supported fields and syntax, see [Certificates Sorting documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#sorting_support).", 6859 // "location": "query", 6860 // "type": "string" 6861 // }, 6862 // "pageSize": { 6863 // "description": "Optional. Limit on the number of Certificates to include in the response. Further Certificates can subsequently be obtained by including the ListCertificatesResponse.next_page_token in a subsequent request. If unspecified, the server will pick an appropriate default.", 6864 // "format": "int32", 6865 // "location": "query", 6866 // "type": "integer" 6867 // }, 6868 // "pageToken": { 6869 // "description": "Optional. Pagination token, returned earlier via ListCertificatesResponse.next_page_token.", 6870 // "location": "query", 6871 // "type": "string" 6872 // }, 6873 // "parent": { 6874 // "description": "Required. The resource name of the location associated with the Certificates, in the format `projects/*/locations/*/certificateauthorities/*`.", 6875 // "location": "path", 6876 // "pattern": "^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+$", 6877 // "required": true, 6878 // "type": "string" 6879 // } 6880 // }, 6881 // "path": "v1beta1/{+parent}/certificates", 6882 // "response": { 6883 // "$ref": "ListCertificatesResponse" 6884 // }, 6885 // "scopes": [ 6886 // "https://www.googleapis.com/auth/cloud-platform" 6887 // ] 6888 // } 6889 6890} 6891 6892// Pages invokes f for each page of results. 6893// A non-nil error returned from f will halt the iteration. 6894// The provided context supersedes any context provided to the Context method. 6895func (c *ProjectsLocationsCertificateAuthoritiesCertificatesListCall) Pages(ctx context.Context, f func(*ListCertificatesResponse) error) error { 6896 c.ctx_ = ctx 6897 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 6898 for { 6899 x, err := c.Do() 6900 if err != nil { 6901 return err 6902 } 6903 if err := f(x); err != nil { 6904 return err 6905 } 6906 if x.NextPageToken == "" { 6907 return nil 6908 } 6909 c.PageToken(x.NextPageToken) 6910 } 6911} 6912 6913// method id "privateca.projects.locations.certificateAuthorities.certificates.patch": 6914 6915type ProjectsLocationsCertificateAuthoritiesCertificatesPatchCall struct { 6916 s *Service 6917 name string 6918 certificate *Certificate 6919 urlParams_ gensupport.URLParams 6920 ctx_ context.Context 6921 header_ http.Header 6922} 6923 6924// Patch: Update a Certificate. Currently, the only field you can update 6925// is the labels field. 6926func (r *ProjectsLocationsCertificateAuthoritiesCertificatesService) Patch(name string, certificate *Certificate) *ProjectsLocationsCertificateAuthoritiesCertificatesPatchCall { 6927 c := &ProjectsLocationsCertificateAuthoritiesCertificatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6928 c.name = name 6929 c.certificate = certificate 6930 return c 6931} 6932 6933// RequestId sets the optional parameter "requestId": An ID to identify 6934// requests. Specify a unique request ID so that if you must retry your 6935// request, the server will know to ignore the request if it has already 6936// been completed. The server will guarantee that for at least 60 6937// minutes since the first request. For example, consider a situation 6938// where you make an initial request and t he request times out. If you 6939// make the request again with the same request ID, the server can check 6940// if original operation with the same request ID was received, and if 6941// so, will ignore the second request. This prevents clients from 6942// accidentally creating duplicate commitments. The request ID must be a 6943// valid UUID with the exception that zero UUID is not supported 6944// (00000000-0000-0000-0000-000000000000). 6945func (c *ProjectsLocationsCertificateAuthoritiesCertificatesPatchCall) RequestId(requestId string) *ProjectsLocationsCertificateAuthoritiesCertificatesPatchCall { 6946 c.urlParams_.Set("requestId", requestId) 6947 return c 6948} 6949 6950// UpdateMask sets the optional parameter "updateMask": Required. A list 6951// of fields to be updated in this request. 6952func (c *ProjectsLocationsCertificateAuthoritiesCertificatesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCertificateAuthoritiesCertificatesPatchCall { 6953 c.urlParams_.Set("updateMask", updateMask) 6954 return c 6955} 6956 6957// Fields allows partial responses to be retrieved. See 6958// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6959// for more information. 6960func (c *ProjectsLocationsCertificateAuthoritiesCertificatesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateAuthoritiesCertificatesPatchCall { 6961 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6962 return c 6963} 6964 6965// Context sets the context to be used in this call's Do method. Any 6966// pending HTTP request will be aborted if the provided context is 6967// canceled. 6968func (c *ProjectsLocationsCertificateAuthoritiesCertificatesPatchCall) Context(ctx context.Context) *ProjectsLocationsCertificateAuthoritiesCertificatesPatchCall { 6969 c.ctx_ = ctx 6970 return c 6971} 6972 6973// Header returns an http.Header that can be modified by the caller to 6974// add HTTP headers to the request. 6975func (c *ProjectsLocationsCertificateAuthoritiesCertificatesPatchCall) Header() http.Header { 6976 if c.header_ == nil { 6977 c.header_ = make(http.Header) 6978 } 6979 return c.header_ 6980} 6981 6982func (c *ProjectsLocationsCertificateAuthoritiesCertificatesPatchCall) doRequest(alt string) (*http.Response, error) { 6983 reqHeaders := make(http.Header) 6984 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 6985 for k, v := range c.header_ { 6986 reqHeaders[k] = v 6987 } 6988 reqHeaders.Set("User-Agent", c.s.userAgent()) 6989 var body io.Reader = nil 6990 body, err := googleapi.WithoutDataWrapper.JSONReader(c.certificate) 6991 if err != nil { 6992 return nil, err 6993 } 6994 reqHeaders.Set("Content-Type", "application/json") 6995 c.urlParams_.Set("alt", alt) 6996 c.urlParams_.Set("prettyPrint", "false") 6997 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 6998 urls += "?" + c.urlParams_.Encode() 6999 req, err := http.NewRequest("PATCH", urls, body) 7000 if err != nil { 7001 return nil, err 7002 } 7003 req.Header = reqHeaders 7004 googleapi.Expand(req.URL, map[string]string{ 7005 "name": c.name, 7006 }) 7007 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7008} 7009 7010// Do executes the "privateca.projects.locations.certificateAuthorities.certificates.patch" call. 7011// Exactly one of *Certificate or error will be non-nil. Any non-2xx 7012// status code is an error. Response headers are in either 7013// *Certificate.ServerResponse.Header or (if a response was returned at 7014// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7015// to check whether the returned error was because 7016// http.StatusNotModified was returned. 7017func (c *ProjectsLocationsCertificateAuthoritiesCertificatesPatchCall) Do(opts ...googleapi.CallOption) (*Certificate, error) { 7018 gensupport.SetOptions(c.urlParams_, opts...) 7019 res, err := c.doRequest("json") 7020 if res != nil && res.StatusCode == http.StatusNotModified { 7021 if res.Body != nil { 7022 res.Body.Close() 7023 } 7024 return nil, &googleapi.Error{ 7025 Code: res.StatusCode, 7026 Header: res.Header, 7027 } 7028 } 7029 if err != nil { 7030 return nil, err 7031 } 7032 defer googleapi.CloseBody(res) 7033 if err := googleapi.CheckResponse(res); err != nil { 7034 return nil, err 7035 } 7036 ret := &Certificate{ 7037 ServerResponse: googleapi.ServerResponse{ 7038 Header: res.Header, 7039 HTTPStatusCode: res.StatusCode, 7040 }, 7041 } 7042 target := &ret 7043 if err := gensupport.DecodeResponse(target, res); err != nil { 7044 return nil, err 7045 } 7046 return ret, nil 7047 // { 7048 // "description": "Update a Certificate. Currently, the only field you can update is the labels field.", 7049 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/certificateAuthorities/{certificateAuthoritiesId}/certificates/{certificatesId}", 7050 // "httpMethod": "PATCH", 7051 // "id": "privateca.projects.locations.certificateAuthorities.certificates.patch", 7052 // "parameterOrder": [ 7053 // "name" 7054 // ], 7055 // "parameters": { 7056 // "name": { 7057 // "description": "Output only. The resource path for this Certificate in the format `projects/*/locations/*/certificateAuthorities/*/certificates/*`.", 7058 // "location": "path", 7059 // "pattern": "^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/certificates/[^/]+$", 7060 // "required": true, 7061 // "type": "string" 7062 // }, 7063 // "requestId": { 7064 // "description": "Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", 7065 // "location": "query", 7066 // "type": "string" 7067 // }, 7068 // "updateMask": { 7069 // "description": "Required. A list of fields to be updated in this request.", 7070 // "format": "google-fieldmask", 7071 // "location": "query", 7072 // "type": "string" 7073 // } 7074 // }, 7075 // "path": "v1beta1/{+name}", 7076 // "request": { 7077 // "$ref": "Certificate" 7078 // }, 7079 // "response": { 7080 // "$ref": "Certificate" 7081 // }, 7082 // "scopes": [ 7083 // "https://www.googleapis.com/auth/cloud-platform" 7084 // ] 7085 // } 7086 7087} 7088 7089// method id "privateca.projects.locations.certificateAuthorities.certificates.revoke": 7090 7091type ProjectsLocationsCertificateAuthoritiesCertificatesRevokeCall struct { 7092 s *Service 7093 name string 7094 revokecertificaterequest *RevokeCertificateRequest 7095 urlParams_ gensupport.URLParams 7096 ctx_ context.Context 7097 header_ http.Header 7098} 7099 7100// Revoke: Revoke a Certificate. 7101func (r *ProjectsLocationsCertificateAuthoritiesCertificatesService) Revoke(name string, revokecertificaterequest *RevokeCertificateRequest) *ProjectsLocationsCertificateAuthoritiesCertificatesRevokeCall { 7102 c := &ProjectsLocationsCertificateAuthoritiesCertificatesRevokeCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7103 c.name = name 7104 c.revokecertificaterequest = revokecertificaterequest 7105 return c 7106} 7107 7108// Fields allows partial responses to be retrieved. See 7109// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7110// for more information. 7111func (c *ProjectsLocationsCertificateAuthoritiesCertificatesRevokeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateAuthoritiesCertificatesRevokeCall { 7112 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7113 return c 7114} 7115 7116// Context sets the context to be used in this call's Do method. Any 7117// pending HTTP request will be aborted if the provided context is 7118// canceled. 7119func (c *ProjectsLocationsCertificateAuthoritiesCertificatesRevokeCall) Context(ctx context.Context) *ProjectsLocationsCertificateAuthoritiesCertificatesRevokeCall { 7120 c.ctx_ = ctx 7121 return c 7122} 7123 7124// Header returns an http.Header that can be modified by the caller to 7125// add HTTP headers to the request. 7126func (c *ProjectsLocationsCertificateAuthoritiesCertificatesRevokeCall) Header() http.Header { 7127 if c.header_ == nil { 7128 c.header_ = make(http.Header) 7129 } 7130 return c.header_ 7131} 7132 7133func (c *ProjectsLocationsCertificateAuthoritiesCertificatesRevokeCall) doRequest(alt string) (*http.Response, error) { 7134 reqHeaders := make(http.Header) 7135 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 7136 for k, v := range c.header_ { 7137 reqHeaders[k] = v 7138 } 7139 reqHeaders.Set("User-Agent", c.s.userAgent()) 7140 var body io.Reader = nil 7141 body, err := googleapi.WithoutDataWrapper.JSONReader(c.revokecertificaterequest) 7142 if err != nil { 7143 return nil, err 7144 } 7145 reqHeaders.Set("Content-Type", "application/json") 7146 c.urlParams_.Set("alt", alt) 7147 c.urlParams_.Set("prettyPrint", "false") 7148 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:revoke") 7149 urls += "?" + c.urlParams_.Encode() 7150 req, err := http.NewRequest("POST", urls, body) 7151 if err != nil { 7152 return nil, err 7153 } 7154 req.Header = reqHeaders 7155 googleapi.Expand(req.URL, map[string]string{ 7156 "name": c.name, 7157 }) 7158 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7159} 7160 7161// Do executes the "privateca.projects.locations.certificateAuthorities.certificates.revoke" call. 7162// Exactly one of *Certificate or error will be non-nil. Any non-2xx 7163// status code is an error. Response headers are in either 7164// *Certificate.ServerResponse.Header or (if a response was returned at 7165// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7166// to check whether the returned error was because 7167// http.StatusNotModified was returned. 7168func (c *ProjectsLocationsCertificateAuthoritiesCertificatesRevokeCall) Do(opts ...googleapi.CallOption) (*Certificate, error) { 7169 gensupport.SetOptions(c.urlParams_, opts...) 7170 res, err := c.doRequest("json") 7171 if res != nil && res.StatusCode == http.StatusNotModified { 7172 if res.Body != nil { 7173 res.Body.Close() 7174 } 7175 return nil, &googleapi.Error{ 7176 Code: res.StatusCode, 7177 Header: res.Header, 7178 } 7179 } 7180 if err != nil { 7181 return nil, err 7182 } 7183 defer googleapi.CloseBody(res) 7184 if err := googleapi.CheckResponse(res); err != nil { 7185 return nil, err 7186 } 7187 ret := &Certificate{ 7188 ServerResponse: googleapi.ServerResponse{ 7189 Header: res.Header, 7190 HTTPStatusCode: res.StatusCode, 7191 }, 7192 } 7193 target := &ret 7194 if err := gensupport.DecodeResponse(target, res); err != nil { 7195 return nil, err 7196 } 7197 return ret, nil 7198 // { 7199 // "description": "Revoke a Certificate.", 7200 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/certificateAuthorities/{certificateAuthoritiesId}/certificates/{certificatesId}:revoke", 7201 // "httpMethod": "POST", 7202 // "id": "privateca.projects.locations.certificateAuthorities.certificates.revoke", 7203 // "parameterOrder": [ 7204 // "name" 7205 // ], 7206 // "parameters": { 7207 // "name": { 7208 // "description": "Required. The resource name for this Certificate in the format `projects/*/locations/*/certificateAuthorities/*/certificates/*`.", 7209 // "location": "path", 7210 // "pattern": "^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/certificates/[^/]+$", 7211 // "required": true, 7212 // "type": "string" 7213 // } 7214 // }, 7215 // "path": "v1beta1/{+name}:revoke", 7216 // "request": { 7217 // "$ref": "RevokeCertificateRequest" 7218 // }, 7219 // "response": { 7220 // "$ref": "Certificate" 7221 // }, 7222 // "scopes": [ 7223 // "https://www.googleapis.com/auth/cloud-platform" 7224 // ] 7225 // } 7226 7227} 7228 7229// method id "privateca.projects.locations.operations.cancel": 7230 7231type ProjectsLocationsOperationsCancelCall struct { 7232 s *Service 7233 name string 7234 canceloperationrequest *CancelOperationRequest 7235 urlParams_ gensupport.URLParams 7236 ctx_ context.Context 7237 header_ http.Header 7238} 7239 7240// Cancel: Starts asynchronous cancellation on a long-running operation. 7241// The server makes a best effort to cancel the operation, but success 7242// is not guaranteed. If the server doesn't support this method, it 7243// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use 7244// Operations.GetOperation or other methods to check whether the 7245// cancellation succeeded or whether the operation completed despite 7246// cancellation. On successful cancellation, the operation is not 7247// deleted; instead, it becomes an operation with an Operation.error 7248// value with a google.rpc.Status.code of 1, corresponding to 7249// `Code.CANCELLED`. 7250func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { 7251 c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7252 c.name = name 7253 c.canceloperationrequest = canceloperationrequest 7254 return c 7255} 7256 7257// Fields allows partial responses to be retrieved. See 7258// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7259// for more information. 7260func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { 7261 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7262 return c 7263} 7264 7265// Context sets the context to be used in this call's Do method. Any 7266// pending HTTP request will be aborted if the provided context is 7267// canceled. 7268func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { 7269 c.ctx_ = ctx 7270 return c 7271} 7272 7273// Header returns an http.Header that can be modified by the caller to 7274// add HTTP headers to the request. 7275func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { 7276 if c.header_ == nil { 7277 c.header_ = make(http.Header) 7278 } 7279 return c.header_ 7280} 7281 7282func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { 7283 reqHeaders := make(http.Header) 7284 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 7285 for k, v := range c.header_ { 7286 reqHeaders[k] = v 7287 } 7288 reqHeaders.Set("User-Agent", c.s.userAgent()) 7289 var body io.Reader = nil 7290 body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) 7291 if err != nil { 7292 return nil, err 7293 } 7294 reqHeaders.Set("Content-Type", "application/json") 7295 c.urlParams_.Set("alt", alt) 7296 c.urlParams_.Set("prettyPrint", "false") 7297 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:cancel") 7298 urls += "?" + c.urlParams_.Encode() 7299 req, err := http.NewRequest("POST", urls, body) 7300 if err != nil { 7301 return nil, err 7302 } 7303 req.Header = reqHeaders 7304 googleapi.Expand(req.URL, map[string]string{ 7305 "name": c.name, 7306 }) 7307 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7308} 7309 7310// Do executes the "privateca.projects.locations.operations.cancel" call. 7311// Exactly one of *Empty or error will be non-nil. Any non-2xx status 7312// code is an error. Response headers are in either 7313// *Empty.ServerResponse.Header or (if a response was returned at all) 7314// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 7315// check whether the returned error was because http.StatusNotModified 7316// was returned. 7317func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 7318 gensupport.SetOptions(c.urlParams_, opts...) 7319 res, err := c.doRequest("json") 7320 if res != nil && res.StatusCode == http.StatusNotModified { 7321 if res.Body != nil { 7322 res.Body.Close() 7323 } 7324 return nil, &googleapi.Error{ 7325 Code: res.StatusCode, 7326 Header: res.Header, 7327 } 7328 } 7329 if err != nil { 7330 return nil, err 7331 } 7332 defer googleapi.CloseBody(res) 7333 if err := googleapi.CheckResponse(res); err != nil { 7334 return nil, err 7335 } 7336 ret := &Empty{ 7337 ServerResponse: googleapi.ServerResponse{ 7338 Header: res.Header, 7339 HTTPStatusCode: res.StatusCode, 7340 }, 7341 } 7342 target := &ret 7343 if err := gensupport.DecodeResponse(target, res); err != nil { 7344 return nil, err 7345 } 7346 return ret, nil 7347 // { 7348 // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", 7349 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", 7350 // "httpMethod": "POST", 7351 // "id": "privateca.projects.locations.operations.cancel", 7352 // "parameterOrder": [ 7353 // "name" 7354 // ], 7355 // "parameters": { 7356 // "name": { 7357 // "description": "The name of the operation resource to be cancelled.", 7358 // "location": "path", 7359 // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", 7360 // "required": true, 7361 // "type": "string" 7362 // } 7363 // }, 7364 // "path": "v1beta1/{+name}:cancel", 7365 // "request": { 7366 // "$ref": "CancelOperationRequest" 7367 // }, 7368 // "response": { 7369 // "$ref": "Empty" 7370 // }, 7371 // "scopes": [ 7372 // "https://www.googleapis.com/auth/cloud-platform" 7373 // ] 7374 // } 7375 7376} 7377 7378// method id "privateca.projects.locations.operations.delete": 7379 7380type ProjectsLocationsOperationsDeleteCall struct { 7381 s *Service 7382 name string 7383 urlParams_ gensupport.URLParams 7384 ctx_ context.Context 7385 header_ http.Header 7386} 7387 7388// Delete: Deletes a long-running operation. This method indicates that 7389// the client is no longer interested in the operation result. It does 7390// not cancel the operation. If the server doesn't support this method, 7391// it returns `google.rpc.Code.UNIMPLEMENTED`. 7392func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { 7393 c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7394 c.name = name 7395 return c 7396} 7397 7398// Fields allows partial responses to be retrieved. See 7399// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7400// for more information. 7401func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { 7402 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7403 return c 7404} 7405 7406// Context sets the context to be used in this call's Do method. Any 7407// pending HTTP request will be aborted if the provided context is 7408// canceled. 7409func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { 7410 c.ctx_ = ctx 7411 return c 7412} 7413 7414// Header returns an http.Header that can be modified by the caller to 7415// add HTTP headers to the request. 7416func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { 7417 if c.header_ == nil { 7418 c.header_ = make(http.Header) 7419 } 7420 return c.header_ 7421} 7422 7423func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { 7424 reqHeaders := make(http.Header) 7425 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 7426 for k, v := range c.header_ { 7427 reqHeaders[k] = v 7428 } 7429 reqHeaders.Set("User-Agent", c.s.userAgent()) 7430 var body io.Reader = nil 7431 c.urlParams_.Set("alt", alt) 7432 c.urlParams_.Set("prettyPrint", "false") 7433 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 7434 urls += "?" + c.urlParams_.Encode() 7435 req, err := http.NewRequest("DELETE", urls, body) 7436 if err != nil { 7437 return nil, err 7438 } 7439 req.Header = reqHeaders 7440 googleapi.Expand(req.URL, map[string]string{ 7441 "name": c.name, 7442 }) 7443 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7444} 7445 7446// Do executes the "privateca.projects.locations.operations.delete" call. 7447// Exactly one of *Empty or error will be non-nil. Any non-2xx status 7448// code is an error. Response headers are in either 7449// *Empty.ServerResponse.Header or (if a response was returned at all) 7450// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 7451// check whether the returned error was because http.StatusNotModified 7452// was returned. 7453func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 7454 gensupport.SetOptions(c.urlParams_, opts...) 7455 res, err := c.doRequest("json") 7456 if res != nil && res.StatusCode == http.StatusNotModified { 7457 if res.Body != nil { 7458 res.Body.Close() 7459 } 7460 return nil, &googleapi.Error{ 7461 Code: res.StatusCode, 7462 Header: res.Header, 7463 } 7464 } 7465 if err != nil { 7466 return nil, err 7467 } 7468 defer googleapi.CloseBody(res) 7469 if err := googleapi.CheckResponse(res); err != nil { 7470 return nil, err 7471 } 7472 ret := &Empty{ 7473 ServerResponse: googleapi.ServerResponse{ 7474 Header: res.Header, 7475 HTTPStatusCode: res.StatusCode, 7476 }, 7477 } 7478 target := &ret 7479 if err := gensupport.DecodeResponse(target, res); err != nil { 7480 return nil, err 7481 } 7482 return ret, nil 7483 // { 7484 // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", 7485 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", 7486 // "httpMethod": "DELETE", 7487 // "id": "privateca.projects.locations.operations.delete", 7488 // "parameterOrder": [ 7489 // "name" 7490 // ], 7491 // "parameters": { 7492 // "name": { 7493 // "description": "The name of the operation resource to be deleted.", 7494 // "location": "path", 7495 // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", 7496 // "required": true, 7497 // "type": "string" 7498 // } 7499 // }, 7500 // "path": "v1beta1/{+name}", 7501 // "response": { 7502 // "$ref": "Empty" 7503 // }, 7504 // "scopes": [ 7505 // "https://www.googleapis.com/auth/cloud-platform" 7506 // ] 7507 // } 7508 7509} 7510 7511// method id "privateca.projects.locations.operations.get": 7512 7513type ProjectsLocationsOperationsGetCall struct { 7514 s *Service 7515 name string 7516 urlParams_ gensupport.URLParams 7517 ifNoneMatch_ string 7518 ctx_ context.Context 7519 header_ http.Header 7520} 7521 7522// Get: Gets the latest state of a long-running operation. Clients can 7523// use this method to poll the operation result at intervals as 7524// recommended by the API service. 7525func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { 7526 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7527 c.name = name 7528 return c 7529} 7530 7531// Fields allows partial responses to be retrieved. See 7532// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7533// for more information. 7534func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { 7535 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7536 return c 7537} 7538 7539// IfNoneMatch sets the optional parameter which makes the operation 7540// fail if the object's ETag matches the given value. This is useful for 7541// getting updates only after the object has changed since the last 7542// request. Use googleapi.IsNotModified to check whether the response 7543// error from Do is the result of In-None-Match. 7544func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { 7545 c.ifNoneMatch_ = entityTag 7546 return c 7547} 7548 7549// Context sets the context to be used in this call's Do method. Any 7550// pending HTTP request will be aborted if the provided context is 7551// canceled. 7552func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { 7553 c.ctx_ = ctx 7554 return c 7555} 7556 7557// Header returns an http.Header that can be modified by the caller to 7558// add HTTP headers to the request. 7559func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { 7560 if c.header_ == nil { 7561 c.header_ = make(http.Header) 7562 } 7563 return c.header_ 7564} 7565 7566func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { 7567 reqHeaders := make(http.Header) 7568 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 7569 for k, v := range c.header_ { 7570 reqHeaders[k] = v 7571 } 7572 reqHeaders.Set("User-Agent", c.s.userAgent()) 7573 if c.ifNoneMatch_ != "" { 7574 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7575 } 7576 var body io.Reader = nil 7577 c.urlParams_.Set("alt", alt) 7578 c.urlParams_.Set("prettyPrint", "false") 7579 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 7580 urls += "?" + c.urlParams_.Encode() 7581 req, err := http.NewRequest("GET", urls, body) 7582 if err != nil { 7583 return nil, err 7584 } 7585 req.Header = reqHeaders 7586 googleapi.Expand(req.URL, map[string]string{ 7587 "name": c.name, 7588 }) 7589 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7590} 7591 7592// Do executes the "privateca.projects.locations.operations.get" call. 7593// Exactly one of *Operation or error will be non-nil. Any non-2xx 7594// status code is an error. Response headers are in either 7595// *Operation.ServerResponse.Header or (if a response was returned at 7596// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7597// to check whether the returned error was because 7598// http.StatusNotModified was returned. 7599func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 7600 gensupport.SetOptions(c.urlParams_, opts...) 7601 res, err := c.doRequest("json") 7602 if res != nil && res.StatusCode == http.StatusNotModified { 7603 if res.Body != nil { 7604 res.Body.Close() 7605 } 7606 return nil, &googleapi.Error{ 7607 Code: res.StatusCode, 7608 Header: res.Header, 7609 } 7610 } 7611 if err != nil { 7612 return nil, err 7613 } 7614 defer googleapi.CloseBody(res) 7615 if err := googleapi.CheckResponse(res); err != nil { 7616 return nil, err 7617 } 7618 ret := &Operation{ 7619 ServerResponse: googleapi.ServerResponse{ 7620 Header: res.Header, 7621 HTTPStatusCode: res.StatusCode, 7622 }, 7623 } 7624 target := &ret 7625 if err := gensupport.DecodeResponse(target, res); err != nil { 7626 return nil, err 7627 } 7628 return ret, nil 7629 // { 7630 // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", 7631 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", 7632 // "httpMethod": "GET", 7633 // "id": "privateca.projects.locations.operations.get", 7634 // "parameterOrder": [ 7635 // "name" 7636 // ], 7637 // "parameters": { 7638 // "name": { 7639 // "description": "The name of the operation resource.", 7640 // "location": "path", 7641 // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", 7642 // "required": true, 7643 // "type": "string" 7644 // } 7645 // }, 7646 // "path": "v1beta1/{+name}", 7647 // "response": { 7648 // "$ref": "Operation" 7649 // }, 7650 // "scopes": [ 7651 // "https://www.googleapis.com/auth/cloud-platform" 7652 // ] 7653 // } 7654 7655} 7656 7657// method id "privateca.projects.locations.operations.list": 7658 7659type ProjectsLocationsOperationsListCall struct { 7660 s *Service 7661 name string 7662 urlParams_ gensupport.URLParams 7663 ifNoneMatch_ string 7664 ctx_ context.Context 7665 header_ http.Header 7666} 7667 7668// List: Lists operations that match the specified filter in the 7669// request. If the server doesn't support this method, it returns 7670// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to 7671// override the binding to use different resource name schemes, such as 7672// `users/*/operations`. To override the binding, API services can add a 7673// binding such as "/v1/{name=users/*}/operations" to their service 7674// configuration. For backwards compatibility, the default name includes 7675// the operations collection id, however overriding users must ensure 7676// the name binding is the parent resource, without the operations 7677// collection id. 7678func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { 7679 c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7680 c.name = name 7681 return c 7682} 7683 7684// Filter sets the optional parameter "filter": The standard list 7685// filter. 7686func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { 7687 c.urlParams_.Set("filter", filter) 7688 return c 7689} 7690 7691// PageSize sets the optional parameter "pageSize": The standard list 7692// page size. 7693func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { 7694 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 7695 return c 7696} 7697 7698// PageToken sets the optional parameter "pageToken": The standard list 7699// page token. 7700func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { 7701 c.urlParams_.Set("pageToken", pageToken) 7702 return c 7703} 7704 7705// Fields allows partial responses to be retrieved. See 7706// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7707// for more information. 7708func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { 7709 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7710 return c 7711} 7712 7713// IfNoneMatch sets the optional parameter which makes the operation 7714// fail if the object's ETag matches the given value. This is useful for 7715// getting updates only after the object has changed since the last 7716// request. Use googleapi.IsNotModified to check whether the response 7717// error from Do is the result of In-None-Match. 7718func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { 7719 c.ifNoneMatch_ = entityTag 7720 return c 7721} 7722 7723// Context sets the context to be used in this call's Do method. Any 7724// pending HTTP request will be aborted if the provided context is 7725// canceled. 7726func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { 7727 c.ctx_ = ctx 7728 return c 7729} 7730 7731// Header returns an http.Header that can be modified by the caller to 7732// add HTTP headers to the request. 7733func (c *ProjectsLocationsOperationsListCall) Header() http.Header { 7734 if c.header_ == nil { 7735 c.header_ = make(http.Header) 7736 } 7737 return c.header_ 7738} 7739 7740func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { 7741 reqHeaders := make(http.Header) 7742 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 7743 for k, v := range c.header_ { 7744 reqHeaders[k] = v 7745 } 7746 reqHeaders.Set("User-Agent", c.s.userAgent()) 7747 if c.ifNoneMatch_ != "" { 7748 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7749 } 7750 var body io.Reader = nil 7751 c.urlParams_.Set("alt", alt) 7752 c.urlParams_.Set("prettyPrint", "false") 7753 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/operations") 7754 urls += "?" + c.urlParams_.Encode() 7755 req, err := http.NewRequest("GET", urls, body) 7756 if err != nil { 7757 return nil, err 7758 } 7759 req.Header = reqHeaders 7760 googleapi.Expand(req.URL, map[string]string{ 7761 "name": c.name, 7762 }) 7763 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7764} 7765 7766// Do executes the "privateca.projects.locations.operations.list" call. 7767// Exactly one of *ListOperationsResponse or error will be non-nil. Any 7768// non-2xx status code is an error. Response headers are in either 7769// *ListOperationsResponse.ServerResponse.Header or (if a response was 7770// returned at all) in error.(*googleapi.Error).Header. Use 7771// googleapi.IsNotModified to check whether the returned error was 7772// because http.StatusNotModified was returned. 7773func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { 7774 gensupport.SetOptions(c.urlParams_, opts...) 7775 res, err := c.doRequest("json") 7776 if res != nil && res.StatusCode == http.StatusNotModified { 7777 if res.Body != nil { 7778 res.Body.Close() 7779 } 7780 return nil, &googleapi.Error{ 7781 Code: res.StatusCode, 7782 Header: res.Header, 7783 } 7784 } 7785 if err != nil { 7786 return nil, err 7787 } 7788 defer googleapi.CloseBody(res) 7789 if err := googleapi.CheckResponse(res); err != nil { 7790 return nil, err 7791 } 7792 ret := &ListOperationsResponse{ 7793 ServerResponse: googleapi.ServerResponse{ 7794 Header: res.Header, 7795 HTTPStatusCode: res.StatusCode, 7796 }, 7797 } 7798 target := &ret 7799 if err := gensupport.DecodeResponse(target, res); err != nil { 7800 return nil, err 7801 } 7802 return ret, nil 7803 // { 7804 // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", 7805 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations", 7806 // "httpMethod": "GET", 7807 // "id": "privateca.projects.locations.operations.list", 7808 // "parameterOrder": [ 7809 // "name" 7810 // ], 7811 // "parameters": { 7812 // "filter": { 7813 // "description": "The standard list filter.", 7814 // "location": "query", 7815 // "type": "string" 7816 // }, 7817 // "name": { 7818 // "description": "The name of the operation's parent resource.", 7819 // "location": "path", 7820 // "pattern": "^projects/[^/]+/locations/[^/]+$", 7821 // "required": true, 7822 // "type": "string" 7823 // }, 7824 // "pageSize": { 7825 // "description": "The standard list page size.", 7826 // "format": "int32", 7827 // "location": "query", 7828 // "type": "integer" 7829 // }, 7830 // "pageToken": { 7831 // "description": "The standard list page token.", 7832 // "location": "query", 7833 // "type": "string" 7834 // } 7835 // }, 7836 // "path": "v1beta1/{+name}/operations", 7837 // "response": { 7838 // "$ref": "ListOperationsResponse" 7839 // }, 7840 // "scopes": [ 7841 // "https://www.googleapis.com/auth/cloud-platform" 7842 // ] 7843 // } 7844 7845} 7846 7847// Pages invokes f for each page of results. 7848// A non-nil error returned from f will halt the iteration. 7849// The provided context supersedes any context provided to the Context method. 7850func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { 7851 c.ctx_ = ctx 7852 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 7853 for { 7854 x, err := c.Do() 7855 if err != nil { 7856 return err 7857 } 7858 if err := f(x); err != nil { 7859 return err 7860 } 7861 if x.NextPageToken == "" { 7862 return nil 7863 } 7864 c.PageToken(x.NextPageToken) 7865 } 7866} 7867 7868// method id "privateca.projects.locations.reusableConfigs.get": 7869 7870type ProjectsLocationsReusableConfigsGetCall struct { 7871 s *Service 7872 name string 7873 urlParams_ gensupport.URLParams 7874 ifNoneMatch_ string 7875 ctx_ context.Context 7876 header_ http.Header 7877} 7878 7879// Get: Returns a ReusableConfig. 7880func (r *ProjectsLocationsReusableConfigsService) Get(name string) *ProjectsLocationsReusableConfigsGetCall { 7881 c := &ProjectsLocationsReusableConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7882 c.name = name 7883 return c 7884} 7885 7886// Fields allows partial responses to be retrieved. See 7887// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7888// for more information. 7889func (c *ProjectsLocationsReusableConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsReusableConfigsGetCall { 7890 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7891 return c 7892} 7893 7894// IfNoneMatch sets the optional parameter which makes the operation 7895// fail if the object's ETag matches the given value. This is useful for 7896// getting updates only after the object has changed since the last 7897// request. Use googleapi.IsNotModified to check whether the response 7898// error from Do is the result of In-None-Match. 7899func (c *ProjectsLocationsReusableConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsReusableConfigsGetCall { 7900 c.ifNoneMatch_ = entityTag 7901 return c 7902} 7903 7904// Context sets the context to be used in this call's Do method. Any 7905// pending HTTP request will be aborted if the provided context is 7906// canceled. 7907func (c *ProjectsLocationsReusableConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsReusableConfigsGetCall { 7908 c.ctx_ = ctx 7909 return c 7910} 7911 7912// Header returns an http.Header that can be modified by the caller to 7913// add HTTP headers to the request. 7914func (c *ProjectsLocationsReusableConfigsGetCall) Header() http.Header { 7915 if c.header_ == nil { 7916 c.header_ = make(http.Header) 7917 } 7918 return c.header_ 7919} 7920 7921func (c *ProjectsLocationsReusableConfigsGetCall) doRequest(alt string) (*http.Response, error) { 7922 reqHeaders := make(http.Header) 7923 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 7924 for k, v := range c.header_ { 7925 reqHeaders[k] = v 7926 } 7927 reqHeaders.Set("User-Agent", c.s.userAgent()) 7928 if c.ifNoneMatch_ != "" { 7929 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7930 } 7931 var body io.Reader = nil 7932 c.urlParams_.Set("alt", alt) 7933 c.urlParams_.Set("prettyPrint", "false") 7934 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 7935 urls += "?" + c.urlParams_.Encode() 7936 req, err := http.NewRequest("GET", urls, body) 7937 if err != nil { 7938 return nil, err 7939 } 7940 req.Header = reqHeaders 7941 googleapi.Expand(req.URL, map[string]string{ 7942 "name": c.name, 7943 }) 7944 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7945} 7946 7947// Do executes the "privateca.projects.locations.reusableConfigs.get" call. 7948// Exactly one of *ReusableConfig or error will be non-nil. Any non-2xx 7949// status code is an error. Response headers are in either 7950// *ReusableConfig.ServerResponse.Header or (if a response was returned 7951// at all) in error.(*googleapi.Error).Header. Use 7952// googleapi.IsNotModified to check whether the returned error was 7953// because http.StatusNotModified was returned. 7954func (c *ProjectsLocationsReusableConfigsGetCall) Do(opts ...googleapi.CallOption) (*ReusableConfig, error) { 7955 gensupport.SetOptions(c.urlParams_, opts...) 7956 res, err := c.doRequest("json") 7957 if res != nil && res.StatusCode == http.StatusNotModified { 7958 if res.Body != nil { 7959 res.Body.Close() 7960 } 7961 return nil, &googleapi.Error{ 7962 Code: res.StatusCode, 7963 Header: res.Header, 7964 } 7965 } 7966 if err != nil { 7967 return nil, err 7968 } 7969 defer googleapi.CloseBody(res) 7970 if err := googleapi.CheckResponse(res); err != nil { 7971 return nil, err 7972 } 7973 ret := &ReusableConfig{ 7974 ServerResponse: googleapi.ServerResponse{ 7975 Header: res.Header, 7976 HTTPStatusCode: res.StatusCode, 7977 }, 7978 } 7979 target := &ret 7980 if err := gensupport.DecodeResponse(target, res); err != nil { 7981 return nil, err 7982 } 7983 return ret, nil 7984 // { 7985 // "description": "Returns a ReusableConfig.", 7986 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/reusableConfigs/{reusableConfigsId}", 7987 // "httpMethod": "GET", 7988 // "id": "privateca.projects.locations.reusableConfigs.get", 7989 // "parameterOrder": [ 7990 // "name" 7991 // ], 7992 // "parameters": { 7993 // "name": { 7994 // "description": "Required. The name of the ReusableConfigs to get.", 7995 // "location": "path", 7996 // "pattern": "^projects/[^/]+/locations/[^/]+/reusableConfigs/[^/]+$", 7997 // "required": true, 7998 // "type": "string" 7999 // } 8000 // }, 8001 // "path": "v1beta1/{+name}", 8002 // "response": { 8003 // "$ref": "ReusableConfig" 8004 // }, 8005 // "scopes": [ 8006 // "https://www.googleapis.com/auth/cloud-platform" 8007 // ] 8008 // } 8009 8010} 8011 8012// method id "privateca.projects.locations.reusableConfigs.getIamPolicy": 8013 8014type ProjectsLocationsReusableConfigsGetIamPolicyCall struct { 8015 s *Service 8016 resource string 8017 urlParams_ gensupport.URLParams 8018 ifNoneMatch_ string 8019 ctx_ context.Context 8020 header_ http.Header 8021} 8022 8023// GetIamPolicy: Gets the access control policy for a resource. Returns 8024// an empty policy if the resource exists and does not have a policy 8025// set. 8026func (r *ProjectsLocationsReusableConfigsService) GetIamPolicy(resource string) *ProjectsLocationsReusableConfigsGetIamPolicyCall { 8027 c := &ProjectsLocationsReusableConfigsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8028 c.resource = resource 8029 return c 8030} 8031 8032// OptionsRequestedPolicyVersion sets the optional parameter 8033// "options.requestedPolicyVersion": The policy format version to be 8034// returned. Valid values are 0, 1, and 3. Requests specifying an 8035// invalid value will be rejected. Requests for policies with any 8036// conditional bindings must specify version 3. Policies without any 8037// conditional bindings may specify any valid value or leave the field 8038// unset. To learn which resources support conditions in their IAM 8039// policies, see the [IAM 8040// documentation](https://cloud.google.com/iam/help/conditions/resource-p 8041// olicies). 8042func (c *ProjectsLocationsReusableConfigsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsReusableConfigsGetIamPolicyCall { 8043 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) 8044 return c 8045} 8046 8047// Fields allows partial responses to be retrieved. See 8048// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8049// for more information. 8050func (c *ProjectsLocationsReusableConfigsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsReusableConfigsGetIamPolicyCall { 8051 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8052 return c 8053} 8054 8055// IfNoneMatch sets the optional parameter which makes the operation 8056// fail if the object's ETag matches the given value. This is useful for 8057// getting updates only after the object has changed since the last 8058// request. Use googleapi.IsNotModified to check whether the response 8059// error from Do is the result of In-None-Match. 8060func (c *ProjectsLocationsReusableConfigsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsReusableConfigsGetIamPolicyCall { 8061 c.ifNoneMatch_ = entityTag 8062 return c 8063} 8064 8065// Context sets the context to be used in this call's Do method. Any 8066// pending HTTP request will be aborted if the provided context is 8067// canceled. 8068func (c *ProjectsLocationsReusableConfigsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsReusableConfigsGetIamPolicyCall { 8069 c.ctx_ = ctx 8070 return c 8071} 8072 8073// Header returns an http.Header that can be modified by the caller to 8074// add HTTP headers to the request. 8075func (c *ProjectsLocationsReusableConfigsGetIamPolicyCall) Header() http.Header { 8076 if c.header_ == nil { 8077 c.header_ = make(http.Header) 8078 } 8079 return c.header_ 8080} 8081 8082func (c *ProjectsLocationsReusableConfigsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 8083 reqHeaders := make(http.Header) 8084 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 8085 for k, v := range c.header_ { 8086 reqHeaders[k] = v 8087 } 8088 reqHeaders.Set("User-Agent", c.s.userAgent()) 8089 if c.ifNoneMatch_ != "" { 8090 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8091 } 8092 var body io.Reader = nil 8093 c.urlParams_.Set("alt", alt) 8094 c.urlParams_.Set("prettyPrint", "false") 8095 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy") 8096 urls += "?" + c.urlParams_.Encode() 8097 req, err := http.NewRequest("GET", urls, body) 8098 if err != nil { 8099 return nil, err 8100 } 8101 req.Header = reqHeaders 8102 googleapi.Expand(req.URL, map[string]string{ 8103 "resource": c.resource, 8104 }) 8105 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8106} 8107 8108// Do executes the "privateca.projects.locations.reusableConfigs.getIamPolicy" call. 8109// Exactly one of *Policy or error will be non-nil. Any non-2xx status 8110// code is an error. Response headers are in either 8111// *Policy.ServerResponse.Header or (if a response was returned at all) 8112// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 8113// check whether the returned error was because http.StatusNotModified 8114// was returned. 8115func (c *ProjectsLocationsReusableConfigsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 8116 gensupport.SetOptions(c.urlParams_, opts...) 8117 res, err := c.doRequest("json") 8118 if res != nil && res.StatusCode == http.StatusNotModified { 8119 if res.Body != nil { 8120 res.Body.Close() 8121 } 8122 return nil, &googleapi.Error{ 8123 Code: res.StatusCode, 8124 Header: res.Header, 8125 } 8126 } 8127 if err != nil { 8128 return nil, err 8129 } 8130 defer googleapi.CloseBody(res) 8131 if err := googleapi.CheckResponse(res); err != nil { 8132 return nil, err 8133 } 8134 ret := &Policy{ 8135 ServerResponse: googleapi.ServerResponse{ 8136 Header: res.Header, 8137 HTTPStatusCode: res.StatusCode, 8138 }, 8139 } 8140 target := &ret 8141 if err := gensupport.DecodeResponse(target, res); err != nil { 8142 return nil, err 8143 } 8144 return ret, nil 8145 // { 8146 // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", 8147 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/reusableConfigs/{reusableConfigsId}:getIamPolicy", 8148 // "httpMethod": "GET", 8149 // "id": "privateca.projects.locations.reusableConfigs.getIamPolicy", 8150 // "parameterOrder": [ 8151 // "resource" 8152 // ], 8153 // "parameters": { 8154 // "options.requestedPolicyVersion": { 8155 // "description": "Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", 8156 // "format": "int32", 8157 // "location": "query", 8158 // "type": "integer" 8159 // }, 8160 // "resource": { 8161 // "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", 8162 // "location": "path", 8163 // "pattern": "^projects/[^/]+/locations/[^/]+/reusableConfigs/[^/]+$", 8164 // "required": true, 8165 // "type": "string" 8166 // } 8167 // }, 8168 // "path": "v1beta1/{+resource}:getIamPolicy", 8169 // "response": { 8170 // "$ref": "Policy" 8171 // }, 8172 // "scopes": [ 8173 // "https://www.googleapis.com/auth/cloud-platform" 8174 // ] 8175 // } 8176 8177} 8178 8179// method id "privateca.projects.locations.reusableConfigs.list": 8180 8181type ProjectsLocationsReusableConfigsListCall struct { 8182 s *Service 8183 parent string 8184 urlParams_ gensupport.URLParams 8185 ifNoneMatch_ string 8186 ctx_ context.Context 8187 header_ http.Header 8188} 8189 8190// List: Lists ReusableConfigs. 8191func (r *ProjectsLocationsReusableConfigsService) List(parent string) *ProjectsLocationsReusableConfigsListCall { 8192 c := &ProjectsLocationsReusableConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8193 c.parent = parent 8194 return c 8195} 8196 8197// Filter sets the optional parameter "filter": Only include resources 8198// that match the filter in the response. 8199func (c *ProjectsLocationsReusableConfigsListCall) Filter(filter string) *ProjectsLocationsReusableConfigsListCall { 8200 c.urlParams_.Set("filter", filter) 8201 return c 8202} 8203 8204// OrderBy sets the optional parameter "orderBy": Specify how the 8205// results should be sorted. 8206func (c *ProjectsLocationsReusableConfigsListCall) OrderBy(orderBy string) *ProjectsLocationsReusableConfigsListCall { 8207 c.urlParams_.Set("orderBy", orderBy) 8208 return c 8209} 8210 8211// PageSize sets the optional parameter "pageSize": Limit on the number 8212// of ReusableConfigs to include in the response. Further 8213// ReusableConfigs can subsequently be obtained by including the 8214// ListReusableConfigsResponse.next_page_token in a subsequent request. 8215// If unspecified, the server will pick an appropriate default. 8216func (c *ProjectsLocationsReusableConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsReusableConfigsListCall { 8217 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 8218 return c 8219} 8220 8221// PageToken sets the optional parameter "pageToken": Pagination token, 8222// returned earlier via ListReusableConfigsResponse.next_page_token. 8223func (c *ProjectsLocationsReusableConfigsListCall) PageToken(pageToken string) *ProjectsLocationsReusableConfigsListCall { 8224 c.urlParams_.Set("pageToken", pageToken) 8225 return c 8226} 8227 8228// Fields allows partial responses to be retrieved. See 8229// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8230// for more information. 8231func (c *ProjectsLocationsReusableConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsReusableConfigsListCall { 8232 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8233 return c 8234} 8235 8236// IfNoneMatch sets the optional parameter which makes the operation 8237// fail if the object's ETag matches the given value. This is useful for 8238// getting updates only after the object has changed since the last 8239// request. Use googleapi.IsNotModified to check whether the response 8240// error from Do is the result of In-None-Match. 8241func (c *ProjectsLocationsReusableConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsReusableConfigsListCall { 8242 c.ifNoneMatch_ = entityTag 8243 return c 8244} 8245 8246// Context sets the context to be used in this call's Do method. Any 8247// pending HTTP request will be aborted if the provided context is 8248// canceled. 8249func (c *ProjectsLocationsReusableConfigsListCall) Context(ctx context.Context) *ProjectsLocationsReusableConfigsListCall { 8250 c.ctx_ = ctx 8251 return c 8252} 8253 8254// Header returns an http.Header that can be modified by the caller to 8255// add HTTP headers to the request. 8256func (c *ProjectsLocationsReusableConfigsListCall) Header() http.Header { 8257 if c.header_ == nil { 8258 c.header_ = make(http.Header) 8259 } 8260 return c.header_ 8261} 8262 8263func (c *ProjectsLocationsReusableConfigsListCall) doRequest(alt string) (*http.Response, error) { 8264 reqHeaders := make(http.Header) 8265 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 8266 for k, v := range c.header_ { 8267 reqHeaders[k] = v 8268 } 8269 reqHeaders.Set("User-Agent", c.s.userAgent()) 8270 if c.ifNoneMatch_ != "" { 8271 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8272 } 8273 var body io.Reader = nil 8274 c.urlParams_.Set("alt", alt) 8275 c.urlParams_.Set("prettyPrint", "false") 8276 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/reusableConfigs") 8277 urls += "?" + c.urlParams_.Encode() 8278 req, err := http.NewRequest("GET", urls, body) 8279 if err != nil { 8280 return nil, err 8281 } 8282 req.Header = reqHeaders 8283 googleapi.Expand(req.URL, map[string]string{ 8284 "parent": c.parent, 8285 }) 8286 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8287} 8288 8289// Do executes the "privateca.projects.locations.reusableConfigs.list" call. 8290// Exactly one of *ListReusableConfigsResponse or error will be non-nil. 8291// Any non-2xx status code is an error. Response headers are in either 8292// *ListReusableConfigsResponse.ServerResponse.Header or (if a response 8293// was returned at all) in error.(*googleapi.Error).Header. Use 8294// googleapi.IsNotModified to check whether the returned error was 8295// because http.StatusNotModified was returned. 8296func (c *ProjectsLocationsReusableConfigsListCall) Do(opts ...googleapi.CallOption) (*ListReusableConfigsResponse, error) { 8297 gensupport.SetOptions(c.urlParams_, opts...) 8298 res, err := c.doRequest("json") 8299 if res != nil && res.StatusCode == http.StatusNotModified { 8300 if res.Body != nil { 8301 res.Body.Close() 8302 } 8303 return nil, &googleapi.Error{ 8304 Code: res.StatusCode, 8305 Header: res.Header, 8306 } 8307 } 8308 if err != nil { 8309 return nil, err 8310 } 8311 defer googleapi.CloseBody(res) 8312 if err := googleapi.CheckResponse(res); err != nil { 8313 return nil, err 8314 } 8315 ret := &ListReusableConfigsResponse{ 8316 ServerResponse: googleapi.ServerResponse{ 8317 Header: res.Header, 8318 HTTPStatusCode: res.StatusCode, 8319 }, 8320 } 8321 target := &ret 8322 if err := gensupport.DecodeResponse(target, res); err != nil { 8323 return nil, err 8324 } 8325 return ret, nil 8326 // { 8327 // "description": "Lists ReusableConfigs.", 8328 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/reusableConfigs", 8329 // "httpMethod": "GET", 8330 // "id": "privateca.projects.locations.reusableConfigs.list", 8331 // "parameterOrder": [ 8332 // "parent" 8333 // ], 8334 // "parameters": { 8335 // "filter": { 8336 // "description": "Optional. Only include resources that match the filter in the response.", 8337 // "location": "query", 8338 // "type": "string" 8339 // }, 8340 // "orderBy": { 8341 // "description": "Optional. Specify how the results should be sorted.", 8342 // "location": "query", 8343 // "type": "string" 8344 // }, 8345 // "pageSize": { 8346 // "description": "Optional. Limit on the number of ReusableConfigs to include in the response. Further ReusableConfigs can subsequently be obtained by including the ListReusableConfigsResponse.next_page_token in a subsequent request. If unspecified, the server will pick an appropriate default.", 8347 // "format": "int32", 8348 // "location": "query", 8349 // "type": "integer" 8350 // }, 8351 // "pageToken": { 8352 // "description": "Optional. Pagination token, returned earlier via ListReusableConfigsResponse.next_page_token.", 8353 // "location": "query", 8354 // "type": "string" 8355 // }, 8356 // "parent": { 8357 // "description": "Required. The resource name of the location associated with the ReusableConfigs, in the format `projects/*/locations/*`.", 8358 // "location": "path", 8359 // "pattern": "^projects/[^/]+/locations/[^/]+$", 8360 // "required": true, 8361 // "type": "string" 8362 // } 8363 // }, 8364 // "path": "v1beta1/{+parent}/reusableConfigs", 8365 // "response": { 8366 // "$ref": "ListReusableConfigsResponse" 8367 // }, 8368 // "scopes": [ 8369 // "https://www.googleapis.com/auth/cloud-platform" 8370 // ] 8371 // } 8372 8373} 8374 8375// Pages invokes f for each page of results. 8376// A non-nil error returned from f will halt the iteration. 8377// The provided context supersedes any context provided to the Context method. 8378func (c *ProjectsLocationsReusableConfigsListCall) Pages(ctx context.Context, f func(*ListReusableConfigsResponse) error) error { 8379 c.ctx_ = ctx 8380 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 8381 for { 8382 x, err := c.Do() 8383 if err != nil { 8384 return err 8385 } 8386 if err := f(x); err != nil { 8387 return err 8388 } 8389 if x.NextPageToken == "" { 8390 return nil 8391 } 8392 c.PageToken(x.NextPageToken) 8393 } 8394} 8395 8396// method id "privateca.projects.locations.reusableConfigs.setIamPolicy": 8397 8398type ProjectsLocationsReusableConfigsSetIamPolicyCall struct { 8399 s *Service 8400 resource string 8401 setiampolicyrequest *SetIamPolicyRequest 8402 urlParams_ gensupport.URLParams 8403 ctx_ context.Context 8404 header_ http.Header 8405} 8406 8407// SetIamPolicy: Sets the access control policy on the specified 8408// resource. Replaces any existing policy. Can return `NOT_FOUND`, 8409// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. 8410func (r *ProjectsLocationsReusableConfigsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsReusableConfigsSetIamPolicyCall { 8411 c := &ProjectsLocationsReusableConfigsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8412 c.resource = resource 8413 c.setiampolicyrequest = setiampolicyrequest 8414 return c 8415} 8416 8417// Fields allows partial responses to be retrieved. See 8418// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8419// for more information. 8420func (c *ProjectsLocationsReusableConfigsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsReusableConfigsSetIamPolicyCall { 8421 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8422 return c 8423} 8424 8425// Context sets the context to be used in this call's Do method. Any 8426// pending HTTP request will be aborted if the provided context is 8427// canceled. 8428func (c *ProjectsLocationsReusableConfigsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsReusableConfigsSetIamPolicyCall { 8429 c.ctx_ = ctx 8430 return c 8431} 8432 8433// Header returns an http.Header that can be modified by the caller to 8434// add HTTP headers to the request. 8435func (c *ProjectsLocationsReusableConfigsSetIamPolicyCall) Header() http.Header { 8436 if c.header_ == nil { 8437 c.header_ = make(http.Header) 8438 } 8439 return c.header_ 8440} 8441 8442func (c *ProjectsLocationsReusableConfigsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 8443 reqHeaders := make(http.Header) 8444 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 8445 for k, v := range c.header_ { 8446 reqHeaders[k] = v 8447 } 8448 reqHeaders.Set("User-Agent", c.s.userAgent()) 8449 var body io.Reader = nil 8450 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 8451 if err != nil { 8452 return nil, err 8453 } 8454 reqHeaders.Set("Content-Type", "application/json") 8455 c.urlParams_.Set("alt", alt) 8456 c.urlParams_.Set("prettyPrint", "false") 8457 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy") 8458 urls += "?" + c.urlParams_.Encode() 8459 req, err := http.NewRequest("POST", urls, body) 8460 if err != nil { 8461 return nil, err 8462 } 8463 req.Header = reqHeaders 8464 googleapi.Expand(req.URL, map[string]string{ 8465 "resource": c.resource, 8466 }) 8467 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8468} 8469 8470// Do executes the "privateca.projects.locations.reusableConfigs.setIamPolicy" call. 8471// Exactly one of *Policy or error will be non-nil. Any non-2xx status 8472// code is an error. Response headers are in either 8473// *Policy.ServerResponse.Header or (if a response was returned at all) 8474// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 8475// check whether the returned error was because http.StatusNotModified 8476// was returned. 8477func (c *ProjectsLocationsReusableConfigsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 8478 gensupport.SetOptions(c.urlParams_, opts...) 8479 res, err := c.doRequest("json") 8480 if res != nil && res.StatusCode == http.StatusNotModified { 8481 if res.Body != nil { 8482 res.Body.Close() 8483 } 8484 return nil, &googleapi.Error{ 8485 Code: res.StatusCode, 8486 Header: res.Header, 8487 } 8488 } 8489 if err != nil { 8490 return nil, err 8491 } 8492 defer googleapi.CloseBody(res) 8493 if err := googleapi.CheckResponse(res); err != nil { 8494 return nil, err 8495 } 8496 ret := &Policy{ 8497 ServerResponse: googleapi.ServerResponse{ 8498 Header: res.Header, 8499 HTTPStatusCode: res.StatusCode, 8500 }, 8501 } 8502 target := &ret 8503 if err := gensupport.DecodeResponse(target, res); err != nil { 8504 return nil, err 8505 } 8506 return ret, nil 8507 // { 8508 // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", 8509 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/reusableConfigs/{reusableConfigsId}:setIamPolicy", 8510 // "httpMethod": "POST", 8511 // "id": "privateca.projects.locations.reusableConfigs.setIamPolicy", 8512 // "parameterOrder": [ 8513 // "resource" 8514 // ], 8515 // "parameters": { 8516 // "resource": { 8517 // "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", 8518 // "location": "path", 8519 // "pattern": "^projects/[^/]+/locations/[^/]+/reusableConfigs/[^/]+$", 8520 // "required": true, 8521 // "type": "string" 8522 // } 8523 // }, 8524 // "path": "v1beta1/{+resource}:setIamPolicy", 8525 // "request": { 8526 // "$ref": "SetIamPolicyRequest" 8527 // }, 8528 // "response": { 8529 // "$ref": "Policy" 8530 // }, 8531 // "scopes": [ 8532 // "https://www.googleapis.com/auth/cloud-platform" 8533 // ] 8534 // } 8535 8536} 8537 8538// method id "privateca.projects.locations.reusableConfigs.testIamPermissions": 8539 8540type ProjectsLocationsReusableConfigsTestIamPermissionsCall struct { 8541 s *Service 8542 resource string 8543 testiampermissionsrequest *TestIamPermissionsRequest 8544 urlParams_ gensupport.URLParams 8545 ctx_ context.Context 8546 header_ http.Header 8547} 8548 8549// TestIamPermissions: Returns permissions that a caller has on the 8550// specified resource. If the resource does not exist, this will return 8551// an empty set of permissions, not a `NOT_FOUND` error. Note: This 8552// operation is designed to be used for building permission-aware UIs 8553// and command-line tools, not for authorization checking. This 8554// operation may "fail open" without warning. 8555func (r *ProjectsLocationsReusableConfigsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsReusableConfigsTestIamPermissionsCall { 8556 c := &ProjectsLocationsReusableConfigsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8557 c.resource = resource 8558 c.testiampermissionsrequest = testiampermissionsrequest 8559 return c 8560} 8561 8562// Fields allows partial responses to be retrieved. See 8563// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8564// for more information. 8565func (c *ProjectsLocationsReusableConfigsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsReusableConfigsTestIamPermissionsCall { 8566 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8567 return c 8568} 8569 8570// Context sets the context to be used in this call's Do method. Any 8571// pending HTTP request will be aborted if the provided context is 8572// canceled. 8573func (c *ProjectsLocationsReusableConfigsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsReusableConfigsTestIamPermissionsCall { 8574 c.ctx_ = ctx 8575 return c 8576} 8577 8578// Header returns an http.Header that can be modified by the caller to 8579// add HTTP headers to the request. 8580func (c *ProjectsLocationsReusableConfigsTestIamPermissionsCall) Header() http.Header { 8581 if c.header_ == nil { 8582 c.header_ = make(http.Header) 8583 } 8584 return c.header_ 8585} 8586 8587func (c *ProjectsLocationsReusableConfigsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 8588 reqHeaders := make(http.Header) 8589 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 8590 for k, v := range c.header_ { 8591 reqHeaders[k] = v 8592 } 8593 reqHeaders.Set("User-Agent", c.s.userAgent()) 8594 var body io.Reader = nil 8595 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 8596 if err != nil { 8597 return nil, err 8598 } 8599 reqHeaders.Set("Content-Type", "application/json") 8600 c.urlParams_.Set("alt", alt) 8601 c.urlParams_.Set("prettyPrint", "false") 8602 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions") 8603 urls += "?" + c.urlParams_.Encode() 8604 req, err := http.NewRequest("POST", urls, body) 8605 if err != nil { 8606 return nil, err 8607 } 8608 req.Header = reqHeaders 8609 googleapi.Expand(req.URL, map[string]string{ 8610 "resource": c.resource, 8611 }) 8612 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8613} 8614 8615// Do executes the "privateca.projects.locations.reusableConfigs.testIamPermissions" call. 8616// Exactly one of *TestIamPermissionsResponse or error will be non-nil. 8617// Any non-2xx status code is an error. Response headers are in either 8618// *TestIamPermissionsResponse.ServerResponse.Header or (if a response 8619// was returned at all) in error.(*googleapi.Error).Header. Use 8620// googleapi.IsNotModified to check whether the returned error was 8621// because http.StatusNotModified was returned. 8622func (c *ProjectsLocationsReusableConfigsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 8623 gensupport.SetOptions(c.urlParams_, opts...) 8624 res, err := c.doRequest("json") 8625 if res != nil && res.StatusCode == http.StatusNotModified { 8626 if res.Body != nil { 8627 res.Body.Close() 8628 } 8629 return nil, &googleapi.Error{ 8630 Code: res.StatusCode, 8631 Header: res.Header, 8632 } 8633 } 8634 if err != nil { 8635 return nil, err 8636 } 8637 defer googleapi.CloseBody(res) 8638 if err := googleapi.CheckResponse(res); err != nil { 8639 return nil, err 8640 } 8641 ret := &TestIamPermissionsResponse{ 8642 ServerResponse: googleapi.ServerResponse{ 8643 Header: res.Header, 8644 HTTPStatusCode: res.StatusCode, 8645 }, 8646 } 8647 target := &ret 8648 if err := gensupport.DecodeResponse(target, res); err != nil { 8649 return nil, err 8650 } 8651 return ret, nil 8652 // { 8653 // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", 8654 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/reusableConfigs/{reusableConfigsId}:testIamPermissions", 8655 // "httpMethod": "POST", 8656 // "id": "privateca.projects.locations.reusableConfigs.testIamPermissions", 8657 // "parameterOrder": [ 8658 // "resource" 8659 // ], 8660 // "parameters": { 8661 // "resource": { 8662 // "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", 8663 // "location": "path", 8664 // "pattern": "^projects/[^/]+/locations/[^/]+/reusableConfigs/[^/]+$", 8665 // "required": true, 8666 // "type": "string" 8667 // } 8668 // }, 8669 // "path": "v1beta1/{+resource}:testIamPermissions", 8670 // "request": { 8671 // "$ref": "TestIamPermissionsRequest" 8672 // }, 8673 // "response": { 8674 // "$ref": "TestIamPermissionsResponse" 8675 // }, 8676 // "scopes": [ 8677 // "https://www.googleapis.com/auth/cloud-platform" 8678 // ] 8679 // } 8680 8681} 8682