1// Copyright 2019 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/v1alpha2" 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/v1alpha2" 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 gensupport "google.golang.org/api/gensupport" 53 googleapi "google.golang.org/api/googleapi" 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:v1alpha2" 73const apiName = "healthcare" 74const apiVersion = "v1alpha2" 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.AnnotationStores = NewProjectsLocationsDatasetsAnnotationStoresService(s) 160 rs.DicomStores = NewProjectsLocationsDatasetsDicomStoresService(s) 161 rs.FhirStores = NewProjectsLocationsDatasetsFhirStoresService(s) 162 rs.Hl7V2Stores = NewProjectsLocationsDatasetsHl7V2StoresService(s) 163 rs.Operations = NewProjectsLocationsDatasetsOperationsService(s) 164 return rs 165} 166 167type ProjectsLocationsDatasetsService struct { 168 s *Service 169 170 AnnotationStores *ProjectsLocationsDatasetsAnnotationStoresService 171 172 DicomStores *ProjectsLocationsDatasetsDicomStoresService 173 174 FhirStores *ProjectsLocationsDatasetsFhirStoresService 175 176 Hl7V2Stores *ProjectsLocationsDatasetsHl7V2StoresService 177 178 Operations *ProjectsLocationsDatasetsOperationsService 179} 180 181func NewProjectsLocationsDatasetsAnnotationStoresService(s *Service) *ProjectsLocationsDatasetsAnnotationStoresService { 182 rs := &ProjectsLocationsDatasetsAnnotationStoresService{s: s} 183 rs.Annotations = NewProjectsLocationsDatasetsAnnotationStoresAnnotationsService(s) 184 return rs 185} 186 187type ProjectsLocationsDatasetsAnnotationStoresService struct { 188 s *Service 189 190 Annotations *ProjectsLocationsDatasetsAnnotationStoresAnnotationsService 191} 192 193func NewProjectsLocationsDatasetsAnnotationStoresAnnotationsService(s *Service) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsService { 194 rs := &ProjectsLocationsDatasetsAnnotationStoresAnnotationsService{s: s} 195 return rs 196} 197 198type ProjectsLocationsDatasetsAnnotationStoresAnnotationsService struct { 199 s *Service 200} 201 202func NewProjectsLocationsDatasetsDicomStoresService(s *Service) *ProjectsLocationsDatasetsDicomStoresService { 203 rs := &ProjectsLocationsDatasetsDicomStoresService{s: s} 204 rs.DicomWeb = NewProjectsLocationsDatasetsDicomStoresDicomWebService(s) 205 return rs 206} 207 208type ProjectsLocationsDatasetsDicomStoresService struct { 209 s *Service 210 211 DicomWeb *ProjectsLocationsDatasetsDicomStoresDicomWebService 212} 213 214func NewProjectsLocationsDatasetsDicomStoresDicomWebService(s *Service) *ProjectsLocationsDatasetsDicomStoresDicomWebService { 215 rs := &ProjectsLocationsDatasetsDicomStoresDicomWebService{s: s} 216 rs.Studies = NewProjectsLocationsDatasetsDicomStoresDicomWebStudiesService(s) 217 return rs 218} 219 220type ProjectsLocationsDatasetsDicomStoresDicomWebService struct { 221 s *Service 222 223 Studies *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesService 224} 225 226func NewProjectsLocationsDatasetsDicomStoresDicomWebStudiesService(s *Service) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesService { 227 rs := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesService{s: s} 228 rs.Series = NewProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesService(s) 229 return rs 230} 231 232type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesService struct { 233 s *Service 234 235 Series *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesService 236} 237 238func NewProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesService(s *Service) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesService { 239 rs := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesService{s: s} 240 rs.Instances = NewProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesService(s) 241 return rs 242} 243 244type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesService struct { 245 s *Service 246 247 Instances *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesService 248} 249 250func NewProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesService(s *Service) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesService { 251 rs := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesService{s: s} 252 rs.Frames = NewProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesService(s) 253 return rs 254} 255 256type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesService struct { 257 s *Service 258 259 Frames *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesService 260} 261 262func NewProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesService(s *Service) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesService { 263 rs := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesService{s: s} 264 return rs 265} 266 267type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesService struct { 268 s *Service 269} 270 271func NewProjectsLocationsDatasetsFhirStoresService(s *Service) *ProjectsLocationsDatasetsFhirStoresService { 272 rs := &ProjectsLocationsDatasetsFhirStoresService{s: s} 273 rs.Fhir = NewProjectsLocationsDatasetsFhirStoresFhirService(s) 274 rs.SecurityLabels = NewProjectsLocationsDatasetsFhirStoresSecurityLabelsService(s) 275 return rs 276} 277 278type ProjectsLocationsDatasetsFhirStoresService struct { 279 s *Service 280 281 Fhir *ProjectsLocationsDatasetsFhirStoresFhirService 282 283 SecurityLabels *ProjectsLocationsDatasetsFhirStoresSecurityLabelsService 284} 285 286func NewProjectsLocationsDatasetsFhirStoresFhirService(s *Service) *ProjectsLocationsDatasetsFhirStoresFhirService { 287 rs := &ProjectsLocationsDatasetsFhirStoresFhirService{s: s} 288 return rs 289} 290 291type ProjectsLocationsDatasetsFhirStoresFhirService struct { 292 s *Service 293} 294 295func NewProjectsLocationsDatasetsFhirStoresSecurityLabelsService(s *Service) *ProjectsLocationsDatasetsFhirStoresSecurityLabelsService { 296 rs := &ProjectsLocationsDatasetsFhirStoresSecurityLabelsService{s: s} 297 return rs 298} 299 300type ProjectsLocationsDatasetsFhirStoresSecurityLabelsService struct { 301 s *Service 302} 303 304func NewProjectsLocationsDatasetsHl7V2StoresService(s *Service) *ProjectsLocationsDatasetsHl7V2StoresService { 305 rs := &ProjectsLocationsDatasetsHl7V2StoresService{s: s} 306 rs.Messages = NewProjectsLocationsDatasetsHl7V2StoresMessagesService(s) 307 return rs 308} 309 310type ProjectsLocationsDatasetsHl7V2StoresService struct { 311 s *Service 312 313 Messages *ProjectsLocationsDatasetsHl7V2StoresMessagesService 314} 315 316func NewProjectsLocationsDatasetsHl7V2StoresMessagesService(s *Service) *ProjectsLocationsDatasetsHl7V2StoresMessagesService { 317 rs := &ProjectsLocationsDatasetsHl7V2StoresMessagesService{s: s} 318 return rs 319} 320 321type ProjectsLocationsDatasetsHl7V2StoresMessagesService struct { 322 s *Service 323} 324 325func NewProjectsLocationsDatasetsOperationsService(s *Service) *ProjectsLocationsDatasetsOperationsService { 326 rs := &ProjectsLocationsDatasetsOperationsService{s: s} 327 return rs 328} 329 330type ProjectsLocationsDatasetsOperationsService struct { 331 s *Service 332} 333 334// Annotation: An annotation record. 335type Annotation struct { 336 // AnnotationSource: Details of the source. 337 AnnotationSource *AnnotationSource `json:"annotationSource,omitempty"` 338 339 // ImageAnnotation: Annnotations for images, e.g., bounding polygons. 340 ImageAnnotation *ImageAnnotation `json:"imageAnnotation,omitempty"` 341 342 // Name: Output only. Resource name of the Annotation, of the 343 // form 344 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_ 345 // id}/annotationStores/{annotation_store_id}/annotations/{annotation_id} 346 // `. 347 Name string `json:"name,omitempty"` 348 349 // ResourceAnnotation: Annotations for resource, e.g., classification 350 // tags. 351 ResourceAnnotation *ResourceAnnotation `json:"resourceAnnotation,omitempty"` 352 353 // TextAnnotation: Annotations for sentitive texts, e.g., range of such 354 // texts. 355 TextAnnotation *SensitiveTextAnnotation `json:"textAnnotation,omitempty"` 356 357 // ServerResponse contains the HTTP response code and headers from the 358 // server. 359 googleapi.ServerResponse `json:"-"` 360 361 // ForceSendFields is a list of field names (e.g. "AnnotationSource") to 362 // unconditionally include in API requests. By default, fields with 363 // empty values are omitted from API requests. However, any non-pointer, 364 // non-interface field appearing in ForceSendFields will be sent to the 365 // server regardless of whether the field is empty or not. This may be 366 // used to include empty fields in Patch requests. 367 ForceSendFields []string `json:"-"` 368 369 // NullFields is a list of field names (e.g. "AnnotationSource") to 370 // include in API requests with the JSON null value. By default, fields 371 // with empty values are omitted from API requests. However, any field 372 // with an empty value appearing in NullFields will be sent to the 373 // server as null. It is an error if a field in this list has a 374 // non-empty value. This may be used to include null fields in Patch 375 // requests. 376 NullFields []string `json:"-"` 377} 378 379func (s *Annotation) MarshalJSON() ([]byte, error) { 380 type NoMethod Annotation 381 raw := NoMethod(*s) 382 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 383} 384 385// AnnotationSource: AnnotationSource holds the source information of 386// the annotation. 387type AnnotationSource struct { 388 // CloudHealthcareSource: Cloud Healthcare API resource. 389 CloudHealthcareSource *CloudHealthcareSource `json:"cloudHealthcareSource,omitempty"` 390 391 // ForceSendFields is a list of field names (e.g. 392 // "CloudHealthcareSource") to unconditionally include in API requests. 393 // By default, fields with empty values are omitted from API requests. 394 // However, any non-pointer, non-interface field appearing in 395 // ForceSendFields will be sent to the server regardless of whether the 396 // field is empty or not. This may be used to include empty fields in 397 // Patch requests. 398 ForceSendFields []string `json:"-"` 399 400 // NullFields is a list of field names (e.g. "CloudHealthcareSource") to 401 // include in API requests with the JSON null value. By default, fields 402 // with empty values are omitted from API requests. However, any field 403 // with an empty value appearing in NullFields will be sent to the 404 // server as null. It is an error if a field in this list has a 405 // non-empty value. This may be used to include null fields in Patch 406 // requests. 407 NullFields []string `json:"-"` 408} 409 410func (s *AnnotationSource) MarshalJSON() ([]byte, error) { 411 type NoMethod AnnotationSource 412 raw := NoMethod(*s) 413 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 414} 415 416// AnnotationStore: An Annotation store that can store annotation 417// resources such as 418// labels and tags for text, image and audio. 419type AnnotationStore struct { 420 // Labels: User-supplied key-value pairs used to organize Annotation 421 // stores. 422 // 423 // Label keys must be between 1 and 63 characters long, have a UTF-8 424 // encoding 425 // of maximum 128 bytes, and must conform to the 426 // following PCRE regular expression: 427 // \p{Ll}\p{Lo}{0,62} 428 // 429 // Label values are optional, must be between 1 and 63 characters long, 430 // have 431 // a UTF-8 encoding of maximum 128 bytes, and must conform to 432 // the 433 // following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} 434 // 435 // No more than 64 labels can be associated with a given store. 436 Labels map[string]string `json:"labels,omitempty"` 437 438 // Name: Output only. Resource name of the Annotation store, of the 439 // form 440 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_ 441 // id}/annotationStores/{annotation_store_id}`. 442 Name string `json:"name,omitempty"` 443 444 // ServerResponse contains the HTTP response code and headers from the 445 // server. 446 googleapi.ServerResponse `json:"-"` 447 448 // ForceSendFields is a list of field names (e.g. "Labels") to 449 // unconditionally include in API requests. By default, fields with 450 // empty values are omitted from API requests. However, any non-pointer, 451 // non-interface field appearing in ForceSendFields will be sent to the 452 // server regardless of whether the field is empty or not. This may be 453 // used to include empty fields in Patch requests. 454 ForceSendFields []string `json:"-"` 455 456 // NullFields is a list of field names (e.g. "Labels") to include in API 457 // requests with the JSON null value. By default, fields with empty 458 // values are omitted from API requests. However, any field with an 459 // empty value appearing in NullFields will be sent to the server as 460 // null. It is an error if a field in this list has a non-empty value. 461 // This may be used to include null fields in Patch requests. 462 NullFields []string `json:"-"` 463} 464 465func (s *AnnotationStore) MarshalJSON() ([]byte, error) { 466 type NoMethod AnnotationStore 467 raw := NoMethod(*s) 468 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 469} 470 471// AuditConfig: Specifies the audit configuration for a service. 472// The configuration determines which permission types are logged, and 473// what 474// identities, if any, are exempted from logging. 475// An AuditConfig must have one or more AuditLogConfigs. 476// 477// If there are AuditConfigs for both `allServices` and a specific 478// service, 479// the union of the two AuditConfigs is used for that service: the 480// log_types 481// specified in each AuditConfig are enabled, and the exempted_members 482// in each 483// AuditLogConfig are exempted. 484// 485// Example Policy with multiple AuditConfigs: 486// 487// { 488// "audit_configs": [ 489// { 490// "service": "allServices" 491// "audit_log_configs": [ 492// { 493// "log_type": "DATA_READ", 494// "exempted_members": [ 495// "user:foo@gmail.com" 496// ] 497// }, 498// { 499// "log_type": "DATA_WRITE", 500// }, 501// { 502// "log_type": "ADMIN_READ", 503// } 504// ] 505// }, 506// { 507// "service": "fooservice.googleapis.com" 508// "audit_log_configs": [ 509// { 510// "log_type": "DATA_READ", 511// }, 512// { 513// "log_type": "DATA_WRITE", 514// "exempted_members": [ 515// "user:bar@gmail.com" 516// ] 517// } 518// ] 519// } 520// ] 521// } 522// 523// For fooservice, this policy enables DATA_READ, DATA_WRITE and 524// ADMIN_READ 525// logging. It also exempts foo@gmail.com from DATA_READ logging, 526// and 527// bar@gmail.com from DATA_WRITE logging. 528type AuditConfig struct { 529 // AuditLogConfigs: The configuration for logging of each type of 530 // permission. 531 AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"` 532 533 // Service: Specifies a service that will be enabled for audit 534 // logging. 535 // For example, `storage.googleapis.com`, 536 // `cloudsql.googleapis.com`. 537 // `allServices` is a special value that covers all services. 538 Service string `json:"service,omitempty"` 539 540 // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to 541 // unconditionally include in API requests. By default, fields with 542 // empty values are omitted from API requests. However, any non-pointer, 543 // non-interface field appearing in ForceSendFields will be sent to the 544 // server regardless of whether the field is empty or not. This may be 545 // used to include empty fields in Patch requests. 546 ForceSendFields []string `json:"-"` 547 548 // NullFields is a list of field names (e.g. "AuditLogConfigs") to 549 // include in API requests with the JSON null value. By default, fields 550 // with empty values are omitted from API requests. However, any field 551 // with an empty value appearing in NullFields will be sent to the 552 // server as null. It is an error if a field in this list has a 553 // non-empty value. This may be used to include null fields in Patch 554 // requests. 555 NullFields []string `json:"-"` 556} 557 558func (s *AuditConfig) MarshalJSON() ([]byte, error) { 559 type NoMethod AuditConfig 560 raw := NoMethod(*s) 561 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 562} 563 564// AuditLogConfig: Provides the configuration for logging a type of 565// permissions. 566// Example: 567// 568// { 569// "audit_log_configs": [ 570// { 571// "log_type": "DATA_READ", 572// "exempted_members": [ 573// "user:foo@gmail.com" 574// ] 575// }, 576// { 577// "log_type": "DATA_WRITE", 578// } 579// ] 580// } 581// 582// This enables 'DATA_READ' and 'DATA_WRITE' logging, while 583// exempting 584// foo@gmail.com from DATA_READ logging. 585type AuditLogConfig struct { 586 // ExemptedMembers: Specifies the identities that do not cause logging 587 // for this type of 588 // permission. 589 // Follows the same format of Binding.members. 590 ExemptedMembers []string `json:"exemptedMembers,omitempty"` 591 592 // LogType: The log type that this config enables. 593 // 594 // Possible values: 595 // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. 596 // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy 597 // "DATA_WRITE" - Data writes. Example: CloudSQL Users create 598 // "DATA_READ" - Data reads. Example: CloudSQL Users list 599 LogType string `json:"logType,omitempty"` 600 601 // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to 602 // unconditionally include in API requests. By default, fields with 603 // empty values are omitted from API requests. However, any non-pointer, 604 // non-interface field appearing in ForceSendFields will be sent to the 605 // server regardless of whether the field is empty or not. This may be 606 // used to include empty fields in Patch requests. 607 ForceSendFields []string `json:"-"` 608 609 // NullFields is a list of field names (e.g. "ExemptedMembers") to 610 // include in API requests with the JSON null value. By default, fields 611 // with empty values are omitted from API requests. However, any field 612 // with an empty value appearing in NullFields will be sent to the 613 // server as null. It is an error if a field in this list has a 614 // non-empty value. This may be used to include null fields in Patch 615 // requests. 616 NullFields []string `json:"-"` 617} 618 619func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { 620 type NoMethod AuditLogConfig 621 raw := NoMethod(*s) 622 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 623} 624 625// Binding: Associates `members` with a `role`. 626type Binding struct { 627 // Condition: The condition that is associated with this binding. 628 // NOTE: An unsatisfied condition will not allow user access via 629 // current 630 // binding. Different bindings, including their conditions, are 631 // examined 632 // independently. 633 Condition *Expr `json:"condition,omitempty"` 634 635 // Members: Specifies the identities requesting access for a Cloud 636 // Platform resource. 637 // `members` can have the following values: 638 // 639 // * `allUsers`: A special identifier that represents anyone who is 640 // on the internet; with or without a Google account. 641 // 642 // * `allAuthenticatedUsers`: A special identifier that represents 643 // anyone 644 // who is authenticated with a Google account or a service 645 // account. 646 // 647 // * `user:{emailid}`: An email address that represents a specific 648 // Google 649 // account. For example, `alice@gmail.com` . 650 // 651 // 652 // * `serviceAccount:{emailid}`: An email address that represents a 653 // service 654 // account. For example, 655 // `my-other-app@appspot.gserviceaccount.com`. 656 // 657 // * `group:{emailid}`: An email address that represents a Google 658 // group. 659 // For example, `admins@example.com`. 660 // 661 // 662 // * `domain:{domain}`: The G Suite domain (primary) that represents all 663 // the 664 // users of that domain. For example, `google.com` or 665 // `example.com`. 666 // 667 // 668 Members []string `json:"members,omitempty"` 669 670 // Role: Role that is assigned to `members`. 671 // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 672 Role string `json:"role,omitempty"` 673 674 // ForceSendFields is a list of field names (e.g. "Condition") to 675 // unconditionally include in API requests. By default, fields with 676 // empty values are omitted from API requests. However, any non-pointer, 677 // non-interface field appearing in ForceSendFields will be sent to the 678 // server regardless of whether the field is empty or not. This may be 679 // used to include empty fields in Patch requests. 680 ForceSendFields []string `json:"-"` 681 682 // NullFields is a list of field names (e.g. "Condition") to include in 683 // API requests with the JSON null value. By default, fields with empty 684 // values are omitted from API requests. However, any field with an 685 // empty value appearing in NullFields will be sent to the server as 686 // null. It is an error if a field in this list has a non-empty value. 687 // This may be used to include null fields in Patch requests. 688 NullFields []string `json:"-"` 689} 690 691func (s *Binding) MarshalJSON() ([]byte, error) { 692 type NoMethod Binding 693 raw := NoMethod(*s) 694 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 695} 696 697// BoundingPoly: A bounding polygon for the detected image annotation. 698type BoundingPoly struct { 699 Label string `json:"label,omitempty"` 700 701 Vertices []*Vertex `json:"vertices,omitempty"` 702 703 // ForceSendFields is a list of field names (e.g. "Label") to 704 // unconditionally include in API requests. By default, fields with 705 // empty values are omitted from API requests. However, any non-pointer, 706 // non-interface field appearing in ForceSendFields will be sent to the 707 // server regardless of whether the field is empty or not. This may be 708 // used to include empty fields in Patch requests. 709 ForceSendFields []string `json:"-"` 710 711 // NullFields is a list of field names (e.g. "Label") to include in API 712 // requests with the JSON null value. By default, fields with empty 713 // values are omitted from API requests. However, any field with an 714 // empty value appearing in NullFields will be sent to the server as 715 // null. It is an error if a field in this list has a non-empty value. 716 // This may be used to include null fields in Patch requests. 717 NullFields []string `json:"-"` 718} 719 720func (s *BoundingPoly) MarshalJSON() ([]byte, error) { 721 type NoMethod BoundingPoly 722 raw := NoMethod(*s) 723 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 724} 725 726// CharacterMaskConfig: Mask a string by replacing its characters with a 727// fixed character. 728type CharacterMaskConfig struct { 729 // MaskingCharacter: Character to mask the sensitive values. If not 730 // supplied, defaults to "*". 731 MaskingCharacter string `json:"maskingCharacter,omitempty"` 732 733 // ForceSendFields is a list of field names (e.g. "MaskingCharacter") to 734 // unconditionally include in API requests. By default, fields with 735 // empty values are omitted from API requests. However, any non-pointer, 736 // non-interface field appearing in ForceSendFields will be sent to the 737 // server regardless of whether the field is empty or not. This may be 738 // used to include empty fields in Patch requests. 739 ForceSendFields []string `json:"-"` 740 741 // NullFields is a list of field names (e.g. "MaskingCharacter") to 742 // include in API requests with the JSON null value. By default, fields 743 // with empty values are omitted from API requests. However, any field 744 // with an empty value appearing in NullFields will be sent to the 745 // server as null. It is an error if a field in this list has a 746 // non-empty value. This may be used to include null fields in Patch 747 // requests. 748 NullFields []string `json:"-"` 749} 750 751func (s *CharacterMaskConfig) MarshalJSON() ([]byte, error) { 752 type NoMethod CharacterMaskConfig 753 raw := NoMethod(*s) 754 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 755} 756 757// CloudHealthcareSource: Cloud Healthcare API resource. 758type CloudHealthcareSource struct { 759 // Name: Full path of a Cloud Healthcare API resource. 760 Name string `json:"name,omitempty"` 761 762 // ForceSendFields is a list of field names (e.g. "Name") to 763 // unconditionally include in API requests. By default, fields with 764 // empty values are omitted from API requests. However, any non-pointer, 765 // non-interface field appearing in ForceSendFields will be sent to the 766 // server regardless of whether the field is empty or not. This may be 767 // used to include empty fields in Patch requests. 768 ForceSendFields []string `json:"-"` 769 770 // NullFields is a list of field names (e.g. "Name") to include in API 771 // requests with the JSON null value. By default, fields with empty 772 // values are omitted from API requests. However, any field with an 773 // empty value appearing in NullFields will be sent to the server as 774 // null. It is an error if a field in this list has a non-empty value. 775 // This may be used to include null fields in Patch requests. 776 NullFields []string `json:"-"` 777} 778 779func (s *CloudHealthcareSource) MarshalJSON() ([]byte, error) { 780 type NoMethod CloudHealthcareSource 781 raw := NoMethod(*s) 782 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 783} 784 785// CreateMessageRequest: Creates a new message. 786type CreateMessageRequest struct { 787 // Message: HL7v2 message. 788 Message *Message `json:"message,omitempty"` 789 790 // ForceSendFields is a list of field names (e.g. "Message") to 791 // unconditionally include in API requests. By default, fields with 792 // empty values are omitted from API requests. However, any non-pointer, 793 // non-interface field appearing in ForceSendFields will be sent to the 794 // server regardless of whether the field is empty or not. This may be 795 // used to include empty fields in Patch requests. 796 ForceSendFields []string `json:"-"` 797 798 // NullFields is a list of field names (e.g. "Message") to include in 799 // API requests with the JSON null value. By default, fields with empty 800 // values are omitted from API requests. However, any field with an 801 // empty value appearing in NullFields will be sent to the server as 802 // null. It is an error if a field in this list has a non-empty value. 803 // This may be used to include null fields in Patch requests. 804 NullFields []string `json:"-"` 805} 806 807func (s *CreateMessageRequest) MarshalJSON() ([]byte, error) { 808 type NoMethod CreateMessageRequest 809 raw := NoMethod(*s) 810 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 811} 812 813// CryptoHashConfig: Pseudonymization method that generates surrogates 814// via cryptographic hashing. 815// Uses SHA-256. 816// Outputs a base64-encoded representation of the hashed output 817// (for example, `L7k0BHmF1ha5U3NfGykjro4xWi1MPVQPjhMAZbSV9mM=`). 818type CryptoHashConfig struct { 819 // CryptoKey: An AES 128/192/256 bit key. Causes the hash to be computed 820 // based on this 821 // key. A default key is generated for each DeidentifyDataset operation 822 // and is 823 // used wherever crypto_key is not specified. 824 CryptoKey string `json:"cryptoKey,omitempty"` 825 826 // ForceSendFields is a list of field names (e.g. "CryptoKey") to 827 // unconditionally include in API requests. By default, fields with 828 // empty values are omitted from API requests. However, any non-pointer, 829 // non-interface field appearing in ForceSendFields will be sent to the 830 // server regardless of whether the field is empty or not. This may be 831 // used to include empty fields in Patch requests. 832 ForceSendFields []string `json:"-"` 833 834 // NullFields is a list of field names (e.g. "CryptoKey") to include in 835 // API requests with the JSON null value. By default, fields with empty 836 // values are omitted from API requests. However, any field with an 837 // empty value appearing in NullFields will be sent to the server as 838 // null. It is an error if a field in this list has a non-empty value. 839 // This may be used to include null fields in Patch requests. 840 NullFields []string `json:"-"` 841} 842 843func (s *CryptoHashConfig) MarshalJSON() ([]byte, error) { 844 type NoMethod CryptoHashConfig 845 raw := NoMethod(*s) 846 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 847} 848 849// Dataset: A message representing a health dataset. 850// 851// A health dataset represents a collection of healthcare data 852// pertaining to one 853// or more patients. This may include multiple modalities of healthcare 854// data, 855// such as electronic medical records or medical imaging data. 856type Dataset struct { 857 // Name: Output only. Resource name of the dataset, of the 858 // form 859 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_ 860 // id}`. 861 Name string `json:"name,omitempty"` 862 863 // TimeZone: The default timezone used by this dataset. Must be a either 864 // a valid IANA 865 // time zone name such as "America/New_York" or empty, which defaults to 866 // UTC. 867 // This is used for parsing times in resources (e.g., HL7 messages) 868 // where no 869 // explicit timezone is specified. 870 TimeZone string `json:"timeZone,omitempty"` 871 872 // ServerResponse contains the HTTP response code and headers from the 873 // server. 874 googleapi.ServerResponse `json:"-"` 875 876 // ForceSendFields is a list of field names (e.g. "Name") to 877 // unconditionally include in API requests. By default, fields with 878 // empty values are omitted from API requests. However, any non-pointer, 879 // non-interface field appearing in ForceSendFields will be sent to the 880 // server regardless of whether the field is empty or not. This may be 881 // used to include empty fields in Patch requests. 882 ForceSendFields []string `json:"-"` 883 884 // NullFields is a list of field names (e.g. "Name") to include in API 885 // requests with the JSON null value. By default, fields with empty 886 // values are omitted from API requests. However, any field with an 887 // empty value appearing in NullFields will be sent to the server as 888 // null. It is an error if a field in this list has a non-empty value. 889 // This may be used to include null fields in Patch requests. 890 NullFields []string `json:"-"` 891} 892 893func (s *Dataset) MarshalJSON() ([]byte, error) { 894 type NoMethod Dataset 895 raw := NoMethod(*s) 896 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 897} 898 899// DateShiftConfig: Shift a date forward or backward in time by a random 900// amount which is 901// consistent for a given patient and crypto key combination. 902type DateShiftConfig struct { 903 // CryptoKey: An AES 128/192/256 bit key. Causes the shift to be 904 // computed based on this 905 // key and the patient ID. A default key is generated for 906 // each 907 // DeidentifyDataset operation and is used wherever crypto_key is 908 // not 909 // specified. 910 CryptoKey string `json:"cryptoKey,omitempty"` 911 912 // ForceSendFields is a list of field names (e.g. "CryptoKey") to 913 // unconditionally include in API requests. By default, fields with 914 // empty values are omitted from API requests. However, any non-pointer, 915 // non-interface field appearing in ForceSendFields will be sent to the 916 // server regardless of whether the field is empty or not. This may be 917 // used to include empty fields in Patch requests. 918 ForceSendFields []string `json:"-"` 919 920 // NullFields is a list of field names (e.g. "CryptoKey") to include in 921 // API requests with the JSON null value. By default, fields with empty 922 // values are omitted from API requests. However, any field with an 923 // empty value appearing in NullFields will be sent to the server as 924 // null. It is an error if a field in this list has a non-empty value. 925 // This may be used to include null fields in Patch requests. 926 NullFields []string `json:"-"` 927} 928 929func (s *DateShiftConfig) MarshalJSON() ([]byte, error) { 930 type NoMethod DateShiftConfig 931 raw := NoMethod(*s) 932 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 933} 934 935// DeidentifyConfig: Configures de-id options specific to different 936// types of content. 937// Each submessage customizes the handling of 938// an 939// https://tools.ietf.org/html/rfc6838 media type or subtype. Configs 940// are 941// applied in a nested manner at runtime. 942type DeidentifyConfig struct { 943 // Dicom: Configures de-id of application/DICOM content. 944 Dicom *DicomConfig `json:"dicom,omitempty"` 945 946 // Fhir: Configures de-id of application/FHIR content. 947 Fhir *FhirConfig `json:"fhir,omitempty"` 948 949 // Image: Configures de-identification of image pixels wherever they are 950 // found in the 951 // source_dataset. 952 Image *ImageConfig `json:"image,omitempty"` 953 954 // Text: Configures de-identification of text wherever it is found in 955 // the 956 // source_dataset. 957 Text *TextConfig `json:"text,omitempty"` 958 959 // ForceSendFields is a list of field names (e.g. "Dicom") to 960 // unconditionally include in API requests. By default, fields with 961 // empty values are omitted from API requests. However, any non-pointer, 962 // non-interface field appearing in ForceSendFields will be sent to the 963 // server regardless of whether the field is empty or not. This may be 964 // used to include empty fields in Patch requests. 965 ForceSendFields []string `json:"-"` 966 967 // NullFields is a list of field names (e.g. "Dicom") to include in API 968 // requests with the JSON null value. By default, fields with empty 969 // values are omitted from API requests. However, any field with an 970 // empty value appearing in NullFields will be sent to the server as 971 // null. It is an error if a field in this list has a non-empty value. 972 // This may be used to include null fields in Patch requests. 973 NullFields []string `json:"-"` 974} 975 976func (s *DeidentifyConfig) MarshalJSON() ([]byte, error) { 977 type NoMethod DeidentifyConfig 978 raw := NoMethod(*s) 979 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 980} 981 982// DeidentifyDatasetRequest: Redacts identifying information from the 983// specified dataset. 984type DeidentifyDatasetRequest struct { 985 // Config: Deidentify configuration. 986 Config *DeidentifyConfig `json:"config,omitempty"` 987 988 // DestinationDataset: The name of the dataset resource to create and 989 // write the redacted data 990 // to 991 // (e.g., 992 // `projects/{project_id}/locations/{location_id}/datasets/{dat 993 // aset_id}`). 994 // 995 // * The destination dataset must not exist. 996 // * The destination dataset must be in the same project as the source 997 // dataset. De-identifying data across multiple projects is not 998 // supported. 999 DestinationDataset string `json:"destinationDataset,omitempty"` 1000 1001 // ForceSendFields is a list of field names (e.g. "Config") 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. "Config") to include in API 1010 // requests with the JSON null value. By default, fields with empty 1011 // values are omitted from API requests. However, any field with an 1012 // 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 *DeidentifyDatasetRequest) MarshalJSON() ([]byte, error) { 1019 type NoMethod DeidentifyDatasetRequest 1020 raw := NoMethod(*s) 1021 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1022} 1023 1024// DeidentifyErrorDetails: Contains the status of the Deidentify 1025// operation. 1026type DeidentifyErrorDetails struct { 1027 // FailureResourceCount: Number of resources failed to process. 1028 FailureResourceCount int64 `json:"failureResourceCount,omitempty,string"` 1029 1030 // FailureStoreCount: Number of stores failed to process. 1031 FailureStoreCount int64 `json:"failureStoreCount,omitempty,string"` 1032 1033 // SuccessResourceCount: Number of resources successfully processed. 1034 SuccessResourceCount int64 `json:"successResourceCount,omitempty,string"` 1035 1036 // SuccessStoreCount: Number of stores successfully processed. 1037 SuccessStoreCount int64 `json:"successStoreCount,omitempty,string"` 1038 1039 // ForceSendFields is a list of field names (e.g. 1040 // "FailureResourceCount") to unconditionally include in API requests. 1041 // By default, fields with empty values are omitted from API requests. 1042 // However, any non-pointer, non-interface field appearing in 1043 // ForceSendFields will be sent to the server regardless of whether the 1044 // field is empty or not. This may be used to include empty fields in 1045 // Patch requests. 1046 ForceSendFields []string `json:"-"` 1047 1048 // NullFields is a list of field names (e.g. "FailureResourceCount") to 1049 // include in API requests with the JSON null value. By default, fields 1050 // with empty values are omitted from API requests. However, any field 1051 // with an empty value appearing in NullFields will be sent to the 1052 // server as null. It is an error if a field in this list has a 1053 // non-empty value. This may be used to include null fields in Patch 1054 // requests. 1055 NullFields []string `json:"-"` 1056} 1057 1058func (s *DeidentifyErrorDetails) MarshalJSON() ([]byte, error) { 1059 type NoMethod DeidentifyErrorDetails 1060 raw := NoMethod(*s) 1061 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1062} 1063 1064// DeidentifySummary: Contains a detailed summary of the Deidentify 1065// operation. 1066type DeidentifySummary struct { 1067 // SuccessResourceCount: Number of resources successfully processed. 1068 SuccessResourceCount int64 `json:"successResourceCount,omitempty,string"` 1069 1070 // SuccessStoreCount: Number of stores successfully processed. 1071 SuccessStoreCount int64 `json:"successStoreCount,omitempty,string"` 1072 1073 // ForceSendFields is a list of field names (e.g. 1074 // "SuccessResourceCount") to unconditionally include in API requests. 1075 // By default, fields with empty values are omitted from API requests. 1076 // However, any non-pointer, non-interface field appearing in 1077 // ForceSendFields will be sent to the server regardless of whether the 1078 // field is empty or not. This may be used to include empty fields in 1079 // Patch requests. 1080 ForceSendFields []string `json:"-"` 1081 1082 // NullFields is a list of field names (e.g. "SuccessResourceCount") to 1083 // include in API requests with the JSON null value. By default, fields 1084 // with empty values are omitted from API requests. However, any field 1085 // with an empty value appearing in NullFields will be sent to the 1086 // server as null. It is an error if a field in this list has a 1087 // non-empty value. This may be used to include null fields in Patch 1088 // requests. 1089 NullFields []string `json:"-"` 1090} 1091 1092func (s *DeidentifySummary) MarshalJSON() ([]byte, error) { 1093 type NoMethod DeidentifySummary 1094 raw := NoMethod(*s) 1095 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1096} 1097 1098// Detail: Contains multiple sensitive information findings for each 1099// resource slice. 1100type Detail struct { 1101 Findings []*Finding `json:"findings,omitempty"` 1102 1103 // ForceSendFields is a list of field names (e.g. "Findings") to 1104 // unconditionally include in API requests. By default, fields with 1105 // empty values are omitted from API requests. However, any non-pointer, 1106 // non-interface field appearing in ForceSendFields will be sent to the 1107 // server regardless of whether the field is empty or not. This may be 1108 // used to include empty fields in Patch requests. 1109 ForceSendFields []string `json:"-"` 1110 1111 // NullFields is a list of field names (e.g. "Findings") to include in 1112 // API requests with the JSON null value. By default, fields with empty 1113 // values are omitted from API requests. However, any field with an 1114 // empty value appearing in NullFields will be sent to the server as 1115 // null. It is an error if a field in this list has a non-empty value. 1116 // This may be used to include null fields in Patch requests. 1117 NullFields []string `json:"-"` 1118} 1119 1120func (s *Detail) MarshalJSON() ([]byte, error) { 1121 type NoMethod Detail 1122 raw := NoMethod(*s) 1123 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1124} 1125 1126// DicomConfig: Specifies the parameters needed for de-identification of 1127// DICOM stores. 1128type DicomConfig struct { 1129 // FilterProfile: Tag filtering profile that determines which tags to 1130 // keep/remove. 1131 // 1132 // Possible values: 1133 // "TAG_FILTER_PROFILE_UNSPECIFIED" - No tag filtration profile 1134 // provided. Same as KEEP_ALL_PROFILE. 1135 // "MINIMAL_KEEP_LIST_PROFILE" - Keep only tags required to produce 1136 // valid DICOM. 1137 // "ATTRIBUTE_CONFIDENTIALITY_BASIC_PROFILE" - Remove tags based on 1138 // DICOM Standard's Attribute Confidentiality Basic 1139 // Profile (DICOM Standard Edition 1140 // 2018e) 1141 // http://dicom.nema.org/medical/dicom/2018e/output/chtml/part15/c 1142 // hapter_E.html. 1143 // "KEEP_ALL_PROFILE" - Keep all tags. 1144 // "DEIDENTIFY_TAG_CONTENTS" - Inspects within tag contents and 1145 // replaces sensitive text. The process 1146 // can be configured using the TextConfig. 1147 // Applies to all tags with the following Value Representation 1148 // names: 1149 // AE, LO, LT, PN, SH, ST, UC, UT, DA, DT, AS 1150 FilterProfile string `json:"filterProfile,omitempty"` 1151 1152 // KeepList: List of tags to keep. Remove all other tags. 1153 KeepList *TagFilterList `json:"keepList,omitempty"` 1154 1155 // RemoveList: List of tags to remove. Keep all other tags. 1156 RemoveList *TagFilterList `json:"removeList,omitempty"` 1157 1158 // ForceSendFields is a list of field names (e.g. "FilterProfile") to 1159 // unconditionally include in API requests. By default, fields with 1160 // empty values are omitted from API requests. However, any non-pointer, 1161 // non-interface field appearing in ForceSendFields will be sent to the 1162 // server regardless of whether the field is empty or not. This may be 1163 // used to include empty fields in Patch requests. 1164 ForceSendFields []string `json:"-"` 1165 1166 // NullFields is a list of field names (e.g. "FilterProfile") to include 1167 // in API requests with the JSON null value. By default, fields with 1168 // empty values are omitted from API requests. However, any field with 1169 // an empty value appearing in NullFields will be sent to the server as 1170 // null. It is an error if a field in this list has a non-empty value. 1171 // This may be used to include null fields in Patch requests. 1172 NullFields []string `json:"-"` 1173} 1174 1175func (s *DicomConfig) MarshalJSON() ([]byte, error) { 1176 type NoMethod DicomConfig 1177 raw := NoMethod(*s) 1178 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1179} 1180 1181// DicomStore: Represents a DICOM store. 1182type DicomStore struct { 1183 // Labels: User-supplied key-value pairs used to organize DICOM 1184 // stores. 1185 // 1186 // Label keys must be between 1 and 63 characters long, have a UTF-8 1187 // encoding 1188 // of maximum 128 bytes, and must conform to the 1189 // following PCRE regular expression: 1190 // \p{Ll}\p{Lo}{0,62} 1191 // 1192 // Label values are optional, must be between 1 and 63 characters long, 1193 // have 1194 // a UTF-8 encoding of maximum 128 bytes, and must conform to 1195 // the 1196 // following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} 1197 // 1198 // No more than 64 labels can be associated with a given store. 1199 Labels map[string]string `json:"labels,omitempty"` 1200 1201 // Name: Output only. Resource name of the DICOM store, of the 1202 // form 1203 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_ 1204 // id}/dicomStores/{dicom_store_id}`. 1205 Name string `json:"name,omitempty"` 1206 1207 // NotificationConfig: Notification destination for new DICOM 1208 // instances. 1209 // Supplied by the client. 1210 NotificationConfig *NotificationConfig `json:"notificationConfig,omitempty"` 1211 1212 // ServerResponse contains the HTTP response code and headers from the 1213 // server. 1214 googleapi.ServerResponse `json:"-"` 1215 1216 // ForceSendFields is a list of field names (e.g. "Labels") to 1217 // unconditionally include in API requests. By default, fields with 1218 // empty values are omitted from API requests. However, any non-pointer, 1219 // non-interface field appearing in ForceSendFields will be sent to the 1220 // server regardless of whether the field is empty or not. This may be 1221 // used to include empty fields in Patch requests. 1222 ForceSendFields []string `json:"-"` 1223 1224 // NullFields is a list of field names (e.g. "Labels") to include in API 1225 // requests with the JSON null value. By default, fields with empty 1226 // values are omitted from API requests. However, any field with an 1227 // empty value appearing in NullFields will be sent to the server as 1228 // null. It is an error if a field in this list has a non-empty value. 1229 // This may be used to include null fields in Patch requests. 1230 NullFields []string `json:"-"` 1231} 1232 1233func (s *DicomStore) MarshalJSON() ([]byte, error) { 1234 type NoMethod DicomStore 1235 raw := NoMethod(*s) 1236 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1237} 1238 1239// Empty: A generic empty message that you can re-use to avoid defining 1240// duplicated 1241// empty messages in your APIs. A typical example is to use it as the 1242// request 1243// or the response type of an API method. For instance: 1244// 1245// service Foo { 1246// rpc Bar(google.protobuf.Empty) returns 1247// (google.protobuf.Empty); 1248// } 1249// 1250// The JSON representation for `Empty` is empty JSON object `{}`. 1251type Empty struct { 1252 // ServerResponse contains the HTTP response code and headers from the 1253 // server. 1254 googleapi.ServerResponse `json:"-"` 1255} 1256 1257// ErrorDetail: Structure to describe the error encountered during batch 1258// operation on one 1259// resource. This is used both for sample errors in operation response, 1260// and 1261// for format of errors in error reports. 1262type ErrorDetail struct { 1263 // Error: The status of the error. 1264 Error *Status `json:"error,omitempty"` 1265 1266 // Resource: The identifier of the resource. 1267 Resource string `json:"resource,omitempty"` 1268 1269 // ForceSendFields is a list of field names (e.g. "Error") to 1270 // unconditionally include in API requests. By default, fields with 1271 // empty values are omitted from API requests. However, any non-pointer, 1272 // non-interface field appearing in ForceSendFields will be sent to the 1273 // server regardless of whether the field is empty or not. This may be 1274 // used to include empty fields in Patch requests. 1275 ForceSendFields []string `json:"-"` 1276 1277 // NullFields is a list of field names (e.g. "Error") to include in API 1278 // requests with the JSON null value. By default, fields with empty 1279 // values are omitted from API requests. However, any field with an 1280 // empty value appearing in NullFields will be sent to the server as 1281 // null. It is an error if a field in this list has a non-empty value. 1282 // This may be used to include null fields in Patch requests. 1283 NullFields []string `json:"-"` 1284} 1285 1286func (s *ErrorDetail) MarshalJSON() ([]byte, error) { 1287 type NoMethod ErrorDetail 1288 raw := NoMethod(*s) 1289 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1290} 1291 1292// ExportDicomDataRequest: Exports data from the specified DICOM 1293// store. 1294// If a given resource (e.g., a DICOM object with the same SOPInstance 1295// UID) 1296// already exists in the output, it is overwritten with the version 1297// in the source dataset. 1298// Exported DICOM data will persist when the DICOM store from which it 1299// was 1300// exported is deleted. 1301type ExportDicomDataRequest struct { 1302 // BigqueryDestination: The BigQuery output destination. 1303 // 1304 // You can only export to a BigQuery dataset that's in the same project 1305 // as 1306 // the DICOM store you're exporting from. 1307 // 1308 // The BigQuery location requires two IAM 1309 // roles: 1310 // `roles/bigquery.dataEditor` and `roles/bigquery.jobUser`. 1311 BigqueryDestination *GoogleCloudHealthcareV1alpha2DicomBigQueryDestination `json:"bigqueryDestination,omitempty"` 1312 1313 // GcsDestination: The Cloud Storage output destination. 1314 // 1315 // The Cloud Storage location requires the `roles/storage.objectAdmin` 1316 // Cloud 1317 // IAM role. 1318 GcsDestination *GoogleCloudHealthcareV1alpha2DicomGcsDestination `json:"gcsDestination,omitempty"` 1319 1320 // ForceSendFields is a list of field names (e.g. "BigqueryDestination") 1321 // to unconditionally include in API requests. By default, fields with 1322 // empty values are omitted from API requests. However, any non-pointer, 1323 // non-interface field appearing in ForceSendFields will be sent to the 1324 // server regardless of whether the field is empty or not. This may be 1325 // used to include empty fields in Patch requests. 1326 ForceSendFields []string `json:"-"` 1327 1328 // NullFields is a list of field names (e.g. "BigqueryDestination") to 1329 // include in API requests with the JSON null value. By default, fields 1330 // with empty values are omitted from API requests. However, any field 1331 // with an empty value appearing in NullFields will be sent to the 1332 // server as null. It is an error if a field in this list has a 1333 // non-empty value. This may be used to include null fields in Patch 1334 // requests. 1335 NullFields []string `json:"-"` 1336} 1337 1338func (s *ExportDicomDataRequest) MarshalJSON() ([]byte, error) { 1339 type NoMethod ExportDicomDataRequest 1340 raw := NoMethod(*s) 1341 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1342} 1343 1344// ExportResourcesRequest: Request to export resources. 1345type ExportResourcesRequest struct { 1346 // BigqueryDestination: The BigQuery output destination. 1347 // 1348 // The BigQuery location requires two IAM 1349 // roles: 1350 // `roles/bigquery.dataEditor` and `roles/bigquery.jobUser`. 1351 // 1352 // The output will be one BigQuery table per resource type. 1353 BigqueryDestination *GoogleCloudHealthcareV1alpha2FhirBigQueryDestination `json:"bigqueryDestination,omitempty"` 1354 1355 // GcsDestination: The Cloud Storage output destination. 1356 // 1357 // The Cloud Storage location requires the `roles/storage.objectAdmin` 1358 // Cloud 1359 // IAM role. 1360 // 1361 // The exported outputs are 1362 // organized by FHIR resource types. The server will create one object 1363 // per 1364 // resource type. Each object contains newline delimited JSON, and each 1365 // line 1366 // is a FHIR resource. 1367 GcsDestination *GoogleCloudHealthcareV1alpha2FhirRestGcsDestination `json:"gcsDestination,omitempty"` 1368 1369 // ForceSendFields is a list of field names (e.g. "BigqueryDestination") 1370 // to unconditionally include in API requests. By default, fields with 1371 // empty values are omitted from API requests. However, any non-pointer, 1372 // non-interface field appearing in ForceSendFields will be sent to the 1373 // server regardless of whether the field is empty or not. This may be 1374 // used to include empty fields in Patch requests. 1375 ForceSendFields []string `json:"-"` 1376 1377 // NullFields is a list of field names (e.g. "BigqueryDestination") to 1378 // include in API requests with the JSON null value. By default, fields 1379 // with empty values are omitted from API requests. However, any field 1380 // with an empty value appearing in NullFields will be sent to the 1381 // server as null. It is an error if a field in this list has a 1382 // non-empty value. This may be used to include null fields in Patch 1383 // requests. 1384 NullFields []string `json:"-"` 1385} 1386 1387func (s *ExportResourcesRequest) MarshalJSON() ([]byte, error) { 1388 type NoMethod ExportResourcesRequest 1389 raw := NoMethod(*s) 1390 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1391} 1392 1393// Expr: Represents an expression text. Example: 1394// 1395// title: "User account presence" 1396// description: "Determines whether the request has a user account" 1397// expression: "size(request.user) > 0" 1398type Expr struct { 1399 // Description: An optional description of the expression. This is a 1400 // longer text which 1401 // describes the expression, e.g. when hovered over it in a UI. 1402 Description string `json:"description,omitempty"` 1403 1404 // Expression: Textual representation of an expression in 1405 // Common Expression Language syntax. 1406 // 1407 // The application context of the containing message determines 1408 // which 1409 // well-known feature set of CEL is supported. 1410 Expression string `json:"expression,omitempty"` 1411 1412 // Location: An optional string indicating the location of the 1413 // expression for error 1414 // reporting, e.g. a file name and a position in the file. 1415 Location string `json:"location,omitempty"` 1416 1417 // Title: An optional title for the expression, i.e. a short string 1418 // describing 1419 // its purpose. This can be used e.g. in UIs which allow to enter 1420 // the 1421 // expression. 1422 Title string `json:"title,omitempty"` 1423 1424 // ForceSendFields is a list of field names (e.g. "Description") to 1425 // unconditionally include in API requests. By default, fields with 1426 // empty values are omitted from API requests. However, any non-pointer, 1427 // non-interface field appearing in ForceSendFields will be sent to the 1428 // server regardless of whether the field is empty or not. This may be 1429 // used to include empty fields in Patch requests. 1430 ForceSendFields []string `json:"-"` 1431 1432 // NullFields is a list of field names (e.g. "Description") to include 1433 // in API requests with the JSON null value. By default, fields with 1434 // empty values are omitted from API requests. However, any field with 1435 // an empty value appearing in NullFields will be sent to the server as 1436 // null. It is an error if a field in this list has a non-empty value. 1437 // This may be used to include null fields in Patch requests. 1438 NullFields []string `json:"-"` 1439} 1440 1441func (s *Expr) MarshalJSON() ([]byte, error) { 1442 type NoMethod Expr 1443 raw := NoMethod(*s) 1444 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1445} 1446 1447// FhirConfig: Specifies how de-identification of a FHIR store should be 1448// handled. 1449type FhirConfig struct { 1450 // FieldMetadataList: Specifies FHIR paths to match and how to transform 1451 // them. Any field that 1452 // is not matched by a FieldMetadata will be passed through to the 1453 // output 1454 // dataset unmodified. All extensions are removed in the output. 1455 FieldMetadataList []*FieldMetadata `json:"fieldMetadataList,omitempty"` 1456 1457 // ForceSendFields is a list of field names (e.g. "FieldMetadataList") 1458 // to unconditionally include in API requests. By default, fields with 1459 // empty values are omitted from API requests. However, any non-pointer, 1460 // non-interface field appearing in ForceSendFields will be sent to the 1461 // server regardless of whether the field is empty or not. This may be 1462 // used to include empty fields in Patch requests. 1463 ForceSendFields []string `json:"-"` 1464 1465 // NullFields is a list of field names (e.g. "FieldMetadataList") to 1466 // include in API requests with the JSON null value. By default, fields 1467 // with empty values are omitted from API requests. However, any field 1468 // with an empty value appearing in NullFields will be sent to the 1469 // server as null. It is an error if a field in this list has a 1470 // non-empty value. This may be used to include null fields in Patch 1471 // requests. 1472 NullFields []string `json:"-"` 1473} 1474 1475func (s *FhirConfig) MarshalJSON() ([]byte, error) { 1476 type NoMethod FhirConfig 1477 raw := NoMethod(*s) 1478 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1479} 1480 1481// FhirStore: Represents a FHIR store. 1482type FhirStore struct { 1483 // DisableReferentialIntegrity: Whether to disable referential integrity 1484 // in this FHIR store. This field is 1485 // immutable after FHIR store creation. 1486 // The default value is false, meaning that the API will enforce 1487 // referential 1488 // integrity and fail the requests that will result in inconsistent 1489 // state in 1490 // the FHIR store. 1491 // When this field is set to true, the API will skip referential 1492 // integrity 1493 // check. Consequently, operations that rely on references, such 1494 // as 1495 // GetPatientEverything, will not return all the results if broken 1496 // references 1497 // exist. 1498 DisableReferentialIntegrity bool `json:"disableReferentialIntegrity,omitempty"` 1499 1500 // DisableResourceVersioning: Whether to disable resource versioning for 1501 // this FHIR store. This field can 1502 // not be changed after the creation of FHIR store. 1503 // If set to false, which is the default behavior, all write operations 1504 // will 1505 // cause historical versions to be recorded automatically. The 1506 // historical 1507 // versions can be fetched through the history APIs, but cannot be 1508 // updated. 1509 // If set to true, no historical versions will be kept. The server will 1510 // send 1511 // back errors for attempts to read the historical versions. 1512 DisableResourceVersioning bool `json:"disableResourceVersioning,omitempty"` 1513 1514 // EnableHistoryImport: Whether to allow the bulk import API to accept 1515 // history bundles and directly 1516 // insert historical resource versions into the FHIR store. Importing 1517 // resource 1518 // histories creates resource interactions that appear to have occurred 1519 // in the 1520 // past, which clients may not want to allow. If set to false, history 1521 // bundles 1522 // within an import will fail with an error. 1523 EnableHistoryImport bool `json:"enableHistoryImport,omitempty"` 1524 1525 // EnableUpdateCreate: Whether this FHIR store has the 1526 // [updateCreate 1527 // capability](https://www.hl7.org/fhir/capabilitystatement 1528 // -definitions.html#CapabilityStatement.rest.resource.updateCreate). 1529 // Thi 1530 // s determines if the client can use an Update operation to create a 1531 // new 1532 // resource with a client-specified ID. If false, all IDs are 1533 // server-assigned 1534 // through the Create operation and attempts to Update a non-existent 1535 // resource 1536 // will return errors. Please treat the audit logs with appropriate 1537 // levels of 1538 // care if client-specified resource IDs contain sensitive data such 1539 // as 1540 // patient identifiers, those IDs will be part of the FHIR resource 1541 // path 1542 // recorded in Cloud audit logs and Cloud Pub/Sub notifications. 1543 EnableUpdateCreate bool `json:"enableUpdateCreate,omitempty"` 1544 1545 // Labels: User-supplied key-value pairs used to organize FHIR 1546 // stores. 1547 // 1548 // Label keys must be between 1 and 63 characters long, have a UTF-8 1549 // encoding 1550 // of maximum 128 bytes, and must conform to the 1551 // following PCRE regular expression: 1552 // \p{Ll}\p{Lo}{0,62} 1553 // 1554 // Label values are optional, must be between 1 and 63 characters long, 1555 // have 1556 // a UTF-8 encoding of maximum 128 bytes, and must conform to 1557 // the 1558 // following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} 1559 // 1560 // No more than 64 labels can be associated with a given store. 1561 Labels map[string]string `json:"labels,omitempty"` 1562 1563 // Name: Output only. Resource name of the FHIR store, of the 1564 // form 1565 // `projects/{project_id}/datasets/{dataset_id}/fhirStores/{fhir_sto 1566 // re_id}`. 1567 Name string `json:"name,omitempty"` 1568 1569 // NotificationConfig: If non-empty, publish all resource modifications 1570 // of this FHIR store to 1571 // this destination. The Cloud Pub/Sub message attributes will contain a 1572 // map 1573 // with a string describing the action that has triggered the 1574 // notification, 1575 // e.g. "action":"CreateResource". 1576 NotificationConfig *NotificationConfig `json:"notificationConfig,omitempty"` 1577 1578 // StreamConfigs: A list of streaming configs that configure the 1579 // destinations of streaming 1580 // export for every resource mutation in this FHIR store. Each store 1581 // is 1582 // allowed to have up to 10 streaming configs. 1583 // After a new config is added, the next resource mutation will be 1584 // streamed to 1585 // the new location in addition to the existing ones. 1586 // When a location is removed from the list, the server will simply 1587 // stop 1588 // streaming to that location. Before adding a new config, you must add 1589 // the 1590 // required 1591 // [`bigquery.dataEditor`](https://cloud.google.com/bigquery 1592 // /docs/access-control#bigquery.dataEditor) 1593 // role to your project's **Cloud Healthcare Service Agent** 1594 // [service 1595 // account](https://cloud.google.com/iam/docs/service-accounts). 1596 // Some lag (typically on the order of dozens of seconds) is expected 1597 // before 1598 // the results show up in the streaming destination. 1599 StreamConfigs []*StreamConfig `json:"streamConfigs,omitempty"` 1600 1601 // ServerResponse contains the HTTP response code and headers from the 1602 // server. 1603 googleapi.ServerResponse `json:"-"` 1604 1605 // ForceSendFields is a list of field names (e.g. 1606 // "DisableReferentialIntegrity") to unconditionally include in API 1607 // requests. By default, fields with empty values are omitted from API 1608 // requests. However, any non-pointer, non-interface field appearing in 1609 // ForceSendFields will be sent to the server regardless of whether the 1610 // field is empty or not. This may be used to include empty fields in 1611 // Patch requests. 1612 ForceSendFields []string `json:"-"` 1613 1614 // NullFields is a list of field names (e.g. 1615 // "DisableReferentialIntegrity") to include in API requests with the 1616 // JSON null value. By default, fields with empty values are omitted 1617 // from API requests. However, any field with an empty value appearing 1618 // in NullFields will be sent to the server as null. It is an error if a 1619 // field in this list has a non-empty value. This may be used to include 1620 // null fields in Patch requests. 1621 NullFields []string `json:"-"` 1622} 1623 1624func (s *FhirStore) MarshalJSON() ([]byte, error) { 1625 type NoMethod FhirStore 1626 raw := NoMethod(*s) 1627 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1628} 1629 1630// FieldMetadata: Specifies FHIR paths to match, and how to handle 1631// de-identification of 1632// matching fields. 1633type FieldMetadata struct { 1634 // Action: Deidentify action for one field. 1635 // 1636 // Possible values: 1637 // "ACTION_UNSPECIFIED" - No action specified. 1638 // "TRANSFORM" - Transform the entire field. 1639 // "INSPECT_AND_TRANSFORM" - Inspect and transform any found PHI. When 1640 // `AnnotationConfig` is 1641 // provided, annotations of PHI will be generated, except for Date and 1642 // Datetime. 1643 // "DO_NOT_TRANSFORM" - Do not transform. 1644 Action string `json:"action,omitempty"` 1645 1646 // Paths: List of paths to FHIR fields to be redacted. Each path is 1647 // a 1648 // period-separated list where each component is either a field name 1649 // or 1650 // FHIR type name, for example: Patient, HumanName. 1651 // For "choice" types (those defined in the FHIR spec with the 1652 // form: 1653 // field[x]) we use two separate components. e.g. "deceasedAge.unit" 1654 // is 1655 // matched by "Deceased.Age.unit". 1656 // Supported types are: AdministrativeGenderCode, Code, Date, 1657 // DateTime, 1658 // Decimal, HumanName, Id, LanguageCode, Markdown, MimeTypeCode, 1659 // Oid, 1660 // String, Uri, Uuid, Xhtml. 1661 Paths []string `json:"paths,omitempty"` 1662 1663 // ForceSendFields is a list of field names (e.g. "Action") to 1664 // unconditionally include in API requests. By default, fields with 1665 // empty values are omitted from API requests. However, any non-pointer, 1666 // non-interface field appearing in ForceSendFields will be sent to the 1667 // server regardless of whether the field is empty or not. This may be 1668 // used to include empty fields in Patch requests. 1669 ForceSendFields []string `json:"-"` 1670 1671 // NullFields is a list of field names (e.g. "Action") to include in API 1672 // requests with the JSON null value. By default, fields with empty 1673 // values are omitted from API requests. However, any field with an 1674 // empty value appearing in NullFields will be sent to the server as 1675 // null. It is an error if a field in this list has a non-empty value. 1676 // This may be used to include null fields in Patch requests. 1677 NullFields []string `json:"-"` 1678} 1679 1680func (s *FieldMetadata) MarshalJSON() ([]byte, error) { 1681 type NoMethod FieldMetadata 1682 raw := NoMethod(*s) 1683 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1684} 1685 1686type Finding struct { 1687 // End: Zero-based ending index of the found text, exclusively. 1688 End int64 `json:"end,omitempty,string"` 1689 1690 // InfoType: The type of information stored in this text range (e.g. 1691 // HumanName, 1692 // BirthDate, Address, etc.) 1693 InfoType string `json:"infoType,omitempty"` 1694 1695 // Start: Zero-based starting index of the found text, inclusively. 1696 Start int64 `json:"start,omitempty,string"` 1697 1698 // ForceSendFields is a list of field names (e.g. "End") to 1699 // unconditionally include in API requests. By default, fields with 1700 // empty values are omitted from API requests. However, any non-pointer, 1701 // non-interface field appearing in ForceSendFields will be sent to the 1702 // server regardless of whether the field is empty or not. This may be 1703 // used to include empty fields in Patch requests. 1704 ForceSendFields []string `json:"-"` 1705 1706 // NullFields is a list of field names (e.g. "End") to include in API 1707 // requests with the JSON null value. By default, fields with empty 1708 // values are omitted from API requests. However, any field with an 1709 // empty value appearing in NullFields will be sent to the server as 1710 // null. It is an error if a field in this list has a non-empty value. 1711 // This may be used to include null fields in Patch requests. 1712 NullFields []string `json:"-"` 1713} 1714 1715func (s *Finding) MarshalJSON() ([]byte, error) { 1716 type NoMethod Finding 1717 raw := NoMethod(*s) 1718 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1719} 1720 1721// GetIamPolicyRequest: Request message for `GetIamPolicy` method. 1722type GetIamPolicyRequest struct { 1723} 1724 1725// GoogleCloudHealthcareV1alpha2DicomBigQueryDestination: The BigQuery 1726// table where the output should be written. 1727type GoogleCloudHealthcareV1alpha2DicomBigQueryDestination struct { 1728 // Force: If the destination table already exists and this flag is 1729 // `TRUE`, the table 1730 // will be overwritten by the contents of the DICOM store. If the flag 1731 // is not 1732 // set and the destination table already exists, the export call returns 1733 // an 1734 // error. 1735 Force bool `json:"force,omitempty"` 1736 1737 // TableUri: BigQuery URI to a table, up to 2000 characters long, in the 1738 // format 1739 // `bq://projectId.bqDatasetId.tableId` 1740 TableUri string `json:"tableUri,omitempty"` 1741 1742 // ForceSendFields is a list of field names (e.g. "Force") to 1743 // unconditionally include in API requests. By default, fields with 1744 // empty values are omitted from API requests. However, any non-pointer, 1745 // non-interface field appearing in ForceSendFields will be sent to the 1746 // server regardless of whether the field is empty or not. This may be 1747 // used to include empty fields in Patch requests. 1748 ForceSendFields []string `json:"-"` 1749 1750 // NullFields is a list of field names (e.g. "Force") to include in API 1751 // requests with the JSON null value. By default, fields with empty 1752 // values are omitted from API requests. However, any field with an 1753 // empty value appearing in NullFields will be sent to the server as 1754 // null. It is an error if a field in this list has a non-empty value. 1755 // This may be used to include null fields in Patch requests. 1756 NullFields []string `json:"-"` 1757} 1758 1759func (s *GoogleCloudHealthcareV1alpha2DicomBigQueryDestination) MarshalJSON() ([]byte, error) { 1760 type NoMethod GoogleCloudHealthcareV1alpha2DicomBigQueryDestination 1761 raw := NoMethod(*s) 1762 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1763} 1764 1765// GoogleCloudHealthcareV1alpha2DicomGcsDestination: The Cloud Storage 1766// location where the output should be written, and the 1767// export 1768// configuration. 1769type GoogleCloudHealthcareV1alpha2DicomGcsDestination struct { 1770 // MimeType: MIME types supported by DICOM spec. 1771 // Each file will be written in the following 1772 // format: 1773 // `.../{study_id}/{series_id}/{instance_id}[/{frame_number}].{ex 1774 // tension}` 1775 // The frame_number component will exist only for multi-frame 1776 // instances. 1777 // 1778 // Refer to the DICOM conformance statement for permissible MIME 1779 // types: 1780 // https://cloud.google.com/healthcare/docs/dicom#wado-rs 1781 // 1782 // The following extensions will be used for output files: 1783 // application/dicom -> .dcm 1784 // image/jpeg -> .jpg 1785 // image/png -> .png 1786 // 1787 // If unspecified, the instances will be exported in their 1788 // original 1789 // DICOM format. 1790 MimeType string `json:"mimeType,omitempty"` 1791 1792 // UriPrefix: The Cloud Storage destination to export to. 1793 // 1794 // URI for a Cloud Storage directory where result files should be 1795 // written (in 1796 // the format `gs://{bucket-id}/{path/to/destination/dir}`). If there is 1797 // no 1798 // trailing slash, the service will append one when composing the object 1799 // path. 1800 // The user is responsible for creating the Cloud Storage bucket 1801 // referenced in 1802 // `uri_prefix`. 1803 UriPrefix string `json:"uriPrefix,omitempty"` 1804 1805 // ForceSendFields is a list of field names (e.g. "MimeType") to 1806 // unconditionally include in API requests. By default, fields with 1807 // empty values are omitted from API requests. However, any non-pointer, 1808 // non-interface field appearing in ForceSendFields will be sent to the 1809 // server regardless of whether the field is empty or not. This may be 1810 // used to include empty fields in Patch requests. 1811 ForceSendFields []string `json:"-"` 1812 1813 // NullFields is a list of field names (e.g. "MimeType") to include in 1814 // API requests with the JSON null value. By default, fields with empty 1815 // values are omitted from API requests. However, any field with an 1816 // empty value appearing in NullFields will be sent to the server as 1817 // null. It is an error if a field in this list has a non-empty value. 1818 // This may be used to include null fields in Patch requests. 1819 NullFields []string `json:"-"` 1820} 1821 1822func (s *GoogleCloudHealthcareV1alpha2DicomGcsDestination) MarshalJSON() ([]byte, error) { 1823 type NoMethod GoogleCloudHealthcareV1alpha2DicomGcsDestination 1824 raw := NoMethod(*s) 1825 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1826} 1827 1828// GoogleCloudHealthcareV1alpha2DicomGcsSource: Specifies the 1829// configuration for importing data from Cloud Storage. 1830type GoogleCloudHealthcareV1alpha2DicomGcsSource struct { 1831 // Uri: Points to a Cloud Storage URI containing file(s) with 1832 // content only. The URI must be in the following 1833 // format: 1834 // `gs://{bucket_id}/{object_id}`. The URI can include wildcards 1835 // in 1836 // `object_id` and thus identify multiple files. Supported wildcards: 1837 // '*' to match 0 or more non-separator characters 1838 // '**' to match 0 or more characters (including separators). Must be 1839 // used at 1840 // the end of a path and with no other wildcards in the 1841 // path. Can also be used with a file extension (such as .dcm), 1842 // which 1843 // imports all files with the extension in the specified directory 1844 // and 1845 // its sub-directories. For example, 1846 // `gs://my-bucket/my-directory/**.dcm` imports all files with 1847 // .dcm 1848 // extensions in `my-directory/` and its sub-directories. 1849 // '?' to match 1 character 1850 // All other URI formats are invalid. 1851 // Files matching the wildcard are expected to contain content only, 1852 // no 1853 // metadata. 1854 Uri string `json:"uri,omitempty"` 1855 1856 // ForceSendFields is a list of field names (e.g. "Uri") to 1857 // unconditionally include in API requests. By default, fields with 1858 // empty values are omitted from API requests. However, any non-pointer, 1859 // non-interface field appearing in ForceSendFields will be sent to the 1860 // server regardless of whether the field is empty or not. This may be 1861 // used to include empty fields in Patch requests. 1862 ForceSendFields []string `json:"-"` 1863 1864 // NullFields is a list of field names (e.g. "Uri") to include in API 1865 // requests with the JSON null value. By default, fields with empty 1866 // values are omitted from API requests. However, any field with an 1867 // empty value appearing in NullFields will be sent to the server as 1868 // null. It is an error if a field in this list has a non-empty value. 1869 // This may be used to include null fields in Patch requests. 1870 NullFields []string `json:"-"` 1871} 1872 1873func (s *GoogleCloudHealthcareV1alpha2DicomGcsSource) MarshalJSON() ([]byte, error) { 1874 type NoMethod GoogleCloudHealthcareV1alpha2DicomGcsSource 1875 raw := NoMethod(*s) 1876 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1877} 1878 1879// GoogleCloudHealthcareV1alpha2FhirBigQueryDestination: The 1880// configuration for exporting to BigQuery. 1881type GoogleCloudHealthcareV1alpha2FhirBigQueryDestination struct { 1882 // DatasetUri: BigQuery URI to a dataset, up to 2000 characters long, in 1883 // the format 1884 // `bq://projectId.bqDatasetId` 1885 DatasetUri string `json:"datasetUri,omitempty"` 1886 1887 // SchemaConfig: The configuration for the exported BigQuery schema. 1888 SchemaConfig *SchemaConfig `json:"schemaConfig,omitempty"` 1889 1890 // ForceSendFields is a list of field names (e.g. "DatasetUri") to 1891 // unconditionally include in API requests. By default, fields with 1892 // empty values are omitted from API requests. However, any non-pointer, 1893 // non-interface field appearing in ForceSendFields will be sent to the 1894 // server regardless of whether the field is empty or not. This may be 1895 // used to include empty fields in Patch requests. 1896 ForceSendFields []string `json:"-"` 1897 1898 // NullFields is a list of field names (e.g. "DatasetUri") to include in 1899 // API requests with the JSON null value. By default, fields with empty 1900 // values are omitted from API requests. However, any field with an 1901 // empty value appearing in NullFields will be sent to the server as 1902 // null. It is an error if a field in this list has a non-empty value. 1903 // This may be used to include null fields in Patch requests. 1904 NullFields []string `json:"-"` 1905} 1906 1907func (s *GoogleCloudHealthcareV1alpha2FhirBigQueryDestination) MarshalJSON() ([]byte, error) { 1908 type NoMethod GoogleCloudHealthcareV1alpha2FhirBigQueryDestination 1909 raw := NoMethod(*s) 1910 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1911} 1912 1913// GoogleCloudHealthcareV1alpha2FhirRestExportResourcesResponse: Final 1914// response of exporting resources. 1915// This structure will be included in the 1916// response to describe the detailed 1917// outcome. It will only be included when the operation finishes. 1918type GoogleCloudHealthcareV1alpha2FhirRestExportResourcesResponse struct { 1919 // FhirStore: The name of the FHIR store where resources have been 1920 // exported, in 1921 // the 1922 // format 1923 // `projects/{project_id}/locations/{location_id}/datasets/{da 1924 // taset_id}/fhirStores/{fhir_store_id}`. 1925 FhirStore string `json:"fhirStore,omitempty"` 1926 1927 // ResourceCount: The total number of resources exported from the 1928 // requested FHIR store. 1929 ResourceCount int64 `json:"resourceCount,omitempty,string"` 1930 1931 // ForceSendFields is a list of field names (e.g. "FhirStore") to 1932 // unconditionally include in API requests. By default, fields with 1933 // empty values are omitted from API requests. However, any non-pointer, 1934 // non-interface field appearing in ForceSendFields will be sent to the 1935 // server regardless of whether the field is empty or not. This may be 1936 // used to include empty fields in Patch requests. 1937 ForceSendFields []string `json:"-"` 1938 1939 // NullFields is a list of field names (e.g. "FhirStore") to include in 1940 // API requests with the JSON null value. By default, fields with empty 1941 // values are omitted from API requests. However, any field with an 1942 // empty value appearing in NullFields will be sent to the server as 1943 // null. It is an error if a field in this list has a non-empty value. 1944 // This may be used to include null fields in Patch requests. 1945 NullFields []string `json:"-"` 1946} 1947 1948func (s *GoogleCloudHealthcareV1alpha2FhirRestExportResourcesResponse) MarshalJSON() ([]byte, error) { 1949 type NoMethod GoogleCloudHealthcareV1alpha2FhirRestExportResourcesResponse 1950 raw := NoMethod(*s) 1951 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1952} 1953 1954// GoogleCloudHealthcareV1alpha2FhirRestGcsDestination: The 1955// configuration for exporting to Cloud Storage. 1956type GoogleCloudHealthcareV1alpha2FhirRestGcsDestination struct { 1957 // UriPrefix: URI for a Cloud Storage directory where result files 1958 // should be written (in 1959 // the format `gs://{bucket-id}/{path/to/destination/dir}`). If there is 1960 // no 1961 // trailing slash, the service will append one when composing the object 1962 // path. 1963 // The user is responsible for creating the Cloud Storage bucket 1964 // referenced in 1965 // `uri_prefix`. 1966 UriPrefix string `json:"uriPrefix,omitempty"` 1967 1968 // ForceSendFields is a list of field names (e.g. "UriPrefix") to 1969 // unconditionally include in API requests. By default, fields with 1970 // empty values are omitted from API requests. However, any non-pointer, 1971 // non-interface field appearing in ForceSendFields will be sent to the 1972 // server regardless of whether the field is empty or not. This may be 1973 // used to include empty fields in Patch requests. 1974 ForceSendFields []string `json:"-"` 1975 1976 // NullFields is a list of field names (e.g. "UriPrefix") to include in 1977 // API requests with the JSON null value. By default, fields with empty 1978 // values are omitted from API requests. However, any field with an 1979 // empty value appearing in NullFields will be sent to the server as 1980 // null. It is an error if a field in this list has a non-empty value. 1981 // This may be used to include null fields in Patch requests. 1982 NullFields []string `json:"-"` 1983} 1984 1985func (s *GoogleCloudHealthcareV1alpha2FhirRestGcsDestination) MarshalJSON() ([]byte, error) { 1986 type NoMethod GoogleCloudHealthcareV1alpha2FhirRestGcsDestination 1987 raw := NoMethod(*s) 1988 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1989} 1990 1991// GoogleCloudHealthcareV1alpha2FhirRestGcsErrorDestination: Specifies 1992// the Cloud Storage destination where errors will be recorded. 1993type GoogleCloudHealthcareV1alpha2FhirRestGcsErrorDestination struct { 1994 // UriPrefix: URI for a Cloud Storage directory to which error report 1995 // files should be 1996 // written (in the format `gs://{bucket-id}/{path/to/destination/dir}`). 1997 // If 1998 // there is no trailing slash, the service will append one when 1999 // composing the 2000 // object path. The user is responsible for creating the Cloud Storage 2001 // bucket 2002 // referenced in `uri_prefix`. 2003 UriPrefix string `json:"uriPrefix,omitempty"` 2004 2005 // ForceSendFields is a list of field names (e.g. "UriPrefix") to 2006 // unconditionally include in API requests. By default, fields with 2007 // empty values are omitted from API requests. However, any non-pointer, 2008 // non-interface field appearing in ForceSendFields will be sent to the 2009 // server regardless of whether the field is empty or not. This may be 2010 // used to include empty fields in Patch requests. 2011 ForceSendFields []string `json:"-"` 2012 2013 // NullFields is a list of field names (e.g. "UriPrefix") to include in 2014 // API requests with the JSON null value. By default, fields with empty 2015 // values are omitted from API requests. However, any field with an 2016 // empty value appearing in NullFields will be sent to the server as 2017 // null. It is an error if a field in this list has a non-empty value. 2018 // This may be used to include null fields in Patch requests. 2019 NullFields []string `json:"-"` 2020} 2021 2022func (s *GoogleCloudHealthcareV1alpha2FhirRestGcsErrorDestination) MarshalJSON() ([]byte, error) { 2023 type NoMethod GoogleCloudHealthcareV1alpha2FhirRestGcsErrorDestination 2024 raw := NoMethod(*s) 2025 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2026} 2027 2028// GoogleCloudHealthcareV1alpha2FhirRestGcsSource: Specifies the 2029// configuration for importing data from Cloud Storage. 2030type GoogleCloudHealthcareV1alpha2FhirRestGcsSource struct { 2031 // Uri: Points to a Cloud Storage URI containing file(s) to import. 2032 // 2033 // The URI must be in the following format: 2034 // `gs://{bucket_id}/{object_id}`. 2035 // The URI can include wildcards in `object_id` and thus identify 2036 // multiple 2037 // files. Supported wildcards: 2038 // 2039 // * `*` to match 0 or more non-separator characters 2040 // * `**` to match 0 or more characters (including separators). Must be 2041 // used 2042 // at the end of a path and with no other wildcards in the 2043 // path. Can also be used with a file extension (such as .ndjson), 2044 // which 2045 // imports all files with the extension in the specified directory 2046 // and 2047 // its sub-directories. For example, 2048 // `gs://my-bucket/my-directory/**.ndjson` 2049 // imports all files with `.ndjson` extensions in `my-directory/` and 2050 // its 2051 // sub-directories. 2052 // * `?` to match 1 character 2053 // 2054 // Files matching the wildcard are expected to contain content only, 2055 // no 2056 // metadata. 2057 Uri string `json:"uri,omitempty"` 2058 2059 // ForceSendFields is a list of field names (e.g. "Uri") to 2060 // unconditionally include in API requests. By default, fields with 2061 // empty values are omitted from API requests. However, any non-pointer, 2062 // non-interface field appearing in ForceSendFields will be sent to the 2063 // server regardless of whether the field is empty or not. This may be 2064 // used to include empty fields in Patch requests. 2065 ForceSendFields []string `json:"-"` 2066 2067 // NullFields is a list of field names (e.g. "Uri") to include in API 2068 // requests with the JSON null value. By default, fields with empty 2069 // values are omitted from API requests. However, any field with an 2070 // empty value appearing in NullFields will be sent to the server as 2071 // null. It is an error if a field in this list has a non-empty value. 2072 // This may be used to include null fields in Patch requests. 2073 NullFields []string `json:"-"` 2074} 2075 2076func (s *GoogleCloudHealthcareV1alpha2FhirRestGcsSource) MarshalJSON() ([]byte, error) { 2077 type NoMethod GoogleCloudHealthcareV1alpha2FhirRestGcsSource 2078 raw := NoMethod(*s) 2079 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2080} 2081 2082// GoogleCloudHealthcareV1alpha2FhirRestImportResourcesErrorDetails: 2083// Error response of importing resources. 2084// This structure will be included in the 2085// error details to describe the 2086// detailed error. It will only be included when the operation finishes 2087// with 2088// some failure. 2089type GoogleCloudHealthcareV1alpha2FhirRestImportResourcesErrorDetails struct { 2090 // ErrorCount: The number of resources that had errors. 2091 ErrorCount int64 `json:"errorCount,omitempty,string"` 2092 2093 // FhirStore: The name of the FHIR store where resources have been 2094 // imported, in 2095 // the 2096 // format 2097 // `projects/{project_id}/locations/{location_id}/datasets/{da 2098 // taset_id}/fhirStores/{fhir_store_id}`. 2099 FhirStore string `json:"fhirStore,omitempty"` 2100 2101 // InputSize: The total number of resources included in the source data. 2102 // This is the sum 2103 // of the success and error counts. 2104 InputSize int64 `json:"inputSize,omitempty,string"` 2105 2106 // SuccessCount: The number of resources that have been imported. 2107 SuccessCount int64 `json:"successCount,omitempty,string"` 2108 2109 // ForceSendFields is a list of field names (e.g. "ErrorCount") to 2110 // unconditionally include in API requests. By default, fields with 2111 // empty values are omitted from API requests. However, any non-pointer, 2112 // non-interface field appearing in ForceSendFields will be sent to the 2113 // server regardless of whether the field is empty or not. This may be 2114 // used to include empty fields in Patch requests. 2115 ForceSendFields []string `json:"-"` 2116 2117 // NullFields is a list of field names (e.g. "ErrorCount") to include in 2118 // API requests with the JSON null value. By default, fields with empty 2119 // values are omitted from API requests. However, any field with an 2120 // empty value appearing in NullFields will be sent to the server as 2121 // null. It is an error if a field in this list has a non-empty value. 2122 // This may be used to include null fields in Patch requests. 2123 NullFields []string `json:"-"` 2124} 2125 2126func (s *GoogleCloudHealthcareV1alpha2FhirRestImportResourcesErrorDetails) MarshalJSON() ([]byte, error) { 2127 type NoMethod GoogleCloudHealthcareV1alpha2FhirRestImportResourcesErrorDetails 2128 raw := NoMethod(*s) 2129 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2130} 2131 2132// GoogleCloudHealthcareV1alpha2FhirRestImportResourcesResponse: Final 2133// response of importing resources. 2134// This structure will be included in the 2135// response to describe the detailed 2136// outcome. It will only be included when the operation finishes 2137// successfully. 2138type GoogleCloudHealthcareV1alpha2FhirRestImportResourcesResponse struct { 2139 // FhirStore: The name of the FHIR store where the resources have been 2140 // imported, in 2141 // the 2142 // format 2143 // `projects/{project_id}/locations/{location_id}/datasets/{da 2144 // taset_id}/fhirStores/{fhir_store_id}`. 2145 FhirStore string `json:"fhirStore,omitempty"` 2146 2147 // InputSize: The total number of resources included in the source data. 2148 InputSize int64 `json:"inputSize,omitempty,string"` 2149 2150 // ForceSendFields is a list of field names (e.g. "FhirStore") to 2151 // unconditionally include in API requests. By default, fields with 2152 // empty values are omitted from API requests. However, any non-pointer, 2153 // non-interface field appearing in ForceSendFields will be sent to the 2154 // server regardless of whether the field is empty or not. This may be 2155 // used to include empty fields in Patch requests. 2156 ForceSendFields []string `json:"-"` 2157 2158 // NullFields is a list of field names (e.g. "FhirStore") to include in 2159 // API requests with the JSON null value. By default, fields with empty 2160 // values are omitted from API requests. However, any field with an 2161 // empty value appearing in NullFields will be sent to the server as 2162 // null. It is an error if a field in this list has a non-empty value. 2163 // This may be used to include null fields in Patch requests. 2164 NullFields []string `json:"-"` 2165} 2166 2167func (s *GoogleCloudHealthcareV1alpha2FhirRestImportResourcesResponse) MarshalJSON() ([]byte, error) { 2168 type NoMethod GoogleCloudHealthcareV1alpha2FhirRestImportResourcesResponse 2169 raw := NoMethod(*s) 2170 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2171} 2172 2173// Hl7V2Store: Represents an HL7v2 store. 2174type Hl7V2Store struct { 2175 // Labels: User-supplied key-value pairs used to organize HL7v2 2176 // stores. 2177 // 2178 // Label keys must be between 1 and 63 characters long, have a UTF-8 2179 // encoding 2180 // of maximum 128 bytes, and must conform to the 2181 // following PCRE regular expression: 2182 // \p{Ll}\p{Lo}{0,62} 2183 // 2184 // Label values are optional, must be between 1 and 63 characters long, 2185 // have 2186 // a UTF-8 encoding of maximum 128 bytes, and must conform to 2187 // the 2188 // following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} 2189 // 2190 // No more than 64 labels can be associated with a given store. 2191 Labels map[string]string `json:"labels,omitempty"` 2192 2193 // Name: Output only. Resource name of the HL7v2 store, of the 2194 // form 2195 // `projects/{project_id}/datasets/{dataset_id}/hl7V2Stores/{hl7v2_s 2196 // tore_id}`. 2197 Name string `json:"name,omitempty"` 2198 2199 // NotificationConfig: The notification destination all messages (both 2200 // Ingest & Create) are 2201 // published on. Only the message name is sent as part of the 2202 // notification. If 2203 // this is unset, no notifications will be sent. Supplied by the client. 2204 NotificationConfig *NotificationConfig `json:"notificationConfig,omitempty"` 2205 2206 // ParserConfig: The configuration for the parser. It determines how the 2207 // server parses the 2208 // messages. 2209 ParserConfig *ParserConfig `json:"parserConfig,omitempty"` 2210 2211 // ServerResponse contains the HTTP response code and headers from the 2212 // server. 2213 googleapi.ServerResponse `json:"-"` 2214 2215 // ForceSendFields is a list of field names (e.g. "Labels") to 2216 // unconditionally include in API requests. By default, fields with 2217 // empty values are omitted from API requests. However, any non-pointer, 2218 // non-interface field appearing in ForceSendFields will be sent to the 2219 // server regardless of whether the field is empty or not. This may be 2220 // used to include empty fields in Patch requests. 2221 ForceSendFields []string `json:"-"` 2222 2223 // NullFields is a list of field names (e.g. "Labels") to include in API 2224 // requests with the JSON null value. By default, fields with empty 2225 // values are omitted from API requests. However, any field with an 2226 // empty value appearing in NullFields will be sent to the server as 2227 // null. It is an error if a field in this list has a non-empty value. 2228 // This may be used to include null fields in Patch requests. 2229 NullFields []string `json:"-"` 2230} 2231 2232func (s *Hl7V2Store) MarshalJSON() ([]byte, error) { 2233 type NoMethod Hl7V2Store 2234 raw := NoMethod(*s) 2235 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2236} 2237 2238// HttpBody: Message that represents an arbitrary HTTP body. It should 2239// only be used for 2240// payload formats that can't be represented as JSON, such as raw binary 2241// or 2242// an HTML page. 2243// 2244// 2245// This message can be used both in streaming and non-streaming API 2246// methods in 2247// the request as well as the response. 2248// 2249// It can be used as a top-level request field, which is convenient if 2250// one 2251// wants to extract parameters from either the URL or HTTP template into 2252// the 2253// request fields and also want access to the raw HTTP body. 2254// 2255// Example: 2256// 2257// message GetResourceRequest { 2258// // A unique request id. 2259// string request_id = 1; 2260// 2261// // The raw HTTP body is bound to this field. 2262// google.api.HttpBody http_body = 2; 2263// } 2264// 2265// service ResourceService { 2266// rpc GetResource(GetResourceRequest) returns 2267// (google.api.HttpBody); 2268// rpc UpdateResource(google.api.HttpBody) returns 2269// (google.protobuf.Empty); 2270// } 2271// 2272// Example with streaming methods: 2273// 2274// service CaldavService { 2275// rpc GetCalendar(stream google.api.HttpBody) 2276// returns (stream google.api.HttpBody); 2277// rpc UpdateCalendar(stream google.api.HttpBody) 2278// returns (stream google.api.HttpBody); 2279// } 2280// 2281// Use of this type only changes how the request and response bodies 2282// are 2283// handled, all other features will continue to work unchanged. 2284type HttpBody struct { 2285 // ContentType: The HTTP Content-Type header value specifying the 2286 // content type of the body. 2287 ContentType string `json:"contentType,omitempty"` 2288 2289 // Data: The HTTP request/response body as raw binary. 2290 Data string `json:"data,omitempty"` 2291 2292 // Extensions: Application specific response metadata. Must be set in 2293 // the first response 2294 // for streaming APIs. 2295 Extensions []googleapi.RawMessage `json:"extensions,omitempty"` 2296 2297 // ServerResponse contains the HTTP response code and headers from the 2298 // server. 2299 googleapi.ServerResponse `json:"-"` 2300 2301 // ForceSendFields is a list of field names (e.g. "ContentType") to 2302 // unconditionally include in API requests. By default, fields with 2303 // empty values are omitted from API requests. However, any non-pointer, 2304 // non-interface field appearing in ForceSendFields will be sent to the 2305 // server regardless of whether the field is empty or not. This may be 2306 // used to include empty fields in Patch requests. 2307 ForceSendFields []string `json:"-"` 2308 2309 // NullFields is a list of field names (e.g. "ContentType") to include 2310 // in API requests with the JSON null value. By default, fields with 2311 // empty values are omitted from API requests. However, any field with 2312 // an empty value appearing in NullFields will be sent to the server as 2313 // null. It is an error if a field in this list has a non-empty value. 2314 // This may be used to include null fields in Patch requests. 2315 NullFields []string `json:"-"` 2316} 2317 2318func (s *HttpBody) MarshalJSON() ([]byte, error) { 2319 type NoMethod HttpBody 2320 raw := NoMethod(*s) 2321 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2322} 2323 2324// ImageAnnotation: Image annotation. 2325type ImageAnnotation struct { 2326 // BoundingPolys: The list of polygons outlining the sensitive regions 2327 // in the image. 2328 BoundingPolys []*BoundingPoly `json:"boundingPolys,omitempty"` 2329 2330 // ForceSendFields is a list of field names (e.g. "BoundingPolys") to 2331 // unconditionally include in API requests. By default, fields with 2332 // empty values are omitted from API requests. However, any non-pointer, 2333 // non-interface field appearing in ForceSendFields will be sent to the 2334 // server regardless of whether the field is empty or not. This may be 2335 // used to include empty fields in Patch requests. 2336 ForceSendFields []string `json:"-"` 2337 2338 // NullFields is a list of field names (e.g. "BoundingPolys") to include 2339 // in API requests with the JSON null value. By default, fields with 2340 // empty values are omitted from API requests. However, any field with 2341 // an empty value appearing in NullFields will be sent to the server as 2342 // null. It is an error if a field in this list has a non-empty value. 2343 // This may be used to include null fields in Patch requests. 2344 NullFields []string `json:"-"` 2345} 2346 2347func (s *ImageAnnotation) MarshalJSON() ([]byte, error) { 2348 type NoMethod ImageAnnotation 2349 raw := NoMethod(*s) 2350 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2351} 2352 2353// ImageConfig: Specifies how de-identification of image pixel should be 2354// handled. 2355type ImageConfig struct { 2356 // TextRedactionMode: Determines how to redact text from image. 2357 // 2358 // Possible values: 2359 // "TEXT_REDACTION_MODE_UNSPECIFIED" - No text redaction specified. 2360 // Same as REDACT_NO_TEXT. 2361 // "REDACT_ALL_TEXT" - Redact all text. 2362 // "REDACT_SENSITIVE_TEXT" - Redact sensitive text. 2363 // "REDACT_NO_TEXT" - Do not redact text. 2364 TextRedactionMode string `json:"textRedactionMode,omitempty"` 2365 2366 // ForceSendFields is a list of field names (e.g. "TextRedactionMode") 2367 // to unconditionally include in API requests. By default, fields with 2368 // empty values are omitted from API requests. However, any non-pointer, 2369 // non-interface field appearing in ForceSendFields will be sent to the 2370 // server regardless of whether the field is empty or not. This may be 2371 // used to include empty fields in Patch requests. 2372 ForceSendFields []string `json:"-"` 2373 2374 // NullFields is a list of field names (e.g. "TextRedactionMode") to 2375 // include in API requests with the JSON null value. By default, fields 2376 // with empty values are omitted from API requests. However, any field 2377 // with an empty value appearing in NullFields will be sent to the 2378 // server as null. It is an error if a field in this list has a 2379 // non-empty value. This may be used to include null fields in Patch 2380 // requests. 2381 NullFields []string `json:"-"` 2382} 2383 2384func (s *ImageConfig) MarshalJSON() ([]byte, error) { 2385 type NoMethod ImageConfig 2386 raw := NoMethod(*s) 2387 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2388} 2389 2390// ImportDicomDataErrorDetails: Returns the errors encountered during 2391// DICOM store import. 2392type ImportDicomDataErrorDetails struct { 2393 // SampleErrors: Deprecated. Use only for debugging purposes. 2394 // 2395 // Contains sample errors encountered in imports of individual 2396 // resources 2397 // (for example, a Cloud Storage object). 2398 SampleErrors []*ErrorDetail `json:"sampleErrors,omitempty"` 2399 2400 // ForceSendFields is a list of field names (e.g. "SampleErrors") to 2401 // unconditionally include in API requests. By default, fields with 2402 // empty values are omitted from API requests. However, any non-pointer, 2403 // non-interface field appearing in ForceSendFields will be sent to the 2404 // server regardless of whether the field is empty or not. This may be 2405 // used to include empty fields in Patch requests. 2406 ForceSendFields []string `json:"-"` 2407 2408 // NullFields is a list of field names (e.g. "SampleErrors") to include 2409 // in API requests with the JSON null value. By default, fields with 2410 // empty values are omitted from API requests. However, any field with 2411 // an empty value appearing in NullFields will be sent to the server as 2412 // null. It is an error if a field in this list has a non-empty value. 2413 // This may be used to include null fields in Patch requests. 2414 NullFields []string `json:"-"` 2415} 2416 2417func (s *ImportDicomDataErrorDetails) MarshalJSON() ([]byte, error) { 2418 type NoMethod ImportDicomDataErrorDetails 2419 raw := NoMethod(*s) 2420 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2421} 2422 2423// ImportDicomDataRequest: Imports data into the specified DICOM 2424// store. 2425// Returns an error if any of the files to import are not DICOM files. 2426// This 2427// API will accept duplicate DICOM instances, by simply ignoring the 2428// newly 2429// pushed instance (it will not overwrite). 2430type ImportDicomDataRequest struct { 2431 // GcsSource: Cloud Storage source data location and import 2432 // configuration. 2433 // 2434 // The Cloud Storage location requires the 2435 // `roles/storage.objectViewer` 2436 // Cloud IAM role. 2437 GcsSource *GoogleCloudHealthcareV1alpha2DicomGcsSource `json:"gcsSource,omitempty"` 2438 2439 // ForceSendFields is a list of field names (e.g. "GcsSource") to 2440 // unconditionally include in API requests. By default, fields with 2441 // empty values are omitted from API requests. However, any non-pointer, 2442 // non-interface field appearing in ForceSendFields will be sent to the 2443 // server regardless of whether the field is empty or not. This may be 2444 // used to include empty fields in Patch requests. 2445 ForceSendFields []string `json:"-"` 2446 2447 // NullFields is a list of field names (e.g. "GcsSource") to include in 2448 // API requests with the JSON null value. By default, fields with empty 2449 // values are omitted from API requests. However, any field with an 2450 // empty value appearing in NullFields will be sent to the server as 2451 // null. It is an error if a field in this list has a non-empty value. 2452 // This may be used to include null fields in Patch requests. 2453 NullFields []string `json:"-"` 2454} 2455 2456func (s *ImportDicomDataRequest) MarshalJSON() ([]byte, error) { 2457 type NoMethod ImportDicomDataRequest 2458 raw := NoMethod(*s) 2459 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2460} 2461 2462// ImportResourcesRequest: Request to import resources. 2463type ImportResourcesRequest struct { 2464 // ContentStructure: The content structure in the source location. If 2465 // not specified, the server 2466 // treats the input source files as BUNDLE. 2467 // 2468 // Possible values: 2469 // "CONTENT_STRUCTURE_UNSPECIFIED" 2470 // "BUNDLE" - The source file contains one or more lines of 2471 // newline-delimited JSON 2472 // (ndjson). Each line is a bundle, which contains one or more 2473 // resources. 2474 // Set the bundle type to `history` to import resource versions. 2475 // "RESOURCE" - The source file contains one or more lines of 2476 // newline-delimited JSON 2477 // (ndjson). Each line is a single resource. 2478 // "BUNDLE_PRETTY" - The entire file is one JSON bundle. The JSON can 2479 // span multiple lines. 2480 // "RESOURCE_PRETTY" - The entire file is one JSON resource. The JSON 2481 // can span multiple lines. 2482 ContentStructure string `json:"contentStructure,omitempty"` 2483 2484 // GcsErrorDestination: The Cloud Storage destination to write the error 2485 // report to. 2486 // 2487 // The Cloud Storage location requires the `roles/storage.objectAdmin` 2488 // Cloud 2489 // IAM role. 2490 // 2491 // Note that writing a file to the same destination multiple times 2492 // will 2493 // result in the previous version of the file being overwritten. 2494 GcsErrorDestination *GoogleCloudHealthcareV1alpha2FhirRestGcsErrorDestination `json:"gcsErrorDestination,omitempty"` 2495 2496 // GcsSource: Cloud Storage source data location and import 2497 // configuration. 2498 // 2499 // The Cloud Storage location requires the 2500 // `roles/storage.objectViewer` 2501 // Cloud IAM role. 2502 // 2503 // Each Cloud Storage object should be a text file that contains the 2504 // format 2505 // specified in ContentStructu. 2506 GcsSource *GoogleCloudHealthcareV1alpha2FhirRestGcsSource `json:"gcsSource,omitempty"` 2507 2508 // ForceSendFields is a list of field names (e.g. "ContentStructure") to 2509 // unconditionally include in API requests. By default, fields with 2510 // empty values are omitted from API requests. However, any non-pointer, 2511 // non-interface field appearing in ForceSendFields will be sent to the 2512 // server regardless of whether the field is empty or not. This may be 2513 // used to include empty fields in Patch requests. 2514 ForceSendFields []string `json:"-"` 2515 2516 // NullFields is a list of field names (e.g. "ContentStructure") to 2517 // include in API requests with the JSON null value. By default, fields 2518 // with empty values are omitted from API requests. However, any field 2519 // with an empty value appearing in NullFields will be sent to the 2520 // server as null. It is an error if a field in this list has a 2521 // non-empty value. This may be used to include null fields in Patch 2522 // requests. 2523 NullFields []string `json:"-"` 2524} 2525 2526func (s *ImportResourcesRequest) MarshalJSON() ([]byte, error) { 2527 type NoMethod ImportResourcesRequest 2528 raw := NoMethod(*s) 2529 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2530} 2531 2532// InfoTypeTransformation: A transformation to apply to text that is 2533// identified as a specific 2534// info_type. 2535type InfoTypeTransformation struct { 2536 // CharacterMaskConfig: Config for character mask. 2537 CharacterMaskConfig *CharacterMaskConfig `json:"characterMaskConfig,omitempty"` 2538 2539 // CryptoHashConfig: Config for crypto hash. 2540 CryptoHashConfig *CryptoHashConfig `json:"cryptoHashConfig,omitempty"` 2541 2542 // DateShiftConfig: Config for date shift. 2543 DateShiftConfig *DateShiftConfig `json:"dateShiftConfig,omitempty"` 2544 2545 // InfoTypes: InfoTypes to apply this transformation to. If this is not 2546 // specified, the 2547 // transformation applies to any info_type. 2548 InfoTypes []string `json:"infoTypes,omitempty"` 2549 2550 // RedactConfig: Config for text redaction. 2551 RedactConfig *RedactConfig `json:"redactConfig,omitempty"` 2552 2553 // ReplaceWithInfoTypeConfig: Config for replace with InfoType. 2554 ReplaceWithInfoTypeConfig *ReplaceWithInfoTypeConfig `json:"replaceWithInfoTypeConfig,omitempty"` 2555 2556 // ForceSendFields is a list of field names (e.g. "CharacterMaskConfig") 2557 // to unconditionally include in API requests. By default, fields with 2558 // empty values are omitted from API requests. However, any non-pointer, 2559 // non-interface field appearing in ForceSendFields will be sent to the 2560 // server regardless of whether the field is empty or not. This may be 2561 // used to include empty fields in Patch requests. 2562 ForceSendFields []string `json:"-"` 2563 2564 // NullFields is a list of field names (e.g. "CharacterMaskConfig") to 2565 // include in API requests with the JSON null value. By default, fields 2566 // with empty values are omitted from API requests. However, any field 2567 // with an empty value appearing in NullFields will be sent to the 2568 // server as null. It is an error if a field in this list has a 2569 // non-empty value. This may be used to include null fields in Patch 2570 // requests. 2571 NullFields []string `json:"-"` 2572} 2573 2574func (s *InfoTypeTransformation) MarshalJSON() ([]byte, error) { 2575 type NoMethod InfoTypeTransformation 2576 raw := NoMethod(*s) 2577 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2578} 2579 2580// IngestMessageRequest: Ingests a message into the specified HL7v2 2581// store. 2582type IngestMessageRequest struct { 2583 // Message: HL7v2 message to ingest. 2584 Message *Message `json:"message,omitempty"` 2585 2586 // ForceSendFields is a list of field names (e.g. "Message") to 2587 // unconditionally include in API requests. By default, fields with 2588 // empty values are omitted from API requests. However, any non-pointer, 2589 // non-interface field appearing in ForceSendFields will be sent to the 2590 // server regardless of whether the field is empty or not. This may be 2591 // used to include empty fields in Patch requests. 2592 ForceSendFields []string `json:"-"` 2593 2594 // NullFields is a list of field names (e.g. "Message") to include in 2595 // API requests with the JSON null value. By default, fields with empty 2596 // values are omitted from API requests. However, any field with an 2597 // empty value appearing in NullFields will be sent to the server as 2598 // null. It is an error if a field in this list has a non-empty value. 2599 // This may be used to include null fields in Patch requests. 2600 NullFields []string `json:"-"` 2601} 2602 2603func (s *IngestMessageRequest) MarshalJSON() ([]byte, error) { 2604 type NoMethod IngestMessageRequest 2605 raw := NoMethod(*s) 2606 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2607} 2608 2609// IngestMessageResponse: Acknowledges that a message has been ingested 2610// into the specified 2611// HL7v2 store. 2612type IngestMessageResponse struct { 2613 // Hl7Ack: HL7v2 ACK message. 2614 Hl7Ack string `json:"hl7Ack,omitempty"` 2615 2616 // Message: Created message resource. 2617 Message *Message `json:"message,omitempty"` 2618 2619 // ServerResponse contains the HTTP response code and headers from the 2620 // server. 2621 googleapi.ServerResponse `json:"-"` 2622 2623 // ForceSendFields is a list of field names (e.g. "Hl7Ack") to 2624 // unconditionally include in API requests. By default, fields with 2625 // empty values are omitted from API requests. However, any non-pointer, 2626 // non-interface field appearing in ForceSendFields will be sent to the 2627 // server regardless of whether the field is empty or not. This may be 2628 // used to include empty fields in Patch requests. 2629 ForceSendFields []string `json:"-"` 2630 2631 // NullFields is a list of field names (e.g. "Hl7Ack") to include in API 2632 // requests with the JSON null value. By default, fields with empty 2633 // values are omitted from API requests. However, any field with an 2634 // empty value appearing in NullFields will be sent to the server as 2635 // null. It is an error if a field in this list has a non-empty value. 2636 // This may be used to include null fields in Patch requests. 2637 NullFields []string `json:"-"` 2638} 2639 2640func (s *IngestMessageResponse) MarshalJSON() ([]byte, error) { 2641 type NoMethod IngestMessageResponse 2642 raw := NoMethod(*s) 2643 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2644} 2645 2646// ListAnnotationStoresResponse: Lists the Annotation stores 2647// in the given dataset. 2648type ListAnnotationStoresResponse struct { 2649 // AnnotationStores: The returned Annotation stores. Won't be more 2650 // Annotation stores than the 2651 // value of page_size in the request. 2652 AnnotationStores []*AnnotationStore `json:"annotationStores,omitempty"` 2653 2654 // NextPageToken: Token to retrieve the next page of results or empty if 2655 // there are no more 2656 // results in the list. 2657 NextPageToken string `json:"nextPageToken,omitempty"` 2658 2659 // ServerResponse contains the HTTP response code and headers from the 2660 // server. 2661 googleapi.ServerResponse `json:"-"` 2662 2663 // ForceSendFields is a list of field names (e.g. "AnnotationStores") to 2664 // unconditionally include in API requests. By default, fields with 2665 // empty values are omitted from API requests. However, any non-pointer, 2666 // non-interface field appearing in ForceSendFields will be sent to the 2667 // server regardless of whether the field is empty or not. This may be 2668 // used to include empty fields in Patch requests. 2669 ForceSendFields []string `json:"-"` 2670 2671 // NullFields is a list of field names (e.g. "AnnotationStores") to 2672 // include in API requests with the JSON null value. By default, fields 2673 // with empty values are omitted from API requests. However, any field 2674 // with an empty value appearing in NullFields will be sent to the 2675 // server as null. It is an error if a field in this list has a 2676 // non-empty value. This may be used to include null fields in Patch 2677 // requests. 2678 NullFields []string `json:"-"` 2679} 2680 2681func (s *ListAnnotationStoresResponse) MarshalJSON() ([]byte, error) { 2682 type NoMethod ListAnnotationStoresResponse 2683 raw := NoMethod(*s) 2684 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2685} 2686 2687// ListAnnotationsResponse: Lists the Annotations in the 2688// specified 2689// Annotation store. 2690type ListAnnotationsResponse struct { 2691 // Annotations: The returned Annotations names. Won't be more values 2692 // than the value of 2693 // page_size in the request. 2694 Annotations []string `json:"annotations,omitempty"` 2695 2696 // NextPageToken: Token to retrieve the next page of results or empty if 2697 // there are no more 2698 // results in the list. 2699 NextPageToken string `json:"nextPageToken,omitempty"` 2700 2701 // ServerResponse contains the HTTP response code and headers from the 2702 // server. 2703 googleapi.ServerResponse `json:"-"` 2704 2705 // ForceSendFields is a list of field names (e.g. "Annotations") to 2706 // unconditionally include in API requests. By default, fields with 2707 // empty values are omitted from API requests. However, any non-pointer, 2708 // non-interface field appearing in ForceSendFields will be sent to the 2709 // server regardless of whether the field is empty or not. This may be 2710 // used to include empty fields in Patch requests. 2711 ForceSendFields []string `json:"-"` 2712 2713 // NullFields is a list of field names (e.g. "Annotations") to include 2714 // in API requests with the JSON null value. By default, fields with 2715 // empty values are omitted from API requests. However, any field with 2716 // an empty value appearing in NullFields will be sent to the server as 2717 // null. It is an error if a field in this list has a non-empty value. 2718 // This may be used to include null fields in Patch requests. 2719 NullFields []string `json:"-"` 2720} 2721 2722func (s *ListAnnotationsResponse) MarshalJSON() ([]byte, error) { 2723 type NoMethod ListAnnotationsResponse 2724 raw := NoMethod(*s) 2725 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2726} 2727 2728// ListDatasetsResponse: Lists the available datasets. 2729type ListDatasetsResponse struct { 2730 // Datasets: The first page of datasets. 2731 Datasets []*Dataset `json:"datasets,omitempty"` 2732 2733 // NextPageToken: Token to retrieve the next page of results, or empty 2734 // if there are no 2735 // more results in the list. 2736 NextPageToken string `json:"nextPageToken,omitempty"` 2737 2738 // ServerResponse contains the HTTP response code and headers from the 2739 // server. 2740 googleapi.ServerResponse `json:"-"` 2741 2742 // ForceSendFields is a list of field names (e.g. "Datasets") to 2743 // unconditionally include in API requests. By default, fields with 2744 // empty values are omitted from API requests. However, any non-pointer, 2745 // non-interface field appearing in ForceSendFields will be sent to the 2746 // server regardless of whether the field is empty or not. This may be 2747 // used to include empty fields in Patch requests. 2748 ForceSendFields []string `json:"-"` 2749 2750 // NullFields is a list of field names (e.g. "Datasets") to include in 2751 // API requests with the JSON null value. By default, fields with empty 2752 // values are omitted from API requests. However, any field with an 2753 // empty value appearing in NullFields will be sent to the server as 2754 // null. It is an error if a field in this list has a non-empty value. 2755 // This may be used to include null fields in Patch requests. 2756 NullFields []string `json:"-"` 2757} 2758 2759func (s *ListDatasetsResponse) MarshalJSON() ([]byte, error) { 2760 type NoMethod ListDatasetsResponse 2761 raw := NoMethod(*s) 2762 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2763} 2764 2765// ListDicomStoresResponse: Lists the DICOM stores in the given dataset. 2766type ListDicomStoresResponse struct { 2767 // DicomStores: The returned DICOM stores. Won't be more DICOM stores 2768 // than the value of 2769 // page_size in the request. 2770 DicomStores []*DicomStore `json:"dicomStores,omitempty"` 2771 2772 // NextPageToken: Token to retrieve the next page of results or empty if 2773 // there are no more 2774 // results in the list. 2775 NextPageToken string `json:"nextPageToken,omitempty"` 2776 2777 // ServerResponse contains the HTTP response code and headers from the 2778 // server. 2779 googleapi.ServerResponse `json:"-"` 2780 2781 // ForceSendFields is a list of field names (e.g. "DicomStores") to 2782 // unconditionally include in API requests. By default, fields with 2783 // empty values are omitted from API requests. However, any non-pointer, 2784 // non-interface field appearing in ForceSendFields will be sent to the 2785 // server regardless of whether the field is empty or not. This may be 2786 // used to include empty fields in Patch requests. 2787 ForceSendFields []string `json:"-"` 2788 2789 // NullFields is a list of field names (e.g. "DicomStores") to include 2790 // in API requests with the JSON null value. By default, fields with 2791 // empty values are omitted from API requests. However, any field with 2792 // an empty value appearing in NullFields will be sent to the server as 2793 // null. It is an error if a field in this list has a non-empty value. 2794 // This may be used to include null fields in Patch requests. 2795 NullFields []string `json:"-"` 2796} 2797 2798func (s *ListDicomStoresResponse) MarshalJSON() ([]byte, error) { 2799 type NoMethod ListDicomStoresResponse 2800 raw := NoMethod(*s) 2801 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2802} 2803 2804// ListFhirStoresResponse: Lists the FHIR stores in the given dataset. 2805type ListFhirStoresResponse struct { 2806 // FhirStores: The returned FHIR stores. Won't be more FHIR stores than 2807 // the value of 2808 // page_size in the request. 2809 FhirStores []*FhirStore `json:"fhirStores,omitempty"` 2810 2811 // NextPageToken: Token to retrieve the next page of results or empty if 2812 // there are no more 2813 // results in the list. 2814 NextPageToken string `json:"nextPageToken,omitempty"` 2815 2816 // ServerResponse contains the HTTP response code and headers from the 2817 // server. 2818 googleapi.ServerResponse `json:"-"` 2819 2820 // ForceSendFields is a list of field names (e.g. "FhirStores") to 2821 // unconditionally include in API requests. By default, fields with 2822 // empty values are omitted from API requests. However, any non-pointer, 2823 // non-interface field appearing in ForceSendFields will be sent to the 2824 // server regardless of whether the field is empty or not. This may be 2825 // used to include empty fields in Patch requests. 2826 ForceSendFields []string `json:"-"` 2827 2828 // NullFields is a list of field names (e.g. "FhirStores") to include in 2829 // API requests with the JSON null value. By default, fields with empty 2830 // values are omitted from API requests. However, any field with an 2831 // empty value appearing in NullFields will be sent to the server as 2832 // null. It is an error if a field in this list has a non-empty value. 2833 // This may be used to include null fields in Patch requests. 2834 NullFields []string `json:"-"` 2835} 2836 2837func (s *ListFhirStoresResponse) MarshalJSON() ([]byte, error) { 2838 type NoMethod ListFhirStoresResponse 2839 raw := NoMethod(*s) 2840 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2841} 2842 2843// ListHl7V2StoresResponse: Lists the HL7v2 stores in the given dataset. 2844type ListHl7V2StoresResponse struct { 2845 // Hl7V2Stores: The returned HL7v2 stores. Won't be more HL7v2 stores 2846 // than the value of 2847 // page_size in the request. 2848 Hl7V2Stores []*Hl7V2Store `json:"hl7V2Stores,omitempty"` 2849 2850 // NextPageToken: Token to retrieve the next page of results or empty if 2851 // there are no more 2852 // results in the list. 2853 NextPageToken string `json:"nextPageToken,omitempty"` 2854 2855 // ServerResponse contains the HTTP response code and headers from the 2856 // server. 2857 googleapi.ServerResponse `json:"-"` 2858 2859 // ForceSendFields is a list of field names (e.g. "Hl7V2Stores") to 2860 // unconditionally include in API requests. By default, fields with 2861 // empty values are omitted from API requests. However, any non-pointer, 2862 // non-interface field appearing in ForceSendFields will be sent to the 2863 // server regardless of whether the field is empty or not. This may be 2864 // used to include empty fields in Patch requests. 2865 ForceSendFields []string `json:"-"` 2866 2867 // NullFields is a list of field names (e.g. "Hl7V2Stores") to include 2868 // in API requests with the JSON null value. By default, fields with 2869 // empty values are omitted from API requests. However, any field with 2870 // an empty value appearing in NullFields will be sent to the server as 2871 // null. It is an error if a field in this list has a non-empty value. 2872 // This may be used to include null fields in Patch requests. 2873 NullFields []string `json:"-"` 2874} 2875 2876func (s *ListHl7V2StoresResponse) MarshalJSON() ([]byte, error) { 2877 type NoMethod ListHl7V2StoresResponse 2878 raw := NoMethod(*s) 2879 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2880} 2881 2882// ListLocationsResponse: The response message for 2883// Locations.ListLocations. 2884type ListLocationsResponse struct { 2885 // Locations: A list of locations that matches the specified filter in 2886 // the request. 2887 Locations []*Location `json:"locations,omitempty"` 2888 2889 // NextPageToken: The standard List next-page token. 2890 NextPageToken string `json:"nextPageToken,omitempty"` 2891 2892 // ServerResponse contains the HTTP response code and headers from the 2893 // server. 2894 googleapi.ServerResponse `json:"-"` 2895 2896 // ForceSendFields is a list of field names (e.g. "Locations") to 2897 // unconditionally include in API requests. By default, fields with 2898 // empty values are omitted from API requests. However, any non-pointer, 2899 // non-interface field appearing in ForceSendFields will be sent to the 2900 // server regardless of whether the field is empty or not. This may be 2901 // used to include empty fields in Patch requests. 2902 ForceSendFields []string `json:"-"` 2903 2904 // NullFields is a list of field names (e.g. "Locations") to include in 2905 // API requests with the JSON null value. By default, fields with empty 2906 // values are omitted from API requests. However, any field with an 2907 // empty value appearing in NullFields will be sent to the server as 2908 // null. It is an error if a field in this list has a non-empty value. 2909 // This may be used to include null fields in Patch requests. 2910 NullFields []string `json:"-"` 2911} 2912 2913func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { 2914 type NoMethod ListLocationsResponse 2915 raw := NoMethod(*s) 2916 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2917} 2918 2919// ListMessagesResponse: Lists the messages in the specified HL7v2 2920// store. 2921type ListMessagesResponse struct { 2922 // Messages: The returned message names. Won't be more values than the 2923 // value of 2924 // page_size in the request. 2925 Messages []string `json:"messages,omitempty"` 2926 2927 // NextPageToken: Token to retrieve the next page of results or empty if 2928 // there are no more 2929 // results in the list. 2930 NextPageToken string `json:"nextPageToken,omitempty"` 2931 2932 // ServerResponse contains the HTTP response code and headers from the 2933 // server. 2934 googleapi.ServerResponse `json:"-"` 2935 2936 // ForceSendFields is a list of field names (e.g. "Messages") to 2937 // unconditionally include in API requests. By default, fields with 2938 // empty values are omitted from API requests. However, any non-pointer, 2939 // non-interface field appearing in ForceSendFields will be sent to the 2940 // server regardless of whether the field is empty or not. This may be 2941 // used to include empty fields in Patch requests. 2942 ForceSendFields []string `json:"-"` 2943 2944 // NullFields is a list of field names (e.g. "Messages") to include in 2945 // API requests with the JSON null value. By default, fields with empty 2946 // values are omitted from API requests. However, any field with an 2947 // empty value appearing in NullFields will be sent to the server as 2948 // null. It is an error if a field in this list has a non-empty value. 2949 // This may be used to include null fields in Patch requests. 2950 NullFields []string `json:"-"` 2951} 2952 2953func (s *ListMessagesResponse) MarshalJSON() ([]byte, error) { 2954 type NoMethod ListMessagesResponse 2955 raw := NoMethod(*s) 2956 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2957} 2958 2959// ListOperationsResponse: The response message for 2960// Operations.ListOperations. 2961type ListOperationsResponse struct { 2962 // NextPageToken: The standard List next-page token. 2963 NextPageToken string `json:"nextPageToken,omitempty"` 2964 2965 // Operations: A list of operations that matches the specified filter in 2966 // the request. 2967 Operations []*Operation `json:"operations,omitempty"` 2968 2969 // ServerResponse contains the HTTP response code and headers from the 2970 // server. 2971 googleapi.ServerResponse `json:"-"` 2972 2973 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2974 // unconditionally include in API requests. By default, fields with 2975 // empty values are omitted from API requests. However, any non-pointer, 2976 // non-interface field appearing in ForceSendFields will be sent to the 2977 // server regardless of whether the field is empty or not. This may be 2978 // used to include empty fields in Patch requests. 2979 ForceSendFields []string `json:"-"` 2980 2981 // NullFields is a list of field names (e.g. "NextPageToken") to include 2982 // in API requests with the JSON null value. By default, fields with 2983 // empty values are omitted from API requests. However, any field with 2984 // an empty value appearing in NullFields will be sent to the server as 2985 // null. It is an error if a field in this list has a non-empty value. 2986 // This may be used to include null fields in Patch requests. 2987 NullFields []string `json:"-"` 2988} 2989 2990func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { 2991 type NoMethod ListOperationsResponse 2992 raw := NoMethod(*s) 2993 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2994} 2995 2996// Location: A resource that represents Google Cloud Platform location. 2997type Location struct { 2998 // DisplayName: The friendly name for this location, typically a nearby 2999 // city name. 3000 // For example, "Tokyo". 3001 DisplayName string `json:"displayName,omitempty"` 3002 3003 // Labels: Cross-service attributes for the location. For example 3004 // 3005 // {"cloud.googleapis.com/region": "us-east1"} 3006 Labels map[string]string `json:"labels,omitempty"` 3007 3008 // LocationId: The canonical id for this location. For example: 3009 // "us-east1". 3010 LocationId string `json:"locationId,omitempty"` 3011 3012 // Metadata: Service-specific metadata. For example the available 3013 // capacity at the given 3014 // location. 3015 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 3016 3017 // Name: Resource name for the location, which may vary between 3018 // implementations. 3019 // For example: "projects/example-project/locations/us-east1" 3020 Name string `json:"name,omitempty"` 3021 3022 // ServerResponse contains the HTTP response code and headers from the 3023 // server. 3024 googleapi.ServerResponse `json:"-"` 3025 3026 // ForceSendFields is a list of field names (e.g. "DisplayName") to 3027 // unconditionally include in API requests. By default, fields with 3028 // empty values are omitted from API requests. However, any non-pointer, 3029 // non-interface field appearing in ForceSendFields will be sent to the 3030 // server regardless of whether the field is empty or not. This may be 3031 // used to include empty fields in Patch requests. 3032 ForceSendFields []string `json:"-"` 3033 3034 // NullFields is a list of field names (e.g. "DisplayName") to include 3035 // in API requests with the JSON null value. By default, fields with 3036 // empty values are omitted from API requests. However, any field with 3037 // an empty value appearing in NullFields will be sent to the server as 3038 // null. It is an error if a field in this list has a non-empty value. 3039 // This may be used to include null fields in Patch requests. 3040 NullFields []string `json:"-"` 3041} 3042 3043func (s *Location) MarshalJSON() ([]byte, error) { 3044 type NoMethod Location 3045 raw := NoMethod(*s) 3046 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3047} 3048 3049// Message: A complete HL7v2 message. 3050// See http://www.hl7.org/implement/standards/index.cfm?ref=common for 3051// details 3052// on the standard. 3053type Message struct { 3054 // CreateTime: Output only. The datetime when the message was created. 3055 // Set by the server. 3056 CreateTime string `json:"createTime,omitempty"` 3057 3058 // Data: Raw message bytes. 3059 Data string `json:"data,omitempty"` 3060 3061 // Labels: User-supplied key-value pairs used to organize HL7v2 3062 // stores. 3063 // 3064 // Label keys must be between 1 and 63 characters long, have a UTF-8 3065 // encoding 3066 // of maximum 128 bytes, and must conform to the 3067 // following PCRE regular expression: 3068 // \p{Ll}\p{Lo}{0,62} 3069 // 3070 // Label values are optional, must be between 1 and 63 characters long, 3071 // have 3072 // a UTF-8 encoding of maximum 128 bytes, and must conform to 3073 // the 3074 // following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} 3075 // 3076 // No more than 64 labels can be associated with a given store. 3077 Labels map[string]string `json:"labels,omitempty"` 3078 3079 // MessageType: The message type and trigger event for this message. 3080 // MSH-9. 3081 MessageType string `json:"messageType,omitempty"` 3082 3083 // Name: Resource name of the Message, of the 3084 // form 3085 // `projects/{project_id}/datasets/{dataset_id}/hl7V2Stores/{hl7_v2_ 3086 // store_id}/messages/{message_id}`. 3087 // Assigned by the server. 3088 Name string `json:"name,omitempty"` 3089 3090 // ParsedData: Output only. The parsed version of the raw message data. 3091 ParsedData *ParsedData `json:"parsedData,omitempty"` 3092 3093 // PatientIds: All patient IDs listed in the PID-2, PID-3, and PID-4 3094 // segments of this 3095 // message. 3096 PatientIds []*PatientId `json:"patientIds,omitempty"` 3097 3098 // SendFacility: The hospital that this message came from. MSH-4. 3099 SendFacility string `json:"sendFacility,omitempty"` 3100 3101 // SendTime: The datetime the sending application sent this message. 3102 // MSH-7. 3103 SendTime string `json:"sendTime,omitempty"` 3104 3105 // ServerResponse contains the HTTP response code and headers from the 3106 // server. 3107 googleapi.ServerResponse `json:"-"` 3108 3109 // ForceSendFields is a list of field names (e.g. "CreateTime") to 3110 // unconditionally include in API requests. By default, fields with 3111 // empty values are omitted from API requests. However, any non-pointer, 3112 // non-interface field appearing in ForceSendFields will be sent to the 3113 // server regardless of whether the field is empty or not. This may be 3114 // used to include empty fields in Patch requests. 3115 ForceSendFields []string `json:"-"` 3116 3117 // NullFields is a list of field names (e.g. "CreateTime") to include in 3118 // API requests with the JSON null value. By default, fields with empty 3119 // values are omitted from API requests. However, any field with an 3120 // empty value appearing in NullFields will be sent to the server as 3121 // null. It is an error if a field in this list has a non-empty value. 3122 // This may be used to include null fields in Patch requests. 3123 NullFields []string `json:"-"` 3124} 3125 3126func (s *Message) MarshalJSON() ([]byte, error) { 3127 type NoMethod Message 3128 raw := NoMethod(*s) 3129 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3130} 3131 3132// NotificationConfig: Specifies where notifications should be sent upon 3133// changes to a data store. 3134type NotificationConfig struct { 3135 // PubsubTopic: The [Cloud 3136 // Pub/Sub](https://cloud.google.com/pubsub/docs/) topic 3137 // that 3138 // notifications of changes are published on. Supplied by the 3139 // client. 3140 // PubsubMessage.Data will contain the resource 3141 // name. 3142 // PubsubMessage.MessageId is the ID of this message. It is guaranteed 3143 // to be 3144 // unique within the topic. 3145 // PubsubMessage.PublishTime is the time at which the message was 3146 // published. 3147 // Notifications are only sent if the topic is 3148 // non-empty. 3149 // [Topic 3150 // names](https://cloud.google.com/pubsub/docs/overview#names) must be 3151 // scoped 3152 // to a project. cloud-healthcare@system.gserviceaccount.com must 3153 // have 3154 // publisher permissions on the given Cloud Pub/Sub topic. Not having 3155 // adequate 3156 // permissions will cause the calls that send notifications to fail. 3157 PubsubTopic string `json:"pubsubTopic,omitempty"` 3158 3159 // ForceSendFields is a list of field names (e.g. "PubsubTopic") to 3160 // unconditionally include in API requests. By default, fields with 3161 // empty values are omitted from API requests. However, any non-pointer, 3162 // non-interface field appearing in ForceSendFields will be sent to the 3163 // server regardless of whether the field is empty or not. This may be 3164 // used to include empty fields in Patch requests. 3165 ForceSendFields []string `json:"-"` 3166 3167 // NullFields is a list of field names (e.g. "PubsubTopic") to include 3168 // in API requests with the JSON null value. By default, fields with 3169 // empty values are omitted from API requests. However, any field with 3170 // an empty value appearing in NullFields will be sent to the server as 3171 // null. It is an error if a field in this list has a non-empty value. 3172 // This may be used to include null fields in Patch requests. 3173 NullFields []string `json:"-"` 3174} 3175 3176func (s *NotificationConfig) MarshalJSON() ([]byte, error) { 3177 type NoMethod NotificationConfig 3178 raw := NoMethod(*s) 3179 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3180} 3181 3182// Operation: This resource represents a long-running operation that is 3183// the result of a 3184// network API call. 3185type Operation struct { 3186 // Done: If the value is `false`, it means the operation is still in 3187 // progress. 3188 // If `true`, the operation is completed, and either `error` or 3189 // `response` is 3190 // available. 3191 Done bool `json:"done,omitempty"` 3192 3193 // Error: The error result of the operation in case of failure or 3194 // cancellation. 3195 Error *Status `json:"error,omitempty"` 3196 3197 // Metadata: Service-specific metadata associated with the operation. 3198 // It typically 3199 // contains progress information and common metadata such as create 3200 // time. 3201 // Some services might not provide such metadata. Any method that 3202 // returns a 3203 // long-running operation should document the metadata type, if any. 3204 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 3205 3206 // Name: The server-assigned name, which is only unique within the same 3207 // service that 3208 // originally returns it. If you use the default HTTP mapping, 3209 // the 3210 // `name` should be a resource name ending with 3211 // `operations/{unique_id}`. 3212 Name string `json:"name,omitempty"` 3213 3214 // Response: The normal response of the operation in case of success. 3215 // If the original 3216 // method returns no data on success, such as `Delete`, the response 3217 // is 3218 // `google.protobuf.Empty`. If the original method is 3219 // standard 3220 // `Get`/`Create`/`Update`, the response should be the resource. For 3221 // other 3222 // methods, the response should have the type `XxxResponse`, where 3223 // `Xxx` 3224 // is the original method name. For example, if the original method 3225 // name 3226 // is `TakeSnapshot()`, the inferred response type 3227 // is 3228 // `TakeSnapshotResponse`. 3229 Response googleapi.RawMessage `json:"response,omitempty"` 3230 3231 // ServerResponse contains the HTTP response code and headers from the 3232 // server. 3233 googleapi.ServerResponse `json:"-"` 3234 3235 // ForceSendFields is a list of field names (e.g. "Done") to 3236 // unconditionally include in API requests. By default, fields with 3237 // empty values are omitted from API requests. However, any non-pointer, 3238 // non-interface field appearing in ForceSendFields will be sent to the 3239 // server regardless of whether the field is empty or not. This may be 3240 // used to include empty fields in Patch requests. 3241 ForceSendFields []string `json:"-"` 3242 3243 // NullFields is a list of field names (e.g. "Done") to include in API 3244 // requests with the JSON null value. By default, fields with empty 3245 // values are omitted from API requests. However, any field with an 3246 // empty value appearing in NullFields will be sent to the server as 3247 // null. It is an error if a field in this list has a non-empty value. 3248 // This may be used to include null fields in Patch requests. 3249 NullFields []string `json:"-"` 3250} 3251 3252func (s *Operation) MarshalJSON() ([]byte, error) { 3253 type NoMethod Operation 3254 raw := NoMethod(*s) 3255 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3256} 3257 3258// OperationMetadata: OperationMetadata provides information about the 3259// operation execution. 3260// Returned in the long-running operation's metadata field. 3261type OperationMetadata struct { 3262 // ApiMethodName: The name of the API method that initiated the 3263 // operation. 3264 ApiMethodName string `json:"apiMethodName,omitempty"` 3265 3266 Counter *ProgressCounter `json:"counter,omitempty"` 3267 3268 // CreateTime: The time at which the operation was created by the API. 3269 CreateTime string `json:"createTime,omitempty"` 3270 3271 // EndTime: The time at which execution was completed. 3272 EndTime string `json:"endTime,omitempty"` 3273 3274 // ForceSendFields is a list of field names (e.g. "ApiMethodName") to 3275 // unconditionally include in API requests. By default, fields with 3276 // empty values are omitted from API requests. However, any non-pointer, 3277 // non-interface field appearing in ForceSendFields will be sent to the 3278 // server regardless of whether the field is empty or not. This may be 3279 // used to include empty fields in Patch requests. 3280 ForceSendFields []string `json:"-"` 3281 3282 // NullFields is a list of field names (e.g. "ApiMethodName") to include 3283 // in API requests with the JSON null value. By default, fields with 3284 // empty values are omitted from API requests. However, any field with 3285 // an empty value appearing in NullFields will be sent to the server as 3286 // null. It is an error if a field in this list has a non-empty value. 3287 // This may be used to include null fields in Patch requests. 3288 NullFields []string `json:"-"` 3289} 3290 3291func (s *OperationMetadata) MarshalJSON() ([]byte, error) { 3292 type NoMethod OperationMetadata 3293 raw := NoMethod(*s) 3294 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3295} 3296 3297// ParsedData: The content of a HL7v2 message in a structured format. 3298type ParsedData struct { 3299 Segments []*Segment `json:"segments,omitempty"` 3300 3301 // ForceSendFields is a list of field names (e.g. "Segments") to 3302 // unconditionally include in API requests. By default, fields with 3303 // empty values are omitted from API requests. However, any non-pointer, 3304 // non-interface field appearing in ForceSendFields will be sent to the 3305 // server regardless of whether the field is empty or not. This may be 3306 // used to include empty fields in Patch requests. 3307 ForceSendFields []string `json:"-"` 3308 3309 // NullFields is a list of field names (e.g. "Segments") to include in 3310 // API requests with the JSON null value. By default, fields with empty 3311 // values are omitted from API requests. However, any field with an 3312 // empty value appearing in NullFields will be sent to the server as 3313 // null. It is an error if a field in this list has a non-empty value. 3314 // This may be used to include null fields in Patch requests. 3315 NullFields []string `json:"-"` 3316} 3317 3318func (s *ParsedData) MarshalJSON() ([]byte, error) { 3319 type NoMethod ParsedData 3320 raw := NoMethod(*s) 3321 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3322} 3323 3324// ParserConfig: The configuration for the parser. It determines how the 3325// server parses the 3326// messages. 3327type ParserConfig struct { 3328 // AllowNullHeader: Determines whether messages with no header are 3329 // allowed. 3330 AllowNullHeader bool `json:"allowNullHeader,omitempty"` 3331 3332 // SegmentTerminator: Byte(s) to be used as the segment terminator. If 3333 // this is unset, '\r' will 3334 // be used as the segment terminator, matching the HL7 version 3335 // 2 3336 // specification. 3337 SegmentTerminator string `json:"segmentTerminator,omitempty"` 3338 3339 // ForceSendFields is a list of field names (e.g. "AllowNullHeader") to 3340 // unconditionally include in API requests. By default, fields with 3341 // empty values are omitted from API requests. However, any non-pointer, 3342 // non-interface field appearing in ForceSendFields will be sent to the 3343 // server regardless of whether the field is empty or not. This may be 3344 // used to include empty fields in Patch requests. 3345 ForceSendFields []string `json:"-"` 3346 3347 // NullFields is a list of field names (e.g. "AllowNullHeader") to 3348 // include in API requests with the JSON null value. By default, fields 3349 // with empty values are omitted from API requests. However, any field 3350 // with an empty value appearing in NullFields will be sent to the 3351 // server as null. It is an error if a field in this list has a 3352 // non-empty value. This may be used to include null fields in Patch 3353 // requests. 3354 NullFields []string `json:"-"` 3355} 3356 3357func (s *ParserConfig) MarshalJSON() ([]byte, error) { 3358 type NoMethod ParserConfig 3359 raw := NoMethod(*s) 3360 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3361} 3362 3363// PatientId: A patient identifier and associated type. 3364type PatientId struct { 3365 // Type: ID type, e.g. MRN or NHS. 3366 Type string `json:"type,omitempty"` 3367 3368 // Value: The patient's unique identifier. 3369 Value string `json:"value,omitempty"` 3370 3371 // ForceSendFields is a list of field names (e.g. "Type") to 3372 // unconditionally include in API requests. By default, fields with 3373 // empty values are omitted from API requests. However, any non-pointer, 3374 // non-interface field appearing in ForceSendFields will be sent to the 3375 // server regardless of whether the field is empty or not. This may be 3376 // used to include empty fields in Patch requests. 3377 ForceSendFields []string `json:"-"` 3378 3379 // NullFields is a list of field names (e.g. "Type") to include in API 3380 // requests with the JSON null value. By default, fields with empty 3381 // values are omitted from API requests. However, any field with an 3382 // empty value appearing in NullFields will be sent to the server as 3383 // null. It is an error if a field in this list has a non-empty value. 3384 // This may be used to include null fields in Patch requests. 3385 NullFields []string `json:"-"` 3386} 3387 3388func (s *PatientId) MarshalJSON() ([]byte, error) { 3389 type NoMethod PatientId 3390 raw := NoMethod(*s) 3391 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3392} 3393 3394// Policy: Defines an Identity and Access Management (IAM) policy. It is 3395// used to 3396// specify access control policies for Cloud Platform resources. 3397// 3398// 3399// A `Policy` consists of a list of `bindings`. A `binding` binds a list 3400// of 3401// `members` to a `role`, where the members can be user accounts, Google 3402// groups, 3403// Google domains, and service accounts. A `role` is a named list of 3404// permissions 3405// defined by IAM. 3406// 3407// **JSON Example** 3408// 3409// { 3410// "bindings": [ 3411// { 3412// "role": "roles/owner", 3413// "members": [ 3414// "user:mike@example.com", 3415// "group:admins@example.com", 3416// "domain:google.com", 3417// 3418// "serviceAccount:my-other-app@appspot.gserviceaccount.com" 3419// ] 3420// }, 3421// { 3422// "role": "roles/viewer", 3423// "members": ["user:sean@example.com"] 3424// } 3425// ] 3426// } 3427// 3428// **YAML Example** 3429// 3430// bindings: 3431// - members: 3432// - user:mike@example.com 3433// - group:admins@example.com 3434// - domain:google.com 3435// - serviceAccount:my-other-app@appspot.gserviceaccount.com 3436// role: roles/owner 3437// - members: 3438// - user:sean@example.com 3439// role: roles/viewer 3440// 3441// 3442// For a description of IAM and its features, see the 3443// [IAM developer's guide](https://cloud.google.com/iam/docs). 3444type Policy struct { 3445 // AuditConfigs: Specifies cloud audit logging configuration for this 3446 // policy. 3447 AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` 3448 3449 // Bindings: Associates a list of `members` to a `role`. 3450 // `bindings` with no members will result in an error. 3451 Bindings []*Binding `json:"bindings,omitempty"` 3452 3453 // Etag: `etag` is used for optimistic concurrency control as a way to 3454 // help 3455 // prevent simultaneous updates of a policy from overwriting each 3456 // other. 3457 // It is strongly suggested that systems make use of the `etag` in 3458 // the 3459 // read-modify-write cycle to perform policy updates in order to avoid 3460 // race 3461 // conditions: An `etag` is returned in the response to `getIamPolicy`, 3462 // and 3463 // systems are expected to put that etag in the request to 3464 // `setIamPolicy` to 3465 // ensure that their change will be applied to the same version of the 3466 // policy. 3467 // 3468 // If no `etag` is provided in the call to `setIamPolicy`, then the 3469 // existing 3470 // policy is overwritten blindly. 3471 Etag string `json:"etag,omitempty"` 3472 3473 // Version: Deprecated. 3474 Version int64 `json:"version,omitempty"` 3475 3476 // ServerResponse contains the HTTP response code and headers from the 3477 // server. 3478 googleapi.ServerResponse `json:"-"` 3479 3480 // ForceSendFields is a list of field names (e.g. "AuditConfigs") to 3481 // unconditionally include in API requests. By default, fields with 3482 // empty values are omitted from API requests. However, any non-pointer, 3483 // non-interface field appearing in ForceSendFields will be sent to the 3484 // server regardless of whether the field is empty or not. This may be 3485 // used to include empty fields in Patch requests. 3486 ForceSendFields []string `json:"-"` 3487 3488 // NullFields is a list of field names (e.g. "AuditConfigs") to include 3489 // in API requests with the JSON null value. By default, fields with 3490 // empty values are omitted from API requests. However, any field with 3491 // an empty value appearing in NullFields will be sent to the server as 3492 // null. It is an error if a field in this list has a non-empty value. 3493 // This may be used to include null fields in Patch requests. 3494 NullFields []string `json:"-"` 3495} 3496 3497func (s *Policy) MarshalJSON() ([]byte, error) { 3498 type NoMethod Policy 3499 raw := NoMethod(*s) 3500 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3501} 3502 3503// ProgressCounter: ProgressCounter provides counters to describe an 3504// operation's progress. 3505type ProgressCounter struct { 3506 // Failure: The number of units that failed in the operation. 3507 Failure int64 `json:"failure,omitempty,string"` 3508 3509 // Pending: The number of units that are pending in the operation. 3510 Pending int64 `json:"pending,omitempty,string"` 3511 3512 // Success: The number of units that succeeded in the operation. 3513 Success int64 `json:"success,omitempty,string"` 3514 3515 // ForceSendFields is a list of field names (e.g. "Failure") to 3516 // unconditionally include in API requests. By default, fields with 3517 // empty values are omitted from API requests. However, any non-pointer, 3518 // non-interface field appearing in ForceSendFields will be sent to the 3519 // server regardless of whether the field is empty or not. This may be 3520 // used to include empty fields in Patch requests. 3521 ForceSendFields []string `json:"-"` 3522 3523 // NullFields is a list of field names (e.g. "Failure") to include in 3524 // API requests with the JSON null value. By default, fields with empty 3525 // values are omitted from API requests. However, any field with an 3526 // empty value appearing in NullFields will be sent to the server as 3527 // null. It is an error if a field in this list has a non-empty value. 3528 // This may be used to include null fields in Patch requests. 3529 NullFields []string `json:"-"` 3530} 3531 3532func (s *ProgressCounter) MarshalJSON() ([]byte, error) { 3533 type NoMethod ProgressCounter 3534 raw := NoMethod(*s) 3535 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3536} 3537 3538// RedactConfig: Define how to redact sensitive values. Default 3539// behaviour is erase, 3540// e.g. "My name is Jake." becomes "My name is ." 3541type RedactConfig struct { 3542} 3543 3544// ReplaceWithInfoTypeConfig: When using the INSPECT_AND_TRANSFORM 3545// action, each match is replaced with 3546// the name of the info_type. For example, "My name is Jake" becomes "My 3547// name is 3548// [PERSON_NAME]." The TRANSFORM action is equivalent to redacting. 3549type ReplaceWithInfoTypeConfig struct { 3550} 3551 3552// ResourceAnnotation: Resource level annotation. 3553type ResourceAnnotation struct { 3554 Label string `json:"label,omitempty"` 3555 3556 // ForceSendFields is a list of field names (e.g. "Label") to 3557 // unconditionally include in API requests. By default, fields with 3558 // empty values are omitted from API requests. However, any non-pointer, 3559 // non-interface field appearing in ForceSendFields will be sent to the 3560 // server regardless of whether the field is empty or not. This may be 3561 // used to include empty fields in Patch requests. 3562 ForceSendFields []string `json:"-"` 3563 3564 // NullFields is a list of field names (e.g. "Label") to include in API 3565 // requests with the JSON null value. By default, fields with empty 3566 // values are omitted from API requests. However, any field with an 3567 // empty value appearing in NullFields will be sent to the server as 3568 // null. It is an error if a field in this list has a non-empty value. 3569 // This may be used to include null fields in Patch requests. 3570 NullFields []string `json:"-"` 3571} 3572 3573func (s *ResourceAnnotation) MarshalJSON() ([]byte, error) { 3574 type NoMethod ResourceAnnotation 3575 raw := NoMethod(*s) 3576 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3577} 3578 3579// SchemaConfig: Configuration for the FHIR BigQuery and Cloud Storage 3580// schema. Determines 3581// how the server generates the schema. 3582type SchemaConfig struct { 3583 // RecursiveStructureDepth: The depth for all recursive structures in 3584 // the output analytics 3585 // schema. For example, `concept` in the CodeSystem resource is a 3586 // recursive 3587 // structure; when the depth is 2, the CodeSystem table will have a 3588 // column 3589 // called `concept.concept` but not `concept.concept.concept`. If 3590 // not 3591 // specified or set to 0, the server will use the default value 2. 3592 RecursiveStructureDepth int64 `json:"recursiveStructureDepth,omitempty,string"` 3593 3594 // SchemaType: Specifies the output schema type. If unspecified, the 3595 // default is 3596 // `LOSSLESS`. 3597 // 3598 // Possible values: 3599 // "SCHEMA_TYPE_UNSPECIFIED" - No schema type specified. Same as 3600 // `LOSSLESS`. 3601 // "LOSSLESS" - A data-driven schema generated from the fields present 3602 // in the FHIR data 3603 // being exported, with no additional simplification. 3604 // "ANALYTICS" - Analytics schema defined by the FHIR community. 3605 // See https://github.com/FHIR/sql-on-fhir/blob/master/sql-on-fhir.md. 3606 SchemaType string `json:"schemaType,omitempty"` 3607 3608 // ForceSendFields is a list of field names (e.g. 3609 // "RecursiveStructureDepth") to unconditionally include in API 3610 // requests. By default, fields with empty values are omitted from API 3611 // requests. However, any non-pointer, non-interface field appearing in 3612 // ForceSendFields will be sent to the server regardless of whether the 3613 // field is empty or not. This may be used to include empty fields in 3614 // Patch requests. 3615 ForceSendFields []string `json:"-"` 3616 3617 // NullFields is a list of field names (e.g. "RecursiveStructureDepth") 3618 // to include in API requests with the JSON null value. By default, 3619 // fields with empty values are omitted from API requests. However, any 3620 // field with an empty value appearing in NullFields will be sent to the 3621 // server as null. It is an error if a field in this list has a 3622 // non-empty value. This may be used to include null fields in Patch 3623 // requests. 3624 NullFields []string `json:"-"` 3625} 3626 3627func (s *SchemaConfig) MarshalJSON() ([]byte, error) { 3628 type NoMethod SchemaConfig 3629 raw := NoMethod(*s) 3630 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3631} 3632 3633// SearchResourcesRequest: Request to search the resources in the 3634// specified FHIR store. 3635type SearchResourcesRequest struct { 3636 // ResourceType: The FHIR resource type to search, such as Patient or 3637 // Observation. For a 3638 // complete list, see the [FHIR 3639 // Resource 3640 // Index](http://hl7.org/implement/standards/fhir/STU3/resourcel 3641 // ist.html). 3642 ResourceType string `json:"resourceType,omitempty"` 3643 3644 // ForceSendFields is a list of field names (e.g. "ResourceType") to 3645 // unconditionally include in API requests. By default, fields with 3646 // empty values are omitted from API requests. However, any non-pointer, 3647 // non-interface field appearing in ForceSendFields will be sent to the 3648 // server regardless of whether the field is empty or not. This may be 3649 // used to include empty fields in Patch requests. 3650 ForceSendFields []string `json:"-"` 3651 3652 // NullFields is a list of field names (e.g. "ResourceType") to include 3653 // in API requests with the JSON null value. By default, fields with 3654 // empty values are omitted from API requests. However, any field with 3655 // an empty value appearing in NullFields will be sent to the server as 3656 // null. It is an error if a field in this list has a non-empty value. 3657 // This may be used to include null fields in Patch requests. 3658 NullFields []string `json:"-"` 3659} 3660 3661func (s *SearchResourcesRequest) MarshalJSON() ([]byte, error) { 3662 type NoMethod SearchResourcesRequest 3663 raw := NoMethod(*s) 3664 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3665} 3666 3667// Segment: A segment in a structured format. 3668type Segment struct { 3669 // Fields: A mapping from the positional location to the value. 3670 // The key string uses zero-based indexes separated by dots to 3671 // identify 3672 // Fields, components and sub-components. A bracket notation is also 3673 // used to 3674 // identify different instances of a repeated field. 3675 // Regex for key: (\d+)(\[\d+\])?(.\d+)?(.\d+)? 3676 // 3677 // Examples of (key, value) pairs: 3678 // - (0.1, "foo"): Component 1 of Field 0 has the value "foo". 3679 // - (1.1.2, "bar"): Sub-component 2 of Component 1 of field 1 has the 3680 // value 3681 // "bar". 3682 // - (1[2].1, "baz"): Component 1 of Instance 2 of Field 1, which is 3683 // repeated, 3684 // has the value "baz". 3685 Fields map[string]string `json:"fields,omitempty"` 3686 3687 // SegmentId: A string that indicates the type of segment, e.g., EVN, 3688 // PID. 3689 SegmentId string `json:"segmentId,omitempty"` 3690 3691 // SetId: Set ID for segments that can be in a set. This can be empty if 3692 // it is 3693 // missing or it is not applicable. 3694 SetId string `json:"setId,omitempty"` 3695 3696 // ForceSendFields is a list of field names (e.g. "Fields") to 3697 // unconditionally include in API requests. By default, fields with 3698 // empty values are omitted from API requests. However, any non-pointer, 3699 // non-interface field appearing in ForceSendFields will be sent to the 3700 // server regardless of whether the field is empty or not. This may be 3701 // used to include empty fields in Patch requests. 3702 ForceSendFields []string `json:"-"` 3703 3704 // NullFields is a list of field names (e.g. "Fields") to include in API 3705 // requests with the JSON null value. By default, fields with empty 3706 // values are omitted from API requests. However, any field with an 3707 // empty value appearing in NullFields will be sent to the server as 3708 // null. It is an error if a field in this list has a non-empty value. 3709 // This may be used to include null fields in Patch requests. 3710 NullFields []string `json:"-"` 3711} 3712 3713func (s *Segment) MarshalJSON() ([]byte, error) { 3714 type NoMethod Segment 3715 raw := NoMethod(*s) 3716 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3717} 3718 3719// SensitiveTextAnnotation: A TextAnnotation specifies a text range that 3720// includes sensitive information. 3721type SensitiveTextAnnotation struct { 3722 // Details: Maps from a resource slice (e.g. FHIR resource field path) 3723 // to a set of 3724 // sensitive text findings. For example, 3725 // Appointment.Narrative text1 --> {findings_1, findings_2, findings_3} 3726 Details map[string]Detail `json:"details,omitempty"` 3727 3728 // ForceSendFields is a list of field names (e.g. "Details") to 3729 // unconditionally include in API requests. By default, fields with 3730 // empty values are omitted from API requests. However, any non-pointer, 3731 // non-interface field appearing in ForceSendFields will be sent to the 3732 // server regardless of whether the field is empty or not. This may be 3733 // used to include empty fields in Patch requests. 3734 ForceSendFields []string `json:"-"` 3735 3736 // NullFields is a list of field names (e.g. "Details") to include in 3737 // API requests with the JSON null value. By default, fields with empty 3738 // values are omitted from API requests. However, any field with an 3739 // empty value appearing in NullFields will be sent to the server as 3740 // null. It is an error if a field in this list has a non-empty value. 3741 // This may be used to include null fields in Patch requests. 3742 NullFields []string `json:"-"` 3743} 3744 3745func (s *SensitiveTextAnnotation) MarshalJSON() ([]byte, error) { 3746 type NoMethod SensitiveTextAnnotation 3747 raw := NoMethod(*s) 3748 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3749} 3750 3751// SetIamPolicyRequest: Request message for `SetIamPolicy` method. 3752type SetIamPolicyRequest struct { 3753 // Policy: REQUIRED: The complete policy to be applied to the 3754 // `resource`. The size of 3755 // the policy is limited to a few 10s of KB. An empty policy is a 3756 // valid policy but certain Cloud Platform services (such as 3757 // Projects) 3758 // might reject them. 3759 Policy *Policy `json:"policy,omitempty"` 3760 3761 // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the 3762 // policy to modify. Only 3763 // the fields in the mask will be modified. If no mask is provided, 3764 // the 3765 // following default mask is used: 3766 // paths: "bindings, etag" 3767 // This field is only used by Cloud IAM. 3768 UpdateMask string `json:"updateMask,omitempty"` 3769 3770 // ForceSendFields is a list of field names (e.g. "Policy") to 3771 // unconditionally include in API requests. By default, fields with 3772 // empty values are omitted from API requests. However, any non-pointer, 3773 // non-interface field appearing in ForceSendFields will be sent to the 3774 // server regardless of whether the field is empty or not. This may be 3775 // used to include empty fields in Patch requests. 3776 ForceSendFields []string `json:"-"` 3777 3778 // NullFields is a list of field names (e.g. "Policy") to include in API 3779 // requests with the JSON null value. By default, fields with empty 3780 // values are omitted from API requests. However, any field with an 3781 // empty value appearing in NullFields will be sent to the server as 3782 // null. It is an error if a field in this list has a non-empty value. 3783 // This may be used to include null fields in Patch requests. 3784 NullFields []string `json:"-"` 3785} 3786 3787func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { 3788 type NoMethod SetIamPolicyRequest 3789 raw := NoMethod(*s) 3790 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3791} 3792 3793// Status: The `Status` type defines a logical error model that is 3794// suitable for 3795// different programming environments, including REST APIs and RPC APIs. 3796// It is 3797// used by [gRPC](https://github.com/grpc). Each `Status` message 3798// contains 3799// three pieces of data: error code, error message, and error 3800// details. 3801// 3802// You can find out more about this error model and how to work with it 3803// in the 3804// [API Design Guide](https://cloud.google.com/apis/design/errors). 3805type Status struct { 3806 // Code: The status code, which should be an enum value of 3807 // google.rpc.Code. 3808 Code int64 `json:"code,omitempty"` 3809 3810 // Details: A list of messages that carry the error details. There is a 3811 // common set of 3812 // message types for APIs to use. 3813 Details []googleapi.RawMessage `json:"details,omitempty"` 3814 3815 // Message: A developer-facing error message, which should be in 3816 // English. Any 3817 // user-facing error message should be localized and sent in 3818 // the 3819 // google.rpc.Status.details field, or localized by the client. 3820 Message string `json:"message,omitempty"` 3821 3822 // ForceSendFields is a list of field names (e.g. "Code") to 3823 // unconditionally include in API requests. By default, fields with 3824 // empty values are omitted from API requests. However, any non-pointer, 3825 // non-interface field appearing in ForceSendFields will be sent to the 3826 // server regardless of whether the field is empty or not. This may be 3827 // used to include empty fields in Patch requests. 3828 ForceSendFields []string `json:"-"` 3829 3830 // NullFields is a list of field names (e.g. "Code") to include in API 3831 // requests with the JSON null value. By default, fields with empty 3832 // values are omitted from API requests. However, any field with an 3833 // empty value appearing in NullFields will be sent to the server as 3834 // null. It is an error if a field in this list has a non-empty value. 3835 // This may be used to include null fields in Patch requests. 3836 NullFields []string `json:"-"` 3837} 3838 3839func (s *Status) MarshalJSON() ([]byte, error) { 3840 type NoMethod Status 3841 raw := NoMethod(*s) 3842 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3843} 3844 3845// StreamConfig: This structure contains configuration for streaming 3846// FHIR export. 3847type StreamConfig struct { 3848 // BigqueryDestination: The destination BigQuery structure that contains 3849 // both the dataset 3850 // location and corresponding schema config. 3851 // The output will be organized in one table per resource type. 3852 // The server will inspect and potentially create new tables (if 3853 // they 3854 // don't exist) in the given BigQuery dataset. 3855 // Results will be appended to the corresponding BigQuery tables. 3856 // The views of the latest snapshot will also be automatically created 3857 // in 3858 // the dataset. 3859 BigqueryDestination *GoogleCloudHealthcareV1alpha2FhirBigQueryDestination `json:"bigqueryDestination,omitempty"` 3860 3861 // ResourceTypes: Supply a FHIR resource type (such as "Patient" or 3862 // "Observation"). 3863 // See https://www.hl7.org/fhir/valueset-resource-types.html for a list 3864 // of 3865 // all FHIR resource types. 3866 // The server will treat an empty list as an intent to stream all 3867 // the 3868 // supported resource types in this FHIR store. 3869 ResourceTypes []string `json:"resourceTypes,omitempty"` 3870 3871 // ForceSendFields is a list of field names (e.g. "BigqueryDestination") 3872 // to unconditionally include in API requests. By default, fields with 3873 // empty values are omitted from API requests. However, any non-pointer, 3874 // non-interface field appearing in ForceSendFields will be sent to the 3875 // server regardless of whether the field is empty or not. This may be 3876 // used to include empty fields in Patch requests. 3877 ForceSendFields []string `json:"-"` 3878 3879 // NullFields is a list of field names (e.g. "BigqueryDestination") to 3880 // include in API requests with the JSON null value. By default, fields 3881 // with empty values are omitted from API requests. However, any field 3882 // with an empty value appearing in NullFields will be sent to the 3883 // server as null. It is an error if a field in this list has a 3884 // non-empty value. This may be used to include null fields in Patch 3885 // requests. 3886 NullFields []string `json:"-"` 3887} 3888 3889func (s *StreamConfig) MarshalJSON() ([]byte, error) { 3890 type NoMethod StreamConfig 3891 raw := NoMethod(*s) 3892 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3893} 3894 3895// TagFilterList: List of tags to be filtered. 3896type TagFilterList struct { 3897 // Tags: Tags to be filtered. Tags must be DICOM Data Elements, File 3898 // Meta 3899 // Elements, or Directory Structuring Elements, as defined 3900 // at: 3901 // http://dicom.nema.org/medical/dicom/current/output/html/part06.htm 3902 // l#table_6-1,. 3903 // They may be provided by "Keyword" or "Tag". For example 3904 // "PatientID", 3905 // "00100010". 3906 Tags []string `json:"tags,omitempty"` 3907 3908 // ForceSendFields is a list of field names (e.g. "Tags") to 3909 // unconditionally include in API requests. By default, fields with 3910 // empty values are omitted from API requests. However, any non-pointer, 3911 // non-interface field appearing in ForceSendFields will be sent to the 3912 // server regardless of whether the field is empty or not. This may be 3913 // used to include empty fields in Patch requests. 3914 ForceSendFields []string `json:"-"` 3915 3916 // NullFields is a list of field names (e.g. "Tags") to include in API 3917 // requests with the JSON null value. By default, fields with empty 3918 // values are omitted from API requests. However, any field with an 3919 // empty value appearing in NullFields will be sent to the server as 3920 // null. It is an error if a field in this list has a non-empty value. 3921 // This may be used to include null fields in Patch requests. 3922 NullFields []string `json:"-"` 3923} 3924 3925func (s *TagFilterList) MarshalJSON() ([]byte, error) { 3926 type NoMethod TagFilterList 3927 raw := NoMethod(*s) 3928 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3929} 3930 3931// TestIamPermissionsRequest: Request message for `TestIamPermissions` 3932// method. 3933type TestIamPermissionsRequest struct { 3934 // Permissions: The set of permissions to check for the `resource`. 3935 // Permissions with 3936 // wildcards (such as '*' or 'storage.*') are not allowed. For 3937 // more 3938 // information see 3939 // [IAM 3940 // Overview](https://cloud.google.com/iam/docs/overview#permissions). 3941 Permissions []string `json:"permissions,omitempty"` 3942 3943 // ForceSendFields is a list of field names (e.g. "Permissions") to 3944 // unconditionally include in API requests. By default, fields with 3945 // empty values are omitted from API requests. However, any non-pointer, 3946 // non-interface field appearing in ForceSendFields will be sent to the 3947 // server regardless of whether the field is empty or not. This may be 3948 // used to include empty fields in Patch requests. 3949 ForceSendFields []string `json:"-"` 3950 3951 // NullFields is a list of field names (e.g. "Permissions") to include 3952 // in API requests with the JSON null value. By default, fields with 3953 // empty values are omitted from API requests. However, any field with 3954 // an empty value appearing in NullFields will be sent to the server as 3955 // null. It is an error if a field in this list has a non-empty value. 3956 // This may be used to include null fields in Patch requests. 3957 NullFields []string `json:"-"` 3958} 3959 3960func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { 3961 type NoMethod TestIamPermissionsRequest 3962 raw := NoMethod(*s) 3963 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3964} 3965 3966// TestIamPermissionsResponse: Response message for `TestIamPermissions` 3967// method. 3968type TestIamPermissionsResponse struct { 3969 // Permissions: A subset of `TestPermissionsRequest.permissions` that 3970 // the caller is 3971 // allowed. 3972 Permissions []string `json:"permissions,omitempty"` 3973 3974 // ServerResponse contains the HTTP response code and headers from the 3975 // server. 3976 googleapi.ServerResponse `json:"-"` 3977 3978 // ForceSendFields is a list of field names (e.g. "Permissions") to 3979 // unconditionally include in API requests. By default, fields with 3980 // empty values are omitted from API requests. However, any non-pointer, 3981 // non-interface field appearing in ForceSendFields will be sent to the 3982 // server regardless of whether the field is empty or not. This may be 3983 // used to include empty fields in Patch requests. 3984 ForceSendFields []string `json:"-"` 3985 3986 // NullFields is a list of field names (e.g. "Permissions") to include 3987 // in API requests with the JSON null value. By default, fields with 3988 // empty values are omitted from API requests. However, any field with 3989 // an empty value appearing in NullFields will be sent to the server as 3990 // null. It is an error if a field in this list has a non-empty value. 3991 // This may be used to include null fields in Patch requests. 3992 NullFields []string `json:"-"` 3993} 3994 3995func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { 3996 type NoMethod TestIamPermissionsResponse 3997 raw := NoMethod(*s) 3998 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3999} 4000 4001type TextConfig struct { 4002 // ExperimentalConfig: Experimental de-identification config to use. For 4003 // internal use only. 4004 // If not specified, it is ignored and standard DLP is used. 4005 ExperimentalConfig string `json:"experimentalConfig,omitempty"` 4006 4007 // Transformations: The transformations to apply to the detected data. 4008 Transformations []*InfoTypeTransformation `json:"transformations,omitempty"` 4009 4010 // ForceSendFields is a list of field names (e.g. "ExperimentalConfig") 4011 // to unconditionally include in API requests. By default, fields with 4012 // empty values are omitted from API requests. However, any non-pointer, 4013 // non-interface field appearing in ForceSendFields will be sent to the 4014 // server regardless of whether the field is empty or not. This may be 4015 // used to include empty fields in Patch requests. 4016 ForceSendFields []string `json:"-"` 4017 4018 // NullFields is a list of field names (e.g. "ExperimentalConfig") to 4019 // include in API requests with the JSON null value. By default, fields 4020 // with empty values are omitted from API requests. However, any field 4021 // with an empty value appearing in NullFields will be sent to the 4022 // server as null. It is an error if a field in this list has a 4023 // non-empty value. This may be used to include null fields in Patch 4024 // requests. 4025 NullFields []string `json:"-"` 4026} 4027 4028func (s *TextConfig) MarshalJSON() ([]byte, error) { 4029 type NoMethod TextConfig 4030 raw := NoMethod(*s) 4031 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4032} 4033 4034// Vertex: A 2D coordinate in an image. The origin is the top-left. 4035type Vertex struct { 4036 // X: X coordinate. 4037 X float64 `json:"x,omitempty"` 4038 4039 // Y: Y coordinate. 4040 Y float64 `json:"y,omitempty"` 4041 4042 // ForceSendFields is a list of field names (e.g. "X") to 4043 // unconditionally include in API requests. By default, fields with 4044 // empty values are omitted from API requests. However, any non-pointer, 4045 // non-interface field appearing in ForceSendFields will be sent to the 4046 // server regardless of whether the field is empty or not. This may be 4047 // used to include empty fields in Patch requests. 4048 ForceSendFields []string `json:"-"` 4049 4050 // NullFields is a list of field names (e.g. "X") to include in API 4051 // requests with the JSON null value. By default, fields with empty 4052 // values are omitted from API requests. However, any field with an 4053 // empty value appearing in NullFields will be sent to the server as 4054 // null. It is an error if a field in this list has a non-empty value. 4055 // This may be used to include null fields in Patch requests. 4056 NullFields []string `json:"-"` 4057} 4058 4059func (s *Vertex) MarshalJSON() ([]byte, error) { 4060 type NoMethod Vertex 4061 raw := NoMethod(*s) 4062 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4063} 4064 4065func (s *Vertex) UnmarshalJSON(data []byte) error { 4066 type NoMethod Vertex 4067 var s1 struct { 4068 X gensupport.JSONFloat64 `json:"x"` 4069 Y gensupport.JSONFloat64 `json:"y"` 4070 *NoMethod 4071 } 4072 s1.NoMethod = (*NoMethod)(s) 4073 if err := json.Unmarshal(data, &s1); err != nil { 4074 return err 4075 } 4076 s.X = float64(s1.X) 4077 s.Y = float64(s1.Y) 4078 return nil 4079} 4080 4081// method id "healthcare.projects.locations.get": 4082 4083type ProjectsLocationsGetCall struct { 4084 s *Service 4085 name string 4086 urlParams_ gensupport.URLParams 4087 ifNoneMatch_ string 4088 ctx_ context.Context 4089 header_ http.Header 4090} 4091 4092// Get: Gets information about a location. 4093func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { 4094 c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4095 c.name = name 4096 return c 4097} 4098 4099// Fields allows partial responses to be retrieved. See 4100// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4101// for more information. 4102func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { 4103 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4104 return c 4105} 4106 4107// IfNoneMatch sets the optional parameter which makes the operation 4108// fail if the object's ETag matches the given value. This is useful for 4109// getting updates only after the object has changed since the last 4110// request. Use googleapi.IsNotModified to check whether the response 4111// error from Do is the result of In-None-Match. 4112func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { 4113 c.ifNoneMatch_ = entityTag 4114 return c 4115} 4116 4117// Context sets the context to be used in this call's Do method. Any 4118// pending HTTP request will be aborted if the provided context is 4119// canceled. 4120func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { 4121 c.ctx_ = ctx 4122 return c 4123} 4124 4125// Header returns an http.Header that can be modified by the caller to 4126// add HTTP headers to the request. 4127func (c *ProjectsLocationsGetCall) Header() http.Header { 4128 if c.header_ == nil { 4129 c.header_ = make(http.Header) 4130 } 4131 return c.header_ 4132} 4133 4134func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { 4135 reqHeaders := make(http.Header) 4136 for k, v := range c.header_ { 4137 reqHeaders[k] = v 4138 } 4139 reqHeaders.Set("User-Agent", c.s.userAgent()) 4140 if c.ifNoneMatch_ != "" { 4141 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4142 } 4143 var body io.Reader = nil 4144 c.urlParams_.Set("alt", alt) 4145 c.urlParams_.Set("prettyPrint", "false") 4146 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}") 4147 urls += "?" + c.urlParams_.Encode() 4148 req, err := http.NewRequest("GET", urls, body) 4149 if err != nil { 4150 return nil, err 4151 } 4152 req.Header = reqHeaders 4153 googleapi.Expand(req.URL, map[string]string{ 4154 "name": c.name, 4155 }) 4156 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4157} 4158 4159// Do executes the "healthcare.projects.locations.get" call. 4160// Exactly one of *Location or error will be non-nil. Any non-2xx status 4161// code is an error. Response headers are in either 4162// *Location.ServerResponse.Header or (if a response was returned at 4163// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 4164// to check whether the returned error was because 4165// http.StatusNotModified was returned. 4166func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { 4167 gensupport.SetOptions(c.urlParams_, opts...) 4168 res, err := c.doRequest("json") 4169 if res != nil && res.StatusCode == http.StatusNotModified { 4170 if res.Body != nil { 4171 res.Body.Close() 4172 } 4173 return nil, &googleapi.Error{ 4174 Code: res.StatusCode, 4175 Header: res.Header, 4176 } 4177 } 4178 if err != nil { 4179 return nil, err 4180 } 4181 defer googleapi.CloseBody(res) 4182 if err := googleapi.CheckResponse(res); err != nil { 4183 return nil, err 4184 } 4185 ret := &Location{ 4186 ServerResponse: googleapi.ServerResponse{ 4187 Header: res.Header, 4188 HTTPStatusCode: res.StatusCode, 4189 }, 4190 } 4191 target := &ret 4192 if err := gensupport.DecodeResponse(target, res); err != nil { 4193 return nil, err 4194 } 4195 return ret, nil 4196 // { 4197 // "description": "Gets information about a location.", 4198 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}", 4199 // "httpMethod": "GET", 4200 // "id": "healthcare.projects.locations.get", 4201 // "parameterOrder": [ 4202 // "name" 4203 // ], 4204 // "parameters": { 4205 // "name": { 4206 // "description": "Resource name for the location.", 4207 // "location": "path", 4208 // "pattern": "^projects/[^/]+/locations/[^/]+$", 4209 // "required": true, 4210 // "type": "string" 4211 // } 4212 // }, 4213 // "path": "v1alpha2/{+name}", 4214 // "response": { 4215 // "$ref": "Location" 4216 // }, 4217 // "scopes": [ 4218 // "https://www.googleapis.com/auth/cloud-platform" 4219 // ] 4220 // } 4221 4222} 4223 4224// method id "healthcare.projects.locations.list": 4225 4226type ProjectsLocationsListCall struct { 4227 s *Service 4228 name string 4229 urlParams_ gensupport.URLParams 4230 ifNoneMatch_ string 4231 ctx_ context.Context 4232 header_ http.Header 4233} 4234 4235// List: Lists information about the supported locations for this 4236// service. 4237func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { 4238 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4239 c.name = name 4240 return c 4241} 4242 4243// Filter sets the optional parameter "filter": The standard list 4244// filter. 4245func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { 4246 c.urlParams_.Set("filter", filter) 4247 return c 4248} 4249 4250// PageSize sets the optional parameter "pageSize": The standard list 4251// page size. 4252func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { 4253 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 4254 return c 4255} 4256 4257// PageToken sets the optional parameter "pageToken": The standard list 4258// page token. 4259func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { 4260 c.urlParams_.Set("pageToken", pageToken) 4261 return c 4262} 4263 4264// Fields allows partial responses to be retrieved. See 4265// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4266// for more information. 4267func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { 4268 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4269 return c 4270} 4271 4272// IfNoneMatch sets the optional parameter which makes the operation 4273// fail if the object's ETag matches the given value. This is useful for 4274// getting updates only after the object has changed since the last 4275// request. Use googleapi.IsNotModified to check whether the response 4276// error from Do is the result of In-None-Match. 4277func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { 4278 c.ifNoneMatch_ = entityTag 4279 return c 4280} 4281 4282// Context sets the context to be used in this call's Do method. Any 4283// pending HTTP request will be aborted if the provided context is 4284// canceled. 4285func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { 4286 c.ctx_ = ctx 4287 return c 4288} 4289 4290// Header returns an http.Header that can be modified by the caller to 4291// add HTTP headers to the request. 4292func (c *ProjectsLocationsListCall) Header() http.Header { 4293 if c.header_ == nil { 4294 c.header_ = make(http.Header) 4295 } 4296 return c.header_ 4297} 4298 4299func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { 4300 reqHeaders := make(http.Header) 4301 for k, v := range c.header_ { 4302 reqHeaders[k] = v 4303 } 4304 reqHeaders.Set("User-Agent", c.s.userAgent()) 4305 if c.ifNoneMatch_ != "" { 4306 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4307 } 4308 var body io.Reader = nil 4309 c.urlParams_.Set("alt", alt) 4310 c.urlParams_.Set("prettyPrint", "false") 4311 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}/locations") 4312 urls += "?" + c.urlParams_.Encode() 4313 req, err := http.NewRequest("GET", urls, body) 4314 if err != nil { 4315 return nil, err 4316 } 4317 req.Header = reqHeaders 4318 googleapi.Expand(req.URL, map[string]string{ 4319 "name": c.name, 4320 }) 4321 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4322} 4323 4324// Do executes the "healthcare.projects.locations.list" call. 4325// Exactly one of *ListLocationsResponse or error will be non-nil. Any 4326// non-2xx status code is an error. Response headers are in either 4327// *ListLocationsResponse.ServerResponse.Header or (if a response was 4328// returned at all) in error.(*googleapi.Error).Header. Use 4329// googleapi.IsNotModified to check whether the returned error was 4330// because http.StatusNotModified was returned. 4331func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { 4332 gensupport.SetOptions(c.urlParams_, opts...) 4333 res, err := c.doRequest("json") 4334 if res != nil && res.StatusCode == http.StatusNotModified { 4335 if res.Body != nil { 4336 res.Body.Close() 4337 } 4338 return nil, &googleapi.Error{ 4339 Code: res.StatusCode, 4340 Header: res.Header, 4341 } 4342 } 4343 if err != nil { 4344 return nil, err 4345 } 4346 defer googleapi.CloseBody(res) 4347 if err := googleapi.CheckResponse(res); err != nil { 4348 return nil, err 4349 } 4350 ret := &ListLocationsResponse{ 4351 ServerResponse: googleapi.ServerResponse{ 4352 Header: res.Header, 4353 HTTPStatusCode: res.StatusCode, 4354 }, 4355 } 4356 target := &ret 4357 if err := gensupport.DecodeResponse(target, res); err != nil { 4358 return nil, err 4359 } 4360 return ret, nil 4361 // { 4362 // "description": "Lists information about the supported locations for this service.", 4363 // "flatPath": "v1alpha2/projects/{projectsId}/locations", 4364 // "httpMethod": "GET", 4365 // "id": "healthcare.projects.locations.list", 4366 // "parameterOrder": [ 4367 // "name" 4368 // ], 4369 // "parameters": { 4370 // "filter": { 4371 // "description": "The standard list filter.", 4372 // "location": "query", 4373 // "type": "string" 4374 // }, 4375 // "name": { 4376 // "description": "The resource that owns the locations collection, if applicable.", 4377 // "location": "path", 4378 // "pattern": "^projects/[^/]+$", 4379 // "required": true, 4380 // "type": "string" 4381 // }, 4382 // "pageSize": { 4383 // "description": "The standard list page size.", 4384 // "format": "int32", 4385 // "location": "query", 4386 // "type": "integer" 4387 // }, 4388 // "pageToken": { 4389 // "description": "The standard list page token.", 4390 // "location": "query", 4391 // "type": "string" 4392 // } 4393 // }, 4394 // "path": "v1alpha2/{+name}/locations", 4395 // "response": { 4396 // "$ref": "ListLocationsResponse" 4397 // }, 4398 // "scopes": [ 4399 // "https://www.googleapis.com/auth/cloud-platform" 4400 // ] 4401 // } 4402 4403} 4404 4405// Pages invokes f for each page of results. 4406// A non-nil error returned from f will halt the iteration. 4407// The provided context supersedes any context provided to the Context method. 4408func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { 4409 c.ctx_ = ctx 4410 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 4411 for { 4412 x, err := c.Do() 4413 if err != nil { 4414 return err 4415 } 4416 if err := f(x); err != nil { 4417 return err 4418 } 4419 if x.NextPageToken == "" { 4420 return nil 4421 } 4422 c.PageToken(x.NextPageToken) 4423 } 4424} 4425 4426// method id "healthcare.projects.locations.datasets.create": 4427 4428type ProjectsLocationsDatasetsCreateCall struct { 4429 s *Service 4430 parent string 4431 dataset *Dataset 4432 urlParams_ gensupport.URLParams 4433 ctx_ context.Context 4434 header_ http.Header 4435} 4436 4437// Create: Creates a new health dataset. Results are returned through 4438// the 4439// Operation interface which returns either an 4440// `Operation.response` which contains a Dataset or 4441// `Operation.error`. The metadata 4442// field type is OperationMetadata. 4443// A Google Cloud Platform project can contain up to 500 datasets across 4444// all 4445// regions. 4446func (r *ProjectsLocationsDatasetsService) Create(parent string, dataset *Dataset) *ProjectsLocationsDatasetsCreateCall { 4447 c := &ProjectsLocationsDatasetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4448 c.parent = parent 4449 c.dataset = dataset 4450 return c 4451} 4452 4453// DatasetId sets the optional parameter "datasetId": The ID of the 4454// dataset that is being created. 4455// The string must match the following regex: 4456// `[\p{L}\p{N}_\-\.]{1,256}`. 4457func (c *ProjectsLocationsDatasetsCreateCall) DatasetId(datasetId string) *ProjectsLocationsDatasetsCreateCall { 4458 c.urlParams_.Set("datasetId", datasetId) 4459 return c 4460} 4461 4462// Fields allows partial responses to be retrieved. See 4463// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4464// for more information. 4465func (c *ProjectsLocationsDatasetsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsCreateCall { 4466 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4467 return c 4468} 4469 4470// Context sets the context to be used in this call's Do method. Any 4471// pending HTTP request will be aborted if the provided context is 4472// canceled. 4473func (c *ProjectsLocationsDatasetsCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsCreateCall { 4474 c.ctx_ = ctx 4475 return c 4476} 4477 4478// Header returns an http.Header that can be modified by the caller to 4479// add HTTP headers to the request. 4480func (c *ProjectsLocationsDatasetsCreateCall) Header() http.Header { 4481 if c.header_ == nil { 4482 c.header_ = make(http.Header) 4483 } 4484 return c.header_ 4485} 4486 4487func (c *ProjectsLocationsDatasetsCreateCall) doRequest(alt string) (*http.Response, error) { 4488 reqHeaders := make(http.Header) 4489 for k, v := range c.header_ { 4490 reqHeaders[k] = v 4491 } 4492 reqHeaders.Set("User-Agent", c.s.userAgent()) 4493 var body io.Reader = nil 4494 body, err := googleapi.WithoutDataWrapper.JSONReader(c.dataset) 4495 if err != nil { 4496 return nil, err 4497 } 4498 reqHeaders.Set("Content-Type", "application/json") 4499 c.urlParams_.Set("alt", alt) 4500 c.urlParams_.Set("prettyPrint", "false") 4501 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/datasets") 4502 urls += "?" + c.urlParams_.Encode() 4503 req, err := http.NewRequest("POST", urls, body) 4504 if err != nil { 4505 return nil, err 4506 } 4507 req.Header = reqHeaders 4508 googleapi.Expand(req.URL, map[string]string{ 4509 "parent": c.parent, 4510 }) 4511 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4512} 4513 4514// Do executes the "healthcare.projects.locations.datasets.create" call. 4515// Exactly one of *Operation or error will be non-nil. Any non-2xx 4516// status code is an error. Response headers are in either 4517// *Operation.ServerResponse.Header or (if a response was returned at 4518// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 4519// to check whether the returned error was because 4520// http.StatusNotModified was returned. 4521func (c *ProjectsLocationsDatasetsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 4522 gensupport.SetOptions(c.urlParams_, opts...) 4523 res, err := c.doRequest("json") 4524 if res != nil && res.StatusCode == http.StatusNotModified { 4525 if res.Body != nil { 4526 res.Body.Close() 4527 } 4528 return nil, &googleapi.Error{ 4529 Code: res.StatusCode, 4530 Header: res.Header, 4531 } 4532 } 4533 if err != nil { 4534 return nil, err 4535 } 4536 defer googleapi.CloseBody(res) 4537 if err := googleapi.CheckResponse(res); err != nil { 4538 return nil, err 4539 } 4540 ret := &Operation{ 4541 ServerResponse: googleapi.ServerResponse{ 4542 Header: res.Header, 4543 HTTPStatusCode: res.StatusCode, 4544 }, 4545 } 4546 target := &ret 4547 if err := gensupport.DecodeResponse(target, res); err != nil { 4548 return nil, err 4549 } 4550 return ret, nil 4551 // { 4552 // "description": "Creates a new health dataset. Results are returned through the\nOperation interface which returns either an\n`Operation.response` which contains a Dataset or\n`Operation.error`. The metadata\nfield type is OperationMetadata.\nA Google Cloud Platform project can contain up to 500 datasets across all\nregions.", 4553 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets", 4554 // "httpMethod": "POST", 4555 // "id": "healthcare.projects.locations.datasets.create", 4556 // "parameterOrder": [ 4557 // "parent" 4558 // ], 4559 // "parameters": { 4560 // "datasetId": { 4561 // "description": "The ID of the dataset that is being created.\nThe string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`.", 4562 // "location": "query", 4563 // "type": "string" 4564 // }, 4565 // "parent": { 4566 // "description": "The name of the project in which the dataset should be created (e.g.,\n`projects/{project_id}/locations/{location_id}`).", 4567 // "location": "path", 4568 // "pattern": "^projects/[^/]+/locations/[^/]+$", 4569 // "required": true, 4570 // "type": "string" 4571 // } 4572 // }, 4573 // "path": "v1alpha2/{+parent}/datasets", 4574 // "request": { 4575 // "$ref": "Dataset" 4576 // }, 4577 // "response": { 4578 // "$ref": "Operation" 4579 // }, 4580 // "scopes": [ 4581 // "https://www.googleapis.com/auth/cloud-platform" 4582 // ] 4583 // } 4584 4585} 4586 4587// method id "healthcare.projects.locations.datasets.deidentify": 4588 4589type ProjectsLocationsDatasetsDeidentifyCall struct { 4590 s *Service 4591 sourceDataset string 4592 deidentifydatasetrequest *DeidentifyDatasetRequest 4593 urlParams_ gensupport.URLParams 4594 ctx_ context.Context 4595 header_ http.Header 4596} 4597 4598// Deidentify: Creates a new dataset containing de-identified data from 4599// the source 4600// dataset. The metadata field type 4601// is OperationMetadata. 4602// If the request is successful, the 4603// response field type is 4604// DeidentifySummary. 4605// If errors occur, 4606// details field type is 4607// DeidentifyErrorDetails. 4608func (r *ProjectsLocationsDatasetsService) Deidentify(sourceDataset string, deidentifydatasetrequest *DeidentifyDatasetRequest) *ProjectsLocationsDatasetsDeidentifyCall { 4609 c := &ProjectsLocationsDatasetsDeidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4610 c.sourceDataset = sourceDataset 4611 c.deidentifydatasetrequest = deidentifydatasetrequest 4612 return c 4613} 4614 4615// Fields allows partial responses to be retrieved. See 4616// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4617// for more information. 4618func (c *ProjectsLocationsDatasetsDeidentifyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDeidentifyCall { 4619 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4620 return c 4621} 4622 4623// Context sets the context to be used in this call's Do method. Any 4624// pending HTTP request will be aborted if the provided context is 4625// canceled. 4626func (c *ProjectsLocationsDatasetsDeidentifyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDeidentifyCall { 4627 c.ctx_ = ctx 4628 return c 4629} 4630 4631// Header returns an http.Header that can be modified by the caller to 4632// add HTTP headers to the request. 4633func (c *ProjectsLocationsDatasetsDeidentifyCall) Header() http.Header { 4634 if c.header_ == nil { 4635 c.header_ = make(http.Header) 4636 } 4637 return c.header_ 4638} 4639 4640func (c *ProjectsLocationsDatasetsDeidentifyCall) doRequest(alt string) (*http.Response, error) { 4641 reqHeaders := make(http.Header) 4642 for k, v := range c.header_ { 4643 reqHeaders[k] = v 4644 } 4645 reqHeaders.Set("User-Agent", c.s.userAgent()) 4646 var body io.Reader = nil 4647 body, err := googleapi.WithoutDataWrapper.JSONReader(c.deidentifydatasetrequest) 4648 if err != nil { 4649 return nil, err 4650 } 4651 reqHeaders.Set("Content-Type", "application/json") 4652 c.urlParams_.Set("alt", alt) 4653 c.urlParams_.Set("prettyPrint", "false") 4654 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+sourceDataset}:deidentify") 4655 urls += "?" + c.urlParams_.Encode() 4656 req, err := http.NewRequest("POST", urls, body) 4657 if err != nil { 4658 return nil, err 4659 } 4660 req.Header = reqHeaders 4661 googleapi.Expand(req.URL, map[string]string{ 4662 "sourceDataset": c.sourceDataset, 4663 }) 4664 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4665} 4666 4667// Do executes the "healthcare.projects.locations.datasets.deidentify" call. 4668// Exactly one of *Operation or error will be non-nil. Any non-2xx 4669// status code is an error. Response headers are in either 4670// *Operation.ServerResponse.Header or (if a response was returned at 4671// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 4672// to check whether the returned error was because 4673// http.StatusNotModified was returned. 4674func (c *ProjectsLocationsDatasetsDeidentifyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 4675 gensupport.SetOptions(c.urlParams_, opts...) 4676 res, err := c.doRequest("json") 4677 if res != nil && res.StatusCode == http.StatusNotModified { 4678 if res.Body != nil { 4679 res.Body.Close() 4680 } 4681 return nil, &googleapi.Error{ 4682 Code: res.StatusCode, 4683 Header: res.Header, 4684 } 4685 } 4686 if err != nil { 4687 return nil, err 4688 } 4689 defer googleapi.CloseBody(res) 4690 if err := googleapi.CheckResponse(res); err != nil { 4691 return nil, err 4692 } 4693 ret := &Operation{ 4694 ServerResponse: googleapi.ServerResponse{ 4695 Header: res.Header, 4696 HTTPStatusCode: res.StatusCode, 4697 }, 4698 } 4699 target := &ret 4700 if err := gensupport.DecodeResponse(target, res); err != nil { 4701 return nil, err 4702 } 4703 return ret, nil 4704 // { 4705 // "description": "Creates a new dataset containing de-identified data from the source\ndataset. The metadata field type\nis OperationMetadata.\nIf the request is successful, the\nresponse field type is\nDeidentifySummary.\nIf errors occur,\ndetails field type is\nDeidentifyErrorDetails.", 4706 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}:deidentify", 4707 // "httpMethod": "POST", 4708 // "id": "healthcare.projects.locations.datasets.deidentify", 4709 // "parameterOrder": [ 4710 // "sourceDataset" 4711 // ], 4712 // "parameters": { 4713 // "sourceDataset": { 4714 // "description": "Source dataset resource name. (e.g.,\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`).", 4715 // "location": "path", 4716 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", 4717 // "required": true, 4718 // "type": "string" 4719 // } 4720 // }, 4721 // "path": "v1alpha2/{+sourceDataset}:deidentify", 4722 // "request": { 4723 // "$ref": "DeidentifyDatasetRequest" 4724 // }, 4725 // "response": { 4726 // "$ref": "Operation" 4727 // }, 4728 // "scopes": [ 4729 // "https://www.googleapis.com/auth/cloud-platform" 4730 // ] 4731 // } 4732 4733} 4734 4735// method id "healthcare.projects.locations.datasets.delete": 4736 4737type ProjectsLocationsDatasetsDeleteCall struct { 4738 s *Service 4739 name string 4740 urlParams_ gensupport.URLParams 4741 ctx_ context.Context 4742 header_ http.Header 4743} 4744 4745// Delete: Deletes the specified health dataset and all data contained 4746// in the dataset. 4747// Deleting a dataset does not affect the sources from which the dataset 4748// was 4749// imported (if any). 4750func (r *ProjectsLocationsDatasetsService) Delete(name string) *ProjectsLocationsDatasetsDeleteCall { 4751 c := &ProjectsLocationsDatasetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4752 c.name = name 4753 return c 4754} 4755 4756// Fields allows partial responses to be retrieved. See 4757// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4758// for more information. 4759func (c *ProjectsLocationsDatasetsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDeleteCall { 4760 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4761 return c 4762} 4763 4764// Context sets the context to be used in this call's Do method. Any 4765// pending HTTP request will be aborted if the provided context is 4766// canceled. 4767func (c *ProjectsLocationsDatasetsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDeleteCall { 4768 c.ctx_ = ctx 4769 return c 4770} 4771 4772// Header returns an http.Header that can be modified by the caller to 4773// add HTTP headers to the request. 4774func (c *ProjectsLocationsDatasetsDeleteCall) Header() http.Header { 4775 if c.header_ == nil { 4776 c.header_ = make(http.Header) 4777 } 4778 return c.header_ 4779} 4780 4781func (c *ProjectsLocationsDatasetsDeleteCall) doRequest(alt string) (*http.Response, error) { 4782 reqHeaders := make(http.Header) 4783 for k, v := range c.header_ { 4784 reqHeaders[k] = v 4785 } 4786 reqHeaders.Set("User-Agent", c.s.userAgent()) 4787 var body io.Reader = nil 4788 c.urlParams_.Set("alt", alt) 4789 c.urlParams_.Set("prettyPrint", "false") 4790 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}") 4791 urls += "?" + c.urlParams_.Encode() 4792 req, err := http.NewRequest("DELETE", urls, body) 4793 if err != nil { 4794 return nil, err 4795 } 4796 req.Header = reqHeaders 4797 googleapi.Expand(req.URL, map[string]string{ 4798 "name": c.name, 4799 }) 4800 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4801} 4802 4803// Do executes the "healthcare.projects.locations.datasets.delete" call. 4804// Exactly one of *Empty or error will be non-nil. Any non-2xx status 4805// code is an error. Response headers are in either 4806// *Empty.ServerResponse.Header or (if a response was returned at all) 4807// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 4808// check whether the returned error was because http.StatusNotModified 4809// was returned. 4810func (c *ProjectsLocationsDatasetsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 4811 gensupport.SetOptions(c.urlParams_, opts...) 4812 res, err := c.doRequest("json") 4813 if res != nil && res.StatusCode == http.StatusNotModified { 4814 if res.Body != nil { 4815 res.Body.Close() 4816 } 4817 return nil, &googleapi.Error{ 4818 Code: res.StatusCode, 4819 Header: res.Header, 4820 } 4821 } 4822 if err != nil { 4823 return nil, err 4824 } 4825 defer googleapi.CloseBody(res) 4826 if err := googleapi.CheckResponse(res); err != nil { 4827 return nil, err 4828 } 4829 ret := &Empty{ 4830 ServerResponse: googleapi.ServerResponse{ 4831 Header: res.Header, 4832 HTTPStatusCode: res.StatusCode, 4833 }, 4834 } 4835 target := &ret 4836 if err := gensupport.DecodeResponse(target, res); err != nil { 4837 return nil, err 4838 } 4839 return ret, nil 4840 // { 4841 // "description": "Deletes the specified health dataset and all data contained in the dataset.\nDeleting a dataset does not affect the sources from which the dataset was\nimported (if any).", 4842 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}", 4843 // "httpMethod": "DELETE", 4844 // "id": "healthcare.projects.locations.datasets.delete", 4845 // "parameterOrder": [ 4846 // "name" 4847 // ], 4848 // "parameters": { 4849 // "name": { 4850 // "description": "The name of the dataset to delete (e.g.,\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`).", 4851 // "location": "path", 4852 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", 4853 // "required": true, 4854 // "type": "string" 4855 // } 4856 // }, 4857 // "path": "v1alpha2/{+name}", 4858 // "response": { 4859 // "$ref": "Empty" 4860 // }, 4861 // "scopes": [ 4862 // "https://www.googleapis.com/auth/cloud-platform" 4863 // ] 4864 // } 4865 4866} 4867 4868// method id "healthcare.projects.locations.datasets.get": 4869 4870type ProjectsLocationsDatasetsGetCall struct { 4871 s *Service 4872 name string 4873 urlParams_ gensupport.URLParams 4874 ifNoneMatch_ string 4875 ctx_ context.Context 4876 header_ http.Header 4877} 4878 4879// Get: Gets any metadata associated with a dataset. 4880func (r *ProjectsLocationsDatasetsService) Get(name string) *ProjectsLocationsDatasetsGetCall { 4881 c := &ProjectsLocationsDatasetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4882 c.name = name 4883 return c 4884} 4885 4886// Fields allows partial responses to be retrieved. See 4887// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4888// for more information. 4889func (c *ProjectsLocationsDatasetsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsGetCall { 4890 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4891 return c 4892} 4893 4894// IfNoneMatch sets the optional parameter which makes the operation 4895// fail if the object's ETag matches the given value. This is useful for 4896// getting updates only after the object has changed since the last 4897// request. Use googleapi.IsNotModified to check whether the response 4898// error from Do is the result of In-None-Match. 4899func (c *ProjectsLocationsDatasetsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsGetCall { 4900 c.ifNoneMatch_ = entityTag 4901 return c 4902} 4903 4904// Context sets the context to be used in this call's Do method. Any 4905// pending HTTP request will be aborted if the provided context is 4906// canceled. 4907func (c *ProjectsLocationsDatasetsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsGetCall { 4908 c.ctx_ = ctx 4909 return c 4910} 4911 4912// Header returns an http.Header that can be modified by the caller to 4913// add HTTP headers to the request. 4914func (c *ProjectsLocationsDatasetsGetCall) Header() http.Header { 4915 if c.header_ == nil { 4916 c.header_ = make(http.Header) 4917 } 4918 return c.header_ 4919} 4920 4921func (c *ProjectsLocationsDatasetsGetCall) doRequest(alt string) (*http.Response, error) { 4922 reqHeaders := make(http.Header) 4923 for k, v := range c.header_ { 4924 reqHeaders[k] = v 4925 } 4926 reqHeaders.Set("User-Agent", c.s.userAgent()) 4927 if c.ifNoneMatch_ != "" { 4928 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4929 } 4930 var body io.Reader = nil 4931 c.urlParams_.Set("alt", alt) 4932 c.urlParams_.Set("prettyPrint", "false") 4933 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}") 4934 urls += "?" + c.urlParams_.Encode() 4935 req, err := http.NewRequest("GET", urls, body) 4936 if err != nil { 4937 return nil, err 4938 } 4939 req.Header = reqHeaders 4940 googleapi.Expand(req.URL, map[string]string{ 4941 "name": c.name, 4942 }) 4943 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4944} 4945 4946// Do executes the "healthcare.projects.locations.datasets.get" call. 4947// Exactly one of *Dataset or error will be non-nil. Any non-2xx status 4948// code is an error. Response headers are in either 4949// *Dataset.ServerResponse.Header or (if a response was returned at all) 4950// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 4951// check whether the returned error was because http.StatusNotModified 4952// was returned. 4953func (c *ProjectsLocationsDatasetsGetCall) Do(opts ...googleapi.CallOption) (*Dataset, error) { 4954 gensupport.SetOptions(c.urlParams_, opts...) 4955 res, err := c.doRequest("json") 4956 if res != nil && res.StatusCode == http.StatusNotModified { 4957 if res.Body != nil { 4958 res.Body.Close() 4959 } 4960 return nil, &googleapi.Error{ 4961 Code: res.StatusCode, 4962 Header: res.Header, 4963 } 4964 } 4965 if err != nil { 4966 return nil, err 4967 } 4968 defer googleapi.CloseBody(res) 4969 if err := googleapi.CheckResponse(res); err != nil { 4970 return nil, err 4971 } 4972 ret := &Dataset{ 4973 ServerResponse: googleapi.ServerResponse{ 4974 Header: res.Header, 4975 HTTPStatusCode: res.StatusCode, 4976 }, 4977 } 4978 target := &ret 4979 if err := gensupport.DecodeResponse(target, res); err != nil { 4980 return nil, err 4981 } 4982 return ret, nil 4983 // { 4984 // "description": "Gets any metadata associated with a dataset.", 4985 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}", 4986 // "httpMethod": "GET", 4987 // "id": "healthcare.projects.locations.datasets.get", 4988 // "parameterOrder": [ 4989 // "name" 4990 // ], 4991 // "parameters": { 4992 // "name": { 4993 // "description": "The name of the dataset to read (e.g.,\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`).", 4994 // "location": "path", 4995 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", 4996 // "required": true, 4997 // "type": "string" 4998 // } 4999 // }, 5000 // "path": "v1alpha2/{+name}", 5001 // "response": { 5002 // "$ref": "Dataset" 5003 // }, 5004 // "scopes": [ 5005 // "https://www.googleapis.com/auth/cloud-platform" 5006 // ] 5007 // } 5008 5009} 5010 5011// method id "healthcare.projects.locations.datasets.getIamPolicy": 5012 5013type ProjectsLocationsDatasetsGetIamPolicyCall struct { 5014 s *Service 5015 resource string 5016 urlParams_ gensupport.URLParams 5017 ifNoneMatch_ string 5018 ctx_ context.Context 5019 header_ http.Header 5020} 5021 5022// GetIamPolicy: Gets the access control policy for a resource. 5023// Returns an empty policy if the resource exists and does not have a 5024// policy 5025// set. 5026func (r *ProjectsLocationsDatasetsService) GetIamPolicy(resource string) *ProjectsLocationsDatasetsGetIamPolicyCall { 5027 c := &ProjectsLocationsDatasetsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5028 c.resource = resource 5029 return c 5030} 5031 5032// Fields allows partial responses to be retrieved. See 5033// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5034// for more information. 5035func (c *ProjectsLocationsDatasetsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsGetIamPolicyCall { 5036 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5037 return c 5038} 5039 5040// IfNoneMatch sets the optional parameter which makes the operation 5041// fail if the object's ETag matches the given value. This is useful for 5042// getting updates only after the object has changed since the last 5043// request. Use googleapi.IsNotModified to check whether the response 5044// error from Do is the result of In-None-Match. 5045func (c *ProjectsLocationsDatasetsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsGetIamPolicyCall { 5046 c.ifNoneMatch_ = entityTag 5047 return c 5048} 5049 5050// Context sets the context to be used in this call's Do method. Any 5051// pending HTTP request will be aborted if the provided context is 5052// canceled. 5053func (c *ProjectsLocationsDatasetsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsGetIamPolicyCall { 5054 c.ctx_ = ctx 5055 return c 5056} 5057 5058// Header returns an http.Header that can be modified by the caller to 5059// add HTTP headers to the request. 5060func (c *ProjectsLocationsDatasetsGetIamPolicyCall) Header() http.Header { 5061 if c.header_ == nil { 5062 c.header_ = make(http.Header) 5063 } 5064 return c.header_ 5065} 5066 5067func (c *ProjectsLocationsDatasetsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 5068 reqHeaders := make(http.Header) 5069 for k, v := range c.header_ { 5070 reqHeaders[k] = v 5071 } 5072 reqHeaders.Set("User-Agent", c.s.userAgent()) 5073 if c.ifNoneMatch_ != "" { 5074 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5075 } 5076 var body io.Reader = nil 5077 c.urlParams_.Set("alt", alt) 5078 c.urlParams_.Set("prettyPrint", "false") 5079 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:getIamPolicy") 5080 urls += "?" + c.urlParams_.Encode() 5081 req, err := http.NewRequest("GET", urls, body) 5082 if err != nil { 5083 return nil, err 5084 } 5085 req.Header = reqHeaders 5086 googleapi.Expand(req.URL, map[string]string{ 5087 "resource": c.resource, 5088 }) 5089 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5090} 5091 5092// Do executes the "healthcare.projects.locations.datasets.getIamPolicy" call. 5093// Exactly one of *Policy or error will be non-nil. Any non-2xx status 5094// code is an error. Response headers are in either 5095// *Policy.ServerResponse.Header or (if a response was returned at all) 5096// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 5097// check whether the returned error was because http.StatusNotModified 5098// was returned. 5099func (c *ProjectsLocationsDatasetsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 5100 gensupport.SetOptions(c.urlParams_, opts...) 5101 res, err := c.doRequest("json") 5102 if res != nil && res.StatusCode == http.StatusNotModified { 5103 if res.Body != nil { 5104 res.Body.Close() 5105 } 5106 return nil, &googleapi.Error{ 5107 Code: res.StatusCode, 5108 Header: res.Header, 5109 } 5110 } 5111 if err != nil { 5112 return nil, err 5113 } 5114 defer googleapi.CloseBody(res) 5115 if err := googleapi.CheckResponse(res); err != nil { 5116 return nil, err 5117 } 5118 ret := &Policy{ 5119 ServerResponse: googleapi.ServerResponse{ 5120 Header: res.Header, 5121 HTTPStatusCode: res.StatusCode, 5122 }, 5123 } 5124 target := &ret 5125 if err := gensupport.DecodeResponse(target, res); err != nil { 5126 return nil, err 5127 } 5128 return ret, nil 5129 // { 5130 // "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", 5131 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}:getIamPolicy", 5132 // "httpMethod": "GET", 5133 // "id": "healthcare.projects.locations.datasets.getIamPolicy", 5134 // "parameterOrder": [ 5135 // "resource" 5136 // ], 5137 // "parameters": { 5138 // "resource": { 5139 // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", 5140 // "location": "path", 5141 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", 5142 // "required": true, 5143 // "type": "string" 5144 // } 5145 // }, 5146 // "path": "v1alpha2/{+resource}:getIamPolicy", 5147 // "response": { 5148 // "$ref": "Policy" 5149 // }, 5150 // "scopes": [ 5151 // "https://www.googleapis.com/auth/cloud-platform" 5152 // ] 5153 // } 5154 5155} 5156 5157// method id "healthcare.projects.locations.datasets.list": 5158 5159type ProjectsLocationsDatasetsListCall struct { 5160 s *Service 5161 parent string 5162 urlParams_ gensupport.URLParams 5163 ifNoneMatch_ string 5164 ctx_ context.Context 5165 header_ http.Header 5166} 5167 5168// List: Lists the health datasets in the current project. 5169func (r *ProjectsLocationsDatasetsService) List(parent string) *ProjectsLocationsDatasetsListCall { 5170 c := &ProjectsLocationsDatasetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5171 c.parent = parent 5172 return c 5173} 5174 5175// PageSize sets the optional parameter "pageSize": The maximum number 5176// of items to return. Capped to 100 if not specified. 5177// May not be larger than 1000. 5178func (c *ProjectsLocationsDatasetsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsListCall { 5179 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 5180 return c 5181} 5182 5183// PageToken sets the optional parameter "pageToken": The 5184// next_page_token value returned from a previous List request, if any. 5185func (c *ProjectsLocationsDatasetsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsListCall { 5186 c.urlParams_.Set("pageToken", pageToken) 5187 return c 5188} 5189 5190// Fields allows partial responses to be retrieved. See 5191// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5192// for more information. 5193func (c *ProjectsLocationsDatasetsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsListCall { 5194 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5195 return c 5196} 5197 5198// IfNoneMatch sets the optional parameter which makes the operation 5199// fail if the object's ETag matches the given value. This is useful for 5200// getting updates only after the object has changed since the last 5201// request. Use googleapi.IsNotModified to check whether the response 5202// error from Do is the result of In-None-Match. 5203func (c *ProjectsLocationsDatasetsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsListCall { 5204 c.ifNoneMatch_ = entityTag 5205 return c 5206} 5207 5208// Context sets the context to be used in this call's Do method. Any 5209// pending HTTP request will be aborted if the provided context is 5210// canceled. 5211func (c *ProjectsLocationsDatasetsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsListCall { 5212 c.ctx_ = ctx 5213 return c 5214} 5215 5216// Header returns an http.Header that can be modified by the caller to 5217// add HTTP headers to the request. 5218func (c *ProjectsLocationsDatasetsListCall) Header() http.Header { 5219 if c.header_ == nil { 5220 c.header_ = make(http.Header) 5221 } 5222 return c.header_ 5223} 5224 5225func (c *ProjectsLocationsDatasetsListCall) doRequest(alt string) (*http.Response, error) { 5226 reqHeaders := make(http.Header) 5227 for k, v := range c.header_ { 5228 reqHeaders[k] = v 5229 } 5230 reqHeaders.Set("User-Agent", c.s.userAgent()) 5231 if c.ifNoneMatch_ != "" { 5232 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5233 } 5234 var body io.Reader = nil 5235 c.urlParams_.Set("alt", alt) 5236 c.urlParams_.Set("prettyPrint", "false") 5237 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/datasets") 5238 urls += "?" + c.urlParams_.Encode() 5239 req, err := http.NewRequest("GET", urls, body) 5240 if err != nil { 5241 return nil, err 5242 } 5243 req.Header = reqHeaders 5244 googleapi.Expand(req.URL, map[string]string{ 5245 "parent": c.parent, 5246 }) 5247 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5248} 5249 5250// Do executes the "healthcare.projects.locations.datasets.list" call. 5251// Exactly one of *ListDatasetsResponse or error will be non-nil. Any 5252// non-2xx status code is an error. Response headers are in either 5253// *ListDatasetsResponse.ServerResponse.Header or (if a response was 5254// returned at all) in error.(*googleapi.Error).Header. Use 5255// googleapi.IsNotModified to check whether the returned error was 5256// because http.StatusNotModified was returned. 5257func (c *ProjectsLocationsDatasetsListCall) Do(opts ...googleapi.CallOption) (*ListDatasetsResponse, error) { 5258 gensupport.SetOptions(c.urlParams_, opts...) 5259 res, err := c.doRequest("json") 5260 if res != nil && res.StatusCode == http.StatusNotModified { 5261 if res.Body != nil { 5262 res.Body.Close() 5263 } 5264 return nil, &googleapi.Error{ 5265 Code: res.StatusCode, 5266 Header: res.Header, 5267 } 5268 } 5269 if err != nil { 5270 return nil, err 5271 } 5272 defer googleapi.CloseBody(res) 5273 if err := googleapi.CheckResponse(res); err != nil { 5274 return nil, err 5275 } 5276 ret := &ListDatasetsResponse{ 5277 ServerResponse: googleapi.ServerResponse{ 5278 Header: res.Header, 5279 HTTPStatusCode: res.StatusCode, 5280 }, 5281 } 5282 target := &ret 5283 if err := gensupport.DecodeResponse(target, res); err != nil { 5284 return nil, err 5285 } 5286 return ret, nil 5287 // { 5288 // "description": "Lists the health datasets in the current project.", 5289 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets", 5290 // "httpMethod": "GET", 5291 // "id": "healthcare.projects.locations.datasets.list", 5292 // "parameterOrder": [ 5293 // "parent" 5294 // ], 5295 // "parameters": { 5296 // "pageSize": { 5297 // "description": "The maximum number of items to return. Capped to 100 if not specified.\nMay not be larger than 1000.", 5298 // "format": "int32", 5299 // "location": "query", 5300 // "type": "integer" 5301 // }, 5302 // "pageToken": { 5303 // "description": "The next_page_token value returned from a previous List request, if any.", 5304 // "location": "query", 5305 // "type": "string" 5306 // }, 5307 // "parent": { 5308 // "description": "The name of the project whose datasets should be listed (e.g.,\n`projects/{project_id}/locations/{location_id}`).", 5309 // "location": "path", 5310 // "pattern": "^projects/[^/]+/locations/[^/]+$", 5311 // "required": true, 5312 // "type": "string" 5313 // } 5314 // }, 5315 // "path": "v1alpha2/{+parent}/datasets", 5316 // "response": { 5317 // "$ref": "ListDatasetsResponse" 5318 // }, 5319 // "scopes": [ 5320 // "https://www.googleapis.com/auth/cloud-platform" 5321 // ] 5322 // } 5323 5324} 5325 5326// Pages invokes f for each page of results. 5327// A non-nil error returned from f will halt the iteration. 5328// The provided context supersedes any context provided to the Context method. 5329func (c *ProjectsLocationsDatasetsListCall) Pages(ctx context.Context, f func(*ListDatasetsResponse) error) error { 5330 c.ctx_ = ctx 5331 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 5332 for { 5333 x, err := c.Do() 5334 if err != nil { 5335 return err 5336 } 5337 if err := f(x); err != nil { 5338 return err 5339 } 5340 if x.NextPageToken == "" { 5341 return nil 5342 } 5343 c.PageToken(x.NextPageToken) 5344 } 5345} 5346 5347// method id "healthcare.projects.locations.datasets.patch": 5348 5349type ProjectsLocationsDatasetsPatchCall struct { 5350 s *Service 5351 name string 5352 dataset *Dataset 5353 urlParams_ gensupport.URLParams 5354 ctx_ context.Context 5355 header_ http.Header 5356} 5357 5358// Patch: Updates dataset metadata. 5359func (r *ProjectsLocationsDatasetsService) Patch(name string, dataset *Dataset) *ProjectsLocationsDatasetsPatchCall { 5360 c := &ProjectsLocationsDatasetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5361 c.name = name 5362 c.dataset = dataset 5363 return c 5364} 5365 5366// UpdateMask sets the optional parameter "updateMask": The update mask 5367// applies to the resource. For the `FieldMask` 5368// definition, 5369// see 5370// https://developers.google.com/protocol-buffers/docs/re 5371// ference/google.protobuf#fieldmask 5372func (c *ProjectsLocationsDatasetsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsPatchCall { 5373 c.urlParams_.Set("updateMask", updateMask) 5374 return c 5375} 5376 5377// Fields allows partial responses to be retrieved. See 5378// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5379// for more information. 5380func (c *ProjectsLocationsDatasetsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsPatchCall { 5381 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5382 return c 5383} 5384 5385// Context sets the context to be used in this call's Do method. Any 5386// pending HTTP request will be aborted if the provided context is 5387// canceled. 5388func (c *ProjectsLocationsDatasetsPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsPatchCall { 5389 c.ctx_ = ctx 5390 return c 5391} 5392 5393// Header returns an http.Header that can be modified by the caller to 5394// add HTTP headers to the request. 5395func (c *ProjectsLocationsDatasetsPatchCall) Header() http.Header { 5396 if c.header_ == nil { 5397 c.header_ = make(http.Header) 5398 } 5399 return c.header_ 5400} 5401 5402func (c *ProjectsLocationsDatasetsPatchCall) doRequest(alt string) (*http.Response, error) { 5403 reqHeaders := make(http.Header) 5404 for k, v := range c.header_ { 5405 reqHeaders[k] = v 5406 } 5407 reqHeaders.Set("User-Agent", c.s.userAgent()) 5408 var body io.Reader = nil 5409 body, err := googleapi.WithoutDataWrapper.JSONReader(c.dataset) 5410 if err != nil { 5411 return nil, err 5412 } 5413 reqHeaders.Set("Content-Type", "application/json") 5414 c.urlParams_.Set("alt", alt) 5415 c.urlParams_.Set("prettyPrint", "false") 5416 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}") 5417 urls += "?" + c.urlParams_.Encode() 5418 req, err := http.NewRequest("PATCH", urls, body) 5419 if err != nil { 5420 return nil, err 5421 } 5422 req.Header = reqHeaders 5423 googleapi.Expand(req.URL, map[string]string{ 5424 "name": c.name, 5425 }) 5426 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5427} 5428 5429// Do executes the "healthcare.projects.locations.datasets.patch" call. 5430// Exactly one of *Dataset or error will be non-nil. Any non-2xx status 5431// code is an error. Response headers are in either 5432// *Dataset.ServerResponse.Header or (if a response was returned at all) 5433// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 5434// check whether the returned error was because http.StatusNotModified 5435// was returned. 5436func (c *ProjectsLocationsDatasetsPatchCall) Do(opts ...googleapi.CallOption) (*Dataset, error) { 5437 gensupport.SetOptions(c.urlParams_, opts...) 5438 res, err := c.doRequest("json") 5439 if res != nil && res.StatusCode == http.StatusNotModified { 5440 if res.Body != nil { 5441 res.Body.Close() 5442 } 5443 return nil, &googleapi.Error{ 5444 Code: res.StatusCode, 5445 Header: res.Header, 5446 } 5447 } 5448 if err != nil { 5449 return nil, err 5450 } 5451 defer googleapi.CloseBody(res) 5452 if err := googleapi.CheckResponse(res); err != nil { 5453 return nil, err 5454 } 5455 ret := &Dataset{ 5456 ServerResponse: googleapi.ServerResponse{ 5457 Header: res.Header, 5458 HTTPStatusCode: res.StatusCode, 5459 }, 5460 } 5461 target := &ret 5462 if err := gensupport.DecodeResponse(target, res); err != nil { 5463 return nil, err 5464 } 5465 return ret, nil 5466 // { 5467 // "description": "Updates dataset metadata.", 5468 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}", 5469 // "httpMethod": "PATCH", 5470 // "id": "healthcare.projects.locations.datasets.patch", 5471 // "parameterOrder": [ 5472 // "name" 5473 // ], 5474 // "parameters": { 5475 // "name": { 5476 // "description": "Output only. Resource name of the dataset, of the form\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.", 5477 // "location": "path", 5478 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", 5479 // "required": true, 5480 // "type": "string" 5481 // }, 5482 // "updateMask": { 5483 // "description": "The update mask applies to the resource. For the `FieldMask` definition,\nsee\nhttps://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", 5484 // "format": "google-fieldmask", 5485 // "location": "query", 5486 // "type": "string" 5487 // } 5488 // }, 5489 // "path": "v1alpha2/{+name}", 5490 // "request": { 5491 // "$ref": "Dataset" 5492 // }, 5493 // "response": { 5494 // "$ref": "Dataset" 5495 // }, 5496 // "scopes": [ 5497 // "https://www.googleapis.com/auth/cloud-platform" 5498 // ] 5499 // } 5500 5501} 5502 5503// method id "healthcare.projects.locations.datasets.setIamPolicy": 5504 5505type ProjectsLocationsDatasetsSetIamPolicyCall struct { 5506 s *Service 5507 resource string 5508 setiampolicyrequest *SetIamPolicyRequest 5509 urlParams_ gensupport.URLParams 5510 ctx_ context.Context 5511 header_ http.Header 5512} 5513 5514// SetIamPolicy: Sets the access control policy on the specified 5515// resource. Replaces any 5516// existing policy. 5517func (r *ProjectsLocationsDatasetsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsSetIamPolicyCall { 5518 c := &ProjectsLocationsDatasetsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5519 c.resource = resource 5520 c.setiampolicyrequest = setiampolicyrequest 5521 return c 5522} 5523 5524// Fields allows partial responses to be retrieved. See 5525// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5526// for more information. 5527func (c *ProjectsLocationsDatasetsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSetIamPolicyCall { 5528 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5529 return c 5530} 5531 5532// Context sets the context to be used in this call's Do method. Any 5533// pending HTTP request will be aborted if the provided context is 5534// canceled. 5535func (c *ProjectsLocationsDatasetsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSetIamPolicyCall { 5536 c.ctx_ = ctx 5537 return c 5538} 5539 5540// Header returns an http.Header that can be modified by the caller to 5541// add HTTP headers to the request. 5542func (c *ProjectsLocationsDatasetsSetIamPolicyCall) Header() http.Header { 5543 if c.header_ == nil { 5544 c.header_ = make(http.Header) 5545 } 5546 return c.header_ 5547} 5548 5549func (c *ProjectsLocationsDatasetsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 5550 reqHeaders := make(http.Header) 5551 for k, v := range c.header_ { 5552 reqHeaders[k] = v 5553 } 5554 reqHeaders.Set("User-Agent", c.s.userAgent()) 5555 var body io.Reader = nil 5556 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 5557 if err != nil { 5558 return nil, err 5559 } 5560 reqHeaders.Set("Content-Type", "application/json") 5561 c.urlParams_.Set("alt", alt) 5562 c.urlParams_.Set("prettyPrint", "false") 5563 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:setIamPolicy") 5564 urls += "?" + c.urlParams_.Encode() 5565 req, err := http.NewRequest("POST", urls, body) 5566 if err != nil { 5567 return nil, err 5568 } 5569 req.Header = reqHeaders 5570 googleapi.Expand(req.URL, map[string]string{ 5571 "resource": c.resource, 5572 }) 5573 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5574} 5575 5576// Do executes the "healthcare.projects.locations.datasets.setIamPolicy" call. 5577// Exactly one of *Policy or error will be non-nil. Any non-2xx status 5578// code is an error. Response headers are in either 5579// *Policy.ServerResponse.Header or (if a response was returned at all) 5580// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 5581// check whether the returned error was because http.StatusNotModified 5582// was returned. 5583func (c *ProjectsLocationsDatasetsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 5584 gensupport.SetOptions(c.urlParams_, opts...) 5585 res, err := c.doRequest("json") 5586 if res != nil && res.StatusCode == http.StatusNotModified { 5587 if res.Body != nil { 5588 res.Body.Close() 5589 } 5590 return nil, &googleapi.Error{ 5591 Code: res.StatusCode, 5592 Header: res.Header, 5593 } 5594 } 5595 if err != nil { 5596 return nil, err 5597 } 5598 defer googleapi.CloseBody(res) 5599 if err := googleapi.CheckResponse(res); err != nil { 5600 return nil, err 5601 } 5602 ret := &Policy{ 5603 ServerResponse: googleapi.ServerResponse{ 5604 Header: res.Header, 5605 HTTPStatusCode: res.StatusCode, 5606 }, 5607 } 5608 target := &ret 5609 if err := gensupport.DecodeResponse(target, res); err != nil { 5610 return nil, err 5611 } 5612 return ret, nil 5613 // { 5614 // "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", 5615 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}:setIamPolicy", 5616 // "httpMethod": "POST", 5617 // "id": "healthcare.projects.locations.datasets.setIamPolicy", 5618 // "parameterOrder": [ 5619 // "resource" 5620 // ], 5621 // "parameters": { 5622 // "resource": { 5623 // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", 5624 // "location": "path", 5625 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", 5626 // "required": true, 5627 // "type": "string" 5628 // } 5629 // }, 5630 // "path": "v1alpha2/{+resource}:setIamPolicy", 5631 // "request": { 5632 // "$ref": "SetIamPolicyRequest" 5633 // }, 5634 // "response": { 5635 // "$ref": "Policy" 5636 // }, 5637 // "scopes": [ 5638 // "https://www.googleapis.com/auth/cloud-platform" 5639 // ] 5640 // } 5641 5642} 5643 5644// method id "healthcare.projects.locations.datasets.testIamPermissions": 5645 5646type ProjectsLocationsDatasetsTestIamPermissionsCall struct { 5647 s *Service 5648 resource string 5649 testiampermissionsrequest *TestIamPermissionsRequest 5650 urlParams_ gensupport.URLParams 5651 ctx_ context.Context 5652 header_ http.Header 5653} 5654 5655// TestIamPermissions: Returns permissions that a caller has on the 5656// specified resource. 5657// If the resource does not exist, this will return an empty set 5658// of 5659// permissions, not a NOT_FOUND error. 5660// 5661// Note: This operation is designed to be used for building 5662// permission-aware 5663// UIs and command-line tools, not for authorization checking. This 5664// operation 5665// may "fail open" without warning. 5666func (r *ProjectsLocationsDatasetsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsTestIamPermissionsCall { 5667 c := &ProjectsLocationsDatasetsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5668 c.resource = resource 5669 c.testiampermissionsrequest = testiampermissionsrequest 5670 return c 5671} 5672 5673// Fields allows partial responses to be retrieved. See 5674// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5675// for more information. 5676func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsTestIamPermissionsCall { 5677 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5678 return c 5679} 5680 5681// Context sets the context to be used in this call's Do method. Any 5682// pending HTTP request will be aborted if the provided context is 5683// canceled. 5684func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsTestIamPermissionsCall { 5685 c.ctx_ = ctx 5686 return c 5687} 5688 5689// Header returns an http.Header that can be modified by the caller to 5690// add HTTP headers to the request. 5691func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) Header() http.Header { 5692 if c.header_ == nil { 5693 c.header_ = make(http.Header) 5694 } 5695 return c.header_ 5696} 5697 5698func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 5699 reqHeaders := make(http.Header) 5700 for k, v := range c.header_ { 5701 reqHeaders[k] = v 5702 } 5703 reqHeaders.Set("User-Agent", c.s.userAgent()) 5704 var body io.Reader = nil 5705 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 5706 if err != nil { 5707 return nil, err 5708 } 5709 reqHeaders.Set("Content-Type", "application/json") 5710 c.urlParams_.Set("alt", alt) 5711 c.urlParams_.Set("prettyPrint", "false") 5712 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:testIamPermissions") 5713 urls += "?" + c.urlParams_.Encode() 5714 req, err := http.NewRequest("POST", urls, body) 5715 if err != nil { 5716 return nil, err 5717 } 5718 req.Header = reqHeaders 5719 googleapi.Expand(req.URL, map[string]string{ 5720 "resource": c.resource, 5721 }) 5722 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5723} 5724 5725// Do executes the "healthcare.projects.locations.datasets.testIamPermissions" call. 5726// Exactly one of *TestIamPermissionsResponse or error will be non-nil. 5727// Any non-2xx status code is an error. Response headers are in either 5728// *TestIamPermissionsResponse.ServerResponse.Header or (if a response 5729// was returned at all) in error.(*googleapi.Error).Header. Use 5730// googleapi.IsNotModified to check whether the returned error was 5731// because http.StatusNotModified was returned. 5732func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 5733 gensupport.SetOptions(c.urlParams_, opts...) 5734 res, err := c.doRequest("json") 5735 if res != nil && res.StatusCode == http.StatusNotModified { 5736 if res.Body != nil { 5737 res.Body.Close() 5738 } 5739 return nil, &googleapi.Error{ 5740 Code: res.StatusCode, 5741 Header: res.Header, 5742 } 5743 } 5744 if err != nil { 5745 return nil, err 5746 } 5747 defer googleapi.CloseBody(res) 5748 if err := googleapi.CheckResponse(res); err != nil { 5749 return nil, err 5750 } 5751 ret := &TestIamPermissionsResponse{ 5752 ServerResponse: googleapi.ServerResponse{ 5753 Header: res.Header, 5754 HTTPStatusCode: res.StatusCode, 5755 }, 5756 } 5757 target := &ret 5758 if err := gensupport.DecodeResponse(target, res); err != nil { 5759 return nil, err 5760 } 5761 return ret, nil 5762 // { 5763 // "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.", 5764 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}:testIamPermissions", 5765 // "httpMethod": "POST", 5766 // "id": "healthcare.projects.locations.datasets.testIamPermissions", 5767 // "parameterOrder": [ 5768 // "resource" 5769 // ], 5770 // "parameters": { 5771 // "resource": { 5772 // "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", 5773 // "location": "path", 5774 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", 5775 // "required": true, 5776 // "type": "string" 5777 // } 5778 // }, 5779 // "path": "v1alpha2/{+resource}:testIamPermissions", 5780 // "request": { 5781 // "$ref": "TestIamPermissionsRequest" 5782 // }, 5783 // "response": { 5784 // "$ref": "TestIamPermissionsResponse" 5785 // }, 5786 // "scopes": [ 5787 // "https://www.googleapis.com/auth/cloud-platform" 5788 // ] 5789 // } 5790 5791} 5792 5793// method id "healthcare.projects.locations.datasets.annotationStores.create": 5794 5795type ProjectsLocationsDatasetsAnnotationStoresCreateCall struct { 5796 s *Service 5797 parent string 5798 annotationstore *AnnotationStore 5799 urlParams_ gensupport.URLParams 5800 ctx_ context.Context 5801 header_ http.Header 5802} 5803 5804// Create: Creates a new Annotation store within the parent dataset. 5805func (r *ProjectsLocationsDatasetsAnnotationStoresService) Create(parent string, annotationstore *AnnotationStore) *ProjectsLocationsDatasetsAnnotationStoresCreateCall { 5806 c := &ProjectsLocationsDatasetsAnnotationStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5807 c.parent = parent 5808 c.annotationstore = annotationstore 5809 return c 5810} 5811 5812// AnnotationStoreId sets the optional parameter "annotationStoreId": 5813// The ID of the Annotation store that is being created. 5814// The string must match the following regex: 5815// `[\p{L}\p{N}_\-\.]{1,256}`. 5816func (c *ProjectsLocationsDatasetsAnnotationStoresCreateCall) AnnotationStoreId(annotationStoreId string) *ProjectsLocationsDatasetsAnnotationStoresCreateCall { 5817 c.urlParams_.Set("annotationStoreId", annotationStoreId) 5818 return c 5819} 5820 5821// Fields allows partial responses to be retrieved. See 5822// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5823// for more information. 5824func (c *ProjectsLocationsDatasetsAnnotationStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresCreateCall { 5825 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5826 return c 5827} 5828 5829// Context sets the context to be used in this call's Do method. Any 5830// pending HTTP request will be aborted if the provided context is 5831// canceled. 5832func (c *ProjectsLocationsDatasetsAnnotationStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresCreateCall { 5833 c.ctx_ = ctx 5834 return c 5835} 5836 5837// Header returns an http.Header that can be modified by the caller to 5838// add HTTP headers to the request. 5839func (c *ProjectsLocationsDatasetsAnnotationStoresCreateCall) Header() http.Header { 5840 if c.header_ == nil { 5841 c.header_ = make(http.Header) 5842 } 5843 return c.header_ 5844} 5845 5846func (c *ProjectsLocationsDatasetsAnnotationStoresCreateCall) doRequest(alt string) (*http.Response, error) { 5847 reqHeaders := make(http.Header) 5848 for k, v := range c.header_ { 5849 reqHeaders[k] = v 5850 } 5851 reqHeaders.Set("User-Agent", c.s.userAgent()) 5852 var body io.Reader = nil 5853 body, err := googleapi.WithoutDataWrapper.JSONReader(c.annotationstore) 5854 if err != nil { 5855 return nil, err 5856 } 5857 reqHeaders.Set("Content-Type", "application/json") 5858 c.urlParams_.Set("alt", alt) 5859 c.urlParams_.Set("prettyPrint", "false") 5860 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/annotationStores") 5861 urls += "?" + c.urlParams_.Encode() 5862 req, err := http.NewRequest("POST", urls, body) 5863 if err != nil { 5864 return nil, err 5865 } 5866 req.Header = reqHeaders 5867 googleapi.Expand(req.URL, map[string]string{ 5868 "parent": c.parent, 5869 }) 5870 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5871} 5872 5873// Do executes the "healthcare.projects.locations.datasets.annotationStores.create" call. 5874// Exactly one of *AnnotationStore or error will be non-nil. Any non-2xx 5875// status code is an error. Response headers are in either 5876// *AnnotationStore.ServerResponse.Header or (if a response was returned 5877// at all) in error.(*googleapi.Error).Header. Use 5878// googleapi.IsNotModified to check whether the returned error was 5879// because http.StatusNotModified was returned. 5880func (c *ProjectsLocationsDatasetsAnnotationStoresCreateCall) Do(opts ...googleapi.CallOption) (*AnnotationStore, error) { 5881 gensupport.SetOptions(c.urlParams_, opts...) 5882 res, err := c.doRequest("json") 5883 if res != nil && res.StatusCode == http.StatusNotModified { 5884 if res.Body != nil { 5885 res.Body.Close() 5886 } 5887 return nil, &googleapi.Error{ 5888 Code: res.StatusCode, 5889 Header: res.Header, 5890 } 5891 } 5892 if err != nil { 5893 return nil, err 5894 } 5895 defer googleapi.CloseBody(res) 5896 if err := googleapi.CheckResponse(res); err != nil { 5897 return nil, err 5898 } 5899 ret := &AnnotationStore{ 5900 ServerResponse: googleapi.ServerResponse{ 5901 Header: res.Header, 5902 HTTPStatusCode: res.StatusCode, 5903 }, 5904 } 5905 target := &ret 5906 if err := gensupport.DecodeResponse(target, res); err != nil { 5907 return nil, err 5908 } 5909 return ret, nil 5910 // { 5911 // "description": "Creates a new Annotation store within the parent dataset.", 5912 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores", 5913 // "httpMethod": "POST", 5914 // "id": "healthcare.projects.locations.datasets.annotationStores.create", 5915 // "parameterOrder": [ 5916 // "parent" 5917 // ], 5918 // "parameters": { 5919 // "annotationStoreId": { 5920 // "description": "The ID of the Annotation store that is being created.\nThe string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`.", 5921 // "location": "query", 5922 // "type": "string" 5923 // }, 5924 // "parent": { 5925 // "description": "The name of the dataset this Annotation store belongs to.", 5926 // "location": "path", 5927 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", 5928 // "required": true, 5929 // "type": "string" 5930 // } 5931 // }, 5932 // "path": "v1alpha2/{+parent}/annotationStores", 5933 // "request": { 5934 // "$ref": "AnnotationStore" 5935 // }, 5936 // "response": { 5937 // "$ref": "AnnotationStore" 5938 // }, 5939 // "scopes": [ 5940 // "https://www.googleapis.com/auth/cloud-platform" 5941 // ] 5942 // } 5943 5944} 5945 5946// method id "healthcare.projects.locations.datasets.annotationStores.delete": 5947 5948type ProjectsLocationsDatasetsAnnotationStoresDeleteCall struct { 5949 s *Service 5950 name string 5951 urlParams_ gensupport.URLParams 5952 ctx_ context.Context 5953 header_ http.Header 5954} 5955 5956// Delete: Deletes the specified Annotation store and removes all 5957// annotations that are 5958// contained within it. 5959func (r *ProjectsLocationsDatasetsAnnotationStoresService) Delete(name string) *ProjectsLocationsDatasetsAnnotationStoresDeleteCall { 5960 c := &ProjectsLocationsDatasetsAnnotationStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5961 c.name = name 5962 return c 5963} 5964 5965// Fields allows partial responses to be retrieved. See 5966// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5967// for more information. 5968func (c *ProjectsLocationsDatasetsAnnotationStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresDeleteCall { 5969 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5970 return c 5971} 5972 5973// Context sets the context to be used in this call's Do method. Any 5974// pending HTTP request will be aborted if the provided context is 5975// canceled. 5976func (c *ProjectsLocationsDatasetsAnnotationStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresDeleteCall { 5977 c.ctx_ = ctx 5978 return c 5979} 5980 5981// Header returns an http.Header that can be modified by the caller to 5982// add HTTP headers to the request. 5983func (c *ProjectsLocationsDatasetsAnnotationStoresDeleteCall) Header() http.Header { 5984 if c.header_ == nil { 5985 c.header_ = make(http.Header) 5986 } 5987 return c.header_ 5988} 5989 5990func (c *ProjectsLocationsDatasetsAnnotationStoresDeleteCall) doRequest(alt string) (*http.Response, error) { 5991 reqHeaders := make(http.Header) 5992 for k, v := range c.header_ { 5993 reqHeaders[k] = v 5994 } 5995 reqHeaders.Set("User-Agent", c.s.userAgent()) 5996 var body io.Reader = nil 5997 c.urlParams_.Set("alt", alt) 5998 c.urlParams_.Set("prettyPrint", "false") 5999 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}") 6000 urls += "?" + c.urlParams_.Encode() 6001 req, err := http.NewRequest("DELETE", urls, body) 6002 if err != nil { 6003 return nil, err 6004 } 6005 req.Header = reqHeaders 6006 googleapi.Expand(req.URL, map[string]string{ 6007 "name": c.name, 6008 }) 6009 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6010} 6011 6012// Do executes the "healthcare.projects.locations.datasets.annotationStores.delete" call. 6013// Exactly one of *Empty or error will be non-nil. Any non-2xx status 6014// code is an error. Response headers are in either 6015// *Empty.ServerResponse.Header or (if a response was returned at all) 6016// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 6017// check whether the returned error was because http.StatusNotModified 6018// was returned. 6019func (c *ProjectsLocationsDatasetsAnnotationStoresDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 6020 gensupport.SetOptions(c.urlParams_, opts...) 6021 res, err := c.doRequest("json") 6022 if res != nil && res.StatusCode == http.StatusNotModified { 6023 if res.Body != nil { 6024 res.Body.Close() 6025 } 6026 return nil, &googleapi.Error{ 6027 Code: res.StatusCode, 6028 Header: res.Header, 6029 } 6030 } 6031 if err != nil { 6032 return nil, err 6033 } 6034 defer googleapi.CloseBody(res) 6035 if err := googleapi.CheckResponse(res); err != nil { 6036 return nil, err 6037 } 6038 ret := &Empty{ 6039 ServerResponse: googleapi.ServerResponse{ 6040 Header: res.Header, 6041 HTTPStatusCode: res.StatusCode, 6042 }, 6043 } 6044 target := &ret 6045 if err := gensupport.DecodeResponse(target, res); err != nil { 6046 return nil, err 6047 } 6048 return ret, nil 6049 // { 6050 // "description": "Deletes the specified Annotation store and removes all annotations that are\ncontained within it.", 6051 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores/{annotationStoresId}", 6052 // "httpMethod": "DELETE", 6053 // "id": "healthcare.projects.locations.datasets.annotationStores.delete", 6054 // "parameterOrder": [ 6055 // "name" 6056 // ], 6057 // "parameters": { 6058 // "name": { 6059 // "description": "The resource name of the Annotation store to delete.", 6060 // "location": "path", 6061 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$", 6062 // "required": true, 6063 // "type": "string" 6064 // } 6065 // }, 6066 // "path": "v1alpha2/{+name}", 6067 // "response": { 6068 // "$ref": "Empty" 6069 // }, 6070 // "scopes": [ 6071 // "https://www.googleapis.com/auth/cloud-platform" 6072 // ] 6073 // } 6074 6075} 6076 6077// method id "healthcare.projects.locations.datasets.annotationStores.get": 6078 6079type ProjectsLocationsDatasetsAnnotationStoresGetCall struct { 6080 s *Service 6081 name string 6082 urlParams_ gensupport.URLParams 6083 ifNoneMatch_ string 6084 ctx_ context.Context 6085 header_ http.Header 6086} 6087 6088// Get: Gets the specified Annotation store or returns NOT_FOUND if it 6089// does not 6090// exist. 6091func (r *ProjectsLocationsDatasetsAnnotationStoresService) Get(name string) *ProjectsLocationsDatasetsAnnotationStoresGetCall { 6092 c := &ProjectsLocationsDatasetsAnnotationStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6093 c.name = name 6094 return c 6095} 6096 6097// Fields allows partial responses to be retrieved. See 6098// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6099// for more information. 6100func (c *ProjectsLocationsDatasetsAnnotationStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresGetCall { 6101 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6102 return c 6103} 6104 6105// IfNoneMatch sets the optional parameter which makes the operation 6106// fail if the object's ETag matches the given value. This is useful for 6107// getting updates only after the object has changed since the last 6108// request. Use googleapi.IsNotModified to check whether the response 6109// error from Do is the result of In-None-Match. 6110func (c *ProjectsLocationsDatasetsAnnotationStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsAnnotationStoresGetCall { 6111 c.ifNoneMatch_ = entityTag 6112 return c 6113} 6114 6115// Context sets the context to be used in this call's Do method. Any 6116// pending HTTP request will be aborted if the provided context is 6117// canceled. 6118func (c *ProjectsLocationsDatasetsAnnotationStoresGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresGetCall { 6119 c.ctx_ = ctx 6120 return c 6121} 6122 6123// Header returns an http.Header that can be modified by the caller to 6124// add HTTP headers to the request. 6125func (c *ProjectsLocationsDatasetsAnnotationStoresGetCall) Header() http.Header { 6126 if c.header_ == nil { 6127 c.header_ = make(http.Header) 6128 } 6129 return c.header_ 6130} 6131 6132func (c *ProjectsLocationsDatasetsAnnotationStoresGetCall) doRequest(alt string) (*http.Response, error) { 6133 reqHeaders := make(http.Header) 6134 for k, v := range c.header_ { 6135 reqHeaders[k] = v 6136 } 6137 reqHeaders.Set("User-Agent", c.s.userAgent()) 6138 if c.ifNoneMatch_ != "" { 6139 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6140 } 6141 var body io.Reader = nil 6142 c.urlParams_.Set("alt", alt) 6143 c.urlParams_.Set("prettyPrint", "false") 6144 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}") 6145 urls += "?" + c.urlParams_.Encode() 6146 req, err := http.NewRequest("GET", urls, body) 6147 if err != nil { 6148 return nil, err 6149 } 6150 req.Header = reqHeaders 6151 googleapi.Expand(req.URL, map[string]string{ 6152 "name": c.name, 6153 }) 6154 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6155} 6156 6157// Do executes the "healthcare.projects.locations.datasets.annotationStores.get" call. 6158// Exactly one of *AnnotationStore or error will be non-nil. Any non-2xx 6159// status code is an error. Response headers are in either 6160// *AnnotationStore.ServerResponse.Header or (if a response was returned 6161// at all) in error.(*googleapi.Error).Header. Use 6162// googleapi.IsNotModified to check whether the returned error was 6163// because http.StatusNotModified was returned. 6164func (c *ProjectsLocationsDatasetsAnnotationStoresGetCall) Do(opts ...googleapi.CallOption) (*AnnotationStore, error) { 6165 gensupport.SetOptions(c.urlParams_, opts...) 6166 res, err := c.doRequest("json") 6167 if res != nil && res.StatusCode == http.StatusNotModified { 6168 if res.Body != nil { 6169 res.Body.Close() 6170 } 6171 return nil, &googleapi.Error{ 6172 Code: res.StatusCode, 6173 Header: res.Header, 6174 } 6175 } 6176 if err != nil { 6177 return nil, err 6178 } 6179 defer googleapi.CloseBody(res) 6180 if err := googleapi.CheckResponse(res); err != nil { 6181 return nil, err 6182 } 6183 ret := &AnnotationStore{ 6184 ServerResponse: googleapi.ServerResponse{ 6185 Header: res.Header, 6186 HTTPStatusCode: res.StatusCode, 6187 }, 6188 } 6189 target := &ret 6190 if err := gensupport.DecodeResponse(target, res); err != nil { 6191 return nil, err 6192 } 6193 return ret, nil 6194 // { 6195 // "description": "Gets the specified Annotation store or returns NOT_FOUND if it does not\nexist.", 6196 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores/{annotationStoresId}", 6197 // "httpMethod": "GET", 6198 // "id": "healthcare.projects.locations.datasets.annotationStores.get", 6199 // "parameterOrder": [ 6200 // "name" 6201 // ], 6202 // "parameters": { 6203 // "name": { 6204 // "description": "The resource name of the Annotation store to get.", 6205 // "location": "path", 6206 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$", 6207 // "required": true, 6208 // "type": "string" 6209 // } 6210 // }, 6211 // "path": "v1alpha2/{+name}", 6212 // "response": { 6213 // "$ref": "AnnotationStore" 6214 // }, 6215 // "scopes": [ 6216 // "https://www.googleapis.com/auth/cloud-platform" 6217 // ] 6218 // } 6219 6220} 6221 6222// method id "healthcare.projects.locations.datasets.annotationStores.getIamPolicy": 6223 6224type ProjectsLocationsDatasetsAnnotationStoresGetIamPolicyCall struct { 6225 s *Service 6226 resource string 6227 getiampolicyrequest *GetIamPolicyRequest 6228 urlParams_ gensupport.URLParams 6229 ctx_ context.Context 6230 header_ http.Header 6231} 6232 6233// GetIamPolicy: Gets the access control policy for a resource. Returns 6234// NOT_FOUND error if 6235// the resource does not exist. Returns an empty policy if the resource 6236// exists 6237// but does not have a policy set. 6238// 6239// Authorization requires the Google IAM 6240// permission 6241// `healthcare.AnnotationStores.getIamPolicy` on the specified resource 6242func (r *ProjectsLocationsDatasetsAnnotationStoresService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsDatasetsAnnotationStoresGetIamPolicyCall { 6243 c := &ProjectsLocationsDatasetsAnnotationStoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6244 c.resource = resource 6245 c.getiampolicyrequest = getiampolicyrequest 6246 return c 6247} 6248 6249// Fields allows partial responses to be retrieved. See 6250// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6251// for more information. 6252func (c *ProjectsLocationsDatasetsAnnotationStoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresGetIamPolicyCall { 6253 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6254 return c 6255} 6256 6257// Context sets the context to be used in this call's Do method. Any 6258// pending HTTP request will be aborted if the provided context is 6259// canceled. 6260func (c *ProjectsLocationsDatasetsAnnotationStoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresGetIamPolicyCall { 6261 c.ctx_ = ctx 6262 return c 6263} 6264 6265// Header returns an http.Header that can be modified by the caller to 6266// add HTTP headers to the request. 6267func (c *ProjectsLocationsDatasetsAnnotationStoresGetIamPolicyCall) Header() http.Header { 6268 if c.header_ == nil { 6269 c.header_ = make(http.Header) 6270 } 6271 return c.header_ 6272} 6273 6274func (c *ProjectsLocationsDatasetsAnnotationStoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 6275 reqHeaders := make(http.Header) 6276 for k, v := range c.header_ { 6277 reqHeaders[k] = v 6278 } 6279 reqHeaders.Set("User-Agent", c.s.userAgent()) 6280 var body io.Reader = nil 6281 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) 6282 if err != nil { 6283 return nil, err 6284 } 6285 reqHeaders.Set("Content-Type", "application/json") 6286 c.urlParams_.Set("alt", alt) 6287 c.urlParams_.Set("prettyPrint", "false") 6288 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:getIamPolicy") 6289 urls += "?" + c.urlParams_.Encode() 6290 req, err := http.NewRequest("POST", urls, body) 6291 if err != nil { 6292 return nil, err 6293 } 6294 req.Header = reqHeaders 6295 googleapi.Expand(req.URL, map[string]string{ 6296 "resource": c.resource, 6297 }) 6298 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6299} 6300 6301// Do executes the "healthcare.projects.locations.datasets.annotationStores.getIamPolicy" call. 6302// Exactly one of *Policy or error will be non-nil. Any non-2xx status 6303// code is an error. Response headers are in either 6304// *Policy.ServerResponse.Header or (if a response was returned at all) 6305// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 6306// check whether the returned error was because http.StatusNotModified 6307// was returned. 6308func (c *ProjectsLocationsDatasetsAnnotationStoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 6309 gensupport.SetOptions(c.urlParams_, opts...) 6310 res, err := c.doRequest("json") 6311 if res != nil && res.StatusCode == http.StatusNotModified { 6312 if res.Body != nil { 6313 res.Body.Close() 6314 } 6315 return nil, &googleapi.Error{ 6316 Code: res.StatusCode, 6317 Header: res.Header, 6318 } 6319 } 6320 if err != nil { 6321 return nil, err 6322 } 6323 defer googleapi.CloseBody(res) 6324 if err := googleapi.CheckResponse(res); err != nil { 6325 return nil, err 6326 } 6327 ret := &Policy{ 6328 ServerResponse: googleapi.ServerResponse{ 6329 Header: res.Header, 6330 HTTPStatusCode: res.StatusCode, 6331 }, 6332 } 6333 target := &ret 6334 if err := gensupport.DecodeResponse(target, res); err != nil { 6335 return nil, err 6336 } 6337 return ret, nil 6338 // { 6339 // "description": "Gets the access control policy for a resource. Returns NOT_FOUND error if\nthe resource does not exist. Returns an empty policy if the resource exists\nbut does not have a policy set.\n\nAuthorization requires the Google IAM permission\n`healthcare.AnnotationStores.getIamPolicy` on the specified resource", 6340 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores/{annotationStoresId}:getIamPolicy", 6341 // "httpMethod": "POST", 6342 // "id": "healthcare.projects.locations.datasets.annotationStores.getIamPolicy", 6343 // "parameterOrder": [ 6344 // "resource" 6345 // ], 6346 // "parameters": { 6347 // "resource": { 6348 // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", 6349 // "location": "path", 6350 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$", 6351 // "required": true, 6352 // "type": "string" 6353 // } 6354 // }, 6355 // "path": "v1alpha2/{+resource}:getIamPolicy", 6356 // "request": { 6357 // "$ref": "GetIamPolicyRequest" 6358 // }, 6359 // "response": { 6360 // "$ref": "Policy" 6361 // }, 6362 // "scopes": [ 6363 // "https://www.googleapis.com/auth/cloud-platform" 6364 // ] 6365 // } 6366 6367} 6368 6369// method id "healthcare.projects.locations.datasets.annotationStores.list": 6370 6371type ProjectsLocationsDatasetsAnnotationStoresListCall struct { 6372 s *Service 6373 parent string 6374 urlParams_ gensupport.URLParams 6375 ifNoneMatch_ string 6376 ctx_ context.Context 6377 header_ http.Header 6378} 6379 6380// List: Lists the Annotation stores in the given dataset for a source 6381// store. 6382func (r *ProjectsLocationsDatasetsAnnotationStoresService) List(parent string) *ProjectsLocationsDatasetsAnnotationStoresListCall { 6383 c := &ProjectsLocationsDatasetsAnnotationStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6384 c.parent = parent 6385 return c 6386} 6387 6388// Filter sets the optional parameter "filter": Restricts stores 6389// returned to those matching a filter. 6390// Syntax: 6391// https://cloud.google.com/appengine/docs/standard/python/search 6392// /query_strings 6393// Only filtering on labels is supported, for example 6394// `labels.key=value`. 6395func (c *ProjectsLocationsDatasetsAnnotationStoresListCall) Filter(filter string) *ProjectsLocationsDatasetsAnnotationStoresListCall { 6396 c.urlParams_.Set("filter", filter) 6397 return c 6398} 6399 6400// PageSize sets the optional parameter "pageSize": Limit on the number 6401// of Annotation stores to return in a single response. 6402// If zero the default page size of 100 is used. 6403func (c *ProjectsLocationsDatasetsAnnotationStoresListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsAnnotationStoresListCall { 6404 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 6405 return c 6406} 6407 6408// PageToken sets the optional parameter "pageToken": The 6409// next_page_token value returned from the previous List request, if 6410// any. 6411func (c *ProjectsLocationsDatasetsAnnotationStoresListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsAnnotationStoresListCall { 6412 c.urlParams_.Set("pageToken", pageToken) 6413 return c 6414} 6415 6416// Fields allows partial responses to be retrieved. See 6417// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6418// for more information. 6419func (c *ProjectsLocationsDatasetsAnnotationStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresListCall { 6420 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6421 return c 6422} 6423 6424// IfNoneMatch sets the optional parameter which makes the operation 6425// fail if the object's ETag matches the given value. This is useful for 6426// getting updates only after the object has changed since the last 6427// request. Use googleapi.IsNotModified to check whether the response 6428// error from Do is the result of In-None-Match. 6429func (c *ProjectsLocationsDatasetsAnnotationStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsAnnotationStoresListCall { 6430 c.ifNoneMatch_ = entityTag 6431 return c 6432} 6433 6434// Context sets the context to be used in this call's Do method. Any 6435// pending HTTP request will be aborted if the provided context is 6436// canceled. 6437func (c *ProjectsLocationsDatasetsAnnotationStoresListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresListCall { 6438 c.ctx_ = ctx 6439 return c 6440} 6441 6442// Header returns an http.Header that can be modified by the caller to 6443// add HTTP headers to the request. 6444func (c *ProjectsLocationsDatasetsAnnotationStoresListCall) Header() http.Header { 6445 if c.header_ == nil { 6446 c.header_ = make(http.Header) 6447 } 6448 return c.header_ 6449} 6450 6451func (c *ProjectsLocationsDatasetsAnnotationStoresListCall) doRequest(alt string) (*http.Response, error) { 6452 reqHeaders := make(http.Header) 6453 for k, v := range c.header_ { 6454 reqHeaders[k] = v 6455 } 6456 reqHeaders.Set("User-Agent", c.s.userAgent()) 6457 if c.ifNoneMatch_ != "" { 6458 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6459 } 6460 var body io.Reader = nil 6461 c.urlParams_.Set("alt", alt) 6462 c.urlParams_.Set("prettyPrint", "false") 6463 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/annotationStores") 6464 urls += "?" + c.urlParams_.Encode() 6465 req, err := http.NewRequest("GET", urls, body) 6466 if err != nil { 6467 return nil, err 6468 } 6469 req.Header = reqHeaders 6470 googleapi.Expand(req.URL, map[string]string{ 6471 "parent": c.parent, 6472 }) 6473 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6474} 6475 6476// Do executes the "healthcare.projects.locations.datasets.annotationStores.list" call. 6477// Exactly one of *ListAnnotationStoresResponse or error will be 6478// non-nil. Any non-2xx status code is an error. Response headers are in 6479// either *ListAnnotationStoresResponse.ServerResponse.Header or (if a 6480// response was returned at all) in error.(*googleapi.Error).Header. Use 6481// googleapi.IsNotModified to check whether the returned error was 6482// because http.StatusNotModified was returned. 6483func (c *ProjectsLocationsDatasetsAnnotationStoresListCall) Do(opts ...googleapi.CallOption) (*ListAnnotationStoresResponse, error) { 6484 gensupport.SetOptions(c.urlParams_, opts...) 6485 res, err := c.doRequest("json") 6486 if res != nil && res.StatusCode == http.StatusNotModified { 6487 if res.Body != nil { 6488 res.Body.Close() 6489 } 6490 return nil, &googleapi.Error{ 6491 Code: res.StatusCode, 6492 Header: res.Header, 6493 } 6494 } 6495 if err != nil { 6496 return nil, err 6497 } 6498 defer googleapi.CloseBody(res) 6499 if err := googleapi.CheckResponse(res); err != nil { 6500 return nil, err 6501 } 6502 ret := &ListAnnotationStoresResponse{ 6503 ServerResponse: googleapi.ServerResponse{ 6504 Header: res.Header, 6505 HTTPStatusCode: res.StatusCode, 6506 }, 6507 } 6508 target := &ret 6509 if err := gensupport.DecodeResponse(target, res); err != nil { 6510 return nil, err 6511 } 6512 return ret, nil 6513 // { 6514 // "description": "Lists the Annotation stores in the given dataset for a source store.", 6515 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores", 6516 // "httpMethod": "GET", 6517 // "id": "healthcare.projects.locations.datasets.annotationStores.list", 6518 // "parameterOrder": [ 6519 // "parent" 6520 // ], 6521 // "parameters": { 6522 // "filter": { 6523 // "description": "Restricts stores returned to those matching a filter. Syntax:\nhttps://cloud.google.com/appengine/docs/standard/python/search/query_strings\nOnly filtering on labels is supported, for example `labels.key=value`.", 6524 // "location": "query", 6525 // "type": "string" 6526 // }, 6527 // "pageSize": { 6528 // "description": "Limit on the number of Annotation stores to return in a single response.\nIf zero the default page size of 100 is used.", 6529 // "format": "int32", 6530 // "location": "query", 6531 // "type": "integer" 6532 // }, 6533 // "pageToken": { 6534 // "description": "The next_page_token value returned from the previous List request, if any.", 6535 // "location": "query", 6536 // "type": "string" 6537 // }, 6538 // "parent": { 6539 // "description": "Name of the dataset.", 6540 // "location": "path", 6541 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", 6542 // "required": true, 6543 // "type": "string" 6544 // } 6545 // }, 6546 // "path": "v1alpha2/{+parent}/annotationStores", 6547 // "response": { 6548 // "$ref": "ListAnnotationStoresResponse" 6549 // }, 6550 // "scopes": [ 6551 // "https://www.googleapis.com/auth/cloud-platform" 6552 // ] 6553 // } 6554 6555} 6556 6557// Pages invokes f for each page of results. 6558// A non-nil error returned from f will halt the iteration. 6559// The provided context supersedes any context provided to the Context method. 6560func (c *ProjectsLocationsDatasetsAnnotationStoresListCall) Pages(ctx context.Context, f func(*ListAnnotationStoresResponse) error) error { 6561 c.ctx_ = ctx 6562 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 6563 for { 6564 x, err := c.Do() 6565 if err != nil { 6566 return err 6567 } 6568 if err := f(x); err != nil { 6569 return err 6570 } 6571 if x.NextPageToken == "" { 6572 return nil 6573 } 6574 c.PageToken(x.NextPageToken) 6575 } 6576} 6577 6578// method id "healthcare.projects.locations.datasets.annotationStores.patch": 6579 6580type ProjectsLocationsDatasetsAnnotationStoresPatchCall struct { 6581 s *Service 6582 name string 6583 annotationstore *AnnotationStore 6584 urlParams_ gensupport.URLParams 6585 ctx_ context.Context 6586 header_ http.Header 6587} 6588 6589// Patch: Updates the specified Annotation store. 6590func (r *ProjectsLocationsDatasetsAnnotationStoresService) Patch(name string, annotationstore *AnnotationStore) *ProjectsLocationsDatasetsAnnotationStoresPatchCall { 6591 c := &ProjectsLocationsDatasetsAnnotationStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6592 c.name = name 6593 c.annotationstore = annotationstore 6594 return c 6595} 6596 6597// UpdateMask sets the optional parameter "updateMask": The update mask 6598// applies to the resource. For the `FieldMask` 6599// definition, 6600// see 6601// https://developers.google.com/protocol-buffers/docs/re 6602// ference/google.protobuf#fieldmask 6603func (c *ProjectsLocationsDatasetsAnnotationStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsAnnotationStoresPatchCall { 6604 c.urlParams_.Set("updateMask", updateMask) 6605 return c 6606} 6607 6608// Fields allows partial responses to be retrieved. See 6609// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6610// for more information. 6611func (c *ProjectsLocationsDatasetsAnnotationStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresPatchCall { 6612 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6613 return c 6614} 6615 6616// Context sets the context to be used in this call's Do method. Any 6617// pending HTTP request will be aborted if the provided context is 6618// canceled. 6619func (c *ProjectsLocationsDatasetsAnnotationStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresPatchCall { 6620 c.ctx_ = ctx 6621 return c 6622} 6623 6624// Header returns an http.Header that can be modified by the caller to 6625// add HTTP headers to the request. 6626func (c *ProjectsLocationsDatasetsAnnotationStoresPatchCall) Header() http.Header { 6627 if c.header_ == nil { 6628 c.header_ = make(http.Header) 6629 } 6630 return c.header_ 6631} 6632 6633func (c *ProjectsLocationsDatasetsAnnotationStoresPatchCall) doRequest(alt string) (*http.Response, error) { 6634 reqHeaders := make(http.Header) 6635 for k, v := range c.header_ { 6636 reqHeaders[k] = v 6637 } 6638 reqHeaders.Set("User-Agent", c.s.userAgent()) 6639 var body io.Reader = nil 6640 body, err := googleapi.WithoutDataWrapper.JSONReader(c.annotationstore) 6641 if err != nil { 6642 return nil, err 6643 } 6644 reqHeaders.Set("Content-Type", "application/json") 6645 c.urlParams_.Set("alt", alt) 6646 c.urlParams_.Set("prettyPrint", "false") 6647 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}") 6648 urls += "?" + c.urlParams_.Encode() 6649 req, err := http.NewRequest("PATCH", urls, body) 6650 if err != nil { 6651 return nil, err 6652 } 6653 req.Header = reqHeaders 6654 googleapi.Expand(req.URL, map[string]string{ 6655 "name": c.name, 6656 }) 6657 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6658} 6659 6660// Do executes the "healthcare.projects.locations.datasets.annotationStores.patch" call. 6661// Exactly one of *AnnotationStore or error will be non-nil. Any non-2xx 6662// status code is an error. Response headers are in either 6663// *AnnotationStore.ServerResponse.Header or (if a response was returned 6664// at all) in error.(*googleapi.Error).Header. Use 6665// googleapi.IsNotModified to check whether the returned error was 6666// because http.StatusNotModified was returned. 6667func (c *ProjectsLocationsDatasetsAnnotationStoresPatchCall) Do(opts ...googleapi.CallOption) (*AnnotationStore, error) { 6668 gensupport.SetOptions(c.urlParams_, opts...) 6669 res, err := c.doRequest("json") 6670 if res != nil && res.StatusCode == http.StatusNotModified { 6671 if res.Body != nil { 6672 res.Body.Close() 6673 } 6674 return nil, &googleapi.Error{ 6675 Code: res.StatusCode, 6676 Header: res.Header, 6677 } 6678 } 6679 if err != nil { 6680 return nil, err 6681 } 6682 defer googleapi.CloseBody(res) 6683 if err := googleapi.CheckResponse(res); err != nil { 6684 return nil, err 6685 } 6686 ret := &AnnotationStore{ 6687 ServerResponse: googleapi.ServerResponse{ 6688 Header: res.Header, 6689 HTTPStatusCode: res.StatusCode, 6690 }, 6691 } 6692 target := &ret 6693 if err := gensupport.DecodeResponse(target, res); err != nil { 6694 return nil, err 6695 } 6696 return ret, nil 6697 // { 6698 // "description": "Updates the specified Annotation store.", 6699 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores/{annotationStoresId}", 6700 // "httpMethod": "PATCH", 6701 // "id": "healthcare.projects.locations.datasets.annotationStores.patch", 6702 // "parameterOrder": [ 6703 // "name" 6704 // ], 6705 // "parameters": { 6706 // "name": { 6707 // "description": "Output only. Resource name of the Annotation store, of the form\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationStores/{annotation_store_id}`.", 6708 // "location": "path", 6709 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$", 6710 // "required": true, 6711 // "type": "string" 6712 // }, 6713 // "updateMask": { 6714 // "description": "The update mask applies to the resource. For the `FieldMask` definition,\nsee\nhttps://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", 6715 // "format": "google-fieldmask", 6716 // "location": "query", 6717 // "type": "string" 6718 // } 6719 // }, 6720 // "path": "v1alpha2/{+name}", 6721 // "request": { 6722 // "$ref": "AnnotationStore" 6723 // }, 6724 // "response": { 6725 // "$ref": "AnnotationStore" 6726 // }, 6727 // "scopes": [ 6728 // "https://www.googleapis.com/auth/cloud-platform" 6729 // ] 6730 // } 6731 6732} 6733 6734// method id "healthcare.projects.locations.datasets.annotationStores.setIamPolicy": 6735 6736type ProjectsLocationsDatasetsAnnotationStoresSetIamPolicyCall struct { 6737 s *Service 6738 resource string 6739 setiampolicyrequest *SetIamPolicyRequest 6740 urlParams_ gensupport.URLParams 6741 ctx_ context.Context 6742 header_ http.Header 6743} 6744 6745// SetIamPolicy: POLICIES 6746// Sets the access control policy for a resource. Replaces any 6747// existing 6748// policy. 6749// 6750// Authorization requires the Google IAM 6751// permission 6752// 'healthcare.annotationStores.setIamPolicy' on the specified resource 6753func (r *ProjectsLocationsDatasetsAnnotationStoresService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsAnnotationStoresSetIamPolicyCall { 6754 c := &ProjectsLocationsDatasetsAnnotationStoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6755 c.resource = resource 6756 c.setiampolicyrequest = setiampolicyrequest 6757 return c 6758} 6759 6760// Fields allows partial responses to be retrieved. See 6761// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6762// for more information. 6763func (c *ProjectsLocationsDatasetsAnnotationStoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresSetIamPolicyCall { 6764 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6765 return c 6766} 6767 6768// Context sets the context to be used in this call's Do method. Any 6769// pending HTTP request will be aborted if the provided context is 6770// canceled. 6771func (c *ProjectsLocationsDatasetsAnnotationStoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresSetIamPolicyCall { 6772 c.ctx_ = ctx 6773 return c 6774} 6775 6776// Header returns an http.Header that can be modified by the caller to 6777// add HTTP headers to the request. 6778func (c *ProjectsLocationsDatasetsAnnotationStoresSetIamPolicyCall) Header() http.Header { 6779 if c.header_ == nil { 6780 c.header_ = make(http.Header) 6781 } 6782 return c.header_ 6783} 6784 6785func (c *ProjectsLocationsDatasetsAnnotationStoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 6786 reqHeaders := make(http.Header) 6787 for k, v := range c.header_ { 6788 reqHeaders[k] = v 6789 } 6790 reqHeaders.Set("User-Agent", c.s.userAgent()) 6791 var body io.Reader = nil 6792 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 6793 if err != nil { 6794 return nil, err 6795 } 6796 reqHeaders.Set("Content-Type", "application/json") 6797 c.urlParams_.Set("alt", alt) 6798 c.urlParams_.Set("prettyPrint", "false") 6799 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:setIamPolicy") 6800 urls += "?" + c.urlParams_.Encode() 6801 req, err := http.NewRequest("POST", urls, body) 6802 if err != nil { 6803 return nil, err 6804 } 6805 req.Header = reqHeaders 6806 googleapi.Expand(req.URL, map[string]string{ 6807 "resource": c.resource, 6808 }) 6809 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6810} 6811 6812// Do executes the "healthcare.projects.locations.datasets.annotationStores.setIamPolicy" call. 6813// Exactly one of *Policy or error will be non-nil. Any non-2xx status 6814// code is an error. Response headers are in either 6815// *Policy.ServerResponse.Header or (if a response was returned at all) 6816// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 6817// check whether the returned error was because http.StatusNotModified 6818// was returned. 6819func (c *ProjectsLocationsDatasetsAnnotationStoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 6820 gensupport.SetOptions(c.urlParams_, opts...) 6821 res, err := c.doRequest("json") 6822 if res != nil && res.StatusCode == http.StatusNotModified { 6823 if res.Body != nil { 6824 res.Body.Close() 6825 } 6826 return nil, &googleapi.Error{ 6827 Code: res.StatusCode, 6828 Header: res.Header, 6829 } 6830 } 6831 if err != nil { 6832 return nil, err 6833 } 6834 defer googleapi.CloseBody(res) 6835 if err := googleapi.CheckResponse(res); err != nil { 6836 return nil, err 6837 } 6838 ret := &Policy{ 6839 ServerResponse: googleapi.ServerResponse{ 6840 Header: res.Header, 6841 HTTPStatusCode: res.StatusCode, 6842 }, 6843 } 6844 target := &ret 6845 if err := gensupport.DecodeResponse(target, res); err != nil { 6846 return nil, err 6847 } 6848 return ret, nil 6849 // { 6850 // "description": "POLICIES\nSets the access control policy for a resource. Replaces any existing\npolicy.\n\nAuthorization requires the Google IAM permission\n'healthcare.annotationStores.setIamPolicy' on the specified resource", 6851 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores/{annotationStoresId}:setIamPolicy", 6852 // "httpMethod": "POST", 6853 // "id": "healthcare.projects.locations.datasets.annotationStores.setIamPolicy", 6854 // "parameterOrder": [ 6855 // "resource" 6856 // ], 6857 // "parameters": { 6858 // "resource": { 6859 // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", 6860 // "location": "path", 6861 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$", 6862 // "required": true, 6863 // "type": "string" 6864 // } 6865 // }, 6866 // "path": "v1alpha2/{+resource}:setIamPolicy", 6867 // "request": { 6868 // "$ref": "SetIamPolicyRequest" 6869 // }, 6870 // "response": { 6871 // "$ref": "Policy" 6872 // }, 6873 // "scopes": [ 6874 // "https://www.googleapis.com/auth/cloud-platform" 6875 // ] 6876 // } 6877 6878} 6879 6880// method id "healthcare.projects.locations.datasets.annotationStores.testIamPermissions": 6881 6882type ProjectsLocationsDatasetsAnnotationStoresTestIamPermissionsCall struct { 6883 s *Service 6884 resource string 6885 testiampermissionsrequest *TestIamPermissionsRequest 6886 urlParams_ gensupport.URLParams 6887 ctx_ context.Context 6888 header_ http.Header 6889} 6890 6891// TestIamPermissions: Returns permissions that a caller has on the 6892// specified resource. 6893// If the resource does not exist, this will return an empty set 6894// of 6895// permissions, not a NOT_FOUND error. 6896// 6897// There is no permission required to make this API call. 6898func (r *ProjectsLocationsDatasetsAnnotationStoresService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsAnnotationStoresTestIamPermissionsCall { 6899 c := &ProjectsLocationsDatasetsAnnotationStoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6900 c.resource = resource 6901 c.testiampermissionsrequest = testiampermissionsrequest 6902 return c 6903} 6904 6905// Fields allows partial responses to be retrieved. See 6906// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6907// for more information. 6908func (c *ProjectsLocationsDatasetsAnnotationStoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresTestIamPermissionsCall { 6909 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6910 return c 6911} 6912 6913// Context sets the context to be used in this call's Do method. Any 6914// pending HTTP request will be aborted if the provided context is 6915// canceled. 6916func (c *ProjectsLocationsDatasetsAnnotationStoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresTestIamPermissionsCall { 6917 c.ctx_ = ctx 6918 return c 6919} 6920 6921// Header returns an http.Header that can be modified by the caller to 6922// add HTTP headers to the request. 6923func (c *ProjectsLocationsDatasetsAnnotationStoresTestIamPermissionsCall) Header() http.Header { 6924 if c.header_ == nil { 6925 c.header_ = make(http.Header) 6926 } 6927 return c.header_ 6928} 6929 6930func (c *ProjectsLocationsDatasetsAnnotationStoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 6931 reqHeaders := make(http.Header) 6932 for k, v := range c.header_ { 6933 reqHeaders[k] = v 6934 } 6935 reqHeaders.Set("User-Agent", c.s.userAgent()) 6936 var body io.Reader = nil 6937 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 6938 if err != nil { 6939 return nil, err 6940 } 6941 reqHeaders.Set("Content-Type", "application/json") 6942 c.urlParams_.Set("alt", alt) 6943 c.urlParams_.Set("prettyPrint", "false") 6944 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:testIamPermissions") 6945 urls += "?" + c.urlParams_.Encode() 6946 req, err := http.NewRequest("POST", urls, body) 6947 if err != nil { 6948 return nil, err 6949 } 6950 req.Header = reqHeaders 6951 googleapi.Expand(req.URL, map[string]string{ 6952 "resource": c.resource, 6953 }) 6954 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6955} 6956 6957// Do executes the "healthcare.projects.locations.datasets.annotationStores.testIamPermissions" call. 6958// Exactly one of *TestIamPermissionsResponse or error will be non-nil. 6959// Any non-2xx status code is an error. Response headers are in either 6960// *TestIamPermissionsResponse.ServerResponse.Header or (if a response 6961// was returned at all) in error.(*googleapi.Error).Header. Use 6962// googleapi.IsNotModified to check whether the returned error was 6963// because http.StatusNotModified was returned. 6964func (c *ProjectsLocationsDatasetsAnnotationStoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 6965 gensupport.SetOptions(c.urlParams_, opts...) 6966 res, err := c.doRequest("json") 6967 if res != nil && res.StatusCode == http.StatusNotModified { 6968 if res.Body != nil { 6969 res.Body.Close() 6970 } 6971 return nil, &googleapi.Error{ 6972 Code: res.StatusCode, 6973 Header: res.Header, 6974 } 6975 } 6976 if err != nil { 6977 return nil, err 6978 } 6979 defer googleapi.CloseBody(res) 6980 if err := googleapi.CheckResponse(res); err != nil { 6981 return nil, err 6982 } 6983 ret := &TestIamPermissionsResponse{ 6984 ServerResponse: googleapi.ServerResponse{ 6985 Header: res.Header, 6986 HTTPStatusCode: res.StatusCode, 6987 }, 6988 } 6989 target := &ret 6990 if err := gensupport.DecodeResponse(target, res); err != nil { 6991 return nil, err 6992 } 6993 return ret, nil 6994 // { 6995 // "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\nThere is no permission required to make this API call.", 6996 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores/{annotationStoresId}:testIamPermissions", 6997 // "httpMethod": "POST", 6998 // "id": "healthcare.projects.locations.datasets.annotationStores.testIamPermissions", 6999 // "parameterOrder": [ 7000 // "resource" 7001 // ], 7002 // "parameters": { 7003 // "resource": { 7004 // "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", 7005 // "location": "path", 7006 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$", 7007 // "required": true, 7008 // "type": "string" 7009 // } 7010 // }, 7011 // "path": "v1alpha2/{+resource}:testIamPermissions", 7012 // "request": { 7013 // "$ref": "TestIamPermissionsRequest" 7014 // }, 7015 // "response": { 7016 // "$ref": "TestIamPermissionsResponse" 7017 // }, 7018 // "scopes": [ 7019 // "https://www.googleapis.com/auth/cloud-platform" 7020 // ] 7021 // } 7022 7023} 7024 7025// method id "healthcare.projects.locations.datasets.annotationStores.annotations.create": 7026 7027type ProjectsLocationsDatasetsAnnotationStoresAnnotationsCreateCall struct { 7028 s *Service 7029 parent string 7030 annotation *Annotation 7031 urlParams_ gensupport.URLParams 7032 ctx_ context.Context 7033 header_ http.Header 7034} 7035 7036// Create: Creates a new Annotation record. It is 7037// valid to create Annotation objects for the same source more than once 7038// since 7039// a unique ID is assigned to each record by this service. 7040func (r *ProjectsLocationsDatasetsAnnotationStoresAnnotationsService) Create(parent string, annotation *Annotation) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsCreateCall { 7041 c := &ProjectsLocationsDatasetsAnnotationStoresAnnotationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7042 c.parent = parent 7043 c.annotation = annotation 7044 return c 7045} 7046 7047// Fields allows partial responses to be retrieved. See 7048// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7049// for more information. 7050func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsCreateCall { 7051 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7052 return c 7053} 7054 7055// Context sets the context to be used in this call's Do method. Any 7056// pending HTTP request will be aborted if the provided context is 7057// canceled. 7058func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsCreateCall { 7059 c.ctx_ = ctx 7060 return c 7061} 7062 7063// Header returns an http.Header that can be modified by the caller to 7064// add HTTP headers to the request. 7065func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsCreateCall) Header() http.Header { 7066 if c.header_ == nil { 7067 c.header_ = make(http.Header) 7068 } 7069 return c.header_ 7070} 7071 7072func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsCreateCall) doRequest(alt string) (*http.Response, error) { 7073 reqHeaders := make(http.Header) 7074 for k, v := range c.header_ { 7075 reqHeaders[k] = v 7076 } 7077 reqHeaders.Set("User-Agent", c.s.userAgent()) 7078 var body io.Reader = nil 7079 body, err := googleapi.WithoutDataWrapper.JSONReader(c.annotation) 7080 if err != nil { 7081 return nil, err 7082 } 7083 reqHeaders.Set("Content-Type", "application/json") 7084 c.urlParams_.Set("alt", alt) 7085 c.urlParams_.Set("prettyPrint", "false") 7086 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/annotations") 7087 urls += "?" + c.urlParams_.Encode() 7088 req, err := http.NewRequest("POST", urls, body) 7089 if err != nil { 7090 return nil, err 7091 } 7092 req.Header = reqHeaders 7093 googleapi.Expand(req.URL, map[string]string{ 7094 "parent": c.parent, 7095 }) 7096 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7097} 7098 7099// Do executes the "healthcare.projects.locations.datasets.annotationStores.annotations.create" call. 7100// Exactly one of *Annotation or error will be non-nil. Any non-2xx 7101// status code is an error. Response headers are in either 7102// *Annotation.ServerResponse.Header or (if a response was returned at 7103// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7104// to check whether the returned error was because 7105// http.StatusNotModified was returned. 7106func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsCreateCall) Do(opts ...googleapi.CallOption) (*Annotation, error) { 7107 gensupport.SetOptions(c.urlParams_, opts...) 7108 res, err := c.doRequest("json") 7109 if res != nil && res.StatusCode == http.StatusNotModified { 7110 if res.Body != nil { 7111 res.Body.Close() 7112 } 7113 return nil, &googleapi.Error{ 7114 Code: res.StatusCode, 7115 Header: res.Header, 7116 } 7117 } 7118 if err != nil { 7119 return nil, err 7120 } 7121 defer googleapi.CloseBody(res) 7122 if err := googleapi.CheckResponse(res); err != nil { 7123 return nil, err 7124 } 7125 ret := &Annotation{ 7126 ServerResponse: googleapi.ServerResponse{ 7127 Header: res.Header, 7128 HTTPStatusCode: res.StatusCode, 7129 }, 7130 } 7131 target := &ret 7132 if err := gensupport.DecodeResponse(target, res); err != nil { 7133 return nil, err 7134 } 7135 return ret, nil 7136 // { 7137 // "description": "Creates a new Annotation record. It is\nvalid to create Annotation objects for the same source more than once since\na unique ID is assigned to each record by this service.", 7138 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores/{annotationStoresId}/annotations", 7139 // "httpMethod": "POST", 7140 // "id": "healthcare.projects.locations.datasets.annotationStores.annotations.create", 7141 // "parameterOrder": [ 7142 // "parent" 7143 // ], 7144 // "parameters": { 7145 // "parent": { 7146 // "description": "The name of the Annotation store this annotation belongs to. For example,\n`projects/my-project/locations/us-central1/datasets/mydataset/annotationStores/myannotationstore`.", 7147 // "location": "path", 7148 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$", 7149 // "required": true, 7150 // "type": "string" 7151 // } 7152 // }, 7153 // "path": "v1alpha2/{+parent}/annotations", 7154 // "request": { 7155 // "$ref": "Annotation" 7156 // }, 7157 // "response": { 7158 // "$ref": "Annotation" 7159 // }, 7160 // "scopes": [ 7161 // "https://www.googleapis.com/auth/cloud-platform" 7162 // ] 7163 // } 7164 7165} 7166 7167// method id "healthcare.projects.locations.datasets.annotationStores.annotations.delete": 7168 7169type ProjectsLocationsDatasetsAnnotationStoresAnnotationsDeleteCall struct { 7170 s *Service 7171 name string 7172 urlParams_ gensupport.URLParams 7173 ctx_ context.Context 7174 header_ http.Header 7175} 7176 7177// Delete: Deletes an Annotation or returns 7178// NOT_FOUND if it does not exist. 7179func (r *ProjectsLocationsDatasetsAnnotationStoresAnnotationsService) Delete(name string) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsDeleteCall { 7180 c := &ProjectsLocationsDatasetsAnnotationStoresAnnotationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7181 c.name = name 7182 return c 7183} 7184 7185// Fields allows partial responses to be retrieved. See 7186// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7187// for more information. 7188func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsDeleteCall { 7189 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7190 return c 7191} 7192 7193// Context sets the context to be used in this call's Do method. Any 7194// pending HTTP request will be aborted if the provided context is 7195// canceled. 7196func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsDeleteCall { 7197 c.ctx_ = ctx 7198 return c 7199} 7200 7201// Header returns an http.Header that can be modified by the caller to 7202// add HTTP headers to the request. 7203func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsDeleteCall) Header() http.Header { 7204 if c.header_ == nil { 7205 c.header_ = make(http.Header) 7206 } 7207 return c.header_ 7208} 7209 7210func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsDeleteCall) doRequest(alt string) (*http.Response, error) { 7211 reqHeaders := make(http.Header) 7212 for k, v := range c.header_ { 7213 reqHeaders[k] = v 7214 } 7215 reqHeaders.Set("User-Agent", c.s.userAgent()) 7216 var body io.Reader = nil 7217 c.urlParams_.Set("alt", alt) 7218 c.urlParams_.Set("prettyPrint", "false") 7219 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}") 7220 urls += "?" + c.urlParams_.Encode() 7221 req, err := http.NewRequest("DELETE", urls, body) 7222 if err != nil { 7223 return nil, err 7224 } 7225 req.Header = reqHeaders 7226 googleapi.Expand(req.URL, map[string]string{ 7227 "name": c.name, 7228 }) 7229 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7230} 7231 7232// Do executes the "healthcare.projects.locations.datasets.annotationStores.annotations.delete" call. 7233// Exactly one of *Empty or error will be non-nil. Any non-2xx status 7234// code is an error. Response headers are in either 7235// *Empty.ServerResponse.Header or (if a response was returned at all) 7236// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 7237// check whether the returned error was because http.StatusNotModified 7238// was returned. 7239func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 7240 gensupport.SetOptions(c.urlParams_, opts...) 7241 res, err := c.doRequest("json") 7242 if res != nil && res.StatusCode == http.StatusNotModified { 7243 if res.Body != nil { 7244 res.Body.Close() 7245 } 7246 return nil, &googleapi.Error{ 7247 Code: res.StatusCode, 7248 Header: res.Header, 7249 } 7250 } 7251 if err != nil { 7252 return nil, err 7253 } 7254 defer googleapi.CloseBody(res) 7255 if err := googleapi.CheckResponse(res); err != nil { 7256 return nil, err 7257 } 7258 ret := &Empty{ 7259 ServerResponse: googleapi.ServerResponse{ 7260 Header: res.Header, 7261 HTTPStatusCode: res.StatusCode, 7262 }, 7263 } 7264 target := &ret 7265 if err := gensupport.DecodeResponse(target, res); err != nil { 7266 return nil, err 7267 } 7268 return ret, nil 7269 // { 7270 // "description": "Deletes an Annotation or returns\nNOT_FOUND if it does not exist.", 7271 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores/{annotationStoresId}/annotations/{annotationsId}", 7272 // "httpMethod": "DELETE", 7273 // "id": "healthcare.projects.locations.datasets.annotationStores.annotations.delete", 7274 // "parameterOrder": [ 7275 // "name" 7276 // ], 7277 // "parameters": { 7278 // "name": { 7279 // "description": "The resource name of the Annotation to delete.", 7280 // "location": "path", 7281 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+/annotations/[^/]+$", 7282 // "required": true, 7283 // "type": "string" 7284 // } 7285 // }, 7286 // "path": "v1alpha2/{+name}", 7287 // "response": { 7288 // "$ref": "Empty" 7289 // }, 7290 // "scopes": [ 7291 // "https://www.googleapis.com/auth/cloud-platform" 7292 // ] 7293 // } 7294 7295} 7296 7297// method id "healthcare.projects.locations.datasets.annotationStores.annotations.get": 7298 7299type ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall struct { 7300 s *Service 7301 name string 7302 urlParams_ gensupport.URLParams 7303 ifNoneMatch_ string 7304 ctx_ context.Context 7305 header_ http.Header 7306} 7307 7308// Get: Gets an Annotation. 7309func (r *ProjectsLocationsDatasetsAnnotationStoresAnnotationsService) Get(name string) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall { 7310 c := &ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7311 c.name = name 7312 return c 7313} 7314 7315// Fields allows partial responses to be retrieved. See 7316// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7317// for more information. 7318func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall { 7319 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7320 return c 7321} 7322 7323// IfNoneMatch sets the optional parameter which makes the operation 7324// fail if the object's ETag matches the given value. This is useful for 7325// getting updates only after the object has changed since the last 7326// request. Use googleapi.IsNotModified to check whether the response 7327// error from Do is the result of In-None-Match. 7328func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall { 7329 c.ifNoneMatch_ = entityTag 7330 return c 7331} 7332 7333// Context sets the context to be used in this call's Do method. Any 7334// pending HTTP request will be aborted if the provided context is 7335// canceled. 7336func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall { 7337 c.ctx_ = ctx 7338 return c 7339} 7340 7341// Header returns an http.Header that can be modified by the caller to 7342// add HTTP headers to the request. 7343func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall) Header() http.Header { 7344 if c.header_ == nil { 7345 c.header_ = make(http.Header) 7346 } 7347 return c.header_ 7348} 7349 7350func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall) doRequest(alt string) (*http.Response, error) { 7351 reqHeaders := make(http.Header) 7352 for k, v := range c.header_ { 7353 reqHeaders[k] = v 7354 } 7355 reqHeaders.Set("User-Agent", c.s.userAgent()) 7356 if c.ifNoneMatch_ != "" { 7357 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7358 } 7359 var body io.Reader = nil 7360 c.urlParams_.Set("alt", alt) 7361 c.urlParams_.Set("prettyPrint", "false") 7362 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}") 7363 urls += "?" + c.urlParams_.Encode() 7364 req, err := http.NewRequest("GET", urls, body) 7365 if err != nil { 7366 return nil, err 7367 } 7368 req.Header = reqHeaders 7369 googleapi.Expand(req.URL, map[string]string{ 7370 "name": c.name, 7371 }) 7372 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7373} 7374 7375// Do executes the "healthcare.projects.locations.datasets.annotationStores.annotations.get" call. 7376// Exactly one of *Annotation or error will be non-nil. Any non-2xx 7377// status code is an error. Response headers are in either 7378// *Annotation.ServerResponse.Header or (if a response was returned at 7379// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7380// to check whether the returned error was because 7381// http.StatusNotModified was returned. 7382func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall) Do(opts ...googleapi.CallOption) (*Annotation, error) { 7383 gensupport.SetOptions(c.urlParams_, opts...) 7384 res, err := c.doRequest("json") 7385 if res != nil && res.StatusCode == http.StatusNotModified { 7386 if res.Body != nil { 7387 res.Body.Close() 7388 } 7389 return nil, &googleapi.Error{ 7390 Code: res.StatusCode, 7391 Header: res.Header, 7392 } 7393 } 7394 if err != nil { 7395 return nil, err 7396 } 7397 defer googleapi.CloseBody(res) 7398 if err := googleapi.CheckResponse(res); err != nil { 7399 return nil, err 7400 } 7401 ret := &Annotation{ 7402 ServerResponse: googleapi.ServerResponse{ 7403 Header: res.Header, 7404 HTTPStatusCode: res.StatusCode, 7405 }, 7406 } 7407 target := &ret 7408 if err := gensupport.DecodeResponse(target, res); err != nil { 7409 return nil, err 7410 } 7411 return ret, nil 7412 // { 7413 // "description": "Gets an Annotation.", 7414 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores/{annotationStoresId}/annotations/{annotationsId}", 7415 // "httpMethod": "GET", 7416 // "id": "healthcare.projects.locations.datasets.annotationStores.annotations.get", 7417 // "parameterOrder": [ 7418 // "name" 7419 // ], 7420 // "parameters": { 7421 // "name": { 7422 // "description": "The resource name of the Annotation to retrieve.", 7423 // "location": "path", 7424 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+/annotations/[^/]+$", 7425 // "required": true, 7426 // "type": "string" 7427 // } 7428 // }, 7429 // "path": "v1alpha2/{+name}", 7430 // "response": { 7431 // "$ref": "Annotation" 7432 // }, 7433 // "scopes": [ 7434 // "https://www.googleapis.com/auth/cloud-platform" 7435 // ] 7436 // } 7437 7438} 7439 7440// method id "healthcare.projects.locations.datasets.annotationStores.annotations.list": 7441 7442type ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall struct { 7443 s *Service 7444 parent string 7445 urlParams_ gensupport.URLParams 7446 ifNoneMatch_ string 7447 ctx_ context.Context 7448 header_ http.Header 7449} 7450 7451// List: Lists the Annotations in the given 7452// Annotation store for a source 7453// resource. 7454func (r *ProjectsLocationsDatasetsAnnotationStoresAnnotationsService) List(parent string) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall { 7455 c := &ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7456 c.parent = parent 7457 return c 7458} 7459 7460// Filter sets the optional parameter "filter": Restricts Annotations 7461// returned to those matching a filter. 7462// Syntax: 7463// https://cloud.google.com/appengine/docs/standard/python/search 7464// /query_strings 7465// Fields/functions available for filtering are: 7466// - source_version 7467func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall) Filter(filter string) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall { 7468 c.urlParams_.Set("filter", filter) 7469 return c 7470} 7471 7472// PageSize sets the optional parameter "pageSize": Limit on the number 7473// of Annotations to return in a single response. 7474// If zero the default page size of 100 is used. 7475func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall { 7476 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 7477 return c 7478} 7479 7480// PageToken sets the optional parameter "pageToken": The 7481// next_page_token value returned from the previous List request, if 7482// any. 7483func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall { 7484 c.urlParams_.Set("pageToken", pageToken) 7485 return c 7486} 7487 7488// Fields allows partial responses to be retrieved. See 7489// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7490// for more information. 7491func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall { 7492 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7493 return c 7494} 7495 7496// IfNoneMatch sets the optional parameter which makes the operation 7497// fail if the object's ETag matches the given value. This is useful for 7498// getting updates only after the object has changed since the last 7499// request. Use googleapi.IsNotModified to check whether the response 7500// error from Do is the result of In-None-Match. 7501func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall { 7502 c.ifNoneMatch_ = entityTag 7503 return c 7504} 7505 7506// Context sets the context to be used in this call's Do method. Any 7507// pending HTTP request will be aborted if the provided context is 7508// canceled. 7509func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall { 7510 c.ctx_ = ctx 7511 return c 7512} 7513 7514// Header returns an http.Header that can be modified by the caller to 7515// add HTTP headers to the request. 7516func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall) Header() http.Header { 7517 if c.header_ == nil { 7518 c.header_ = make(http.Header) 7519 } 7520 return c.header_ 7521} 7522 7523func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall) doRequest(alt string) (*http.Response, error) { 7524 reqHeaders := make(http.Header) 7525 for k, v := range c.header_ { 7526 reqHeaders[k] = v 7527 } 7528 reqHeaders.Set("User-Agent", c.s.userAgent()) 7529 if c.ifNoneMatch_ != "" { 7530 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7531 } 7532 var body io.Reader = nil 7533 c.urlParams_.Set("alt", alt) 7534 c.urlParams_.Set("prettyPrint", "false") 7535 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/annotations") 7536 urls += "?" + c.urlParams_.Encode() 7537 req, err := http.NewRequest("GET", urls, body) 7538 if err != nil { 7539 return nil, err 7540 } 7541 req.Header = reqHeaders 7542 googleapi.Expand(req.URL, map[string]string{ 7543 "parent": c.parent, 7544 }) 7545 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7546} 7547 7548// Do executes the "healthcare.projects.locations.datasets.annotationStores.annotations.list" call. 7549// Exactly one of *ListAnnotationsResponse or error will be non-nil. Any 7550// non-2xx status code is an error. Response headers are in either 7551// *ListAnnotationsResponse.ServerResponse.Header or (if a response was 7552// returned at all) in error.(*googleapi.Error).Header. Use 7553// googleapi.IsNotModified to check whether the returned error was 7554// because http.StatusNotModified was returned. 7555func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall) Do(opts ...googleapi.CallOption) (*ListAnnotationsResponse, error) { 7556 gensupport.SetOptions(c.urlParams_, opts...) 7557 res, err := c.doRequest("json") 7558 if res != nil && res.StatusCode == http.StatusNotModified { 7559 if res.Body != nil { 7560 res.Body.Close() 7561 } 7562 return nil, &googleapi.Error{ 7563 Code: res.StatusCode, 7564 Header: res.Header, 7565 } 7566 } 7567 if err != nil { 7568 return nil, err 7569 } 7570 defer googleapi.CloseBody(res) 7571 if err := googleapi.CheckResponse(res); err != nil { 7572 return nil, err 7573 } 7574 ret := &ListAnnotationsResponse{ 7575 ServerResponse: googleapi.ServerResponse{ 7576 Header: res.Header, 7577 HTTPStatusCode: res.StatusCode, 7578 }, 7579 } 7580 target := &ret 7581 if err := gensupport.DecodeResponse(target, res); err != nil { 7582 return nil, err 7583 } 7584 return ret, nil 7585 // { 7586 // "description": "Lists the Annotations in the given\nAnnotation store for a source\nresource.", 7587 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores/{annotationStoresId}/annotations", 7588 // "httpMethod": "GET", 7589 // "id": "healthcare.projects.locations.datasets.annotationStores.annotations.list", 7590 // "parameterOrder": [ 7591 // "parent" 7592 // ], 7593 // "parameters": { 7594 // "filter": { 7595 // "description": "Restricts Annotations returned to those matching a filter. Syntax:\nhttps://cloud.google.com/appengine/docs/standard/python/search/query_strings\nFields/functions available for filtering are:\n- source_version", 7596 // "location": "query", 7597 // "type": "string" 7598 // }, 7599 // "pageSize": { 7600 // "description": "Limit on the number of Annotations to return in a single response.\nIf zero the default page size of 100 is used.", 7601 // "format": "int32", 7602 // "location": "query", 7603 // "type": "integer" 7604 // }, 7605 // "pageToken": { 7606 // "description": "The next_page_token value returned from the previous List request, if any.", 7607 // "location": "query", 7608 // "type": "string" 7609 // }, 7610 // "parent": { 7611 // "description": "Name of the Annotation store to retrieve Annotations from.", 7612 // "location": "path", 7613 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$", 7614 // "required": true, 7615 // "type": "string" 7616 // } 7617 // }, 7618 // "path": "v1alpha2/{+parent}/annotations", 7619 // "response": { 7620 // "$ref": "ListAnnotationsResponse" 7621 // }, 7622 // "scopes": [ 7623 // "https://www.googleapis.com/auth/cloud-platform" 7624 // ] 7625 // } 7626 7627} 7628 7629// Pages invokes f for each page of results. 7630// A non-nil error returned from f will halt the iteration. 7631// The provided context supersedes any context provided to the Context method. 7632func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall) Pages(ctx context.Context, f func(*ListAnnotationsResponse) error) error { 7633 c.ctx_ = ctx 7634 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 7635 for { 7636 x, err := c.Do() 7637 if err != nil { 7638 return err 7639 } 7640 if err := f(x); err != nil { 7641 return err 7642 } 7643 if x.NextPageToken == "" { 7644 return nil 7645 } 7646 c.PageToken(x.NextPageToken) 7647 } 7648} 7649 7650// method id "healthcare.projects.locations.datasets.annotationStores.annotations.patch": 7651 7652type ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall struct { 7653 s *Service 7654 name string 7655 annotation *Annotation 7656 urlParams_ gensupport.URLParams 7657 ctx_ context.Context 7658 header_ http.Header 7659} 7660 7661// Patch: Updates the Annotation. 7662func (r *ProjectsLocationsDatasetsAnnotationStoresAnnotationsService) Patch(name string, annotation *Annotation) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall { 7663 c := &ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7664 c.name = name 7665 c.annotation = annotation 7666 return c 7667} 7668 7669// UpdateMask sets the optional parameter "updateMask": The update mask 7670// applies to the resource. For the `FieldMask` 7671// definition, 7672// see 7673// https://developers.google.com/protocol-buffers/docs/re 7674// ference/google.protobuf#fieldmask 7675func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall { 7676 c.urlParams_.Set("updateMask", updateMask) 7677 return c 7678} 7679 7680// Fields allows partial responses to be retrieved. See 7681// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7682// for more information. 7683func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall { 7684 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7685 return c 7686} 7687 7688// Context sets the context to be used in this call's Do method. Any 7689// pending HTTP request will be aborted if the provided context is 7690// canceled. 7691func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall { 7692 c.ctx_ = ctx 7693 return c 7694} 7695 7696// Header returns an http.Header that can be modified by the caller to 7697// add HTTP headers to the request. 7698func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall) Header() http.Header { 7699 if c.header_ == nil { 7700 c.header_ = make(http.Header) 7701 } 7702 return c.header_ 7703} 7704 7705func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall) doRequest(alt string) (*http.Response, error) { 7706 reqHeaders := make(http.Header) 7707 for k, v := range c.header_ { 7708 reqHeaders[k] = v 7709 } 7710 reqHeaders.Set("User-Agent", c.s.userAgent()) 7711 var body io.Reader = nil 7712 body, err := googleapi.WithoutDataWrapper.JSONReader(c.annotation) 7713 if err != nil { 7714 return nil, err 7715 } 7716 reqHeaders.Set("Content-Type", "application/json") 7717 c.urlParams_.Set("alt", alt) 7718 c.urlParams_.Set("prettyPrint", "false") 7719 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}") 7720 urls += "?" + c.urlParams_.Encode() 7721 req, err := http.NewRequest("PATCH", urls, body) 7722 if err != nil { 7723 return nil, err 7724 } 7725 req.Header = reqHeaders 7726 googleapi.Expand(req.URL, map[string]string{ 7727 "name": c.name, 7728 }) 7729 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7730} 7731 7732// Do executes the "healthcare.projects.locations.datasets.annotationStores.annotations.patch" call. 7733// Exactly one of *Annotation or error will be non-nil. Any non-2xx 7734// status code is an error. Response headers are in either 7735// *Annotation.ServerResponse.Header or (if a response was returned at 7736// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7737// to check whether the returned error was because 7738// http.StatusNotModified was returned. 7739func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall) Do(opts ...googleapi.CallOption) (*Annotation, error) { 7740 gensupport.SetOptions(c.urlParams_, opts...) 7741 res, err := c.doRequest("json") 7742 if res != nil && res.StatusCode == http.StatusNotModified { 7743 if res.Body != nil { 7744 res.Body.Close() 7745 } 7746 return nil, &googleapi.Error{ 7747 Code: res.StatusCode, 7748 Header: res.Header, 7749 } 7750 } 7751 if err != nil { 7752 return nil, err 7753 } 7754 defer googleapi.CloseBody(res) 7755 if err := googleapi.CheckResponse(res); err != nil { 7756 return nil, err 7757 } 7758 ret := &Annotation{ 7759 ServerResponse: googleapi.ServerResponse{ 7760 Header: res.Header, 7761 HTTPStatusCode: res.StatusCode, 7762 }, 7763 } 7764 target := &ret 7765 if err := gensupport.DecodeResponse(target, res); err != nil { 7766 return nil, err 7767 } 7768 return ret, nil 7769 // { 7770 // "description": "Updates the Annotation.", 7771 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores/{annotationStoresId}/annotations/{annotationsId}", 7772 // "httpMethod": "PATCH", 7773 // "id": "healthcare.projects.locations.datasets.annotationStores.annotations.patch", 7774 // "parameterOrder": [ 7775 // "name" 7776 // ], 7777 // "parameters": { 7778 // "name": { 7779 // "description": "Output only. Resource name of the Annotation, of the form\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationStores/{annotation_store_id}/annotations/{annotation_id}`.", 7780 // "location": "path", 7781 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+/annotations/[^/]+$", 7782 // "required": true, 7783 // "type": "string" 7784 // }, 7785 // "updateMask": { 7786 // "description": "The update mask applies to the resource. For the `FieldMask` definition,\nsee\nhttps://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", 7787 // "format": "google-fieldmask", 7788 // "location": "query", 7789 // "type": "string" 7790 // } 7791 // }, 7792 // "path": "v1alpha2/{+name}", 7793 // "request": { 7794 // "$ref": "Annotation" 7795 // }, 7796 // "response": { 7797 // "$ref": "Annotation" 7798 // }, 7799 // "scopes": [ 7800 // "https://www.googleapis.com/auth/cloud-platform" 7801 // ] 7802 // } 7803 7804} 7805 7806// method id "healthcare.projects.locations.datasets.dicomStores.create": 7807 7808type ProjectsLocationsDatasetsDicomStoresCreateCall struct { 7809 s *Service 7810 parent string 7811 dicomstore *DicomStore 7812 urlParams_ gensupport.URLParams 7813 ctx_ context.Context 7814 header_ http.Header 7815} 7816 7817// Create: Creates a new DICOM store within the parent dataset. 7818func (r *ProjectsLocationsDatasetsDicomStoresService) Create(parent string, dicomstore *DicomStore) *ProjectsLocationsDatasetsDicomStoresCreateCall { 7819 c := &ProjectsLocationsDatasetsDicomStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7820 c.parent = parent 7821 c.dicomstore = dicomstore 7822 return c 7823} 7824 7825// DicomStoreId sets the optional parameter "dicomStoreId": The ID of 7826// the DICOM store that is being created. 7827// Any string value up to 256 characters in length. 7828func (c *ProjectsLocationsDatasetsDicomStoresCreateCall) DicomStoreId(dicomStoreId string) *ProjectsLocationsDatasetsDicomStoresCreateCall { 7829 c.urlParams_.Set("dicomStoreId", dicomStoreId) 7830 return c 7831} 7832 7833// Fields allows partial responses to be retrieved. See 7834// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7835// for more information. 7836func (c *ProjectsLocationsDatasetsDicomStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresCreateCall { 7837 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7838 return c 7839} 7840 7841// Context sets the context to be used in this call's Do method. Any 7842// pending HTTP request will be aborted if the provided context is 7843// canceled. 7844func (c *ProjectsLocationsDatasetsDicomStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresCreateCall { 7845 c.ctx_ = ctx 7846 return c 7847} 7848 7849// Header returns an http.Header that can be modified by the caller to 7850// add HTTP headers to the request. 7851func (c *ProjectsLocationsDatasetsDicomStoresCreateCall) Header() http.Header { 7852 if c.header_ == nil { 7853 c.header_ = make(http.Header) 7854 } 7855 return c.header_ 7856} 7857 7858func (c *ProjectsLocationsDatasetsDicomStoresCreateCall) doRequest(alt string) (*http.Response, error) { 7859 reqHeaders := make(http.Header) 7860 for k, v := range c.header_ { 7861 reqHeaders[k] = v 7862 } 7863 reqHeaders.Set("User-Agent", c.s.userAgent()) 7864 var body io.Reader = nil 7865 body, err := googleapi.WithoutDataWrapper.JSONReader(c.dicomstore) 7866 if err != nil { 7867 return nil, err 7868 } 7869 reqHeaders.Set("Content-Type", "application/json") 7870 c.urlParams_.Set("alt", alt) 7871 c.urlParams_.Set("prettyPrint", "false") 7872 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomStores") 7873 urls += "?" + c.urlParams_.Encode() 7874 req, err := http.NewRequest("POST", urls, body) 7875 if err != nil { 7876 return nil, err 7877 } 7878 req.Header = reqHeaders 7879 googleapi.Expand(req.URL, map[string]string{ 7880 "parent": c.parent, 7881 }) 7882 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7883} 7884 7885// Do executes the "healthcare.projects.locations.datasets.dicomStores.create" call. 7886// Exactly one of *DicomStore or error will be non-nil. Any non-2xx 7887// status code is an error. Response headers are in either 7888// *DicomStore.ServerResponse.Header or (if a response was returned at 7889// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7890// to check whether the returned error was because 7891// http.StatusNotModified was returned. 7892func (c *ProjectsLocationsDatasetsDicomStoresCreateCall) Do(opts ...googleapi.CallOption) (*DicomStore, error) { 7893 gensupport.SetOptions(c.urlParams_, opts...) 7894 res, err := c.doRequest("json") 7895 if res != nil && res.StatusCode == http.StatusNotModified { 7896 if res.Body != nil { 7897 res.Body.Close() 7898 } 7899 return nil, &googleapi.Error{ 7900 Code: res.StatusCode, 7901 Header: res.Header, 7902 } 7903 } 7904 if err != nil { 7905 return nil, err 7906 } 7907 defer googleapi.CloseBody(res) 7908 if err := googleapi.CheckResponse(res); err != nil { 7909 return nil, err 7910 } 7911 ret := &DicomStore{ 7912 ServerResponse: googleapi.ServerResponse{ 7913 Header: res.Header, 7914 HTTPStatusCode: res.StatusCode, 7915 }, 7916 } 7917 target := &ret 7918 if err := gensupport.DecodeResponse(target, res); err != nil { 7919 return nil, err 7920 } 7921 return ret, nil 7922 // { 7923 // "description": "Creates a new DICOM store within the parent dataset.", 7924 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores", 7925 // "httpMethod": "POST", 7926 // "id": "healthcare.projects.locations.datasets.dicomStores.create", 7927 // "parameterOrder": [ 7928 // "parent" 7929 // ], 7930 // "parameters": { 7931 // "dicomStoreId": { 7932 // "description": "The ID of the DICOM store that is being created.\nAny string value up to 256 characters in length.", 7933 // "location": "query", 7934 // "type": "string" 7935 // }, 7936 // "parent": { 7937 // "description": "The name of the dataset this DICOM store belongs to.", 7938 // "location": "path", 7939 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", 7940 // "required": true, 7941 // "type": "string" 7942 // } 7943 // }, 7944 // "path": "v1alpha2/{+parent}/dicomStores", 7945 // "request": { 7946 // "$ref": "DicomStore" 7947 // }, 7948 // "response": { 7949 // "$ref": "DicomStore" 7950 // }, 7951 // "scopes": [ 7952 // "https://www.googleapis.com/auth/cloud-platform" 7953 // ] 7954 // } 7955 7956} 7957 7958// method id "healthcare.projects.locations.datasets.dicomStores.delete": 7959 7960type ProjectsLocationsDatasetsDicomStoresDeleteCall struct { 7961 s *Service 7962 name string 7963 urlParams_ gensupport.URLParams 7964 ctx_ context.Context 7965 header_ http.Header 7966} 7967 7968// Delete: Deletes the specified DICOM store and removes all images that 7969// are contained 7970// within it. 7971func (r *ProjectsLocationsDatasetsDicomStoresService) Delete(name string) *ProjectsLocationsDatasetsDicomStoresDeleteCall { 7972 c := &ProjectsLocationsDatasetsDicomStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7973 c.name = name 7974 return c 7975} 7976 7977// Fields allows partial responses to be retrieved. See 7978// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7979// for more information. 7980func (c *ProjectsLocationsDatasetsDicomStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDeleteCall { 7981 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7982 return c 7983} 7984 7985// Context sets the context to be used in this call's Do method. Any 7986// pending HTTP request will be aborted if the provided context is 7987// canceled. 7988func (c *ProjectsLocationsDatasetsDicomStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDeleteCall { 7989 c.ctx_ = ctx 7990 return c 7991} 7992 7993// Header returns an http.Header that can be modified by the caller to 7994// add HTTP headers to the request. 7995func (c *ProjectsLocationsDatasetsDicomStoresDeleteCall) Header() http.Header { 7996 if c.header_ == nil { 7997 c.header_ = make(http.Header) 7998 } 7999 return c.header_ 8000} 8001 8002func (c *ProjectsLocationsDatasetsDicomStoresDeleteCall) doRequest(alt string) (*http.Response, error) { 8003 reqHeaders := make(http.Header) 8004 for k, v := range c.header_ { 8005 reqHeaders[k] = v 8006 } 8007 reqHeaders.Set("User-Agent", c.s.userAgent()) 8008 var body io.Reader = nil 8009 c.urlParams_.Set("alt", alt) 8010 c.urlParams_.Set("prettyPrint", "false") 8011 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}") 8012 urls += "?" + c.urlParams_.Encode() 8013 req, err := http.NewRequest("DELETE", urls, body) 8014 if err != nil { 8015 return nil, err 8016 } 8017 req.Header = reqHeaders 8018 googleapi.Expand(req.URL, map[string]string{ 8019 "name": c.name, 8020 }) 8021 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8022} 8023 8024// Do executes the "healthcare.projects.locations.datasets.dicomStores.delete" call. 8025// Exactly one of *Empty or error will be non-nil. Any non-2xx status 8026// code is an error. Response headers are in either 8027// *Empty.ServerResponse.Header or (if a response was returned at all) 8028// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 8029// check whether the returned error was because http.StatusNotModified 8030// was returned. 8031func (c *ProjectsLocationsDatasetsDicomStoresDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 8032 gensupport.SetOptions(c.urlParams_, opts...) 8033 res, err := c.doRequest("json") 8034 if res != nil && res.StatusCode == http.StatusNotModified { 8035 if res.Body != nil { 8036 res.Body.Close() 8037 } 8038 return nil, &googleapi.Error{ 8039 Code: res.StatusCode, 8040 Header: res.Header, 8041 } 8042 } 8043 if err != nil { 8044 return nil, err 8045 } 8046 defer googleapi.CloseBody(res) 8047 if err := googleapi.CheckResponse(res); err != nil { 8048 return nil, err 8049 } 8050 ret := &Empty{ 8051 ServerResponse: googleapi.ServerResponse{ 8052 Header: res.Header, 8053 HTTPStatusCode: res.StatusCode, 8054 }, 8055 } 8056 target := &ret 8057 if err := gensupport.DecodeResponse(target, res); err != nil { 8058 return nil, err 8059 } 8060 return ret, nil 8061 // { 8062 // "description": "Deletes the specified DICOM store and removes all images that are contained\nwithin it.", 8063 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}", 8064 // "httpMethod": "DELETE", 8065 // "id": "healthcare.projects.locations.datasets.dicomStores.delete", 8066 // "parameterOrder": [ 8067 // "name" 8068 // ], 8069 // "parameters": { 8070 // "name": { 8071 // "description": "The resource name of the DICOM store to delete.", 8072 // "location": "path", 8073 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 8074 // "required": true, 8075 // "type": "string" 8076 // } 8077 // }, 8078 // "path": "v1alpha2/{+name}", 8079 // "response": { 8080 // "$ref": "Empty" 8081 // }, 8082 // "scopes": [ 8083 // "https://www.googleapis.com/auth/cloud-platform" 8084 // ] 8085 // } 8086 8087} 8088 8089// method id "healthcare.projects.locations.datasets.dicomStores.export": 8090 8091type ProjectsLocationsDatasetsDicomStoresExportCall struct { 8092 s *Service 8093 name string 8094 exportdicomdatarequest *ExportDicomDataRequest 8095 urlParams_ gensupport.URLParams 8096 ctx_ context.Context 8097 header_ http.Header 8098} 8099 8100// Export: Exports data to the specified destination by copying it from 8101// the DICOM 8102// store. 8103// The metadata field type is 8104// OperationMetadata. 8105func (r *ProjectsLocationsDatasetsDicomStoresService) Export(name string, exportdicomdatarequest *ExportDicomDataRequest) *ProjectsLocationsDatasetsDicomStoresExportCall { 8106 c := &ProjectsLocationsDatasetsDicomStoresExportCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8107 c.name = name 8108 c.exportdicomdatarequest = exportdicomdatarequest 8109 return c 8110} 8111 8112// Fields allows partial responses to be retrieved. See 8113// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8114// for more information. 8115func (c *ProjectsLocationsDatasetsDicomStoresExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresExportCall { 8116 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8117 return c 8118} 8119 8120// Context sets the context to be used in this call's Do method. Any 8121// pending HTTP request will be aborted if the provided context is 8122// canceled. 8123func (c *ProjectsLocationsDatasetsDicomStoresExportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresExportCall { 8124 c.ctx_ = ctx 8125 return c 8126} 8127 8128// Header returns an http.Header that can be modified by the caller to 8129// add HTTP headers to the request. 8130func (c *ProjectsLocationsDatasetsDicomStoresExportCall) Header() http.Header { 8131 if c.header_ == nil { 8132 c.header_ = make(http.Header) 8133 } 8134 return c.header_ 8135} 8136 8137func (c *ProjectsLocationsDatasetsDicomStoresExportCall) doRequest(alt string) (*http.Response, error) { 8138 reqHeaders := make(http.Header) 8139 for k, v := range c.header_ { 8140 reqHeaders[k] = v 8141 } 8142 reqHeaders.Set("User-Agent", c.s.userAgent()) 8143 var body io.Reader = nil 8144 body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportdicomdatarequest) 8145 if err != nil { 8146 return nil, err 8147 } 8148 reqHeaders.Set("Content-Type", "application/json") 8149 c.urlParams_.Set("alt", alt) 8150 c.urlParams_.Set("prettyPrint", "false") 8151 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}:export") 8152 urls += "?" + c.urlParams_.Encode() 8153 req, err := http.NewRequest("POST", urls, body) 8154 if err != nil { 8155 return nil, err 8156 } 8157 req.Header = reqHeaders 8158 googleapi.Expand(req.URL, map[string]string{ 8159 "name": c.name, 8160 }) 8161 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8162} 8163 8164// Do executes the "healthcare.projects.locations.datasets.dicomStores.export" call. 8165// Exactly one of *Operation or error will be non-nil. Any non-2xx 8166// status code is an error. Response headers are in either 8167// *Operation.ServerResponse.Header or (if a response was returned at 8168// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8169// to check whether the returned error was because 8170// http.StatusNotModified was returned. 8171func (c *ProjectsLocationsDatasetsDicomStoresExportCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 8172 gensupport.SetOptions(c.urlParams_, opts...) 8173 res, err := c.doRequest("json") 8174 if res != nil && res.StatusCode == http.StatusNotModified { 8175 if res.Body != nil { 8176 res.Body.Close() 8177 } 8178 return nil, &googleapi.Error{ 8179 Code: res.StatusCode, 8180 Header: res.Header, 8181 } 8182 } 8183 if err != nil { 8184 return nil, err 8185 } 8186 defer googleapi.CloseBody(res) 8187 if err := googleapi.CheckResponse(res); err != nil { 8188 return nil, err 8189 } 8190 ret := &Operation{ 8191 ServerResponse: googleapi.ServerResponse{ 8192 Header: res.Header, 8193 HTTPStatusCode: res.StatusCode, 8194 }, 8195 } 8196 target := &ret 8197 if err := gensupport.DecodeResponse(target, res); err != nil { 8198 return nil, err 8199 } 8200 return ret, nil 8201 // { 8202 // "description": "Exports data to the specified destination by copying it from the DICOM\nstore.\nThe metadata field type is\nOperationMetadata.", 8203 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}:export", 8204 // "httpMethod": "POST", 8205 // "id": "healthcare.projects.locations.datasets.dicomStores.export", 8206 // "parameterOrder": [ 8207 // "name" 8208 // ], 8209 // "parameters": { 8210 // "name": { 8211 // "description": "The DICOM store resource name from which the data should be exported (e.g.,\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`).", 8212 // "location": "path", 8213 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 8214 // "required": true, 8215 // "type": "string" 8216 // } 8217 // }, 8218 // "path": "v1alpha2/{+name}:export", 8219 // "request": { 8220 // "$ref": "ExportDicomDataRequest" 8221 // }, 8222 // "response": { 8223 // "$ref": "Operation" 8224 // }, 8225 // "scopes": [ 8226 // "https://www.googleapis.com/auth/cloud-platform" 8227 // ] 8228 // } 8229 8230} 8231 8232// method id "healthcare.projects.locations.datasets.dicomStores.get": 8233 8234type ProjectsLocationsDatasetsDicomStoresGetCall struct { 8235 s *Service 8236 name string 8237 urlParams_ gensupport.URLParams 8238 ifNoneMatch_ string 8239 ctx_ context.Context 8240 header_ http.Header 8241} 8242 8243// Get: Gets the specified DICOM store. 8244func (r *ProjectsLocationsDatasetsDicomStoresService) Get(name string) *ProjectsLocationsDatasetsDicomStoresGetCall { 8245 c := &ProjectsLocationsDatasetsDicomStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8246 c.name = name 8247 return c 8248} 8249 8250// Fields allows partial responses to be retrieved. See 8251// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8252// for more information. 8253func (c *ProjectsLocationsDatasetsDicomStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresGetCall { 8254 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8255 return c 8256} 8257 8258// IfNoneMatch sets the optional parameter which makes the operation 8259// fail if the object's ETag matches the given value. This is useful for 8260// getting updates only after the object has changed since the last 8261// request. Use googleapi.IsNotModified to check whether the response 8262// error from Do is the result of In-None-Match. 8263func (c *ProjectsLocationsDatasetsDicomStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresGetCall { 8264 c.ifNoneMatch_ = entityTag 8265 return c 8266} 8267 8268// Context sets the context to be used in this call's Do method. Any 8269// pending HTTP request will be aborted if the provided context is 8270// canceled. 8271func (c *ProjectsLocationsDatasetsDicomStoresGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresGetCall { 8272 c.ctx_ = ctx 8273 return c 8274} 8275 8276// Header returns an http.Header that can be modified by the caller to 8277// add HTTP headers to the request. 8278func (c *ProjectsLocationsDatasetsDicomStoresGetCall) Header() http.Header { 8279 if c.header_ == nil { 8280 c.header_ = make(http.Header) 8281 } 8282 return c.header_ 8283} 8284 8285func (c *ProjectsLocationsDatasetsDicomStoresGetCall) doRequest(alt string) (*http.Response, error) { 8286 reqHeaders := make(http.Header) 8287 for k, v := range c.header_ { 8288 reqHeaders[k] = v 8289 } 8290 reqHeaders.Set("User-Agent", c.s.userAgent()) 8291 if c.ifNoneMatch_ != "" { 8292 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8293 } 8294 var body io.Reader = nil 8295 c.urlParams_.Set("alt", alt) 8296 c.urlParams_.Set("prettyPrint", "false") 8297 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}") 8298 urls += "?" + c.urlParams_.Encode() 8299 req, err := http.NewRequest("GET", urls, body) 8300 if err != nil { 8301 return nil, err 8302 } 8303 req.Header = reqHeaders 8304 googleapi.Expand(req.URL, map[string]string{ 8305 "name": c.name, 8306 }) 8307 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8308} 8309 8310// Do executes the "healthcare.projects.locations.datasets.dicomStores.get" call. 8311// Exactly one of *DicomStore or error will be non-nil. Any non-2xx 8312// status code is an error. Response headers are in either 8313// *DicomStore.ServerResponse.Header or (if a response was returned at 8314// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8315// to check whether the returned error was because 8316// http.StatusNotModified was returned. 8317func (c *ProjectsLocationsDatasetsDicomStoresGetCall) Do(opts ...googleapi.CallOption) (*DicomStore, error) { 8318 gensupport.SetOptions(c.urlParams_, opts...) 8319 res, err := c.doRequest("json") 8320 if res != nil && res.StatusCode == http.StatusNotModified { 8321 if res.Body != nil { 8322 res.Body.Close() 8323 } 8324 return nil, &googleapi.Error{ 8325 Code: res.StatusCode, 8326 Header: res.Header, 8327 } 8328 } 8329 if err != nil { 8330 return nil, err 8331 } 8332 defer googleapi.CloseBody(res) 8333 if err := googleapi.CheckResponse(res); err != nil { 8334 return nil, err 8335 } 8336 ret := &DicomStore{ 8337 ServerResponse: googleapi.ServerResponse{ 8338 Header: res.Header, 8339 HTTPStatusCode: res.StatusCode, 8340 }, 8341 } 8342 target := &ret 8343 if err := gensupport.DecodeResponse(target, res); err != nil { 8344 return nil, err 8345 } 8346 return ret, nil 8347 // { 8348 // "description": "Gets the specified DICOM store.", 8349 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}", 8350 // "httpMethod": "GET", 8351 // "id": "healthcare.projects.locations.datasets.dicomStores.get", 8352 // "parameterOrder": [ 8353 // "name" 8354 // ], 8355 // "parameters": { 8356 // "name": { 8357 // "description": "The resource name of the DICOM store to get.", 8358 // "location": "path", 8359 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 8360 // "required": true, 8361 // "type": "string" 8362 // } 8363 // }, 8364 // "path": "v1alpha2/{+name}", 8365 // "response": { 8366 // "$ref": "DicomStore" 8367 // }, 8368 // "scopes": [ 8369 // "https://www.googleapis.com/auth/cloud-platform" 8370 // ] 8371 // } 8372 8373} 8374 8375// method id "healthcare.projects.locations.datasets.dicomStores.getIamPolicy": 8376 8377type ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall struct { 8378 s *Service 8379 resource string 8380 urlParams_ gensupport.URLParams 8381 ifNoneMatch_ string 8382 ctx_ context.Context 8383 header_ http.Header 8384} 8385 8386// GetIamPolicy: Gets the access control policy for a resource. 8387// Returns an empty policy if the resource exists and does not have a 8388// policy 8389// set. 8390func (r *ProjectsLocationsDatasetsDicomStoresService) GetIamPolicy(resource string) *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall { 8391 c := &ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8392 c.resource = resource 8393 return c 8394} 8395 8396// Fields allows partial responses to be retrieved. See 8397// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8398// for more information. 8399func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall { 8400 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8401 return c 8402} 8403 8404// IfNoneMatch sets the optional parameter which makes the operation 8405// fail if the object's ETag matches the given value. This is useful for 8406// getting updates only after the object has changed since the last 8407// request. Use googleapi.IsNotModified to check whether the response 8408// error from Do is the result of In-None-Match. 8409func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall { 8410 c.ifNoneMatch_ = entityTag 8411 return c 8412} 8413 8414// Context sets the context to be used in this call's Do method. Any 8415// pending HTTP request will be aborted if the provided context is 8416// canceled. 8417func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall { 8418 c.ctx_ = ctx 8419 return c 8420} 8421 8422// Header returns an http.Header that can be modified by the caller to 8423// add HTTP headers to the request. 8424func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) Header() http.Header { 8425 if c.header_ == nil { 8426 c.header_ = make(http.Header) 8427 } 8428 return c.header_ 8429} 8430 8431func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 8432 reqHeaders := make(http.Header) 8433 for k, v := range c.header_ { 8434 reqHeaders[k] = v 8435 } 8436 reqHeaders.Set("User-Agent", c.s.userAgent()) 8437 if c.ifNoneMatch_ != "" { 8438 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8439 } 8440 var body io.Reader = nil 8441 c.urlParams_.Set("alt", alt) 8442 c.urlParams_.Set("prettyPrint", "false") 8443 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:getIamPolicy") 8444 urls += "?" + c.urlParams_.Encode() 8445 req, err := http.NewRequest("GET", urls, body) 8446 if err != nil { 8447 return nil, err 8448 } 8449 req.Header = reqHeaders 8450 googleapi.Expand(req.URL, map[string]string{ 8451 "resource": c.resource, 8452 }) 8453 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8454} 8455 8456// Do executes the "healthcare.projects.locations.datasets.dicomStores.getIamPolicy" call. 8457// Exactly one of *Policy or error will be non-nil. Any non-2xx status 8458// code is an error. Response headers are in either 8459// *Policy.ServerResponse.Header or (if a response was returned at all) 8460// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 8461// check whether the returned error was because http.StatusNotModified 8462// was returned. 8463func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 8464 gensupport.SetOptions(c.urlParams_, opts...) 8465 res, err := c.doRequest("json") 8466 if res != nil && res.StatusCode == http.StatusNotModified { 8467 if res.Body != nil { 8468 res.Body.Close() 8469 } 8470 return nil, &googleapi.Error{ 8471 Code: res.StatusCode, 8472 Header: res.Header, 8473 } 8474 } 8475 if err != nil { 8476 return nil, err 8477 } 8478 defer googleapi.CloseBody(res) 8479 if err := googleapi.CheckResponse(res); err != nil { 8480 return nil, err 8481 } 8482 ret := &Policy{ 8483 ServerResponse: googleapi.ServerResponse{ 8484 Header: res.Header, 8485 HTTPStatusCode: res.StatusCode, 8486 }, 8487 } 8488 target := &ret 8489 if err := gensupport.DecodeResponse(target, res); err != nil { 8490 return nil, err 8491 } 8492 return ret, nil 8493 // { 8494 // "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", 8495 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}:getIamPolicy", 8496 // "httpMethod": "GET", 8497 // "id": "healthcare.projects.locations.datasets.dicomStores.getIamPolicy", 8498 // "parameterOrder": [ 8499 // "resource" 8500 // ], 8501 // "parameters": { 8502 // "resource": { 8503 // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", 8504 // "location": "path", 8505 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 8506 // "required": true, 8507 // "type": "string" 8508 // } 8509 // }, 8510 // "path": "v1alpha2/{+resource}:getIamPolicy", 8511 // "response": { 8512 // "$ref": "Policy" 8513 // }, 8514 // "scopes": [ 8515 // "https://www.googleapis.com/auth/cloud-platform" 8516 // ] 8517 // } 8518 8519} 8520 8521// method id "healthcare.projects.locations.datasets.dicomStores.import": 8522 8523type ProjectsLocationsDatasetsDicomStoresImportCall struct { 8524 s *Service 8525 name string 8526 importdicomdatarequest *ImportDicomDataRequest 8527 urlParams_ gensupport.URLParams 8528 ctx_ context.Context 8529 header_ http.Header 8530} 8531 8532// Import: Imports data into the DICOM store by copying it from the 8533// specified source. 8534// For errors, the Operation will be populated with error details (in 8535// the form 8536// of ImportDicomDataErrorDetails in error.details), which will 8537// hold 8538// finer-grained error information. 8539// The metadata field type is 8540// OperationMetadata. 8541func (r *ProjectsLocationsDatasetsDicomStoresService) Import(name string, importdicomdatarequest *ImportDicomDataRequest) *ProjectsLocationsDatasetsDicomStoresImportCall { 8542 c := &ProjectsLocationsDatasetsDicomStoresImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8543 c.name = name 8544 c.importdicomdatarequest = importdicomdatarequest 8545 return c 8546} 8547 8548// Fields allows partial responses to be retrieved. See 8549// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8550// for more information. 8551func (c *ProjectsLocationsDatasetsDicomStoresImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresImportCall { 8552 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8553 return c 8554} 8555 8556// Context sets the context to be used in this call's Do method. Any 8557// pending HTTP request will be aborted if the provided context is 8558// canceled. 8559func (c *ProjectsLocationsDatasetsDicomStoresImportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresImportCall { 8560 c.ctx_ = ctx 8561 return c 8562} 8563 8564// Header returns an http.Header that can be modified by the caller to 8565// add HTTP headers to the request. 8566func (c *ProjectsLocationsDatasetsDicomStoresImportCall) Header() http.Header { 8567 if c.header_ == nil { 8568 c.header_ = make(http.Header) 8569 } 8570 return c.header_ 8571} 8572 8573func (c *ProjectsLocationsDatasetsDicomStoresImportCall) doRequest(alt string) (*http.Response, error) { 8574 reqHeaders := make(http.Header) 8575 for k, v := range c.header_ { 8576 reqHeaders[k] = v 8577 } 8578 reqHeaders.Set("User-Agent", c.s.userAgent()) 8579 var body io.Reader = nil 8580 body, err := googleapi.WithoutDataWrapper.JSONReader(c.importdicomdatarequest) 8581 if err != nil { 8582 return nil, err 8583 } 8584 reqHeaders.Set("Content-Type", "application/json") 8585 c.urlParams_.Set("alt", alt) 8586 c.urlParams_.Set("prettyPrint", "false") 8587 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}:import") 8588 urls += "?" + c.urlParams_.Encode() 8589 req, err := http.NewRequest("POST", urls, body) 8590 if err != nil { 8591 return nil, err 8592 } 8593 req.Header = reqHeaders 8594 googleapi.Expand(req.URL, map[string]string{ 8595 "name": c.name, 8596 }) 8597 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8598} 8599 8600// Do executes the "healthcare.projects.locations.datasets.dicomStores.import" call. 8601// Exactly one of *Operation or error will be non-nil. Any non-2xx 8602// status code is an error. Response headers are in either 8603// *Operation.ServerResponse.Header or (if a response was returned at 8604// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8605// to check whether the returned error was because 8606// http.StatusNotModified was returned. 8607func (c *ProjectsLocationsDatasetsDicomStoresImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 8608 gensupport.SetOptions(c.urlParams_, opts...) 8609 res, err := c.doRequest("json") 8610 if res != nil && res.StatusCode == http.StatusNotModified { 8611 if res.Body != nil { 8612 res.Body.Close() 8613 } 8614 return nil, &googleapi.Error{ 8615 Code: res.StatusCode, 8616 Header: res.Header, 8617 } 8618 } 8619 if err != nil { 8620 return nil, err 8621 } 8622 defer googleapi.CloseBody(res) 8623 if err := googleapi.CheckResponse(res); err != nil { 8624 return nil, err 8625 } 8626 ret := &Operation{ 8627 ServerResponse: googleapi.ServerResponse{ 8628 Header: res.Header, 8629 HTTPStatusCode: res.StatusCode, 8630 }, 8631 } 8632 target := &ret 8633 if err := gensupport.DecodeResponse(target, res); err != nil { 8634 return nil, err 8635 } 8636 return ret, nil 8637 // { 8638 // "description": "Imports data into the DICOM store by copying it from the specified source.\nFor errors, the Operation will be populated with error details (in the form\nof ImportDicomDataErrorDetails in error.details), which will hold\nfiner-grained error information.\nThe metadata field type is\nOperationMetadata.", 8639 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}:import", 8640 // "httpMethod": "POST", 8641 // "id": "healthcare.projects.locations.datasets.dicomStores.import", 8642 // "parameterOrder": [ 8643 // "name" 8644 // ], 8645 // "parameters": { 8646 // "name": { 8647 // "description": "The name of the DICOM store resource into which the data is imported (e.g.,\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`).", 8648 // "location": "path", 8649 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 8650 // "required": true, 8651 // "type": "string" 8652 // } 8653 // }, 8654 // "path": "v1alpha2/{+name}:import", 8655 // "request": { 8656 // "$ref": "ImportDicomDataRequest" 8657 // }, 8658 // "response": { 8659 // "$ref": "Operation" 8660 // }, 8661 // "scopes": [ 8662 // "https://www.googleapis.com/auth/cloud-platform" 8663 // ] 8664 // } 8665 8666} 8667 8668// method id "healthcare.projects.locations.datasets.dicomStores.list": 8669 8670type ProjectsLocationsDatasetsDicomStoresListCall struct { 8671 s *Service 8672 parent string 8673 urlParams_ gensupport.URLParams 8674 ifNoneMatch_ string 8675 ctx_ context.Context 8676 header_ http.Header 8677} 8678 8679// List: Lists the DICOM stores in the given dataset. 8680func (r *ProjectsLocationsDatasetsDicomStoresService) List(parent string) *ProjectsLocationsDatasetsDicomStoresListCall { 8681 c := &ProjectsLocationsDatasetsDicomStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8682 c.parent = parent 8683 return c 8684} 8685 8686// Filter sets the optional parameter "filter": Restricts stores 8687// returned to those matching a filter. 8688// Syntax: 8689// https://cloud.google.com/appengine/docs/standard/python/search 8690// /query_strings 8691// Only filtering on labels is supported, for example 8692// `labels.key=value`. 8693func (c *ProjectsLocationsDatasetsDicomStoresListCall) Filter(filter string) *ProjectsLocationsDatasetsDicomStoresListCall { 8694 c.urlParams_.Set("filter", filter) 8695 return c 8696} 8697 8698// PageSize sets the optional parameter "pageSize": Limit on the number 8699// of DICOM stores to return in a single response. 8700// If zero the default page size of 100 is used. 8701func (c *ProjectsLocationsDatasetsDicomStoresListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsDicomStoresListCall { 8702 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 8703 return c 8704} 8705 8706// PageToken sets the optional parameter "pageToken": The 8707// next_page_token value returned from the previous List request, if 8708// any. 8709func (c *ProjectsLocationsDatasetsDicomStoresListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsDicomStoresListCall { 8710 c.urlParams_.Set("pageToken", pageToken) 8711 return c 8712} 8713 8714// Fields allows partial responses to be retrieved. See 8715// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8716// for more information. 8717func (c *ProjectsLocationsDatasetsDicomStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresListCall { 8718 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8719 return c 8720} 8721 8722// IfNoneMatch sets the optional parameter which makes the operation 8723// fail if the object's ETag matches the given value. This is useful for 8724// getting updates only after the object has changed since the last 8725// request. Use googleapi.IsNotModified to check whether the response 8726// error from Do is the result of In-None-Match. 8727func (c *ProjectsLocationsDatasetsDicomStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresListCall { 8728 c.ifNoneMatch_ = entityTag 8729 return c 8730} 8731 8732// Context sets the context to be used in this call's Do method. Any 8733// pending HTTP request will be aborted if the provided context is 8734// canceled. 8735func (c *ProjectsLocationsDatasetsDicomStoresListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresListCall { 8736 c.ctx_ = ctx 8737 return c 8738} 8739 8740// Header returns an http.Header that can be modified by the caller to 8741// add HTTP headers to the request. 8742func (c *ProjectsLocationsDatasetsDicomStoresListCall) Header() http.Header { 8743 if c.header_ == nil { 8744 c.header_ = make(http.Header) 8745 } 8746 return c.header_ 8747} 8748 8749func (c *ProjectsLocationsDatasetsDicomStoresListCall) doRequest(alt string) (*http.Response, error) { 8750 reqHeaders := make(http.Header) 8751 for k, v := range c.header_ { 8752 reqHeaders[k] = v 8753 } 8754 reqHeaders.Set("User-Agent", c.s.userAgent()) 8755 if c.ifNoneMatch_ != "" { 8756 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8757 } 8758 var body io.Reader = nil 8759 c.urlParams_.Set("alt", alt) 8760 c.urlParams_.Set("prettyPrint", "false") 8761 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomStores") 8762 urls += "?" + c.urlParams_.Encode() 8763 req, err := http.NewRequest("GET", urls, body) 8764 if err != nil { 8765 return nil, err 8766 } 8767 req.Header = reqHeaders 8768 googleapi.Expand(req.URL, map[string]string{ 8769 "parent": c.parent, 8770 }) 8771 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8772} 8773 8774// Do executes the "healthcare.projects.locations.datasets.dicomStores.list" call. 8775// Exactly one of *ListDicomStoresResponse or error will be non-nil. Any 8776// non-2xx status code is an error. Response headers are in either 8777// *ListDicomStoresResponse.ServerResponse.Header or (if a response was 8778// returned at all) in error.(*googleapi.Error).Header. Use 8779// googleapi.IsNotModified to check whether the returned error was 8780// because http.StatusNotModified was returned. 8781func (c *ProjectsLocationsDatasetsDicomStoresListCall) Do(opts ...googleapi.CallOption) (*ListDicomStoresResponse, error) { 8782 gensupport.SetOptions(c.urlParams_, opts...) 8783 res, err := c.doRequest("json") 8784 if res != nil && res.StatusCode == http.StatusNotModified { 8785 if res.Body != nil { 8786 res.Body.Close() 8787 } 8788 return nil, &googleapi.Error{ 8789 Code: res.StatusCode, 8790 Header: res.Header, 8791 } 8792 } 8793 if err != nil { 8794 return nil, err 8795 } 8796 defer googleapi.CloseBody(res) 8797 if err := googleapi.CheckResponse(res); err != nil { 8798 return nil, err 8799 } 8800 ret := &ListDicomStoresResponse{ 8801 ServerResponse: googleapi.ServerResponse{ 8802 Header: res.Header, 8803 HTTPStatusCode: res.StatusCode, 8804 }, 8805 } 8806 target := &ret 8807 if err := gensupport.DecodeResponse(target, res); err != nil { 8808 return nil, err 8809 } 8810 return ret, nil 8811 // { 8812 // "description": "Lists the DICOM stores in the given dataset.", 8813 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores", 8814 // "httpMethod": "GET", 8815 // "id": "healthcare.projects.locations.datasets.dicomStores.list", 8816 // "parameterOrder": [ 8817 // "parent" 8818 // ], 8819 // "parameters": { 8820 // "filter": { 8821 // "description": "Restricts stores returned to those matching a filter. Syntax:\nhttps://cloud.google.com/appengine/docs/standard/python/search/query_strings\nOnly filtering on labels is supported, for example `labels.key=value`.", 8822 // "location": "query", 8823 // "type": "string" 8824 // }, 8825 // "pageSize": { 8826 // "description": "Limit on the number of DICOM stores to return in a single response.\nIf zero the default page size of 100 is used.", 8827 // "format": "int32", 8828 // "location": "query", 8829 // "type": "integer" 8830 // }, 8831 // "pageToken": { 8832 // "description": "The next_page_token value returned from the previous List request, if any.", 8833 // "location": "query", 8834 // "type": "string" 8835 // }, 8836 // "parent": { 8837 // "description": "Name of the dataset.", 8838 // "location": "path", 8839 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", 8840 // "required": true, 8841 // "type": "string" 8842 // } 8843 // }, 8844 // "path": "v1alpha2/{+parent}/dicomStores", 8845 // "response": { 8846 // "$ref": "ListDicomStoresResponse" 8847 // }, 8848 // "scopes": [ 8849 // "https://www.googleapis.com/auth/cloud-platform" 8850 // ] 8851 // } 8852 8853} 8854 8855// Pages invokes f for each page of results. 8856// A non-nil error returned from f will halt the iteration. 8857// The provided context supersedes any context provided to the Context method. 8858func (c *ProjectsLocationsDatasetsDicomStoresListCall) Pages(ctx context.Context, f func(*ListDicomStoresResponse) error) error { 8859 c.ctx_ = ctx 8860 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 8861 for { 8862 x, err := c.Do() 8863 if err != nil { 8864 return err 8865 } 8866 if err := f(x); err != nil { 8867 return err 8868 } 8869 if x.NextPageToken == "" { 8870 return nil 8871 } 8872 c.PageToken(x.NextPageToken) 8873 } 8874} 8875 8876// method id "healthcare.projects.locations.datasets.dicomStores.patch": 8877 8878type ProjectsLocationsDatasetsDicomStoresPatchCall struct { 8879 s *Service 8880 name string 8881 dicomstore *DicomStore 8882 urlParams_ gensupport.URLParams 8883 ctx_ context.Context 8884 header_ http.Header 8885} 8886 8887// Patch: Updates the specified DICOM store. 8888func (r *ProjectsLocationsDatasetsDicomStoresService) Patch(name string, dicomstore *DicomStore) *ProjectsLocationsDatasetsDicomStoresPatchCall { 8889 c := &ProjectsLocationsDatasetsDicomStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8890 c.name = name 8891 c.dicomstore = dicomstore 8892 return c 8893} 8894 8895// UpdateMask sets the optional parameter "updateMask": The update mask 8896// applies to the resource. For the `FieldMask` 8897// definition, 8898// see 8899// https://developers.google.com/protocol-buffers/docs/re 8900// ference/google.protobuf#fieldmask 8901func (c *ProjectsLocationsDatasetsDicomStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsDicomStoresPatchCall { 8902 c.urlParams_.Set("updateMask", updateMask) 8903 return c 8904} 8905 8906// Fields allows partial responses to be retrieved. See 8907// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8908// for more information. 8909func (c *ProjectsLocationsDatasetsDicomStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresPatchCall { 8910 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8911 return c 8912} 8913 8914// Context sets the context to be used in this call's Do method. Any 8915// pending HTTP request will be aborted if the provided context is 8916// canceled. 8917func (c *ProjectsLocationsDatasetsDicomStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresPatchCall { 8918 c.ctx_ = ctx 8919 return c 8920} 8921 8922// Header returns an http.Header that can be modified by the caller to 8923// add HTTP headers to the request. 8924func (c *ProjectsLocationsDatasetsDicomStoresPatchCall) Header() http.Header { 8925 if c.header_ == nil { 8926 c.header_ = make(http.Header) 8927 } 8928 return c.header_ 8929} 8930 8931func (c *ProjectsLocationsDatasetsDicomStoresPatchCall) doRequest(alt string) (*http.Response, error) { 8932 reqHeaders := make(http.Header) 8933 for k, v := range c.header_ { 8934 reqHeaders[k] = v 8935 } 8936 reqHeaders.Set("User-Agent", c.s.userAgent()) 8937 var body io.Reader = nil 8938 body, err := googleapi.WithoutDataWrapper.JSONReader(c.dicomstore) 8939 if err != nil { 8940 return nil, err 8941 } 8942 reqHeaders.Set("Content-Type", "application/json") 8943 c.urlParams_.Set("alt", alt) 8944 c.urlParams_.Set("prettyPrint", "false") 8945 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}") 8946 urls += "?" + c.urlParams_.Encode() 8947 req, err := http.NewRequest("PATCH", urls, body) 8948 if err != nil { 8949 return nil, err 8950 } 8951 req.Header = reqHeaders 8952 googleapi.Expand(req.URL, map[string]string{ 8953 "name": c.name, 8954 }) 8955 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8956} 8957 8958// Do executes the "healthcare.projects.locations.datasets.dicomStores.patch" call. 8959// Exactly one of *DicomStore or error will be non-nil. Any non-2xx 8960// status code is an error. Response headers are in either 8961// *DicomStore.ServerResponse.Header or (if a response was returned at 8962// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8963// to check whether the returned error was because 8964// http.StatusNotModified was returned. 8965func (c *ProjectsLocationsDatasetsDicomStoresPatchCall) Do(opts ...googleapi.CallOption) (*DicomStore, error) { 8966 gensupport.SetOptions(c.urlParams_, opts...) 8967 res, err := c.doRequest("json") 8968 if res != nil && res.StatusCode == http.StatusNotModified { 8969 if res.Body != nil { 8970 res.Body.Close() 8971 } 8972 return nil, &googleapi.Error{ 8973 Code: res.StatusCode, 8974 Header: res.Header, 8975 } 8976 } 8977 if err != nil { 8978 return nil, err 8979 } 8980 defer googleapi.CloseBody(res) 8981 if err := googleapi.CheckResponse(res); err != nil { 8982 return nil, err 8983 } 8984 ret := &DicomStore{ 8985 ServerResponse: googleapi.ServerResponse{ 8986 Header: res.Header, 8987 HTTPStatusCode: res.StatusCode, 8988 }, 8989 } 8990 target := &ret 8991 if err := gensupport.DecodeResponse(target, res); err != nil { 8992 return nil, err 8993 } 8994 return ret, nil 8995 // { 8996 // "description": "Updates the specified DICOM store.", 8997 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}", 8998 // "httpMethod": "PATCH", 8999 // "id": "healthcare.projects.locations.datasets.dicomStores.patch", 9000 // "parameterOrder": [ 9001 // "name" 9002 // ], 9003 // "parameters": { 9004 // "name": { 9005 // "description": "Output only. Resource name of the DICOM store, of the form\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`.", 9006 // "location": "path", 9007 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 9008 // "required": true, 9009 // "type": "string" 9010 // }, 9011 // "updateMask": { 9012 // "description": "The update mask applies to the resource. For the `FieldMask` definition,\nsee\nhttps://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", 9013 // "format": "google-fieldmask", 9014 // "location": "query", 9015 // "type": "string" 9016 // } 9017 // }, 9018 // "path": "v1alpha2/{+name}", 9019 // "request": { 9020 // "$ref": "DicomStore" 9021 // }, 9022 // "response": { 9023 // "$ref": "DicomStore" 9024 // }, 9025 // "scopes": [ 9026 // "https://www.googleapis.com/auth/cloud-platform" 9027 // ] 9028 // } 9029 9030} 9031 9032// method id "healthcare.projects.locations.datasets.dicomStores.setIamPolicy": 9033 9034type ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall struct { 9035 s *Service 9036 resource string 9037 setiampolicyrequest *SetIamPolicyRequest 9038 urlParams_ gensupport.URLParams 9039 ctx_ context.Context 9040 header_ http.Header 9041} 9042 9043// SetIamPolicy: Sets the access control policy on the specified 9044// resource. Replaces any 9045// existing policy. 9046func (r *ProjectsLocationsDatasetsDicomStoresService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall { 9047 c := &ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9048 c.resource = resource 9049 c.setiampolicyrequest = setiampolicyrequest 9050 return c 9051} 9052 9053// Fields allows partial responses to be retrieved. See 9054// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9055// for more information. 9056func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall { 9057 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9058 return c 9059} 9060 9061// Context sets the context to be used in this call's Do method. Any 9062// pending HTTP request will be aborted if the provided context is 9063// canceled. 9064func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall { 9065 c.ctx_ = ctx 9066 return c 9067} 9068 9069// Header returns an http.Header that can be modified by the caller to 9070// add HTTP headers to the request. 9071func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) Header() http.Header { 9072 if c.header_ == nil { 9073 c.header_ = make(http.Header) 9074 } 9075 return c.header_ 9076} 9077 9078func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 9079 reqHeaders := make(http.Header) 9080 for k, v := range c.header_ { 9081 reqHeaders[k] = v 9082 } 9083 reqHeaders.Set("User-Agent", c.s.userAgent()) 9084 var body io.Reader = nil 9085 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 9086 if err != nil { 9087 return nil, err 9088 } 9089 reqHeaders.Set("Content-Type", "application/json") 9090 c.urlParams_.Set("alt", alt) 9091 c.urlParams_.Set("prettyPrint", "false") 9092 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:setIamPolicy") 9093 urls += "?" + c.urlParams_.Encode() 9094 req, err := http.NewRequest("POST", urls, body) 9095 if err != nil { 9096 return nil, err 9097 } 9098 req.Header = reqHeaders 9099 googleapi.Expand(req.URL, map[string]string{ 9100 "resource": c.resource, 9101 }) 9102 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9103} 9104 9105// Do executes the "healthcare.projects.locations.datasets.dicomStores.setIamPolicy" call. 9106// Exactly one of *Policy or error will be non-nil. Any non-2xx status 9107// code is an error. Response headers are in either 9108// *Policy.ServerResponse.Header or (if a response was returned at all) 9109// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 9110// check whether the returned error was because http.StatusNotModified 9111// was returned. 9112func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 9113 gensupport.SetOptions(c.urlParams_, opts...) 9114 res, err := c.doRequest("json") 9115 if res != nil && res.StatusCode == http.StatusNotModified { 9116 if res.Body != nil { 9117 res.Body.Close() 9118 } 9119 return nil, &googleapi.Error{ 9120 Code: res.StatusCode, 9121 Header: res.Header, 9122 } 9123 } 9124 if err != nil { 9125 return nil, err 9126 } 9127 defer googleapi.CloseBody(res) 9128 if err := googleapi.CheckResponse(res); err != nil { 9129 return nil, err 9130 } 9131 ret := &Policy{ 9132 ServerResponse: googleapi.ServerResponse{ 9133 Header: res.Header, 9134 HTTPStatusCode: res.StatusCode, 9135 }, 9136 } 9137 target := &ret 9138 if err := gensupport.DecodeResponse(target, res); err != nil { 9139 return nil, err 9140 } 9141 return ret, nil 9142 // { 9143 // "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", 9144 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}:setIamPolicy", 9145 // "httpMethod": "POST", 9146 // "id": "healthcare.projects.locations.datasets.dicomStores.setIamPolicy", 9147 // "parameterOrder": [ 9148 // "resource" 9149 // ], 9150 // "parameters": { 9151 // "resource": { 9152 // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", 9153 // "location": "path", 9154 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 9155 // "required": true, 9156 // "type": "string" 9157 // } 9158 // }, 9159 // "path": "v1alpha2/{+resource}:setIamPolicy", 9160 // "request": { 9161 // "$ref": "SetIamPolicyRequest" 9162 // }, 9163 // "response": { 9164 // "$ref": "Policy" 9165 // }, 9166 // "scopes": [ 9167 // "https://www.googleapis.com/auth/cloud-platform" 9168 // ] 9169 // } 9170 9171} 9172 9173// method id "healthcare.projects.locations.datasets.dicomStores.testIamPermissions": 9174 9175type ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall struct { 9176 s *Service 9177 resource string 9178 testiampermissionsrequest *TestIamPermissionsRequest 9179 urlParams_ gensupport.URLParams 9180 ctx_ context.Context 9181 header_ http.Header 9182} 9183 9184// TestIamPermissions: Returns permissions that a caller has on the 9185// specified resource. 9186// If the resource does not exist, this will return an empty set 9187// of 9188// permissions, not a NOT_FOUND error. 9189// 9190// Note: This operation is designed to be used for building 9191// permission-aware 9192// UIs and command-line tools, not for authorization checking. This 9193// operation 9194// may "fail open" without warning. 9195func (r *ProjectsLocationsDatasetsDicomStoresService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall { 9196 c := &ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9197 c.resource = resource 9198 c.testiampermissionsrequest = testiampermissionsrequest 9199 return c 9200} 9201 9202// Fields allows partial responses to be retrieved. See 9203// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9204// for more information. 9205func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall { 9206 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9207 return c 9208} 9209 9210// Context sets the context to be used in this call's Do method. Any 9211// pending HTTP request will be aborted if the provided context is 9212// canceled. 9213func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall { 9214 c.ctx_ = ctx 9215 return c 9216} 9217 9218// Header returns an http.Header that can be modified by the caller to 9219// add HTTP headers to the request. 9220func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) Header() http.Header { 9221 if c.header_ == nil { 9222 c.header_ = make(http.Header) 9223 } 9224 return c.header_ 9225} 9226 9227func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 9228 reqHeaders := make(http.Header) 9229 for k, v := range c.header_ { 9230 reqHeaders[k] = v 9231 } 9232 reqHeaders.Set("User-Agent", c.s.userAgent()) 9233 var body io.Reader = nil 9234 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 9235 if err != nil { 9236 return nil, err 9237 } 9238 reqHeaders.Set("Content-Type", "application/json") 9239 c.urlParams_.Set("alt", alt) 9240 c.urlParams_.Set("prettyPrint", "false") 9241 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:testIamPermissions") 9242 urls += "?" + c.urlParams_.Encode() 9243 req, err := http.NewRequest("POST", urls, body) 9244 if err != nil { 9245 return nil, err 9246 } 9247 req.Header = reqHeaders 9248 googleapi.Expand(req.URL, map[string]string{ 9249 "resource": c.resource, 9250 }) 9251 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9252} 9253 9254// Do executes the "healthcare.projects.locations.datasets.dicomStores.testIamPermissions" call. 9255// Exactly one of *TestIamPermissionsResponse or error will be non-nil. 9256// Any non-2xx status code is an error. Response headers are in either 9257// *TestIamPermissionsResponse.ServerResponse.Header or (if a response 9258// was returned at all) in error.(*googleapi.Error).Header. Use 9259// googleapi.IsNotModified to check whether the returned error was 9260// because http.StatusNotModified was returned. 9261func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 9262 gensupport.SetOptions(c.urlParams_, opts...) 9263 res, err := c.doRequest("json") 9264 if res != nil && res.StatusCode == http.StatusNotModified { 9265 if res.Body != nil { 9266 res.Body.Close() 9267 } 9268 return nil, &googleapi.Error{ 9269 Code: res.StatusCode, 9270 Header: res.Header, 9271 } 9272 } 9273 if err != nil { 9274 return nil, err 9275 } 9276 defer googleapi.CloseBody(res) 9277 if err := googleapi.CheckResponse(res); err != nil { 9278 return nil, err 9279 } 9280 ret := &TestIamPermissionsResponse{ 9281 ServerResponse: googleapi.ServerResponse{ 9282 Header: res.Header, 9283 HTTPStatusCode: res.StatusCode, 9284 }, 9285 } 9286 target := &ret 9287 if err := gensupport.DecodeResponse(target, res); err != nil { 9288 return nil, err 9289 } 9290 return ret, nil 9291 // { 9292 // "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.", 9293 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}:testIamPermissions", 9294 // "httpMethod": "POST", 9295 // "id": "healthcare.projects.locations.datasets.dicomStores.testIamPermissions", 9296 // "parameterOrder": [ 9297 // "resource" 9298 // ], 9299 // "parameters": { 9300 // "resource": { 9301 // "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", 9302 // "location": "path", 9303 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 9304 // "required": true, 9305 // "type": "string" 9306 // } 9307 // }, 9308 // "path": "v1alpha2/{+resource}:testIamPermissions", 9309 // "request": { 9310 // "$ref": "TestIamPermissionsRequest" 9311 // }, 9312 // "response": { 9313 // "$ref": "TestIamPermissionsResponse" 9314 // }, 9315 // "scopes": [ 9316 // "https://www.googleapis.com/auth/cloud-platform" 9317 // ] 9318 // } 9319 9320} 9321 9322// method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.searchForInstances": 9323 9324type ProjectsLocationsDatasetsDicomStoresDicomWebSearchForInstancesCall struct { 9325 s *Service 9326 parent string 9327 dicomWebPath string 9328 urlParams_ gensupport.URLParams 9329 ifNoneMatch_ string 9330 ctx_ context.Context 9331 header_ http.Header 9332} 9333 9334// SearchForInstances: SearchForInstances returns a list of matching 9335// instances. 9336// See 9337// http://dicom.nema.org/medical/dicom/current/output/html/part18.htm 9338// l#sect_10.6. 9339func (r *ProjectsLocationsDatasetsDicomStoresDicomWebService) SearchForInstances(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForInstancesCall { 9340 c := &ProjectsLocationsDatasetsDicomStoresDicomWebSearchForInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9341 c.parent = parent 9342 c.dicomWebPath = dicomWebPath 9343 return c 9344} 9345 9346// Fields allows partial responses to be retrieved. See 9347// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9348// for more information. 9349func (c *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForInstancesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForInstancesCall { 9350 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9351 return c 9352} 9353 9354// IfNoneMatch sets the optional parameter which makes the operation 9355// fail if the object's ETag matches the given value. This is useful for 9356// getting updates only after the object has changed since the last 9357// request. Use googleapi.IsNotModified to check whether the response 9358// error from Do is the result of In-None-Match. 9359func (c *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForInstancesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForInstancesCall { 9360 c.ifNoneMatch_ = entityTag 9361 return c 9362} 9363 9364// Context sets the context to be used in this call's Do method. Any 9365// pending HTTP request will be aborted if the provided context is 9366// canceled. 9367func (c *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForInstancesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForInstancesCall { 9368 c.ctx_ = ctx 9369 return c 9370} 9371 9372// Header returns an http.Header that can be modified by the caller to 9373// add HTTP headers to the request. 9374func (c *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForInstancesCall) Header() http.Header { 9375 if c.header_ == nil { 9376 c.header_ = make(http.Header) 9377 } 9378 return c.header_ 9379} 9380 9381func (c *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForInstancesCall) doRequest(alt string) (*http.Response, error) { 9382 reqHeaders := make(http.Header) 9383 for k, v := range c.header_ { 9384 reqHeaders[k] = v 9385 } 9386 reqHeaders.Set("User-Agent", c.s.userAgent()) 9387 if c.ifNoneMatch_ != "" { 9388 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9389 } 9390 var body io.Reader = nil 9391 c.urlParams_.Set("alt", alt) 9392 c.urlParams_.Set("prettyPrint", "false") 9393 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}") 9394 urls += "?" + c.urlParams_.Encode() 9395 req, err := http.NewRequest("GET", urls, body) 9396 if err != nil { 9397 return nil, err 9398 } 9399 req.Header = reqHeaders 9400 googleapi.Expand(req.URL, map[string]string{ 9401 "parent": c.parent, 9402 "dicomWebPath": c.dicomWebPath, 9403 }) 9404 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9405} 9406 9407// Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.searchForInstances" call. 9408func (c *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForInstancesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 9409 gensupport.SetOptions(c.urlParams_, opts...) 9410 return c.doRequest("") 9411 // { 9412 // "description": "SearchForInstances returns a list of matching instances. See\nhttp://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.6.", 9413 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/instances", 9414 // "httpMethod": "GET", 9415 // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.searchForInstances", 9416 // "parameterOrder": [ 9417 // "parent", 9418 // "dicomWebPath" 9419 // ], 9420 // "parameters": { 9421 // "dicomWebPath": { 9422 // "description": "The path of the SearchForInstancesRequest DICOMweb request (e.g.,\n`instances` or `series/{series_uid}/instances` or\n`studies/{study_uid}/instances`).", 9423 // "location": "path", 9424 // "pattern": "^instances$", 9425 // "required": true, 9426 // "type": "string" 9427 // }, 9428 // "parent": { 9429 // "description": "The name of the DICOM store that is being accessed (e.g.,\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`).", 9430 // "location": "path", 9431 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 9432 // "required": true, 9433 // "type": "string" 9434 // } 9435 // }, 9436 // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}", 9437 // "response": { 9438 // "$ref": "HttpBody" 9439 // }, 9440 // "scopes": [ 9441 // "https://www.googleapis.com/auth/cloud-platform" 9442 // ] 9443 // } 9444 9445} 9446 9447// method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.searchForSeries": 9448 9449type ProjectsLocationsDatasetsDicomStoresDicomWebSearchForSeriesCall struct { 9450 s *Service 9451 parent string 9452 dicomWebPath string 9453 urlParams_ gensupport.URLParams 9454 ifNoneMatch_ string 9455 ctx_ context.Context 9456 header_ http.Header 9457} 9458 9459// SearchForSeries: SearchForSeries returns a list of matching series. 9460// See 9461// http://dicom.nema.org/medical/dicom/current/output/html/part18.htm 9462// l#sect_10.6. 9463func (r *ProjectsLocationsDatasetsDicomStoresDicomWebService) SearchForSeries(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForSeriesCall { 9464 c := &ProjectsLocationsDatasetsDicomStoresDicomWebSearchForSeriesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9465 c.parent = parent 9466 c.dicomWebPath = dicomWebPath 9467 return c 9468} 9469 9470// Fields allows partial responses to be retrieved. See 9471// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9472// for more information. 9473func (c *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForSeriesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForSeriesCall { 9474 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9475 return c 9476} 9477 9478// IfNoneMatch sets the optional parameter which makes the operation 9479// fail if the object's ETag matches the given value. This is useful for 9480// getting updates only after the object has changed since the last 9481// request. Use googleapi.IsNotModified to check whether the response 9482// error from Do is the result of In-None-Match. 9483func (c *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForSeriesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForSeriesCall { 9484 c.ifNoneMatch_ = entityTag 9485 return c 9486} 9487 9488// Context sets the context to be used in this call's Do method. Any 9489// pending HTTP request will be aborted if the provided context is 9490// canceled. 9491func (c *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForSeriesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForSeriesCall { 9492 c.ctx_ = ctx 9493 return c 9494} 9495 9496// Header returns an http.Header that can be modified by the caller to 9497// add HTTP headers to the request. 9498func (c *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForSeriesCall) Header() http.Header { 9499 if c.header_ == nil { 9500 c.header_ = make(http.Header) 9501 } 9502 return c.header_ 9503} 9504 9505func (c *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForSeriesCall) doRequest(alt string) (*http.Response, error) { 9506 reqHeaders := make(http.Header) 9507 for k, v := range c.header_ { 9508 reqHeaders[k] = v 9509 } 9510 reqHeaders.Set("User-Agent", c.s.userAgent()) 9511 if c.ifNoneMatch_ != "" { 9512 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9513 } 9514 var body io.Reader = nil 9515 c.urlParams_.Set("alt", alt) 9516 c.urlParams_.Set("prettyPrint", "false") 9517 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}") 9518 urls += "?" + c.urlParams_.Encode() 9519 req, err := http.NewRequest("GET", urls, body) 9520 if err != nil { 9521 return nil, err 9522 } 9523 req.Header = reqHeaders 9524 googleapi.Expand(req.URL, map[string]string{ 9525 "parent": c.parent, 9526 "dicomWebPath": c.dicomWebPath, 9527 }) 9528 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9529} 9530 9531// Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.searchForSeries" call. 9532func (c *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForSeriesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 9533 gensupport.SetOptions(c.urlParams_, opts...) 9534 return c.doRequest("") 9535 // { 9536 // "description": "SearchForSeries returns a list of matching series. See\nhttp://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.6.", 9537 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/series", 9538 // "httpMethod": "GET", 9539 // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.searchForSeries", 9540 // "parameterOrder": [ 9541 // "parent", 9542 // "dicomWebPath" 9543 // ], 9544 // "parameters": { 9545 // "dicomWebPath": { 9546 // "description": "The path of the SearchForSeries DICOMweb request(e.g., `series` or\n`studies/{study_uid}/series`).", 9547 // "location": "path", 9548 // "pattern": "^series$", 9549 // "required": true, 9550 // "type": "string" 9551 // }, 9552 // "parent": { 9553 // "description": "The name of the DICOM store that is being accessed (e.g.,\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`).", 9554 // "location": "path", 9555 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 9556 // "required": true, 9557 // "type": "string" 9558 // } 9559 // }, 9560 // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}", 9561 // "response": { 9562 // "$ref": "HttpBody" 9563 // }, 9564 // "scopes": [ 9565 // "https://www.googleapis.com/auth/cloud-platform" 9566 // ] 9567 // } 9568 9569} 9570 9571// method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.searchForStudies": 9572 9573type ProjectsLocationsDatasetsDicomStoresDicomWebSearchForStudiesCall struct { 9574 s *Service 9575 parent string 9576 dicomWebPath string 9577 urlParams_ gensupport.URLParams 9578 ifNoneMatch_ string 9579 ctx_ context.Context 9580 header_ http.Header 9581} 9582 9583// SearchForStudies: SearchForStudies returns a list of matching 9584// studies. 9585// See 9586// http://dicom.nema.org/medical/dicom/current/output/html/part18.htm 9587// l#sect_10.6. 9588func (r *ProjectsLocationsDatasetsDicomStoresDicomWebService) SearchForStudies(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForStudiesCall { 9589 c := &ProjectsLocationsDatasetsDicomStoresDicomWebSearchForStudiesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9590 c.parent = parent 9591 c.dicomWebPath = dicomWebPath 9592 return c 9593} 9594 9595// Fields allows partial responses to be retrieved. See 9596// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9597// for more information. 9598func (c *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForStudiesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForStudiesCall { 9599 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9600 return c 9601} 9602 9603// IfNoneMatch sets the optional parameter which makes the operation 9604// fail if the object's ETag matches the given value. This is useful for 9605// getting updates only after the object has changed since the last 9606// request. Use googleapi.IsNotModified to check whether the response 9607// error from Do is the result of In-None-Match. 9608func (c *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForStudiesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForStudiesCall { 9609 c.ifNoneMatch_ = entityTag 9610 return c 9611} 9612 9613// Context sets the context to be used in this call's Do method. Any 9614// pending HTTP request will be aborted if the provided context is 9615// canceled. 9616func (c *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForStudiesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForStudiesCall { 9617 c.ctx_ = ctx 9618 return c 9619} 9620 9621// Header returns an http.Header that can be modified by the caller to 9622// add HTTP headers to the request. 9623func (c *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForStudiesCall) Header() http.Header { 9624 if c.header_ == nil { 9625 c.header_ = make(http.Header) 9626 } 9627 return c.header_ 9628} 9629 9630func (c *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForStudiesCall) doRequest(alt string) (*http.Response, error) { 9631 reqHeaders := make(http.Header) 9632 for k, v := range c.header_ { 9633 reqHeaders[k] = v 9634 } 9635 reqHeaders.Set("User-Agent", c.s.userAgent()) 9636 if c.ifNoneMatch_ != "" { 9637 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9638 } 9639 var body io.Reader = nil 9640 c.urlParams_.Set("alt", alt) 9641 c.urlParams_.Set("prettyPrint", "false") 9642 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}") 9643 urls += "?" + c.urlParams_.Encode() 9644 req, err := http.NewRequest("GET", urls, body) 9645 if err != nil { 9646 return nil, err 9647 } 9648 req.Header = reqHeaders 9649 googleapi.Expand(req.URL, map[string]string{ 9650 "parent": c.parent, 9651 "dicomWebPath": c.dicomWebPath, 9652 }) 9653 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9654} 9655 9656// Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.searchForStudies" call. 9657func (c *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForStudiesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 9658 gensupport.SetOptions(c.urlParams_, opts...) 9659 return c.doRequest("") 9660 // { 9661 // "description": "SearchForStudies returns a list of matching studies. See\nhttp://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.6.", 9662 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies", 9663 // "httpMethod": "GET", 9664 // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.searchForStudies", 9665 // "parameterOrder": [ 9666 // "parent", 9667 // "dicomWebPath" 9668 // ], 9669 // "parameters": { 9670 // "dicomWebPath": { 9671 // "description": "The path of the SearchForStudies DICOMweb request (e.g., `studies`).", 9672 // "location": "path", 9673 // "pattern": "^studies$", 9674 // "required": true, 9675 // "type": "string" 9676 // }, 9677 // "parent": { 9678 // "description": "The name of the DICOM store that is being accessed (e.g.,\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`).", 9679 // "location": "path", 9680 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 9681 // "required": true, 9682 // "type": "string" 9683 // } 9684 // }, 9685 // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}", 9686 // "response": { 9687 // "$ref": "HttpBody" 9688 // }, 9689 // "scopes": [ 9690 // "https://www.googleapis.com/auth/cloud-platform" 9691 // ] 9692 // } 9693 9694} 9695 9696// method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.storeInstances": 9697 9698type ProjectsLocationsDatasetsDicomStoresDicomWebStoreInstancesCall struct { 9699 s *Service 9700 parent string 9701 dicomWebPath string 9702 body_ io.Reader 9703 urlParams_ gensupport.URLParams 9704 ctx_ context.Context 9705 header_ http.Header 9706} 9707 9708// StoreInstances: StoreInstances stores DICOM instances associated with 9709// study instance unique 9710// identifiers (SUID). 9711// See 9712// http://dicom.nema.org/medical/dicom/current/output/html/part18.htm 9713// l#sect_10.5. 9714func (r *ProjectsLocationsDatasetsDicomStoresDicomWebService) StoreInstances(parent string, dicomWebPath string, body_ io.Reader) *ProjectsLocationsDatasetsDicomStoresDicomWebStoreInstancesCall { 9715 c := &ProjectsLocationsDatasetsDicomStoresDicomWebStoreInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9716 c.parent = parent 9717 c.dicomWebPath = dicomWebPath 9718 c.body_ = body_ 9719 return c 9720} 9721 9722// Fields allows partial responses to be retrieved. See 9723// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9724// for more information. 9725func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStoreInstancesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStoreInstancesCall { 9726 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9727 return c 9728} 9729 9730// Context sets the context to be used in this call's Do method. Any 9731// pending HTTP request will be aborted if the provided context is 9732// canceled. 9733func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStoreInstancesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStoreInstancesCall { 9734 c.ctx_ = ctx 9735 return c 9736} 9737 9738// Header returns an http.Header that can be modified by the caller to 9739// add HTTP headers to the request. 9740func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStoreInstancesCall) Header() http.Header { 9741 if c.header_ == nil { 9742 c.header_ = make(http.Header) 9743 } 9744 return c.header_ 9745} 9746 9747func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStoreInstancesCall) doRequest(alt string) (*http.Response, error) { 9748 reqHeaders := make(http.Header) 9749 for k, v := range c.header_ { 9750 reqHeaders[k] = v 9751 } 9752 reqHeaders.Set("User-Agent", c.s.userAgent()) 9753 var body io.Reader = nil 9754 body = c.body_ 9755 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}") 9756 urls += "?" + c.urlParams_.Encode() 9757 req, err := http.NewRequest("POST", urls, body) 9758 if err != nil { 9759 return nil, err 9760 } 9761 req.Header = reqHeaders 9762 googleapi.Expand(req.URL, map[string]string{ 9763 "parent": c.parent, 9764 "dicomWebPath": c.dicomWebPath, 9765 }) 9766 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9767} 9768 9769// Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.storeInstances" call. 9770func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStoreInstancesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 9771 gensupport.SetOptions(c.urlParams_, opts...) 9772 return c.doRequest("") 9773 // { 9774 // "description": "StoreInstances stores DICOM instances associated with study instance unique\nidentifiers (SUID). See\nhttp://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.5.", 9775 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies", 9776 // "httpMethod": "POST", 9777 // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.storeInstances", 9778 // "parameterOrder": [ 9779 // "parent", 9780 // "dicomWebPath" 9781 // ], 9782 // "parameters": { 9783 // "dicomWebPath": { 9784 // "description": "The path of the StoreInstances DICOMweb request (e.g.,\n`studies/[{study_id}]`). Note that the `study_uid` is optional.", 9785 // "location": "path", 9786 // "pattern": "^studies$", 9787 // "required": true, 9788 // "type": "string" 9789 // }, 9790 // "parent": { 9791 // "description": "The name of the DICOM store that is being accessed (e.g.,\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`).", 9792 // "location": "path", 9793 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 9794 // "required": true, 9795 // "type": "string" 9796 // } 9797 // }, 9798 // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}", 9799 // "request": { 9800 // "$ref": "HttpBody" 9801 // }, 9802 // "response": { 9803 // "$ref": "HttpBody" 9804 // }, 9805 // "scopes": [ 9806 // "https://www.googleapis.com/auth/cloud-platform" 9807 // ] 9808 // } 9809 9810} 9811 9812// method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.delete": 9813 9814type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesDeleteCall struct { 9815 s *Service 9816 parent string 9817 dicomWebPath string 9818 urlParams_ gensupport.URLParams 9819 ctx_ context.Context 9820 header_ http.Header 9821} 9822 9823// Delete: DeleteStudy deletes all instances within the given study. 9824// Delete requests 9825// are equivalent to the GET requests specified in the WADO-RS standard. 9826func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesService) Delete(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesDeleteCall { 9827 c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9828 c.parent = parent 9829 c.dicomWebPath = dicomWebPath 9830 return c 9831} 9832 9833// Fields allows partial responses to be retrieved. See 9834// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9835// for more information. 9836func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesDeleteCall { 9837 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9838 return c 9839} 9840 9841// Context sets the context to be used in this call's Do method. Any 9842// pending HTTP request will be aborted if the provided context is 9843// canceled. 9844func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesDeleteCall { 9845 c.ctx_ = ctx 9846 return c 9847} 9848 9849// Header returns an http.Header that can be modified by the caller to 9850// add HTTP headers to the request. 9851func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesDeleteCall) Header() http.Header { 9852 if c.header_ == nil { 9853 c.header_ = make(http.Header) 9854 } 9855 return c.header_ 9856} 9857 9858func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesDeleteCall) doRequest(alt string) (*http.Response, error) { 9859 reqHeaders := make(http.Header) 9860 for k, v := range c.header_ { 9861 reqHeaders[k] = v 9862 } 9863 reqHeaders.Set("User-Agent", c.s.userAgent()) 9864 var body io.Reader = nil 9865 c.urlParams_.Set("alt", alt) 9866 c.urlParams_.Set("prettyPrint", "false") 9867 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}") 9868 urls += "?" + c.urlParams_.Encode() 9869 req, err := http.NewRequest("DELETE", urls, body) 9870 if err != nil { 9871 return nil, err 9872 } 9873 req.Header = reqHeaders 9874 googleapi.Expand(req.URL, map[string]string{ 9875 "parent": c.parent, 9876 "dicomWebPath": c.dicomWebPath, 9877 }) 9878 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9879} 9880 9881// Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.delete" call. 9882// Exactly one of *Empty or error will be non-nil. Any non-2xx status 9883// code is an error. Response headers are in either 9884// *Empty.ServerResponse.Header or (if a response was returned at all) 9885// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 9886// check whether the returned error was because http.StatusNotModified 9887// was returned. 9888func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 9889 gensupport.SetOptions(c.urlParams_, opts...) 9890 res, err := c.doRequest("json") 9891 if res != nil && res.StatusCode == http.StatusNotModified { 9892 if res.Body != nil { 9893 res.Body.Close() 9894 } 9895 return nil, &googleapi.Error{ 9896 Code: res.StatusCode, 9897 Header: res.Header, 9898 } 9899 } 9900 if err != nil { 9901 return nil, err 9902 } 9903 defer googleapi.CloseBody(res) 9904 if err := googleapi.CheckResponse(res); err != nil { 9905 return nil, err 9906 } 9907 ret := &Empty{ 9908 ServerResponse: googleapi.ServerResponse{ 9909 Header: res.Header, 9910 HTTPStatusCode: res.StatusCode, 9911 }, 9912 } 9913 target := &ret 9914 if err := gensupport.DecodeResponse(target, res); err != nil { 9915 return nil, err 9916 } 9917 return ret, nil 9918 // { 9919 // "description": "DeleteStudy deletes all instances within the given study. Delete requests\nare equivalent to the GET requests specified in the WADO-RS standard.", 9920 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}", 9921 // "httpMethod": "DELETE", 9922 // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.delete", 9923 // "parameterOrder": [ 9924 // "parent", 9925 // "dicomWebPath" 9926 // ], 9927 // "parameters": { 9928 // "dicomWebPath": { 9929 // "description": "The path of the DeleteStudy request (e.g., `studies/{study_id}`).", 9930 // "location": "path", 9931 // "pattern": "^studies/[^/]+$", 9932 // "required": true, 9933 // "type": "string" 9934 // }, 9935 // "parent": { 9936 // "description": "The name of the DICOM store that is being accessed (e.g.,\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`).", 9937 // "location": "path", 9938 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 9939 // "required": true, 9940 // "type": "string" 9941 // } 9942 // }, 9943 // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}", 9944 // "response": { 9945 // "$ref": "Empty" 9946 // }, 9947 // "scopes": [ 9948 // "https://www.googleapis.com/auth/cloud-platform" 9949 // ] 9950 // } 9951 9952} 9953 9954// method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.metadata": 9955 9956type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesMetadataCall struct { 9957 s *Service 9958 parent string 9959 dicomWebPath string 9960 urlParams_ gensupport.URLParams 9961 ifNoneMatch_ string 9962 ctx_ context.Context 9963 header_ http.Header 9964} 9965 9966// Metadata: RetrieveStudyMetadata returns instance associated with the 9967// given study 9968// presented as metadata with the bulk data removed. 9969// See 9970// http://dicom.nema.org/medical/dicom/current/output/html/part18.htm 9971// l#sect_10.4. 9972func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesService) Metadata(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesMetadataCall { 9973 c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9974 c.parent = parent 9975 c.dicomWebPath = dicomWebPath 9976 return c 9977} 9978 9979// Fields allows partial responses to be retrieved. See 9980// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9981// for more information. 9982func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesMetadataCall { 9983 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9984 return c 9985} 9986 9987// IfNoneMatch sets the optional parameter which makes the operation 9988// fail if the object's ETag matches the given value. This is useful for 9989// getting updates only after the object has changed since the last 9990// request. Use googleapi.IsNotModified to check whether the response 9991// error from Do is the result of In-None-Match. 9992func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesMetadataCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesMetadataCall { 9993 c.ifNoneMatch_ = entityTag 9994 return c 9995} 9996 9997// Context sets the context to be used in this call's Do method. Any 9998// pending HTTP request will be aborted if the provided context is 9999// canceled. 10000func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesMetadataCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesMetadataCall { 10001 c.ctx_ = ctx 10002 return c 10003} 10004 10005// Header returns an http.Header that can be modified by the caller to 10006// add HTTP headers to the request. 10007func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesMetadataCall) Header() http.Header { 10008 if c.header_ == nil { 10009 c.header_ = make(http.Header) 10010 } 10011 return c.header_ 10012} 10013 10014func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesMetadataCall) doRequest(alt string) (*http.Response, error) { 10015 reqHeaders := make(http.Header) 10016 for k, v := range c.header_ { 10017 reqHeaders[k] = v 10018 } 10019 reqHeaders.Set("User-Agent", c.s.userAgent()) 10020 if c.ifNoneMatch_ != "" { 10021 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10022 } 10023 var body io.Reader = nil 10024 c.urlParams_.Set("alt", alt) 10025 c.urlParams_.Set("prettyPrint", "false") 10026 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}") 10027 urls += "?" + c.urlParams_.Encode() 10028 req, err := http.NewRequest("GET", urls, body) 10029 if err != nil { 10030 return nil, err 10031 } 10032 req.Header = reqHeaders 10033 googleapi.Expand(req.URL, map[string]string{ 10034 "parent": c.parent, 10035 "dicomWebPath": c.dicomWebPath, 10036 }) 10037 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10038} 10039 10040// Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.metadata" call. 10041func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesMetadataCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 10042 gensupport.SetOptions(c.urlParams_, opts...) 10043 return c.doRequest("") 10044 // { 10045 // "description": "RetrieveStudyMetadata returns instance associated with the given study\npresented as metadata with the bulk data removed. See\nhttp://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4.", 10046 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/metadata", 10047 // "httpMethod": "GET", 10048 // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.metadata", 10049 // "parameterOrder": [ 10050 // "parent", 10051 // "dicomWebPath" 10052 // ], 10053 // "parameters": { 10054 // "dicomWebPath": { 10055 // "description": "The path of the RetrieveStudyMetadata DICOMweb request (e.g.,\n`studies/{study_id}/metadata`).", 10056 // "location": "path", 10057 // "pattern": "^studies/[^/]+/metadata$", 10058 // "required": true, 10059 // "type": "string" 10060 // }, 10061 // "parent": { 10062 // "description": "The name of the DICOM store that is being accessed (e.g.,\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`).", 10063 // "location": "path", 10064 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 10065 // "required": true, 10066 // "type": "string" 10067 // } 10068 // }, 10069 // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}", 10070 // "response": { 10071 // "$ref": "HttpBody" 10072 // }, 10073 // "scopes": [ 10074 // "https://www.googleapis.com/auth/cloud-platform" 10075 // ] 10076 // } 10077 10078} 10079 10080// method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.retrieveStudy": 10081 10082type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesRetrieveStudyCall struct { 10083 s *Service 10084 parent string 10085 dicomWebPath string 10086 urlParams_ gensupport.URLParams 10087 ifNoneMatch_ string 10088 ctx_ context.Context 10089 header_ http.Header 10090} 10091 10092// RetrieveStudy: RetrieveStudy returns all instances within the given 10093// study. 10094// See 10095// http://dicom.nema.org/medical/dicom/current/output/html/part18.htm 10096// l#sect_10.4. 10097func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesService) RetrieveStudy(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesRetrieveStudyCall { 10098 c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesRetrieveStudyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10099 c.parent = parent 10100 c.dicomWebPath = dicomWebPath 10101 return c 10102} 10103 10104// Fields allows partial responses to be retrieved. See 10105// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10106// for more information. 10107func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesRetrieveStudyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesRetrieveStudyCall { 10108 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10109 return c 10110} 10111 10112// IfNoneMatch sets the optional parameter which makes the operation 10113// fail if the object's ETag matches the given value. This is useful for 10114// getting updates only after the object has changed since the last 10115// request. Use googleapi.IsNotModified to check whether the response 10116// error from Do is the result of In-None-Match. 10117func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesRetrieveStudyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesRetrieveStudyCall { 10118 c.ifNoneMatch_ = entityTag 10119 return c 10120} 10121 10122// Context sets the context to be used in this call's Do method. Any 10123// pending HTTP request will be aborted if the provided context is 10124// canceled. 10125func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesRetrieveStudyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesRetrieveStudyCall { 10126 c.ctx_ = ctx 10127 return c 10128} 10129 10130// Header returns an http.Header that can be modified by the caller to 10131// add HTTP headers to the request. 10132func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesRetrieveStudyCall) Header() http.Header { 10133 if c.header_ == nil { 10134 c.header_ = make(http.Header) 10135 } 10136 return c.header_ 10137} 10138 10139func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesRetrieveStudyCall) doRequest(alt string) (*http.Response, error) { 10140 reqHeaders := make(http.Header) 10141 for k, v := range c.header_ { 10142 reqHeaders[k] = v 10143 } 10144 reqHeaders.Set("User-Agent", c.s.userAgent()) 10145 if c.ifNoneMatch_ != "" { 10146 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10147 } 10148 var body io.Reader = nil 10149 c.urlParams_.Set("alt", alt) 10150 c.urlParams_.Set("prettyPrint", "false") 10151 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}") 10152 urls += "?" + c.urlParams_.Encode() 10153 req, err := http.NewRequest("GET", urls, body) 10154 if err != nil { 10155 return nil, err 10156 } 10157 req.Header = reqHeaders 10158 googleapi.Expand(req.URL, map[string]string{ 10159 "parent": c.parent, 10160 "dicomWebPath": c.dicomWebPath, 10161 }) 10162 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10163} 10164 10165// Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.retrieveStudy" call. 10166func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesRetrieveStudyCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 10167 gensupport.SetOptions(c.urlParams_, opts...) 10168 return c.doRequest("") 10169 // { 10170 // "description": "RetrieveStudy returns all instances within the given study. See\nhttp://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4.", 10171 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}", 10172 // "httpMethod": "GET", 10173 // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.retrieveStudy", 10174 // "parameterOrder": [ 10175 // "parent", 10176 // "dicomWebPath" 10177 // ], 10178 // "parameters": { 10179 // "dicomWebPath": { 10180 // "description": "The path of the RetrieveStudy DICOMweb request (e.g.,\n`studies/{study_id}`).", 10181 // "location": "path", 10182 // "pattern": "^studies/[^/]+$", 10183 // "required": true, 10184 // "type": "string" 10185 // }, 10186 // "parent": { 10187 // "description": "The name of the DICOM store that is being accessed (e.g.,\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`).", 10188 // "location": "path", 10189 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 10190 // "required": true, 10191 // "type": "string" 10192 // } 10193 // }, 10194 // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}", 10195 // "response": { 10196 // "$ref": "HttpBody" 10197 // }, 10198 // "scopes": [ 10199 // "https://www.googleapis.com/auth/cloud-platform" 10200 // ] 10201 // } 10202 10203} 10204 10205// method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.searchForInstances": 10206 10207type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForInstancesCall struct { 10208 s *Service 10209 parent string 10210 dicomWebPath string 10211 urlParams_ gensupport.URLParams 10212 ifNoneMatch_ string 10213 ctx_ context.Context 10214 header_ http.Header 10215} 10216 10217// SearchForInstances: SearchForInstances returns a list of matching 10218// instances. 10219// See 10220// http://dicom.nema.org/medical/dicom/current/output/html/part18.htm 10221// l#sect_10.6. 10222func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesService) SearchForInstances(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForInstancesCall { 10223 c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10224 c.parent = parent 10225 c.dicomWebPath = dicomWebPath 10226 return c 10227} 10228 10229// Fields allows partial responses to be retrieved. See 10230// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10231// for more information. 10232func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForInstancesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForInstancesCall { 10233 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10234 return c 10235} 10236 10237// IfNoneMatch sets the optional parameter which makes the operation 10238// fail if the object's ETag matches the given value. This is useful for 10239// getting updates only after the object has changed since the last 10240// request. Use googleapi.IsNotModified to check whether the response 10241// error from Do is the result of In-None-Match. 10242func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForInstancesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForInstancesCall { 10243 c.ifNoneMatch_ = entityTag 10244 return c 10245} 10246 10247// Context sets the context to be used in this call's Do method. Any 10248// pending HTTP request will be aborted if the provided context is 10249// canceled. 10250func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForInstancesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForInstancesCall { 10251 c.ctx_ = ctx 10252 return c 10253} 10254 10255// Header returns an http.Header that can be modified by the caller to 10256// add HTTP headers to the request. 10257func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForInstancesCall) Header() http.Header { 10258 if c.header_ == nil { 10259 c.header_ = make(http.Header) 10260 } 10261 return c.header_ 10262} 10263 10264func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForInstancesCall) doRequest(alt string) (*http.Response, error) { 10265 reqHeaders := make(http.Header) 10266 for k, v := range c.header_ { 10267 reqHeaders[k] = v 10268 } 10269 reqHeaders.Set("User-Agent", c.s.userAgent()) 10270 if c.ifNoneMatch_ != "" { 10271 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10272 } 10273 var body io.Reader = nil 10274 c.urlParams_.Set("alt", alt) 10275 c.urlParams_.Set("prettyPrint", "false") 10276 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}") 10277 urls += "?" + c.urlParams_.Encode() 10278 req, err := http.NewRequest("GET", urls, body) 10279 if err != nil { 10280 return nil, err 10281 } 10282 req.Header = reqHeaders 10283 googleapi.Expand(req.URL, map[string]string{ 10284 "parent": c.parent, 10285 "dicomWebPath": c.dicomWebPath, 10286 }) 10287 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10288} 10289 10290// Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.searchForInstances" call. 10291func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForInstancesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 10292 gensupport.SetOptions(c.urlParams_, opts...) 10293 return c.doRequest("") 10294 // { 10295 // "description": "SearchForInstances returns a list of matching instances. See\nhttp://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.6.", 10296 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/instances", 10297 // "httpMethod": "GET", 10298 // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.searchForInstances", 10299 // "parameterOrder": [ 10300 // "parent", 10301 // "dicomWebPath" 10302 // ], 10303 // "parameters": { 10304 // "dicomWebPath": { 10305 // "description": "The path of the SearchForInstancesRequest DICOMweb request (e.g.,\n`instances` or `series/{series_uid}/instances` or\n`studies/{study_uid}/instances`).", 10306 // "location": "path", 10307 // "pattern": "^studies/[^/]+/instances$", 10308 // "required": true, 10309 // "type": "string" 10310 // }, 10311 // "parent": { 10312 // "description": "The name of the DICOM store that is being accessed (e.g.,\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`).", 10313 // "location": "path", 10314 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 10315 // "required": true, 10316 // "type": "string" 10317 // } 10318 // }, 10319 // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}", 10320 // "response": { 10321 // "$ref": "HttpBody" 10322 // }, 10323 // "scopes": [ 10324 // "https://www.googleapis.com/auth/cloud-platform" 10325 // ] 10326 // } 10327 10328} 10329 10330// method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.searchForSeries": 10331 10332type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForSeriesCall struct { 10333 s *Service 10334 parent string 10335 dicomWebPath string 10336 urlParams_ gensupport.URLParams 10337 ifNoneMatch_ string 10338 ctx_ context.Context 10339 header_ http.Header 10340} 10341 10342// SearchForSeries: SearchForSeries returns a list of matching series. 10343// See 10344// http://dicom.nema.org/medical/dicom/current/output/html/part18.htm 10345// l#sect_10.6. 10346func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesService) SearchForSeries(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForSeriesCall { 10347 c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForSeriesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10348 c.parent = parent 10349 c.dicomWebPath = dicomWebPath 10350 return c 10351} 10352 10353// Fields allows partial responses to be retrieved. See 10354// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10355// for more information. 10356func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForSeriesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForSeriesCall { 10357 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10358 return c 10359} 10360 10361// IfNoneMatch sets the optional parameter which makes the operation 10362// fail if the object's ETag matches the given value. This is useful for 10363// getting updates only after the object has changed since the last 10364// request. Use googleapi.IsNotModified to check whether the response 10365// error from Do is the result of In-None-Match. 10366func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForSeriesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForSeriesCall { 10367 c.ifNoneMatch_ = entityTag 10368 return c 10369} 10370 10371// Context sets the context to be used in this call's Do method. Any 10372// pending HTTP request will be aborted if the provided context is 10373// canceled. 10374func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForSeriesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForSeriesCall { 10375 c.ctx_ = ctx 10376 return c 10377} 10378 10379// Header returns an http.Header that can be modified by the caller to 10380// add HTTP headers to the request. 10381func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForSeriesCall) Header() http.Header { 10382 if c.header_ == nil { 10383 c.header_ = make(http.Header) 10384 } 10385 return c.header_ 10386} 10387 10388func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForSeriesCall) doRequest(alt string) (*http.Response, error) { 10389 reqHeaders := make(http.Header) 10390 for k, v := range c.header_ { 10391 reqHeaders[k] = v 10392 } 10393 reqHeaders.Set("User-Agent", c.s.userAgent()) 10394 if c.ifNoneMatch_ != "" { 10395 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10396 } 10397 var body io.Reader = nil 10398 c.urlParams_.Set("alt", alt) 10399 c.urlParams_.Set("prettyPrint", "false") 10400 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}") 10401 urls += "?" + c.urlParams_.Encode() 10402 req, err := http.NewRequest("GET", urls, body) 10403 if err != nil { 10404 return nil, err 10405 } 10406 req.Header = reqHeaders 10407 googleapi.Expand(req.URL, map[string]string{ 10408 "parent": c.parent, 10409 "dicomWebPath": c.dicomWebPath, 10410 }) 10411 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10412} 10413 10414// Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.searchForSeries" call. 10415func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForSeriesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 10416 gensupport.SetOptions(c.urlParams_, opts...) 10417 return c.doRequest("") 10418 // { 10419 // "description": "SearchForSeries returns a list of matching series. See\nhttp://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.6.", 10420 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series", 10421 // "httpMethod": "GET", 10422 // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.searchForSeries", 10423 // "parameterOrder": [ 10424 // "parent", 10425 // "dicomWebPath" 10426 // ], 10427 // "parameters": { 10428 // "dicomWebPath": { 10429 // "description": "The path of the SearchForSeries DICOMweb request(e.g., `series` or\n`studies/{study_uid}/series`).", 10430 // "location": "path", 10431 // "pattern": "^studies/[^/]+/series$", 10432 // "required": true, 10433 // "type": "string" 10434 // }, 10435 // "parent": { 10436 // "description": "The name of the DICOM store that is being accessed (e.g.,\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`).", 10437 // "location": "path", 10438 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 10439 // "required": true, 10440 // "type": "string" 10441 // } 10442 // }, 10443 // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}", 10444 // "response": { 10445 // "$ref": "HttpBody" 10446 // }, 10447 // "scopes": [ 10448 // "https://www.googleapis.com/auth/cloud-platform" 10449 // ] 10450 // } 10451 10452} 10453 10454// method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.storeInstances": 10455 10456type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesStoreInstancesCall struct { 10457 s *Service 10458 parent string 10459 dicomWebPath string 10460 body_ io.Reader 10461 urlParams_ gensupport.URLParams 10462 ctx_ context.Context 10463 header_ http.Header 10464} 10465 10466// StoreInstances: StoreInstances stores DICOM instances associated with 10467// study instance unique 10468// identifiers (SUID). 10469// See 10470// http://dicom.nema.org/medical/dicom/current/output/html/part18.htm 10471// l#sect_10.5. 10472func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesService) StoreInstances(parent string, dicomWebPath string, body_ io.Reader) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesStoreInstancesCall { 10473 c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesStoreInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10474 c.parent = parent 10475 c.dicomWebPath = dicomWebPath 10476 c.body_ = body_ 10477 return c 10478} 10479 10480// Fields allows partial responses to be retrieved. See 10481// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10482// for more information. 10483func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesStoreInstancesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesStoreInstancesCall { 10484 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10485 return c 10486} 10487 10488// Context sets the context to be used in this call's Do method. Any 10489// pending HTTP request will be aborted if the provided context is 10490// canceled. 10491func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesStoreInstancesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesStoreInstancesCall { 10492 c.ctx_ = ctx 10493 return c 10494} 10495 10496// Header returns an http.Header that can be modified by the caller to 10497// add HTTP headers to the request. 10498func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesStoreInstancesCall) Header() http.Header { 10499 if c.header_ == nil { 10500 c.header_ = make(http.Header) 10501 } 10502 return c.header_ 10503} 10504 10505func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesStoreInstancesCall) doRequest(alt string) (*http.Response, error) { 10506 reqHeaders := make(http.Header) 10507 for k, v := range c.header_ { 10508 reqHeaders[k] = v 10509 } 10510 reqHeaders.Set("User-Agent", c.s.userAgent()) 10511 var body io.Reader = nil 10512 body = c.body_ 10513 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}") 10514 urls += "?" + c.urlParams_.Encode() 10515 req, err := http.NewRequest("POST", urls, body) 10516 if err != nil { 10517 return nil, err 10518 } 10519 req.Header = reqHeaders 10520 googleapi.Expand(req.URL, map[string]string{ 10521 "parent": c.parent, 10522 "dicomWebPath": c.dicomWebPath, 10523 }) 10524 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10525} 10526 10527// Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.storeInstances" call. 10528func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesStoreInstancesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 10529 gensupport.SetOptions(c.urlParams_, opts...) 10530 return c.doRequest("") 10531 // { 10532 // "description": "StoreInstances stores DICOM instances associated with study instance unique\nidentifiers (SUID). See\nhttp://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.5.", 10533 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}", 10534 // "httpMethod": "POST", 10535 // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.storeInstances", 10536 // "parameterOrder": [ 10537 // "parent", 10538 // "dicomWebPath" 10539 // ], 10540 // "parameters": { 10541 // "dicomWebPath": { 10542 // "description": "The path of the StoreInstances DICOMweb request (e.g.,\n`studies/[{study_id}]`). Note that the `study_uid` is optional.", 10543 // "location": "path", 10544 // "pattern": "^studies/[^/]+$", 10545 // "required": true, 10546 // "type": "string" 10547 // }, 10548 // "parent": { 10549 // "description": "The name of the DICOM store that is being accessed (e.g.,\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`).", 10550 // "location": "path", 10551 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 10552 // "required": true, 10553 // "type": "string" 10554 // } 10555 // }, 10556 // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}", 10557 // "request": { 10558 // "$ref": "HttpBody" 10559 // }, 10560 // "response": { 10561 // "$ref": "HttpBody" 10562 // }, 10563 // "scopes": [ 10564 // "https://www.googleapis.com/auth/cloud-platform" 10565 // ] 10566 // } 10567 10568} 10569 10570// method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.delete": 10571 10572type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesDeleteCall struct { 10573 s *Service 10574 parent string 10575 dicomWebPath string 10576 urlParams_ gensupport.URLParams 10577 ctx_ context.Context 10578 header_ http.Header 10579} 10580 10581// Delete: DeleteSeries deletes all instances within the given study and 10582// series. 10583// Delete requests are equivalent to the GET requests specified in the 10584// WADO-RS 10585// standard. 10586func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesService) Delete(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesDeleteCall { 10587 c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10588 c.parent = parent 10589 c.dicomWebPath = dicomWebPath 10590 return c 10591} 10592 10593// Fields allows partial responses to be retrieved. See 10594// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10595// for more information. 10596func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesDeleteCall { 10597 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10598 return c 10599} 10600 10601// Context sets the context to be used in this call's Do method. Any 10602// pending HTTP request will be aborted if the provided context is 10603// canceled. 10604func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesDeleteCall { 10605 c.ctx_ = ctx 10606 return c 10607} 10608 10609// Header returns an http.Header that can be modified by the caller to 10610// add HTTP headers to the request. 10611func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesDeleteCall) Header() http.Header { 10612 if c.header_ == nil { 10613 c.header_ = make(http.Header) 10614 } 10615 return c.header_ 10616} 10617 10618func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesDeleteCall) doRequest(alt string) (*http.Response, error) { 10619 reqHeaders := make(http.Header) 10620 for k, v := range c.header_ { 10621 reqHeaders[k] = v 10622 } 10623 reqHeaders.Set("User-Agent", c.s.userAgent()) 10624 var body io.Reader = nil 10625 c.urlParams_.Set("alt", alt) 10626 c.urlParams_.Set("prettyPrint", "false") 10627 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}") 10628 urls += "?" + c.urlParams_.Encode() 10629 req, err := http.NewRequest("DELETE", urls, body) 10630 if err != nil { 10631 return nil, err 10632 } 10633 req.Header = reqHeaders 10634 googleapi.Expand(req.URL, map[string]string{ 10635 "parent": c.parent, 10636 "dicomWebPath": c.dicomWebPath, 10637 }) 10638 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10639} 10640 10641// Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.delete" call. 10642// Exactly one of *Empty or error will be non-nil. Any non-2xx status 10643// code is an error. Response headers are in either 10644// *Empty.ServerResponse.Header or (if a response was returned at all) 10645// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 10646// check whether the returned error was because http.StatusNotModified 10647// was returned. 10648func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 10649 gensupport.SetOptions(c.urlParams_, opts...) 10650 res, err := c.doRequest("json") 10651 if res != nil && res.StatusCode == http.StatusNotModified { 10652 if res.Body != nil { 10653 res.Body.Close() 10654 } 10655 return nil, &googleapi.Error{ 10656 Code: res.StatusCode, 10657 Header: res.Header, 10658 } 10659 } 10660 if err != nil { 10661 return nil, err 10662 } 10663 defer googleapi.CloseBody(res) 10664 if err := googleapi.CheckResponse(res); err != nil { 10665 return nil, err 10666 } 10667 ret := &Empty{ 10668 ServerResponse: googleapi.ServerResponse{ 10669 Header: res.Header, 10670 HTTPStatusCode: res.StatusCode, 10671 }, 10672 } 10673 target := &ret 10674 if err := gensupport.DecodeResponse(target, res); err != nil { 10675 return nil, err 10676 } 10677 return ret, nil 10678 // { 10679 // "description": "DeleteSeries deletes all instances within the given study and series.\nDelete requests are equivalent to the GET requests specified in the WADO-RS\nstandard.", 10680 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series/{seriesId}", 10681 // "httpMethod": "DELETE", 10682 // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.delete", 10683 // "parameterOrder": [ 10684 // "parent", 10685 // "dicomWebPath" 10686 // ], 10687 // "parameters": { 10688 // "dicomWebPath": { 10689 // "description": "The path of the DeleteSeries request (e.g.,\n`studies/{study_id}/series/{series_id}`).", 10690 // "location": "path", 10691 // "pattern": "^studies/[^/]+/series/[^/]+$", 10692 // "required": true, 10693 // "type": "string" 10694 // }, 10695 // "parent": { 10696 // "description": "The name of the DICOM store that is being accessed (e.g.,\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`).", 10697 // "location": "path", 10698 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 10699 // "required": true, 10700 // "type": "string" 10701 // } 10702 // }, 10703 // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}", 10704 // "response": { 10705 // "$ref": "Empty" 10706 // }, 10707 // "scopes": [ 10708 // "https://www.googleapis.com/auth/cloud-platform" 10709 // ] 10710 // } 10711 10712} 10713 10714// method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.metadata": 10715 10716type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesMetadataCall struct { 10717 s *Service 10718 parent string 10719 dicomWebPath string 10720 urlParams_ gensupport.URLParams 10721 ifNoneMatch_ string 10722 ctx_ context.Context 10723 header_ http.Header 10724} 10725 10726// Metadata: RetrieveSeriesMetadata returns instance associated with the 10727// given study and 10728// series, presented as metadata with the bulk data removed. 10729// See 10730// http://dicom.nema.org/medical/dicom/current/output/html/part18.htm 10731// l#sect_10.4. 10732func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesService) Metadata(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesMetadataCall { 10733 c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10734 c.parent = parent 10735 c.dicomWebPath = dicomWebPath 10736 return c 10737} 10738 10739// Fields allows partial responses to be retrieved. See 10740// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10741// for more information. 10742func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesMetadataCall { 10743 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10744 return c 10745} 10746 10747// IfNoneMatch sets the optional parameter which makes the operation 10748// fail if the object's ETag matches the given value. This is useful for 10749// getting updates only after the object has changed since the last 10750// request. Use googleapi.IsNotModified to check whether the response 10751// error from Do is the result of In-None-Match. 10752func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesMetadataCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesMetadataCall { 10753 c.ifNoneMatch_ = entityTag 10754 return c 10755} 10756 10757// Context sets the context to be used in this call's Do method. Any 10758// pending HTTP request will be aborted if the provided context is 10759// canceled. 10760func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesMetadataCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesMetadataCall { 10761 c.ctx_ = ctx 10762 return c 10763} 10764 10765// Header returns an http.Header that can be modified by the caller to 10766// add HTTP headers to the request. 10767func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesMetadataCall) Header() http.Header { 10768 if c.header_ == nil { 10769 c.header_ = make(http.Header) 10770 } 10771 return c.header_ 10772} 10773 10774func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesMetadataCall) doRequest(alt string) (*http.Response, error) { 10775 reqHeaders := make(http.Header) 10776 for k, v := range c.header_ { 10777 reqHeaders[k] = v 10778 } 10779 reqHeaders.Set("User-Agent", c.s.userAgent()) 10780 if c.ifNoneMatch_ != "" { 10781 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10782 } 10783 var body io.Reader = nil 10784 c.urlParams_.Set("alt", alt) 10785 c.urlParams_.Set("prettyPrint", "false") 10786 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}") 10787 urls += "?" + c.urlParams_.Encode() 10788 req, err := http.NewRequest("GET", urls, body) 10789 if err != nil { 10790 return nil, err 10791 } 10792 req.Header = reqHeaders 10793 googleapi.Expand(req.URL, map[string]string{ 10794 "parent": c.parent, 10795 "dicomWebPath": c.dicomWebPath, 10796 }) 10797 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10798} 10799 10800// Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.metadata" call. 10801func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesMetadataCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 10802 gensupport.SetOptions(c.urlParams_, opts...) 10803 return c.doRequest("") 10804 // { 10805 // "description": "RetrieveSeriesMetadata returns instance associated with the given study and\nseries, presented as metadata with the bulk data removed. See\nhttp://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4.", 10806 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series/{seriesId}/metadata", 10807 // "httpMethod": "GET", 10808 // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.metadata", 10809 // "parameterOrder": [ 10810 // "parent", 10811 // "dicomWebPath" 10812 // ], 10813 // "parameters": { 10814 // "dicomWebPath": { 10815 // "description": "The path of the RetrieveSeriesMetadata DICOMweb request (e.g.,\n`studies/{study_id}/series/{series_id}/metadata`).", 10816 // "location": "path", 10817 // "pattern": "^studies/[^/]+/series/[^/]+/metadata$", 10818 // "required": true, 10819 // "type": "string" 10820 // }, 10821 // "parent": { 10822 // "description": "The name of the DICOM store that is being accessed (e.g.,\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`).", 10823 // "location": "path", 10824 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 10825 // "required": true, 10826 // "type": "string" 10827 // } 10828 // }, 10829 // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}", 10830 // "response": { 10831 // "$ref": "HttpBody" 10832 // }, 10833 // "scopes": [ 10834 // "https://www.googleapis.com/auth/cloud-platform" 10835 // ] 10836 // } 10837 10838} 10839 10840// method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.retrieveSeries": 10841 10842type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesRetrieveSeriesCall struct { 10843 s *Service 10844 parent string 10845 dicomWebPath string 10846 urlParams_ gensupport.URLParams 10847 ifNoneMatch_ string 10848 ctx_ context.Context 10849 header_ http.Header 10850} 10851 10852// RetrieveSeries: RetrieveSeries returns all instances within the given 10853// study and series. 10854// See 10855// http://dicom.nema.org/medical/dicom/current/output/html/part18.htm 10856// l#sect_10.4. 10857func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesService) RetrieveSeries(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesRetrieveSeriesCall { 10858 c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesRetrieveSeriesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10859 c.parent = parent 10860 c.dicomWebPath = dicomWebPath 10861 return c 10862} 10863 10864// Fields allows partial responses to be retrieved. See 10865// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10866// for more information. 10867func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesRetrieveSeriesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesRetrieveSeriesCall { 10868 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10869 return c 10870} 10871 10872// IfNoneMatch sets the optional parameter which makes the operation 10873// fail if the object's ETag matches the given value. This is useful for 10874// getting updates only after the object has changed since the last 10875// request. Use googleapi.IsNotModified to check whether the response 10876// error from Do is the result of In-None-Match. 10877func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesRetrieveSeriesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesRetrieveSeriesCall { 10878 c.ifNoneMatch_ = entityTag 10879 return c 10880} 10881 10882// Context sets the context to be used in this call's Do method. Any 10883// pending HTTP request will be aborted if the provided context is 10884// canceled. 10885func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesRetrieveSeriesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesRetrieveSeriesCall { 10886 c.ctx_ = ctx 10887 return c 10888} 10889 10890// Header returns an http.Header that can be modified by the caller to 10891// add HTTP headers to the request. 10892func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesRetrieveSeriesCall) Header() http.Header { 10893 if c.header_ == nil { 10894 c.header_ = make(http.Header) 10895 } 10896 return c.header_ 10897} 10898 10899func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesRetrieveSeriesCall) doRequest(alt string) (*http.Response, error) { 10900 reqHeaders := make(http.Header) 10901 for k, v := range c.header_ { 10902 reqHeaders[k] = v 10903 } 10904 reqHeaders.Set("User-Agent", c.s.userAgent()) 10905 if c.ifNoneMatch_ != "" { 10906 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10907 } 10908 var body io.Reader = nil 10909 c.urlParams_.Set("alt", alt) 10910 c.urlParams_.Set("prettyPrint", "false") 10911 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}") 10912 urls += "?" + c.urlParams_.Encode() 10913 req, err := http.NewRequest("GET", urls, body) 10914 if err != nil { 10915 return nil, err 10916 } 10917 req.Header = reqHeaders 10918 googleapi.Expand(req.URL, map[string]string{ 10919 "parent": c.parent, 10920 "dicomWebPath": c.dicomWebPath, 10921 }) 10922 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10923} 10924 10925// Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.retrieveSeries" call. 10926func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesRetrieveSeriesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 10927 gensupport.SetOptions(c.urlParams_, opts...) 10928 return c.doRequest("") 10929 // { 10930 // "description": "RetrieveSeries returns all instances within the given study and series. See\nhttp://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4.", 10931 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series/{seriesId}", 10932 // "httpMethod": "GET", 10933 // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.retrieveSeries", 10934 // "parameterOrder": [ 10935 // "parent", 10936 // "dicomWebPath" 10937 // ], 10938 // "parameters": { 10939 // "dicomWebPath": { 10940 // "description": "The path of the RetrieveSeries DICOMweb request (e.g.,\n`studies/{study_id}/series/{series_id}`).", 10941 // "location": "path", 10942 // "pattern": "^studies/[^/]+/series/[^/]+$", 10943 // "required": true, 10944 // "type": "string" 10945 // }, 10946 // "parent": { 10947 // "description": "The name of the DICOM store that is being accessed (e.g.,\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`).", 10948 // "location": "path", 10949 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 10950 // "required": true, 10951 // "type": "string" 10952 // } 10953 // }, 10954 // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}", 10955 // "response": { 10956 // "$ref": "HttpBody" 10957 // }, 10958 // "scopes": [ 10959 // "https://www.googleapis.com/auth/cloud-platform" 10960 // ] 10961 // } 10962 10963} 10964 10965// method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.searchForInstances": 10966 10967type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesSearchForInstancesCall struct { 10968 s *Service 10969 parent string 10970 dicomWebPath string 10971 urlParams_ gensupport.URLParams 10972 ifNoneMatch_ string 10973 ctx_ context.Context 10974 header_ http.Header 10975} 10976 10977// SearchForInstances: SearchForInstances returns a list of matching 10978// instances. 10979// See 10980// http://dicom.nema.org/medical/dicom/current/output/html/part18.htm 10981// l#sect_10.6. 10982func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesService) SearchForInstances(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesSearchForInstancesCall { 10983 c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesSearchForInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10984 c.parent = parent 10985 c.dicomWebPath = dicomWebPath 10986 return c 10987} 10988 10989// Fields allows partial responses to be retrieved. See 10990// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10991// for more information. 10992func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesSearchForInstancesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesSearchForInstancesCall { 10993 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10994 return c 10995} 10996 10997// IfNoneMatch sets the optional parameter which makes the operation 10998// fail if the object's ETag matches the given value. This is useful for 10999// getting updates only after the object has changed since the last 11000// request. Use googleapi.IsNotModified to check whether the response 11001// error from Do is the result of In-None-Match. 11002func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesSearchForInstancesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesSearchForInstancesCall { 11003 c.ifNoneMatch_ = entityTag 11004 return c 11005} 11006 11007// Context sets the context to be used in this call's Do method. Any 11008// pending HTTP request will be aborted if the provided context is 11009// canceled. 11010func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesSearchForInstancesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesSearchForInstancesCall { 11011 c.ctx_ = ctx 11012 return c 11013} 11014 11015// Header returns an http.Header that can be modified by the caller to 11016// add HTTP headers to the request. 11017func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesSearchForInstancesCall) Header() http.Header { 11018 if c.header_ == nil { 11019 c.header_ = make(http.Header) 11020 } 11021 return c.header_ 11022} 11023 11024func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesSearchForInstancesCall) doRequest(alt string) (*http.Response, error) { 11025 reqHeaders := make(http.Header) 11026 for k, v := range c.header_ { 11027 reqHeaders[k] = v 11028 } 11029 reqHeaders.Set("User-Agent", c.s.userAgent()) 11030 if c.ifNoneMatch_ != "" { 11031 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11032 } 11033 var body io.Reader = nil 11034 c.urlParams_.Set("alt", alt) 11035 c.urlParams_.Set("prettyPrint", "false") 11036 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}") 11037 urls += "?" + c.urlParams_.Encode() 11038 req, err := http.NewRequest("GET", urls, body) 11039 if err != nil { 11040 return nil, err 11041 } 11042 req.Header = reqHeaders 11043 googleapi.Expand(req.URL, map[string]string{ 11044 "parent": c.parent, 11045 "dicomWebPath": c.dicomWebPath, 11046 }) 11047 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11048} 11049 11050// Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.searchForInstances" call. 11051func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesSearchForInstancesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 11052 gensupport.SetOptions(c.urlParams_, opts...) 11053 return c.doRequest("") 11054 // { 11055 // "description": "SearchForInstances returns a list of matching instances. See\nhttp://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.6.", 11056 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series/{seriesId}/instances", 11057 // "httpMethod": "GET", 11058 // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.searchForInstances", 11059 // "parameterOrder": [ 11060 // "parent", 11061 // "dicomWebPath" 11062 // ], 11063 // "parameters": { 11064 // "dicomWebPath": { 11065 // "description": "The path of the SearchForInstancesRequest DICOMweb request (e.g.,\n`instances` or `series/{series_uid}/instances` or\n`studies/{study_uid}/instances`).", 11066 // "location": "path", 11067 // "pattern": "^studies/[^/]+/series/[^/]+/instances$", 11068 // "required": true, 11069 // "type": "string" 11070 // }, 11071 // "parent": { 11072 // "description": "The name of the DICOM store that is being accessed (e.g.,\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`).", 11073 // "location": "path", 11074 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 11075 // "required": true, 11076 // "type": "string" 11077 // } 11078 // }, 11079 // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}", 11080 // "response": { 11081 // "$ref": "HttpBody" 11082 // }, 11083 // "scopes": [ 11084 // "https://www.googleapis.com/auth/cloud-platform" 11085 // ] 11086 // } 11087 11088} 11089 11090// method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.delete": 11091 11092type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesDeleteCall struct { 11093 s *Service 11094 parent string 11095 dicomWebPath string 11096 urlParams_ gensupport.URLParams 11097 ctx_ context.Context 11098 header_ http.Header 11099} 11100 11101// Delete: DeleteInstance deletes an instance associated with the given 11102// study, series, 11103// and SOP Instance UID. Delete requests are equivalent to the GET 11104// requests 11105// specified in the WADO-RS standard. 11106func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesService) Delete(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesDeleteCall { 11107 c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11108 c.parent = parent 11109 c.dicomWebPath = dicomWebPath 11110 return c 11111} 11112 11113// Fields allows partial responses to be retrieved. See 11114// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11115// for more information. 11116func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesDeleteCall { 11117 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11118 return c 11119} 11120 11121// Context sets the context to be used in this call's Do method. Any 11122// pending HTTP request will be aborted if the provided context is 11123// canceled. 11124func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesDeleteCall { 11125 c.ctx_ = ctx 11126 return c 11127} 11128 11129// Header returns an http.Header that can be modified by the caller to 11130// add HTTP headers to the request. 11131func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesDeleteCall) Header() http.Header { 11132 if c.header_ == nil { 11133 c.header_ = make(http.Header) 11134 } 11135 return c.header_ 11136} 11137 11138func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesDeleteCall) doRequest(alt string) (*http.Response, error) { 11139 reqHeaders := make(http.Header) 11140 for k, v := range c.header_ { 11141 reqHeaders[k] = v 11142 } 11143 reqHeaders.Set("User-Agent", c.s.userAgent()) 11144 var body io.Reader = nil 11145 c.urlParams_.Set("alt", alt) 11146 c.urlParams_.Set("prettyPrint", "false") 11147 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}") 11148 urls += "?" + c.urlParams_.Encode() 11149 req, err := http.NewRequest("DELETE", urls, body) 11150 if err != nil { 11151 return nil, err 11152 } 11153 req.Header = reqHeaders 11154 googleapi.Expand(req.URL, map[string]string{ 11155 "parent": c.parent, 11156 "dicomWebPath": c.dicomWebPath, 11157 }) 11158 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11159} 11160 11161// Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.delete" call. 11162// Exactly one of *Empty or error will be non-nil. Any non-2xx status 11163// code is an error. Response headers are in either 11164// *Empty.ServerResponse.Header or (if a response was returned at all) 11165// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 11166// check whether the returned error was because http.StatusNotModified 11167// was returned. 11168func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 11169 gensupport.SetOptions(c.urlParams_, opts...) 11170 res, err := c.doRequest("json") 11171 if res != nil && res.StatusCode == http.StatusNotModified { 11172 if res.Body != nil { 11173 res.Body.Close() 11174 } 11175 return nil, &googleapi.Error{ 11176 Code: res.StatusCode, 11177 Header: res.Header, 11178 } 11179 } 11180 if err != nil { 11181 return nil, err 11182 } 11183 defer googleapi.CloseBody(res) 11184 if err := googleapi.CheckResponse(res); err != nil { 11185 return nil, err 11186 } 11187 ret := &Empty{ 11188 ServerResponse: googleapi.ServerResponse{ 11189 Header: res.Header, 11190 HTTPStatusCode: res.StatusCode, 11191 }, 11192 } 11193 target := &ret 11194 if err := gensupport.DecodeResponse(target, res); err != nil { 11195 return nil, err 11196 } 11197 return ret, nil 11198 // { 11199 // "description": "DeleteInstance deletes an instance associated with the given study, series,\nand SOP Instance UID. Delete requests are equivalent to the GET requests\nspecified in the WADO-RS standard.", 11200 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series/{seriesId}/instances/{instancesId}", 11201 // "httpMethod": "DELETE", 11202 // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.delete", 11203 // "parameterOrder": [ 11204 // "parent", 11205 // "dicomWebPath" 11206 // ], 11207 // "parameters": { 11208 // "dicomWebPath": { 11209 // "description": "The path of the DeleteInstance request (e.g.,\n`studies/{study_id}/series/{series_id}/instances/{instance_id}`).", 11210 // "location": "path", 11211 // "pattern": "^studies/[^/]+/series/[^/]+/instances/[^/]+$", 11212 // "required": true, 11213 // "type": "string" 11214 // }, 11215 // "parent": { 11216 // "description": "The name of the DICOM store that is being accessed (e.g.,\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`).", 11217 // "location": "path", 11218 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 11219 // "required": true, 11220 // "type": "string" 11221 // } 11222 // }, 11223 // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}", 11224 // "response": { 11225 // "$ref": "Empty" 11226 // }, 11227 // "scopes": [ 11228 // "https://www.googleapis.com/auth/cloud-platform" 11229 // ] 11230 // } 11231 11232} 11233 11234// method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.metadata": 11235 11236type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesMetadataCall struct { 11237 s *Service 11238 parent string 11239 dicomWebPath string 11240 urlParams_ gensupport.URLParams 11241 ifNoneMatch_ string 11242 ctx_ context.Context 11243 header_ http.Header 11244} 11245 11246// Metadata: RetrieveInstanceMetadata returns instance associated with 11247// the given study, 11248// series, and SOP Instance UID presented as metadata with the bulk 11249// data 11250// removed. 11251// See 11252// http://dicom.nema.org/medical/dicom/current/output/html/part18.htm 11253// l#sect_10.4. 11254func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesService) Metadata(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesMetadataCall { 11255 c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11256 c.parent = parent 11257 c.dicomWebPath = dicomWebPath 11258 return c 11259} 11260 11261// Fields allows partial responses to be retrieved. See 11262// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11263// for more information. 11264func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesMetadataCall { 11265 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11266 return c 11267} 11268 11269// IfNoneMatch sets the optional parameter which makes the operation 11270// fail if the object's ETag matches the given value. This is useful for 11271// getting updates only after the object has changed since the last 11272// request. Use googleapi.IsNotModified to check whether the response 11273// error from Do is the result of In-None-Match. 11274func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesMetadataCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesMetadataCall { 11275 c.ifNoneMatch_ = entityTag 11276 return c 11277} 11278 11279// Context sets the context to be used in this call's Do method. Any 11280// pending HTTP request will be aborted if the provided context is 11281// canceled. 11282func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesMetadataCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesMetadataCall { 11283 c.ctx_ = ctx 11284 return c 11285} 11286 11287// Header returns an http.Header that can be modified by the caller to 11288// add HTTP headers to the request. 11289func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesMetadataCall) Header() http.Header { 11290 if c.header_ == nil { 11291 c.header_ = make(http.Header) 11292 } 11293 return c.header_ 11294} 11295 11296func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesMetadataCall) doRequest(alt string) (*http.Response, error) { 11297 reqHeaders := make(http.Header) 11298 for k, v := range c.header_ { 11299 reqHeaders[k] = v 11300 } 11301 reqHeaders.Set("User-Agent", c.s.userAgent()) 11302 if c.ifNoneMatch_ != "" { 11303 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11304 } 11305 var body io.Reader = nil 11306 c.urlParams_.Set("alt", alt) 11307 c.urlParams_.Set("prettyPrint", "false") 11308 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}") 11309 urls += "?" + c.urlParams_.Encode() 11310 req, err := http.NewRequest("GET", urls, body) 11311 if err != nil { 11312 return nil, err 11313 } 11314 req.Header = reqHeaders 11315 googleapi.Expand(req.URL, map[string]string{ 11316 "parent": c.parent, 11317 "dicomWebPath": c.dicomWebPath, 11318 }) 11319 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11320} 11321 11322// Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.metadata" call. 11323func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesMetadataCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 11324 gensupport.SetOptions(c.urlParams_, opts...) 11325 return c.doRequest("") 11326 // { 11327 // "description": "RetrieveInstanceMetadata returns instance associated with the given study,\nseries, and SOP Instance UID presented as metadata with the bulk data\nremoved. See\nhttp://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4.", 11328 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series/{seriesId}/instances/{instancesId}/metadata", 11329 // "httpMethod": "GET", 11330 // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.metadata", 11331 // "parameterOrder": [ 11332 // "parent", 11333 // "dicomWebPath" 11334 // ], 11335 // "parameters": { 11336 // "dicomWebPath": { 11337 // "description": "The path of the RetrieveInstanceMetadata DICOMweb request (e.g.,\n`studies/{study_id}/series/{series_id}/instances/{instance_id}/metadata`).", 11338 // "location": "path", 11339 // "pattern": "^studies/[^/]+/series/[^/]+/instances/[^/]+/metadata$", 11340 // "required": true, 11341 // "type": "string" 11342 // }, 11343 // "parent": { 11344 // "description": "The name of the DICOM store that is being accessed (e.g.,\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`).", 11345 // "location": "path", 11346 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 11347 // "required": true, 11348 // "type": "string" 11349 // } 11350 // }, 11351 // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}", 11352 // "response": { 11353 // "$ref": "HttpBody" 11354 // }, 11355 // "scopes": [ 11356 // "https://www.googleapis.com/auth/cloud-platform" 11357 // ] 11358 // } 11359 11360} 11361 11362// method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.rendered": 11363 11364type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRenderedCall struct { 11365 s *Service 11366 parent string 11367 dicomWebPath string 11368 urlParams_ gensupport.URLParams 11369 ifNoneMatch_ string 11370 ctx_ context.Context 11371 header_ http.Header 11372} 11373 11374// Rendered: RetrieveRenderedInstance returns instance associated with 11375// the given study, 11376// series, and SOP Instance UID in an acceptable Rendered Media Type. 11377// See 11378// http://dicom.nema.org/medical/dicom/current/output/html/part18.htm 11379// l#sect_10.4. 11380func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesService) Rendered(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRenderedCall { 11381 c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRenderedCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11382 c.parent = parent 11383 c.dicomWebPath = dicomWebPath 11384 return c 11385} 11386 11387// Fields allows partial responses to be retrieved. See 11388// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11389// for more information. 11390func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRenderedCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRenderedCall { 11391 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11392 return c 11393} 11394 11395// IfNoneMatch sets the optional parameter which makes the operation 11396// fail if the object's ETag matches the given value. This is useful for 11397// getting updates only after the object has changed since the last 11398// request. Use googleapi.IsNotModified to check whether the response 11399// error from Do is the result of In-None-Match. 11400func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRenderedCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRenderedCall { 11401 c.ifNoneMatch_ = entityTag 11402 return c 11403} 11404 11405// Context sets the context to be used in this call's Do method. Any 11406// pending HTTP request will be aborted if the provided context is 11407// canceled. 11408func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRenderedCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRenderedCall { 11409 c.ctx_ = ctx 11410 return c 11411} 11412 11413// Header returns an http.Header that can be modified by the caller to 11414// add HTTP headers to the request. 11415func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRenderedCall) Header() http.Header { 11416 if c.header_ == nil { 11417 c.header_ = make(http.Header) 11418 } 11419 return c.header_ 11420} 11421 11422func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRenderedCall) doRequest(alt string) (*http.Response, error) { 11423 reqHeaders := make(http.Header) 11424 for k, v := range c.header_ { 11425 reqHeaders[k] = v 11426 } 11427 reqHeaders.Set("User-Agent", c.s.userAgent()) 11428 if c.ifNoneMatch_ != "" { 11429 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11430 } 11431 var body io.Reader = nil 11432 c.urlParams_.Set("alt", alt) 11433 c.urlParams_.Set("prettyPrint", "false") 11434 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}") 11435 urls += "?" + c.urlParams_.Encode() 11436 req, err := http.NewRequest("GET", urls, body) 11437 if err != nil { 11438 return nil, err 11439 } 11440 req.Header = reqHeaders 11441 googleapi.Expand(req.URL, map[string]string{ 11442 "parent": c.parent, 11443 "dicomWebPath": c.dicomWebPath, 11444 }) 11445 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11446} 11447 11448// Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.rendered" call. 11449func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRenderedCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 11450 gensupport.SetOptions(c.urlParams_, opts...) 11451 return c.doRequest("") 11452 // { 11453 // "description": "RetrieveRenderedInstance returns instance associated with the given study,\nseries, and SOP Instance UID in an acceptable Rendered Media Type. See\nhttp://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4.", 11454 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series/{seriesId}/instances/{instancesId}/rendered", 11455 // "httpMethod": "GET", 11456 // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.rendered", 11457 // "parameterOrder": [ 11458 // "parent", 11459 // "dicomWebPath" 11460 // ], 11461 // "parameters": { 11462 // "dicomWebPath": { 11463 // "description": "The path of the RetrieveRenderedInstance DICOMweb request (e.g.,\n`studies/{study_id}/series/{series_id}/instances/{instance_id}/rendered`).", 11464 // "location": "path", 11465 // "pattern": "^studies/[^/]+/series/[^/]+/instances/[^/]+/rendered$", 11466 // "required": true, 11467 // "type": "string" 11468 // }, 11469 // "parent": { 11470 // "description": "The name of the DICOM store that is being accessed (e.g.,\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`).", 11471 // "location": "path", 11472 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 11473 // "required": true, 11474 // "type": "string" 11475 // } 11476 // }, 11477 // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}", 11478 // "response": { 11479 // "$ref": "HttpBody" 11480 // }, 11481 // "scopes": [ 11482 // "https://www.googleapis.com/auth/cloud-platform" 11483 // ] 11484 // } 11485 11486} 11487 11488// method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.retrieveInstance": 11489 11490type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRetrieveInstanceCall struct { 11491 s *Service 11492 parent string 11493 dicomWebPath string 11494 urlParams_ gensupport.URLParams 11495 ifNoneMatch_ string 11496 ctx_ context.Context 11497 header_ http.Header 11498} 11499 11500// RetrieveInstance: RetrieveInstance returns instance associated with 11501// the given study, series, 11502// and SOP Instance UID. 11503// See 11504// http://dicom.nema.org/medical/dicom/current/output/html/part18.htm 11505// l#sect_10.4. 11506func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesService) RetrieveInstance(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRetrieveInstanceCall { 11507 c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRetrieveInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11508 c.parent = parent 11509 c.dicomWebPath = dicomWebPath 11510 return c 11511} 11512 11513// Fields allows partial responses to be retrieved. See 11514// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11515// for more information. 11516func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRetrieveInstanceCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRetrieveInstanceCall { 11517 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11518 return c 11519} 11520 11521// IfNoneMatch sets the optional parameter which makes the operation 11522// fail if the object's ETag matches the given value. This is useful for 11523// getting updates only after the object has changed since the last 11524// request. Use googleapi.IsNotModified to check whether the response 11525// error from Do is the result of In-None-Match. 11526func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRetrieveInstanceCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRetrieveInstanceCall { 11527 c.ifNoneMatch_ = entityTag 11528 return c 11529} 11530 11531// Context sets the context to be used in this call's Do method. Any 11532// pending HTTP request will be aborted if the provided context is 11533// canceled. 11534func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRetrieveInstanceCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRetrieveInstanceCall { 11535 c.ctx_ = ctx 11536 return c 11537} 11538 11539// Header returns an http.Header that can be modified by the caller to 11540// add HTTP headers to the request. 11541func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRetrieveInstanceCall) Header() http.Header { 11542 if c.header_ == nil { 11543 c.header_ = make(http.Header) 11544 } 11545 return c.header_ 11546} 11547 11548func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRetrieveInstanceCall) doRequest(alt string) (*http.Response, error) { 11549 reqHeaders := make(http.Header) 11550 for k, v := range c.header_ { 11551 reqHeaders[k] = v 11552 } 11553 reqHeaders.Set("User-Agent", c.s.userAgent()) 11554 if c.ifNoneMatch_ != "" { 11555 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11556 } 11557 var body io.Reader = nil 11558 c.urlParams_.Set("alt", alt) 11559 c.urlParams_.Set("prettyPrint", "false") 11560 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}") 11561 urls += "?" + c.urlParams_.Encode() 11562 req, err := http.NewRequest("GET", urls, body) 11563 if err != nil { 11564 return nil, err 11565 } 11566 req.Header = reqHeaders 11567 googleapi.Expand(req.URL, map[string]string{ 11568 "parent": c.parent, 11569 "dicomWebPath": c.dicomWebPath, 11570 }) 11571 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11572} 11573 11574// Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.retrieveInstance" call. 11575func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRetrieveInstanceCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 11576 gensupport.SetOptions(c.urlParams_, opts...) 11577 return c.doRequest("") 11578 // { 11579 // "description": "RetrieveInstance returns instance associated with the given study, series,\nand SOP Instance UID. See\nhttp://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4.", 11580 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series/{seriesId}/instances/{instancesId}", 11581 // "httpMethod": "GET", 11582 // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.retrieveInstance", 11583 // "parameterOrder": [ 11584 // "parent", 11585 // "dicomWebPath" 11586 // ], 11587 // "parameters": { 11588 // "dicomWebPath": { 11589 // "description": "The path of the RetrieveInstance DICOMweb request (e.g.,\n`studies/{study_id}/series/{series_id}/instances/{instance_id}`).", 11590 // "location": "path", 11591 // "pattern": "^studies/[^/]+/series/[^/]+/instances/[^/]+$", 11592 // "required": true, 11593 // "type": "string" 11594 // }, 11595 // "parent": { 11596 // "description": "The name of the DICOM store that is being accessed (e.g.,\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`).", 11597 // "location": "path", 11598 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 11599 // "required": true, 11600 // "type": "string" 11601 // } 11602 // }, 11603 // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}", 11604 // "response": { 11605 // "$ref": "HttpBody" 11606 // }, 11607 // "scopes": [ 11608 // "https://www.googleapis.com/auth/cloud-platform" 11609 // ] 11610 // } 11611 11612} 11613 11614// method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.frames.rendered": 11615 11616type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRenderedCall struct { 11617 s *Service 11618 parent string 11619 dicomWebPath string 11620 urlParams_ gensupport.URLParams 11621 ifNoneMatch_ string 11622 ctx_ context.Context 11623 header_ http.Header 11624} 11625 11626// Rendered: RetrieveRenderedFrames returns instances associated with 11627// the given study, 11628// series, SOP Instance UID and frame numbers in an acceptable Rendered 11629// Media 11630// Type. 11631// See 11632// http://dicom.nema.org/medical/dicom/current/output/html/part18.htm 11633// l#sect_10.4. 11634func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesService) Rendered(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRenderedCall { 11635 c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRenderedCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11636 c.parent = parent 11637 c.dicomWebPath = dicomWebPath 11638 return c 11639} 11640 11641// Fields allows partial responses to be retrieved. See 11642// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11643// for more information. 11644func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRenderedCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRenderedCall { 11645 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11646 return c 11647} 11648 11649// IfNoneMatch sets the optional parameter which makes the operation 11650// fail if the object's ETag matches the given value. This is useful for 11651// getting updates only after the object has changed since the last 11652// request. Use googleapi.IsNotModified to check whether the response 11653// error from Do is the result of In-None-Match. 11654func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRenderedCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRenderedCall { 11655 c.ifNoneMatch_ = entityTag 11656 return c 11657} 11658 11659// Context sets the context to be used in this call's Do method. Any 11660// pending HTTP request will be aborted if the provided context is 11661// canceled. 11662func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRenderedCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRenderedCall { 11663 c.ctx_ = ctx 11664 return c 11665} 11666 11667// Header returns an http.Header that can be modified by the caller to 11668// add HTTP headers to the request. 11669func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRenderedCall) Header() http.Header { 11670 if c.header_ == nil { 11671 c.header_ = make(http.Header) 11672 } 11673 return c.header_ 11674} 11675 11676func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRenderedCall) doRequest(alt string) (*http.Response, error) { 11677 reqHeaders := make(http.Header) 11678 for k, v := range c.header_ { 11679 reqHeaders[k] = v 11680 } 11681 reqHeaders.Set("User-Agent", c.s.userAgent()) 11682 if c.ifNoneMatch_ != "" { 11683 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11684 } 11685 var body io.Reader = nil 11686 c.urlParams_.Set("alt", alt) 11687 c.urlParams_.Set("prettyPrint", "false") 11688 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}") 11689 urls += "?" + c.urlParams_.Encode() 11690 req, err := http.NewRequest("GET", urls, body) 11691 if err != nil { 11692 return nil, err 11693 } 11694 req.Header = reqHeaders 11695 googleapi.Expand(req.URL, map[string]string{ 11696 "parent": c.parent, 11697 "dicomWebPath": c.dicomWebPath, 11698 }) 11699 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11700} 11701 11702// Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.frames.rendered" call. 11703func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRenderedCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 11704 gensupport.SetOptions(c.urlParams_, opts...) 11705 return c.doRequest("") 11706 // { 11707 // "description": "RetrieveRenderedFrames returns instances associated with the given study,\nseries, SOP Instance UID and frame numbers in an acceptable Rendered Media\nType. See\nhttp://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4.", 11708 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series/{seriesId}/instances/{instancesId}/frames/{framesId}/rendered", 11709 // "httpMethod": "GET", 11710 // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.frames.rendered", 11711 // "parameterOrder": [ 11712 // "parent", 11713 // "dicomWebPath" 11714 // ], 11715 // "parameters": { 11716 // "dicomWebPath": { 11717 // "description": "The path of the RetrieveRenderedFrames DICOMweb request (e.g.,\n`studies/{study_id}/series/{series_id}/instances/{instance_id}/frames/{frame_list}/rendered`).", 11718 // "location": "path", 11719 // "pattern": "^studies/[^/]+/series/[^/]+/instances/[^/]+/frames/[^/]+/rendered$", 11720 // "required": true, 11721 // "type": "string" 11722 // }, 11723 // "parent": { 11724 // "description": "The name of the DICOM store that is being accessed (e.g.,\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`).", 11725 // "location": "path", 11726 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 11727 // "required": true, 11728 // "type": "string" 11729 // } 11730 // }, 11731 // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}", 11732 // "response": { 11733 // "$ref": "HttpBody" 11734 // }, 11735 // "scopes": [ 11736 // "https://www.googleapis.com/auth/cloud-platform" 11737 // ] 11738 // } 11739 11740} 11741 11742// method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.frames.retrieveFrames": 11743 11744type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRetrieveFramesCall struct { 11745 s *Service 11746 parent string 11747 dicomWebPath string 11748 urlParams_ gensupport.URLParams 11749 ifNoneMatch_ string 11750 ctx_ context.Context 11751 header_ http.Header 11752} 11753 11754// RetrieveFrames: RetrieveFrames returns instances associated with the 11755// given study, series, 11756// SOP Instance UID and frame numbers. 11757// See 11758// http://dicom.nema.org/medical/dicom/current/output/html/part18.htm 11759// l#sect_10.4. 11760func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesService) RetrieveFrames(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRetrieveFramesCall { 11761 c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRetrieveFramesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11762 c.parent = parent 11763 c.dicomWebPath = dicomWebPath 11764 return c 11765} 11766 11767// Fields allows partial responses to be retrieved. See 11768// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11769// for more information. 11770func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRetrieveFramesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRetrieveFramesCall { 11771 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11772 return c 11773} 11774 11775// IfNoneMatch sets the optional parameter which makes the operation 11776// fail if the object's ETag matches the given value. This is useful for 11777// getting updates only after the object has changed since the last 11778// request. Use googleapi.IsNotModified to check whether the response 11779// error from Do is the result of In-None-Match. 11780func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRetrieveFramesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRetrieveFramesCall { 11781 c.ifNoneMatch_ = entityTag 11782 return c 11783} 11784 11785// Context sets the context to be used in this call's Do method. Any 11786// pending HTTP request will be aborted if the provided context is 11787// canceled. 11788func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRetrieveFramesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRetrieveFramesCall { 11789 c.ctx_ = ctx 11790 return c 11791} 11792 11793// Header returns an http.Header that can be modified by the caller to 11794// add HTTP headers to the request. 11795func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRetrieveFramesCall) Header() http.Header { 11796 if c.header_ == nil { 11797 c.header_ = make(http.Header) 11798 } 11799 return c.header_ 11800} 11801 11802func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRetrieveFramesCall) doRequest(alt string) (*http.Response, error) { 11803 reqHeaders := make(http.Header) 11804 for k, v := range c.header_ { 11805 reqHeaders[k] = v 11806 } 11807 reqHeaders.Set("User-Agent", c.s.userAgent()) 11808 if c.ifNoneMatch_ != "" { 11809 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11810 } 11811 var body io.Reader = nil 11812 c.urlParams_.Set("alt", alt) 11813 c.urlParams_.Set("prettyPrint", "false") 11814 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}") 11815 urls += "?" + c.urlParams_.Encode() 11816 req, err := http.NewRequest("GET", urls, body) 11817 if err != nil { 11818 return nil, err 11819 } 11820 req.Header = reqHeaders 11821 googleapi.Expand(req.URL, map[string]string{ 11822 "parent": c.parent, 11823 "dicomWebPath": c.dicomWebPath, 11824 }) 11825 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11826} 11827 11828// Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.frames.retrieveFrames" call. 11829func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRetrieveFramesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 11830 gensupport.SetOptions(c.urlParams_, opts...) 11831 return c.doRequest("") 11832 // { 11833 // "description": "RetrieveFrames returns instances associated with the given study, series,\nSOP Instance UID and frame numbers. See\nhttp://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4.", 11834 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series/{seriesId}/instances/{instancesId}/frames/{framesId}", 11835 // "httpMethod": "GET", 11836 // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.frames.retrieveFrames", 11837 // "parameterOrder": [ 11838 // "parent", 11839 // "dicomWebPath" 11840 // ], 11841 // "parameters": { 11842 // "dicomWebPath": { 11843 // "description": "The path of the RetrieveFrames DICOMweb request (e.g.,\n`studies/{study_id}/series/{series_id}/instances/{instance_id}/frames/{frame_list}`).", 11844 // "location": "path", 11845 // "pattern": "^studies/[^/]+/series/[^/]+/instances/[^/]+/frames/[^/]+$", 11846 // "required": true, 11847 // "type": "string" 11848 // }, 11849 // "parent": { 11850 // "description": "The name of the DICOM store that is being accessed (e.g.,\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`).", 11851 // "location": "path", 11852 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 11853 // "required": true, 11854 // "type": "string" 11855 // } 11856 // }, 11857 // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}", 11858 // "response": { 11859 // "$ref": "HttpBody" 11860 // }, 11861 // "scopes": [ 11862 // "https://www.googleapis.com/auth/cloud-platform" 11863 // ] 11864 // } 11865 11866} 11867 11868// method id "healthcare.projects.locations.datasets.fhirStores.capabilities": 11869 11870type ProjectsLocationsDatasetsFhirStoresCapabilitiesCall struct { 11871 s *Service 11872 name string 11873 urlParams_ gensupport.URLParams 11874 ifNoneMatch_ string 11875 ctx_ context.Context 11876 header_ http.Header 11877} 11878 11879// Capabilities: Gets the FHIR 11880// [capability 11881// statement](http://hl7.org/implement/standards/fhir/STU3/ca 11882// pabilitystatement.html) 11883// for the store, which contains a description of functionality 11884// supported by 11885// the server. 11886// 11887// Implements the FHIR standard 11888// [capabilities 11889// interaction](http://hl7.org/implement/standards/fhir/STU 11890// 3/http.html#capabilities). 11891// 11892// On success, the response body will contain a JSON-encoded 11893// representation 11894// of a `CapabilityStatement` resource. 11895func (r *ProjectsLocationsDatasetsFhirStoresService) Capabilities(name string) *ProjectsLocationsDatasetsFhirStoresCapabilitiesCall { 11896 c := &ProjectsLocationsDatasetsFhirStoresCapabilitiesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11897 c.name = name 11898 return c 11899} 11900 11901// Fields allows partial responses to be retrieved. See 11902// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11903// for more information. 11904func (c *ProjectsLocationsDatasetsFhirStoresCapabilitiesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresCapabilitiesCall { 11905 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11906 return c 11907} 11908 11909// IfNoneMatch sets the optional parameter which makes the operation 11910// fail if the object's ETag matches the given value. This is useful for 11911// getting updates only after the object has changed since the last 11912// request. Use googleapi.IsNotModified to check whether the response 11913// error from Do is the result of In-None-Match. 11914func (c *ProjectsLocationsDatasetsFhirStoresCapabilitiesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresCapabilitiesCall { 11915 c.ifNoneMatch_ = entityTag 11916 return c 11917} 11918 11919// Context sets the context to be used in this call's Do method. Any 11920// pending HTTP request will be aborted if the provided context is 11921// canceled. 11922func (c *ProjectsLocationsDatasetsFhirStoresCapabilitiesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresCapabilitiesCall { 11923 c.ctx_ = ctx 11924 return c 11925} 11926 11927// Header returns an http.Header that can be modified by the caller to 11928// add HTTP headers to the request. 11929func (c *ProjectsLocationsDatasetsFhirStoresCapabilitiesCall) Header() http.Header { 11930 if c.header_ == nil { 11931 c.header_ = make(http.Header) 11932 } 11933 return c.header_ 11934} 11935 11936func (c *ProjectsLocationsDatasetsFhirStoresCapabilitiesCall) doRequest(alt string) (*http.Response, error) { 11937 reqHeaders := make(http.Header) 11938 for k, v := range c.header_ { 11939 reqHeaders[k] = v 11940 } 11941 reqHeaders.Set("User-Agent", c.s.userAgent()) 11942 if c.ifNoneMatch_ != "" { 11943 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11944 } 11945 var body io.Reader = nil 11946 c.urlParams_.Set("alt", alt) 11947 c.urlParams_.Set("prettyPrint", "false") 11948 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}/metadata") 11949 urls += "?" + c.urlParams_.Encode() 11950 req, err := http.NewRequest("GET", urls, body) 11951 if err != nil { 11952 return nil, err 11953 } 11954 req.Header = reqHeaders 11955 googleapi.Expand(req.URL, map[string]string{ 11956 "name": c.name, 11957 }) 11958 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11959} 11960 11961// Do executes the "healthcare.projects.locations.datasets.fhirStores.capabilities" call. 11962func (c *ProjectsLocationsDatasetsFhirStoresCapabilitiesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 11963 gensupport.SetOptions(c.urlParams_, opts...) 11964 return c.doRequest("") 11965 // { 11966 // "description": "Gets the FHIR [capability\nstatement](http://hl7.org/implement/standards/fhir/STU3/capabilitystatement.html)\nfor the store, which contains a description of functionality supported by\nthe server.\n\nImplements the FHIR standard [capabilities\ninteraction](http://hl7.org/implement/standards/fhir/STU3/http.html#capabilities).\n\nOn success, the response body will contain a JSON-encoded representation\nof a `CapabilityStatement` resource.", 11967 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/metadata", 11968 // "httpMethod": "GET", 11969 // "id": "healthcare.projects.locations.datasets.fhirStores.capabilities", 11970 // "parameterOrder": [ 11971 // "name" 11972 // ], 11973 // "parameters": { 11974 // "name": { 11975 // "description": "Name of the FHIR store to retrieve the capabilities for.", 11976 // "location": "path", 11977 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$", 11978 // "required": true, 11979 // "type": "string" 11980 // } 11981 // }, 11982 // "path": "v1alpha2/{+name}/metadata", 11983 // "response": { 11984 // "$ref": "HttpBody" 11985 // }, 11986 // "scopes": [ 11987 // "https://www.googleapis.com/auth/cloud-platform" 11988 // ] 11989 // } 11990 11991} 11992 11993// method id "healthcare.projects.locations.datasets.fhirStores.create": 11994 11995type ProjectsLocationsDatasetsFhirStoresCreateCall struct { 11996 s *Service 11997 parent string 11998 fhirstore *FhirStore 11999 urlParams_ gensupport.URLParams 12000 ctx_ context.Context 12001 header_ http.Header 12002} 12003 12004// Create: Creates a new FHIR store within the parent dataset. 12005func (r *ProjectsLocationsDatasetsFhirStoresService) Create(parent string, fhirstore *FhirStore) *ProjectsLocationsDatasetsFhirStoresCreateCall { 12006 c := &ProjectsLocationsDatasetsFhirStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12007 c.parent = parent 12008 c.fhirstore = fhirstore 12009 return c 12010} 12011 12012// FhirStoreId sets the optional parameter "fhirStoreId": The ID of the 12013// FHIR store that is being created. 12014// The string must match the following regex: 12015// `[\p{L}\p{N}_\-\.]{1,256}`. 12016func (c *ProjectsLocationsDatasetsFhirStoresCreateCall) FhirStoreId(fhirStoreId string) *ProjectsLocationsDatasetsFhirStoresCreateCall { 12017 c.urlParams_.Set("fhirStoreId", fhirStoreId) 12018 return c 12019} 12020 12021// Fields allows partial responses to be retrieved. See 12022// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12023// for more information. 12024func (c *ProjectsLocationsDatasetsFhirStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresCreateCall { 12025 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12026 return c 12027} 12028 12029// Context sets the context to be used in this call's Do method. Any 12030// pending HTTP request will be aborted if the provided context is 12031// canceled. 12032func (c *ProjectsLocationsDatasetsFhirStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresCreateCall { 12033 c.ctx_ = ctx 12034 return c 12035} 12036 12037// Header returns an http.Header that can be modified by the caller to 12038// add HTTP headers to the request. 12039func (c *ProjectsLocationsDatasetsFhirStoresCreateCall) Header() http.Header { 12040 if c.header_ == nil { 12041 c.header_ = make(http.Header) 12042 } 12043 return c.header_ 12044} 12045 12046func (c *ProjectsLocationsDatasetsFhirStoresCreateCall) doRequest(alt string) (*http.Response, error) { 12047 reqHeaders := make(http.Header) 12048 for k, v := range c.header_ { 12049 reqHeaders[k] = v 12050 } 12051 reqHeaders.Set("User-Agent", c.s.userAgent()) 12052 var body io.Reader = nil 12053 body, err := googleapi.WithoutDataWrapper.JSONReader(c.fhirstore) 12054 if err != nil { 12055 return nil, err 12056 } 12057 reqHeaders.Set("Content-Type", "application/json") 12058 c.urlParams_.Set("alt", alt) 12059 c.urlParams_.Set("prettyPrint", "false") 12060 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/fhirStores") 12061 urls += "?" + c.urlParams_.Encode() 12062 req, err := http.NewRequest("POST", urls, body) 12063 if err != nil { 12064 return nil, err 12065 } 12066 req.Header = reqHeaders 12067 googleapi.Expand(req.URL, map[string]string{ 12068 "parent": c.parent, 12069 }) 12070 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12071} 12072 12073// Do executes the "healthcare.projects.locations.datasets.fhirStores.create" call. 12074// Exactly one of *FhirStore or error will be non-nil. Any non-2xx 12075// status code is an error. Response headers are in either 12076// *FhirStore.ServerResponse.Header or (if a response was returned at 12077// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 12078// to check whether the returned error was because 12079// http.StatusNotModified was returned. 12080func (c *ProjectsLocationsDatasetsFhirStoresCreateCall) Do(opts ...googleapi.CallOption) (*FhirStore, error) { 12081 gensupport.SetOptions(c.urlParams_, opts...) 12082 res, err := c.doRequest("json") 12083 if res != nil && res.StatusCode == http.StatusNotModified { 12084 if res.Body != nil { 12085 res.Body.Close() 12086 } 12087 return nil, &googleapi.Error{ 12088 Code: res.StatusCode, 12089 Header: res.Header, 12090 } 12091 } 12092 if err != nil { 12093 return nil, err 12094 } 12095 defer googleapi.CloseBody(res) 12096 if err := googleapi.CheckResponse(res); err != nil { 12097 return nil, err 12098 } 12099 ret := &FhirStore{ 12100 ServerResponse: googleapi.ServerResponse{ 12101 Header: res.Header, 12102 HTTPStatusCode: res.StatusCode, 12103 }, 12104 } 12105 target := &ret 12106 if err := gensupport.DecodeResponse(target, res); err != nil { 12107 return nil, err 12108 } 12109 return ret, nil 12110 // { 12111 // "description": "Creates a new FHIR store within the parent dataset.", 12112 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores", 12113 // "httpMethod": "POST", 12114 // "id": "healthcare.projects.locations.datasets.fhirStores.create", 12115 // "parameterOrder": [ 12116 // "parent" 12117 // ], 12118 // "parameters": { 12119 // "fhirStoreId": { 12120 // "description": "The ID of the FHIR store that is being created.\nThe string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`.", 12121 // "location": "query", 12122 // "type": "string" 12123 // }, 12124 // "parent": { 12125 // "description": "The name of the dataset this FHIR store belongs to.", 12126 // "location": "path", 12127 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", 12128 // "required": true, 12129 // "type": "string" 12130 // } 12131 // }, 12132 // "path": "v1alpha2/{+parent}/fhirStores", 12133 // "request": { 12134 // "$ref": "FhirStore" 12135 // }, 12136 // "response": { 12137 // "$ref": "FhirStore" 12138 // }, 12139 // "scopes": [ 12140 // "https://www.googleapis.com/auth/cloud-platform" 12141 // ] 12142 // } 12143 12144} 12145 12146// method id "healthcare.projects.locations.datasets.fhirStores.delete": 12147 12148type ProjectsLocationsDatasetsFhirStoresDeleteCall struct { 12149 s *Service 12150 name string 12151 urlParams_ gensupport.URLParams 12152 ctx_ context.Context 12153 header_ http.Header 12154} 12155 12156// Delete: Deletes the specified FHIR store and removes all resources 12157// within it. 12158func (r *ProjectsLocationsDatasetsFhirStoresService) Delete(name string) *ProjectsLocationsDatasetsFhirStoresDeleteCall { 12159 c := &ProjectsLocationsDatasetsFhirStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12160 c.name = name 12161 return c 12162} 12163 12164// Fields allows partial responses to be retrieved. See 12165// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12166// for more information. 12167func (c *ProjectsLocationsDatasetsFhirStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresDeleteCall { 12168 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12169 return c 12170} 12171 12172// Context sets the context to be used in this call's Do method. Any 12173// pending HTTP request will be aborted if the provided context is 12174// canceled. 12175func (c *ProjectsLocationsDatasetsFhirStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresDeleteCall { 12176 c.ctx_ = ctx 12177 return c 12178} 12179 12180// Header returns an http.Header that can be modified by the caller to 12181// add HTTP headers to the request. 12182func (c *ProjectsLocationsDatasetsFhirStoresDeleteCall) Header() http.Header { 12183 if c.header_ == nil { 12184 c.header_ = make(http.Header) 12185 } 12186 return c.header_ 12187} 12188 12189func (c *ProjectsLocationsDatasetsFhirStoresDeleteCall) doRequest(alt string) (*http.Response, error) { 12190 reqHeaders := make(http.Header) 12191 for k, v := range c.header_ { 12192 reqHeaders[k] = v 12193 } 12194 reqHeaders.Set("User-Agent", c.s.userAgent()) 12195 var body io.Reader = nil 12196 c.urlParams_.Set("alt", alt) 12197 c.urlParams_.Set("prettyPrint", "false") 12198 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}") 12199 urls += "?" + c.urlParams_.Encode() 12200 req, err := http.NewRequest("DELETE", urls, body) 12201 if err != nil { 12202 return nil, err 12203 } 12204 req.Header = reqHeaders 12205 googleapi.Expand(req.URL, map[string]string{ 12206 "name": c.name, 12207 }) 12208 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12209} 12210 12211// Do executes the "healthcare.projects.locations.datasets.fhirStores.delete" call. 12212// Exactly one of *Empty or error will be non-nil. Any non-2xx status 12213// code is an error. Response headers are in either 12214// *Empty.ServerResponse.Header or (if a response was returned at all) 12215// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 12216// check whether the returned error was because http.StatusNotModified 12217// was returned. 12218func (c *ProjectsLocationsDatasetsFhirStoresDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 12219 gensupport.SetOptions(c.urlParams_, opts...) 12220 res, err := c.doRequest("json") 12221 if res != nil && res.StatusCode == http.StatusNotModified { 12222 if res.Body != nil { 12223 res.Body.Close() 12224 } 12225 return nil, &googleapi.Error{ 12226 Code: res.StatusCode, 12227 Header: res.Header, 12228 } 12229 } 12230 if err != nil { 12231 return nil, err 12232 } 12233 defer googleapi.CloseBody(res) 12234 if err := googleapi.CheckResponse(res); err != nil { 12235 return nil, err 12236 } 12237 ret := &Empty{ 12238 ServerResponse: googleapi.ServerResponse{ 12239 Header: res.Header, 12240 HTTPStatusCode: res.StatusCode, 12241 }, 12242 } 12243 target := &ret 12244 if err := gensupport.DecodeResponse(target, res); err != nil { 12245 return nil, err 12246 } 12247 return ret, nil 12248 // { 12249 // "description": "Deletes the specified FHIR store and removes all resources within it.", 12250 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}", 12251 // "httpMethod": "DELETE", 12252 // "id": "healthcare.projects.locations.datasets.fhirStores.delete", 12253 // "parameterOrder": [ 12254 // "name" 12255 // ], 12256 // "parameters": { 12257 // "name": { 12258 // "description": "The resource name of the FHIR store to delete.", 12259 // "location": "path", 12260 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$", 12261 // "required": true, 12262 // "type": "string" 12263 // } 12264 // }, 12265 // "path": "v1alpha2/{+name}", 12266 // "response": { 12267 // "$ref": "Empty" 12268 // }, 12269 // "scopes": [ 12270 // "https://www.googleapis.com/auth/cloud-platform" 12271 // ] 12272 // } 12273 12274} 12275 12276// method id "healthcare.projects.locations.datasets.fhirStores.export": 12277 12278type ProjectsLocationsDatasetsFhirStoresExportCall struct { 12279 s *Service 12280 name string 12281 exportresourcesrequest *ExportResourcesRequest 12282 urlParams_ gensupport.URLParams 12283 ctx_ context.Context 12284 header_ http.Header 12285} 12286 12287// Export: Export resources from the FHIR store to the specified 12288// destination. 12289// 12290// This method returns an Operation that can 12291// be used to track the status of the export by 12292// calling 12293// GetOperation. 12294// 12295// Immediate fatal errors appear in the 12296// error field. 12297// Otherwise, when the operation finishes, a detailed response of 12298// type 12299// ExportResourcesResponse is returned in the 12300// response field. 12301// The metadata field type for this 12302// operation is OperationMetadata. 12303func (r *ProjectsLocationsDatasetsFhirStoresService) Export(name string, exportresourcesrequest *ExportResourcesRequest) *ProjectsLocationsDatasetsFhirStoresExportCall { 12304 c := &ProjectsLocationsDatasetsFhirStoresExportCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12305 c.name = name 12306 c.exportresourcesrequest = exportresourcesrequest 12307 return c 12308} 12309 12310// Fields allows partial responses to be retrieved. See 12311// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12312// for more information. 12313func (c *ProjectsLocationsDatasetsFhirStoresExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresExportCall { 12314 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12315 return c 12316} 12317 12318// Context sets the context to be used in this call's Do method. Any 12319// pending HTTP request will be aborted if the provided context is 12320// canceled. 12321func (c *ProjectsLocationsDatasetsFhirStoresExportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresExportCall { 12322 c.ctx_ = ctx 12323 return c 12324} 12325 12326// Header returns an http.Header that can be modified by the caller to 12327// add HTTP headers to the request. 12328func (c *ProjectsLocationsDatasetsFhirStoresExportCall) Header() http.Header { 12329 if c.header_ == nil { 12330 c.header_ = make(http.Header) 12331 } 12332 return c.header_ 12333} 12334 12335func (c *ProjectsLocationsDatasetsFhirStoresExportCall) doRequest(alt string) (*http.Response, error) { 12336 reqHeaders := make(http.Header) 12337 for k, v := range c.header_ { 12338 reqHeaders[k] = v 12339 } 12340 reqHeaders.Set("User-Agent", c.s.userAgent()) 12341 var body io.Reader = nil 12342 body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportresourcesrequest) 12343 if err != nil { 12344 return nil, err 12345 } 12346 reqHeaders.Set("Content-Type", "application/json") 12347 c.urlParams_.Set("alt", alt) 12348 c.urlParams_.Set("prettyPrint", "false") 12349 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}:export") 12350 urls += "?" + c.urlParams_.Encode() 12351 req, err := http.NewRequest("POST", urls, body) 12352 if err != nil { 12353 return nil, err 12354 } 12355 req.Header = reqHeaders 12356 googleapi.Expand(req.URL, map[string]string{ 12357 "name": c.name, 12358 }) 12359 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12360} 12361 12362// Do executes the "healthcare.projects.locations.datasets.fhirStores.export" call. 12363// Exactly one of *Operation or error will be non-nil. Any non-2xx 12364// status code is an error. Response headers are in either 12365// *Operation.ServerResponse.Header or (if a response was returned at 12366// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 12367// to check whether the returned error was because 12368// http.StatusNotModified was returned. 12369func (c *ProjectsLocationsDatasetsFhirStoresExportCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 12370 gensupport.SetOptions(c.urlParams_, opts...) 12371 res, err := c.doRequest("json") 12372 if res != nil && res.StatusCode == http.StatusNotModified { 12373 if res.Body != nil { 12374 res.Body.Close() 12375 } 12376 return nil, &googleapi.Error{ 12377 Code: res.StatusCode, 12378 Header: res.Header, 12379 } 12380 } 12381 if err != nil { 12382 return nil, err 12383 } 12384 defer googleapi.CloseBody(res) 12385 if err := googleapi.CheckResponse(res); err != nil { 12386 return nil, err 12387 } 12388 ret := &Operation{ 12389 ServerResponse: googleapi.ServerResponse{ 12390 Header: res.Header, 12391 HTTPStatusCode: res.StatusCode, 12392 }, 12393 } 12394 target := &ret 12395 if err := gensupport.DecodeResponse(target, res); err != nil { 12396 return nil, err 12397 } 12398 return ret, nil 12399 // { 12400 // "description": "Export resources from the FHIR store to the specified destination.\n\nThis method returns an Operation that can\nbe used to track the status of the export by calling\nGetOperation.\n\nImmediate fatal errors appear in the\nerror field.\nOtherwise, when the operation finishes, a detailed response of type\nExportResourcesResponse is returned in the\nresponse field.\nThe metadata field type for this\noperation is OperationMetadata.", 12401 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}:export", 12402 // "httpMethod": "POST", 12403 // "id": "healthcare.projects.locations.datasets.fhirStores.export", 12404 // "parameterOrder": [ 12405 // "name" 12406 // ], 12407 // "parameters": { 12408 // "name": { 12409 // "description": "The name of the FHIR store to export resource from. The name should be in\nthe format of\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}`.", 12410 // "location": "path", 12411 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$", 12412 // "required": true, 12413 // "type": "string" 12414 // } 12415 // }, 12416 // "path": "v1alpha2/{+name}:export", 12417 // "request": { 12418 // "$ref": "ExportResourcesRequest" 12419 // }, 12420 // "response": { 12421 // "$ref": "Operation" 12422 // }, 12423 // "scopes": [ 12424 // "https://www.googleapis.com/auth/cloud-platform" 12425 // ] 12426 // } 12427 12428} 12429 12430// method id "healthcare.projects.locations.datasets.fhirStores.get": 12431 12432type ProjectsLocationsDatasetsFhirStoresGetCall struct { 12433 s *Service 12434 name string 12435 urlParams_ gensupport.URLParams 12436 ifNoneMatch_ string 12437 ctx_ context.Context 12438 header_ http.Header 12439} 12440 12441// Get: Gets the configuration of the specified FHIR store. 12442func (r *ProjectsLocationsDatasetsFhirStoresService) Get(name string) *ProjectsLocationsDatasetsFhirStoresGetCall { 12443 c := &ProjectsLocationsDatasetsFhirStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12444 c.name = name 12445 return c 12446} 12447 12448// Fields allows partial responses to be retrieved. See 12449// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12450// for more information. 12451func (c *ProjectsLocationsDatasetsFhirStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresGetCall { 12452 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12453 return c 12454} 12455 12456// IfNoneMatch sets the optional parameter which makes the operation 12457// fail if the object's ETag matches the given value. This is useful for 12458// getting updates only after the object has changed since the last 12459// request. Use googleapi.IsNotModified to check whether the response 12460// error from Do is the result of In-None-Match. 12461func (c *ProjectsLocationsDatasetsFhirStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresGetCall { 12462 c.ifNoneMatch_ = entityTag 12463 return c 12464} 12465 12466// Context sets the context to be used in this call's Do method. Any 12467// pending HTTP request will be aborted if the provided context is 12468// canceled. 12469func (c *ProjectsLocationsDatasetsFhirStoresGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresGetCall { 12470 c.ctx_ = ctx 12471 return c 12472} 12473 12474// Header returns an http.Header that can be modified by the caller to 12475// add HTTP headers to the request. 12476func (c *ProjectsLocationsDatasetsFhirStoresGetCall) Header() http.Header { 12477 if c.header_ == nil { 12478 c.header_ = make(http.Header) 12479 } 12480 return c.header_ 12481} 12482 12483func (c *ProjectsLocationsDatasetsFhirStoresGetCall) doRequest(alt string) (*http.Response, error) { 12484 reqHeaders := make(http.Header) 12485 for k, v := range c.header_ { 12486 reqHeaders[k] = v 12487 } 12488 reqHeaders.Set("User-Agent", c.s.userAgent()) 12489 if c.ifNoneMatch_ != "" { 12490 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12491 } 12492 var body io.Reader = nil 12493 c.urlParams_.Set("alt", alt) 12494 c.urlParams_.Set("prettyPrint", "false") 12495 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}") 12496 urls += "?" + c.urlParams_.Encode() 12497 req, err := http.NewRequest("GET", urls, body) 12498 if err != nil { 12499 return nil, err 12500 } 12501 req.Header = reqHeaders 12502 googleapi.Expand(req.URL, map[string]string{ 12503 "name": c.name, 12504 }) 12505 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12506} 12507 12508// Do executes the "healthcare.projects.locations.datasets.fhirStores.get" call. 12509// Exactly one of *FhirStore or error will be non-nil. Any non-2xx 12510// status code is an error. Response headers are in either 12511// *FhirStore.ServerResponse.Header or (if a response was returned at 12512// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 12513// to check whether the returned error was because 12514// http.StatusNotModified was returned. 12515func (c *ProjectsLocationsDatasetsFhirStoresGetCall) Do(opts ...googleapi.CallOption) (*FhirStore, error) { 12516 gensupport.SetOptions(c.urlParams_, opts...) 12517 res, err := c.doRequest("json") 12518 if res != nil && res.StatusCode == http.StatusNotModified { 12519 if res.Body != nil { 12520 res.Body.Close() 12521 } 12522 return nil, &googleapi.Error{ 12523 Code: res.StatusCode, 12524 Header: res.Header, 12525 } 12526 } 12527 if err != nil { 12528 return nil, err 12529 } 12530 defer googleapi.CloseBody(res) 12531 if err := googleapi.CheckResponse(res); err != nil { 12532 return nil, err 12533 } 12534 ret := &FhirStore{ 12535 ServerResponse: googleapi.ServerResponse{ 12536 Header: res.Header, 12537 HTTPStatusCode: res.StatusCode, 12538 }, 12539 } 12540 target := &ret 12541 if err := gensupport.DecodeResponse(target, res); err != nil { 12542 return nil, err 12543 } 12544 return ret, nil 12545 // { 12546 // "description": "Gets the configuration of the specified FHIR store.", 12547 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}", 12548 // "httpMethod": "GET", 12549 // "id": "healthcare.projects.locations.datasets.fhirStores.get", 12550 // "parameterOrder": [ 12551 // "name" 12552 // ], 12553 // "parameters": { 12554 // "name": { 12555 // "description": "The resource name of the FHIR store to get.", 12556 // "location": "path", 12557 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$", 12558 // "required": true, 12559 // "type": "string" 12560 // } 12561 // }, 12562 // "path": "v1alpha2/{+name}", 12563 // "response": { 12564 // "$ref": "FhirStore" 12565 // }, 12566 // "scopes": [ 12567 // "https://www.googleapis.com/auth/cloud-platform" 12568 // ] 12569 // } 12570 12571} 12572 12573// method id "healthcare.projects.locations.datasets.fhirStores.getIamPolicy": 12574 12575type ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall struct { 12576 s *Service 12577 resource string 12578 urlParams_ gensupport.URLParams 12579 ifNoneMatch_ string 12580 ctx_ context.Context 12581 header_ http.Header 12582} 12583 12584// GetIamPolicy: Gets the access control policy for a FHIR store or 12585// security label within a 12586// FHIR store. Returns NOT_FOUND error if the resource does not exist. 12587// Returns 12588// an empty policy if the resource exists but does not have a policy 12589// set. 12590// 12591// Authorization requires the Google IAM 12592// permission 12593// 'healthcare.fhirStores.getIamPolicy' for a FHIR store 12594// or 12595// 'healthcare.securityLabels.getIamPolicy' for a security label 12596func (r *ProjectsLocationsDatasetsFhirStoresService) GetIamPolicy(resource string) *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall { 12597 c := &ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12598 c.resource = resource 12599 return c 12600} 12601 12602// Fields allows partial responses to be retrieved. See 12603// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12604// for more information. 12605func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall { 12606 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12607 return c 12608} 12609 12610// IfNoneMatch sets the optional parameter which makes the operation 12611// fail if the object's ETag matches the given value. This is useful for 12612// getting updates only after the object has changed since the last 12613// request. Use googleapi.IsNotModified to check whether the response 12614// error from Do is the result of In-None-Match. 12615func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall { 12616 c.ifNoneMatch_ = entityTag 12617 return c 12618} 12619 12620// Context sets the context to be used in this call's Do method. Any 12621// pending HTTP request will be aborted if the provided context is 12622// canceled. 12623func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall { 12624 c.ctx_ = ctx 12625 return c 12626} 12627 12628// Header returns an http.Header that can be modified by the caller to 12629// add HTTP headers to the request. 12630func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) Header() http.Header { 12631 if c.header_ == nil { 12632 c.header_ = make(http.Header) 12633 } 12634 return c.header_ 12635} 12636 12637func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 12638 reqHeaders := make(http.Header) 12639 for k, v := range c.header_ { 12640 reqHeaders[k] = v 12641 } 12642 reqHeaders.Set("User-Agent", c.s.userAgent()) 12643 if c.ifNoneMatch_ != "" { 12644 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12645 } 12646 var body io.Reader = nil 12647 c.urlParams_.Set("alt", alt) 12648 c.urlParams_.Set("prettyPrint", "false") 12649 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:getIamPolicy") 12650 urls += "?" + c.urlParams_.Encode() 12651 req, err := http.NewRequest("GET", urls, body) 12652 if err != nil { 12653 return nil, err 12654 } 12655 req.Header = reqHeaders 12656 googleapi.Expand(req.URL, map[string]string{ 12657 "resource": c.resource, 12658 }) 12659 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12660} 12661 12662// Do executes the "healthcare.projects.locations.datasets.fhirStores.getIamPolicy" call. 12663// Exactly one of *Policy or error will be non-nil. Any non-2xx status 12664// code is an error. Response headers are in either 12665// *Policy.ServerResponse.Header or (if a response was returned at all) 12666// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 12667// check whether the returned error was because http.StatusNotModified 12668// was returned. 12669func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 12670 gensupport.SetOptions(c.urlParams_, opts...) 12671 res, err := c.doRequest("json") 12672 if res != nil && res.StatusCode == http.StatusNotModified { 12673 if res.Body != nil { 12674 res.Body.Close() 12675 } 12676 return nil, &googleapi.Error{ 12677 Code: res.StatusCode, 12678 Header: res.Header, 12679 } 12680 } 12681 if err != nil { 12682 return nil, err 12683 } 12684 defer googleapi.CloseBody(res) 12685 if err := googleapi.CheckResponse(res); err != nil { 12686 return nil, err 12687 } 12688 ret := &Policy{ 12689 ServerResponse: googleapi.ServerResponse{ 12690 Header: res.Header, 12691 HTTPStatusCode: res.StatusCode, 12692 }, 12693 } 12694 target := &ret 12695 if err := gensupport.DecodeResponse(target, res); err != nil { 12696 return nil, err 12697 } 12698 return ret, nil 12699 // { 12700 // "description": "Gets the access control policy for a FHIR store or security label within a\nFHIR store. Returns NOT_FOUND error if the resource does not exist. Returns\nan empty policy if the resource exists but does not have a policy set.\n\nAuthorization requires the Google IAM permission\n'healthcare.fhirStores.getIamPolicy' for a FHIR store or\n'healthcare.securityLabels.getIamPolicy' for a security label", 12701 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}:getIamPolicy", 12702 // "httpMethod": "GET", 12703 // "id": "healthcare.projects.locations.datasets.fhirStores.getIamPolicy", 12704 // "parameterOrder": [ 12705 // "resource" 12706 // ], 12707 // "parameters": { 12708 // "resource": { 12709 // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", 12710 // "location": "path", 12711 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$", 12712 // "required": true, 12713 // "type": "string" 12714 // } 12715 // }, 12716 // "path": "v1alpha2/{+resource}:getIamPolicy", 12717 // "response": { 12718 // "$ref": "Policy" 12719 // }, 12720 // "scopes": [ 12721 // "https://www.googleapis.com/auth/cloud-platform" 12722 // ] 12723 // } 12724 12725} 12726 12727// method id "healthcare.projects.locations.datasets.fhirStores.import": 12728 12729type ProjectsLocationsDatasetsFhirStoresImportCall struct { 12730 s *Service 12731 name string 12732 importresourcesrequest *ImportResourcesRequest 12733 urlParams_ gensupport.URLParams 12734 ctx_ context.Context 12735 header_ http.Header 12736} 12737 12738// Import: Import resources to the FHIR store by loading data from the 12739// specified 12740// sources. Each resource must have a client-supplied ID, which is 12741// retained 12742// by the server. 12743// 12744// The import operation is idempotent. Upon retry, the most recent 12745// data 12746// (matching the client-supplied ID) is overwritten, without creating a 12747// new 12748// resource version. If partial failures occur during the import, 12749// successful 12750// changes are not rolled back. 12751// 12752// If history imports are enabled 12753// (enable_history_import is set in the 12754// FHIR store's configuration), you can import historical versions of 12755// a 12756// resource by supplying a bundle of type `history`. The historical 12757// versions 12758// in the bundle must have `lastUpdated` timestamps. If a current 12759// or 12760// historical version with the supplied resource ID already exists, 12761// the 12762// bundle is rejected. 12763// 12764// This method returns an Operation that can 12765// be used to track the status of the import by 12766// calling 12767// GetOperation. 12768// 12769// Immediate fatal errors appear in the 12770// error field. 12771// Otherwise, when the operation finishes, a detailed response of 12772// type 12773// ImportResourcesResponse is returned in the 12774// response field. 12775// The metadata field type for this 12776// operation is OperationMetadata. 12777func (r *ProjectsLocationsDatasetsFhirStoresService) Import(name string, importresourcesrequest *ImportResourcesRequest) *ProjectsLocationsDatasetsFhirStoresImportCall { 12778 c := &ProjectsLocationsDatasetsFhirStoresImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12779 c.name = name 12780 c.importresourcesrequest = importresourcesrequest 12781 return c 12782} 12783 12784// Fields allows partial responses to be retrieved. See 12785// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12786// for more information. 12787func (c *ProjectsLocationsDatasetsFhirStoresImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresImportCall { 12788 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12789 return c 12790} 12791 12792// Context sets the context to be used in this call's Do method. Any 12793// pending HTTP request will be aborted if the provided context is 12794// canceled. 12795func (c *ProjectsLocationsDatasetsFhirStoresImportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresImportCall { 12796 c.ctx_ = ctx 12797 return c 12798} 12799 12800// Header returns an http.Header that can be modified by the caller to 12801// add HTTP headers to the request. 12802func (c *ProjectsLocationsDatasetsFhirStoresImportCall) Header() http.Header { 12803 if c.header_ == nil { 12804 c.header_ = make(http.Header) 12805 } 12806 return c.header_ 12807} 12808 12809func (c *ProjectsLocationsDatasetsFhirStoresImportCall) doRequest(alt string) (*http.Response, error) { 12810 reqHeaders := make(http.Header) 12811 for k, v := range c.header_ { 12812 reqHeaders[k] = v 12813 } 12814 reqHeaders.Set("User-Agent", c.s.userAgent()) 12815 var body io.Reader = nil 12816 body, err := googleapi.WithoutDataWrapper.JSONReader(c.importresourcesrequest) 12817 if err != nil { 12818 return nil, err 12819 } 12820 reqHeaders.Set("Content-Type", "application/json") 12821 c.urlParams_.Set("alt", alt) 12822 c.urlParams_.Set("prettyPrint", "false") 12823 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}:import") 12824 urls += "?" + c.urlParams_.Encode() 12825 req, err := http.NewRequest("POST", urls, body) 12826 if err != nil { 12827 return nil, err 12828 } 12829 req.Header = reqHeaders 12830 googleapi.Expand(req.URL, map[string]string{ 12831 "name": c.name, 12832 }) 12833 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12834} 12835 12836// Do executes the "healthcare.projects.locations.datasets.fhirStores.import" call. 12837// Exactly one of *Operation or error will be non-nil. Any non-2xx 12838// status code is an error. Response headers are in either 12839// *Operation.ServerResponse.Header or (if a response was returned at 12840// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 12841// to check whether the returned error was because 12842// http.StatusNotModified was returned. 12843func (c *ProjectsLocationsDatasetsFhirStoresImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 12844 gensupport.SetOptions(c.urlParams_, opts...) 12845 res, err := c.doRequest("json") 12846 if res != nil && res.StatusCode == http.StatusNotModified { 12847 if res.Body != nil { 12848 res.Body.Close() 12849 } 12850 return nil, &googleapi.Error{ 12851 Code: res.StatusCode, 12852 Header: res.Header, 12853 } 12854 } 12855 if err != nil { 12856 return nil, err 12857 } 12858 defer googleapi.CloseBody(res) 12859 if err := googleapi.CheckResponse(res); err != nil { 12860 return nil, err 12861 } 12862 ret := &Operation{ 12863 ServerResponse: googleapi.ServerResponse{ 12864 Header: res.Header, 12865 HTTPStatusCode: res.StatusCode, 12866 }, 12867 } 12868 target := &ret 12869 if err := gensupport.DecodeResponse(target, res); err != nil { 12870 return nil, err 12871 } 12872 return ret, nil 12873 // { 12874 // "description": "Import resources to the FHIR store by loading data from the specified\nsources. Each resource must have a client-supplied ID, which is retained\nby the server.\n\nThe import operation is idempotent. Upon retry, the most recent data\n(matching the client-supplied ID) is overwritten, without creating a new\nresource version. If partial failures occur during the import, successful\nchanges are not rolled back.\n\nIf history imports are enabled\n(enable_history_import is set in the\nFHIR store's configuration), you can import historical versions of a\nresource by supplying a bundle of type `history`. The historical versions\nin the bundle must have `lastUpdated` timestamps. If a current or\nhistorical version with the supplied resource ID already exists, the\nbundle is rejected.\n\nThis method returns an Operation that can\nbe used to track the status of the import by calling\nGetOperation.\n\nImmediate fatal errors appear in the\nerror field.\nOtherwise, when the operation finishes, a detailed response of type\nImportResourcesResponse is returned in the\nresponse field.\nThe metadata field type for this\noperation is OperationMetadata.", 12875 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}:import", 12876 // "httpMethod": "POST", 12877 // "id": "healthcare.projects.locations.datasets.fhirStores.import", 12878 // "parameterOrder": [ 12879 // "name" 12880 // ], 12881 // "parameters": { 12882 // "name": { 12883 // "description": "The name of the FHIR store to import FHIR resources to. The name should be\nin the format of\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}`.", 12884 // "location": "path", 12885 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$", 12886 // "required": true, 12887 // "type": "string" 12888 // } 12889 // }, 12890 // "path": "v1alpha2/{+name}:import", 12891 // "request": { 12892 // "$ref": "ImportResourcesRequest" 12893 // }, 12894 // "response": { 12895 // "$ref": "Operation" 12896 // }, 12897 // "scopes": [ 12898 // "https://www.googleapis.com/auth/cloud-platform" 12899 // ] 12900 // } 12901 12902} 12903 12904// method id "healthcare.projects.locations.datasets.fhirStores.list": 12905 12906type ProjectsLocationsDatasetsFhirStoresListCall struct { 12907 s *Service 12908 parent string 12909 urlParams_ gensupport.URLParams 12910 ifNoneMatch_ string 12911 ctx_ context.Context 12912 header_ http.Header 12913} 12914 12915// List: Lists the FHIR stores in the given dataset. 12916func (r *ProjectsLocationsDatasetsFhirStoresService) List(parent string) *ProjectsLocationsDatasetsFhirStoresListCall { 12917 c := &ProjectsLocationsDatasetsFhirStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12918 c.parent = parent 12919 return c 12920} 12921 12922// Filter sets the optional parameter "filter": Restricts stores 12923// returned to those matching a filter. 12924// Syntax: 12925// https://cloud.google.com/appengine/docs/standard/python/search 12926// /query_strings 12927// Only filtering on labels is supported, for example 12928// `labels.key=value`. 12929func (c *ProjectsLocationsDatasetsFhirStoresListCall) Filter(filter string) *ProjectsLocationsDatasetsFhirStoresListCall { 12930 c.urlParams_.Set("filter", filter) 12931 return c 12932} 12933 12934// PageSize sets the optional parameter "pageSize": Limit on the number 12935// of FHIR stores to return in a single response. If zero 12936// the default page size of 100 is used. 12937func (c *ProjectsLocationsDatasetsFhirStoresListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsFhirStoresListCall { 12938 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 12939 return c 12940} 12941 12942// PageToken sets the optional parameter "pageToken": The 12943// next_page_token value returned from the previous List request, if 12944// any. 12945func (c *ProjectsLocationsDatasetsFhirStoresListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsFhirStoresListCall { 12946 c.urlParams_.Set("pageToken", pageToken) 12947 return c 12948} 12949 12950// Fields allows partial responses to be retrieved. See 12951// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12952// for more information. 12953func (c *ProjectsLocationsDatasetsFhirStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresListCall { 12954 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12955 return c 12956} 12957 12958// IfNoneMatch sets the optional parameter which makes the operation 12959// fail if the object's ETag matches the given value. This is useful for 12960// getting updates only after the object has changed since the last 12961// request. Use googleapi.IsNotModified to check whether the response 12962// error from Do is the result of In-None-Match. 12963func (c *ProjectsLocationsDatasetsFhirStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresListCall { 12964 c.ifNoneMatch_ = entityTag 12965 return c 12966} 12967 12968// Context sets the context to be used in this call's Do method. Any 12969// pending HTTP request will be aborted if the provided context is 12970// canceled. 12971func (c *ProjectsLocationsDatasetsFhirStoresListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresListCall { 12972 c.ctx_ = ctx 12973 return c 12974} 12975 12976// Header returns an http.Header that can be modified by the caller to 12977// add HTTP headers to the request. 12978func (c *ProjectsLocationsDatasetsFhirStoresListCall) Header() http.Header { 12979 if c.header_ == nil { 12980 c.header_ = make(http.Header) 12981 } 12982 return c.header_ 12983} 12984 12985func (c *ProjectsLocationsDatasetsFhirStoresListCall) doRequest(alt string) (*http.Response, error) { 12986 reqHeaders := make(http.Header) 12987 for k, v := range c.header_ { 12988 reqHeaders[k] = v 12989 } 12990 reqHeaders.Set("User-Agent", c.s.userAgent()) 12991 if c.ifNoneMatch_ != "" { 12992 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12993 } 12994 var body io.Reader = nil 12995 c.urlParams_.Set("alt", alt) 12996 c.urlParams_.Set("prettyPrint", "false") 12997 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/fhirStores") 12998 urls += "?" + c.urlParams_.Encode() 12999 req, err := http.NewRequest("GET", urls, body) 13000 if err != nil { 13001 return nil, err 13002 } 13003 req.Header = reqHeaders 13004 googleapi.Expand(req.URL, map[string]string{ 13005 "parent": c.parent, 13006 }) 13007 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13008} 13009 13010// Do executes the "healthcare.projects.locations.datasets.fhirStores.list" call. 13011// Exactly one of *ListFhirStoresResponse or error will be non-nil. Any 13012// non-2xx status code is an error. Response headers are in either 13013// *ListFhirStoresResponse.ServerResponse.Header or (if a response was 13014// returned at all) in error.(*googleapi.Error).Header. Use 13015// googleapi.IsNotModified to check whether the returned error was 13016// because http.StatusNotModified was returned. 13017func (c *ProjectsLocationsDatasetsFhirStoresListCall) Do(opts ...googleapi.CallOption) (*ListFhirStoresResponse, error) { 13018 gensupport.SetOptions(c.urlParams_, opts...) 13019 res, err := c.doRequest("json") 13020 if res != nil && res.StatusCode == http.StatusNotModified { 13021 if res.Body != nil { 13022 res.Body.Close() 13023 } 13024 return nil, &googleapi.Error{ 13025 Code: res.StatusCode, 13026 Header: res.Header, 13027 } 13028 } 13029 if err != nil { 13030 return nil, err 13031 } 13032 defer googleapi.CloseBody(res) 13033 if err := googleapi.CheckResponse(res); err != nil { 13034 return nil, err 13035 } 13036 ret := &ListFhirStoresResponse{ 13037 ServerResponse: googleapi.ServerResponse{ 13038 Header: res.Header, 13039 HTTPStatusCode: res.StatusCode, 13040 }, 13041 } 13042 target := &ret 13043 if err := gensupport.DecodeResponse(target, res); err != nil { 13044 return nil, err 13045 } 13046 return ret, nil 13047 // { 13048 // "description": "Lists the FHIR stores in the given dataset.", 13049 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores", 13050 // "httpMethod": "GET", 13051 // "id": "healthcare.projects.locations.datasets.fhirStores.list", 13052 // "parameterOrder": [ 13053 // "parent" 13054 // ], 13055 // "parameters": { 13056 // "filter": { 13057 // "description": "Restricts stores returned to those matching a filter. Syntax:\nhttps://cloud.google.com/appengine/docs/standard/python/search/query_strings\nOnly filtering on labels is supported, for example `labels.key=value`.", 13058 // "location": "query", 13059 // "type": "string" 13060 // }, 13061 // "pageSize": { 13062 // "description": "Limit on the number of FHIR stores to return in a single response. If zero\nthe default page size of 100 is used.", 13063 // "format": "int32", 13064 // "location": "query", 13065 // "type": "integer" 13066 // }, 13067 // "pageToken": { 13068 // "description": "The next_page_token value returned from the previous List request, if any.", 13069 // "location": "query", 13070 // "type": "string" 13071 // }, 13072 // "parent": { 13073 // "description": "Name of the dataset.", 13074 // "location": "path", 13075 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", 13076 // "required": true, 13077 // "type": "string" 13078 // } 13079 // }, 13080 // "path": "v1alpha2/{+parent}/fhirStores", 13081 // "response": { 13082 // "$ref": "ListFhirStoresResponse" 13083 // }, 13084 // "scopes": [ 13085 // "https://www.googleapis.com/auth/cloud-platform" 13086 // ] 13087 // } 13088 13089} 13090 13091// Pages invokes f for each page of results. 13092// A non-nil error returned from f will halt the iteration. 13093// The provided context supersedes any context provided to the Context method. 13094func (c *ProjectsLocationsDatasetsFhirStoresListCall) Pages(ctx context.Context, f func(*ListFhirStoresResponse) error) error { 13095 c.ctx_ = ctx 13096 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 13097 for { 13098 x, err := c.Do() 13099 if err != nil { 13100 return err 13101 } 13102 if err := f(x); err != nil { 13103 return err 13104 } 13105 if x.NextPageToken == "" { 13106 return nil 13107 } 13108 c.PageToken(x.NextPageToken) 13109 } 13110} 13111 13112// method id "healthcare.projects.locations.datasets.fhirStores.patch": 13113 13114type ProjectsLocationsDatasetsFhirStoresPatchCall struct { 13115 s *Service 13116 name string 13117 fhirstore *FhirStore 13118 urlParams_ gensupport.URLParams 13119 ctx_ context.Context 13120 header_ http.Header 13121} 13122 13123// Patch: Updates the configuration of the specified FHIR store. 13124func (r *ProjectsLocationsDatasetsFhirStoresService) Patch(name string, fhirstore *FhirStore) *ProjectsLocationsDatasetsFhirStoresPatchCall { 13125 c := &ProjectsLocationsDatasetsFhirStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13126 c.name = name 13127 c.fhirstore = fhirstore 13128 return c 13129} 13130 13131// UpdateMask sets the optional parameter "updateMask": The update mask 13132// applies to the resource. For the `FieldMask` 13133// definition, 13134// see 13135// https://developers.google.com/protocol-buffers/docs/re 13136// ference/google.protobuf#fieldmask 13137func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsFhirStoresPatchCall { 13138 c.urlParams_.Set("updateMask", updateMask) 13139 return c 13140} 13141 13142// Fields allows partial responses to be retrieved. See 13143// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13144// for more information. 13145func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresPatchCall { 13146 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13147 return c 13148} 13149 13150// Context sets the context to be used in this call's Do method. Any 13151// pending HTTP request will be aborted if the provided context is 13152// canceled. 13153func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresPatchCall { 13154 c.ctx_ = ctx 13155 return c 13156} 13157 13158// Header returns an http.Header that can be modified by the caller to 13159// add HTTP headers to the request. 13160func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) Header() http.Header { 13161 if c.header_ == nil { 13162 c.header_ = make(http.Header) 13163 } 13164 return c.header_ 13165} 13166 13167func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) doRequest(alt string) (*http.Response, error) { 13168 reqHeaders := make(http.Header) 13169 for k, v := range c.header_ { 13170 reqHeaders[k] = v 13171 } 13172 reqHeaders.Set("User-Agent", c.s.userAgent()) 13173 var body io.Reader = nil 13174 body, err := googleapi.WithoutDataWrapper.JSONReader(c.fhirstore) 13175 if err != nil { 13176 return nil, err 13177 } 13178 reqHeaders.Set("Content-Type", "application/json") 13179 c.urlParams_.Set("alt", alt) 13180 c.urlParams_.Set("prettyPrint", "false") 13181 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}") 13182 urls += "?" + c.urlParams_.Encode() 13183 req, err := http.NewRequest("PATCH", urls, body) 13184 if err != nil { 13185 return nil, err 13186 } 13187 req.Header = reqHeaders 13188 googleapi.Expand(req.URL, map[string]string{ 13189 "name": c.name, 13190 }) 13191 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13192} 13193 13194// Do executes the "healthcare.projects.locations.datasets.fhirStores.patch" call. 13195// Exactly one of *FhirStore or error will be non-nil. Any non-2xx 13196// status code is an error. Response headers are in either 13197// *FhirStore.ServerResponse.Header or (if a response was returned at 13198// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 13199// to check whether the returned error was because 13200// http.StatusNotModified was returned. 13201func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) Do(opts ...googleapi.CallOption) (*FhirStore, error) { 13202 gensupport.SetOptions(c.urlParams_, opts...) 13203 res, err := c.doRequest("json") 13204 if res != nil && res.StatusCode == http.StatusNotModified { 13205 if res.Body != nil { 13206 res.Body.Close() 13207 } 13208 return nil, &googleapi.Error{ 13209 Code: res.StatusCode, 13210 Header: res.Header, 13211 } 13212 } 13213 if err != nil { 13214 return nil, err 13215 } 13216 defer googleapi.CloseBody(res) 13217 if err := googleapi.CheckResponse(res); err != nil { 13218 return nil, err 13219 } 13220 ret := &FhirStore{ 13221 ServerResponse: googleapi.ServerResponse{ 13222 Header: res.Header, 13223 HTTPStatusCode: res.StatusCode, 13224 }, 13225 } 13226 target := &ret 13227 if err := gensupport.DecodeResponse(target, res); err != nil { 13228 return nil, err 13229 } 13230 return ret, nil 13231 // { 13232 // "description": "Updates the configuration of the specified FHIR store.", 13233 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}", 13234 // "httpMethod": "PATCH", 13235 // "id": "healthcare.projects.locations.datasets.fhirStores.patch", 13236 // "parameterOrder": [ 13237 // "name" 13238 // ], 13239 // "parameters": { 13240 // "name": { 13241 // "description": "Output only. Resource name of the FHIR store, of the form\n`projects/{project_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}`.", 13242 // "location": "path", 13243 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$", 13244 // "required": true, 13245 // "type": "string" 13246 // }, 13247 // "updateMask": { 13248 // "description": "The update mask applies to the resource. For the `FieldMask` definition,\nsee\nhttps://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", 13249 // "format": "google-fieldmask", 13250 // "location": "query", 13251 // "type": "string" 13252 // } 13253 // }, 13254 // "path": "v1alpha2/{+name}", 13255 // "request": { 13256 // "$ref": "FhirStore" 13257 // }, 13258 // "response": { 13259 // "$ref": "FhirStore" 13260 // }, 13261 // "scopes": [ 13262 // "https://www.googleapis.com/auth/cloud-platform" 13263 // ] 13264 // } 13265 13266} 13267 13268// method id "healthcare.projects.locations.datasets.fhirStores.setIamPolicy": 13269 13270type ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall struct { 13271 s *Service 13272 resource string 13273 setiampolicyrequest *SetIamPolicyRequest 13274 urlParams_ gensupport.URLParams 13275 ctx_ context.Context 13276 header_ http.Header 13277} 13278 13279// SetIamPolicy: Sets the access control policy for a FHIR store or 13280// security label within a 13281// FHIR store. Replaces any existing policy. 13282// 13283// Authorization requires the Google IAM 13284// permission 13285// 'healthcare.fhirStores.setIamPolicy' for a FHIR store 13286// or 13287// 'healthcare.securityLabels.setIamPolicy' for a security label 13288func (r *ProjectsLocationsDatasetsFhirStoresService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall { 13289 c := &ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13290 c.resource = resource 13291 c.setiampolicyrequest = setiampolicyrequest 13292 return c 13293} 13294 13295// Fields allows partial responses to be retrieved. See 13296// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13297// for more information. 13298func (c *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall { 13299 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13300 return c 13301} 13302 13303// Context sets the context to be used in this call's Do method. Any 13304// pending HTTP request will be aborted if the provided context is 13305// canceled. 13306func (c *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall { 13307 c.ctx_ = ctx 13308 return c 13309} 13310 13311// Header returns an http.Header that can be modified by the caller to 13312// add HTTP headers to the request. 13313func (c *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall) Header() http.Header { 13314 if c.header_ == nil { 13315 c.header_ = make(http.Header) 13316 } 13317 return c.header_ 13318} 13319 13320func (c *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 13321 reqHeaders := make(http.Header) 13322 for k, v := range c.header_ { 13323 reqHeaders[k] = v 13324 } 13325 reqHeaders.Set("User-Agent", c.s.userAgent()) 13326 var body io.Reader = nil 13327 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 13328 if err != nil { 13329 return nil, err 13330 } 13331 reqHeaders.Set("Content-Type", "application/json") 13332 c.urlParams_.Set("alt", alt) 13333 c.urlParams_.Set("prettyPrint", "false") 13334 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:setIamPolicy") 13335 urls += "?" + c.urlParams_.Encode() 13336 req, err := http.NewRequest("POST", urls, body) 13337 if err != nil { 13338 return nil, err 13339 } 13340 req.Header = reqHeaders 13341 googleapi.Expand(req.URL, map[string]string{ 13342 "resource": c.resource, 13343 }) 13344 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13345} 13346 13347// Do executes the "healthcare.projects.locations.datasets.fhirStores.setIamPolicy" call. 13348// Exactly one of *Policy or error will be non-nil. Any non-2xx status 13349// code is an error. Response headers are in either 13350// *Policy.ServerResponse.Header or (if a response was returned at all) 13351// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 13352// check whether the returned error was because http.StatusNotModified 13353// was returned. 13354func (c *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 13355 gensupport.SetOptions(c.urlParams_, opts...) 13356 res, err := c.doRequest("json") 13357 if res != nil && res.StatusCode == http.StatusNotModified { 13358 if res.Body != nil { 13359 res.Body.Close() 13360 } 13361 return nil, &googleapi.Error{ 13362 Code: res.StatusCode, 13363 Header: res.Header, 13364 } 13365 } 13366 if err != nil { 13367 return nil, err 13368 } 13369 defer googleapi.CloseBody(res) 13370 if err := googleapi.CheckResponse(res); err != nil { 13371 return nil, err 13372 } 13373 ret := &Policy{ 13374 ServerResponse: googleapi.ServerResponse{ 13375 Header: res.Header, 13376 HTTPStatusCode: res.StatusCode, 13377 }, 13378 } 13379 target := &ret 13380 if err := gensupport.DecodeResponse(target, res); err != nil { 13381 return nil, err 13382 } 13383 return ret, nil 13384 // { 13385 // "description": "Sets the access control policy for a FHIR store or security label within a\nFHIR store. Replaces any existing policy.\n\nAuthorization requires the Google IAM permission\n'healthcare.fhirStores.setIamPolicy' for a FHIR store or\n'healthcare.securityLabels.setIamPolicy' for a security label", 13386 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}:setIamPolicy", 13387 // "httpMethod": "POST", 13388 // "id": "healthcare.projects.locations.datasets.fhirStores.setIamPolicy", 13389 // "parameterOrder": [ 13390 // "resource" 13391 // ], 13392 // "parameters": { 13393 // "resource": { 13394 // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", 13395 // "location": "path", 13396 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$", 13397 // "required": true, 13398 // "type": "string" 13399 // } 13400 // }, 13401 // "path": "v1alpha2/{+resource}:setIamPolicy", 13402 // "request": { 13403 // "$ref": "SetIamPolicyRequest" 13404 // }, 13405 // "response": { 13406 // "$ref": "Policy" 13407 // }, 13408 // "scopes": [ 13409 // "https://www.googleapis.com/auth/cloud-platform" 13410 // ] 13411 // } 13412 13413} 13414 13415// method id "healthcare.projects.locations.datasets.fhirStores.testIamPermissions": 13416 13417type ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall struct { 13418 s *Service 13419 resource string 13420 testiampermissionsrequest *TestIamPermissionsRequest 13421 urlParams_ gensupport.URLParams 13422 ctx_ context.Context 13423 header_ http.Header 13424} 13425 13426// TestIamPermissions: Returns permissions that a caller has on the 13427// specified resource. If the 13428// resource does not exist, this will return an empty set of 13429// permissions, not 13430// a NOT_FOUND error. 13431// 13432// There is no permission required to make this API call. 13433func (r *ProjectsLocationsDatasetsFhirStoresService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall { 13434 c := &ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13435 c.resource = resource 13436 c.testiampermissionsrequest = testiampermissionsrequest 13437 return c 13438} 13439 13440// Fields allows partial responses to be retrieved. See 13441// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13442// for more information. 13443func (c *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall { 13444 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13445 return c 13446} 13447 13448// Context sets the context to be used in this call's Do method. Any 13449// pending HTTP request will be aborted if the provided context is 13450// canceled. 13451func (c *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall { 13452 c.ctx_ = ctx 13453 return c 13454} 13455 13456// Header returns an http.Header that can be modified by the caller to 13457// add HTTP headers to the request. 13458func (c *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall) Header() http.Header { 13459 if c.header_ == nil { 13460 c.header_ = make(http.Header) 13461 } 13462 return c.header_ 13463} 13464 13465func (c *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 13466 reqHeaders := make(http.Header) 13467 for k, v := range c.header_ { 13468 reqHeaders[k] = v 13469 } 13470 reqHeaders.Set("User-Agent", c.s.userAgent()) 13471 var body io.Reader = nil 13472 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 13473 if err != nil { 13474 return nil, err 13475 } 13476 reqHeaders.Set("Content-Type", "application/json") 13477 c.urlParams_.Set("alt", alt) 13478 c.urlParams_.Set("prettyPrint", "false") 13479 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:testIamPermissions") 13480 urls += "?" + c.urlParams_.Encode() 13481 req, err := http.NewRequest("POST", urls, body) 13482 if err != nil { 13483 return nil, err 13484 } 13485 req.Header = reqHeaders 13486 googleapi.Expand(req.URL, map[string]string{ 13487 "resource": c.resource, 13488 }) 13489 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13490} 13491 13492// Do executes the "healthcare.projects.locations.datasets.fhirStores.testIamPermissions" call. 13493// Exactly one of *TestIamPermissionsResponse or error will be non-nil. 13494// Any non-2xx status code is an error. Response headers are in either 13495// *TestIamPermissionsResponse.ServerResponse.Header or (if a response 13496// was returned at all) in error.(*googleapi.Error).Header. Use 13497// googleapi.IsNotModified to check whether the returned error was 13498// because http.StatusNotModified was returned. 13499func (c *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 13500 gensupport.SetOptions(c.urlParams_, opts...) 13501 res, err := c.doRequest("json") 13502 if res != nil && res.StatusCode == http.StatusNotModified { 13503 if res.Body != nil { 13504 res.Body.Close() 13505 } 13506 return nil, &googleapi.Error{ 13507 Code: res.StatusCode, 13508 Header: res.Header, 13509 } 13510 } 13511 if err != nil { 13512 return nil, err 13513 } 13514 defer googleapi.CloseBody(res) 13515 if err := googleapi.CheckResponse(res); err != nil { 13516 return nil, err 13517 } 13518 ret := &TestIamPermissionsResponse{ 13519 ServerResponse: googleapi.ServerResponse{ 13520 Header: res.Header, 13521 HTTPStatusCode: res.StatusCode, 13522 }, 13523 } 13524 target := &ret 13525 if err := gensupport.DecodeResponse(target, res); err != nil { 13526 return nil, err 13527 } 13528 return ret, nil 13529 // { 13530 // "description": "Returns permissions that a caller has on the specified resource. If the\nresource does not exist, this will return an empty set of permissions, not\na NOT_FOUND error.\n\nThere is no permission required to make this API call.", 13531 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}:testIamPermissions", 13532 // "httpMethod": "POST", 13533 // "id": "healthcare.projects.locations.datasets.fhirStores.testIamPermissions", 13534 // "parameterOrder": [ 13535 // "resource" 13536 // ], 13537 // "parameters": { 13538 // "resource": { 13539 // "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", 13540 // "location": "path", 13541 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/.+$", 13542 // "required": true, 13543 // "type": "string" 13544 // } 13545 // }, 13546 // "path": "v1alpha2/{+resource}:testIamPermissions", 13547 // "request": { 13548 // "$ref": "TestIamPermissionsRequest" 13549 // }, 13550 // "response": { 13551 // "$ref": "TestIamPermissionsResponse" 13552 // }, 13553 // "scopes": [ 13554 // "https://www.googleapis.com/auth/cloud-platform" 13555 // ] 13556 // } 13557 13558} 13559 13560// method id "healthcare.projects.locations.datasets.fhirStores.fhir.Observation-lastn": 13561 13562type ProjectsLocationsDatasetsFhirStoresFhirObservationLastnCall struct { 13563 s *Service 13564 parent string 13565 urlParams_ gensupport.URLParams 13566 ifNoneMatch_ string 13567 ctx_ context.Context 13568 header_ http.Header 13569} 13570 13571// ObservationLastn: Retrieves the N most recent `Observation` resources 13572// for a subject matching 13573// search criteria specified as query parameters, grouped 13574// by 13575// `Observation.code`, sorted from most recent to oldest. 13576// 13577// Implements the FHIR extended 13578// operation 13579// [Observation-lastn](http://hl7.org/implement/standards/fhir/ 13580// STU3/observation-operations.html#lastn). 13581// 13582// Search terms are provided as query parameters following the same 13583// pattern as 13584// the search method. This operation accepts an additional 13585// query parameter `max`, which specifies N, the maximum number 13586// of 13587// Observations to return from each group, with a default of 1. 13588// 13589// On success, the response body will contain a JSON-encoded 13590// representation 13591// of a `Bundle` resource of type `searchset`, containing the results of 13592// the 13593// operation. 13594// Errors generated by the FHIR store will contain a 13595// JSON-encoded 13596// `OperationOutcome` resource describing the reason for the error. If 13597// the 13598// request cannot be mapped to a valid API method on a FHIR store, a 13599// generic 13600// GCP error might be returned instead. 13601func (r *ProjectsLocationsDatasetsFhirStoresFhirService) ObservationLastn(parent string) *ProjectsLocationsDatasetsFhirStoresFhirObservationLastnCall { 13602 c := &ProjectsLocationsDatasetsFhirStoresFhirObservationLastnCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13603 c.parent = parent 13604 return c 13605} 13606 13607// Fields allows partial responses to be retrieved. See 13608// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13609// for more information. 13610func (c *ProjectsLocationsDatasetsFhirStoresFhirObservationLastnCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirObservationLastnCall { 13611 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13612 return c 13613} 13614 13615// IfNoneMatch sets the optional parameter which makes the operation 13616// fail if the object's ETag matches the given value. This is useful for 13617// getting updates only after the object has changed since the last 13618// request. Use googleapi.IsNotModified to check whether the response 13619// error from Do is the result of In-None-Match. 13620func (c *ProjectsLocationsDatasetsFhirStoresFhirObservationLastnCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirObservationLastnCall { 13621 c.ifNoneMatch_ = entityTag 13622 return c 13623} 13624 13625// Context sets the context to be used in this call's Do method. Any 13626// pending HTTP request will be aborted if the provided context is 13627// canceled. 13628func (c *ProjectsLocationsDatasetsFhirStoresFhirObservationLastnCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirObservationLastnCall { 13629 c.ctx_ = ctx 13630 return c 13631} 13632 13633// Header returns an http.Header that can be modified by the caller to 13634// add HTTP headers to the request. 13635func (c *ProjectsLocationsDatasetsFhirStoresFhirObservationLastnCall) Header() http.Header { 13636 if c.header_ == nil { 13637 c.header_ = make(http.Header) 13638 } 13639 return c.header_ 13640} 13641 13642func (c *ProjectsLocationsDatasetsFhirStoresFhirObservationLastnCall) doRequest(alt string) (*http.Response, error) { 13643 reqHeaders := make(http.Header) 13644 for k, v := range c.header_ { 13645 reqHeaders[k] = v 13646 } 13647 reqHeaders.Set("User-Agent", c.s.userAgent()) 13648 if c.ifNoneMatch_ != "" { 13649 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13650 } 13651 var body io.Reader = nil 13652 c.urlParams_.Set("alt", alt) 13653 c.urlParams_.Set("prettyPrint", "false") 13654 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/fhir/Observation/$lastn") 13655 urls += "?" + c.urlParams_.Encode() 13656 req, err := http.NewRequest("GET", urls, body) 13657 if err != nil { 13658 return nil, err 13659 } 13660 req.Header = reqHeaders 13661 googleapi.Expand(req.URL, map[string]string{ 13662 "parent": c.parent, 13663 }) 13664 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13665} 13666 13667// Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.Observation-lastn" call. 13668func (c *ProjectsLocationsDatasetsFhirStoresFhirObservationLastnCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 13669 gensupport.SetOptions(c.urlParams_, opts...) 13670 return c.doRequest("") 13671 // { 13672 // "description": "Retrieves the N most recent `Observation` resources for a subject matching\nsearch criteria specified as query parameters, grouped by\n`Observation.code`, sorted from most recent to oldest.\n\nImplements the FHIR extended operation\n[Observation-lastn](http://hl7.org/implement/standards/fhir/STU3/observation-operations.html#lastn).\n\nSearch terms are provided as query parameters following the same pattern as\nthe search method. This operation accepts an additional\nquery parameter `max`, which specifies N, the maximum number of\nObservations to return from each group, with a default of 1.\n\nOn success, the response body will contain a JSON-encoded representation\nof a `Bundle` resource of type `searchset`, containing the results of the\noperation.\nErrors generated by the FHIR store will contain a JSON-encoded\n`OperationOutcome` resource describing the reason for the error. If the\nrequest cannot be mapped to a valid API method on a FHIR store, a generic\nGCP error might be returned instead.", 13673 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/Observation/$lastn", 13674 // "httpMethod": "GET", 13675 // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.Observation-lastn", 13676 // "parameterOrder": [ 13677 // "parent" 13678 // ], 13679 // "parameters": { 13680 // "parent": { 13681 // "description": "Name of the FHIR store to retrieve resources from.", 13682 // "location": "path", 13683 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$", 13684 // "required": true, 13685 // "type": "string" 13686 // } 13687 // }, 13688 // "path": "v1alpha2/{+parent}/fhir/Observation/$lastn", 13689 // "response": { 13690 // "$ref": "HttpBody" 13691 // }, 13692 // "scopes": [ 13693 // "https://www.googleapis.com/auth/cloud-platform" 13694 // ] 13695 // } 13696 13697} 13698 13699// method id "healthcare.projects.locations.datasets.fhirStores.fhir.Patient-everything": 13700 13701type ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall struct { 13702 s *Service 13703 name string 13704 urlParams_ gensupport.URLParams 13705 ifNoneMatch_ string 13706 ctx_ context.Context 13707 header_ http.Header 13708} 13709 13710// PatientEverything: Retrieves all the resources in the patient 13711// compartment for a `Patient` 13712// resource. 13713// 13714// Implements the FHIR extended 13715// operation 13716// [Patient-everything](http://hl7.org/implement/standards/fhir 13717// /STU3/patient-operations.html#everything). 13718// 13719// On success, the response body will contain a JSON-encoded 13720// representation 13721// of a `Bundle` resource of type `searchset`, containing the results of 13722// the 13723// operation. 13724// Errors generated by the FHIR store will contain a 13725// JSON-encoded 13726// `OperationOutcome` resource describing the reason for the error. If 13727// the 13728// request cannot be mapped to a valid API method on a FHIR store, a 13729// generic 13730// GCP error might be returned instead. 13731func (r *ProjectsLocationsDatasetsFhirStoresFhirService) PatientEverything(name string) *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall { 13732 c := &ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13733 c.name = name 13734 return c 13735} 13736 13737// End sets the optional parameter "end": The response includes records 13738// prior to the end date. If no end date is 13739// provided, all records subsequent to the start date are in scope. 13740func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) End(end string) *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall { 13741 c.urlParams_.Set("end", end) 13742 return c 13743} 13744 13745// Start sets the optional parameter "start": The response includes 13746// records subsequent to the start date. If no start 13747// date is provided, all records prior to the end date are in scope. 13748func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) Start(start string) *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall { 13749 c.urlParams_.Set("start", start) 13750 return c 13751} 13752 13753// Fields allows partial responses to be retrieved. See 13754// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13755// for more information. 13756func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall { 13757 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13758 return c 13759} 13760 13761// IfNoneMatch sets the optional parameter which makes the operation 13762// fail if the object's ETag matches the given value. This is useful for 13763// getting updates only after the object has changed since the last 13764// request. Use googleapi.IsNotModified to check whether the response 13765// error from Do is the result of In-None-Match. 13766func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall { 13767 c.ifNoneMatch_ = entityTag 13768 return c 13769} 13770 13771// Context sets the context to be used in this call's Do method. Any 13772// pending HTTP request will be aborted if the provided context is 13773// canceled. 13774func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall { 13775 c.ctx_ = ctx 13776 return c 13777} 13778 13779// Header returns an http.Header that can be modified by the caller to 13780// add HTTP headers to the request. 13781func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) Header() http.Header { 13782 if c.header_ == nil { 13783 c.header_ = make(http.Header) 13784 } 13785 return c.header_ 13786} 13787 13788func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) doRequest(alt string) (*http.Response, error) { 13789 reqHeaders := make(http.Header) 13790 for k, v := range c.header_ { 13791 reqHeaders[k] = v 13792 } 13793 reqHeaders.Set("User-Agent", c.s.userAgent()) 13794 if c.ifNoneMatch_ != "" { 13795 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13796 } 13797 var body io.Reader = nil 13798 c.urlParams_.Set("alt", alt) 13799 c.urlParams_.Set("prettyPrint", "false") 13800 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}/$everything") 13801 urls += "?" + c.urlParams_.Encode() 13802 req, err := http.NewRequest("GET", urls, body) 13803 if err != nil { 13804 return nil, err 13805 } 13806 req.Header = reqHeaders 13807 googleapi.Expand(req.URL, map[string]string{ 13808 "name": c.name, 13809 }) 13810 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13811} 13812 13813// Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.Patient-everything" call. 13814func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 13815 gensupport.SetOptions(c.urlParams_, opts...) 13816 return c.doRequest("") 13817 // { 13818 // "description": "Retrieves all the resources in the patient compartment for a `Patient`\nresource.\n\nImplements the FHIR extended operation\n[Patient-everything](http://hl7.org/implement/standards/fhir/STU3/patient-operations.html#everything).\n\nOn success, the response body will contain a JSON-encoded representation\nof a `Bundle` resource of type `searchset`, containing the results of the\noperation.\nErrors generated by the FHIR store will contain a JSON-encoded\n`OperationOutcome` resource describing the reason for the error. If the\nrequest cannot be mapped to a valid API method on a FHIR store, a generic\nGCP error might be returned instead.", 13819 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/Patient/{PatientId}/$everything", 13820 // "httpMethod": "GET", 13821 // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.Patient-everything", 13822 // "parameterOrder": [ 13823 // "name" 13824 // ], 13825 // "parameters": { 13826 // "end": { 13827 // "description": "The response includes records prior to the end date. If no end date is\nprovided, all records subsequent to the start date are in scope.", 13828 // "location": "query", 13829 // "type": "string" 13830 // }, 13831 // "name": { 13832 // "description": "Name of the `Patient` resource for which the information is required.", 13833 // "location": "path", 13834 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/fhir/Patient/[^/]+$", 13835 // "required": true, 13836 // "type": "string" 13837 // }, 13838 // "start": { 13839 // "description": "The response includes records subsequent to the start date. If no start\ndate is provided, all records prior to the end date are in scope.", 13840 // "location": "query", 13841 // "type": "string" 13842 // } 13843 // }, 13844 // "path": "v1alpha2/{+name}/$everything", 13845 // "response": { 13846 // "$ref": "HttpBody" 13847 // }, 13848 // "scopes": [ 13849 // "https://www.googleapis.com/auth/cloud-platform" 13850 // ] 13851 // } 13852 13853} 13854 13855// method id "healthcare.projects.locations.datasets.fhirStores.fhir.Resource-purge": 13856 13857type ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall struct { 13858 s *Service 13859 name string 13860 urlParams_ gensupport.URLParams 13861 ctx_ context.Context 13862 header_ http.Header 13863} 13864 13865// ResourcePurge: Deletes all the historical versions of a resource 13866// (excluding the current 13867// version) from the FHIR store. To remove all versions of a resource, 13868// first 13869// delete the current version and then call this method. 13870// 13871// This is not a FHIR standard operation. 13872func (r *ProjectsLocationsDatasetsFhirStoresFhirService) ResourcePurge(name string) *ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall { 13873 c := &ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13874 c.name = name 13875 return c 13876} 13877 13878// Fields allows partial responses to be retrieved. See 13879// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13880// for more information. 13881func (c *ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall { 13882 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13883 return c 13884} 13885 13886// Context sets the context to be used in this call's Do method. Any 13887// pending HTTP request will be aborted if the provided context is 13888// canceled. 13889func (c *ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall { 13890 c.ctx_ = ctx 13891 return c 13892} 13893 13894// Header returns an http.Header that can be modified by the caller to 13895// add HTTP headers to the request. 13896func (c *ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall) Header() http.Header { 13897 if c.header_ == nil { 13898 c.header_ = make(http.Header) 13899 } 13900 return c.header_ 13901} 13902 13903func (c *ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall) doRequest(alt string) (*http.Response, error) { 13904 reqHeaders := make(http.Header) 13905 for k, v := range c.header_ { 13906 reqHeaders[k] = v 13907 } 13908 reqHeaders.Set("User-Agent", c.s.userAgent()) 13909 var body io.Reader = nil 13910 c.urlParams_.Set("alt", alt) 13911 c.urlParams_.Set("prettyPrint", "false") 13912 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}/$purge") 13913 urls += "?" + c.urlParams_.Encode() 13914 req, err := http.NewRequest("DELETE", urls, body) 13915 if err != nil { 13916 return nil, err 13917 } 13918 req.Header = reqHeaders 13919 googleapi.Expand(req.URL, map[string]string{ 13920 "name": c.name, 13921 }) 13922 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13923} 13924 13925// Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.Resource-purge" call. 13926// Exactly one of *Empty or error will be non-nil. Any non-2xx status 13927// code is an error. Response headers are in either 13928// *Empty.ServerResponse.Header or (if a response was returned at all) 13929// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 13930// check whether the returned error was because http.StatusNotModified 13931// was returned. 13932func (c *ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 13933 gensupport.SetOptions(c.urlParams_, opts...) 13934 res, err := c.doRequest("json") 13935 if res != nil && res.StatusCode == http.StatusNotModified { 13936 if res.Body != nil { 13937 res.Body.Close() 13938 } 13939 return nil, &googleapi.Error{ 13940 Code: res.StatusCode, 13941 Header: res.Header, 13942 } 13943 } 13944 if err != nil { 13945 return nil, err 13946 } 13947 defer googleapi.CloseBody(res) 13948 if err := googleapi.CheckResponse(res); err != nil { 13949 return nil, err 13950 } 13951 ret := &Empty{ 13952 ServerResponse: googleapi.ServerResponse{ 13953 Header: res.Header, 13954 HTTPStatusCode: res.StatusCode, 13955 }, 13956 } 13957 target := &ret 13958 if err := gensupport.DecodeResponse(target, res); err != nil { 13959 return nil, err 13960 } 13961 return ret, nil 13962 // { 13963 // "description": "Deletes all the historical versions of a resource (excluding the current\nversion) from the FHIR store. To remove all versions of a resource, first\ndelete the current version and then call this method.\n\nThis is not a FHIR standard operation.", 13964 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{fhirId}/{fhirId1}/$purge", 13965 // "httpMethod": "DELETE", 13966 // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.Resource-purge", 13967 // "parameterOrder": [ 13968 // "name" 13969 // ], 13970 // "parameters": { 13971 // "name": { 13972 // "description": "The name of the resource to purge.", 13973 // "location": "path", 13974 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/fhir/[^/]+/[^/]+$", 13975 // "required": true, 13976 // "type": "string" 13977 // } 13978 // }, 13979 // "path": "v1alpha2/{+name}/$purge", 13980 // "response": { 13981 // "$ref": "Empty" 13982 // }, 13983 // "scopes": [ 13984 // "https://www.googleapis.com/auth/cloud-platform" 13985 // ] 13986 // } 13987 13988} 13989 13990// method id "healthcare.projects.locations.datasets.fhirStores.fhir.capabilities": 13991 13992type ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall struct { 13993 s *Service 13994 name string 13995 urlParams_ gensupport.URLParams 13996 ifNoneMatch_ string 13997 ctx_ context.Context 13998 header_ http.Header 13999} 14000 14001// Capabilities: Gets the FHIR 14002// [capability 14003// statement](http://hl7.org/implement/standards/fhir/STU3/ca 14004// pabilitystatement.html) 14005// for the store, which contains a description of functionality 14006// supported by 14007// the server. 14008// 14009// Implements the FHIR standard 14010// [capabilities 14011// interaction](http://hl7.org/implement/standards/fhir/STU 14012// 3/http.html#capabilities). 14013// 14014// On success, the response body will contain a JSON-encoded 14015// representation 14016// of a `CapabilityStatement` resource. 14017func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Capabilities(name string) *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall { 14018 c := &ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14019 c.name = name 14020 return c 14021} 14022 14023// Fields allows partial responses to be retrieved. See 14024// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14025// for more information. 14026func (c *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall { 14027 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14028 return c 14029} 14030 14031// IfNoneMatch sets the optional parameter which makes the operation 14032// fail if the object's ETag matches the given value. This is useful for 14033// getting updates only after the object has changed since the last 14034// request. Use googleapi.IsNotModified to check whether the response 14035// error from Do is the result of In-None-Match. 14036func (c *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall { 14037 c.ifNoneMatch_ = entityTag 14038 return c 14039} 14040 14041// Context sets the context to be used in this call's Do method. Any 14042// pending HTTP request will be aborted if the provided context is 14043// canceled. 14044func (c *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall { 14045 c.ctx_ = ctx 14046 return c 14047} 14048 14049// Header returns an http.Header that can be modified by the caller to 14050// add HTTP headers to the request. 14051func (c *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall) Header() http.Header { 14052 if c.header_ == nil { 14053 c.header_ = make(http.Header) 14054 } 14055 return c.header_ 14056} 14057 14058func (c *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall) doRequest(alt string) (*http.Response, error) { 14059 reqHeaders := make(http.Header) 14060 for k, v := range c.header_ { 14061 reqHeaders[k] = v 14062 } 14063 reqHeaders.Set("User-Agent", c.s.userAgent()) 14064 if c.ifNoneMatch_ != "" { 14065 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14066 } 14067 var body io.Reader = nil 14068 c.urlParams_.Set("alt", alt) 14069 c.urlParams_.Set("prettyPrint", "false") 14070 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}/fhir/metadata") 14071 urls += "?" + c.urlParams_.Encode() 14072 req, err := http.NewRequest("GET", urls, body) 14073 if err != nil { 14074 return nil, err 14075 } 14076 req.Header = reqHeaders 14077 googleapi.Expand(req.URL, map[string]string{ 14078 "name": c.name, 14079 }) 14080 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14081} 14082 14083// Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.capabilities" call. 14084func (c *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 14085 gensupport.SetOptions(c.urlParams_, opts...) 14086 return c.doRequest("") 14087 // { 14088 // "description": "Gets the FHIR [capability\nstatement](http://hl7.org/implement/standards/fhir/STU3/capabilitystatement.html)\nfor the store, which contains a description of functionality supported by\nthe server.\n\nImplements the FHIR standard [capabilities\ninteraction](http://hl7.org/implement/standards/fhir/STU3/http.html#capabilities).\n\nOn success, the response body will contain a JSON-encoded representation\nof a `CapabilityStatement` resource.", 14089 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/metadata", 14090 // "httpMethod": "GET", 14091 // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.capabilities", 14092 // "parameterOrder": [ 14093 // "name" 14094 // ], 14095 // "parameters": { 14096 // "name": { 14097 // "description": "Name of the FHIR store to retrieve the capabilities for.", 14098 // "location": "path", 14099 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$", 14100 // "required": true, 14101 // "type": "string" 14102 // } 14103 // }, 14104 // "path": "v1alpha2/{+name}/fhir/metadata", 14105 // "response": { 14106 // "$ref": "HttpBody" 14107 // }, 14108 // "scopes": [ 14109 // "https://www.googleapis.com/auth/cloud-platform" 14110 // ] 14111 // } 14112 14113} 14114 14115// method id "healthcare.projects.locations.datasets.fhirStores.fhir.conditionalDelete": 14116 14117type ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteCall struct { 14118 s *Service 14119 parent string 14120 type_ string 14121 urlParams_ gensupport.URLParams 14122 ctx_ context.Context 14123 header_ http.Header 14124} 14125 14126// ConditionalDelete: Deletes FHIR resources that match a search 14127// query. 14128// 14129// Implements the FHIR standard [conditional 14130// delete 14131// interaction](http://hl7.org/implement/standards/fhir/STU3/http. 14132// html#2.21.0.13.1). 14133// If multiple resources match, all of them will be deleted. 14134// 14135// Search terms are provided as query parameters following the same 14136// pattern as 14137// the search method. 14138// 14139// Note: Unless resource versioning is disabled by setting 14140// the 14141// disable_resource_versioning flag 14142// on the FHIR store, the deleted resources will be moved to a 14143// history 14144// repository that can still be retrieved through vread 14145// and related methods, unless they are removed by the 14146// purge method. 14147func (r *ProjectsLocationsDatasetsFhirStoresFhirService) ConditionalDelete(parent string, type_ string) *ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteCall { 14148 c := &ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14149 c.parent = parent 14150 c.type_ = type_ 14151 return c 14152} 14153 14154// Fields allows partial responses to be retrieved. See 14155// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14156// for more information. 14157func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteCall { 14158 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14159 return c 14160} 14161 14162// Context sets the context to be used in this call's Do method. Any 14163// pending HTTP request will be aborted if the provided context is 14164// canceled. 14165func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteCall { 14166 c.ctx_ = ctx 14167 return c 14168} 14169 14170// Header returns an http.Header that can be modified by the caller to 14171// add HTTP headers to the request. 14172func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteCall) Header() http.Header { 14173 if c.header_ == nil { 14174 c.header_ = make(http.Header) 14175 } 14176 return c.header_ 14177} 14178 14179func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteCall) doRequest(alt string) (*http.Response, error) { 14180 reqHeaders := make(http.Header) 14181 for k, v := range c.header_ { 14182 reqHeaders[k] = v 14183 } 14184 reqHeaders.Set("User-Agent", c.s.userAgent()) 14185 var body io.Reader = nil 14186 c.urlParams_.Set("alt", alt) 14187 c.urlParams_.Set("prettyPrint", "false") 14188 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/fhir/{+type}") 14189 urls += "?" + c.urlParams_.Encode() 14190 req, err := http.NewRequest("DELETE", urls, body) 14191 if err != nil { 14192 return nil, err 14193 } 14194 req.Header = reqHeaders 14195 googleapi.Expand(req.URL, map[string]string{ 14196 "parent": c.parent, 14197 "type": c.type_, 14198 }) 14199 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14200} 14201 14202// Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.conditionalDelete" call. 14203// Exactly one of *Empty or error will be non-nil. Any non-2xx status 14204// code is an error. Response headers are in either 14205// *Empty.ServerResponse.Header or (if a response was returned at all) 14206// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 14207// check whether the returned error was because http.StatusNotModified 14208// was returned. 14209func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 14210 gensupport.SetOptions(c.urlParams_, opts...) 14211 res, err := c.doRequest("json") 14212 if res != nil && res.StatusCode == http.StatusNotModified { 14213 if res.Body != nil { 14214 res.Body.Close() 14215 } 14216 return nil, &googleapi.Error{ 14217 Code: res.StatusCode, 14218 Header: res.Header, 14219 } 14220 } 14221 if err != nil { 14222 return nil, err 14223 } 14224 defer googleapi.CloseBody(res) 14225 if err := googleapi.CheckResponse(res); err != nil { 14226 return nil, err 14227 } 14228 ret := &Empty{ 14229 ServerResponse: googleapi.ServerResponse{ 14230 Header: res.Header, 14231 HTTPStatusCode: res.StatusCode, 14232 }, 14233 } 14234 target := &ret 14235 if err := gensupport.DecodeResponse(target, res); err != nil { 14236 return nil, err 14237 } 14238 return ret, nil 14239 // { 14240 // "description": "Deletes FHIR resources that match a search query.\n\nImplements the FHIR standard [conditional delete\ninteraction](http://hl7.org/implement/standards/fhir/STU3/http.html#2.21.0.13.1).\nIf multiple resources match, all of them will be deleted.\n\nSearch terms are provided as query parameters following the same pattern as\nthe search method.\n\nNote: Unless resource versioning is disabled by setting the\ndisable_resource_versioning flag\non the FHIR store, the deleted resources will be moved to a history\nrepository that can still be retrieved through vread\nand related methods, unless they are removed by the\npurge method.", 14241 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{fhirId}", 14242 // "httpMethod": "DELETE", 14243 // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.conditionalDelete", 14244 // "parameterOrder": [ 14245 // "parent", 14246 // "type" 14247 // ], 14248 // "parameters": { 14249 // "parent": { 14250 // "description": "The name of the FHIR store this resource belongs to.", 14251 // "location": "path", 14252 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$", 14253 // "required": true, 14254 // "type": "string" 14255 // }, 14256 // "type": { 14257 // "description": "The FHIR resource type to delete, such as Patient or Observation. For a\ncomplete list, see the [FHIR Resource\nIndex](http://hl7.org/implement/standards/fhir/STU3/resourcelist.html).", 14258 // "location": "path", 14259 // "pattern": "^[^/]+$", 14260 // "required": true, 14261 // "type": "string" 14262 // } 14263 // }, 14264 // "path": "v1alpha2/{+parent}/fhir/{+type}", 14265 // "response": { 14266 // "$ref": "Empty" 14267 // }, 14268 // "scopes": [ 14269 // "https://www.googleapis.com/auth/cloud-platform" 14270 // ] 14271 // } 14272 14273} 14274 14275// method id "healthcare.projects.locations.datasets.fhirStores.fhir.conditionalPatch": 14276 14277type ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchCall struct { 14278 s *Service 14279 parent string 14280 type_ string 14281 body_ io.Reader 14282 urlParams_ gensupport.URLParams 14283 ctx_ context.Context 14284 header_ http.Header 14285} 14286 14287// ConditionalPatch: If a resource is found based on the search criteria 14288// specified in the query 14289// parameters, updates part of that resource by applying the 14290// operations 14291// specified in a [JSON Patch](http://jsonpatch.com/) 14292// document. 14293// 14294// Implements the FHIR standard [conditional 14295// patch 14296// interaction](http://hl7.org/implement/standards/fhir/STU3/http.h 14297// tml#patch). 14298// 14299// Search terms are provided as query parameters following the same 14300// pattern as 14301// the search method. 14302// 14303// If the search criteria identify more than one match, the request 14304// will 14305// return a `412 Precondition Failed` error. 14306// 14307// The request body must contain a JSON Patch document, and the 14308// request 14309// headers must contain `Content-Type: application/json-patch+json`. 14310// 14311// On success, the response body will contain a JSON-encoded 14312// representation 14313// of the updated resource, including the server-assigned version 14314// ID. 14315// Errors generated by the FHIR store will contain a 14316// JSON-encoded 14317// `OperationOutcome` resource describing the reason for the error. If 14318// the 14319// request cannot be mapped to a valid API method on a FHIR store, a 14320// generic 14321// GCP error might be returned instead. 14322func (r *ProjectsLocationsDatasetsFhirStoresFhirService) ConditionalPatch(parent string, type_ string, body_ io.Reader) *ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchCall { 14323 c := &ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14324 c.parent = parent 14325 c.type_ = type_ 14326 c.body_ = body_ 14327 return c 14328} 14329 14330// Fields allows partial responses to be retrieved. See 14331// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14332// for more information. 14333func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchCall { 14334 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14335 return c 14336} 14337 14338// Context sets the context to be used in this call's Do method. Any 14339// pending HTTP request will be aborted if the provided context is 14340// canceled. 14341func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchCall { 14342 c.ctx_ = ctx 14343 return c 14344} 14345 14346// Header returns an http.Header that can be modified by the caller to 14347// add HTTP headers to the request. 14348func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchCall) Header() http.Header { 14349 if c.header_ == nil { 14350 c.header_ = make(http.Header) 14351 } 14352 return c.header_ 14353} 14354 14355func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchCall) doRequest(alt string) (*http.Response, error) { 14356 reqHeaders := make(http.Header) 14357 for k, v := range c.header_ { 14358 reqHeaders[k] = v 14359 } 14360 reqHeaders.Set("User-Agent", c.s.userAgent()) 14361 var body io.Reader = nil 14362 body = c.body_ 14363 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/fhir/{+type}") 14364 urls += "?" + c.urlParams_.Encode() 14365 req, err := http.NewRequest("PATCH", urls, body) 14366 if err != nil { 14367 return nil, err 14368 } 14369 req.Header = reqHeaders 14370 googleapi.Expand(req.URL, map[string]string{ 14371 "parent": c.parent, 14372 "type": c.type_, 14373 }) 14374 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14375} 14376 14377// Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.conditionalPatch" call. 14378func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 14379 gensupport.SetOptions(c.urlParams_, opts...) 14380 return c.doRequest("") 14381 // { 14382 // "description": "If a resource is found based on the search criteria specified in the query\nparameters, updates part of that resource by applying the operations\nspecified in a [JSON Patch](http://jsonpatch.com/) document.\n\nImplements the FHIR standard [conditional patch\ninteraction](http://hl7.org/implement/standards/fhir/STU3/http.html#patch).\n\nSearch terms are provided as query parameters following the same pattern as\nthe search method.\n\nIf the search criteria identify more than one match, the request will\nreturn a `412 Precondition Failed` error.\n\nThe request body must contain a JSON Patch document, and the request\nheaders must contain `Content-Type: application/json-patch+json`.\n\nOn success, the response body will contain a JSON-encoded representation\nof the updated resource, including the server-assigned version ID.\nErrors generated by the FHIR store will contain a JSON-encoded\n`OperationOutcome` resource describing the reason for the error. If the\nrequest cannot be mapped to a valid API method on a FHIR store, a generic\nGCP error might be returned instead.", 14383 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{fhirId}", 14384 // "httpMethod": "PATCH", 14385 // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.conditionalPatch", 14386 // "parameterOrder": [ 14387 // "parent", 14388 // "type" 14389 // ], 14390 // "parameters": { 14391 // "parent": { 14392 // "description": "The name of the FHIR store this resource belongs to.", 14393 // "location": "path", 14394 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$", 14395 // "required": true, 14396 // "type": "string" 14397 // }, 14398 // "type": { 14399 // "description": "The FHIR resource type to update, such as Patient or Observation. For a\ncomplete list, see the [FHIR Resource\nIndex](http://hl7.org/implement/standards/fhir/STU3/resourcelist.html).", 14400 // "location": "path", 14401 // "pattern": "^[^/]+$", 14402 // "required": true, 14403 // "type": "string" 14404 // } 14405 // }, 14406 // "path": "v1alpha2/{+parent}/fhir/{+type}", 14407 // "request": { 14408 // "$ref": "HttpBody" 14409 // }, 14410 // "response": { 14411 // "$ref": "HttpBody" 14412 // }, 14413 // "scopes": [ 14414 // "https://www.googleapis.com/auth/cloud-platform" 14415 // ] 14416 // } 14417 14418} 14419 14420// method id "healthcare.projects.locations.datasets.fhirStores.fhir.conditionalUpdate": 14421 14422type ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateCall struct { 14423 s *Service 14424 parent string 14425 type_ string 14426 body_ io.Reader 14427 urlParams_ gensupport.URLParams 14428 ctx_ context.Context 14429 header_ http.Header 14430} 14431 14432// ConditionalUpdate: If a resource is found based on the search 14433// criteria specified in the query 14434// parameters, updates the entire contents of that resource. 14435// 14436// Implements the FHIR standard [conditional 14437// update 14438// interaction](http://hl7.org/implement/standards/fhir/STU3/http. 14439// html#cond-update). 14440// 14441// Search terms are provided as query parameters following the same 14442// pattern as 14443// the search method. 14444// 14445// If the search criteria identify more than one match, the request 14446// will 14447// return a `412 Precondition Failed` error. 14448// If the search criteria identify zero matches, and the supplied 14449// resource 14450// body contains an `id`, and the FHIR store has 14451// enable_update_create set, creates the 14452// resource with the client-specified ID. If the search criteria 14453// identify zero 14454// matches, and the supplied resource body does not contain an `id`, 14455// the 14456// resource will be created with a server-assigned ID as per the 14457// create method. 14458// 14459// The request body must contain a JSON-encoded FHIR resource, and the 14460// request 14461// headers must contain `Content-Type: application/fhir+json`. 14462// 14463// On success, the response body will contain a JSON-encoded 14464// representation 14465// of the updated resource, including the server-assigned version 14466// ID. 14467// Errors generated by the FHIR store will contain a 14468// JSON-encoded 14469// `OperationOutcome` resource describing the reason for the error. If 14470// the 14471// request cannot be mapped to a valid API method on a FHIR store, a 14472// generic 14473// GCP error might be returned instead. 14474func (r *ProjectsLocationsDatasetsFhirStoresFhirService) ConditionalUpdate(parent string, type_ string, body_ io.Reader) *ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateCall { 14475 c := &ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14476 c.parent = parent 14477 c.type_ = type_ 14478 c.body_ = body_ 14479 return c 14480} 14481 14482// Fields allows partial responses to be retrieved. See 14483// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14484// for more information. 14485func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateCall { 14486 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14487 return c 14488} 14489 14490// Context sets the context to be used in this call's Do method. Any 14491// pending HTTP request will be aborted if the provided context is 14492// canceled. 14493func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateCall { 14494 c.ctx_ = ctx 14495 return c 14496} 14497 14498// Header returns an http.Header that can be modified by the caller to 14499// add HTTP headers to the request. 14500func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateCall) Header() http.Header { 14501 if c.header_ == nil { 14502 c.header_ = make(http.Header) 14503 } 14504 return c.header_ 14505} 14506 14507func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateCall) doRequest(alt string) (*http.Response, error) { 14508 reqHeaders := make(http.Header) 14509 for k, v := range c.header_ { 14510 reqHeaders[k] = v 14511 } 14512 reqHeaders.Set("User-Agent", c.s.userAgent()) 14513 var body io.Reader = nil 14514 body = c.body_ 14515 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/fhir/{+type}") 14516 urls += "?" + c.urlParams_.Encode() 14517 req, err := http.NewRequest("PUT", urls, body) 14518 if err != nil { 14519 return nil, err 14520 } 14521 req.Header = reqHeaders 14522 googleapi.Expand(req.URL, map[string]string{ 14523 "parent": c.parent, 14524 "type": c.type_, 14525 }) 14526 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14527} 14528 14529// Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.conditionalUpdate" call. 14530func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 14531 gensupport.SetOptions(c.urlParams_, opts...) 14532 return c.doRequest("") 14533 // { 14534 // "description": "If a resource is found based on the search criteria specified in the query\nparameters, updates the entire contents of that resource.\n\nImplements the FHIR standard [conditional update\ninteraction](http://hl7.org/implement/standards/fhir/STU3/http.html#cond-update).\n\nSearch terms are provided as query parameters following the same pattern as\nthe search method.\n\nIf the search criteria identify more than one match, the request will\nreturn a `412 Precondition Failed` error.\nIf the search criteria identify zero matches, and the supplied resource\nbody contains an `id`, and the FHIR store has\nenable_update_create set, creates the\nresource with the client-specified ID. If the search criteria identify zero\nmatches, and the supplied resource body does not contain an `id`, the\nresource will be created with a server-assigned ID as per the\ncreate method.\n\nThe request body must contain a JSON-encoded FHIR resource, and the request\nheaders must contain `Content-Type: application/fhir+json`.\n\nOn success, the response body will contain a JSON-encoded representation\nof the updated resource, including the server-assigned version ID.\nErrors generated by the FHIR store will contain a JSON-encoded\n`OperationOutcome` resource describing the reason for the error. If the\nrequest cannot be mapped to a valid API method on a FHIR store, a generic\nGCP error might be returned instead.", 14535 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{fhirId}", 14536 // "httpMethod": "PUT", 14537 // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.conditionalUpdate", 14538 // "parameterOrder": [ 14539 // "parent", 14540 // "type" 14541 // ], 14542 // "parameters": { 14543 // "parent": { 14544 // "description": "The name of the FHIR store this resource belongs to.", 14545 // "location": "path", 14546 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$", 14547 // "required": true, 14548 // "type": "string" 14549 // }, 14550 // "type": { 14551 // "description": "The FHIR resource type to update, such as Patient or Observation. For a\ncomplete list, see the [FHIR Resource\nIndex](http://hl7.org/implement/standards/fhir/STU3/resourcelist.html).\nMust match the resource type in the provided content.", 14552 // "location": "path", 14553 // "pattern": "^[^/]+$", 14554 // "required": true, 14555 // "type": "string" 14556 // } 14557 // }, 14558 // "path": "v1alpha2/{+parent}/fhir/{+type}", 14559 // "request": { 14560 // "$ref": "HttpBody" 14561 // }, 14562 // "response": { 14563 // "$ref": "HttpBody" 14564 // }, 14565 // "scopes": [ 14566 // "https://www.googleapis.com/auth/cloud-platform" 14567 // ] 14568 // } 14569 14570} 14571 14572// method id "healthcare.projects.locations.datasets.fhirStores.fhir.create": 14573 14574type ProjectsLocationsDatasetsFhirStoresFhirCreateCall struct { 14575 s *Service 14576 parent string 14577 type_ string 14578 body_ io.Reader 14579 urlParams_ gensupport.URLParams 14580 ctx_ context.Context 14581 header_ http.Header 14582} 14583 14584// Create: Creates a FHIR resource. 14585// 14586// Implements the FHIR standard 14587// [create 14588// interaction](http://hl7.org/implement/standards/fhir/STU3/http 14589// .html#create), 14590// which creates a new resource with a server-assigned resource 14591// ID. 14592// 14593// Also supports the FHIR standard [conditional 14594// create 14595// interaction](http://hl7.org/implement/standards/fhir/STU3/http. 14596// html#ccreate), 14597// specified by supplying an `If-None-Exist` header containing a FHIR 14598// search 14599// query. If no resources match this search query, the server processes 14600// the 14601// create operation as normal. 14602// 14603// The request body must contain a JSON-encoded FHIR resource, and the 14604// request 14605// headers must contain `Content-Type: application/fhir+json`. 14606// 14607// On success, the response body will contain a JSON-encoded 14608// representation 14609// of the resource as it was created on the server, including 14610// the 14611// server-assigned resource ID and version ID. 14612// Errors generated by the FHIR store will contain a 14613// JSON-encoded 14614// `OperationOutcome` resource describing the reason for the error. If 14615// the 14616// request cannot be mapped to a valid API method on a FHIR store, a 14617// generic 14618// GCP error might be returned instead. 14619func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Create(parent string, type_ string, body_ io.Reader) *ProjectsLocationsDatasetsFhirStoresFhirCreateCall { 14620 c := &ProjectsLocationsDatasetsFhirStoresFhirCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14621 c.parent = parent 14622 c.type_ = type_ 14623 c.body_ = body_ 14624 return c 14625} 14626 14627// Fields allows partial responses to be retrieved. See 14628// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14629// for more information. 14630func (c *ProjectsLocationsDatasetsFhirStoresFhirCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirCreateCall { 14631 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14632 return c 14633} 14634 14635// Context sets the context to be used in this call's Do method. Any 14636// pending HTTP request will be aborted if the provided context is 14637// canceled. 14638func (c *ProjectsLocationsDatasetsFhirStoresFhirCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirCreateCall { 14639 c.ctx_ = ctx 14640 return c 14641} 14642 14643// Header returns an http.Header that can be modified by the caller to 14644// add HTTP headers to the request. 14645func (c *ProjectsLocationsDatasetsFhirStoresFhirCreateCall) Header() http.Header { 14646 if c.header_ == nil { 14647 c.header_ = make(http.Header) 14648 } 14649 return c.header_ 14650} 14651 14652func (c *ProjectsLocationsDatasetsFhirStoresFhirCreateCall) doRequest(alt string) (*http.Response, error) { 14653 reqHeaders := make(http.Header) 14654 for k, v := range c.header_ { 14655 reqHeaders[k] = v 14656 } 14657 reqHeaders.Set("User-Agent", c.s.userAgent()) 14658 var body io.Reader = nil 14659 body = c.body_ 14660 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/fhir/{+type}") 14661 urls += "?" + c.urlParams_.Encode() 14662 req, err := http.NewRequest("POST", urls, body) 14663 if err != nil { 14664 return nil, err 14665 } 14666 req.Header = reqHeaders 14667 googleapi.Expand(req.URL, map[string]string{ 14668 "parent": c.parent, 14669 "type": c.type_, 14670 }) 14671 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14672} 14673 14674// Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.create" call. 14675func (c *ProjectsLocationsDatasetsFhirStoresFhirCreateCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 14676 gensupport.SetOptions(c.urlParams_, opts...) 14677 return c.doRequest("") 14678 // { 14679 // "description": "Creates a FHIR resource.\n\nImplements the FHIR standard [create\ninteraction](http://hl7.org/implement/standards/fhir/STU3/http.html#create),\nwhich creates a new resource with a server-assigned resource ID.\n\nAlso supports the FHIR standard [conditional create\ninteraction](http://hl7.org/implement/standards/fhir/STU3/http.html#ccreate),\nspecified by supplying an `If-None-Exist` header containing a FHIR search\nquery. If no resources match this search query, the server processes the\ncreate operation as normal.\n\nThe request body must contain a JSON-encoded FHIR resource, and the request\nheaders must contain `Content-Type: application/fhir+json`.\n\nOn success, the response body will contain a JSON-encoded representation\nof the resource as it was created on the server, including the\nserver-assigned resource ID and version ID.\nErrors generated by the FHIR store will contain a JSON-encoded\n`OperationOutcome` resource describing the reason for the error. If the\nrequest cannot be mapped to a valid API method on a FHIR store, a generic\nGCP error might be returned instead.", 14680 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{fhirId}", 14681 // "httpMethod": "POST", 14682 // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.create", 14683 // "parameterOrder": [ 14684 // "parent", 14685 // "type" 14686 // ], 14687 // "parameters": { 14688 // "parent": { 14689 // "description": "The name of the FHIR store this resource belongs to.", 14690 // "location": "path", 14691 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$", 14692 // "required": true, 14693 // "type": "string" 14694 // }, 14695 // "type": { 14696 // "description": "The FHIR resource type to create, such as Patient or Observation. For a\ncomplete list, see the [FHIR Resource\nIndex](http://hl7.org/implement/standards/fhir/STU3/resourcelist.html).\nMust match the resource type in the provided content.", 14697 // "location": "path", 14698 // "pattern": "^[^/]+$", 14699 // "required": true, 14700 // "type": "string" 14701 // } 14702 // }, 14703 // "path": "v1alpha2/{+parent}/fhir/{+type}", 14704 // "request": { 14705 // "$ref": "HttpBody" 14706 // }, 14707 // "response": { 14708 // "$ref": "HttpBody" 14709 // }, 14710 // "scopes": [ 14711 // "https://www.googleapis.com/auth/cloud-platform" 14712 // ] 14713 // } 14714 14715} 14716 14717// method id "healthcare.projects.locations.datasets.fhirStores.fhir.delete": 14718 14719type ProjectsLocationsDatasetsFhirStoresFhirDeleteCall struct { 14720 s *Service 14721 name string 14722 urlParams_ gensupport.URLParams 14723 ctx_ context.Context 14724 header_ http.Header 14725} 14726 14727// Delete: Deletes a FHIR resource. 14728// 14729// Implements the FHIR standard 14730// [delete 14731// interaction](http://hl7.org/implement/standards/fhir/STU3/http 14732// .html#delete). 14733// 14734// Note: Unless resource versioning is disabled by setting 14735// the 14736// disable_resource_versioning flag 14737// on the FHIR store, the deleted resources will be moved to a 14738// history 14739// repository that can still be retrieved through vread 14740// and related methods, unless they are removed by the 14741// purge method. 14742func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Delete(name string) *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall { 14743 c := &ProjectsLocationsDatasetsFhirStoresFhirDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14744 c.name = name 14745 return c 14746} 14747 14748// Fields allows partial responses to be retrieved. See 14749// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14750// for more information. 14751func (c *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall { 14752 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14753 return c 14754} 14755 14756// Context sets the context to be used in this call's Do method. Any 14757// pending HTTP request will be aborted if the provided context is 14758// canceled. 14759func (c *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall { 14760 c.ctx_ = ctx 14761 return c 14762} 14763 14764// Header returns an http.Header that can be modified by the caller to 14765// add HTTP headers to the request. 14766func (c *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall) Header() http.Header { 14767 if c.header_ == nil { 14768 c.header_ = make(http.Header) 14769 } 14770 return c.header_ 14771} 14772 14773func (c *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall) doRequest(alt string) (*http.Response, error) { 14774 reqHeaders := make(http.Header) 14775 for k, v := range c.header_ { 14776 reqHeaders[k] = v 14777 } 14778 reqHeaders.Set("User-Agent", c.s.userAgent()) 14779 var body io.Reader = nil 14780 c.urlParams_.Set("alt", alt) 14781 c.urlParams_.Set("prettyPrint", "false") 14782 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}") 14783 urls += "?" + c.urlParams_.Encode() 14784 req, err := http.NewRequest("DELETE", urls, body) 14785 if err != nil { 14786 return nil, err 14787 } 14788 req.Header = reqHeaders 14789 googleapi.Expand(req.URL, map[string]string{ 14790 "name": c.name, 14791 }) 14792 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14793} 14794 14795// Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.delete" call. 14796func (c *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 14797 gensupport.SetOptions(c.urlParams_, opts...) 14798 return c.doRequest("") 14799 // { 14800 // "description": "Deletes a FHIR resource.\n\nImplements the FHIR standard [delete\ninteraction](http://hl7.org/implement/standards/fhir/STU3/http.html#delete).\n\nNote: Unless resource versioning is disabled by setting the\ndisable_resource_versioning flag\non the FHIR store, the deleted resources will be moved to a history\nrepository that can still be retrieved through vread\nand related methods, unless they are removed by the\npurge method.", 14801 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{fhirId}/{fhirId1}", 14802 // "httpMethod": "DELETE", 14803 // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.delete", 14804 // "parameterOrder": [ 14805 // "name" 14806 // ], 14807 // "parameters": { 14808 // "name": { 14809 // "description": "The name of the resource to delete.", 14810 // "location": "path", 14811 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/fhir/[^/]+/[^/]+$", 14812 // "required": true, 14813 // "type": "string" 14814 // } 14815 // }, 14816 // "path": "v1alpha2/{+name}", 14817 // "response": { 14818 // "$ref": "HttpBody" 14819 // }, 14820 // "scopes": [ 14821 // "https://www.googleapis.com/auth/cloud-platform" 14822 // ] 14823 // } 14824 14825} 14826 14827// method id "healthcare.projects.locations.datasets.fhirStores.fhir.executeBundle": 14828 14829type ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall struct { 14830 s *Service 14831 parent string 14832 body_ io.Reader 14833 urlParams_ gensupport.URLParams 14834 ctx_ context.Context 14835 header_ http.Header 14836} 14837 14838// ExecuteBundle: Executes all the requests in the given 14839// Bundle. 14840// 14841// Implements the FHIR standard 14842// [batch/transaction 14843// interaction](http://hl7.org/implement/standards/fhi 14844// r/STU3/http.html#transaction). 14845// 14846// Supports all interactions within a bundle, except search. This 14847// method 14848// accepts Bundles of type `batch` and `transaction`, processing 14849// them 14850// according to the [batch 14851// processing 14852// rules](http://hl7.org/implement/standards/fhir/STU3/http.ht 14853// ml#2.21.0.17.1) 14854// and [transaction 14855// processing 14856// rules](http://hl7.org/implement/standards/fhir/STU3/http.ht 14857// ml#2.21.0.17.2). 14858// 14859// The request body must contain a JSON-encoded FHIR `Bundle` resource, 14860// and 14861// the request headers must contain `Content-Type: 14862// application/fhir+json`. 14863// 14864// For a batch bundle or a successful transaction the response body 14865// will 14866// contain a JSON-encoded representation of a `Bundle` resource of 14867// type 14868// `batch-response` or `transaction-response` containing one entry for 14869// each 14870// entry in the request, with the outcome of processing the entry. In 14871// the 14872// case of an error for a transaction bundle, the response body will 14873// contain 14874// a JSON-encoded `OperationOutcome` resource describing the reason for 14875// the 14876// error. If the request cannot be mapped to a valid API method on a 14877// FHIR 14878// store, a generic GCP error might be returned instead. 14879func (r *ProjectsLocationsDatasetsFhirStoresFhirService) ExecuteBundle(parent string, body_ io.Reader) *ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall { 14880 c := &ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14881 c.parent = parent 14882 c.body_ = body_ 14883 return c 14884} 14885 14886// Fields allows partial responses to be retrieved. See 14887// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14888// for more information. 14889func (c *ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall { 14890 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14891 return c 14892} 14893 14894// Context sets the context to be used in this call's Do method. Any 14895// pending HTTP request will be aborted if the provided context is 14896// canceled. 14897func (c *ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall { 14898 c.ctx_ = ctx 14899 return c 14900} 14901 14902// Header returns an http.Header that can be modified by the caller to 14903// add HTTP headers to the request. 14904func (c *ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall) Header() http.Header { 14905 if c.header_ == nil { 14906 c.header_ = make(http.Header) 14907 } 14908 return c.header_ 14909} 14910 14911func (c *ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall) doRequest(alt string) (*http.Response, error) { 14912 reqHeaders := make(http.Header) 14913 for k, v := range c.header_ { 14914 reqHeaders[k] = v 14915 } 14916 reqHeaders.Set("User-Agent", c.s.userAgent()) 14917 var body io.Reader = nil 14918 body = c.body_ 14919 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/fhir") 14920 urls += "?" + c.urlParams_.Encode() 14921 req, err := http.NewRequest("POST", urls, body) 14922 if err != nil { 14923 return nil, err 14924 } 14925 req.Header = reqHeaders 14926 googleapi.Expand(req.URL, map[string]string{ 14927 "parent": c.parent, 14928 }) 14929 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14930} 14931 14932// Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.executeBundle" call. 14933func (c *ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 14934 gensupport.SetOptions(c.urlParams_, opts...) 14935 return c.doRequest("") 14936 // { 14937 // "description": "Executes all the requests in the given Bundle.\n\nImplements the FHIR standard [batch/transaction\ninteraction](http://hl7.org/implement/standards/fhir/STU3/http.html#transaction).\n\nSupports all interactions within a bundle, except search. This method\naccepts Bundles of type `batch` and `transaction`, processing them\naccording to the [batch processing\nrules](http://hl7.org/implement/standards/fhir/STU3/http.html#2.21.0.17.1)\nand [transaction processing\nrules](http://hl7.org/implement/standards/fhir/STU3/http.html#2.21.0.17.2).\n\nThe request body must contain a JSON-encoded FHIR `Bundle` resource, and\nthe request headers must contain `Content-Type: application/fhir+json`.\n\nFor a batch bundle or a successful transaction the response body will\ncontain a JSON-encoded representation of a `Bundle` resource of type\n`batch-response` or `transaction-response` containing one entry for each\nentry in the request, with the outcome of processing the entry. In the\ncase of an error for a transaction bundle, the response body will contain\na JSON-encoded `OperationOutcome` resource describing the reason for the\nerror. If the request cannot be mapped to a valid API method on a FHIR\nstore, a generic GCP error might be returned instead.", 14938 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir", 14939 // "httpMethod": "POST", 14940 // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.executeBundle", 14941 // "parameterOrder": [ 14942 // "parent" 14943 // ], 14944 // "parameters": { 14945 // "parent": { 14946 // "description": "Name of the FHIR store in which this bundle will be executed.", 14947 // "location": "path", 14948 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$", 14949 // "required": true, 14950 // "type": "string" 14951 // } 14952 // }, 14953 // "path": "v1alpha2/{+parent}/fhir", 14954 // "request": { 14955 // "$ref": "HttpBody" 14956 // }, 14957 // "response": { 14958 // "$ref": "HttpBody" 14959 // }, 14960 // "scopes": [ 14961 // "https://www.googleapis.com/auth/cloud-platform" 14962 // ] 14963 // } 14964 14965} 14966 14967// method id "healthcare.projects.locations.datasets.fhirStores.fhir.history": 14968 14969type ProjectsLocationsDatasetsFhirStoresFhirHistoryCall struct { 14970 s *Service 14971 name string 14972 urlParams_ gensupport.URLParams 14973 ifNoneMatch_ string 14974 ctx_ context.Context 14975 header_ http.Header 14976} 14977 14978// History: Lists all the versions of a resource (including the current 14979// version and 14980// deleted versions) from the FHIR store. 14981// 14982// Implements the per-resource form of the FHIR standard 14983// [history 14984// interaction](http://hl7.org/implement/standards/fhir/STU3/htt 14985// p.html#history). 14986// 14987// On success, the response body will contain a JSON-encoded 14988// representation 14989// of a `Bundle` resource of type `history`, containing the version 14990// history 14991// sorted from most recent to oldest versions. 14992// Errors generated by the FHIR store will contain a 14993// JSON-encoded 14994// `OperationOutcome` resource describing the reason for the error. If 14995// the 14996// request cannot be mapped to a valid API method on a FHIR store, a 14997// generic 14998// GCP error might be returned instead. 14999func (r *ProjectsLocationsDatasetsFhirStoresFhirService) History(name string) *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall { 15000 c := &ProjectsLocationsDatasetsFhirStoresFhirHistoryCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15001 c.name = name 15002 return c 15003} 15004 15005// At sets the optional parameter "at": Only include resource versions 15006// that were current at some point during the 15007// time period specified in the date time value. The date parameter 15008// format is 15009// yyyy-mm-ddThh:mm:ss[Z|(+|-)hh:mm] 15010// 15011// Clients may specify any of the following: 15012// 15013// * An entire year: `_at=2019` 15014// * An entire month: `_at=2019-01` 15015// * A specific day: `_at=2019-01-20` 15016// * A specific second: `_at=2018-12-31T23:59:58Z` 15017func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) At(at string) *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall { 15018 c.urlParams_.Set("at", at) 15019 return c 15020} 15021 15022// Count sets the optional parameter "count": The maximum number of 15023// search results on a page. Defaults to 1000. 15024func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) Count(count int64) *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall { 15025 c.urlParams_.Set("count", fmt.Sprint(count)) 15026 return c 15027} 15028 15029// Page sets the optional parameter "page": Used to retrieve the first, 15030// previous, next, or last page of resource 15031// versions when using pagination. Value should be set to the value of 15032// the 15033// `link.url` field returned in the response to the previous request, 15034// where 15035// `link.relation` is "first", "previous", "next" or "last". 15036// 15037// Omit `page` if no previous request has been made. 15038func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) Page(page string) *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall { 15039 c.urlParams_.Set("page", page) 15040 return c 15041} 15042 15043// Since sets the optional parameter "since": Only include resource 15044// versions that were created at or after the given 15045// instant in time. The instant in time uses the 15046// format 15047// YYYY-MM-DDThh:mm:ss.sss+zz:zz (for example 15048// 2015-02-07T13:28:17.239+02:00 or 15049// 2017-01-01T00:00:00Z). The time must be specified to the second 15050// and 15051// include a time zone. 15052func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) Since(since string) *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall { 15053 c.urlParams_.Set("since", since) 15054 return c 15055} 15056 15057// Fields allows partial responses to be retrieved. See 15058// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15059// for more information. 15060func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall { 15061 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15062 return c 15063} 15064 15065// IfNoneMatch sets the optional parameter which makes the operation 15066// fail if the object's ETag matches the given value. This is useful for 15067// getting updates only after the object has changed since the last 15068// request. Use googleapi.IsNotModified to check whether the response 15069// error from Do is the result of In-None-Match. 15070func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall { 15071 c.ifNoneMatch_ = entityTag 15072 return c 15073} 15074 15075// Context sets the context to be used in this call's Do method. Any 15076// pending HTTP request will be aborted if the provided context is 15077// canceled. 15078func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall { 15079 c.ctx_ = ctx 15080 return c 15081} 15082 15083// Header returns an http.Header that can be modified by the caller to 15084// add HTTP headers to the request. 15085func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) Header() http.Header { 15086 if c.header_ == nil { 15087 c.header_ = make(http.Header) 15088 } 15089 return c.header_ 15090} 15091 15092func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) doRequest(alt string) (*http.Response, error) { 15093 reqHeaders := make(http.Header) 15094 for k, v := range c.header_ { 15095 reqHeaders[k] = v 15096 } 15097 reqHeaders.Set("User-Agent", c.s.userAgent()) 15098 if c.ifNoneMatch_ != "" { 15099 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15100 } 15101 var body io.Reader = nil 15102 c.urlParams_.Set("alt", alt) 15103 c.urlParams_.Set("prettyPrint", "false") 15104 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}/_history") 15105 urls += "?" + c.urlParams_.Encode() 15106 req, err := http.NewRequest("GET", urls, body) 15107 if err != nil { 15108 return nil, err 15109 } 15110 req.Header = reqHeaders 15111 googleapi.Expand(req.URL, map[string]string{ 15112 "name": c.name, 15113 }) 15114 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15115} 15116 15117// Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.history" call. 15118func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 15119 gensupport.SetOptions(c.urlParams_, opts...) 15120 return c.doRequest("") 15121 // { 15122 // "description": "Lists all the versions of a resource (including the current version and\ndeleted versions) from the FHIR store.\n\nImplements the per-resource form of the FHIR standard [history\ninteraction](http://hl7.org/implement/standards/fhir/STU3/http.html#history).\n\nOn success, the response body will contain a JSON-encoded representation\nof a `Bundle` resource of type `history`, containing the version history\nsorted from most recent to oldest versions.\nErrors generated by the FHIR store will contain a JSON-encoded\n`OperationOutcome` resource describing the reason for the error. If the\nrequest cannot be mapped to a valid API method on a FHIR store, a generic\nGCP error might be returned instead.", 15123 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{fhirId}/{fhirId1}/_history", 15124 // "httpMethod": "GET", 15125 // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.history", 15126 // "parameterOrder": [ 15127 // "name" 15128 // ], 15129 // "parameters": { 15130 // "at": { 15131 // "description": "Only include resource versions that were current at some point during the\ntime period specified in the date time value. The date parameter format is\nyyyy-mm-ddThh:mm:ss[Z|(+|-)hh:mm]\n\nClients may specify any of the following:\n\n* An entire year: `_at=2019`\n* An entire month: `_at=2019-01`\n* A specific day: `_at=2019-01-20`\n* A specific second: `_at=2018-12-31T23:59:58Z`", 15132 // "location": "query", 15133 // "type": "string" 15134 // }, 15135 // "count": { 15136 // "description": "The maximum number of search results on a page. Defaults to 1000.", 15137 // "format": "int32", 15138 // "location": "query", 15139 // "type": "integer" 15140 // }, 15141 // "name": { 15142 // "description": "The name of the resource to retrieve.", 15143 // "location": "path", 15144 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/fhir/[^/]+/[^/]+$", 15145 // "required": true, 15146 // "type": "string" 15147 // }, 15148 // "page": { 15149 // "description": "Used to retrieve the first, previous, next, or last page of resource\nversions when using pagination. Value should be set to the value of the\n`link.url` field returned in the response to the previous request, where\n`link.relation` is \"first\", \"previous\", \"next\" or \"last\".\n\nOmit `page` if no previous request has been made.", 15150 // "location": "query", 15151 // "type": "string" 15152 // }, 15153 // "since": { 15154 // "description": "Only include resource versions that were created at or after the given\ninstant in time. The instant in time uses the format\nYYYY-MM-DDThh:mm:ss.sss+zz:zz (for example 2015-02-07T13:28:17.239+02:00 or\n2017-01-01T00:00:00Z). The time must be specified to the second and\ninclude a time zone.", 15155 // "location": "query", 15156 // "type": "string" 15157 // } 15158 // }, 15159 // "path": "v1alpha2/{+name}/_history", 15160 // "response": { 15161 // "$ref": "HttpBody" 15162 // }, 15163 // "scopes": [ 15164 // "https://www.googleapis.com/auth/cloud-platform" 15165 // ] 15166 // } 15167 15168} 15169 15170// method id "healthcare.projects.locations.datasets.fhirStores.fhir.patch": 15171 15172type ProjectsLocationsDatasetsFhirStoresFhirPatchCall struct { 15173 s *Service 15174 name string 15175 body_ io.Reader 15176 urlParams_ gensupport.URLParams 15177 ctx_ context.Context 15178 header_ http.Header 15179} 15180 15181// Patch: Updates part of an existing resource by applying the 15182// operations specified 15183// in a [JSON Patch](http://jsonpatch.com/) document. 15184// 15185// Implements the FHIR standard 15186// [patch 15187// interaction](http://hl7.org/implement/standards/fhir/STU3/http. 15188// html#patch). 15189// 15190// The request body must contain a JSON Patch document, and the 15191// request 15192// headers must contain `Content-Type: application/json-patch+json`. 15193// 15194// On success, the response body will contain a JSON-encoded 15195// representation 15196// of the updated resource, including the server-assigned version 15197// ID. 15198// Errors generated by the FHIR store will contain a 15199// JSON-encoded 15200// `OperationOutcome` resource describing the reason for the error. If 15201// the 15202// request cannot be mapped to a valid API method on a FHIR store, a 15203// generic 15204// GCP error might be returned instead. 15205func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Patch(name string, body_ io.Reader) *ProjectsLocationsDatasetsFhirStoresFhirPatchCall { 15206 c := &ProjectsLocationsDatasetsFhirStoresFhirPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15207 c.name = name 15208 c.body_ = body_ 15209 return c 15210} 15211 15212// Fields allows partial responses to be retrieved. See 15213// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15214// for more information. 15215func (c *ProjectsLocationsDatasetsFhirStoresFhirPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirPatchCall { 15216 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15217 return c 15218} 15219 15220// Context sets the context to be used in this call's Do method. Any 15221// pending HTTP request will be aborted if the provided context is 15222// canceled. 15223func (c *ProjectsLocationsDatasetsFhirStoresFhirPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirPatchCall { 15224 c.ctx_ = ctx 15225 return c 15226} 15227 15228// Header returns an http.Header that can be modified by the caller to 15229// add HTTP headers to the request. 15230func (c *ProjectsLocationsDatasetsFhirStoresFhirPatchCall) Header() http.Header { 15231 if c.header_ == nil { 15232 c.header_ = make(http.Header) 15233 } 15234 return c.header_ 15235} 15236 15237func (c *ProjectsLocationsDatasetsFhirStoresFhirPatchCall) doRequest(alt string) (*http.Response, error) { 15238 reqHeaders := make(http.Header) 15239 for k, v := range c.header_ { 15240 reqHeaders[k] = v 15241 } 15242 reqHeaders.Set("User-Agent", c.s.userAgent()) 15243 var body io.Reader = nil 15244 body = c.body_ 15245 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}") 15246 urls += "?" + c.urlParams_.Encode() 15247 req, err := http.NewRequest("PATCH", urls, body) 15248 if err != nil { 15249 return nil, err 15250 } 15251 req.Header = reqHeaders 15252 googleapi.Expand(req.URL, map[string]string{ 15253 "name": c.name, 15254 }) 15255 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15256} 15257 15258// Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.patch" call. 15259func (c *ProjectsLocationsDatasetsFhirStoresFhirPatchCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 15260 gensupport.SetOptions(c.urlParams_, opts...) 15261 return c.doRequest("") 15262 // { 15263 // "description": "Updates part of an existing resource by applying the operations specified\nin a [JSON Patch](http://jsonpatch.com/) document.\n\nImplements the FHIR standard [patch\ninteraction](http://hl7.org/implement/standards/fhir/STU3/http.html#patch).\n\nThe request body must contain a JSON Patch document, and the request\nheaders must contain `Content-Type: application/json-patch+json`.\n\nOn success, the response body will contain a JSON-encoded representation\nof the updated resource, including the server-assigned version ID.\nErrors generated by the FHIR store will contain a JSON-encoded\n`OperationOutcome` resource describing the reason for the error. If the\nrequest cannot be mapped to a valid API method on a FHIR store, a generic\nGCP error might be returned instead.", 15264 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{fhirId}/{fhirId1}", 15265 // "httpMethod": "PATCH", 15266 // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.patch", 15267 // "parameterOrder": [ 15268 // "name" 15269 // ], 15270 // "parameters": { 15271 // "name": { 15272 // "description": "The name of the resource to update.", 15273 // "location": "path", 15274 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/fhir/[^/]+/[^/]+$", 15275 // "required": true, 15276 // "type": "string" 15277 // } 15278 // }, 15279 // "path": "v1alpha2/{+name}", 15280 // "request": { 15281 // "$ref": "HttpBody" 15282 // }, 15283 // "response": { 15284 // "$ref": "HttpBody" 15285 // }, 15286 // "scopes": [ 15287 // "https://www.googleapis.com/auth/cloud-platform" 15288 // ] 15289 // } 15290 15291} 15292 15293// method id "healthcare.projects.locations.datasets.fhirStores.fhir.read": 15294 15295type ProjectsLocationsDatasetsFhirStoresFhirReadCall struct { 15296 s *Service 15297 name string 15298 urlParams_ gensupport.URLParams 15299 ifNoneMatch_ string 15300 ctx_ context.Context 15301 header_ http.Header 15302} 15303 15304// Read: Gets the contents of a FHIR resource. 15305// 15306// Implements the FHIR standard 15307// [read 15308// interaction](http://hl7.org/implement/standards/fhir/STU3/http.h 15309// tml#read). 15310// 15311// Also supports the FHIR standard [conditional 15312// read 15313// interaction](http://hl7.org/implement/standards/fhir/STU3/http.ht 15314// ml#cread) 15315// specified by supplying an `If-Modified-Since` header with a date/time 15316// value 15317// or an `If-None-Match` header with an ETag value. 15318// 15319// On success, the response body will contain a JSON-encoded 15320// representation 15321// of the resource. 15322// Errors generated by the FHIR store will contain a 15323// JSON-encoded 15324// `OperationOutcome` resource describing the reason for the error. If 15325// the 15326// request cannot be mapped to a valid API method on a FHIR store, a 15327// generic 15328// GCP error might be returned instead. 15329func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Read(name string) *ProjectsLocationsDatasetsFhirStoresFhirReadCall { 15330 c := &ProjectsLocationsDatasetsFhirStoresFhirReadCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15331 c.name = name 15332 return c 15333} 15334 15335// Fields allows partial responses to be retrieved. See 15336// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15337// for more information. 15338func (c *ProjectsLocationsDatasetsFhirStoresFhirReadCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirReadCall { 15339 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15340 return c 15341} 15342 15343// IfNoneMatch sets the optional parameter which makes the operation 15344// fail if the object's ETag matches the given value. This is useful for 15345// getting updates only after the object has changed since the last 15346// request. Use googleapi.IsNotModified to check whether the response 15347// error from Do is the result of In-None-Match. 15348func (c *ProjectsLocationsDatasetsFhirStoresFhirReadCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirReadCall { 15349 c.ifNoneMatch_ = entityTag 15350 return c 15351} 15352 15353// Context sets the context to be used in this call's Do method. Any 15354// pending HTTP request will be aborted if the provided context is 15355// canceled. 15356func (c *ProjectsLocationsDatasetsFhirStoresFhirReadCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirReadCall { 15357 c.ctx_ = ctx 15358 return c 15359} 15360 15361// Header returns an http.Header that can be modified by the caller to 15362// add HTTP headers to the request. 15363func (c *ProjectsLocationsDatasetsFhirStoresFhirReadCall) Header() http.Header { 15364 if c.header_ == nil { 15365 c.header_ = make(http.Header) 15366 } 15367 return c.header_ 15368} 15369 15370func (c *ProjectsLocationsDatasetsFhirStoresFhirReadCall) doRequest(alt string) (*http.Response, error) { 15371 reqHeaders := make(http.Header) 15372 for k, v := range c.header_ { 15373 reqHeaders[k] = v 15374 } 15375 reqHeaders.Set("User-Agent", c.s.userAgent()) 15376 if c.ifNoneMatch_ != "" { 15377 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15378 } 15379 var body io.Reader = nil 15380 c.urlParams_.Set("alt", alt) 15381 c.urlParams_.Set("prettyPrint", "false") 15382 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}") 15383 urls += "?" + c.urlParams_.Encode() 15384 req, err := http.NewRequest("GET", urls, body) 15385 if err != nil { 15386 return nil, err 15387 } 15388 req.Header = reqHeaders 15389 googleapi.Expand(req.URL, map[string]string{ 15390 "name": c.name, 15391 }) 15392 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15393} 15394 15395// Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.read" call. 15396func (c *ProjectsLocationsDatasetsFhirStoresFhirReadCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 15397 gensupport.SetOptions(c.urlParams_, opts...) 15398 return c.doRequest("") 15399 // { 15400 // "description": "Gets the contents of a FHIR resource.\n\nImplements the FHIR standard [read\ninteraction](http://hl7.org/implement/standards/fhir/STU3/http.html#read).\n\nAlso supports the FHIR standard [conditional read\ninteraction](http://hl7.org/implement/standards/fhir/STU3/http.html#cread)\nspecified by supplying an `If-Modified-Since` header with a date/time value\nor an `If-None-Match` header with an ETag value.\n\nOn success, the response body will contain a JSON-encoded representation\nof the resource.\nErrors generated by the FHIR store will contain a JSON-encoded\n`OperationOutcome` resource describing the reason for the error. If the\nrequest cannot be mapped to a valid API method on a FHIR store, a generic\nGCP error might be returned instead.", 15401 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{fhirId}/{fhirId1}", 15402 // "httpMethod": "GET", 15403 // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.read", 15404 // "parameterOrder": [ 15405 // "name" 15406 // ], 15407 // "parameters": { 15408 // "name": { 15409 // "description": "The name of the resource to retrieve.", 15410 // "location": "path", 15411 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/fhir/[^/]+/[^/]+$", 15412 // "required": true, 15413 // "type": "string" 15414 // } 15415 // }, 15416 // "path": "v1alpha2/{+name}", 15417 // "response": { 15418 // "$ref": "HttpBody" 15419 // }, 15420 // "scopes": [ 15421 // "https://www.googleapis.com/auth/cloud-platform" 15422 // ] 15423 // } 15424 15425} 15426 15427// method id "healthcare.projects.locations.datasets.fhirStores.fhir.search": 15428 15429type ProjectsLocationsDatasetsFhirStoresFhirSearchCall struct { 15430 s *Service 15431 parent string 15432 searchresourcesrequest *SearchResourcesRequest 15433 urlParams_ gensupport.URLParams 15434 ctx_ context.Context 15435 header_ http.Header 15436} 15437 15438// Search: Searches for resources in the given FHIR store according to 15439// criteria 15440// specified as query parameters. 15441// 15442// Implements the FHIR standard 15443// [search 15444// interaction](http://hl7.org/implement/standards/fhir/STU3/http 15445// .html#search) 15446// using the search semantics described in the [FHIR 15447// Search 15448// specification](http://hl7.org/implement/standards/fhir/STU3/sea 15449// rch.html). 15450// 15451// Supports three methods of search defined by the specification: 15452// 15453// * `GET [base]?[parameters]` to search across all resources. 15454// * `GET [base]/[type]?[parameters]` to search resources of a 15455// specified 15456// type. 15457// * `POST [base]/[type]/_search?[parameters]` as an alternate form 15458// having 15459// the same semantics as the `GET` method. 15460// 15461// The `GET` methods do not support compartment searches. The `POST` 15462// method 15463// does not support `application/x-www-form-urlencoded` search 15464// parameters. 15465// 15466// On success, the response body will contain a JSON-encoded 15467// representation 15468// of a `Bundle` resource of type `searchset`, containing the results of 15469// the 15470// search. 15471// Errors generated by the FHIR store will contain a 15472// JSON-encoded 15473// `OperationOutcome` resource describing the reason for the error. If 15474// the 15475// request cannot be mapped to a valid API method on a FHIR store, a 15476// generic 15477// GCP error might be returned instead. 15478// 15479// The server's capability statement, retrieved through 15480// capabilities, indicates what search parameters 15481// are supported on each FHIR resource. A list of all search 15482// parameters 15483// defined by the specification can be found in the [FHIR Search 15484// Parameter 15485// Registry](http://hl7.org/implement/standards/fhir/STU3/searc 15486// hparameter-registry.html). 15487// 15488// Supported search modifiers: `:missing`, `:exact`, `:contains`, 15489// `:text`, 15490// `:in`, `:not-in`, `:above`, `:below`, `:[type]`, `:not`, and 15491// `:recurse`. 15492// 15493// Supported search result parameters: `_sort`, `_count`, 15494// `_include`, 15495// `_revinclude`, `_summary=text`, `_summary=data`, and 15496// `_elements`. 15497// 15498// The maximum number of search results returned defaults to 100, which 15499// can 15500// be overridden by the `_count` parameter up to a maximum limit of 15501// 1000. If 15502// there are additional results, the returned `Bundle` will 15503// contain 15504// pagination links. 15505func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Search(parent string, searchresourcesrequest *SearchResourcesRequest) *ProjectsLocationsDatasetsFhirStoresFhirSearchCall { 15506 c := &ProjectsLocationsDatasetsFhirStoresFhirSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15507 c.parent = parent 15508 c.searchresourcesrequest = searchresourcesrequest 15509 return c 15510} 15511 15512// Fields allows partial responses to be retrieved. See 15513// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15514// for more information. 15515func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirSearchCall { 15516 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15517 return c 15518} 15519 15520// Context sets the context to be used in this call's Do method. Any 15521// pending HTTP request will be aborted if the provided context is 15522// canceled. 15523func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirSearchCall { 15524 c.ctx_ = ctx 15525 return c 15526} 15527 15528// Header returns an http.Header that can be modified by the caller to 15529// add HTTP headers to the request. 15530func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchCall) Header() http.Header { 15531 if c.header_ == nil { 15532 c.header_ = make(http.Header) 15533 } 15534 return c.header_ 15535} 15536 15537func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchCall) doRequest(alt string) (*http.Response, error) { 15538 reqHeaders := make(http.Header) 15539 for k, v := range c.header_ { 15540 reqHeaders[k] = v 15541 } 15542 reqHeaders.Set("User-Agent", c.s.userAgent()) 15543 var body io.Reader = nil 15544 body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchresourcesrequest) 15545 if err != nil { 15546 return nil, err 15547 } 15548 reqHeaders.Set("Content-Type", "application/json") 15549 c.urlParams_.Set("alt", alt) 15550 c.urlParams_.Set("prettyPrint", "false") 15551 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/fhir/_search") 15552 urls += "?" + c.urlParams_.Encode() 15553 req, err := http.NewRequest("POST", urls, body) 15554 if err != nil { 15555 return nil, err 15556 } 15557 req.Header = reqHeaders 15558 googleapi.Expand(req.URL, map[string]string{ 15559 "parent": c.parent, 15560 }) 15561 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15562} 15563 15564// Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.search" call. 15565func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 15566 gensupport.SetOptions(c.urlParams_, opts...) 15567 return c.doRequest("") 15568 // { 15569 // "description": "Searches for resources in the given FHIR store according to criteria\nspecified as query parameters.\n\nImplements the FHIR standard [search\ninteraction](http://hl7.org/implement/standards/fhir/STU3/http.html#search)\nusing the search semantics described in the [FHIR Search\nspecification](http://hl7.org/implement/standards/fhir/STU3/search.html).\n\nSupports three methods of search defined by the specification:\n\n* `GET [base]?[parameters]` to search across all resources.\n* `GET [base]/[type]?[parameters]` to search resources of a specified\ntype.\n* `POST [base]/[type]/_search?[parameters]` as an alternate form having\nthe same semantics as the `GET` method.\n\nThe `GET` methods do not support compartment searches. The `POST` method\ndoes not support `application/x-www-form-urlencoded` search parameters.\n\nOn success, the response body will contain a JSON-encoded representation\nof a `Bundle` resource of type `searchset`, containing the results of the\nsearch.\nErrors generated by the FHIR store will contain a JSON-encoded\n`OperationOutcome` resource describing the reason for the error. If the\nrequest cannot be mapped to a valid API method on a FHIR store, a generic\nGCP error might be returned instead.\n\nThe server's capability statement, retrieved through\ncapabilities, indicates what search parameters\nare supported on each FHIR resource. A list of all search parameters\ndefined by the specification can be found in the [FHIR Search Parameter\nRegistry](http://hl7.org/implement/standards/fhir/STU3/searchparameter-registry.html).\n\nSupported search modifiers: `:missing`, `:exact`, `:contains`, `:text`,\n`:in`, `:not-in`, `:above`, `:below`, `:[type]`, `:not`, and `:recurse`.\n\nSupported search result parameters: `_sort`, `_count`, `_include`,\n`_revinclude`, `_summary=text`, `_summary=data`, and `_elements`.\n\nThe maximum number of search results returned defaults to 100, which can\nbe overridden by the `_count` parameter up to a maximum limit of 1000. If\nthere are additional results, the returned `Bundle` will contain\npagination links.", 15570 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/_search", 15571 // "httpMethod": "POST", 15572 // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.search", 15573 // "parameterOrder": [ 15574 // "parent" 15575 // ], 15576 // "parameters": { 15577 // "parent": { 15578 // "description": "Name of the FHIR store to retrieve resources from.", 15579 // "location": "path", 15580 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$", 15581 // "required": true, 15582 // "type": "string" 15583 // } 15584 // }, 15585 // "path": "v1alpha2/{+parent}/fhir/_search", 15586 // "request": { 15587 // "$ref": "SearchResourcesRequest" 15588 // }, 15589 // "response": { 15590 // "$ref": "HttpBody" 15591 // }, 15592 // "scopes": [ 15593 // "https://www.googleapis.com/auth/cloud-platform" 15594 // ] 15595 // } 15596 15597} 15598 15599// method id "healthcare.projects.locations.datasets.fhirStores.fhir.update": 15600 15601type ProjectsLocationsDatasetsFhirStoresFhirUpdateCall struct { 15602 s *Service 15603 name string 15604 body_ io.Reader 15605 urlParams_ gensupport.URLParams 15606 ctx_ context.Context 15607 header_ http.Header 15608} 15609 15610// Update: Updates the entire contents of a resource. 15611// 15612// Implements the FHIR standard 15613// [update 15614// interaction](http://hl7.org/implement/standards/fhir/STU3/http 15615// .html#update). 15616// 15617// If the specified resource does 15618// not exist and the FHIR store has 15619// enable_update_create set, creates the 15620// resource with the client-specified ID. 15621// 15622// The request body must contain a JSON-encoded FHIR resource, and the 15623// request 15624// headers must contain `Content-Type: application/fhir+json`. The 15625// resource 15626// must contain an `id` element having an identical value to the ID in 15627// the 15628// REST path of the request. 15629// 15630// On success, the response body will contain a JSON-encoded 15631// representation 15632// of the updated resource, including the server-assigned version 15633// ID. 15634// Errors generated by the FHIR store will contain a 15635// JSON-encoded 15636// `OperationOutcome` resource describing the reason for the error. If 15637// the 15638// request cannot be mapped to a valid API method on a FHIR store, a 15639// generic 15640// GCP error might be returned instead. 15641func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Update(name string, body_ io.Reader) *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall { 15642 c := &ProjectsLocationsDatasetsFhirStoresFhirUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15643 c.name = name 15644 c.body_ = body_ 15645 return c 15646} 15647 15648// Fields allows partial responses to be retrieved. See 15649// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15650// for more information. 15651func (c *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall { 15652 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15653 return c 15654} 15655 15656// Context sets the context to be used in this call's Do method. Any 15657// pending HTTP request will be aborted if the provided context is 15658// canceled. 15659func (c *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall { 15660 c.ctx_ = ctx 15661 return c 15662} 15663 15664// Header returns an http.Header that can be modified by the caller to 15665// add HTTP headers to the request. 15666func (c *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall) Header() http.Header { 15667 if c.header_ == nil { 15668 c.header_ = make(http.Header) 15669 } 15670 return c.header_ 15671} 15672 15673func (c *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall) doRequest(alt string) (*http.Response, error) { 15674 reqHeaders := make(http.Header) 15675 for k, v := range c.header_ { 15676 reqHeaders[k] = v 15677 } 15678 reqHeaders.Set("User-Agent", c.s.userAgent()) 15679 var body io.Reader = nil 15680 body = c.body_ 15681 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}") 15682 urls += "?" + c.urlParams_.Encode() 15683 req, err := http.NewRequest("PUT", urls, body) 15684 if err != nil { 15685 return nil, err 15686 } 15687 req.Header = reqHeaders 15688 googleapi.Expand(req.URL, map[string]string{ 15689 "name": c.name, 15690 }) 15691 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15692} 15693 15694// Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.update" call. 15695func (c *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 15696 gensupport.SetOptions(c.urlParams_, opts...) 15697 return c.doRequest("") 15698 // { 15699 // "description": "Updates the entire contents of a resource.\n\nImplements the FHIR standard [update\ninteraction](http://hl7.org/implement/standards/fhir/STU3/http.html#update).\n\nIf the specified resource does\nnot exist and the FHIR store has\nenable_update_create set, creates the\nresource with the client-specified ID.\n\nThe request body must contain a JSON-encoded FHIR resource, and the request\nheaders must contain `Content-Type: application/fhir+json`. The resource\nmust contain an `id` element having an identical value to the ID in the\nREST path of the request.\n\nOn success, the response body will contain a JSON-encoded representation\nof the updated resource, including the server-assigned version ID.\nErrors generated by the FHIR store will contain a JSON-encoded\n`OperationOutcome` resource describing the reason for the error. If the\nrequest cannot be mapped to a valid API method on a FHIR store, a generic\nGCP error might be returned instead.", 15700 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{fhirId}/{fhirId1}", 15701 // "httpMethod": "PUT", 15702 // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.update", 15703 // "parameterOrder": [ 15704 // "name" 15705 // ], 15706 // "parameters": { 15707 // "name": { 15708 // "description": "The name of the resource to update.", 15709 // "location": "path", 15710 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/fhir/[^/]+/[^/]+$", 15711 // "required": true, 15712 // "type": "string" 15713 // } 15714 // }, 15715 // "path": "v1alpha2/{+name}", 15716 // "request": { 15717 // "$ref": "HttpBody" 15718 // }, 15719 // "response": { 15720 // "$ref": "HttpBody" 15721 // }, 15722 // "scopes": [ 15723 // "https://www.googleapis.com/auth/cloud-platform" 15724 // ] 15725 // } 15726 15727} 15728 15729// method id "healthcare.projects.locations.datasets.fhirStores.fhir.vread": 15730 15731type ProjectsLocationsDatasetsFhirStoresFhirVreadCall struct { 15732 s *Service 15733 name string 15734 urlParams_ gensupport.URLParams 15735 ifNoneMatch_ string 15736 ctx_ context.Context 15737 header_ http.Header 15738} 15739 15740// Vread: Gets the contents of a version (current or historical) of a 15741// FHIR resource 15742// by version ID. 15743// 15744// Implements the FHIR standard 15745// [vread 15746// interaction](http://hl7.org/implement/standards/fhir/STU3/http. 15747// html#vread). 15748// 15749// On success, the response body will contain a JSON-encoded 15750// representation 15751// of the resource. 15752// Errors generated by the FHIR store will contain a 15753// JSON-encoded 15754// `OperationOutcome` resource describing the reason for the error. If 15755// the 15756// request cannot be mapped to a valid API method on a FHIR store, a 15757// generic 15758// GCP error might be returned instead. 15759func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Vread(name string) *ProjectsLocationsDatasetsFhirStoresFhirVreadCall { 15760 c := &ProjectsLocationsDatasetsFhirStoresFhirVreadCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15761 c.name = name 15762 return c 15763} 15764 15765// Fields allows partial responses to be retrieved. See 15766// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15767// for more information. 15768func (c *ProjectsLocationsDatasetsFhirStoresFhirVreadCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirVreadCall { 15769 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15770 return c 15771} 15772 15773// IfNoneMatch sets the optional parameter which makes the operation 15774// fail if the object's ETag matches the given value. This is useful for 15775// getting updates only after the object has changed since the last 15776// request. Use googleapi.IsNotModified to check whether the response 15777// error from Do is the result of In-None-Match. 15778func (c *ProjectsLocationsDatasetsFhirStoresFhirVreadCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirVreadCall { 15779 c.ifNoneMatch_ = entityTag 15780 return c 15781} 15782 15783// Context sets the context to be used in this call's Do method. Any 15784// pending HTTP request will be aborted if the provided context is 15785// canceled. 15786func (c *ProjectsLocationsDatasetsFhirStoresFhirVreadCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirVreadCall { 15787 c.ctx_ = ctx 15788 return c 15789} 15790 15791// Header returns an http.Header that can be modified by the caller to 15792// add HTTP headers to the request. 15793func (c *ProjectsLocationsDatasetsFhirStoresFhirVreadCall) Header() http.Header { 15794 if c.header_ == nil { 15795 c.header_ = make(http.Header) 15796 } 15797 return c.header_ 15798} 15799 15800func (c *ProjectsLocationsDatasetsFhirStoresFhirVreadCall) doRequest(alt string) (*http.Response, error) { 15801 reqHeaders := make(http.Header) 15802 for k, v := range c.header_ { 15803 reqHeaders[k] = v 15804 } 15805 reqHeaders.Set("User-Agent", c.s.userAgent()) 15806 if c.ifNoneMatch_ != "" { 15807 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15808 } 15809 var body io.Reader = nil 15810 c.urlParams_.Set("alt", alt) 15811 c.urlParams_.Set("prettyPrint", "false") 15812 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}") 15813 urls += "?" + c.urlParams_.Encode() 15814 req, err := http.NewRequest("GET", urls, body) 15815 if err != nil { 15816 return nil, err 15817 } 15818 req.Header = reqHeaders 15819 googleapi.Expand(req.URL, map[string]string{ 15820 "name": c.name, 15821 }) 15822 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15823} 15824 15825// Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.vread" call. 15826func (c *ProjectsLocationsDatasetsFhirStoresFhirVreadCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 15827 gensupport.SetOptions(c.urlParams_, opts...) 15828 return c.doRequest("") 15829 // { 15830 // "description": "Gets the contents of a version (current or historical) of a FHIR resource\nby version ID.\n\nImplements the FHIR standard [vread\ninteraction](http://hl7.org/implement/standards/fhir/STU3/http.html#vread).\n\nOn success, the response body will contain a JSON-encoded representation\nof the resource.\nErrors generated by the FHIR store will contain a JSON-encoded\n`OperationOutcome` resource describing the reason for the error. If the\nrequest cannot be mapped to a valid API method on a FHIR store, a generic\nGCP error might be returned instead.", 15831 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{fhirId}/{fhirId1}/_history/{_historyId}", 15832 // "httpMethod": "GET", 15833 // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.vread", 15834 // "parameterOrder": [ 15835 // "name" 15836 // ], 15837 // "parameters": { 15838 // "name": { 15839 // "description": "The name of the resource version to retrieve.", 15840 // "location": "path", 15841 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/fhir/[^/]+/[^/]+/_history/[^/]+$", 15842 // "required": true, 15843 // "type": "string" 15844 // } 15845 // }, 15846 // "path": "v1alpha2/{+name}", 15847 // "response": { 15848 // "$ref": "HttpBody" 15849 // }, 15850 // "scopes": [ 15851 // "https://www.googleapis.com/auth/cloud-platform" 15852 // ] 15853 // } 15854 15855} 15856 15857// method id "healthcare.projects.locations.datasets.fhirStores.securityLabels.getIamPolicy": 15858 15859type ProjectsLocationsDatasetsFhirStoresSecurityLabelsGetIamPolicyCall struct { 15860 s *Service 15861 resource string 15862 urlParams_ gensupport.URLParams 15863 ifNoneMatch_ string 15864 ctx_ context.Context 15865 header_ http.Header 15866} 15867 15868// GetIamPolicy: Gets the access control policy for a FHIR store or 15869// security label within a 15870// FHIR store. Returns NOT_FOUND error if the resource does not exist. 15871// Returns 15872// an empty policy if the resource exists but does not have a policy 15873// set. 15874// 15875// Authorization requires the Google IAM 15876// permission 15877// 'healthcare.fhirStores.getIamPolicy' for a FHIR store 15878// or 15879// 'healthcare.securityLabels.getIamPolicy' for a security label 15880func (r *ProjectsLocationsDatasetsFhirStoresSecurityLabelsService) GetIamPolicy(resource string) *ProjectsLocationsDatasetsFhirStoresSecurityLabelsGetIamPolicyCall { 15881 c := &ProjectsLocationsDatasetsFhirStoresSecurityLabelsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15882 c.resource = resource 15883 return c 15884} 15885 15886// Fields allows partial responses to be retrieved. See 15887// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15888// for more information. 15889func (c *ProjectsLocationsDatasetsFhirStoresSecurityLabelsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresSecurityLabelsGetIamPolicyCall { 15890 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15891 return c 15892} 15893 15894// IfNoneMatch sets the optional parameter which makes the operation 15895// fail if the object's ETag matches the given value. This is useful for 15896// getting updates only after the object has changed since the last 15897// request. Use googleapi.IsNotModified to check whether the response 15898// error from Do is the result of In-None-Match. 15899func (c *ProjectsLocationsDatasetsFhirStoresSecurityLabelsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresSecurityLabelsGetIamPolicyCall { 15900 c.ifNoneMatch_ = entityTag 15901 return c 15902} 15903 15904// Context sets the context to be used in this call's Do method. Any 15905// pending HTTP request will be aborted if the provided context is 15906// canceled. 15907func (c *ProjectsLocationsDatasetsFhirStoresSecurityLabelsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresSecurityLabelsGetIamPolicyCall { 15908 c.ctx_ = ctx 15909 return c 15910} 15911 15912// Header returns an http.Header that can be modified by the caller to 15913// add HTTP headers to the request. 15914func (c *ProjectsLocationsDatasetsFhirStoresSecurityLabelsGetIamPolicyCall) Header() http.Header { 15915 if c.header_ == nil { 15916 c.header_ = make(http.Header) 15917 } 15918 return c.header_ 15919} 15920 15921func (c *ProjectsLocationsDatasetsFhirStoresSecurityLabelsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 15922 reqHeaders := make(http.Header) 15923 for k, v := range c.header_ { 15924 reqHeaders[k] = v 15925 } 15926 reqHeaders.Set("User-Agent", c.s.userAgent()) 15927 if c.ifNoneMatch_ != "" { 15928 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15929 } 15930 var body io.Reader = nil 15931 c.urlParams_.Set("alt", alt) 15932 c.urlParams_.Set("prettyPrint", "false") 15933 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:getIamPolicy") 15934 urls += "?" + c.urlParams_.Encode() 15935 req, err := http.NewRequest("GET", urls, body) 15936 if err != nil { 15937 return nil, err 15938 } 15939 req.Header = reqHeaders 15940 googleapi.Expand(req.URL, map[string]string{ 15941 "resource": c.resource, 15942 }) 15943 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15944} 15945 15946// Do executes the "healthcare.projects.locations.datasets.fhirStores.securityLabels.getIamPolicy" call. 15947// Exactly one of *Policy or error will be non-nil. Any non-2xx status 15948// code is an error. Response headers are in either 15949// *Policy.ServerResponse.Header or (if a response was returned at all) 15950// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 15951// check whether the returned error was because http.StatusNotModified 15952// was returned. 15953func (c *ProjectsLocationsDatasetsFhirStoresSecurityLabelsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 15954 gensupport.SetOptions(c.urlParams_, opts...) 15955 res, err := c.doRequest("json") 15956 if res != nil && res.StatusCode == http.StatusNotModified { 15957 if res.Body != nil { 15958 res.Body.Close() 15959 } 15960 return nil, &googleapi.Error{ 15961 Code: res.StatusCode, 15962 Header: res.Header, 15963 } 15964 } 15965 if err != nil { 15966 return nil, err 15967 } 15968 defer googleapi.CloseBody(res) 15969 if err := googleapi.CheckResponse(res); err != nil { 15970 return nil, err 15971 } 15972 ret := &Policy{ 15973 ServerResponse: googleapi.ServerResponse{ 15974 Header: res.Header, 15975 HTTPStatusCode: res.StatusCode, 15976 }, 15977 } 15978 target := &ret 15979 if err := gensupport.DecodeResponse(target, res); err != nil { 15980 return nil, err 15981 } 15982 return ret, nil 15983 // { 15984 // "description": "Gets the access control policy for a FHIR store or security label within a\nFHIR store. Returns NOT_FOUND error if the resource does not exist. Returns\nan empty policy if the resource exists but does not have a policy set.\n\nAuthorization requires the Google IAM permission\n'healthcare.fhirStores.getIamPolicy' for a FHIR store or\n'healthcare.securityLabels.getIamPolicy' for a security label", 15985 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/securityLabels/{securityLabelsId}:getIamPolicy", 15986 // "httpMethod": "GET", 15987 // "id": "healthcare.projects.locations.datasets.fhirStores.securityLabels.getIamPolicy", 15988 // "parameterOrder": [ 15989 // "resource" 15990 // ], 15991 // "parameters": { 15992 // "resource": { 15993 // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", 15994 // "location": "path", 15995 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/securityLabels/[^/]+$", 15996 // "required": true, 15997 // "type": "string" 15998 // } 15999 // }, 16000 // "path": "v1alpha2/{+resource}:getIamPolicy", 16001 // "response": { 16002 // "$ref": "Policy" 16003 // }, 16004 // "scopes": [ 16005 // "https://www.googleapis.com/auth/cloud-platform" 16006 // ] 16007 // } 16008 16009} 16010 16011// method id "healthcare.projects.locations.datasets.fhirStores.securityLabels.setIamPolicy": 16012 16013type ProjectsLocationsDatasetsFhirStoresSecurityLabelsSetIamPolicyCall struct { 16014 s *Service 16015 resource string 16016 setiampolicyrequest *SetIamPolicyRequest 16017 urlParams_ gensupport.URLParams 16018 ctx_ context.Context 16019 header_ http.Header 16020} 16021 16022// SetIamPolicy: Sets the access control policy for a FHIR store or 16023// security label within a 16024// FHIR store. Replaces any existing policy. 16025// 16026// Authorization requires the Google IAM 16027// permission 16028// 'healthcare.fhirStores.setIamPolicy' for a FHIR store 16029// or 16030// 'healthcare.securityLabels.setIamPolicy' for a security label 16031func (r *ProjectsLocationsDatasetsFhirStoresSecurityLabelsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsFhirStoresSecurityLabelsSetIamPolicyCall { 16032 c := &ProjectsLocationsDatasetsFhirStoresSecurityLabelsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16033 c.resource = resource 16034 c.setiampolicyrequest = setiampolicyrequest 16035 return c 16036} 16037 16038// Fields allows partial responses to be retrieved. See 16039// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16040// for more information. 16041func (c *ProjectsLocationsDatasetsFhirStoresSecurityLabelsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresSecurityLabelsSetIamPolicyCall { 16042 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16043 return c 16044} 16045 16046// Context sets the context to be used in this call's Do method. Any 16047// pending HTTP request will be aborted if the provided context is 16048// canceled. 16049func (c *ProjectsLocationsDatasetsFhirStoresSecurityLabelsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresSecurityLabelsSetIamPolicyCall { 16050 c.ctx_ = ctx 16051 return c 16052} 16053 16054// Header returns an http.Header that can be modified by the caller to 16055// add HTTP headers to the request. 16056func (c *ProjectsLocationsDatasetsFhirStoresSecurityLabelsSetIamPolicyCall) Header() http.Header { 16057 if c.header_ == nil { 16058 c.header_ = make(http.Header) 16059 } 16060 return c.header_ 16061} 16062 16063func (c *ProjectsLocationsDatasetsFhirStoresSecurityLabelsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 16064 reqHeaders := make(http.Header) 16065 for k, v := range c.header_ { 16066 reqHeaders[k] = v 16067 } 16068 reqHeaders.Set("User-Agent", c.s.userAgent()) 16069 var body io.Reader = nil 16070 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 16071 if err != nil { 16072 return nil, err 16073 } 16074 reqHeaders.Set("Content-Type", "application/json") 16075 c.urlParams_.Set("alt", alt) 16076 c.urlParams_.Set("prettyPrint", "false") 16077 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:setIamPolicy") 16078 urls += "?" + c.urlParams_.Encode() 16079 req, err := http.NewRequest("POST", urls, body) 16080 if err != nil { 16081 return nil, err 16082 } 16083 req.Header = reqHeaders 16084 googleapi.Expand(req.URL, map[string]string{ 16085 "resource": c.resource, 16086 }) 16087 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16088} 16089 16090// Do executes the "healthcare.projects.locations.datasets.fhirStores.securityLabels.setIamPolicy" call. 16091// Exactly one of *Policy or error will be non-nil. Any non-2xx status 16092// code is an error. Response headers are in either 16093// *Policy.ServerResponse.Header or (if a response was returned at all) 16094// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 16095// check whether the returned error was because http.StatusNotModified 16096// was returned. 16097func (c *ProjectsLocationsDatasetsFhirStoresSecurityLabelsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 16098 gensupport.SetOptions(c.urlParams_, opts...) 16099 res, err := c.doRequest("json") 16100 if res != nil && res.StatusCode == http.StatusNotModified { 16101 if res.Body != nil { 16102 res.Body.Close() 16103 } 16104 return nil, &googleapi.Error{ 16105 Code: res.StatusCode, 16106 Header: res.Header, 16107 } 16108 } 16109 if err != nil { 16110 return nil, err 16111 } 16112 defer googleapi.CloseBody(res) 16113 if err := googleapi.CheckResponse(res); err != nil { 16114 return nil, err 16115 } 16116 ret := &Policy{ 16117 ServerResponse: googleapi.ServerResponse{ 16118 Header: res.Header, 16119 HTTPStatusCode: res.StatusCode, 16120 }, 16121 } 16122 target := &ret 16123 if err := gensupport.DecodeResponse(target, res); err != nil { 16124 return nil, err 16125 } 16126 return ret, nil 16127 // { 16128 // "description": "Sets the access control policy for a FHIR store or security label within a\nFHIR store. Replaces any existing policy.\n\nAuthorization requires the Google IAM permission\n'healthcare.fhirStores.setIamPolicy' for a FHIR store or\n'healthcare.securityLabels.setIamPolicy' for a security label", 16129 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/securityLabels/{securityLabelsId}:setIamPolicy", 16130 // "httpMethod": "POST", 16131 // "id": "healthcare.projects.locations.datasets.fhirStores.securityLabels.setIamPolicy", 16132 // "parameterOrder": [ 16133 // "resource" 16134 // ], 16135 // "parameters": { 16136 // "resource": { 16137 // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", 16138 // "location": "path", 16139 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/securityLabels/[^/]+$", 16140 // "required": true, 16141 // "type": "string" 16142 // } 16143 // }, 16144 // "path": "v1alpha2/{+resource}:setIamPolicy", 16145 // "request": { 16146 // "$ref": "SetIamPolicyRequest" 16147 // }, 16148 // "response": { 16149 // "$ref": "Policy" 16150 // }, 16151 // "scopes": [ 16152 // "https://www.googleapis.com/auth/cloud-platform" 16153 // ] 16154 // } 16155 16156} 16157 16158// method id "healthcare.projects.locations.datasets.hl7V2Stores.create": 16159 16160type ProjectsLocationsDatasetsHl7V2StoresCreateCall struct { 16161 s *Service 16162 parent string 16163 hl7v2store *Hl7V2Store 16164 urlParams_ gensupport.URLParams 16165 ctx_ context.Context 16166 header_ http.Header 16167} 16168 16169// Create: Creates a new HL7v2 store within the parent dataset. 16170func (r *ProjectsLocationsDatasetsHl7V2StoresService) Create(parent string, hl7v2store *Hl7V2Store) *ProjectsLocationsDatasetsHl7V2StoresCreateCall { 16171 c := &ProjectsLocationsDatasetsHl7V2StoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16172 c.parent = parent 16173 c.hl7v2store = hl7v2store 16174 return c 16175} 16176 16177// Hl7V2StoreId sets the optional parameter "hl7V2StoreId": The ID of 16178// the HL7v2 store that is being created. 16179// The string must match the following regex: 16180// `[\p{L}\p{N}_\-\.]{1,256}`. 16181func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) Hl7V2StoreId(hl7V2StoreId string) *ProjectsLocationsDatasetsHl7V2StoresCreateCall { 16182 c.urlParams_.Set("hl7V2StoreId", hl7V2StoreId) 16183 return c 16184} 16185 16186// Fields allows partial responses to be retrieved. See 16187// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16188// for more information. 16189func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresCreateCall { 16190 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16191 return c 16192} 16193 16194// Context sets the context to be used in this call's Do method. Any 16195// pending HTTP request will be aborted if the provided context is 16196// canceled. 16197func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresCreateCall { 16198 c.ctx_ = ctx 16199 return c 16200} 16201 16202// Header returns an http.Header that can be modified by the caller to 16203// add HTTP headers to the request. 16204func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) Header() http.Header { 16205 if c.header_ == nil { 16206 c.header_ = make(http.Header) 16207 } 16208 return c.header_ 16209} 16210 16211func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) doRequest(alt string) (*http.Response, error) { 16212 reqHeaders := make(http.Header) 16213 for k, v := range c.header_ { 16214 reqHeaders[k] = v 16215 } 16216 reqHeaders.Set("User-Agent", c.s.userAgent()) 16217 var body io.Reader = nil 16218 body, err := googleapi.WithoutDataWrapper.JSONReader(c.hl7v2store) 16219 if err != nil { 16220 return nil, err 16221 } 16222 reqHeaders.Set("Content-Type", "application/json") 16223 c.urlParams_.Set("alt", alt) 16224 c.urlParams_.Set("prettyPrint", "false") 16225 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/hl7V2Stores") 16226 urls += "?" + c.urlParams_.Encode() 16227 req, err := http.NewRequest("POST", urls, body) 16228 if err != nil { 16229 return nil, err 16230 } 16231 req.Header = reqHeaders 16232 googleapi.Expand(req.URL, map[string]string{ 16233 "parent": c.parent, 16234 }) 16235 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16236} 16237 16238// Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.create" call. 16239// Exactly one of *Hl7V2Store or error will be non-nil. Any non-2xx 16240// status code is an error. Response headers are in either 16241// *Hl7V2Store.ServerResponse.Header or (if a response was returned at 16242// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 16243// to check whether the returned error was because 16244// http.StatusNotModified was returned. 16245func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) Do(opts ...googleapi.CallOption) (*Hl7V2Store, error) { 16246 gensupport.SetOptions(c.urlParams_, opts...) 16247 res, err := c.doRequest("json") 16248 if res != nil && res.StatusCode == http.StatusNotModified { 16249 if res.Body != nil { 16250 res.Body.Close() 16251 } 16252 return nil, &googleapi.Error{ 16253 Code: res.StatusCode, 16254 Header: res.Header, 16255 } 16256 } 16257 if err != nil { 16258 return nil, err 16259 } 16260 defer googleapi.CloseBody(res) 16261 if err := googleapi.CheckResponse(res); err != nil { 16262 return nil, err 16263 } 16264 ret := &Hl7V2Store{ 16265 ServerResponse: googleapi.ServerResponse{ 16266 Header: res.Header, 16267 HTTPStatusCode: res.StatusCode, 16268 }, 16269 } 16270 target := &ret 16271 if err := gensupport.DecodeResponse(target, res); err != nil { 16272 return nil, err 16273 } 16274 return ret, nil 16275 // { 16276 // "description": "Creates a new HL7v2 store within the parent dataset.", 16277 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores", 16278 // "httpMethod": "POST", 16279 // "id": "healthcare.projects.locations.datasets.hl7V2Stores.create", 16280 // "parameterOrder": [ 16281 // "parent" 16282 // ], 16283 // "parameters": { 16284 // "hl7V2StoreId": { 16285 // "description": "The ID of the HL7v2 store that is being created.\nThe string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`.", 16286 // "location": "query", 16287 // "type": "string" 16288 // }, 16289 // "parent": { 16290 // "description": "The name of the dataset this HL7v2 store belongs to.", 16291 // "location": "path", 16292 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", 16293 // "required": true, 16294 // "type": "string" 16295 // } 16296 // }, 16297 // "path": "v1alpha2/{+parent}/hl7V2Stores", 16298 // "request": { 16299 // "$ref": "Hl7V2Store" 16300 // }, 16301 // "response": { 16302 // "$ref": "Hl7V2Store" 16303 // }, 16304 // "scopes": [ 16305 // "https://www.googleapis.com/auth/cloud-platform" 16306 // ] 16307 // } 16308 16309} 16310 16311// method id "healthcare.projects.locations.datasets.hl7V2Stores.delete": 16312 16313type ProjectsLocationsDatasetsHl7V2StoresDeleteCall struct { 16314 s *Service 16315 name string 16316 urlParams_ gensupport.URLParams 16317 ctx_ context.Context 16318 header_ http.Header 16319} 16320 16321// Delete: Deletes the specified HL7v2 store and removes all messages 16322// that are 16323// contained within it. 16324func (r *ProjectsLocationsDatasetsHl7V2StoresService) Delete(name string) *ProjectsLocationsDatasetsHl7V2StoresDeleteCall { 16325 c := &ProjectsLocationsDatasetsHl7V2StoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16326 c.name = name 16327 return c 16328} 16329 16330// Fields allows partial responses to be retrieved. See 16331// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16332// for more information. 16333func (c *ProjectsLocationsDatasetsHl7V2StoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresDeleteCall { 16334 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16335 return c 16336} 16337 16338// Context sets the context to be used in this call's Do method. Any 16339// pending HTTP request will be aborted if the provided context is 16340// canceled. 16341func (c *ProjectsLocationsDatasetsHl7V2StoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresDeleteCall { 16342 c.ctx_ = ctx 16343 return c 16344} 16345 16346// Header returns an http.Header that can be modified by the caller to 16347// add HTTP headers to the request. 16348func (c *ProjectsLocationsDatasetsHl7V2StoresDeleteCall) Header() http.Header { 16349 if c.header_ == nil { 16350 c.header_ = make(http.Header) 16351 } 16352 return c.header_ 16353} 16354 16355func (c *ProjectsLocationsDatasetsHl7V2StoresDeleteCall) doRequest(alt string) (*http.Response, error) { 16356 reqHeaders := make(http.Header) 16357 for k, v := range c.header_ { 16358 reqHeaders[k] = v 16359 } 16360 reqHeaders.Set("User-Agent", c.s.userAgent()) 16361 var body io.Reader = nil 16362 c.urlParams_.Set("alt", alt) 16363 c.urlParams_.Set("prettyPrint", "false") 16364 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}") 16365 urls += "?" + c.urlParams_.Encode() 16366 req, err := http.NewRequest("DELETE", urls, body) 16367 if err != nil { 16368 return nil, err 16369 } 16370 req.Header = reqHeaders 16371 googleapi.Expand(req.URL, map[string]string{ 16372 "name": c.name, 16373 }) 16374 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16375} 16376 16377// Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.delete" call. 16378// Exactly one of *Empty or error will be non-nil. Any non-2xx status 16379// code is an error. Response headers are in either 16380// *Empty.ServerResponse.Header or (if a response was returned at all) 16381// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 16382// check whether the returned error was because http.StatusNotModified 16383// was returned. 16384func (c *ProjectsLocationsDatasetsHl7V2StoresDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 16385 gensupport.SetOptions(c.urlParams_, opts...) 16386 res, err := c.doRequest("json") 16387 if res != nil && res.StatusCode == http.StatusNotModified { 16388 if res.Body != nil { 16389 res.Body.Close() 16390 } 16391 return nil, &googleapi.Error{ 16392 Code: res.StatusCode, 16393 Header: res.Header, 16394 } 16395 } 16396 if err != nil { 16397 return nil, err 16398 } 16399 defer googleapi.CloseBody(res) 16400 if err := googleapi.CheckResponse(res); err != nil { 16401 return nil, err 16402 } 16403 ret := &Empty{ 16404 ServerResponse: googleapi.ServerResponse{ 16405 Header: res.Header, 16406 HTTPStatusCode: res.StatusCode, 16407 }, 16408 } 16409 target := &ret 16410 if err := gensupport.DecodeResponse(target, res); err != nil { 16411 return nil, err 16412 } 16413 return ret, nil 16414 // { 16415 // "description": "Deletes the specified HL7v2 store and removes all messages that are\ncontained within it.", 16416 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}", 16417 // "httpMethod": "DELETE", 16418 // "id": "healthcare.projects.locations.datasets.hl7V2Stores.delete", 16419 // "parameterOrder": [ 16420 // "name" 16421 // ], 16422 // "parameters": { 16423 // "name": { 16424 // "description": "The resource name of the HL7v2 store to delete.", 16425 // "location": "path", 16426 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", 16427 // "required": true, 16428 // "type": "string" 16429 // } 16430 // }, 16431 // "path": "v1alpha2/{+name}", 16432 // "response": { 16433 // "$ref": "Empty" 16434 // }, 16435 // "scopes": [ 16436 // "https://www.googleapis.com/auth/cloud-platform" 16437 // ] 16438 // } 16439 16440} 16441 16442// method id "healthcare.projects.locations.datasets.hl7V2Stores.get": 16443 16444type ProjectsLocationsDatasetsHl7V2StoresGetCall struct { 16445 s *Service 16446 name string 16447 urlParams_ gensupport.URLParams 16448 ifNoneMatch_ string 16449 ctx_ context.Context 16450 header_ http.Header 16451} 16452 16453// Get: Gets the specified HL7v2 store. 16454func (r *ProjectsLocationsDatasetsHl7V2StoresService) Get(name string) *ProjectsLocationsDatasetsHl7V2StoresGetCall { 16455 c := &ProjectsLocationsDatasetsHl7V2StoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16456 c.name = name 16457 return c 16458} 16459 16460// Fields allows partial responses to be retrieved. See 16461// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16462// for more information. 16463func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresGetCall { 16464 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16465 return c 16466} 16467 16468// IfNoneMatch sets the optional parameter which makes the operation 16469// fail if the object's ETag matches the given value. This is useful for 16470// getting updates only after the object has changed since the last 16471// request. Use googleapi.IsNotModified to check whether the response 16472// error from Do is the result of In-None-Match. 16473func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsHl7V2StoresGetCall { 16474 c.ifNoneMatch_ = entityTag 16475 return c 16476} 16477 16478// Context sets the context to be used in this call's Do method. Any 16479// pending HTTP request will be aborted if the provided context is 16480// canceled. 16481func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresGetCall { 16482 c.ctx_ = ctx 16483 return c 16484} 16485 16486// Header returns an http.Header that can be modified by the caller to 16487// add HTTP headers to the request. 16488func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) Header() http.Header { 16489 if c.header_ == nil { 16490 c.header_ = make(http.Header) 16491 } 16492 return c.header_ 16493} 16494 16495func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) doRequest(alt string) (*http.Response, error) { 16496 reqHeaders := make(http.Header) 16497 for k, v := range c.header_ { 16498 reqHeaders[k] = v 16499 } 16500 reqHeaders.Set("User-Agent", c.s.userAgent()) 16501 if c.ifNoneMatch_ != "" { 16502 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16503 } 16504 var body io.Reader = nil 16505 c.urlParams_.Set("alt", alt) 16506 c.urlParams_.Set("prettyPrint", "false") 16507 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}") 16508 urls += "?" + c.urlParams_.Encode() 16509 req, err := http.NewRequest("GET", urls, body) 16510 if err != nil { 16511 return nil, err 16512 } 16513 req.Header = reqHeaders 16514 googleapi.Expand(req.URL, map[string]string{ 16515 "name": c.name, 16516 }) 16517 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16518} 16519 16520// Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.get" call. 16521// Exactly one of *Hl7V2Store or error will be non-nil. Any non-2xx 16522// status code is an error. Response headers are in either 16523// *Hl7V2Store.ServerResponse.Header or (if a response was returned at 16524// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 16525// to check whether the returned error was because 16526// http.StatusNotModified was returned. 16527func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) Do(opts ...googleapi.CallOption) (*Hl7V2Store, error) { 16528 gensupport.SetOptions(c.urlParams_, opts...) 16529 res, err := c.doRequest("json") 16530 if res != nil && res.StatusCode == http.StatusNotModified { 16531 if res.Body != nil { 16532 res.Body.Close() 16533 } 16534 return nil, &googleapi.Error{ 16535 Code: res.StatusCode, 16536 Header: res.Header, 16537 } 16538 } 16539 if err != nil { 16540 return nil, err 16541 } 16542 defer googleapi.CloseBody(res) 16543 if err := googleapi.CheckResponse(res); err != nil { 16544 return nil, err 16545 } 16546 ret := &Hl7V2Store{ 16547 ServerResponse: googleapi.ServerResponse{ 16548 Header: res.Header, 16549 HTTPStatusCode: res.StatusCode, 16550 }, 16551 } 16552 target := &ret 16553 if err := gensupport.DecodeResponse(target, res); err != nil { 16554 return nil, err 16555 } 16556 return ret, nil 16557 // { 16558 // "description": "Gets the specified HL7v2 store.", 16559 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}", 16560 // "httpMethod": "GET", 16561 // "id": "healthcare.projects.locations.datasets.hl7V2Stores.get", 16562 // "parameterOrder": [ 16563 // "name" 16564 // ], 16565 // "parameters": { 16566 // "name": { 16567 // "description": "The resource name of the HL7v2 store to get.", 16568 // "location": "path", 16569 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", 16570 // "required": true, 16571 // "type": "string" 16572 // } 16573 // }, 16574 // "path": "v1alpha2/{+name}", 16575 // "response": { 16576 // "$ref": "Hl7V2Store" 16577 // }, 16578 // "scopes": [ 16579 // "https://www.googleapis.com/auth/cloud-platform" 16580 // ] 16581 // } 16582 16583} 16584 16585// method id "healthcare.projects.locations.datasets.hl7V2Stores.getIamPolicy": 16586 16587type ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall struct { 16588 s *Service 16589 resource string 16590 urlParams_ gensupport.URLParams 16591 ifNoneMatch_ string 16592 ctx_ context.Context 16593 header_ http.Header 16594} 16595 16596// GetIamPolicy: Gets the access control policy for a resource. 16597// Returns an empty policy if the resource exists and does not have a 16598// policy 16599// set. 16600func (r *ProjectsLocationsDatasetsHl7V2StoresService) GetIamPolicy(resource string) *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall { 16601 c := &ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16602 c.resource = resource 16603 return c 16604} 16605 16606// Fields allows partial responses to be retrieved. See 16607// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16608// for more information. 16609func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall { 16610 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16611 return c 16612} 16613 16614// IfNoneMatch sets the optional parameter which makes the operation 16615// fail if the object's ETag matches the given value. This is useful for 16616// getting updates only after the object has changed since the last 16617// request. Use googleapi.IsNotModified to check whether the response 16618// error from Do is the result of In-None-Match. 16619func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall { 16620 c.ifNoneMatch_ = entityTag 16621 return c 16622} 16623 16624// Context sets the context to be used in this call's Do method. Any 16625// pending HTTP request will be aborted if the provided context is 16626// canceled. 16627func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall { 16628 c.ctx_ = ctx 16629 return c 16630} 16631 16632// Header returns an http.Header that can be modified by the caller to 16633// add HTTP headers to the request. 16634func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) Header() http.Header { 16635 if c.header_ == nil { 16636 c.header_ = make(http.Header) 16637 } 16638 return c.header_ 16639} 16640 16641func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 16642 reqHeaders := make(http.Header) 16643 for k, v := range c.header_ { 16644 reqHeaders[k] = v 16645 } 16646 reqHeaders.Set("User-Agent", c.s.userAgent()) 16647 if c.ifNoneMatch_ != "" { 16648 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16649 } 16650 var body io.Reader = nil 16651 c.urlParams_.Set("alt", alt) 16652 c.urlParams_.Set("prettyPrint", "false") 16653 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:getIamPolicy") 16654 urls += "?" + c.urlParams_.Encode() 16655 req, err := http.NewRequest("GET", urls, body) 16656 if err != nil { 16657 return nil, err 16658 } 16659 req.Header = reqHeaders 16660 googleapi.Expand(req.URL, map[string]string{ 16661 "resource": c.resource, 16662 }) 16663 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16664} 16665 16666// Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.getIamPolicy" call. 16667// Exactly one of *Policy or error will be non-nil. Any non-2xx status 16668// code is an error. Response headers are in either 16669// *Policy.ServerResponse.Header or (if a response was returned at all) 16670// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 16671// check whether the returned error was because http.StatusNotModified 16672// was returned. 16673func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 16674 gensupport.SetOptions(c.urlParams_, opts...) 16675 res, err := c.doRequest("json") 16676 if res != nil && res.StatusCode == http.StatusNotModified { 16677 if res.Body != nil { 16678 res.Body.Close() 16679 } 16680 return nil, &googleapi.Error{ 16681 Code: res.StatusCode, 16682 Header: res.Header, 16683 } 16684 } 16685 if err != nil { 16686 return nil, err 16687 } 16688 defer googleapi.CloseBody(res) 16689 if err := googleapi.CheckResponse(res); err != nil { 16690 return nil, err 16691 } 16692 ret := &Policy{ 16693 ServerResponse: googleapi.ServerResponse{ 16694 Header: res.Header, 16695 HTTPStatusCode: res.StatusCode, 16696 }, 16697 } 16698 target := &ret 16699 if err := gensupport.DecodeResponse(target, res); err != nil { 16700 return nil, err 16701 } 16702 return ret, nil 16703 // { 16704 // "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", 16705 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}:getIamPolicy", 16706 // "httpMethod": "GET", 16707 // "id": "healthcare.projects.locations.datasets.hl7V2Stores.getIamPolicy", 16708 // "parameterOrder": [ 16709 // "resource" 16710 // ], 16711 // "parameters": { 16712 // "resource": { 16713 // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", 16714 // "location": "path", 16715 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", 16716 // "required": true, 16717 // "type": "string" 16718 // } 16719 // }, 16720 // "path": "v1alpha2/{+resource}:getIamPolicy", 16721 // "response": { 16722 // "$ref": "Policy" 16723 // }, 16724 // "scopes": [ 16725 // "https://www.googleapis.com/auth/cloud-platform" 16726 // ] 16727 // } 16728 16729} 16730 16731// method id "healthcare.projects.locations.datasets.hl7V2Stores.list": 16732 16733type ProjectsLocationsDatasetsHl7V2StoresListCall struct { 16734 s *Service 16735 parent string 16736 urlParams_ gensupport.URLParams 16737 ifNoneMatch_ string 16738 ctx_ context.Context 16739 header_ http.Header 16740} 16741 16742// List: Lists the HL7v2 stores in the given dataset. 16743func (r *ProjectsLocationsDatasetsHl7V2StoresService) List(parent string) *ProjectsLocationsDatasetsHl7V2StoresListCall { 16744 c := &ProjectsLocationsDatasetsHl7V2StoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16745 c.parent = parent 16746 return c 16747} 16748 16749// Filter sets the optional parameter "filter": Restricts stores 16750// returned to those matching a filter. 16751// Syntax: 16752// https://cloud.google.com/appengine/docs/standard/python/search 16753// /query_strings 16754// Only filtering on labels is supported, for example 16755// `labels.key=value`. 16756func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Filter(filter string) *ProjectsLocationsDatasetsHl7V2StoresListCall { 16757 c.urlParams_.Set("filter", filter) 16758 return c 16759} 16760 16761// PageSize sets the optional parameter "pageSize": Limit on the number 16762// of HL7v2 stores to return in a single response. 16763// If zero the default page size of 100 is used. 16764func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsHl7V2StoresListCall { 16765 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 16766 return c 16767} 16768 16769// PageToken sets the optional parameter "pageToken": The 16770// next_page_token value returned from the previous List request, if 16771// any. 16772func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsHl7V2StoresListCall { 16773 c.urlParams_.Set("pageToken", pageToken) 16774 return c 16775} 16776 16777// Fields allows partial responses to be retrieved. See 16778// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16779// for more information. 16780func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresListCall { 16781 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16782 return c 16783} 16784 16785// IfNoneMatch sets the optional parameter which makes the operation 16786// fail if the object's ETag matches the given value. This is useful for 16787// getting updates only after the object has changed since the last 16788// request. Use googleapi.IsNotModified to check whether the response 16789// error from Do is the result of In-None-Match. 16790func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsHl7V2StoresListCall { 16791 c.ifNoneMatch_ = entityTag 16792 return c 16793} 16794 16795// Context sets the context to be used in this call's Do method. Any 16796// pending HTTP request will be aborted if the provided context is 16797// canceled. 16798func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresListCall { 16799 c.ctx_ = ctx 16800 return c 16801} 16802 16803// Header returns an http.Header that can be modified by the caller to 16804// add HTTP headers to the request. 16805func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Header() http.Header { 16806 if c.header_ == nil { 16807 c.header_ = make(http.Header) 16808 } 16809 return c.header_ 16810} 16811 16812func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) doRequest(alt string) (*http.Response, error) { 16813 reqHeaders := make(http.Header) 16814 for k, v := range c.header_ { 16815 reqHeaders[k] = v 16816 } 16817 reqHeaders.Set("User-Agent", c.s.userAgent()) 16818 if c.ifNoneMatch_ != "" { 16819 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16820 } 16821 var body io.Reader = nil 16822 c.urlParams_.Set("alt", alt) 16823 c.urlParams_.Set("prettyPrint", "false") 16824 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/hl7V2Stores") 16825 urls += "?" + c.urlParams_.Encode() 16826 req, err := http.NewRequest("GET", urls, body) 16827 if err != nil { 16828 return nil, err 16829 } 16830 req.Header = reqHeaders 16831 googleapi.Expand(req.URL, map[string]string{ 16832 "parent": c.parent, 16833 }) 16834 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16835} 16836 16837// Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.list" call. 16838// Exactly one of *ListHl7V2StoresResponse or error will be non-nil. Any 16839// non-2xx status code is an error. Response headers are in either 16840// *ListHl7V2StoresResponse.ServerResponse.Header or (if a response was 16841// returned at all) in error.(*googleapi.Error).Header. Use 16842// googleapi.IsNotModified to check whether the returned error was 16843// because http.StatusNotModified was returned. 16844func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Do(opts ...googleapi.CallOption) (*ListHl7V2StoresResponse, error) { 16845 gensupport.SetOptions(c.urlParams_, opts...) 16846 res, err := c.doRequest("json") 16847 if res != nil && res.StatusCode == http.StatusNotModified { 16848 if res.Body != nil { 16849 res.Body.Close() 16850 } 16851 return nil, &googleapi.Error{ 16852 Code: res.StatusCode, 16853 Header: res.Header, 16854 } 16855 } 16856 if err != nil { 16857 return nil, err 16858 } 16859 defer googleapi.CloseBody(res) 16860 if err := googleapi.CheckResponse(res); err != nil { 16861 return nil, err 16862 } 16863 ret := &ListHl7V2StoresResponse{ 16864 ServerResponse: googleapi.ServerResponse{ 16865 Header: res.Header, 16866 HTTPStatusCode: res.StatusCode, 16867 }, 16868 } 16869 target := &ret 16870 if err := gensupport.DecodeResponse(target, res); err != nil { 16871 return nil, err 16872 } 16873 return ret, nil 16874 // { 16875 // "description": "Lists the HL7v2 stores in the given dataset.", 16876 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores", 16877 // "httpMethod": "GET", 16878 // "id": "healthcare.projects.locations.datasets.hl7V2Stores.list", 16879 // "parameterOrder": [ 16880 // "parent" 16881 // ], 16882 // "parameters": { 16883 // "filter": { 16884 // "description": "Restricts stores returned to those matching a filter. Syntax:\nhttps://cloud.google.com/appengine/docs/standard/python/search/query_strings\nOnly filtering on labels is supported, for example `labels.key=value`.", 16885 // "location": "query", 16886 // "type": "string" 16887 // }, 16888 // "pageSize": { 16889 // "description": "Limit on the number of HL7v2 stores to return in a single response.\nIf zero the default page size of 100 is used.", 16890 // "format": "int32", 16891 // "location": "query", 16892 // "type": "integer" 16893 // }, 16894 // "pageToken": { 16895 // "description": "The next_page_token value returned from the previous List request, if any.", 16896 // "location": "query", 16897 // "type": "string" 16898 // }, 16899 // "parent": { 16900 // "description": "Name of the dataset.", 16901 // "location": "path", 16902 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", 16903 // "required": true, 16904 // "type": "string" 16905 // } 16906 // }, 16907 // "path": "v1alpha2/{+parent}/hl7V2Stores", 16908 // "response": { 16909 // "$ref": "ListHl7V2StoresResponse" 16910 // }, 16911 // "scopes": [ 16912 // "https://www.googleapis.com/auth/cloud-platform" 16913 // ] 16914 // } 16915 16916} 16917 16918// Pages invokes f for each page of results. 16919// A non-nil error returned from f will halt the iteration. 16920// The provided context supersedes any context provided to the Context method. 16921func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Pages(ctx context.Context, f func(*ListHl7V2StoresResponse) error) error { 16922 c.ctx_ = ctx 16923 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 16924 for { 16925 x, err := c.Do() 16926 if err != nil { 16927 return err 16928 } 16929 if err := f(x); err != nil { 16930 return err 16931 } 16932 if x.NextPageToken == "" { 16933 return nil 16934 } 16935 c.PageToken(x.NextPageToken) 16936 } 16937} 16938 16939// method id "healthcare.projects.locations.datasets.hl7V2Stores.patch": 16940 16941type ProjectsLocationsDatasetsHl7V2StoresPatchCall struct { 16942 s *Service 16943 name string 16944 hl7v2store *Hl7V2Store 16945 urlParams_ gensupport.URLParams 16946 ctx_ context.Context 16947 header_ http.Header 16948} 16949 16950// Patch: Updates the HL7v2 store. 16951func (r *ProjectsLocationsDatasetsHl7V2StoresService) Patch(name string, hl7v2store *Hl7V2Store) *ProjectsLocationsDatasetsHl7V2StoresPatchCall { 16952 c := &ProjectsLocationsDatasetsHl7V2StoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16953 c.name = name 16954 c.hl7v2store = hl7v2store 16955 return c 16956} 16957 16958// UpdateMask sets the optional parameter "updateMask": The update mask 16959// applies to the resource. For the `FieldMask` 16960// definition, 16961// see 16962// https://developers.google.com/protocol-buffers/docs/re 16963// ference/google.protobuf#fieldmask 16964func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsHl7V2StoresPatchCall { 16965 c.urlParams_.Set("updateMask", updateMask) 16966 return c 16967} 16968 16969// Fields allows partial responses to be retrieved. See 16970// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16971// for more information. 16972func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresPatchCall { 16973 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16974 return c 16975} 16976 16977// Context sets the context to be used in this call's Do method. Any 16978// pending HTTP request will be aborted if the provided context is 16979// canceled. 16980func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresPatchCall { 16981 c.ctx_ = ctx 16982 return c 16983} 16984 16985// Header returns an http.Header that can be modified by the caller to 16986// add HTTP headers to the request. 16987func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) Header() http.Header { 16988 if c.header_ == nil { 16989 c.header_ = make(http.Header) 16990 } 16991 return c.header_ 16992} 16993 16994func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) doRequest(alt string) (*http.Response, error) { 16995 reqHeaders := make(http.Header) 16996 for k, v := range c.header_ { 16997 reqHeaders[k] = v 16998 } 16999 reqHeaders.Set("User-Agent", c.s.userAgent()) 17000 var body io.Reader = nil 17001 body, err := googleapi.WithoutDataWrapper.JSONReader(c.hl7v2store) 17002 if err != nil { 17003 return nil, err 17004 } 17005 reqHeaders.Set("Content-Type", "application/json") 17006 c.urlParams_.Set("alt", alt) 17007 c.urlParams_.Set("prettyPrint", "false") 17008 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}") 17009 urls += "?" + c.urlParams_.Encode() 17010 req, err := http.NewRequest("PATCH", urls, body) 17011 if err != nil { 17012 return nil, err 17013 } 17014 req.Header = reqHeaders 17015 googleapi.Expand(req.URL, map[string]string{ 17016 "name": c.name, 17017 }) 17018 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17019} 17020 17021// Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.patch" call. 17022// Exactly one of *Hl7V2Store or error will be non-nil. Any non-2xx 17023// status code is an error. Response headers are in either 17024// *Hl7V2Store.ServerResponse.Header or (if a response was returned at 17025// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 17026// to check whether the returned error was because 17027// http.StatusNotModified was returned. 17028func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) Do(opts ...googleapi.CallOption) (*Hl7V2Store, error) { 17029 gensupport.SetOptions(c.urlParams_, opts...) 17030 res, err := c.doRequest("json") 17031 if res != nil && res.StatusCode == http.StatusNotModified { 17032 if res.Body != nil { 17033 res.Body.Close() 17034 } 17035 return nil, &googleapi.Error{ 17036 Code: res.StatusCode, 17037 Header: res.Header, 17038 } 17039 } 17040 if err != nil { 17041 return nil, err 17042 } 17043 defer googleapi.CloseBody(res) 17044 if err := googleapi.CheckResponse(res); err != nil { 17045 return nil, err 17046 } 17047 ret := &Hl7V2Store{ 17048 ServerResponse: googleapi.ServerResponse{ 17049 Header: res.Header, 17050 HTTPStatusCode: res.StatusCode, 17051 }, 17052 } 17053 target := &ret 17054 if err := gensupport.DecodeResponse(target, res); err != nil { 17055 return nil, err 17056 } 17057 return ret, nil 17058 // { 17059 // "description": "Updates the HL7v2 store.", 17060 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}", 17061 // "httpMethod": "PATCH", 17062 // "id": "healthcare.projects.locations.datasets.hl7V2Stores.patch", 17063 // "parameterOrder": [ 17064 // "name" 17065 // ], 17066 // "parameters": { 17067 // "name": { 17068 // "description": "Output only. Resource name of the HL7v2 store, of the form\n`projects/{project_id}/datasets/{dataset_id}/hl7V2Stores/{hl7v2_store_id}`.", 17069 // "location": "path", 17070 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", 17071 // "required": true, 17072 // "type": "string" 17073 // }, 17074 // "updateMask": { 17075 // "description": "The update mask applies to the resource. For the `FieldMask` definition,\nsee\nhttps://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", 17076 // "format": "google-fieldmask", 17077 // "location": "query", 17078 // "type": "string" 17079 // } 17080 // }, 17081 // "path": "v1alpha2/{+name}", 17082 // "request": { 17083 // "$ref": "Hl7V2Store" 17084 // }, 17085 // "response": { 17086 // "$ref": "Hl7V2Store" 17087 // }, 17088 // "scopes": [ 17089 // "https://www.googleapis.com/auth/cloud-platform" 17090 // ] 17091 // } 17092 17093} 17094 17095// method id "healthcare.projects.locations.datasets.hl7V2Stores.setIamPolicy": 17096 17097type ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall struct { 17098 s *Service 17099 resource string 17100 setiampolicyrequest *SetIamPolicyRequest 17101 urlParams_ gensupport.URLParams 17102 ctx_ context.Context 17103 header_ http.Header 17104} 17105 17106// SetIamPolicy: Sets the access control policy on the specified 17107// resource. Replaces any 17108// existing policy. 17109func (r *ProjectsLocationsDatasetsHl7V2StoresService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall { 17110 c := &ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17111 c.resource = resource 17112 c.setiampolicyrequest = setiampolicyrequest 17113 return c 17114} 17115 17116// Fields allows partial responses to be retrieved. See 17117// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17118// for more information. 17119func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall { 17120 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17121 return c 17122} 17123 17124// Context sets the context to be used in this call's Do method. Any 17125// pending HTTP request will be aborted if the provided context is 17126// canceled. 17127func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall { 17128 c.ctx_ = ctx 17129 return c 17130} 17131 17132// Header returns an http.Header that can be modified by the caller to 17133// add HTTP headers to the request. 17134func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) Header() http.Header { 17135 if c.header_ == nil { 17136 c.header_ = make(http.Header) 17137 } 17138 return c.header_ 17139} 17140 17141func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 17142 reqHeaders := make(http.Header) 17143 for k, v := range c.header_ { 17144 reqHeaders[k] = v 17145 } 17146 reqHeaders.Set("User-Agent", c.s.userAgent()) 17147 var body io.Reader = nil 17148 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 17149 if err != nil { 17150 return nil, err 17151 } 17152 reqHeaders.Set("Content-Type", "application/json") 17153 c.urlParams_.Set("alt", alt) 17154 c.urlParams_.Set("prettyPrint", "false") 17155 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:setIamPolicy") 17156 urls += "?" + c.urlParams_.Encode() 17157 req, err := http.NewRequest("POST", urls, body) 17158 if err != nil { 17159 return nil, err 17160 } 17161 req.Header = reqHeaders 17162 googleapi.Expand(req.URL, map[string]string{ 17163 "resource": c.resource, 17164 }) 17165 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17166} 17167 17168// Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.setIamPolicy" call. 17169// Exactly one of *Policy or error will be non-nil. Any non-2xx status 17170// code is an error. Response headers are in either 17171// *Policy.ServerResponse.Header or (if a response was returned at all) 17172// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 17173// check whether the returned error was because http.StatusNotModified 17174// was returned. 17175func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 17176 gensupport.SetOptions(c.urlParams_, opts...) 17177 res, err := c.doRequest("json") 17178 if res != nil && res.StatusCode == http.StatusNotModified { 17179 if res.Body != nil { 17180 res.Body.Close() 17181 } 17182 return nil, &googleapi.Error{ 17183 Code: res.StatusCode, 17184 Header: res.Header, 17185 } 17186 } 17187 if err != nil { 17188 return nil, err 17189 } 17190 defer googleapi.CloseBody(res) 17191 if err := googleapi.CheckResponse(res); err != nil { 17192 return nil, err 17193 } 17194 ret := &Policy{ 17195 ServerResponse: googleapi.ServerResponse{ 17196 Header: res.Header, 17197 HTTPStatusCode: res.StatusCode, 17198 }, 17199 } 17200 target := &ret 17201 if err := gensupport.DecodeResponse(target, res); err != nil { 17202 return nil, err 17203 } 17204 return ret, nil 17205 // { 17206 // "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", 17207 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}:setIamPolicy", 17208 // "httpMethod": "POST", 17209 // "id": "healthcare.projects.locations.datasets.hl7V2Stores.setIamPolicy", 17210 // "parameterOrder": [ 17211 // "resource" 17212 // ], 17213 // "parameters": { 17214 // "resource": { 17215 // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", 17216 // "location": "path", 17217 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", 17218 // "required": true, 17219 // "type": "string" 17220 // } 17221 // }, 17222 // "path": "v1alpha2/{+resource}:setIamPolicy", 17223 // "request": { 17224 // "$ref": "SetIamPolicyRequest" 17225 // }, 17226 // "response": { 17227 // "$ref": "Policy" 17228 // }, 17229 // "scopes": [ 17230 // "https://www.googleapis.com/auth/cloud-platform" 17231 // ] 17232 // } 17233 17234} 17235 17236// method id "healthcare.projects.locations.datasets.hl7V2Stores.testIamPermissions": 17237 17238type ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall struct { 17239 s *Service 17240 resource string 17241 testiampermissionsrequest *TestIamPermissionsRequest 17242 urlParams_ gensupport.URLParams 17243 ctx_ context.Context 17244 header_ http.Header 17245} 17246 17247// TestIamPermissions: Returns permissions that a caller has on the 17248// specified resource. 17249// If the resource does not exist, this will return an empty set 17250// of 17251// permissions, not a NOT_FOUND error. 17252// 17253// Note: This operation is designed to be used for building 17254// permission-aware 17255// UIs and command-line tools, not for authorization checking. This 17256// operation 17257// may "fail open" without warning. 17258func (r *ProjectsLocationsDatasetsHl7V2StoresService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall { 17259 c := &ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17260 c.resource = resource 17261 c.testiampermissionsrequest = testiampermissionsrequest 17262 return c 17263} 17264 17265// Fields allows partial responses to be retrieved. See 17266// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17267// for more information. 17268func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall { 17269 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17270 return c 17271} 17272 17273// Context sets the context to be used in this call's Do method. Any 17274// pending HTTP request will be aborted if the provided context is 17275// canceled. 17276func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall { 17277 c.ctx_ = ctx 17278 return c 17279} 17280 17281// Header returns an http.Header that can be modified by the caller to 17282// add HTTP headers to the request. 17283func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) Header() http.Header { 17284 if c.header_ == nil { 17285 c.header_ = make(http.Header) 17286 } 17287 return c.header_ 17288} 17289 17290func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 17291 reqHeaders := make(http.Header) 17292 for k, v := range c.header_ { 17293 reqHeaders[k] = v 17294 } 17295 reqHeaders.Set("User-Agent", c.s.userAgent()) 17296 var body io.Reader = nil 17297 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 17298 if err != nil { 17299 return nil, err 17300 } 17301 reqHeaders.Set("Content-Type", "application/json") 17302 c.urlParams_.Set("alt", alt) 17303 c.urlParams_.Set("prettyPrint", "false") 17304 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:testIamPermissions") 17305 urls += "?" + c.urlParams_.Encode() 17306 req, err := http.NewRequest("POST", urls, body) 17307 if err != nil { 17308 return nil, err 17309 } 17310 req.Header = reqHeaders 17311 googleapi.Expand(req.URL, map[string]string{ 17312 "resource": c.resource, 17313 }) 17314 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17315} 17316 17317// Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.testIamPermissions" call. 17318// Exactly one of *TestIamPermissionsResponse or error will be non-nil. 17319// Any non-2xx status code is an error. Response headers are in either 17320// *TestIamPermissionsResponse.ServerResponse.Header or (if a response 17321// was returned at all) in error.(*googleapi.Error).Header. Use 17322// googleapi.IsNotModified to check whether the returned error was 17323// because http.StatusNotModified was returned. 17324func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 17325 gensupport.SetOptions(c.urlParams_, opts...) 17326 res, err := c.doRequest("json") 17327 if res != nil && res.StatusCode == http.StatusNotModified { 17328 if res.Body != nil { 17329 res.Body.Close() 17330 } 17331 return nil, &googleapi.Error{ 17332 Code: res.StatusCode, 17333 Header: res.Header, 17334 } 17335 } 17336 if err != nil { 17337 return nil, err 17338 } 17339 defer googleapi.CloseBody(res) 17340 if err := googleapi.CheckResponse(res); err != nil { 17341 return nil, err 17342 } 17343 ret := &TestIamPermissionsResponse{ 17344 ServerResponse: googleapi.ServerResponse{ 17345 Header: res.Header, 17346 HTTPStatusCode: res.StatusCode, 17347 }, 17348 } 17349 target := &ret 17350 if err := gensupport.DecodeResponse(target, res); err != nil { 17351 return nil, err 17352 } 17353 return ret, nil 17354 // { 17355 // "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.", 17356 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}:testIamPermissions", 17357 // "httpMethod": "POST", 17358 // "id": "healthcare.projects.locations.datasets.hl7V2Stores.testIamPermissions", 17359 // "parameterOrder": [ 17360 // "resource" 17361 // ], 17362 // "parameters": { 17363 // "resource": { 17364 // "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", 17365 // "location": "path", 17366 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", 17367 // "required": true, 17368 // "type": "string" 17369 // } 17370 // }, 17371 // "path": "v1alpha2/{+resource}:testIamPermissions", 17372 // "request": { 17373 // "$ref": "TestIamPermissionsRequest" 17374 // }, 17375 // "response": { 17376 // "$ref": "TestIamPermissionsResponse" 17377 // }, 17378 // "scopes": [ 17379 // "https://www.googleapis.com/auth/cloud-platform" 17380 // ] 17381 // } 17382 17383} 17384 17385// method id "healthcare.projects.locations.datasets.hl7V2Stores.messages.create": 17386 17387type ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall struct { 17388 s *Service 17389 parent string 17390 createmessagerequest *CreateMessageRequest 17391 urlParams_ gensupport.URLParams 17392 ctx_ context.Context 17393 header_ http.Header 17394} 17395 17396// Create: Creates a message and sends a notification to the Cloud 17397// Pub/Sub topic. If 17398// configured, the MLLP adapter listens to messages created by this 17399// method and 17400// sends those back to the hospital. A successful response indicates 17401// the 17402// message has been persisted to storage and a Cloud Pub/Sub 17403// notification has 17404// been sent. Sending to the hospital by the MLLP adapter 17405// happens 17406// asynchronously. 17407func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) Create(parent string, createmessagerequest *CreateMessageRequest) *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall { 17408 c := &ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17409 c.parent = parent 17410 c.createmessagerequest = createmessagerequest 17411 return c 17412} 17413 17414// Fields allows partial responses to be retrieved. See 17415// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17416// for more information. 17417func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall { 17418 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17419 return c 17420} 17421 17422// Context sets the context to be used in this call's Do method. Any 17423// pending HTTP request will be aborted if the provided context is 17424// canceled. 17425func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall { 17426 c.ctx_ = ctx 17427 return c 17428} 17429 17430// Header returns an http.Header that can be modified by the caller to 17431// add HTTP headers to the request. 17432func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall) Header() http.Header { 17433 if c.header_ == nil { 17434 c.header_ = make(http.Header) 17435 } 17436 return c.header_ 17437} 17438 17439func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall) doRequest(alt string) (*http.Response, error) { 17440 reqHeaders := make(http.Header) 17441 for k, v := range c.header_ { 17442 reqHeaders[k] = v 17443 } 17444 reqHeaders.Set("User-Agent", c.s.userAgent()) 17445 var body io.Reader = nil 17446 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createmessagerequest) 17447 if err != nil { 17448 return nil, err 17449 } 17450 reqHeaders.Set("Content-Type", "application/json") 17451 c.urlParams_.Set("alt", alt) 17452 c.urlParams_.Set("prettyPrint", "false") 17453 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/messages") 17454 urls += "?" + c.urlParams_.Encode() 17455 req, err := http.NewRequest("POST", urls, body) 17456 if err != nil { 17457 return nil, err 17458 } 17459 req.Header = reqHeaders 17460 googleapi.Expand(req.URL, map[string]string{ 17461 "parent": c.parent, 17462 }) 17463 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17464} 17465 17466// Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.create" call. 17467// Exactly one of *Message or error will be non-nil. Any non-2xx status 17468// code is an error. Response headers are in either 17469// *Message.ServerResponse.Header or (if a response was returned at all) 17470// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 17471// check whether the returned error was because http.StatusNotModified 17472// was returned. 17473func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall) Do(opts ...googleapi.CallOption) (*Message, error) { 17474 gensupport.SetOptions(c.urlParams_, opts...) 17475 res, err := c.doRequest("json") 17476 if res != nil && res.StatusCode == http.StatusNotModified { 17477 if res.Body != nil { 17478 res.Body.Close() 17479 } 17480 return nil, &googleapi.Error{ 17481 Code: res.StatusCode, 17482 Header: res.Header, 17483 } 17484 } 17485 if err != nil { 17486 return nil, err 17487 } 17488 defer googleapi.CloseBody(res) 17489 if err := googleapi.CheckResponse(res); err != nil { 17490 return nil, err 17491 } 17492 ret := &Message{ 17493 ServerResponse: googleapi.ServerResponse{ 17494 Header: res.Header, 17495 HTTPStatusCode: res.StatusCode, 17496 }, 17497 } 17498 target := &ret 17499 if err := gensupport.DecodeResponse(target, res); err != nil { 17500 return nil, err 17501 } 17502 return ret, nil 17503 // { 17504 // "description": "Creates a message and sends a notification to the Cloud Pub/Sub topic. If\nconfigured, the MLLP adapter listens to messages created by this method and\nsends those back to the hospital. A successful response indicates the\nmessage has been persisted to storage and a Cloud Pub/Sub notification has\nbeen sent. Sending to the hospital by the MLLP adapter happens\nasynchronously.", 17505 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}/messages", 17506 // "httpMethod": "POST", 17507 // "id": "healthcare.projects.locations.datasets.hl7V2Stores.messages.create", 17508 // "parameterOrder": [ 17509 // "parent" 17510 // ], 17511 // "parameters": { 17512 // "parent": { 17513 // "description": "The name of the dataset this message belongs to.", 17514 // "location": "path", 17515 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", 17516 // "required": true, 17517 // "type": "string" 17518 // } 17519 // }, 17520 // "path": "v1alpha2/{+parent}/messages", 17521 // "request": { 17522 // "$ref": "CreateMessageRequest" 17523 // }, 17524 // "response": { 17525 // "$ref": "Message" 17526 // }, 17527 // "scopes": [ 17528 // "https://www.googleapis.com/auth/cloud-platform" 17529 // ] 17530 // } 17531 17532} 17533 17534// method id "healthcare.projects.locations.datasets.hl7V2Stores.messages.delete": 17535 17536type ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall struct { 17537 s *Service 17538 name string 17539 urlParams_ gensupport.URLParams 17540 ctx_ context.Context 17541 header_ http.Header 17542} 17543 17544// Delete: Deletes an HL7v2 message. 17545func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) Delete(name string) *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall { 17546 c := &ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17547 c.name = name 17548 return c 17549} 17550 17551// Fields allows partial responses to be retrieved. See 17552// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17553// for more information. 17554func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall { 17555 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17556 return c 17557} 17558 17559// Context sets the context to be used in this call's Do method. Any 17560// pending HTTP request will be aborted if the provided context is 17561// canceled. 17562func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall { 17563 c.ctx_ = ctx 17564 return c 17565} 17566 17567// Header returns an http.Header that can be modified by the caller to 17568// add HTTP headers to the request. 17569func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall) Header() http.Header { 17570 if c.header_ == nil { 17571 c.header_ = make(http.Header) 17572 } 17573 return c.header_ 17574} 17575 17576func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall) doRequest(alt string) (*http.Response, error) { 17577 reqHeaders := make(http.Header) 17578 for k, v := range c.header_ { 17579 reqHeaders[k] = v 17580 } 17581 reqHeaders.Set("User-Agent", c.s.userAgent()) 17582 var body io.Reader = nil 17583 c.urlParams_.Set("alt", alt) 17584 c.urlParams_.Set("prettyPrint", "false") 17585 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}") 17586 urls += "?" + c.urlParams_.Encode() 17587 req, err := http.NewRequest("DELETE", urls, body) 17588 if err != nil { 17589 return nil, err 17590 } 17591 req.Header = reqHeaders 17592 googleapi.Expand(req.URL, map[string]string{ 17593 "name": c.name, 17594 }) 17595 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17596} 17597 17598// Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.delete" call. 17599// Exactly one of *Empty or error will be non-nil. Any non-2xx status 17600// code is an error. Response headers are in either 17601// *Empty.ServerResponse.Header or (if a response was returned at all) 17602// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 17603// check whether the returned error was because http.StatusNotModified 17604// was returned. 17605func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 17606 gensupport.SetOptions(c.urlParams_, opts...) 17607 res, err := c.doRequest("json") 17608 if res != nil && res.StatusCode == http.StatusNotModified { 17609 if res.Body != nil { 17610 res.Body.Close() 17611 } 17612 return nil, &googleapi.Error{ 17613 Code: res.StatusCode, 17614 Header: res.Header, 17615 } 17616 } 17617 if err != nil { 17618 return nil, err 17619 } 17620 defer googleapi.CloseBody(res) 17621 if err := googleapi.CheckResponse(res); err != nil { 17622 return nil, err 17623 } 17624 ret := &Empty{ 17625 ServerResponse: googleapi.ServerResponse{ 17626 Header: res.Header, 17627 HTTPStatusCode: res.StatusCode, 17628 }, 17629 } 17630 target := &ret 17631 if err := gensupport.DecodeResponse(target, res); err != nil { 17632 return nil, err 17633 } 17634 return ret, nil 17635 // { 17636 // "description": "Deletes an HL7v2 message.", 17637 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}/messages/{messagesId}", 17638 // "httpMethod": "DELETE", 17639 // "id": "healthcare.projects.locations.datasets.hl7V2Stores.messages.delete", 17640 // "parameterOrder": [ 17641 // "name" 17642 // ], 17643 // "parameters": { 17644 // "name": { 17645 // "description": "The resource name of the HL7v2 message to delete.", 17646 // "location": "path", 17647 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+/messages/[^/]+$", 17648 // "required": true, 17649 // "type": "string" 17650 // } 17651 // }, 17652 // "path": "v1alpha2/{+name}", 17653 // "response": { 17654 // "$ref": "Empty" 17655 // }, 17656 // "scopes": [ 17657 // "https://www.googleapis.com/auth/cloud-platform" 17658 // ] 17659 // } 17660 17661} 17662 17663// method id "healthcare.projects.locations.datasets.hl7V2Stores.messages.get": 17664 17665type ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall struct { 17666 s *Service 17667 name string 17668 urlParams_ gensupport.URLParams 17669 ifNoneMatch_ string 17670 ctx_ context.Context 17671 header_ http.Header 17672} 17673 17674// Get: Gets an HL7v2 message. 17675func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) Get(name string) *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall { 17676 c := &ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17677 c.name = name 17678 return c 17679} 17680 17681// View sets the optional parameter "view": Specifies which parts of the 17682// Message resource should be returned 17683// in the response. 17684// 17685// Possible values: 17686// "MESSAGE_VIEW_UNSPECIFIED" 17687// "RAW_ONLY" 17688// "PARSED_ONLY" 17689// "FULL" 17690func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) View(view string) *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall { 17691 c.urlParams_.Set("view", view) 17692 return c 17693} 17694 17695// Fields allows partial responses to be retrieved. See 17696// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17697// for more information. 17698func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall { 17699 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17700 return c 17701} 17702 17703// IfNoneMatch sets the optional parameter which makes the operation 17704// fail if the object's ETag matches the given value. This is useful for 17705// getting updates only after the object has changed since the last 17706// request. Use googleapi.IsNotModified to check whether the response 17707// error from Do is the result of In-None-Match. 17708func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall { 17709 c.ifNoneMatch_ = entityTag 17710 return c 17711} 17712 17713// Context sets the context to be used in this call's Do method. Any 17714// pending HTTP request will be aborted if the provided context is 17715// canceled. 17716func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall { 17717 c.ctx_ = ctx 17718 return c 17719} 17720 17721// Header returns an http.Header that can be modified by the caller to 17722// add HTTP headers to the request. 17723func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) Header() http.Header { 17724 if c.header_ == nil { 17725 c.header_ = make(http.Header) 17726 } 17727 return c.header_ 17728} 17729 17730func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) doRequest(alt string) (*http.Response, error) { 17731 reqHeaders := make(http.Header) 17732 for k, v := range c.header_ { 17733 reqHeaders[k] = v 17734 } 17735 reqHeaders.Set("User-Agent", c.s.userAgent()) 17736 if c.ifNoneMatch_ != "" { 17737 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 17738 } 17739 var body io.Reader = nil 17740 c.urlParams_.Set("alt", alt) 17741 c.urlParams_.Set("prettyPrint", "false") 17742 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}") 17743 urls += "?" + c.urlParams_.Encode() 17744 req, err := http.NewRequest("GET", urls, body) 17745 if err != nil { 17746 return nil, err 17747 } 17748 req.Header = reqHeaders 17749 googleapi.Expand(req.URL, map[string]string{ 17750 "name": c.name, 17751 }) 17752 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17753} 17754 17755// Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.get" call. 17756// Exactly one of *Message or error will be non-nil. Any non-2xx status 17757// code is an error. Response headers are in either 17758// *Message.ServerResponse.Header or (if a response was returned at all) 17759// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 17760// check whether the returned error was because http.StatusNotModified 17761// was returned. 17762func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) Do(opts ...googleapi.CallOption) (*Message, error) { 17763 gensupport.SetOptions(c.urlParams_, opts...) 17764 res, err := c.doRequest("json") 17765 if res != nil && res.StatusCode == http.StatusNotModified { 17766 if res.Body != nil { 17767 res.Body.Close() 17768 } 17769 return nil, &googleapi.Error{ 17770 Code: res.StatusCode, 17771 Header: res.Header, 17772 } 17773 } 17774 if err != nil { 17775 return nil, err 17776 } 17777 defer googleapi.CloseBody(res) 17778 if err := googleapi.CheckResponse(res); err != nil { 17779 return nil, err 17780 } 17781 ret := &Message{ 17782 ServerResponse: googleapi.ServerResponse{ 17783 Header: res.Header, 17784 HTTPStatusCode: res.StatusCode, 17785 }, 17786 } 17787 target := &ret 17788 if err := gensupport.DecodeResponse(target, res); err != nil { 17789 return nil, err 17790 } 17791 return ret, nil 17792 // { 17793 // "description": "Gets an HL7v2 message.", 17794 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}/messages/{messagesId}", 17795 // "httpMethod": "GET", 17796 // "id": "healthcare.projects.locations.datasets.hl7V2Stores.messages.get", 17797 // "parameterOrder": [ 17798 // "name" 17799 // ], 17800 // "parameters": { 17801 // "name": { 17802 // "description": "The resource name of the HL7v2 message to retrieve.", 17803 // "location": "path", 17804 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+/messages/[^/]+$", 17805 // "required": true, 17806 // "type": "string" 17807 // }, 17808 // "view": { 17809 // "description": "Specifies which parts of the Message resource should be returned\nin the response.", 17810 // "enum": [ 17811 // "MESSAGE_VIEW_UNSPECIFIED", 17812 // "RAW_ONLY", 17813 // "PARSED_ONLY", 17814 // "FULL" 17815 // ], 17816 // "location": "query", 17817 // "type": "string" 17818 // } 17819 // }, 17820 // "path": "v1alpha2/{+name}", 17821 // "response": { 17822 // "$ref": "Message" 17823 // }, 17824 // "scopes": [ 17825 // "https://www.googleapis.com/auth/cloud-platform" 17826 // ] 17827 // } 17828 17829} 17830 17831// method id "healthcare.projects.locations.datasets.hl7V2Stores.messages.ingest": 17832 17833type ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall struct { 17834 s *Service 17835 parent string 17836 ingestmessagerequest *IngestMessageRequest 17837 urlParams_ gensupport.URLParams 17838 ctx_ context.Context 17839 header_ http.Header 17840} 17841 17842// Ingest: Ingests a new HL7v2 message from the hospital and sends a 17843// notification to 17844// the Cloud Pub/Sub topic. Return is an HL7v2 ACK message if the 17845// message was 17846// successfully stored. Otherwise an error is returned. If an 17847// identical 17848// HL7v2 message is created twice only one resource is created on the 17849// server 17850// and no error is reported. 17851func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) Ingest(parent string, ingestmessagerequest *IngestMessageRequest) *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall { 17852 c := &ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17853 c.parent = parent 17854 c.ingestmessagerequest = ingestmessagerequest 17855 return c 17856} 17857 17858// Fields allows partial responses to be retrieved. See 17859// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17860// for more information. 17861func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall { 17862 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17863 return c 17864} 17865 17866// Context sets the context to be used in this call's Do method. Any 17867// pending HTTP request will be aborted if the provided context is 17868// canceled. 17869func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall { 17870 c.ctx_ = ctx 17871 return c 17872} 17873 17874// Header returns an http.Header that can be modified by the caller to 17875// add HTTP headers to the request. 17876func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall) Header() http.Header { 17877 if c.header_ == nil { 17878 c.header_ = make(http.Header) 17879 } 17880 return c.header_ 17881} 17882 17883func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall) doRequest(alt string) (*http.Response, error) { 17884 reqHeaders := make(http.Header) 17885 for k, v := range c.header_ { 17886 reqHeaders[k] = v 17887 } 17888 reqHeaders.Set("User-Agent", c.s.userAgent()) 17889 var body io.Reader = nil 17890 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ingestmessagerequest) 17891 if err != nil { 17892 return nil, err 17893 } 17894 reqHeaders.Set("Content-Type", "application/json") 17895 c.urlParams_.Set("alt", alt) 17896 c.urlParams_.Set("prettyPrint", "false") 17897 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/messages:ingest") 17898 urls += "?" + c.urlParams_.Encode() 17899 req, err := http.NewRequest("POST", urls, body) 17900 if err != nil { 17901 return nil, err 17902 } 17903 req.Header = reqHeaders 17904 googleapi.Expand(req.URL, map[string]string{ 17905 "parent": c.parent, 17906 }) 17907 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17908} 17909 17910// Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.ingest" call. 17911// Exactly one of *IngestMessageResponse or error will be non-nil. Any 17912// non-2xx status code is an error. Response headers are in either 17913// *IngestMessageResponse.ServerResponse.Header or (if a response was 17914// returned at all) in error.(*googleapi.Error).Header. Use 17915// googleapi.IsNotModified to check whether the returned error was 17916// because http.StatusNotModified was returned. 17917func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall) Do(opts ...googleapi.CallOption) (*IngestMessageResponse, error) { 17918 gensupport.SetOptions(c.urlParams_, opts...) 17919 res, err := c.doRequest("json") 17920 if res != nil && res.StatusCode == http.StatusNotModified { 17921 if res.Body != nil { 17922 res.Body.Close() 17923 } 17924 return nil, &googleapi.Error{ 17925 Code: res.StatusCode, 17926 Header: res.Header, 17927 } 17928 } 17929 if err != nil { 17930 return nil, err 17931 } 17932 defer googleapi.CloseBody(res) 17933 if err := googleapi.CheckResponse(res); err != nil { 17934 return nil, err 17935 } 17936 ret := &IngestMessageResponse{ 17937 ServerResponse: googleapi.ServerResponse{ 17938 Header: res.Header, 17939 HTTPStatusCode: res.StatusCode, 17940 }, 17941 } 17942 target := &ret 17943 if err := gensupport.DecodeResponse(target, res); err != nil { 17944 return nil, err 17945 } 17946 return ret, nil 17947 // { 17948 // "description": "Ingests a new HL7v2 message from the hospital and sends a notification to\nthe Cloud Pub/Sub topic. Return is an HL7v2 ACK message if the message was\nsuccessfully stored. Otherwise an error is returned. If an identical\nHL7v2 message is created twice only one resource is created on the server\nand no error is reported.", 17949 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}/messages:ingest", 17950 // "httpMethod": "POST", 17951 // "id": "healthcare.projects.locations.datasets.hl7V2Stores.messages.ingest", 17952 // "parameterOrder": [ 17953 // "parent" 17954 // ], 17955 // "parameters": { 17956 // "parent": { 17957 // "description": "The name of the HL7v2 store this message belongs to.", 17958 // "location": "path", 17959 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", 17960 // "required": true, 17961 // "type": "string" 17962 // } 17963 // }, 17964 // "path": "v1alpha2/{+parent}/messages:ingest", 17965 // "request": { 17966 // "$ref": "IngestMessageRequest" 17967 // }, 17968 // "response": { 17969 // "$ref": "IngestMessageResponse" 17970 // }, 17971 // "scopes": [ 17972 // "https://www.googleapis.com/auth/cloud-platform" 17973 // ] 17974 // } 17975 17976} 17977 17978// method id "healthcare.projects.locations.datasets.hl7V2Stores.messages.list": 17979 17980type ProjectsLocationsDatasetsHl7V2StoresMessagesListCall struct { 17981 s *Service 17982 parent string 17983 urlParams_ gensupport.URLParams 17984 ifNoneMatch_ string 17985 ctx_ context.Context 17986 header_ http.Header 17987} 17988 17989// List: Lists all the messages in the given HL7v2 store with support 17990// for filtering. 17991func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) List(parent string) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall { 17992 c := &ProjectsLocationsDatasetsHl7V2StoresMessagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17993 c.parent = parent 17994 return c 17995} 17996 17997// Filter sets the optional parameter "filter": Restricts messages 17998// returned to those matching a filter. 17999// Syntax: 18000// https://cloud.google.com/appengine/docs/standard/python/search 18001// /query_strings 18002// 18003// Fields/functions available for filtering are: 18004// 18005// * `message_type`, from the MSH-9 segment; for example 18006// `NOT message_type = "ADT" 18007// * `send_date` or `sendDate`, the YYYY-MM-DD date the message was 18008// sent in 18009// the dataset's time_zone, from the MSH-7 segment; for 18010// example 18011// `send_date < "2017-01-02" 18012// * `send_time`, the timestamp of when the message was sent, using 18013// the 18014// RFC3339 time format for comparisons, from the MSH-7 segment; for 18015// example 18016// `send_time < "2017-01-02T00:00:00-05:00" 18017// * `send_facility`, the care center that the message came from, from 18018// the 18019// MSH-4 segment; for example `send_facility = "ABC" 18020// * `HL7RegExp(expr)`, which does regular expression matching of 18021// `expr` 18022// against the message payload using re2 18023// (http://code.google.com/p/re2/) 18024// syntax; for example `HL7RegExp("^.*\|.*\|EMERG")` 18025// * `PatientId(value, type)`, which matches if the message lists a 18026// patient 18027// having an ID of the given value and type in the PID-2, PID-3, or 18028// PID-4 18029// segments; for example `PatientId("123456", "MRN")` 18030// * `labels.x`, a string value of the label with key `x` as set using 18031// the 18032// Message.labels 18033// map, for example `labels."priority"="high". The operator `:*` can be 18034// used 18035// to assert the existence of a label, for example 18036// `labels."priority":*`. 18037// 18038// Limitations on conjunctions: 18039// 18040// * Negation on the patient ID function or the labels field is 18041// not 18042// supported, for example these queries are invalid: 18043// `NOT PatientId("123456", "MRN")`, `NOT labels."tag1":*`, 18044// `NOT labels."tag2"="val2". 18045// * Conjunction of multiple patient ID functions is not supported, 18046// for 18047// example this query is invalid: 18048// `PatientId("123456", "MRN") AND PatientId("456789", "MRN")`. 18049// * Conjunction of multiple labels fields is also not supported, 18050// for 18051// example this query is invalid: `labels."tag1":* AND 18052// labels."tag2"="val2". 18053// * Conjunction of one patient ID function, one labels field and 18054// conditions 18055// on other fields is supported, for example this query is 18056// valid: 18057// `PatientId("123456", "MRN") AND labels."tag1":* AND message_type = 18058// "ADT". 18059// 18060// The HasLabel(x) and Label(x) syntax from previous API versions 18061// are 18062// deprecated; replaced by the `labels.x` syntax. 18063func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Filter(filter string) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall { 18064 c.urlParams_.Set("filter", filter) 18065 return c 18066} 18067 18068// OrderBy sets the optional parameter "orderBy": Orders messages 18069// returned by the specified order_by clause. 18070// Syntax: 18071// https://cloud.google.com/apis/design/design_patterns#sorting_order 18072// 18073// Fi 18074// elds available for ordering are: 18075// 18076// * `send_time` 18077func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) OrderBy(orderBy string) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall { 18078 c.urlParams_.Set("orderBy", orderBy) 18079 return c 18080} 18081 18082// PageSize sets the optional parameter "pageSize": Limit on the number 18083// of messages to return in a single response. 18084// If zero the default page size of 100 is used. 18085func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall { 18086 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 18087 return c 18088} 18089 18090// PageToken sets the optional parameter "pageToken": The 18091// next_page_token value returned from the previous List request, if 18092// any. 18093func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall { 18094 c.urlParams_.Set("pageToken", pageToken) 18095 return c 18096} 18097 18098// Fields allows partial responses to be retrieved. See 18099// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18100// for more information. 18101func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall { 18102 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18103 return c 18104} 18105 18106// IfNoneMatch sets the optional parameter which makes the operation 18107// fail if the object's ETag matches the given value. This is useful for 18108// getting updates only after the object has changed since the last 18109// request. Use googleapi.IsNotModified to check whether the response 18110// error from Do is the result of In-None-Match. 18111func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall { 18112 c.ifNoneMatch_ = entityTag 18113 return c 18114} 18115 18116// Context sets the context to be used in this call's Do method. Any 18117// pending HTTP request will be aborted if the provided context is 18118// canceled. 18119func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall { 18120 c.ctx_ = ctx 18121 return c 18122} 18123 18124// Header returns an http.Header that can be modified by the caller to 18125// add HTTP headers to the request. 18126func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Header() http.Header { 18127 if c.header_ == nil { 18128 c.header_ = make(http.Header) 18129 } 18130 return c.header_ 18131} 18132 18133func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) doRequest(alt string) (*http.Response, error) { 18134 reqHeaders := make(http.Header) 18135 for k, v := range c.header_ { 18136 reqHeaders[k] = v 18137 } 18138 reqHeaders.Set("User-Agent", c.s.userAgent()) 18139 if c.ifNoneMatch_ != "" { 18140 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 18141 } 18142 var body io.Reader = nil 18143 c.urlParams_.Set("alt", alt) 18144 c.urlParams_.Set("prettyPrint", "false") 18145 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/messages") 18146 urls += "?" + c.urlParams_.Encode() 18147 req, err := http.NewRequest("GET", urls, body) 18148 if err != nil { 18149 return nil, err 18150 } 18151 req.Header = reqHeaders 18152 googleapi.Expand(req.URL, map[string]string{ 18153 "parent": c.parent, 18154 }) 18155 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18156} 18157 18158// Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.list" call. 18159// Exactly one of *ListMessagesResponse or error will be non-nil. Any 18160// non-2xx status code is an error. Response headers are in either 18161// *ListMessagesResponse.ServerResponse.Header or (if a response was 18162// returned at all) in error.(*googleapi.Error).Header. Use 18163// googleapi.IsNotModified to check whether the returned error was 18164// because http.StatusNotModified was returned. 18165func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Do(opts ...googleapi.CallOption) (*ListMessagesResponse, error) { 18166 gensupport.SetOptions(c.urlParams_, opts...) 18167 res, err := c.doRequest("json") 18168 if res != nil && res.StatusCode == http.StatusNotModified { 18169 if res.Body != nil { 18170 res.Body.Close() 18171 } 18172 return nil, &googleapi.Error{ 18173 Code: res.StatusCode, 18174 Header: res.Header, 18175 } 18176 } 18177 if err != nil { 18178 return nil, err 18179 } 18180 defer googleapi.CloseBody(res) 18181 if err := googleapi.CheckResponse(res); err != nil { 18182 return nil, err 18183 } 18184 ret := &ListMessagesResponse{ 18185 ServerResponse: googleapi.ServerResponse{ 18186 Header: res.Header, 18187 HTTPStatusCode: res.StatusCode, 18188 }, 18189 } 18190 target := &ret 18191 if err := gensupport.DecodeResponse(target, res); err != nil { 18192 return nil, err 18193 } 18194 return ret, nil 18195 // { 18196 // "description": "Lists all the messages in the given HL7v2 store with support for filtering.", 18197 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}/messages", 18198 // "httpMethod": "GET", 18199 // "id": "healthcare.projects.locations.datasets.hl7V2Stores.messages.list", 18200 // "parameterOrder": [ 18201 // "parent" 18202 // ], 18203 // "parameters": { 18204 // "filter": { 18205 // "description": "Restricts messages returned to those matching a filter. Syntax:\nhttps://cloud.google.com/appengine/docs/standard/python/search/query_strings\n\nFields/functions available for filtering are:\n\n* `message_type`, from the MSH-9 segment; for example\n`NOT message_type = \"ADT\"`\n* `send_date` or `sendDate`, the YYYY-MM-DD date the message was sent in\nthe dataset's time_zone, from the MSH-7 segment; for example\n`send_date \u003c \"2017-01-02\"`\n* `send_time`, the timestamp of when the message was sent, using the\nRFC3339 time format for comparisons, from the MSH-7 segment; for example\n`send_time \u003c \"2017-01-02T00:00:00-05:00\"`\n* `send_facility`, the care center that the message came from, from the\nMSH-4 segment; for example `send_facility = \"ABC\"`\n* `HL7RegExp(expr)`, which does regular expression matching of `expr`\nagainst the message payload using re2 (http://code.google.com/p/re2/)\nsyntax; for example `HL7RegExp(\"^.*\\|.*\\|EMERG\")`\n* `PatientId(value, type)`, which matches if the message lists a patient\nhaving an ID of the given value and type in the PID-2, PID-3, or PID-4\nsegments; for example `PatientId(\"123456\", \"MRN\")`\n* `labels.x`, a string value of the label with key `x` as set using the\nMessage.labels\nmap, for example `labels.\"priority\"=\"high\"`. The operator `:*` can be used\nto assert the existence of a label, for example `labels.\"priority\":*`.\n\nLimitations on conjunctions:\n\n* Negation on the patient ID function or the labels field is not\nsupported, for example these queries are invalid:\n`NOT PatientId(\"123456\", \"MRN\")`, `NOT labels.\"tag1\":*`,\n`NOT labels.\"tag2\"=\"val2\"`.\n* Conjunction of multiple patient ID functions is not supported, for\nexample this query is invalid:\n`PatientId(\"123456\", \"MRN\") AND PatientId(\"456789\", \"MRN\")`.\n* Conjunction of multiple labels fields is also not supported, for\nexample this query is invalid: `labels.\"tag1\":* AND labels.\"tag2\"=\"val2\"`.\n* Conjunction of one patient ID function, one labels field and conditions\non other fields is supported, for example this query is valid:\n`PatientId(\"123456\", \"MRN\") AND labels.\"tag1\":* AND message_type = \"ADT\"`.\n\nThe HasLabel(x) and Label(x) syntax from previous API versions are\ndeprecated; replaced by the `labels.x` syntax.", 18206 // "location": "query", 18207 // "type": "string" 18208 // }, 18209 // "orderBy": { 18210 // "description": "Orders messages returned by the specified order_by clause.\nSyntax: https://cloud.google.com/apis/design/design_patterns#sorting_order\n\nFields available for ordering are:\n\n* `send_time`", 18211 // "location": "query", 18212 // "type": "string" 18213 // }, 18214 // "pageSize": { 18215 // "description": "Limit on the number of messages to return in a single response.\nIf zero the default page size of 100 is used.", 18216 // "format": "int32", 18217 // "location": "query", 18218 // "type": "integer" 18219 // }, 18220 // "pageToken": { 18221 // "description": "The next_page_token value returned from the previous List request, if any.", 18222 // "location": "query", 18223 // "type": "string" 18224 // }, 18225 // "parent": { 18226 // "description": "Name of the HL7v2 store to retrieve messages from.", 18227 // "location": "path", 18228 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", 18229 // "required": true, 18230 // "type": "string" 18231 // } 18232 // }, 18233 // "path": "v1alpha2/{+parent}/messages", 18234 // "response": { 18235 // "$ref": "ListMessagesResponse" 18236 // }, 18237 // "scopes": [ 18238 // "https://www.googleapis.com/auth/cloud-platform" 18239 // ] 18240 // } 18241 18242} 18243 18244// Pages invokes f for each page of results. 18245// A non-nil error returned from f will halt the iteration. 18246// The provided context supersedes any context provided to the Context method. 18247func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Pages(ctx context.Context, f func(*ListMessagesResponse) error) error { 18248 c.ctx_ = ctx 18249 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 18250 for { 18251 x, err := c.Do() 18252 if err != nil { 18253 return err 18254 } 18255 if err := f(x); err != nil { 18256 return err 18257 } 18258 if x.NextPageToken == "" { 18259 return nil 18260 } 18261 c.PageToken(x.NextPageToken) 18262 } 18263} 18264 18265// method id "healthcare.projects.locations.datasets.hl7V2Stores.messages.patch": 18266 18267type ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall struct { 18268 s *Service 18269 name string 18270 message *Message 18271 urlParams_ gensupport.URLParams 18272 ctx_ context.Context 18273 header_ http.Header 18274} 18275 18276// Patch: Update the message. 18277func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) Patch(name string, message *Message) *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall { 18278 c := &ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18279 c.name = name 18280 c.message = message 18281 return c 18282} 18283 18284// UpdateMask sets the optional parameter "updateMask": The update mask 18285// applies to the resource. For the `FieldMask` 18286// definition, 18287// see 18288// https://developers.google.com/protocol-buffers/docs/re 18289// ference/google.protobuf#fieldmask 18290// Only the `labels` field is allowed to be updated. 18291// The labels in the request will be merged with the existing set of 18292// labels. 18293// Existing labels with the same keys will be updated. 18294func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall { 18295 c.urlParams_.Set("updateMask", updateMask) 18296 return c 18297} 18298 18299// Fields allows partial responses to be retrieved. See 18300// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18301// for more information. 18302func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall { 18303 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18304 return c 18305} 18306 18307// Context sets the context to be used in this call's Do method. Any 18308// pending HTTP request will be aborted if the provided context is 18309// canceled. 18310func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall { 18311 c.ctx_ = ctx 18312 return c 18313} 18314 18315// Header returns an http.Header that can be modified by the caller to 18316// add HTTP headers to the request. 18317func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) Header() http.Header { 18318 if c.header_ == nil { 18319 c.header_ = make(http.Header) 18320 } 18321 return c.header_ 18322} 18323 18324func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) doRequest(alt string) (*http.Response, error) { 18325 reqHeaders := make(http.Header) 18326 for k, v := range c.header_ { 18327 reqHeaders[k] = v 18328 } 18329 reqHeaders.Set("User-Agent", c.s.userAgent()) 18330 var body io.Reader = nil 18331 body, err := googleapi.WithoutDataWrapper.JSONReader(c.message) 18332 if err != nil { 18333 return nil, err 18334 } 18335 reqHeaders.Set("Content-Type", "application/json") 18336 c.urlParams_.Set("alt", alt) 18337 c.urlParams_.Set("prettyPrint", "false") 18338 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}") 18339 urls += "?" + c.urlParams_.Encode() 18340 req, err := http.NewRequest("PATCH", urls, body) 18341 if err != nil { 18342 return nil, err 18343 } 18344 req.Header = reqHeaders 18345 googleapi.Expand(req.URL, map[string]string{ 18346 "name": c.name, 18347 }) 18348 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18349} 18350 18351// Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.patch" call. 18352// Exactly one of *Message or error will be non-nil. Any non-2xx status 18353// code is an error. Response headers are in either 18354// *Message.ServerResponse.Header or (if a response was returned at all) 18355// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 18356// check whether the returned error was because http.StatusNotModified 18357// was returned. 18358func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) Do(opts ...googleapi.CallOption) (*Message, error) { 18359 gensupport.SetOptions(c.urlParams_, opts...) 18360 res, err := c.doRequest("json") 18361 if res != nil && res.StatusCode == http.StatusNotModified { 18362 if res.Body != nil { 18363 res.Body.Close() 18364 } 18365 return nil, &googleapi.Error{ 18366 Code: res.StatusCode, 18367 Header: res.Header, 18368 } 18369 } 18370 if err != nil { 18371 return nil, err 18372 } 18373 defer googleapi.CloseBody(res) 18374 if err := googleapi.CheckResponse(res); err != nil { 18375 return nil, err 18376 } 18377 ret := &Message{ 18378 ServerResponse: googleapi.ServerResponse{ 18379 Header: res.Header, 18380 HTTPStatusCode: res.StatusCode, 18381 }, 18382 } 18383 target := &ret 18384 if err := gensupport.DecodeResponse(target, res); err != nil { 18385 return nil, err 18386 } 18387 return ret, nil 18388 // { 18389 // "description": "Update the message.", 18390 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}/messages/{messagesId}", 18391 // "httpMethod": "PATCH", 18392 // "id": "healthcare.projects.locations.datasets.hl7V2Stores.messages.patch", 18393 // "parameterOrder": [ 18394 // "name" 18395 // ], 18396 // "parameters": { 18397 // "name": { 18398 // "description": "Resource name of the Message, of the form\n`projects/{project_id}/datasets/{dataset_id}/hl7V2Stores/{hl7_v2_store_id}/messages/{message_id}`.\nAssigned by the server.", 18399 // "location": "path", 18400 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+/messages/[^/]+$", 18401 // "required": true, 18402 // "type": "string" 18403 // }, 18404 // "updateMask": { 18405 // "description": "The update mask applies to the resource. For the `FieldMask` definition,\nsee\nhttps://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask\nOnly the `labels` field is allowed to be updated.\nThe labels in the request will be merged with the existing set of labels.\nExisting labels with the same keys will be updated.", 18406 // "format": "google-fieldmask", 18407 // "location": "query", 18408 // "type": "string" 18409 // } 18410 // }, 18411 // "path": "v1alpha2/{+name}", 18412 // "request": { 18413 // "$ref": "Message" 18414 // }, 18415 // "response": { 18416 // "$ref": "Message" 18417 // }, 18418 // "scopes": [ 18419 // "https://www.googleapis.com/auth/cloud-platform" 18420 // ] 18421 // } 18422 18423} 18424 18425// method id "healthcare.projects.locations.datasets.operations.get": 18426 18427type ProjectsLocationsDatasetsOperationsGetCall struct { 18428 s *Service 18429 name string 18430 urlParams_ gensupport.URLParams 18431 ifNoneMatch_ string 18432 ctx_ context.Context 18433 header_ http.Header 18434} 18435 18436// Get: Gets the latest state of a long-running operation. Clients can 18437// use this 18438// method to poll the operation result at intervals as recommended by 18439// the API 18440// service. 18441func (r *ProjectsLocationsDatasetsOperationsService) Get(name string) *ProjectsLocationsDatasetsOperationsGetCall { 18442 c := &ProjectsLocationsDatasetsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18443 c.name = name 18444 return c 18445} 18446 18447// Fields allows partial responses to be retrieved. See 18448// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18449// for more information. 18450func (c *ProjectsLocationsDatasetsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsGetCall { 18451 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18452 return c 18453} 18454 18455// IfNoneMatch sets the optional parameter which makes the operation 18456// fail if the object's ETag matches the given value. This is useful for 18457// getting updates only after the object has changed since the last 18458// request. Use googleapi.IsNotModified to check whether the response 18459// error from Do is the result of In-None-Match. 18460func (c *ProjectsLocationsDatasetsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsOperationsGetCall { 18461 c.ifNoneMatch_ = entityTag 18462 return c 18463} 18464 18465// Context sets the context to be used in this call's Do method. Any 18466// pending HTTP request will be aborted if the provided context is 18467// canceled. 18468func (c *ProjectsLocationsDatasetsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsGetCall { 18469 c.ctx_ = ctx 18470 return c 18471} 18472 18473// Header returns an http.Header that can be modified by the caller to 18474// add HTTP headers to the request. 18475func (c *ProjectsLocationsDatasetsOperationsGetCall) Header() http.Header { 18476 if c.header_ == nil { 18477 c.header_ = make(http.Header) 18478 } 18479 return c.header_ 18480} 18481 18482func (c *ProjectsLocationsDatasetsOperationsGetCall) doRequest(alt string) (*http.Response, error) { 18483 reqHeaders := make(http.Header) 18484 for k, v := range c.header_ { 18485 reqHeaders[k] = v 18486 } 18487 reqHeaders.Set("User-Agent", c.s.userAgent()) 18488 if c.ifNoneMatch_ != "" { 18489 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 18490 } 18491 var body io.Reader = nil 18492 c.urlParams_.Set("alt", alt) 18493 c.urlParams_.Set("prettyPrint", "false") 18494 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}") 18495 urls += "?" + c.urlParams_.Encode() 18496 req, err := http.NewRequest("GET", urls, body) 18497 if err != nil { 18498 return nil, err 18499 } 18500 req.Header = reqHeaders 18501 googleapi.Expand(req.URL, map[string]string{ 18502 "name": c.name, 18503 }) 18504 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18505} 18506 18507// Do executes the "healthcare.projects.locations.datasets.operations.get" call. 18508// Exactly one of *Operation or error will be non-nil. Any non-2xx 18509// status code is an error. Response headers are in either 18510// *Operation.ServerResponse.Header or (if a response was returned at 18511// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 18512// to check whether the returned error was because 18513// http.StatusNotModified was returned. 18514func (c *ProjectsLocationsDatasetsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 18515 gensupport.SetOptions(c.urlParams_, opts...) 18516 res, err := c.doRequest("json") 18517 if res != nil && res.StatusCode == http.StatusNotModified { 18518 if res.Body != nil { 18519 res.Body.Close() 18520 } 18521 return nil, &googleapi.Error{ 18522 Code: res.StatusCode, 18523 Header: res.Header, 18524 } 18525 } 18526 if err != nil { 18527 return nil, err 18528 } 18529 defer googleapi.CloseBody(res) 18530 if err := googleapi.CheckResponse(res); err != nil { 18531 return nil, err 18532 } 18533 ret := &Operation{ 18534 ServerResponse: googleapi.ServerResponse{ 18535 Header: res.Header, 18536 HTTPStatusCode: res.StatusCode, 18537 }, 18538 } 18539 target := &ret 18540 if err := gensupport.DecodeResponse(target, res); err != nil { 18541 return nil, err 18542 } 18543 return ret, nil 18544 // { 18545 // "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.", 18546 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/operations/{operationsId}", 18547 // "httpMethod": "GET", 18548 // "id": "healthcare.projects.locations.datasets.operations.get", 18549 // "parameterOrder": [ 18550 // "name" 18551 // ], 18552 // "parameters": { 18553 // "name": { 18554 // "description": "The name of the operation resource.", 18555 // "location": "path", 18556 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/operations/[^/]+$", 18557 // "required": true, 18558 // "type": "string" 18559 // } 18560 // }, 18561 // "path": "v1alpha2/{+name}", 18562 // "response": { 18563 // "$ref": "Operation" 18564 // }, 18565 // "scopes": [ 18566 // "https://www.googleapis.com/auth/cloud-platform" 18567 // ] 18568 // } 18569 18570} 18571 18572// method id "healthcare.projects.locations.datasets.operations.list": 18573 18574type ProjectsLocationsDatasetsOperationsListCall struct { 18575 s *Service 18576 name string 18577 urlParams_ gensupport.URLParams 18578 ifNoneMatch_ string 18579 ctx_ context.Context 18580 header_ http.Header 18581} 18582 18583// List: Lists operations that match the specified filter in the 18584// request. If the 18585// server doesn't support this method, it returns 18586// `UNIMPLEMENTED`. 18587// 18588// NOTE: the `name` binding allows API services to override the 18589// binding 18590// to use different resource name schemes, such as `users/*/operations`. 18591// To 18592// override the binding, API services can add a binding such 18593// as 18594// "/v1/{name=users/*}/operations" to their service configuration. 18595// For backwards compatibility, the default name includes the 18596// operations 18597// collection id, however overriding users must ensure the name 18598// binding 18599// is the parent resource, without the operations collection id. 18600func (r *ProjectsLocationsDatasetsOperationsService) List(name string) *ProjectsLocationsDatasetsOperationsListCall { 18601 c := &ProjectsLocationsDatasetsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18602 c.name = name 18603 return c 18604} 18605 18606// Filter sets the optional parameter "filter": The standard list 18607// filter. 18608func (c *ProjectsLocationsDatasetsOperationsListCall) Filter(filter string) *ProjectsLocationsDatasetsOperationsListCall { 18609 c.urlParams_.Set("filter", filter) 18610 return c 18611} 18612 18613// PageSize sets the optional parameter "pageSize": The standard list 18614// page size. 18615func (c *ProjectsLocationsDatasetsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsOperationsListCall { 18616 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 18617 return c 18618} 18619 18620// PageToken sets the optional parameter "pageToken": The standard list 18621// page token. 18622func (c *ProjectsLocationsDatasetsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsOperationsListCall { 18623 c.urlParams_.Set("pageToken", pageToken) 18624 return c 18625} 18626 18627// Fields allows partial responses to be retrieved. See 18628// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18629// for more information. 18630func (c *ProjectsLocationsDatasetsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsListCall { 18631 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18632 return c 18633} 18634 18635// IfNoneMatch sets the optional parameter which makes the operation 18636// fail if the object's ETag matches the given value. This is useful for 18637// getting updates only after the object has changed since the last 18638// request. Use googleapi.IsNotModified to check whether the response 18639// error from Do is the result of In-None-Match. 18640func (c *ProjectsLocationsDatasetsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsOperationsListCall { 18641 c.ifNoneMatch_ = entityTag 18642 return c 18643} 18644 18645// Context sets the context to be used in this call's Do method. Any 18646// pending HTTP request will be aborted if the provided context is 18647// canceled. 18648func (c *ProjectsLocationsDatasetsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsListCall { 18649 c.ctx_ = ctx 18650 return c 18651} 18652 18653// Header returns an http.Header that can be modified by the caller to 18654// add HTTP headers to the request. 18655func (c *ProjectsLocationsDatasetsOperationsListCall) Header() http.Header { 18656 if c.header_ == nil { 18657 c.header_ = make(http.Header) 18658 } 18659 return c.header_ 18660} 18661 18662func (c *ProjectsLocationsDatasetsOperationsListCall) doRequest(alt string) (*http.Response, error) { 18663 reqHeaders := make(http.Header) 18664 for k, v := range c.header_ { 18665 reqHeaders[k] = v 18666 } 18667 reqHeaders.Set("User-Agent", c.s.userAgent()) 18668 if c.ifNoneMatch_ != "" { 18669 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 18670 } 18671 var body io.Reader = nil 18672 c.urlParams_.Set("alt", alt) 18673 c.urlParams_.Set("prettyPrint", "false") 18674 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}/operations") 18675 urls += "?" + c.urlParams_.Encode() 18676 req, err := http.NewRequest("GET", urls, body) 18677 if err != nil { 18678 return nil, err 18679 } 18680 req.Header = reqHeaders 18681 googleapi.Expand(req.URL, map[string]string{ 18682 "name": c.name, 18683 }) 18684 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18685} 18686 18687// Do executes the "healthcare.projects.locations.datasets.operations.list" call. 18688// Exactly one of *ListOperationsResponse or error will be non-nil. Any 18689// non-2xx status code is an error. Response headers are in either 18690// *ListOperationsResponse.ServerResponse.Header or (if a response was 18691// returned at all) in error.(*googleapi.Error).Header. Use 18692// googleapi.IsNotModified to check whether the returned error was 18693// because http.StatusNotModified was returned. 18694func (c *ProjectsLocationsDatasetsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { 18695 gensupport.SetOptions(c.urlParams_, opts...) 18696 res, err := c.doRequest("json") 18697 if res != nil && res.StatusCode == http.StatusNotModified { 18698 if res.Body != nil { 18699 res.Body.Close() 18700 } 18701 return nil, &googleapi.Error{ 18702 Code: res.StatusCode, 18703 Header: res.Header, 18704 } 18705 } 18706 if err != nil { 18707 return nil, err 18708 } 18709 defer googleapi.CloseBody(res) 18710 if err := googleapi.CheckResponse(res); err != nil { 18711 return nil, err 18712 } 18713 ret := &ListOperationsResponse{ 18714 ServerResponse: googleapi.ServerResponse{ 18715 Header: res.Header, 18716 HTTPStatusCode: res.StatusCode, 18717 }, 18718 } 18719 target := &ret 18720 if err := gensupport.DecodeResponse(target, res); err != nil { 18721 return nil, err 18722 } 18723 return ret, nil 18724 // { 18725 // "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.", 18726 // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/operations", 18727 // "httpMethod": "GET", 18728 // "id": "healthcare.projects.locations.datasets.operations.list", 18729 // "parameterOrder": [ 18730 // "name" 18731 // ], 18732 // "parameters": { 18733 // "filter": { 18734 // "description": "The standard list filter.", 18735 // "location": "query", 18736 // "type": "string" 18737 // }, 18738 // "name": { 18739 // "description": "The name of the operation's parent resource.", 18740 // "location": "path", 18741 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", 18742 // "required": true, 18743 // "type": "string" 18744 // }, 18745 // "pageSize": { 18746 // "description": "The standard list page size.", 18747 // "format": "int32", 18748 // "location": "query", 18749 // "type": "integer" 18750 // }, 18751 // "pageToken": { 18752 // "description": "The standard list page token.", 18753 // "location": "query", 18754 // "type": "string" 18755 // } 18756 // }, 18757 // "path": "v1alpha2/{+name}/operations", 18758 // "response": { 18759 // "$ref": "ListOperationsResponse" 18760 // }, 18761 // "scopes": [ 18762 // "https://www.googleapis.com/auth/cloud-platform" 18763 // ] 18764 // } 18765 18766} 18767 18768// Pages invokes f for each page of results. 18769// A non-nil error returned from f will halt the iteration. 18770// The provided context supersedes any context provided to the Context method. 18771func (c *ProjectsLocationsDatasetsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { 18772 c.ctx_ = ctx 18773 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 18774 for { 18775 x, err := c.Do() 18776 if err != nil { 18777 return err 18778 } 18779 if err := f(x); err != nil { 18780 return err 18781 } 18782 if x.NextPageToken == "" { 18783 return nil 18784 } 18785 c.PageToken(x.NextPageToken) 18786 } 18787} 18788