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 healthcare provides access to the Cloud Healthcare API. 8// 9// For product documentation, see: https://cloud.google.com/healthcare 10// 11// Creating a client 12// 13// Usage example: 14// 15// import "google.golang.org/api/healthcare/v1alpha" 16// ... 17// ctx := context.Background() 18// healthcareService, err := healthcare.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// healthcareService, err := healthcare.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// healthcareService, err := healthcare.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 36// 37// See https://godoc.org/google.golang.org/api/option/ for details on options. 38package healthcare // import "google.golang.org/api/healthcare/v1alpha" 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 htransport "google.golang.org/api/transport/http" 56) 57 58// Always reference these packages, just in case the auto-generated code 59// below doesn't. 60var _ = bytes.NewBuffer 61var _ = strconv.Itoa 62var _ = fmt.Sprintf 63var _ = json.NewDecoder 64var _ = io.Copy 65var _ = url.Parse 66var _ = gensupport.MarshalJSON 67var _ = googleapi.Version 68var _ = errors.New 69var _ = strings.Replace 70var _ = context.Canceled 71 72const apiId = "healthcare:v1alpha" 73const apiName = "healthcare" 74const apiVersion = "v1alpha" 75const basePath = "https://healthcare.googleapis.com/" 76 77// OAuth2 scopes used by this API. 78const ( 79 // View and manage your data across Google Cloud Platform services 80 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 81) 82 83// NewService creates a new Service. 84func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 85 scopesOption := option.WithScopes( 86 "https://www.googleapis.com/auth/cloud-platform", 87 ) 88 // NOTE: prepend, so we don't override user-specified scopes. 89 opts = append([]option.ClientOption{scopesOption}, opts...) 90 client, endpoint, err := htransport.NewClient(ctx, opts...) 91 if err != nil { 92 return nil, err 93 } 94 s, err := New(client) 95 if err != nil { 96 return nil, err 97 } 98 if endpoint != "" { 99 s.BasePath = endpoint 100 } 101 return s, nil 102} 103 104// New creates a new Service. It uses the provided http.Client for requests. 105// 106// Deprecated: please use NewService instead. 107// To provide a custom HTTP client, use option.WithHTTPClient. 108// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 109func New(client *http.Client) (*Service, error) { 110 if client == nil { 111 return nil, errors.New("client is nil") 112 } 113 s := &Service{client: client, BasePath: basePath} 114 s.Projects = NewProjectsService(s) 115 return s, nil 116} 117 118type Service struct { 119 client *http.Client 120 BasePath string // API endpoint base URL 121 UserAgent string // optional additional User-Agent fragment 122 123 Projects *ProjectsService 124} 125 126func (s *Service) userAgent() string { 127 if s.UserAgent == "" { 128 return googleapi.UserAgent 129 } 130 return googleapi.UserAgent + " " + s.UserAgent 131} 132 133func NewProjectsService(s *Service) *ProjectsService { 134 rs := &ProjectsService{s: s} 135 rs.Locations = NewProjectsLocationsService(s) 136 return rs 137} 138 139type ProjectsService struct { 140 s *Service 141 142 Locations *ProjectsLocationsService 143} 144 145func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { 146 rs := &ProjectsLocationsService{s: s} 147 rs.Datasets = NewProjectsLocationsDatasetsService(s) 148 return rs 149} 150 151type ProjectsLocationsService struct { 152 s *Service 153 154 Datasets *ProjectsLocationsDatasetsService 155} 156 157func NewProjectsLocationsDatasetsService(s *Service) *ProjectsLocationsDatasetsService { 158 rs := &ProjectsLocationsDatasetsService{s: s} 159 rs.DicomStores = NewProjectsLocationsDatasetsDicomStoresService(s) 160 rs.Hl7V2Stores = NewProjectsLocationsDatasetsHl7V2StoresService(s) 161 rs.Operations = NewProjectsLocationsDatasetsOperationsService(s) 162 return rs 163} 164 165type ProjectsLocationsDatasetsService struct { 166 s *Service 167 168 DicomStores *ProjectsLocationsDatasetsDicomStoresService 169 170 Hl7V2Stores *ProjectsLocationsDatasetsHl7V2StoresService 171 172 Operations *ProjectsLocationsDatasetsOperationsService 173} 174 175func NewProjectsLocationsDatasetsDicomStoresService(s *Service) *ProjectsLocationsDatasetsDicomStoresService { 176 rs := &ProjectsLocationsDatasetsDicomStoresService{s: s} 177 return rs 178} 179 180type ProjectsLocationsDatasetsDicomStoresService struct { 181 s *Service 182} 183 184func NewProjectsLocationsDatasetsHl7V2StoresService(s *Service) *ProjectsLocationsDatasetsHl7V2StoresService { 185 rs := &ProjectsLocationsDatasetsHl7V2StoresService{s: s} 186 return rs 187} 188 189type ProjectsLocationsDatasetsHl7V2StoresService struct { 190 s *Service 191} 192 193func NewProjectsLocationsDatasetsOperationsService(s *Service) *ProjectsLocationsDatasetsOperationsService { 194 rs := &ProjectsLocationsDatasetsOperationsService{s: s} 195 return rs 196} 197 198type ProjectsLocationsDatasetsOperationsService struct { 199 s *Service 200} 201 202// AuditConfig: Specifies the audit configuration for a service. 203// The configuration determines which permission types are logged, and 204// what 205// identities, if any, are exempted from logging. 206// An AuditConfig must have one or more AuditLogConfigs. 207// 208// If there are AuditConfigs for both `allServices` and a specific 209// service, 210// the union of the two AuditConfigs is used for that service: the 211// log_types 212// specified in each AuditConfig are enabled, and the exempted_members 213// in each 214// AuditLogConfig are exempted. 215// 216// Example Policy with multiple AuditConfigs: 217// 218// { 219// "audit_configs": [ 220// { 221// "service": "allServices" 222// "audit_log_configs": [ 223// { 224// "log_type": "DATA_READ", 225// "exempted_members": [ 226// "user:foo@gmail.com" 227// ] 228// }, 229// { 230// "log_type": "DATA_WRITE", 231// }, 232// { 233// "log_type": "ADMIN_READ", 234// } 235// ] 236// }, 237// { 238// "service": "fooservice.googleapis.com" 239// "audit_log_configs": [ 240// { 241// "log_type": "DATA_READ", 242// }, 243// { 244// "log_type": "DATA_WRITE", 245// "exempted_members": [ 246// "user:bar@gmail.com" 247// ] 248// } 249// ] 250// } 251// ] 252// } 253// 254// For fooservice, this policy enables DATA_READ, DATA_WRITE and 255// ADMIN_READ 256// logging. It also exempts foo@gmail.com from DATA_READ logging, 257// and 258// bar@gmail.com from DATA_WRITE logging. 259type AuditConfig struct { 260 // AuditLogConfigs: The configuration for logging of each type of 261 // permission. 262 AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"` 263 264 // Service: Specifies a service that will be enabled for audit 265 // logging. 266 // For example, `storage.googleapis.com`, 267 // `cloudsql.googleapis.com`. 268 // `allServices` is a special value that covers all services. 269 Service string `json:"service,omitempty"` 270 271 // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to 272 // unconditionally include in API requests. By default, fields with 273 // empty values are omitted from API requests. However, any non-pointer, 274 // non-interface field appearing in ForceSendFields will be sent to the 275 // server regardless of whether the field is empty or not. This may be 276 // used to include empty fields in Patch requests. 277 ForceSendFields []string `json:"-"` 278 279 // NullFields is a list of field names (e.g. "AuditLogConfigs") to 280 // include in API requests with the JSON null value. By default, fields 281 // with empty values are omitted from API requests. However, any field 282 // with an empty value appearing in NullFields will be sent to the 283 // server as null. It is an error if a field in this list has a 284 // non-empty value. This may be used to include null fields in Patch 285 // requests. 286 NullFields []string `json:"-"` 287} 288 289func (s *AuditConfig) MarshalJSON() ([]byte, error) { 290 type NoMethod AuditConfig 291 raw := NoMethod(*s) 292 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 293} 294 295// AuditLogConfig: Provides the configuration for logging a type of 296// permissions. 297// Example: 298// 299// { 300// "audit_log_configs": [ 301// { 302// "log_type": "DATA_READ", 303// "exempted_members": [ 304// "user:foo@gmail.com" 305// ] 306// }, 307// { 308// "log_type": "DATA_WRITE", 309// } 310// ] 311// } 312// 313// This enables 'DATA_READ' and 'DATA_WRITE' logging, while 314// exempting 315// foo@gmail.com from DATA_READ logging. 316type AuditLogConfig struct { 317 // ExemptedMembers: Specifies the identities that do not cause logging 318 // for this type of 319 // permission. 320 // Follows the same format of Binding.members. 321 ExemptedMembers []string `json:"exemptedMembers,omitempty"` 322 323 // LogType: The log type that this config enables. 324 // 325 // Possible values: 326 // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. 327 // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy 328 // "DATA_WRITE" - Data writes. Example: CloudSQL Users create 329 // "DATA_READ" - Data reads. Example: CloudSQL Users list 330 LogType string `json:"logType,omitempty"` 331 332 // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to 333 // unconditionally include in API requests. By default, fields with 334 // empty values are omitted from API requests. However, any non-pointer, 335 // non-interface field appearing in ForceSendFields will be sent to the 336 // server regardless of whether the field is empty or not. This may be 337 // used to include empty fields in Patch requests. 338 ForceSendFields []string `json:"-"` 339 340 // NullFields is a list of field names (e.g. "ExemptedMembers") to 341 // include in API requests with the JSON null value. By default, fields 342 // with empty values are omitted from API requests. However, any field 343 // with an empty value appearing in NullFields will be sent to the 344 // server as null. It is an error if a field in this list has a 345 // non-empty value. This may be used to include null fields in Patch 346 // requests. 347 NullFields []string `json:"-"` 348} 349 350func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { 351 type NoMethod AuditLogConfig 352 raw := NoMethod(*s) 353 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 354} 355 356// Binding: Associates `members` with a `role`. 357type Binding struct { 358 // Condition: The condition that is associated with this binding. 359 // NOTE: An unsatisfied condition will not allow user access via 360 // current 361 // binding. Different bindings, including their conditions, are 362 // examined 363 // independently. 364 Condition *Expr `json:"condition,omitempty"` 365 366 // Members: Specifies the identities requesting access for a Cloud 367 // Platform resource. 368 // `members` can have the following values: 369 // 370 // * `allUsers`: A special identifier that represents anyone who is 371 // on the internet; with or without a Google account. 372 // 373 // * `allAuthenticatedUsers`: A special identifier that represents 374 // anyone 375 // who is authenticated with a Google account or a service 376 // account. 377 // 378 // * `user:{emailid}`: An email address that represents a specific 379 // Google 380 // account. For example, `alice@gmail.com` . 381 // 382 // 383 // * `serviceAccount:{emailid}`: An email address that represents a 384 // service 385 // account. For example, 386 // `my-other-app@appspot.gserviceaccount.com`. 387 // 388 // * `group:{emailid}`: An email address that represents a Google 389 // group. 390 // For example, `admins@example.com`. 391 // 392 // 393 // * `domain:{domain}`: The G Suite domain (primary) that represents all 394 // the 395 // users of that domain. For example, `google.com` or 396 // `example.com`. 397 // 398 // 399 Members []string `json:"members,omitempty"` 400 401 // Role: Role that is assigned to `members`. 402 // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 403 Role string `json:"role,omitempty"` 404 405 // ForceSendFields is a list of field names (e.g. "Condition") to 406 // unconditionally include in API requests. By default, fields with 407 // empty values are omitted from API requests. However, any non-pointer, 408 // non-interface field appearing in ForceSendFields will be sent to the 409 // server regardless of whether the field is empty or not. This may be 410 // used to include empty fields in Patch requests. 411 ForceSendFields []string `json:"-"` 412 413 // NullFields is a list of field names (e.g. "Condition") to include in 414 // API requests with the JSON null value. By default, fields with empty 415 // values are omitted from API requests. However, any field with an 416 // empty value appearing in NullFields will be sent to the server as 417 // null. It is an error if a field in this list has a non-empty value. 418 // This may be used to include null fields in Patch requests. 419 NullFields []string `json:"-"` 420} 421 422func (s *Binding) MarshalJSON() ([]byte, error) { 423 type NoMethod Binding 424 raw := NoMethod(*s) 425 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 426} 427 428// Expr: Represents an expression text. Example: 429// 430// title: "User account presence" 431// description: "Determines whether the request has a user account" 432// expression: "size(request.user) > 0" 433type Expr struct { 434 // Description: An optional description of the expression. This is a 435 // longer text which 436 // describes the expression, e.g. when hovered over it in a UI. 437 Description string `json:"description,omitempty"` 438 439 // Expression: Textual representation of an expression in 440 // Common Expression Language syntax. 441 // 442 // The application context of the containing message determines 443 // which 444 // well-known feature set of CEL is supported. 445 Expression string `json:"expression,omitempty"` 446 447 // Location: An optional string indicating the location of the 448 // expression for error 449 // reporting, e.g. a file name and a position in the file. 450 Location string `json:"location,omitempty"` 451 452 // Title: An optional title for the expression, i.e. a short string 453 // describing 454 // its purpose. This can be used e.g. in UIs which allow to enter 455 // the 456 // expression. 457 Title string `json:"title,omitempty"` 458 459 // ForceSendFields is a list of field names (e.g. "Description") to 460 // unconditionally include in API requests. By default, fields with 461 // empty values are omitted from API requests. However, any non-pointer, 462 // non-interface field appearing in ForceSendFields will be sent to the 463 // server regardless of whether the field is empty or not. This may be 464 // used to include empty fields in Patch requests. 465 ForceSendFields []string `json:"-"` 466 467 // NullFields is a list of field names (e.g. "Description") to include 468 // in API requests with the JSON null value. By default, fields with 469 // empty values are omitted from API requests. However, any field with 470 // an empty value appearing in NullFields will be sent to the server as 471 // null. It is an error if a field in this list has a non-empty value. 472 // This may be used to include null fields in Patch requests. 473 NullFields []string `json:"-"` 474} 475 476func (s *Expr) MarshalJSON() ([]byte, error) { 477 type NoMethod Expr 478 raw := NoMethod(*s) 479 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 480} 481 482// ListLocationsResponse: The response message for 483// Locations.ListLocations. 484type ListLocationsResponse struct { 485 // Locations: A list of locations that matches the specified filter in 486 // the request. 487 Locations []*Location `json:"locations,omitempty"` 488 489 // NextPageToken: The standard List next-page token. 490 NextPageToken string `json:"nextPageToken,omitempty"` 491 492 // ServerResponse contains the HTTP response code and headers from the 493 // server. 494 googleapi.ServerResponse `json:"-"` 495 496 // ForceSendFields is a list of field names (e.g. "Locations") to 497 // unconditionally include in API requests. By default, fields with 498 // empty values are omitted from API requests. However, any non-pointer, 499 // non-interface field appearing in ForceSendFields will be sent to the 500 // server regardless of whether the field is empty or not. This may be 501 // used to include empty fields in Patch requests. 502 ForceSendFields []string `json:"-"` 503 504 // NullFields is a list of field names (e.g. "Locations") to include in 505 // API requests with the JSON null value. By default, fields with empty 506 // values are omitted from API requests. However, any field with an 507 // empty value appearing in NullFields will be sent to the server as 508 // null. It is an error if a field in this list has a non-empty value. 509 // This may be used to include null fields in Patch requests. 510 NullFields []string `json:"-"` 511} 512 513func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { 514 type NoMethod ListLocationsResponse 515 raw := NoMethod(*s) 516 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 517} 518 519// ListOperationsResponse: The response message for 520// Operations.ListOperations. 521type ListOperationsResponse struct { 522 // NextPageToken: The standard List next-page token. 523 NextPageToken string `json:"nextPageToken,omitempty"` 524 525 // Operations: A list of operations that matches the specified filter in 526 // the request. 527 Operations []*Operation `json:"operations,omitempty"` 528 529 // ServerResponse contains the HTTP response code and headers from the 530 // server. 531 googleapi.ServerResponse `json:"-"` 532 533 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 534 // unconditionally include in API requests. By default, fields with 535 // empty values are omitted from API requests. However, any non-pointer, 536 // non-interface field appearing in ForceSendFields will be sent to the 537 // server regardless of whether the field is empty or not. This may be 538 // used to include empty fields in Patch requests. 539 ForceSendFields []string `json:"-"` 540 541 // NullFields is a list of field names (e.g. "NextPageToken") to include 542 // in API requests with the JSON null value. By default, fields with 543 // empty values are omitted from API requests. However, any field with 544 // an empty value appearing in NullFields will be sent to the server as 545 // null. It is an error if a field in this list has a non-empty value. 546 // This may be used to include null fields in Patch requests. 547 NullFields []string `json:"-"` 548} 549 550func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { 551 type NoMethod ListOperationsResponse 552 raw := NoMethod(*s) 553 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 554} 555 556// Location: A resource that represents Google Cloud Platform location. 557type Location struct { 558 // DisplayName: The friendly name for this location, typically a nearby 559 // city name. 560 // For example, "Tokyo". 561 DisplayName string `json:"displayName,omitempty"` 562 563 // Labels: Cross-service attributes for the location. For example 564 // 565 // {"cloud.googleapis.com/region": "us-east1"} 566 Labels map[string]string `json:"labels,omitempty"` 567 568 // LocationId: The canonical id for this location. For example: 569 // "us-east1". 570 LocationId string `json:"locationId,omitempty"` 571 572 // Metadata: Service-specific metadata. For example the available 573 // capacity at the given 574 // location. 575 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 576 577 // Name: Resource name for the location, which may vary between 578 // implementations. 579 // For example: "projects/example-project/locations/us-east1" 580 Name string `json:"name,omitempty"` 581 582 // ServerResponse contains the HTTP response code and headers from the 583 // server. 584 googleapi.ServerResponse `json:"-"` 585 586 // ForceSendFields is a list of field names (e.g. "DisplayName") 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. "DisplayName") to include 595 // in API requests with the JSON null value. By default, fields with 596 // empty values are omitted from API requests. However, any field with 597 // an 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 *Location) MarshalJSON() ([]byte, error) { 604 type NoMethod Location 605 raw := NoMethod(*s) 606 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 607} 608 609// Operation: This resource represents a long-running operation that is 610// the result of a 611// network API call. 612type Operation struct { 613 // Done: If the value is `false`, it means the operation is still in 614 // progress. 615 // If `true`, the operation is completed, and either `error` or 616 // `response` is 617 // available. 618 Done bool `json:"done,omitempty"` 619 620 // Error: The error result of the operation in case of failure or 621 // cancellation. 622 Error *Status `json:"error,omitempty"` 623 624 // Metadata: Service-specific metadata associated with the operation. 625 // It typically 626 // contains progress information and common metadata such as create 627 // time. 628 // Some services might not provide such metadata. Any method that 629 // returns a 630 // long-running operation should document the metadata type, if any. 631 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 632 633 // Name: The server-assigned name, which is only unique within the same 634 // service that 635 // originally returns it. If you use the default HTTP mapping, 636 // the 637 // `name` should have the format of `operations/some/unique/name`. 638 Name string `json:"name,omitempty"` 639 640 // Response: The normal response of the operation in case of success. 641 // If the original 642 // method returns no data on success, such as `Delete`, the response 643 // is 644 // `google.protobuf.Empty`. If the original method is 645 // standard 646 // `Get`/`Create`/`Update`, the response should be the resource. For 647 // other 648 // methods, the response should have the type `XxxResponse`, where 649 // `Xxx` 650 // is the original method name. For example, if the original method 651 // name 652 // is `TakeSnapshot()`, the inferred response type 653 // is 654 // `TakeSnapshotResponse`. 655 Response googleapi.RawMessage `json:"response,omitempty"` 656 657 // ServerResponse contains the HTTP response code and headers from the 658 // server. 659 googleapi.ServerResponse `json:"-"` 660 661 // ForceSendFields is a list of field names (e.g. "Done") to 662 // unconditionally include in API requests. By default, fields with 663 // empty values are omitted from API requests. However, any non-pointer, 664 // non-interface field appearing in ForceSendFields will be sent to the 665 // server regardless of whether the field is empty or not. This may be 666 // used to include empty fields in Patch requests. 667 ForceSendFields []string `json:"-"` 668 669 // NullFields is a list of field names (e.g. "Done") to include in API 670 // requests with the JSON null value. By default, fields with empty 671 // values are omitted from API requests. However, any field with an 672 // empty value appearing in NullFields will be sent to the server as 673 // null. It is an error if a field in this list has a non-empty value. 674 // This may be used to include null fields in Patch requests. 675 NullFields []string `json:"-"` 676} 677 678func (s *Operation) MarshalJSON() ([]byte, error) { 679 type NoMethod Operation 680 raw := NoMethod(*s) 681 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 682} 683 684// Policy: Defines an Identity and Access Management (IAM) policy. It is 685// used to 686// specify access control policies for Cloud Platform resources. 687// 688// 689// A `Policy` consists of a list of `bindings`. A `binding` binds a list 690// of 691// `members` to a `role`, where the members can be user accounts, Google 692// groups, 693// Google domains, and service accounts. A `role` is a named list of 694// permissions 695// defined by IAM. 696// 697// **JSON Example** 698// 699// { 700// "bindings": [ 701// { 702// "role": "roles/owner", 703// "members": [ 704// "user:mike@example.com", 705// "group:admins@example.com", 706// "domain:google.com", 707// 708// "serviceAccount:my-other-app@appspot.gserviceaccount.com" 709// ] 710// }, 711// { 712// "role": "roles/viewer", 713// "members": ["user:sean@example.com"] 714// } 715// ] 716// } 717// 718// **YAML Example** 719// 720// bindings: 721// - members: 722// - user:mike@example.com 723// - group:admins@example.com 724// - domain:google.com 725// - serviceAccount:my-other-app@appspot.gserviceaccount.com 726// role: roles/owner 727// - members: 728// - user:sean@example.com 729// role: roles/viewer 730// 731// 732// For a description of IAM and its features, see the 733// [IAM developer's guide](https://cloud.google.com/iam/docs). 734type Policy struct { 735 // AuditConfigs: Specifies cloud audit logging configuration for this 736 // policy. 737 AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` 738 739 // Bindings: Associates a list of `members` to a `role`. 740 // `bindings` with no members will result in an error. 741 Bindings []*Binding `json:"bindings,omitempty"` 742 743 // Etag: `etag` is used for optimistic concurrency control as a way to 744 // help 745 // prevent simultaneous updates of a policy from overwriting each 746 // other. 747 // It is strongly suggested that systems make use of the `etag` in 748 // the 749 // read-modify-write cycle to perform policy updates in order to avoid 750 // race 751 // conditions: An `etag` is returned in the response to `getIamPolicy`, 752 // and 753 // systems are expected to put that etag in the request to 754 // `setIamPolicy` to 755 // ensure that their change will be applied to the same version of the 756 // policy. 757 // 758 // If no `etag` is provided in the call to `setIamPolicy`, then the 759 // existing 760 // policy is overwritten blindly. 761 Etag string `json:"etag,omitempty"` 762 763 // Version: Deprecated. 764 Version int64 `json:"version,omitempty"` 765 766 // ServerResponse contains the HTTP response code and headers from the 767 // server. 768 googleapi.ServerResponse `json:"-"` 769 770 // ForceSendFields is a list of field names (e.g. "AuditConfigs") to 771 // unconditionally include in API requests. By default, fields with 772 // empty values are omitted from API requests. However, any non-pointer, 773 // non-interface field appearing in ForceSendFields will be sent to the 774 // server regardless of whether the field is empty or not. This may be 775 // used to include empty fields in Patch requests. 776 ForceSendFields []string `json:"-"` 777 778 // NullFields is a list of field names (e.g. "AuditConfigs") to include 779 // in API requests with the JSON null value. By default, fields with 780 // empty values are omitted from API requests. However, any field with 781 // an empty value appearing in NullFields will be sent to the server as 782 // null. It is an error if a field in this list has a non-empty value. 783 // This may be used to include null fields in Patch requests. 784 NullFields []string `json:"-"` 785} 786 787func (s *Policy) MarshalJSON() ([]byte, error) { 788 type NoMethod Policy 789 raw := NoMethod(*s) 790 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 791} 792 793// SetIamPolicyRequest: Request message for `SetIamPolicy` method. 794type SetIamPolicyRequest struct { 795 // Policy: REQUIRED: The complete policy to be applied to the 796 // `resource`. The size of 797 // the policy is limited to a few 10s of KB. An empty policy is a 798 // valid policy but certain Cloud Platform services (such as 799 // Projects) 800 // might reject them. 801 Policy *Policy `json:"policy,omitempty"` 802 803 // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the 804 // policy to modify. Only 805 // the fields in the mask will be modified. If no mask is provided, 806 // the 807 // following default mask is used: 808 // paths: "bindings, etag" 809 // This field is only used by Cloud IAM. 810 UpdateMask string `json:"updateMask,omitempty"` 811 812 // ForceSendFields is a list of field names (e.g. "Policy") to 813 // unconditionally include in API requests. By default, fields with 814 // empty values are omitted from API requests. However, any non-pointer, 815 // non-interface field appearing in ForceSendFields will be sent to the 816 // server regardless of whether the field is empty or not. This may be 817 // used to include empty fields in Patch requests. 818 ForceSendFields []string `json:"-"` 819 820 // NullFields is a list of field names (e.g. "Policy") to include in API 821 // requests with the JSON null value. By default, fields with empty 822 // values are omitted from API requests. However, any field with an 823 // empty value appearing in NullFields will be sent to the server as 824 // null. It is an error if a field in this list has a non-empty value. 825 // This may be used to include null fields in Patch requests. 826 NullFields []string `json:"-"` 827} 828 829func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { 830 type NoMethod SetIamPolicyRequest 831 raw := NoMethod(*s) 832 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 833} 834 835// Status: The `Status` type defines a logical error model that is 836// suitable for 837// different programming environments, including REST APIs and RPC APIs. 838// It is 839// used by [gRPC](https://github.com/grpc). The error model is designed 840// to be: 841// 842// - Simple to use and understand for most users 843// - Flexible enough to meet unexpected needs 844// 845// # Overview 846// 847// The `Status` message contains three pieces of data: error code, 848// error 849// message, and error details. The error code should be an enum value 850// of 851// google.rpc.Code, but it may accept additional error codes if needed. 852// The 853// error message should be a developer-facing English message that 854// helps 855// developers *understand* and *resolve* the error. If a localized 856// user-facing 857// error message is needed, put the localized message in the error 858// details or 859// localize it in the client. The optional error details may contain 860// arbitrary 861// information about the error. There is a predefined set of error 862// detail types 863// in the package `google.rpc` that can be used for common error 864// conditions. 865// 866// # Language mapping 867// 868// The `Status` message is the logical representation of the error 869// model, but it 870// is not necessarily the actual wire format. When the `Status` message 871// is 872// exposed in different client libraries and different wire protocols, 873// it can be 874// mapped differently. For example, it will likely be mapped to some 875// exceptions 876// in Java, but more likely mapped to some error codes in C. 877// 878// # Other uses 879// 880// The error model and the `Status` message can be used in a variety 881// of 882// environments, either with or without APIs, to provide a 883// consistent developer experience across different 884// environments. 885// 886// Example uses of this error model include: 887// 888// - Partial errors. If a service needs to return partial errors to the 889// client, 890// it may embed the `Status` in the normal response to indicate the 891// partial 892// errors. 893// 894// - Workflow errors. A typical workflow has multiple steps. Each step 895// may 896// have a `Status` message for error reporting. 897// 898// - Batch operations. If a client uses batch request and batch 899// response, the 900// `Status` message should be used directly inside batch response, 901// one for 902// each error sub-response. 903// 904// - Asynchronous operations. If an API call embeds asynchronous 905// operation 906// results in its response, the status of those operations should 907// be 908// represented directly using the `Status` message. 909// 910// - Logging. If some API errors are stored in logs, the message 911// `Status` could 912// be used directly after any stripping needed for security/privacy 913// reasons. 914type Status struct { 915 // Code: The status code, which should be an enum value of 916 // google.rpc.Code. 917 Code int64 `json:"code,omitempty"` 918 919 // Details: A list of messages that carry the error details. There is a 920 // common set of 921 // message types for APIs to use. 922 Details []googleapi.RawMessage `json:"details,omitempty"` 923 924 // Message: A developer-facing error message, which should be in 925 // English. Any 926 // user-facing error message should be localized and sent in 927 // the 928 // google.rpc.Status.details field, or localized by the client. 929 Message string `json:"message,omitempty"` 930 931 // ForceSendFields is a list of field names (e.g. "Code") to 932 // unconditionally include in API requests. By default, fields with 933 // empty values are omitted from API requests. However, any non-pointer, 934 // non-interface field appearing in ForceSendFields will be sent to the 935 // server regardless of whether the field is empty or not. This may be 936 // used to include empty fields in Patch requests. 937 ForceSendFields []string `json:"-"` 938 939 // NullFields is a list of field names (e.g. "Code") to include in API 940 // requests with the JSON null value. By default, fields with empty 941 // values are omitted from API requests. However, any field with an 942 // empty value appearing in NullFields will be sent to the server as 943 // null. It is an error if a field in this list has a non-empty value. 944 // This may be used to include null fields in Patch requests. 945 NullFields []string `json:"-"` 946} 947 948func (s *Status) MarshalJSON() ([]byte, error) { 949 type NoMethod Status 950 raw := NoMethod(*s) 951 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 952} 953 954// TestIamPermissionsRequest: Request message for `TestIamPermissions` 955// method. 956type TestIamPermissionsRequest struct { 957 // Permissions: The set of permissions to check for the `resource`. 958 // Permissions with 959 // wildcards (such as '*' or 'storage.*') are not allowed. For 960 // more 961 // information see 962 // [IAM 963 // Overview](https://cloud.google.com/iam/docs/overview#permissions). 964 Permissions []string `json:"permissions,omitempty"` 965 966 // ForceSendFields is a list of field names (e.g. "Permissions") to 967 // unconditionally include in API requests. By default, fields with 968 // empty values are omitted from API requests. However, any non-pointer, 969 // non-interface field appearing in ForceSendFields will be sent to the 970 // server regardless of whether the field is empty or not. This may be 971 // used to include empty fields in Patch requests. 972 ForceSendFields []string `json:"-"` 973 974 // NullFields is a list of field names (e.g. "Permissions") to include 975 // in API requests with the JSON null value. By default, fields with 976 // empty values are omitted from API requests. However, any field with 977 // an empty value appearing in NullFields will be sent to the server as 978 // null. It is an error if a field in this list has a non-empty value. 979 // This may be used to include null fields in Patch requests. 980 NullFields []string `json:"-"` 981} 982 983func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { 984 type NoMethod TestIamPermissionsRequest 985 raw := NoMethod(*s) 986 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 987} 988 989// TestIamPermissionsResponse: Response message for `TestIamPermissions` 990// method. 991type TestIamPermissionsResponse struct { 992 // Permissions: A subset of `TestPermissionsRequest.permissions` that 993 // the caller is 994 // allowed. 995 Permissions []string `json:"permissions,omitempty"` 996 997 // ServerResponse contains the HTTP response code and headers from the 998 // server. 999 googleapi.ServerResponse `json:"-"` 1000 1001 // ForceSendFields is a list of field names (e.g. "Permissions") to 1002 // unconditionally include in API requests. By default, fields with 1003 // empty values are omitted from API requests. However, any non-pointer, 1004 // non-interface field appearing in ForceSendFields will be sent to the 1005 // server regardless of whether the field is empty or not. This may be 1006 // used to include empty fields in Patch requests. 1007 ForceSendFields []string `json:"-"` 1008 1009 // NullFields is a list of field names (e.g. "Permissions") to include 1010 // in API requests with the JSON null value. By default, fields with 1011 // empty values are omitted from API requests. However, any field with 1012 // an empty value appearing in NullFields will be sent to the server as 1013 // null. It is an error if a field in this list has a non-empty value. 1014 // This may be used to include null fields in Patch requests. 1015 NullFields []string `json:"-"` 1016} 1017 1018func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { 1019 type NoMethod TestIamPermissionsResponse 1020 raw := NoMethod(*s) 1021 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1022} 1023 1024// method id "healthcare.projects.locations.get": 1025 1026type ProjectsLocationsGetCall struct { 1027 s *Service 1028 name string 1029 urlParams_ gensupport.URLParams 1030 ifNoneMatch_ string 1031 ctx_ context.Context 1032 header_ http.Header 1033} 1034 1035// Get: Gets information about a location. 1036func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { 1037 c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 1038 c.name = name 1039 return c 1040} 1041 1042// Fields allows partial responses to be retrieved. See 1043// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 1044// for more information. 1045func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { 1046 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 1047 return c 1048} 1049 1050// IfNoneMatch sets the optional parameter which makes the operation 1051// fail if the object's ETag matches the given value. This is useful for 1052// getting updates only after the object has changed since the last 1053// request. Use googleapi.IsNotModified to check whether the response 1054// error from Do is the result of In-None-Match. 1055func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { 1056 c.ifNoneMatch_ = entityTag 1057 return c 1058} 1059 1060// Context sets the context to be used in this call's Do method. Any 1061// pending HTTP request will be aborted if the provided context is 1062// canceled. 1063func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { 1064 c.ctx_ = ctx 1065 return c 1066} 1067 1068// Header returns an http.Header that can be modified by the caller to 1069// add HTTP headers to the request. 1070func (c *ProjectsLocationsGetCall) Header() http.Header { 1071 if c.header_ == nil { 1072 c.header_ = make(http.Header) 1073 } 1074 return c.header_ 1075} 1076 1077func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { 1078 reqHeaders := make(http.Header) 1079 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 1080 for k, v := range c.header_ { 1081 reqHeaders[k] = v 1082 } 1083 reqHeaders.Set("User-Agent", c.s.userAgent()) 1084 if c.ifNoneMatch_ != "" { 1085 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 1086 } 1087 var body io.Reader = nil 1088 c.urlParams_.Set("alt", alt) 1089 c.urlParams_.Set("prettyPrint", "false") 1090 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 1091 urls += "?" + c.urlParams_.Encode() 1092 req, err := http.NewRequest("GET", urls, body) 1093 if err != nil { 1094 return nil, err 1095 } 1096 req.Header = reqHeaders 1097 googleapi.Expand(req.URL, map[string]string{ 1098 "name": c.name, 1099 }) 1100 return gensupport.SendRequest(c.ctx_, c.s.client, req) 1101} 1102 1103// Do executes the "healthcare.projects.locations.get" call. 1104// Exactly one of *Location or error will be non-nil. Any non-2xx status 1105// code is an error. Response headers are in either 1106// *Location.ServerResponse.Header or (if a response was returned at 1107// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 1108// to check whether the returned error was because 1109// http.StatusNotModified was returned. 1110func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { 1111 gensupport.SetOptions(c.urlParams_, opts...) 1112 res, err := c.doRequest("json") 1113 if res != nil && res.StatusCode == http.StatusNotModified { 1114 if res.Body != nil { 1115 res.Body.Close() 1116 } 1117 return nil, &googleapi.Error{ 1118 Code: res.StatusCode, 1119 Header: res.Header, 1120 } 1121 } 1122 if err != nil { 1123 return nil, err 1124 } 1125 defer googleapi.CloseBody(res) 1126 if err := googleapi.CheckResponse(res); err != nil { 1127 return nil, err 1128 } 1129 ret := &Location{ 1130 ServerResponse: googleapi.ServerResponse{ 1131 Header: res.Header, 1132 HTTPStatusCode: res.StatusCode, 1133 }, 1134 } 1135 target := &ret 1136 if err := gensupport.DecodeResponse(target, res); err != nil { 1137 return nil, err 1138 } 1139 return ret, nil 1140 // { 1141 // "description": "Gets information about a location.", 1142 // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}", 1143 // "httpMethod": "GET", 1144 // "id": "healthcare.projects.locations.get", 1145 // "parameterOrder": [ 1146 // "name" 1147 // ], 1148 // "parameters": { 1149 // "name": { 1150 // "description": "Resource name for the location.", 1151 // "location": "path", 1152 // "pattern": "^projects/[^/]+/locations/[^/]+$", 1153 // "required": true, 1154 // "type": "string" 1155 // } 1156 // }, 1157 // "path": "v1alpha/{+name}", 1158 // "response": { 1159 // "$ref": "Location" 1160 // }, 1161 // "scopes": [ 1162 // "https://www.googleapis.com/auth/cloud-platform" 1163 // ] 1164 // } 1165 1166} 1167 1168// method id "healthcare.projects.locations.list": 1169 1170type ProjectsLocationsListCall struct { 1171 s *Service 1172 name string 1173 urlParams_ gensupport.URLParams 1174 ifNoneMatch_ string 1175 ctx_ context.Context 1176 header_ http.Header 1177} 1178 1179// List: Lists information about the supported locations for this 1180// service. 1181func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { 1182 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 1183 c.name = name 1184 return c 1185} 1186 1187// Filter sets the optional parameter "filter": The standard list 1188// filter. 1189func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { 1190 c.urlParams_.Set("filter", filter) 1191 return c 1192} 1193 1194// PageSize sets the optional parameter "pageSize": The standard list 1195// page size. 1196func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { 1197 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 1198 return c 1199} 1200 1201// PageToken sets the optional parameter "pageToken": The standard list 1202// page token. 1203func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { 1204 c.urlParams_.Set("pageToken", pageToken) 1205 return c 1206} 1207 1208// Fields allows partial responses to be retrieved. See 1209// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 1210// for more information. 1211func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { 1212 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 1213 return c 1214} 1215 1216// IfNoneMatch sets the optional parameter which makes the operation 1217// fail if the object's ETag matches the given value. This is useful for 1218// getting updates only after the object has changed since the last 1219// request. Use googleapi.IsNotModified to check whether the response 1220// error from Do is the result of In-None-Match. 1221func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { 1222 c.ifNoneMatch_ = entityTag 1223 return c 1224} 1225 1226// Context sets the context to be used in this call's Do method. Any 1227// pending HTTP request will be aborted if the provided context is 1228// canceled. 1229func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { 1230 c.ctx_ = ctx 1231 return c 1232} 1233 1234// Header returns an http.Header that can be modified by the caller to 1235// add HTTP headers to the request. 1236func (c *ProjectsLocationsListCall) Header() http.Header { 1237 if c.header_ == nil { 1238 c.header_ = make(http.Header) 1239 } 1240 return c.header_ 1241} 1242 1243func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { 1244 reqHeaders := make(http.Header) 1245 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 1246 for k, v := range c.header_ { 1247 reqHeaders[k] = v 1248 } 1249 reqHeaders.Set("User-Agent", c.s.userAgent()) 1250 if c.ifNoneMatch_ != "" { 1251 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 1252 } 1253 var body io.Reader = nil 1254 c.urlParams_.Set("alt", alt) 1255 c.urlParams_.Set("prettyPrint", "false") 1256 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/locations") 1257 urls += "?" + c.urlParams_.Encode() 1258 req, err := http.NewRequest("GET", urls, body) 1259 if err != nil { 1260 return nil, err 1261 } 1262 req.Header = reqHeaders 1263 googleapi.Expand(req.URL, map[string]string{ 1264 "name": c.name, 1265 }) 1266 return gensupport.SendRequest(c.ctx_, c.s.client, req) 1267} 1268 1269// Do executes the "healthcare.projects.locations.list" call. 1270// Exactly one of *ListLocationsResponse or error will be non-nil. Any 1271// non-2xx status code is an error. Response headers are in either 1272// *ListLocationsResponse.ServerResponse.Header or (if a response was 1273// returned at all) in error.(*googleapi.Error).Header. Use 1274// googleapi.IsNotModified to check whether the returned error was 1275// because http.StatusNotModified was returned. 1276func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { 1277 gensupport.SetOptions(c.urlParams_, opts...) 1278 res, err := c.doRequest("json") 1279 if res != nil && res.StatusCode == http.StatusNotModified { 1280 if res.Body != nil { 1281 res.Body.Close() 1282 } 1283 return nil, &googleapi.Error{ 1284 Code: res.StatusCode, 1285 Header: res.Header, 1286 } 1287 } 1288 if err != nil { 1289 return nil, err 1290 } 1291 defer googleapi.CloseBody(res) 1292 if err := googleapi.CheckResponse(res); err != nil { 1293 return nil, err 1294 } 1295 ret := &ListLocationsResponse{ 1296 ServerResponse: googleapi.ServerResponse{ 1297 Header: res.Header, 1298 HTTPStatusCode: res.StatusCode, 1299 }, 1300 } 1301 target := &ret 1302 if err := gensupport.DecodeResponse(target, res); err != nil { 1303 return nil, err 1304 } 1305 return ret, nil 1306 // { 1307 // "description": "Lists information about the supported locations for this service.", 1308 // "flatPath": "v1alpha/projects/{projectsId}/locations", 1309 // "httpMethod": "GET", 1310 // "id": "healthcare.projects.locations.list", 1311 // "parameterOrder": [ 1312 // "name" 1313 // ], 1314 // "parameters": { 1315 // "filter": { 1316 // "description": "The standard list filter.", 1317 // "location": "query", 1318 // "type": "string" 1319 // }, 1320 // "name": { 1321 // "description": "The resource that owns the locations collection, if applicable.", 1322 // "location": "path", 1323 // "pattern": "^projects/[^/]+$", 1324 // "required": true, 1325 // "type": "string" 1326 // }, 1327 // "pageSize": { 1328 // "description": "The standard list page size.", 1329 // "format": "int32", 1330 // "location": "query", 1331 // "type": "integer" 1332 // }, 1333 // "pageToken": { 1334 // "description": "The standard list page token.", 1335 // "location": "query", 1336 // "type": "string" 1337 // } 1338 // }, 1339 // "path": "v1alpha/{+name}/locations", 1340 // "response": { 1341 // "$ref": "ListLocationsResponse" 1342 // }, 1343 // "scopes": [ 1344 // "https://www.googleapis.com/auth/cloud-platform" 1345 // ] 1346 // } 1347 1348} 1349 1350// Pages invokes f for each page of results. 1351// A non-nil error returned from f will halt the iteration. 1352// The provided context supersedes any context provided to the Context method. 1353func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { 1354 c.ctx_ = ctx 1355 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 1356 for { 1357 x, err := c.Do() 1358 if err != nil { 1359 return err 1360 } 1361 if err := f(x); err != nil { 1362 return err 1363 } 1364 if x.NextPageToken == "" { 1365 return nil 1366 } 1367 c.PageToken(x.NextPageToken) 1368 } 1369} 1370 1371// method id "healthcare.projects.locations.datasets.getIamPolicy": 1372 1373type ProjectsLocationsDatasetsGetIamPolicyCall struct { 1374 s *Service 1375 resource string 1376 urlParams_ gensupport.URLParams 1377 ifNoneMatch_ string 1378 ctx_ context.Context 1379 header_ http.Header 1380} 1381 1382// GetIamPolicy: Gets the access control policy for a resource. 1383// Returns an empty policy if the resource exists and does not have a 1384// policy 1385// set. 1386func (r *ProjectsLocationsDatasetsService) GetIamPolicy(resource string) *ProjectsLocationsDatasetsGetIamPolicyCall { 1387 c := &ProjectsLocationsDatasetsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 1388 c.resource = resource 1389 return c 1390} 1391 1392// Fields allows partial responses to be retrieved. See 1393// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 1394// for more information. 1395func (c *ProjectsLocationsDatasetsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsGetIamPolicyCall { 1396 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 1397 return c 1398} 1399 1400// IfNoneMatch sets the optional parameter which makes the operation 1401// fail if the object's ETag matches the given value. This is useful for 1402// getting updates only after the object has changed since the last 1403// request. Use googleapi.IsNotModified to check whether the response 1404// error from Do is the result of In-None-Match. 1405func (c *ProjectsLocationsDatasetsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsGetIamPolicyCall { 1406 c.ifNoneMatch_ = entityTag 1407 return c 1408} 1409 1410// Context sets the context to be used in this call's Do method. Any 1411// pending HTTP request will be aborted if the provided context is 1412// canceled. 1413func (c *ProjectsLocationsDatasetsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsGetIamPolicyCall { 1414 c.ctx_ = ctx 1415 return c 1416} 1417 1418// Header returns an http.Header that can be modified by the caller to 1419// add HTTP headers to the request. 1420func (c *ProjectsLocationsDatasetsGetIamPolicyCall) Header() http.Header { 1421 if c.header_ == nil { 1422 c.header_ = make(http.Header) 1423 } 1424 return c.header_ 1425} 1426 1427func (c *ProjectsLocationsDatasetsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 1428 reqHeaders := make(http.Header) 1429 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 1430 for k, v := range c.header_ { 1431 reqHeaders[k] = v 1432 } 1433 reqHeaders.Set("User-Agent", c.s.userAgent()) 1434 if c.ifNoneMatch_ != "" { 1435 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 1436 } 1437 var body io.Reader = nil 1438 c.urlParams_.Set("alt", alt) 1439 c.urlParams_.Set("prettyPrint", "false") 1440 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:getIamPolicy") 1441 urls += "?" + c.urlParams_.Encode() 1442 req, err := http.NewRequest("GET", urls, body) 1443 if err != nil { 1444 return nil, err 1445 } 1446 req.Header = reqHeaders 1447 googleapi.Expand(req.URL, map[string]string{ 1448 "resource": c.resource, 1449 }) 1450 return gensupport.SendRequest(c.ctx_, c.s.client, req) 1451} 1452 1453// Do executes the "healthcare.projects.locations.datasets.getIamPolicy" call. 1454// Exactly one of *Policy or error will be non-nil. Any non-2xx status 1455// code is an error. Response headers are in either 1456// *Policy.ServerResponse.Header or (if a response was returned at all) 1457// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 1458// check whether the returned error was because http.StatusNotModified 1459// was returned. 1460func (c *ProjectsLocationsDatasetsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 1461 gensupport.SetOptions(c.urlParams_, opts...) 1462 res, err := c.doRequest("json") 1463 if res != nil && res.StatusCode == http.StatusNotModified { 1464 if res.Body != nil { 1465 res.Body.Close() 1466 } 1467 return nil, &googleapi.Error{ 1468 Code: res.StatusCode, 1469 Header: res.Header, 1470 } 1471 } 1472 if err != nil { 1473 return nil, err 1474 } 1475 defer googleapi.CloseBody(res) 1476 if err := googleapi.CheckResponse(res); err != nil { 1477 return nil, err 1478 } 1479 ret := &Policy{ 1480 ServerResponse: googleapi.ServerResponse{ 1481 Header: res.Header, 1482 HTTPStatusCode: res.StatusCode, 1483 }, 1484 } 1485 target := &ret 1486 if err := gensupport.DecodeResponse(target, res); err != nil { 1487 return nil, err 1488 } 1489 return ret, nil 1490 // { 1491 // "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", 1492 // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}:getIamPolicy", 1493 // "httpMethod": "GET", 1494 // "id": "healthcare.projects.locations.datasets.getIamPolicy", 1495 // "parameterOrder": [ 1496 // "resource" 1497 // ], 1498 // "parameters": { 1499 // "resource": { 1500 // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", 1501 // "location": "path", 1502 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", 1503 // "required": true, 1504 // "type": "string" 1505 // } 1506 // }, 1507 // "path": "v1alpha/{+resource}:getIamPolicy", 1508 // "response": { 1509 // "$ref": "Policy" 1510 // }, 1511 // "scopes": [ 1512 // "https://www.googleapis.com/auth/cloud-platform" 1513 // ] 1514 // } 1515 1516} 1517 1518// method id "healthcare.projects.locations.datasets.setIamPolicy": 1519 1520type ProjectsLocationsDatasetsSetIamPolicyCall struct { 1521 s *Service 1522 resource string 1523 setiampolicyrequest *SetIamPolicyRequest 1524 urlParams_ gensupport.URLParams 1525 ctx_ context.Context 1526 header_ http.Header 1527} 1528 1529// SetIamPolicy: Sets the access control policy on the specified 1530// resource. Replaces any 1531// existing policy. 1532func (r *ProjectsLocationsDatasetsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsSetIamPolicyCall { 1533 c := &ProjectsLocationsDatasetsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 1534 c.resource = resource 1535 c.setiampolicyrequest = setiampolicyrequest 1536 return c 1537} 1538 1539// Fields allows partial responses to be retrieved. See 1540// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 1541// for more information. 1542func (c *ProjectsLocationsDatasetsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSetIamPolicyCall { 1543 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 1544 return c 1545} 1546 1547// Context sets the context to be used in this call's Do method. Any 1548// pending HTTP request will be aborted if the provided context is 1549// canceled. 1550func (c *ProjectsLocationsDatasetsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSetIamPolicyCall { 1551 c.ctx_ = ctx 1552 return c 1553} 1554 1555// Header returns an http.Header that can be modified by the caller to 1556// add HTTP headers to the request. 1557func (c *ProjectsLocationsDatasetsSetIamPolicyCall) Header() http.Header { 1558 if c.header_ == nil { 1559 c.header_ = make(http.Header) 1560 } 1561 return c.header_ 1562} 1563 1564func (c *ProjectsLocationsDatasetsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 1565 reqHeaders := make(http.Header) 1566 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 1567 for k, v := range c.header_ { 1568 reqHeaders[k] = v 1569 } 1570 reqHeaders.Set("User-Agent", c.s.userAgent()) 1571 var body io.Reader = nil 1572 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 1573 if err != nil { 1574 return nil, err 1575 } 1576 reqHeaders.Set("Content-Type", "application/json") 1577 c.urlParams_.Set("alt", alt) 1578 c.urlParams_.Set("prettyPrint", "false") 1579 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:setIamPolicy") 1580 urls += "?" + c.urlParams_.Encode() 1581 req, err := http.NewRequest("POST", urls, body) 1582 if err != nil { 1583 return nil, err 1584 } 1585 req.Header = reqHeaders 1586 googleapi.Expand(req.URL, map[string]string{ 1587 "resource": c.resource, 1588 }) 1589 return gensupport.SendRequest(c.ctx_, c.s.client, req) 1590} 1591 1592// Do executes the "healthcare.projects.locations.datasets.setIamPolicy" call. 1593// Exactly one of *Policy or error will be non-nil. Any non-2xx status 1594// code is an error. Response headers are in either 1595// *Policy.ServerResponse.Header or (if a response was returned at all) 1596// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 1597// check whether the returned error was because http.StatusNotModified 1598// was returned. 1599func (c *ProjectsLocationsDatasetsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 1600 gensupport.SetOptions(c.urlParams_, opts...) 1601 res, err := c.doRequest("json") 1602 if res != nil && res.StatusCode == http.StatusNotModified { 1603 if res.Body != nil { 1604 res.Body.Close() 1605 } 1606 return nil, &googleapi.Error{ 1607 Code: res.StatusCode, 1608 Header: res.Header, 1609 } 1610 } 1611 if err != nil { 1612 return nil, err 1613 } 1614 defer googleapi.CloseBody(res) 1615 if err := googleapi.CheckResponse(res); err != nil { 1616 return nil, err 1617 } 1618 ret := &Policy{ 1619 ServerResponse: googleapi.ServerResponse{ 1620 Header: res.Header, 1621 HTTPStatusCode: res.StatusCode, 1622 }, 1623 } 1624 target := &ret 1625 if err := gensupport.DecodeResponse(target, res); err != nil { 1626 return nil, err 1627 } 1628 return ret, nil 1629 // { 1630 // "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", 1631 // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}:setIamPolicy", 1632 // "httpMethod": "POST", 1633 // "id": "healthcare.projects.locations.datasets.setIamPolicy", 1634 // "parameterOrder": [ 1635 // "resource" 1636 // ], 1637 // "parameters": { 1638 // "resource": { 1639 // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", 1640 // "location": "path", 1641 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", 1642 // "required": true, 1643 // "type": "string" 1644 // } 1645 // }, 1646 // "path": "v1alpha/{+resource}:setIamPolicy", 1647 // "request": { 1648 // "$ref": "SetIamPolicyRequest" 1649 // }, 1650 // "response": { 1651 // "$ref": "Policy" 1652 // }, 1653 // "scopes": [ 1654 // "https://www.googleapis.com/auth/cloud-platform" 1655 // ] 1656 // } 1657 1658} 1659 1660// method id "healthcare.projects.locations.datasets.testIamPermissions": 1661 1662type ProjectsLocationsDatasetsTestIamPermissionsCall struct { 1663 s *Service 1664 resource string 1665 testiampermissionsrequest *TestIamPermissionsRequest 1666 urlParams_ gensupport.URLParams 1667 ctx_ context.Context 1668 header_ http.Header 1669} 1670 1671// TestIamPermissions: Returns permissions that a caller has on the 1672// specified resource. 1673// If the resource does not exist, this will return an empty set 1674// of 1675// permissions, not a NOT_FOUND error. 1676// 1677// Note: This operation is designed to be used for building 1678// permission-aware 1679// UIs and command-line tools, not for authorization checking. This 1680// operation 1681// may "fail open" without warning. 1682func (r *ProjectsLocationsDatasetsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsTestIamPermissionsCall { 1683 c := &ProjectsLocationsDatasetsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 1684 c.resource = resource 1685 c.testiampermissionsrequest = testiampermissionsrequest 1686 return c 1687} 1688 1689// Fields allows partial responses to be retrieved. See 1690// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 1691// for more information. 1692func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsTestIamPermissionsCall { 1693 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 1694 return c 1695} 1696 1697// Context sets the context to be used in this call's Do method. Any 1698// pending HTTP request will be aborted if the provided context is 1699// canceled. 1700func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsTestIamPermissionsCall { 1701 c.ctx_ = ctx 1702 return c 1703} 1704 1705// Header returns an http.Header that can be modified by the caller to 1706// add HTTP headers to the request. 1707func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) Header() http.Header { 1708 if c.header_ == nil { 1709 c.header_ = make(http.Header) 1710 } 1711 return c.header_ 1712} 1713 1714func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 1715 reqHeaders := make(http.Header) 1716 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 1717 for k, v := range c.header_ { 1718 reqHeaders[k] = v 1719 } 1720 reqHeaders.Set("User-Agent", c.s.userAgent()) 1721 var body io.Reader = nil 1722 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 1723 if err != nil { 1724 return nil, err 1725 } 1726 reqHeaders.Set("Content-Type", "application/json") 1727 c.urlParams_.Set("alt", alt) 1728 c.urlParams_.Set("prettyPrint", "false") 1729 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:testIamPermissions") 1730 urls += "?" + c.urlParams_.Encode() 1731 req, err := http.NewRequest("POST", urls, body) 1732 if err != nil { 1733 return nil, err 1734 } 1735 req.Header = reqHeaders 1736 googleapi.Expand(req.URL, map[string]string{ 1737 "resource": c.resource, 1738 }) 1739 return gensupport.SendRequest(c.ctx_, c.s.client, req) 1740} 1741 1742// Do executes the "healthcare.projects.locations.datasets.testIamPermissions" call. 1743// Exactly one of *TestIamPermissionsResponse or error will be non-nil. 1744// Any non-2xx status code is an error. Response headers are in either 1745// *TestIamPermissionsResponse.ServerResponse.Header or (if a response 1746// was returned at all) in error.(*googleapi.Error).Header. Use 1747// googleapi.IsNotModified to check whether the returned error was 1748// because http.StatusNotModified was returned. 1749func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 1750 gensupport.SetOptions(c.urlParams_, opts...) 1751 res, err := c.doRequest("json") 1752 if res != nil && res.StatusCode == http.StatusNotModified { 1753 if res.Body != nil { 1754 res.Body.Close() 1755 } 1756 return nil, &googleapi.Error{ 1757 Code: res.StatusCode, 1758 Header: res.Header, 1759 } 1760 } 1761 if err != nil { 1762 return nil, err 1763 } 1764 defer googleapi.CloseBody(res) 1765 if err := googleapi.CheckResponse(res); err != nil { 1766 return nil, err 1767 } 1768 ret := &TestIamPermissionsResponse{ 1769 ServerResponse: googleapi.ServerResponse{ 1770 Header: res.Header, 1771 HTTPStatusCode: res.StatusCode, 1772 }, 1773 } 1774 target := &ret 1775 if err := gensupport.DecodeResponse(target, res); err != nil { 1776 return nil, err 1777 } 1778 return ret, nil 1779 // { 1780 // "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.", 1781 // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}:testIamPermissions", 1782 // "httpMethod": "POST", 1783 // "id": "healthcare.projects.locations.datasets.testIamPermissions", 1784 // "parameterOrder": [ 1785 // "resource" 1786 // ], 1787 // "parameters": { 1788 // "resource": { 1789 // "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", 1790 // "location": "path", 1791 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", 1792 // "required": true, 1793 // "type": "string" 1794 // } 1795 // }, 1796 // "path": "v1alpha/{+resource}:testIamPermissions", 1797 // "request": { 1798 // "$ref": "TestIamPermissionsRequest" 1799 // }, 1800 // "response": { 1801 // "$ref": "TestIamPermissionsResponse" 1802 // }, 1803 // "scopes": [ 1804 // "https://www.googleapis.com/auth/cloud-platform" 1805 // ] 1806 // } 1807 1808} 1809 1810// method id "healthcare.projects.locations.datasets.dicomStores.getIamPolicy": 1811 1812type ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall struct { 1813 s *Service 1814 resource string 1815 urlParams_ gensupport.URLParams 1816 ifNoneMatch_ string 1817 ctx_ context.Context 1818 header_ http.Header 1819} 1820 1821// GetIamPolicy: Gets the access control policy for a resource. 1822// Returns an empty policy if the resource exists and does not have a 1823// policy 1824// set. 1825func (r *ProjectsLocationsDatasetsDicomStoresService) GetIamPolicy(resource string) *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall { 1826 c := &ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 1827 c.resource = resource 1828 return c 1829} 1830 1831// Fields allows partial responses to be retrieved. See 1832// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 1833// for more information. 1834func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall { 1835 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 1836 return c 1837} 1838 1839// IfNoneMatch sets the optional parameter which makes the operation 1840// fail if the object's ETag matches the given value. This is useful for 1841// getting updates only after the object has changed since the last 1842// request. Use googleapi.IsNotModified to check whether the response 1843// error from Do is the result of In-None-Match. 1844func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall { 1845 c.ifNoneMatch_ = entityTag 1846 return c 1847} 1848 1849// Context sets the context to be used in this call's Do method. Any 1850// pending HTTP request will be aborted if the provided context is 1851// canceled. 1852func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall { 1853 c.ctx_ = ctx 1854 return c 1855} 1856 1857// Header returns an http.Header that can be modified by the caller to 1858// add HTTP headers to the request. 1859func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) Header() http.Header { 1860 if c.header_ == nil { 1861 c.header_ = make(http.Header) 1862 } 1863 return c.header_ 1864} 1865 1866func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 1867 reqHeaders := make(http.Header) 1868 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 1869 for k, v := range c.header_ { 1870 reqHeaders[k] = v 1871 } 1872 reqHeaders.Set("User-Agent", c.s.userAgent()) 1873 if c.ifNoneMatch_ != "" { 1874 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 1875 } 1876 var body io.Reader = nil 1877 c.urlParams_.Set("alt", alt) 1878 c.urlParams_.Set("prettyPrint", "false") 1879 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:getIamPolicy") 1880 urls += "?" + c.urlParams_.Encode() 1881 req, err := http.NewRequest("GET", urls, body) 1882 if err != nil { 1883 return nil, err 1884 } 1885 req.Header = reqHeaders 1886 googleapi.Expand(req.URL, map[string]string{ 1887 "resource": c.resource, 1888 }) 1889 return gensupport.SendRequest(c.ctx_, c.s.client, req) 1890} 1891 1892// Do executes the "healthcare.projects.locations.datasets.dicomStores.getIamPolicy" call. 1893// Exactly one of *Policy or error will be non-nil. Any non-2xx status 1894// code is an error. Response headers are in either 1895// *Policy.ServerResponse.Header or (if a response was returned at all) 1896// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 1897// check whether the returned error was because http.StatusNotModified 1898// was returned. 1899func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 1900 gensupport.SetOptions(c.urlParams_, opts...) 1901 res, err := c.doRequest("json") 1902 if res != nil && res.StatusCode == http.StatusNotModified { 1903 if res.Body != nil { 1904 res.Body.Close() 1905 } 1906 return nil, &googleapi.Error{ 1907 Code: res.StatusCode, 1908 Header: res.Header, 1909 } 1910 } 1911 if err != nil { 1912 return nil, err 1913 } 1914 defer googleapi.CloseBody(res) 1915 if err := googleapi.CheckResponse(res); err != nil { 1916 return nil, err 1917 } 1918 ret := &Policy{ 1919 ServerResponse: googleapi.ServerResponse{ 1920 Header: res.Header, 1921 HTTPStatusCode: res.StatusCode, 1922 }, 1923 } 1924 target := &ret 1925 if err := gensupport.DecodeResponse(target, res); err != nil { 1926 return nil, err 1927 } 1928 return ret, nil 1929 // { 1930 // "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", 1931 // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}:getIamPolicy", 1932 // "httpMethod": "GET", 1933 // "id": "healthcare.projects.locations.datasets.dicomStores.getIamPolicy", 1934 // "parameterOrder": [ 1935 // "resource" 1936 // ], 1937 // "parameters": { 1938 // "resource": { 1939 // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", 1940 // "location": "path", 1941 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 1942 // "required": true, 1943 // "type": "string" 1944 // } 1945 // }, 1946 // "path": "v1alpha/{+resource}:getIamPolicy", 1947 // "response": { 1948 // "$ref": "Policy" 1949 // }, 1950 // "scopes": [ 1951 // "https://www.googleapis.com/auth/cloud-platform" 1952 // ] 1953 // } 1954 1955} 1956 1957// method id "healthcare.projects.locations.datasets.dicomStores.setIamPolicy": 1958 1959type ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall struct { 1960 s *Service 1961 resource string 1962 setiampolicyrequest *SetIamPolicyRequest 1963 urlParams_ gensupport.URLParams 1964 ctx_ context.Context 1965 header_ http.Header 1966} 1967 1968// SetIamPolicy: Sets the access control policy on the specified 1969// resource. Replaces any 1970// existing policy. 1971func (r *ProjectsLocationsDatasetsDicomStoresService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall { 1972 c := &ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 1973 c.resource = resource 1974 c.setiampolicyrequest = setiampolicyrequest 1975 return c 1976} 1977 1978// Fields allows partial responses to be retrieved. See 1979// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 1980// for more information. 1981func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall { 1982 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 1983 return c 1984} 1985 1986// Context sets the context to be used in this call's Do method. Any 1987// pending HTTP request will be aborted if the provided context is 1988// canceled. 1989func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall { 1990 c.ctx_ = ctx 1991 return c 1992} 1993 1994// Header returns an http.Header that can be modified by the caller to 1995// add HTTP headers to the request. 1996func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) Header() http.Header { 1997 if c.header_ == nil { 1998 c.header_ = make(http.Header) 1999 } 2000 return c.header_ 2001} 2002 2003func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 2004 reqHeaders := make(http.Header) 2005 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 2006 for k, v := range c.header_ { 2007 reqHeaders[k] = v 2008 } 2009 reqHeaders.Set("User-Agent", c.s.userAgent()) 2010 var body io.Reader = nil 2011 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 2012 if err != nil { 2013 return nil, err 2014 } 2015 reqHeaders.Set("Content-Type", "application/json") 2016 c.urlParams_.Set("alt", alt) 2017 c.urlParams_.Set("prettyPrint", "false") 2018 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:setIamPolicy") 2019 urls += "?" + c.urlParams_.Encode() 2020 req, err := http.NewRequest("POST", urls, body) 2021 if err != nil { 2022 return nil, err 2023 } 2024 req.Header = reqHeaders 2025 googleapi.Expand(req.URL, map[string]string{ 2026 "resource": c.resource, 2027 }) 2028 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2029} 2030 2031// Do executes the "healthcare.projects.locations.datasets.dicomStores.setIamPolicy" call. 2032// Exactly one of *Policy or error will be non-nil. Any non-2xx status 2033// code is an error. Response headers are in either 2034// *Policy.ServerResponse.Header or (if a response was returned at all) 2035// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 2036// check whether the returned error was because http.StatusNotModified 2037// was returned. 2038func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 2039 gensupport.SetOptions(c.urlParams_, opts...) 2040 res, err := c.doRequest("json") 2041 if res != nil && res.StatusCode == http.StatusNotModified { 2042 if res.Body != nil { 2043 res.Body.Close() 2044 } 2045 return nil, &googleapi.Error{ 2046 Code: res.StatusCode, 2047 Header: res.Header, 2048 } 2049 } 2050 if err != nil { 2051 return nil, err 2052 } 2053 defer googleapi.CloseBody(res) 2054 if err := googleapi.CheckResponse(res); err != nil { 2055 return nil, err 2056 } 2057 ret := &Policy{ 2058 ServerResponse: googleapi.ServerResponse{ 2059 Header: res.Header, 2060 HTTPStatusCode: res.StatusCode, 2061 }, 2062 } 2063 target := &ret 2064 if err := gensupport.DecodeResponse(target, res); err != nil { 2065 return nil, err 2066 } 2067 return ret, nil 2068 // { 2069 // "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", 2070 // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}:setIamPolicy", 2071 // "httpMethod": "POST", 2072 // "id": "healthcare.projects.locations.datasets.dicomStores.setIamPolicy", 2073 // "parameterOrder": [ 2074 // "resource" 2075 // ], 2076 // "parameters": { 2077 // "resource": { 2078 // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", 2079 // "location": "path", 2080 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 2081 // "required": true, 2082 // "type": "string" 2083 // } 2084 // }, 2085 // "path": "v1alpha/{+resource}:setIamPolicy", 2086 // "request": { 2087 // "$ref": "SetIamPolicyRequest" 2088 // }, 2089 // "response": { 2090 // "$ref": "Policy" 2091 // }, 2092 // "scopes": [ 2093 // "https://www.googleapis.com/auth/cloud-platform" 2094 // ] 2095 // } 2096 2097} 2098 2099// method id "healthcare.projects.locations.datasets.dicomStores.testIamPermissions": 2100 2101type ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall struct { 2102 s *Service 2103 resource string 2104 testiampermissionsrequest *TestIamPermissionsRequest 2105 urlParams_ gensupport.URLParams 2106 ctx_ context.Context 2107 header_ http.Header 2108} 2109 2110// TestIamPermissions: Returns permissions that a caller has on the 2111// specified resource. 2112// If the resource does not exist, this will return an empty set 2113// of 2114// permissions, not a NOT_FOUND error. 2115// 2116// Note: This operation is designed to be used for building 2117// permission-aware 2118// UIs and command-line tools, not for authorization checking. This 2119// operation 2120// may "fail open" without warning. 2121func (r *ProjectsLocationsDatasetsDicomStoresService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall { 2122 c := &ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2123 c.resource = resource 2124 c.testiampermissionsrequest = testiampermissionsrequest 2125 return c 2126} 2127 2128// Fields allows partial responses to be retrieved. See 2129// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2130// for more information. 2131func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall { 2132 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2133 return c 2134} 2135 2136// Context sets the context to be used in this call's Do method. Any 2137// pending HTTP request will be aborted if the provided context is 2138// canceled. 2139func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall { 2140 c.ctx_ = ctx 2141 return c 2142} 2143 2144// Header returns an http.Header that can be modified by the caller to 2145// add HTTP headers to the request. 2146func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) Header() http.Header { 2147 if c.header_ == nil { 2148 c.header_ = make(http.Header) 2149 } 2150 return c.header_ 2151} 2152 2153func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 2154 reqHeaders := make(http.Header) 2155 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 2156 for k, v := range c.header_ { 2157 reqHeaders[k] = v 2158 } 2159 reqHeaders.Set("User-Agent", c.s.userAgent()) 2160 var body io.Reader = nil 2161 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 2162 if err != nil { 2163 return nil, err 2164 } 2165 reqHeaders.Set("Content-Type", "application/json") 2166 c.urlParams_.Set("alt", alt) 2167 c.urlParams_.Set("prettyPrint", "false") 2168 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:testIamPermissions") 2169 urls += "?" + c.urlParams_.Encode() 2170 req, err := http.NewRequest("POST", urls, body) 2171 if err != nil { 2172 return nil, err 2173 } 2174 req.Header = reqHeaders 2175 googleapi.Expand(req.URL, map[string]string{ 2176 "resource": c.resource, 2177 }) 2178 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2179} 2180 2181// Do executes the "healthcare.projects.locations.datasets.dicomStores.testIamPermissions" call. 2182// Exactly one of *TestIamPermissionsResponse or error will be non-nil. 2183// Any non-2xx status code is an error. Response headers are in either 2184// *TestIamPermissionsResponse.ServerResponse.Header or (if a response 2185// was returned at all) in error.(*googleapi.Error).Header. Use 2186// googleapi.IsNotModified to check whether the returned error was 2187// because http.StatusNotModified was returned. 2188func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 2189 gensupport.SetOptions(c.urlParams_, opts...) 2190 res, err := c.doRequest("json") 2191 if res != nil && res.StatusCode == http.StatusNotModified { 2192 if res.Body != nil { 2193 res.Body.Close() 2194 } 2195 return nil, &googleapi.Error{ 2196 Code: res.StatusCode, 2197 Header: res.Header, 2198 } 2199 } 2200 if err != nil { 2201 return nil, err 2202 } 2203 defer googleapi.CloseBody(res) 2204 if err := googleapi.CheckResponse(res); err != nil { 2205 return nil, err 2206 } 2207 ret := &TestIamPermissionsResponse{ 2208 ServerResponse: googleapi.ServerResponse{ 2209 Header: res.Header, 2210 HTTPStatusCode: res.StatusCode, 2211 }, 2212 } 2213 target := &ret 2214 if err := gensupport.DecodeResponse(target, res); err != nil { 2215 return nil, err 2216 } 2217 return ret, nil 2218 // { 2219 // "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.", 2220 // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}:testIamPermissions", 2221 // "httpMethod": "POST", 2222 // "id": "healthcare.projects.locations.datasets.dicomStores.testIamPermissions", 2223 // "parameterOrder": [ 2224 // "resource" 2225 // ], 2226 // "parameters": { 2227 // "resource": { 2228 // "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", 2229 // "location": "path", 2230 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 2231 // "required": true, 2232 // "type": "string" 2233 // } 2234 // }, 2235 // "path": "v1alpha/{+resource}:testIamPermissions", 2236 // "request": { 2237 // "$ref": "TestIamPermissionsRequest" 2238 // }, 2239 // "response": { 2240 // "$ref": "TestIamPermissionsResponse" 2241 // }, 2242 // "scopes": [ 2243 // "https://www.googleapis.com/auth/cloud-platform" 2244 // ] 2245 // } 2246 2247} 2248 2249// method id "healthcare.projects.locations.datasets.hl7V2Stores.getIamPolicy": 2250 2251type ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall struct { 2252 s *Service 2253 resource string 2254 urlParams_ gensupport.URLParams 2255 ifNoneMatch_ string 2256 ctx_ context.Context 2257 header_ http.Header 2258} 2259 2260// GetIamPolicy: Gets the access control policy for a resource. 2261// Returns an empty policy if the resource exists and does not have a 2262// policy 2263// set. 2264func (r *ProjectsLocationsDatasetsHl7V2StoresService) GetIamPolicy(resource string) *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall { 2265 c := &ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2266 c.resource = resource 2267 return c 2268} 2269 2270// Fields allows partial responses to be retrieved. See 2271// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2272// for more information. 2273func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall { 2274 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2275 return c 2276} 2277 2278// IfNoneMatch sets the optional parameter which makes the operation 2279// fail if the object's ETag matches the given value. This is useful for 2280// getting updates only after the object has changed since the last 2281// request. Use googleapi.IsNotModified to check whether the response 2282// error from Do is the result of In-None-Match. 2283func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall { 2284 c.ifNoneMatch_ = entityTag 2285 return c 2286} 2287 2288// Context sets the context to be used in this call's Do method. Any 2289// pending HTTP request will be aborted if the provided context is 2290// canceled. 2291func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall { 2292 c.ctx_ = ctx 2293 return c 2294} 2295 2296// Header returns an http.Header that can be modified by the caller to 2297// add HTTP headers to the request. 2298func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) Header() http.Header { 2299 if c.header_ == nil { 2300 c.header_ = make(http.Header) 2301 } 2302 return c.header_ 2303} 2304 2305func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 2306 reqHeaders := make(http.Header) 2307 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 2308 for k, v := range c.header_ { 2309 reqHeaders[k] = v 2310 } 2311 reqHeaders.Set("User-Agent", c.s.userAgent()) 2312 if c.ifNoneMatch_ != "" { 2313 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 2314 } 2315 var body io.Reader = nil 2316 c.urlParams_.Set("alt", alt) 2317 c.urlParams_.Set("prettyPrint", "false") 2318 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:getIamPolicy") 2319 urls += "?" + c.urlParams_.Encode() 2320 req, err := http.NewRequest("GET", urls, body) 2321 if err != nil { 2322 return nil, err 2323 } 2324 req.Header = reqHeaders 2325 googleapi.Expand(req.URL, map[string]string{ 2326 "resource": c.resource, 2327 }) 2328 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2329} 2330 2331// Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.getIamPolicy" call. 2332// Exactly one of *Policy or error will be non-nil. Any non-2xx status 2333// code is an error. Response headers are in either 2334// *Policy.ServerResponse.Header or (if a response was returned at all) 2335// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 2336// check whether the returned error was because http.StatusNotModified 2337// was returned. 2338func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 2339 gensupport.SetOptions(c.urlParams_, opts...) 2340 res, err := c.doRequest("json") 2341 if res != nil && res.StatusCode == http.StatusNotModified { 2342 if res.Body != nil { 2343 res.Body.Close() 2344 } 2345 return nil, &googleapi.Error{ 2346 Code: res.StatusCode, 2347 Header: res.Header, 2348 } 2349 } 2350 if err != nil { 2351 return nil, err 2352 } 2353 defer googleapi.CloseBody(res) 2354 if err := googleapi.CheckResponse(res); err != nil { 2355 return nil, err 2356 } 2357 ret := &Policy{ 2358 ServerResponse: googleapi.ServerResponse{ 2359 Header: res.Header, 2360 HTTPStatusCode: res.StatusCode, 2361 }, 2362 } 2363 target := &ret 2364 if err := gensupport.DecodeResponse(target, res); err != nil { 2365 return nil, err 2366 } 2367 return ret, nil 2368 // { 2369 // "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", 2370 // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}:getIamPolicy", 2371 // "httpMethod": "GET", 2372 // "id": "healthcare.projects.locations.datasets.hl7V2Stores.getIamPolicy", 2373 // "parameterOrder": [ 2374 // "resource" 2375 // ], 2376 // "parameters": { 2377 // "resource": { 2378 // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", 2379 // "location": "path", 2380 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", 2381 // "required": true, 2382 // "type": "string" 2383 // } 2384 // }, 2385 // "path": "v1alpha/{+resource}:getIamPolicy", 2386 // "response": { 2387 // "$ref": "Policy" 2388 // }, 2389 // "scopes": [ 2390 // "https://www.googleapis.com/auth/cloud-platform" 2391 // ] 2392 // } 2393 2394} 2395 2396// method id "healthcare.projects.locations.datasets.hl7V2Stores.setIamPolicy": 2397 2398type ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall struct { 2399 s *Service 2400 resource string 2401 setiampolicyrequest *SetIamPolicyRequest 2402 urlParams_ gensupport.URLParams 2403 ctx_ context.Context 2404 header_ http.Header 2405} 2406 2407// SetIamPolicy: Sets the access control policy on the specified 2408// resource. Replaces any 2409// existing policy. 2410func (r *ProjectsLocationsDatasetsHl7V2StoresService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall { 2411 c := &ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2412 c.resource = resource 2413 c.setiampolicyrequest = setiampolicyrequest 2414 return c 2415} 2416 2417// Fields allows partial responses to be retrieved. See 2418// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2419// for more information. 2420func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall { 2421 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2422 return c 2423} 2424 2425// Context sets the context to be used in this call's Do method. Any 2426// pending HTTP request will be aborted if the provided context is 2427// canceled. 2428func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall { 2429 c.ctx_ = ctx 2430 return c 2431} 2432 2433// Header returns an http.Header that can be modified by the caller to 2434// add HTTP headers to the request. 2435func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) Header() http.Header { 2436 if c.header_ == nil { 2437 c.header_ = make(http.Header) 2438 } 2439 return c.header_ 2440} 2441 2442func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 2443 reqHeaders := make(http.Header) 2444 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 2445 for k, v := range c.header_ { 2446 reqHeaders[k] = v 2447 } 2448 reqHeaders.Set("User-Agent", c.s.userAgent()) 2449 var body io.Reader = nil 2450 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 2451 if err != nil { 2452 return nil, err 2453 } 2454 reqHeaders.Set("Content-Type", "application/json") 2455 c.urlParams_.Set("alt", alt) 2456 c.urlParams_.Set("prettyPrint", "false") 2457 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:setIamPolicy") 2458 urls += "?" + c.urlParams_.Encode() 2459 req, err := http.NewRequest("POST", urls, body) 2460 if err != nil { 2461 return nil, err 2462 } 2463 req.Header = reqHeaders 2464 googleapi.Expand(req.URL, map[string]string{ 2465 "resource": c.resource, 2466 }) 2467 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2468} 2469 2470// Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.setIamPolicy" call. 2471// Exactly one of *Policy or error will be non-nil. Any non-2xx status 2472// code is an error. Response headers are in either 2473// *Policy.ServerResponse.Header or (if a response was returned at all) 2474// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 2475// check whether the returned error was because http.StatusNotModified 2476// was returned. 2477func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 2478 gensupport.SetOptions(c.urlParams_, opts...) 2479 res, err := c.doRequest("json") 2480 if res != nil && res.StatusCode == http.StatusNotModified { 2481 if res.Body != nil { 2482 res.Body.Close() 2483 } 2484 return nil, &googleapi.Error{ 2485 Code: res.StatusCode, 2486 Header: res.Header, 2487 } 2488 } 2489 if err != nil { 2490 return nil, err 2491 } 2492 defer googleapi.CloseBody(res) 2493 if err := googleapi.CheckResponse(res); err != nil { 2494 return nil, err 2495 } 2496 ret := &Policy{ 2497 ServerResponse: googleapi.ServerResponse{ 2498 Header: res.Header, 2499 HTTPStatusCode: res.StatusCode, 2500 }, 2501 } 2502 target := &ret 2503 if err := gensupport.DecodeResponse(target, res); err != nil { 2504 return nil, err 2505 } 2506 return ret, nil 2507 // { 2508 // "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", 2509 // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}:setIamPolicy", 2510 // "httpMethod": "POST", 2511 // "id": "healthcare.projects.locations.datasets.hl7V2Stores.setIamPolicy", 2512 // "parameterOrder": [ 2513 // "resource" 2514 // ], 2515 // "parameters": { 2516 // "resource": { 2517 // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", 2518 // "location": "path", 2519 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", 2520 // "required": true, 2521 // "type": "string" 2522 // } 2523 // }, 2524 // "path": "v1alpha/{+resource}:setIamPolicy", 2525 // "request": { 2526 // "$ref": "SetIamPolicyRequest" 2527 // }, 2528 // "response": { 2529 // "$ref": "Policy" 2530 // }, 2531 // "scopes": [ 2532 // "https://www.googleapis.com/auth/cloud-platform" 2533 // ] 2534 // } 2535 2536} 2537 2538// method id "healthcare.projects.locations.datasets.hl7V2Stores.testIamPermissions": 2539 2540type ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall struct { 2541 s *Service 2542 resource string 2543 testiampermissionsrequest *TestIamPermissionsRequest 2544 urlParams_ gensupport.URLParams 2545 ctx_ context.Context 2546 header_ http.Header 2547} 2548 2549// TestIamPermissions: Returns permissions that a caller has on the 2550// specified resource. 2551// If the resource does not exist, this will return an empty set 2552// of 2553// permissions, not a NOT_FOUND error. 2554// 2555// Note: This operation is designed to be used for building 2556// permission-aware 2557// UIs and command-line tools, not for authorization checking. This 2558// operation 2559// may "fail open" without warning. 2560func (r *ProjectsLocationsDatasetsHl7V2StoresService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall { 2561 c := &ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2562 c.resource = resource 2563 c.testiampermissionsrequest = testiampermissionsrequest 2564 return c 2565} 2566 2567// Fields allows partial responses to be retrieved. See 2568// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2569// for more information. 2570func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall { 2571 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2572 return c 2573} 2574 2575// Context sets the context to be used in this call's Do method. Any 2576// pending HTTP request will be aborted if the provided context is 2577// canceled. 2578func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall { 2579 c.ctx_ = ctx 2580 return c 2581} 2582 2583// Header returns an http.Header that can be modified by the caller to 2584// add HTTP headers to the request. 2585func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) Header() http.Header { 2586 if c.header_ == nil { 2587 c.header_ = make(http.Header) 2588 } 2589 return c.header_ 2590} 2591 2592func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 2593 reqHeaders := make(http.Header) 2594 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 2595 for k, v := range c.header_ { 2596 reqHeaders[k] = v 2597 } 2598 reqHeaders.Set("User-Agent", c.s.userAgent()) 2599 var body io.Reader = nil 2600 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 2601 if err != nil { 2602 return nil, err 2603 } 2604 reqHeaders.Set("Content-Type", "application/json") 2605 c.urlParams_.Set("alt", alt) 2606 c.urlParams_.Set("prettyPrint", "false") 2607 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:testIamPermissions") 2608 urls += "?" + c.urlParams_.Encode() 2609 req, err := http.NewRequest("POST", urls, body) 2610 if err != nil { 2611 return nil, err 2612 } 2613 req.Header = reqHeaders 2614 googleapi.Expand(req.URL, map[string]string{ 2615 "resource": c.resource, 2616 }) 2617 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2618} 2619 2620// Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.testIamPermissions" call. 2621// Exactly one of *TestIamPermissionsResponse or error will be non-nil. 2622// Any non-2xx status code is an error. Response headers are in either 2623// *TestIamPermissionsResponse.ServerResponse.Header or (if a response 2624// was returned at all) in error.(*googleapi.Error).Header. Use 2625// googleapi.IsNotModified to check whether the returned error was 2626// because http.StatusNotModified was returned. 2627func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 2628 gensupport.SetOptions(c.urlParams_, opts...) 2629 res, err := c.doRequest("json") 2630 if res != nil && res.StatusCode == http.StatusNotModified { 2631 if res.Body != nil { 2632 res.Body.Close() 2633 } 2634 return nil, &googleapi.Error{ 2635 Code: res.StatusCode, 2636 Header: res.Header, 2637 } 2638 } 2639 if err != nil { 2640 return nil, err 2641 } 2642 defer googleapi.CloseBody(res) 2643 if err := googleapi.CheckResponse(res); err != nil { 2644 return nil, err 2645 } 2646 ret := &TestIamPermissionsResponse{ 2647 ServerResponse: googleapi.ServerResponse{ 2648 Header: res.Header, 2649 HTTPStatusCode: res.StatusCode, 2650 }, 2651 } 2652 target := &ret 2653 if err := gensupport.DecodeResponse(target, res); err != nil { 2654 return nil, err 2655 } 2656 return ret, nil 2657 // { 2658 // "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.", 2659 // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}:testIamPermissions", 2660 // "httpMethod": "POST", 2661 // "id": "healthcare.projects.locations.datasets.hl7V2Stores.testIamPermissions", 2662 // "parameterOrder": [ 2663 // "resource" 2664 // ], 2665 // "parameters": { 2666 // "resource": { 2667 // "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", 2668 // "location": "path", 2669 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", 2670 // "required": true, 2671 // "type": "string" 2672 // } 2673 // }, 2674 // "path": "v1alpha/{+resource}:testIamPermissions", 2675 // "request": { 2676 // "$ref": "TestIamPermissionsRequest" 2677 // }, 2678 // "response": { 2679 // "$ref": "TestIamPermissionsResponse" 2680 // }, 2681 // "scopes": [ 2682 // "https://www.googleapis.com/auth/cloud-platform" 2683 // ] 2684 // } 2685 2686} 2687 2688// method id "healthcare.projects.locations.datasets.operations.get": 2689 2690type ProjectsLocationsDatasetsOperationsGetCall struct { 2691 s *Service 2692 name string 2693 urlParams_ gensupport.URLParams 2694 ifNoneMatch_ string 2695 ctx_ context.Context 2696 header_ http.Header 2697} 2698 2699// Get: Gets the latest state of a long-running operation. Clients can 2700// use this 2701// method to poll the operation result at intervals as recommended by 2702// the API 2703// service. 2704func (r *ProjectsLocationsDatasetsOperationsService) Get(name string) *ProjectsLocationsDatasetsOperationsGetCall { 2705 c := &ProjectsLocationsDatasetsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2706 c.name = name 2707 return c 2708} 2709 2710// Fields allows partial responses to be retrieved. See 2711// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2712// for more information. 2713func (c *ProjectsLocationsDatasetsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsGetCall { 2714 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2715 return c 2716} 2717 2718// IfNoneMatch sets the optional parameter which makes the operation 2719// fail if the object's ETag matches the given value. This is useful for 2720// getting updates only after the object has changed since the last 2721// request. Use googleapi.IsNotModified to check whether the response 2722// error from Do is the result of In-None-Match. 2723func (c *ProjectsLocationsDatasetsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsOperationsGetCall { 2724 c.ifNoneMatch_ = entityTag 2725 return c 2726} 2727 2728// Context sets the context to be used in this call's Do method. Any 2729// pending HTTP request will be aborted if the provided context is 2730// canceled. 2731func (c *ProjectsLocationsDatasetsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsGetCall { 2732 c.ctx_ = ctx 2733 return c 2734} 2735 2736// Header returns an http.Header that can be modified by the caller to 2737// add HTTP headers to the request. 2738func (c *ProjectsLocationsDatasetsOperationsGetCall) Header() http.Header { 2739 if c.header_ == nil { 2740 c.header_ = make(http.Header) 2741 } 2742 return c.header_ 2743} 2744 2745func (c *ProjectsLocationsDatasetsOperationsGetCall) doRequest(alt string) (*http.Response, error) { 2746 reqHeaders := make(http.Header) 2747 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 2748 for k, v := range c.header_ { 2749 reqHeaders[k] = v 2750 } 2751 reqHeaders.Set("User-Agent", c.s.userAgent()) 2752 if c.ifNoneMatch_ != "" { 2753 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 2754 } 2755 var body io.Reader = nil 2756 c.urlParams_.Set("alt", alt) 2757 c.urlParams_.Set("prettyPrint", "false") 2758 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 2759 urls += "?" + c.urlParams_.Encode() 2760 req, err := http.NewRequest("GET", urls, body) 2761 if err != nil { 2762 return nil, err 2763 } 2764 req.Header = reqHeaders 2765 googleapi.Expand(req.URL, map[string]string{ 2766 "name": c.name, 2767 }) 2768 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2769} 2770 2771// Do executes the "healthcare.projects.locations.datasets.operations.get" call. 2772// Exactly one of *Operation or error will be non-nil. Any non-2xx 2773// status code is an error. Response headers are in either 2774// *Operation.ServerResponse.Header or (if a response was returned at 2775// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 2776// to check whether the returned error was because 2777// http.StatusNotModified was returned. 2778func (c *ProjectsLocationsDatasetsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 2779 gensupport.SetOptions(c.urlParams_, opts...) 2780 res, err := c.doRequest("json") 2781 if res != nil && res.StatusCode == http.StatusNotModified { 2782 if res.Body != nil { 2783 res.Body.Close() 2784 } 2785 return nil, &googleapi.Error{ 2786 Code: res.StatusCode, 2787 Header: res.Header, 2788 } 2789 } 2790 if err != nil { 2791 return nil, err 2792 } 2793 defer googleapi.CloseBody(res) 2794 if err := googleapi.CheckResponse(res); err != nil { 2795 return nil, err 2796 } 2797 ret := &Operation{ 2798 ServerResponse: googleapi.ServerResponse{ 2799 Header: res.Header, 2800 HTTPStatusCode: res.StatusCode, 2801 }, 2802 } 2803 target := &ret 2804 if err := gensupport.DecodeResponse(target, res); err != nil { 2805 return nil, err 2806 } 2807 return ret, nil 2808 // { 2809 // "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", 2810 // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/operations/{operationsId}", 2811 // "httpMethod": "GET", 2812 // "id": "healthcare.projects.locations.datasets.operations.get", 2813 // "parameterOrder": [ 2814 // "name" 2815 // ], 2816 // "parameters": { 2817 // "name": { 2818 // "description": "The name of the operation resource.", 2819 // "location": "path", 2820 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/operations/[^/]+$", 2821 // "required": true, 2822 // "type": "string" 2823 // } 2824 // }, 2825 // "path": "v1alpha/{+name}", 2826 // "response": { 2827 // "$ref": "Operation" 2828 // }, 2829 // "scopes": [ 2830 // "https://www.googleapis.com/auth/cloud-platform" 2831 // ] 2832 // } 2833 2834} 2835 2836// method id "healthcare.projects.locations.datasets.operations.list": 2837 2838type ProjectsLocationsDatasetsOperationsListCall struct { 2839 s *Service 2840 name string 2841 urlParams_ gensupport.URLParams 2842 ifNoneMatch_ string 2843 ctx_ context.Context 2844 header_ http.Header 2845} 2846 2847// List: Lists operations that match the specified filter in the 2848// request. If the 2849// server doesn't support this method, it returns 2850// `UNIMPLEMENTED`. 2851// 2852// NOTE: the `name` binding allows API services to override the 2853// binding 2854// to use different resource name schemes, such as `users/*/operations`. 2855// To 2856// override the binding, API services can add a binding such 2857// as 2858// "/v1/{name=users/*}/operations" to their service configuration. 2859// For backwards compatibility, the default name includes the 2860// operations 2861// collection id, however overriding users must ensure the name 2862// binding 2863// is the parent resource, without the operations collection id. 2864func (r *ProjectsLocationsDatasetsOperationsService) List(name string) *ProjectsLocationsDatasetsOperationsListCall { 2865 c := &ProjectsLocationsDatasetsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2866 c.name = name 2867 return c 2868} 2869 2870// Filter sets the optional parameter "filter": The standard list 2871// filter. 2872func (c *ProjectsLocationsDatasetsOperationsListCall) Filter(filter string) *ProjectsLocationsDatasetsOperationsListCall { 2873 c.urlParams_.Set("filter", filter) 2874 return c 2875} 2876 2877// PageSize sets the optional parameter "pageSize": The standard list 2878// page size. 2879func (c *ProjectsLocationsDatasetsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsOperationsListCall { 2880 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 2881 return c 2882} 2883 2884// PageToken sets the optional parameter "pageToken": The standard list 2885// page token. 2886func (c *ProjectsLocationsDatasetsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsOperationsListCall { 2887 c.urlParams_.Set("pageToken", pageToken) 2888 return c 2889} 2890 2891// Fields allows partial responses to be retrieved. See 2892// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2893// for more information. 2894func (c *ProjectsLocationsDatasetsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsListCall { 2895 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2896 return c 2897} 2898 2899// IfNoneMatch sets the optional parameter which makes the operation 2900// fail if the object's ETag matches the given value. This is useful for 2901// getting updates only after the object has changed since the last 2902// request. Use googleapi.IsNotModified to check whether the response 2903// error from Do is the result of In-None-Match. 2904func (c *ProjectsLocationsDatasetsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsOperationsListCall { 2905 c.ifNoneMatch_ = entityTag 2906 return c 2907} 2908 2909// Context sets the context to be used in this call's Do method. Any 2910// pending HTTP request will be aborted if the provided context is 2911// canceled. 2912func (c *ProjectsLocationsDatasetsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsListCall { 2913 c.ctx_ = ctx 2914 return c 2915} 2916 2917// Header returns an http.Header that can be modified by the caller to 2918// add HTTP headers to the request. 2919func (c *ProjectsLocationsDatasetsOperationsListCall) Header() http.Header { 2920 if c.header_ == nil { 2921 c.header_ = make(http.Header) 2922 } 2923 return c.header_ 2924} 2925 2926func (c *ProjectsLocationsDatasetsOperationsListCall) doRequest(alt string) (*http.Response, error) { 2927 reqHeaders := make(http.Header) 2928 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 2929 for k, v := range c.header_ { 2930 reqHeaders[k] = v 2931 } 2932 reqHeaders.Set("User-Agent", c.s.userAgent()) 2933 if c.ifNoneMatch_ != "" { 2934 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 2935 } 2936 var body io.Reader = nil 2937 c.urlParams_.Set("alt", alt) 2938 c.urlParams_.Set("prettyPrint", "false") 2939 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") 2940 urls += "?" + c.urlParams_.Encode() 2941 req, err := http.NewRequest("GET", urls, body) 2942 if err != nil { 2943 return nil, err 2944 } 2945 req.Header = reqHeaders 2946 googleapi.Expand(req.URL, map[string]string{ 2947 "name": c.name, 2948 }) 2949 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2950} 2951 2952// Do executes the "healthcare.projects.locations.datasets.operations.list" call. 2953// Exactly one of *ListOperationsResponse or error will be non-nil. Any 2954// non-2xx status code is an error. Response headers are in either 2955// *ListOperationsResponse.ServerResponse.Header or (if a response was 2956// returned at all) in error.(*googleapi.Error).Header. Use 2957// googleapi.IsNotModified to check whether the returned error was 2958// because http.StatusNotModified was returned. 2959func (c *ProjectsLocationsDatasetsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { 2960 gensupport.SetOptions(c.urlParams_, opts...) 2961 res, err := c.doRequest("json") 2962 if res != nil && res.StatusCode == http.StatusNotModified { 2963 if res.Body != nil { 2964 res.Body.Close() 2965 } 2966 return nil, &googleapi.Error{ 2967 Code: res.StatusCode, 2968 Header: res.Header, 2969 } 2970 } 2971 if err != nil { 2972 return nil, err 2973 } 2974 defer googleapi.CloseBody(res) 2975 if err := googleapi.CheckResponse(res); err != nil { 2976 return nil, err 2977 } 2978 ret := &ListOperationsResponse{ 2979 ServerResponse: googleapi.ServerResponse{ 2980 Header: res.Header, 2981 HTTPStatusCode: res.StatusCode, 2982 }, 2983 } 2984 target := &ret 2985 if err := gensupport.DecodeResponse(target, res); err != nil { 2986 return nil, err 2987 } 2988 return ret, nil 2989 // { 2990 // "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.", 2991 // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/operations", 2992 // "httpMethod": "GET", 2993 // "id": "healthcare.projects.locations.datasets.operations.list", 2994 // "parameterOrder": [ 2995 // "name" 2996 // ], 2997 // "parameters": { 2998 // "filter": { 2999 // "description": "The standard list filter.", 3000 // "location": "query", 3001 // "type": "string" 3002 // }, 3003 // "name": { 3004 // "description": "The name of the operation's parent resource.", 3005 // "location": "path", 3006 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", 3007 // "required": true, 3008 // "type": "string" 3009 // }, 3010 // "pageSize": { 3011 // "description": "The standard list page size.", 3012 // "format": "int32", 3013 // "location": "query", 3014 // "type": "integer" 3015 // }, 3016 // "pageToken": { 3017 // "description": "The standard list page token.", 3018 // "location": "query", 3019 // "type": "string" 3020 // } 3021 // }, 3022 // "path": "v1alpha/{+name}/operations", 3023 // "response": { 3024 // "$ref": "ListOperationsResponse" 3025 // }, 3026 // "scopes": [ 3027 // "https://www.googleapis.com/auth/cloud-platform" 3028 // ] 3029 // } 3030 3031} 3032 3033// Pages invokes f for each page of results. 3034// A non-nil error returned from f will halt the iteration. 3035// The provided context supersedes any context provided to the Context method. 3036func (c *ProjectsLocationsDatasetsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { 3037 c.ctx_ = ctx 3038 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 3039 for { 3040 x, err := c.Do() 3041 if err != nil { 3042 return err 3043 } 3044 if err := f(x); err != nil { 3045 return err 3046 } 3047 if x.NextPageToken == "" { 3048 return nil 3049 } 3050 c.PageToken(x.NextPageToken) 3051 } 3052} 3053