1// Copyright 2021 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/v1" 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/v1" 39 40import ( 41 "bytes" 42 "context" 43 "encoding/json" 44 "errors" 45 "fmt" 46 "io" 47 "net/http" 48 "net/url" 49 "strconv" 50 "strings" 51 52 googleapi "google.golang.org/api/googleapi" 53 gensupport "google.golang.org/api/internal/gensupport" 54 option "google.golang.org/api/option" 55 internaloption "google.golang.org/api/option/internaloption" 56 htransport "google.golang.org/api/transport/http" 57) 58 59// Always reference these packages, just in case the auto-generated code 60// below doesn't. 61var _ = bytes.NewBuffer 62var _ = strconv.Itoa 63var _ = fmt.Sprintf 64var _ = json.NewDecoder 65var _ = io.Copy 66var _ = url.Parse 67var _ = gensupport.MarshalJSON 68var _ = googleapi.Version 69var _ = errors.New 70var _ = strings.Replace 71var _ = context.Canceled 72var _ = internaloption.WithDefaultEndpoint 73 74const apiId = "healthcare:v1" 75const apiName = "healthcare" 76const apiVersion = "v1" 77const basePath = "https://healthcare.googleapis.com/" 78const mtlsBasePath = "https://healthcare.mtls.googleapis.com/" 79 80// OAuth2 scopes used by this API. 81const ( 82 // See, edit, configure, and delete your Google Cloud Platform data 83 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 84) 85 86// NewService creates a new Service. 87func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 88 scopesOption := option.WithScopes( 89 "https://www.googleapis.com/auth/cloud-platform", 90 ) 91 // NOTE: prepend, so we don't override user-specified scopes. 92 opts = append([]option.ClientOption{scopesOption}, opts...) 93 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 94 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 95 client, endpoint, err := htransport.NewClient(ctx, opts...) 96 if err != nil { 97 return nil, err 98 } 99 s, err := New(client) 100 if err != nil { 101 return nil, err 102 } 103 if endpoint != "" { 104 s.BasePath = endpoint 105 } 106 return s, nil 107} 108 109// New creates a new Service. It uses the provided http.Client for requests. 110// 111// Deprecated: please use NewService instead. 112// To provide a custom HTTP client, use option.WithHTTPClient. 113// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 114func New(client *http.Client) (*Service, error) { 115 if client == nil { 116 return nil, errors.New("client is nil") 117 } 118 s := &Service{client: client, BasePath: basePath} 119 s.Projects = NewProjectsService(s) 120 return s, nil 121} 122 123type Service struct { 124 client *http.Client 125 BasePath string // API endpoint base URL 126 UserAgent string // optional additional User-Agent fragment 127 128 Projects *ProjectsService 129} 130 131func (s *Service) userAgent() string { 132 if s.UserAgent == "" { 133 return googleapi.UserAgent 134 } 135 return googleapi.UserAgent + " " + s.UserAgent 136} 137 138func NewProjectsService(s *Service) *ProjectsService { 139 rs := &ProjectsService{s: s} 140 rs.Locations = NewProjectsLocationsService(s) 141 return rs 142} 143 144type ProjectsService struct { 145 s *Service 146 147 Locations *ProjectsLocationsService 148} 149 150func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { 151 rs := &ProjectsLocationsService{s: s} 152 rs.Datasets = NewProjectsLocationsDatasetsService(s) 153 return rs 154} 155 156type ProjectsLocationsService struct { 157 s *Service 158 159 Datasets *ProjectsLocationsDatasetsService 160} 161 162func NewProjectsLocationsDatasetsService(s *Service) *ProjectsLocationsDatasetsService { 163 rs := &ProjectsLocationsDatasetsService{s: s} 164 rs.ConsentStores = NewProjectsLocationsDatasetsConsentStoresService(s) 165 rs.DicomStores = NewProjectsLocationsDatasetsDicomStoresService(s) 166 rs.FhirStores = NewProjectsLocationsDatasetsFhirStoresService(s) 167 rs.Hl7V2Stores = NewProjectsLocationsDatasetsHl7V2StoresService(s) 168 rs.Operations = NewProjectsLocationsDatasetsOperationsService(s) 169 return rs 170} 171 172type ProjectsLocationsDatasetsService struct { 173 s *Service 174 175 ConsentStores *ProjectsLocationsDatasetsConsentStoresService 176 177 DicomStores *ProjectsLocationsDatasetsDicomStoresService 178 179 FhirStores *ProjectsLocationsDatasetsFhirStoresService 180 181 Hl7V2Stores *ProjectsLocationsDatasetsHl7V2StoresService 182 183 Operations *ProjectsLocationsDatasetsOperationsService 184} 185 186func NewProjectsLocationsDatasetsConsentStoresService(s *Service) *ProjectsLocationsDatasetsConsentStoresService { 187 rs := &ProjectsLocationsDatasetsConsentStoresService{s: s} 188 rs.AttributeDefinitions = NewProjectsLocationsDatasetsConsentStoresAttributeDefinitionsService(s) 189 rs.ConsentArtifacts = NewProjectsLocationsDatasetsConsentStoresConsentArtifactsService(s) 190 rs.Consents = NewProjectsLocationsDatasetsConsentStoresConsentsService(s) 191 rs.UserDataMappings = NewProjectsLocationsDatasetsConsentStoresUserDataMappingsService(s) 192 return rs 193} 194 195type ProjectsLocationsDatasetsConsentStoresService struct { 196 s *Service 197 198 AttributeDefinitions *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsService 199 200 ConsentArtifacts *ProjectsLocationsDatasetsConsentStoresConsentArtifactsService 201 202 Consents *ProjectsLocationsDatasetsConsentStoresConsentsService 203 204 UserDataMappings *ProjectsLocationsDatasetsConsentStoresUserDataMappingsService 205} 206 207func NewProjectsLocationsDatasetsConsentStoresAttributeDefinitionsService(s *Service) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsService { 208 rs := &ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsService{s: s} 209 return rs 210} 211 212type ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsService struct { 213 s *Service 214} 215 216func NewProjectsLocationsDatasetsConsentStoresConsentArtifactsService(s *Service) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsService { 217 rs := &ProjectsLocationsDatasetsConsentStoresConsentArtifactsService{s: s} 218 return rs 219} 220 221type ProjectsLocationsDatasetsConsentStoresConsentArtifactsService struct { 222 s *Service 223} 224 225func NewProjectsLocationsDatasetsConsentStoresConsentsService(s *Service) *ProjectsLocationsDatasetsConsentStoresConsentsService { 226 rs := &ProjectsLocationsDatasetsConsentStoresConsentsService{s: s} 227 return rs 228} 229 230type ProjectsLocationsDatasetsConsentStoresConsentsService struct { 231 s *Service 232} 233 234func NewProjectsLocationsDatasetsConsentStoresUserDataMappingsService(s *Service) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsService { 235 rs := &ProjectsLocationsDatasetsConsentStoresUserDataMappingsService{s: s} 236 return rs 237} 238 239type ProjectsLocationsDatasetsConsentStoresUserDataMappingsService struct { 240 s *Service 241} 242 243func NewProjectsLocationsDatasetsDicomStoresService(s *Service) *ProjectsLocationsDatasetsDicomStoresService { 244 rs := &ProjectsLocationsDatasetsDicomStoresService{s: s} 245 rs.Studies = NewProjectsLocationsDatasetsDicomStoresStudiesService(s) 246 return rs 247} 248 249type ProjectsLocationsDatasetsDicomStoresService struct { 250 s *Service 251 252 Studies *ProjectsLocationsDatasetsDicomStoresStudiesService 253} 254 255func NewProjectsLocationsDatasetsDicomStoresStudiesService(s *Service) *ProjectsLocationsDatasetsDicomStoresStudiesService { 256 rs := &ProjectsLocationsDatasetsDicomStoresStudiesService{s: s} 257 rs.Series = NewProjectsLocationsDatasetsDicomStoresStudiesSeriesService(s) 258 return rs 259} 260 261type ProjectsLocationsDatasetsDicomStoresStudiesService struct { 262 s *Service 263 264 Series *ProjectsLocationsDatasetsDicomStoresStudiesSeriesService 265} 266 267func NewProjectsLocationsDatasetsDicomStoresStudiesSeriesService(s *Service) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesService { 268 rs := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesService{s: s} 269 rs.Instances = NewProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesService(s) 270 return rs 271} 272 273type ProjectsLocationsDatasetsDicomStoresStudiesSeriesService struct { 274 s *Service 275 276 Instances *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesService 277} 278 279func NewProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesService(s *Service) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesService { 280 rs := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesService{s: s} 281 rs.Frames = NewProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesService(s) 282 return rs 283} 284 285type ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesService struct { 286 s *Service 287 288 Frames *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesService 289} 290 291func NewProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesService(s *Service) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesService { 292 rs := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesService{s: s} 293 return rs 294} 295 296type ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesService struct { 297 s *Service 298} 299 300func NewProjectsLocationsDatasetsFhirStoresService(s *Service) *ProjectsLocationsDatasetsFhirStoresService { 301 rs := &ProjectsLocationsDatasetsFhirStoresService{s: s} 302 rs.Fhir = NewProjectsLocationsDatasetsFhirStoresFhirService(s) 303 return rs 304} 305 306type ProjectsLocationsDatasetsFhirStoresService struct { 307 s *Service 308 309 Fhir *ProjectsLocationsDatasetsFhirStoresFhirService 310} 311 312func NewProjectsLocationsDatasetsFhirStoresFhirService(s *Service) *ProjectsLocationsDatasetsFhirStoresFhirService { 313 rs := &ProjectsLocationsDatasetsFhirStoresFhirService{s: s} 314 return rs 315} 316 317type ProjectsLocationsDatasetsFhirStoresFhirService struct { 318 s *Service 319} 320 321func NewProjectsLocationsDatasetsHl7V2StoresService(s *Service) *ProjectsLocationsDatasetsHl7V2StoresService { 322 rs := &ProjectsLocationsDatasetsHl7V2StoresService{s: s} 323 rs.Messages = NewProjectsLocationsDatasetsHl7V2StoresMessagesService(s) 324 return rs 325} 326 327type ProjectsLocationsDatasetsHl7V2StoresService struct { 328 s *Service 329 330 Messages *ProjectsLocationsDatasetsHl7V2StoresMessagesService 331} 332 333func NewProjectsLocationsDatasetsHl7V2StoresMessagesService(s *Service) *ProjectsLocationsDatasetsHl7V2StoresMessagesService { 334 rs := &ProjectsLocationsDatasetsHl7V2StoresMessagesService{s: s} 335 return rs 336} 337 338type ProjectsLocationsDatasetsHl7V2StoresMessagesService struct { 339 s *Service 340} 341 342func NewProjectsLocationsDatasetsOperationsService(s *Service) *ProjectsLocationsDatasetsOperationsService { 343 rs := &ProjectsLocationsDatasetsOperationsService{s: s} 344 return rs 345} 346 347type ProjectsLocationsDatasetsOperationsService struct { 348 s *Service 349} 350 351// ActivateConsentRequest: Activates the latest revision of the 352// specified Consent by committing a new revision with `state` updated 353// to `ACTIVE`. If the latest revision of the given Consent is in the 354// `ACTIVE` state, no new revision is committed. A FAILED_PRECONDITION 355// error occurs if the latest revision of the given consent is in the 356// `REJECTED` or `REVOKED` state. 357type ActivateConsentRequest struct { 358 // ConsentArtifact: Required. The resource name of the Consent artifact 359 // that contains documentation of the user's consent, of the form 360 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/c 361 // onsentStores/{consent_store_id}/consentArtifacts/{consent_artifact_id} 362 // `. If the draft Consent had a Consent artifact, this Consent artifact 363 // overwrites it. 364 ConsentArtifact string `json:"consentArtifact,omitempty"` 365 366 // ExpireTime: Timestamp in UTC of when this Consent is considered 367 // expired. 368 ExpireTime string `json:"expireTime,omitempty"` 369 370 // Ttl: The time to live for this Consent from when it is marked as 371 // active. 372 Ttl string `json:"ttl,omitempty"` 373 374 // ForceSendFields is a list of field names (e.g. "ConsentArtifact") to 375 // unconditionally include in API requests. By default, fields with 376 // empty values are omitted from API requests. However, any non-pointer, 377 // non-interface field appearing in ForceSendFields will be sent to the 378 // server regardless of whether the field is empty or not. This may be 379 // used to include empty fields in Patch requests. 380 ForceSendFields []string `json:"-"` 381 382 // NullFields is a list of field names (e.g. "ConsentArtifact") to 383 // include in API requests with the JSON null value. By default, fields 384 // with empty values are omitted from API requests. However, any field 385 // with an empty value appearing in NullFields will be sent to the 386 // server as null. It is an error if a field in this list has a 387 // non-empty value. This may be used to include null fields in Patch 388 // requests. 389 NullFields []string `json:"-"` 390} 391 392func (s *ActivateConsentRequest) MarshalJSON() ([]byte, error) { 393 type NoMethod ActivateConsentRequest 394 raw := NoMethod(*s) 395 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 396} 397 398// ArchiveUserDataMappingRequest: Archives the specified User data 399// mapping. 400type ArchiveUserDataMappingRequest struct { 401} 402 403// ArchiveUserDataMappingResponse: Archives the specified User data 404// mapping. 405type ArchiveUserDataMappingResponse struct { 406 // ServerResponse contains the HTTP response code and headers from the 407 // server. 408 googleapi.ServerResponse `json:"-"` 409} 410 411// Attribute: An attribute value for a Consent or User data mapping. 412// Each Attribute must have a corresponding AttributeDefinition in the 413// consent store that defines the default and allowed values. 414type Attribute struct { 415 // AttributeDefinitionId: Indicates the name of an attribute defined in 416 // the consent store. 417 AttributeDefinitionId string `json:"attributeDefinitionId,omitempty"` 418 419 // Values: Required. The value of the attribute. Must be an acceptable 420 // value as defined in the consent store. For example, if the consent 421 // store defines "data type" with acceptable values "questionnaire" and 422 // "step-count", when the attribute name is data type, this field must 423 // contain one of those values. 424 Values []string `json:"values,omitempty"` 425 426 // ForceSendFields is a list of field names (e.g. 427 // "AttributeDefinitionId") to unconditionally include in API requests. 428 // By default, fields with empty values are omitted from API requests. 429 // However, any non-pointer, non-interface field appearing in 430 // ForceSendFields will be sent to the server regardless of whether the 431 // field is empty or not. This may be used to include empty fields in 432 // Patch requests. 433 ForceSendFields []string `json:"-"` 434 435 // NullFields is a list of field names (e.g. "AttributeDefinitionId") to 436 // include in API requests with the JSON null value. By default, fields 437 // with empty values are omitted from API requests. However, any field 438 // with an empty value appearing in NullFields will be sent to the 439 // server as null. It is an error if a field in this list has a 440 // non-empty value. This may be used to include null fields in Patch 441 // requests. 442 NullFields []string `json:"-"` 443} 444 445func (s *Attribute) MarshalJSON() ([]byte, error) { 446 type NoMethod Attribute 447 raw := NoMethod(*s) 448 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 449} 450 451// AttributeDefinition: A client-defined consent attribute. 452type AttributeDefinition struct { 453 // AllowedValues: Required. Possible values for the attribute. The 454 // number of allowed values must not exceed 100. An empty list is 455 // invalid. The list can only be expanded after creation. 456 AllowedValues []string `json:"allowedValues,omitempty"` 457 458 // Category: Required. The category of the attribute. The value of this 459 // field cannot be changed after creation. 460 // 461 // Possible values: 462 // "CATEGORY_UNSPECIFIED" - No category specified. This option is 463 // invalid. 464 // "RESOURCE" - Specify this category when this attribute describes 465 // the properties of resources. For example, data anonymity or data 466 // type. 467 // "REQUEST" - Specify this category when this attribute describes the 468 // properties of requests. For example, requester's role or requester's 469 // organization. 470 Category string `json:"category,omitempty"` 471 472 // ConsentDefaultValues: Optional. Default values of the attribute in 473 // Consents. If no default values are specified, it defaults to an empty 474 // value. 475 ConsentDefaultValues []string `json:"consentDefaultValues,omitempty"` 476 477 // DataMappingDefaultValue: Optional. Default value of the attribute in 478 // User data mappings. If no default value is specified, it defaults to 479 // an empty value. This field is only applicable to attributes of the 480 // category `RESOURCE`. 481 DataMappingDefaultValue string `json:"dataMappingDefaultValue,omitempty"` 482 483 // Description: Optional. A description of the attribute. 484 Description string `json:"description,omitempty"` 485 486 // Name: Resource name of the Attribute definition, of the form 487 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/c 488 // onsentStores/{consent_store_id}/attributeDefinitions/{attribute_defini 489 // tion_id}`. Cannot be changed after creation. 490 Name string `json:"name,omitempty"` 491 492 // ServerResponse contains the HTTP response code and headers from the 493 // server. 494 googleapi.ServerResponse `json:"-"` 495 496 // ForceSendFields is a list of field names (e.g. "AllowedValues") to 497 // unconditionally include in API requests. By default, fields with 498 // empty values are omitted from API requests. However, any non-pointer, 499 // non-interface field appearing in ForceSendFields will be sent to the 500 // server regardless of whether the field is empty or not. This may be 501 // used to include empty fields in Patch requests. 502 ForceSendFields []string `json:"-"` 503 504 // NullFields is a list of field names (e.g. "AllowedValues") to include 505 // in API requests with the JSON null value. By default, fields with 506 // empty values are omitted from API requests. However, any field with 507 // an empty value appearing in NullFields will be sent to the server as 508 // null. It is an error if a field in this list has a non-empty value. 509 // This may be used to include null fields in Patch requests. 510 NullFields []string `json:"-"` 511} 512 513func (s *AttributeDefinition) MarshalJSON() ([]byte, error) { 514 type NoMethod AttributeDefinition 515 raw := NoMethod(*s) 516 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 517} 518 519// AuditConfig: Specifies the audit configuration for a service. The 520// configuration determines which permission types are logged, and what 521// identities, if any, are exempted from logging. An AuditConfig must 522// have one or more AuditLogConfigs. If there are AuditConfigs for both 523// `allServices` and a specific service, the union of the two 524// AuditConfigs is used for that service: the log_types specified in 525// each AuditConfig are enabled, and the exempted_members in each 526// AuditLogConfig are exempted. Example Policy with multiple 527// AuditConfigs: { "audit_configs": [ { "service": "allServices", 528// "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": 529// [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { 530// "log_type": "ADMIN_READ" } ] }, { "service": 531// "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": 532// "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ 533// "user:aliya@example.com" ] } ] } ] } For sampleservice, this policy 534// enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts 535// jose@example.com from DATA_READ logging, and aliya@example.com from 536// DATA_WRITE logging. 537type AuditConfig struct { 538 // AuditLogConfigs: The configuration for logging of each type of 539 // permission. 540 AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"` 541 542 // Service: Specifies a service that will be enabled for audit logging. 543 // For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. 544 // `allServices` is a special value that covers all services. 545 Service string `json:"service,omitempty"` 546 547 // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to 548 // unconditionally include in API requests. By default, fields with 549 // empty values are omitted from API requests. However, any non-pointer, 550 // non-interface field appearing in ForceSendFields will be sent to the 551 // server regardless of whether the field is empty or not. This may be 552 // used to include empty fields in Patch requests. 553 ForceSendFields []string `json:"-"` 554 555 // NullFields is a list of field names (e.g. "AuditLogConfigs") to 556 // include in API requests with the JSON null value. By default, fields 557 // with empty values are omitted from API requests. However, any field 558 // with an empty value appearing in NullFields will be sent to the 559 // server as null. It is an error if a field in this list has a 560 // non-empty value. This may be used to include null fields in Patch 561 // requests. 562 NullFields []string `json:"-"` 563} 564 565func (s *AuditConfig) MarshalJSON() ([]byte, error) { 566 type NoMethod AuditConfig 567 raw := NoMethod(*s) 568 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 569} 570 571// AuditLogConfig: Provides the configuration for logging a type of 572// permissions. Example: { "audit_log_configs": [ { "log_type": 573// "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { 574// "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and 575// 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ 576// logging. 577type AuditLogConfig struct { 578 // ExemptedMembers: Specifies the identities that do not cause logging 579 // for this type of permission. Follows the same format of 580 // Binding.members. 581 ExemptedMembers []string `json:"exemptedMembers,omitempty"` 582 583 // LogType: The log type that this config enables. 584 // 585 // Possible values: 586 // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. 587 // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy 588 // "DATA_WRITE" - Data writes. Example: CloudSQL Users create 589 // "DATA_READ" - Data reads. Example: CloudSQL Users list 590 LogType string `json:"logType,omitempty"` 591 592 // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to 593 // unconditionally include in API requests. By default, fields with 594 // empty values are omitted from API requests. However, any non-pointer, 595 // non-interface field appearing in ForceSendFields will be sent to the 596 // server regardless of whether the field is empty or not. This may be 597 // used to include empty fields in Patch requests. 598 ForceSendFields []string `json:"-"` 599 600 // NullFields is a list of field names (e.g. "ExemptedMembers") to 601 // include in API requests with the JSON null value. By default, fields 602 // with empty values are omitted from API requests. However, any field 603 // with an empty value appearing in NullFields will be sent to the 604 // server as null. It is an error if a field in this list has a 605 // non-empty value. This may be used to include null fields in Patch 606 // requests. 607 NullFields []string `json:"-"` 608} 609 610func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { 611 type NoMethod AuditLogConfig 612 raw := NoMethod(*s) 613 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 614} 615 616// Binding: Associates `members` with a `role`. 617type Binding struct { 618 // Condition: The condition that is associated with this binding. If the 619 // condition evaluates to `true`, then this binding applies to the 620 // current request. If the condition evaluates to `false`, then this 621 // binding does not apply to the current request. However, a different 622 // role binding might grant the same role to one or more of the members 623 // in this binding. To learn which resources support conditions in their 624 // IAM policies, see the IAM documentation 625 // (https://cloud.google.com/iam/help/conditions/resource-policies). 626 Condition *Expr `json:"condition,omitempty"` 627 628 // Members: Specifies the identities requesting access for a Cloud 629 // Platform resource. `members` can have the following values: * 630 // `allUsers`: A special identifier that represents anyone who is on the 631 // internet; with or without a Google account. * 632 // `allAuthenticatedUsers`: A special identifier that represents anyone 633 // who is authenticated with a Google account or a service account. * 634 // `user:{emailid}`: An email address that represents a specific Google 635 // account. For example, `alice@example.com` . * 636 // `serviceAccount:{emailid}`: An email address that represents a 637 // service account. For example, 638 // `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An 639 // email address that represents a Google group. For example, 640 // `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An 641 // email address (plus unique identifier) representing a user that has 642 // been recently deleted. For example, 643 // `alice@example.com?uid=123456789012345678901`. If the user is 644 // recovered, this value reverts to `user:{emailid}` and the recovered 645 // user retains the role in the binding. * 646 // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address 647 // (plus unique identifier) representing a service account that has been 648 // recently deleted. For example, 649 // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. 650 // If the service account is undeleted, this value reverts to 651 // `serviceAccount:{emailid}` and the undeleted service account retains 652 // the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: 653 // An email address (plus unique identifier) representing a Google group 654 // that has been recently deleted. For example, 655 // `admins@example.com?uid=123456789012345678901`. If the group is 656 // recovered, this value reverts to `group:{emailid}` and the recovered 657 // group retains the role in the binding. * `domain:{domain}`: The G 658 // Suite domain (primary) that represents all the users of that domain. 659 // For example, `google.com` or `example.com`. 660 Members []string `json:"members,omitempty"` 661 662 // Role: Role that is assigned to `members`. For example, 663 // `roles/viewer`, `roles/editor`, or `roles/owner`. 664 Role string `json:"role,omitempty"` 665 666 // ForceSendFields is a list of field names (e.g. "Condition") to 667 // unconditionally include in API requests. By default, fields with 668 // empty values are omitted from API requests. However, any non-pointer, 669 // non-interface field appearing in ForceSendFields will be sent to the 670 // server regardless of whether the field is empty or not. This may be 671 // used to include empty fields in Patch requests. 672 ForceSendFields []string `json:"-"` 673 674 // NullFields is a list of field names (e.g. "Condition") to include in 675 // API requests with the JSON null value. By default, fields with empty 676 // values are omitted from API requests. However, any field with an 677 // empty value appearing in NullFields will be sent to the server as 678 // null. It is an error if a field in this list has a non-empty value. 679 // This may be used to include null fields in Patch requests. 680 NullFields []string `json:"-"` 681} 682 683func (s *Binding) MarshalJSON() ([]byte, error) { 684 type NoMethod Binding 685 raw := NoMethod(*s) 686 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 687} 688 689// CancelOperationRequest: The request message for 690// Operations.CancelOperation. 691type CancelOperationRequest struct { 692} 693 694// CharacterMaskConfig: Mask a string by replacing its characters with a 695// fixed character. 696type CharacterMaskConfig struct { 697 // MaskingCharacter: Character to mask the sensitive values. If not 698 // supplied, defaults to "*". 699 MaskingCharacter string `json:"maskingCharacter,omitempty"` 700 701 // ForceSendFields is a list of field names (e.g. "MaskingCharacter") to 702 // unconditionally include in API requests. By default, fields with 703 // empty values are omitted from API requests. However, any non-pointer, 704 // non-interface field appearing in ForceSendFields will be sent to the 705 // server regardless of whether the field is empty or not. This may be 706 // used to include empty fields in Patch requests. 707 ForceSendFields []string `json:"-"` 708 709 // NullFields is a list of field names (e.g. "MaskingCharacter") to 710 // include in API requests with the JSON null value. By default, fields 711 // with empty values are omitted from API requests. However, any field 712 // with an empty value appearing in NullFields will be sent to the 713 // server as null. It is an error if a field in this list has a 714 // non-empty value. This may be used to include null fields in Patch 715 // requests. 716 NullFields []string `json:"-"` 717} 718 719func (s *CharacterMaskConfig) MarshalJSON() ([]byte, error) { 720 type NoMethod CharacterMaskConfig 721 raw := NoMethod(*s) 722 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 723} 724 725// CheckDataAccessRequest: Checks if a particular data_id of a User data 726// mapping in the given consent store is consented for a given use. 727type CheckDataAccessRequest struct { 728 // ConsentList: Optional. Specific Consents to evaluate the access 729 // request against. These Consents must have the same `user_id` as the 730 // evaluated User data mapping, must exist in the current 731 // `consent_store`, and have a `state` of either `ACTIVE` or `DRAFT`. A 732 // maximum of 100 Consents can be provided here. If no selection is 733 // specified, the access request is evaluated against all `ACTIVE` 734 // unexpired Consents with the same `user_id` as the evaluated User data 735 // mapping. 736 ConsentList *ConsentList `json:"consentList,omitempty"` 737 738 // DataId: Required. The unique identifier of the resource to check 739 // access for. This identifier must correspond to a User data mapping in 740 // the given consent store. 741 DataId string `json:"dataId,omitempty"` 742 743 // RequestAttributes: The values of request attributes associated with 744 // this access request. 745 RequestAttributes map[string]string `json:"requestAttributes,omitempty"` 746 747 // ResponseView: Optional. The view for CheckDataAccessResponse. If 748 // unspecified, defaults to `BASIC` and returns `consented` as `TRUE` or 749 // `FALSE`. 750 // 751 // Possible values: 752 // "RESPONSE_VIEW_UNSPECIFIED" - No response view specified. The API 753 // will default to the BASIC view. 754 // "BASIC" - Only the `consented` field is populated in 755 // CheckDataAccessResponse. 756 // "FULL" - All fields within CheckDataAccessResponse are populated. 757 // When set to `FULL`, all `ACTIVE` Consents are evaluated even if a 758 // matching policy is found during evaluation. 759 ResponseView string `json:"responseView,omitempty"` 760 761 // ForceSendFields is a list of field names (e.g. "ConsentList") to 762 // unconditionally include in API requests. By default, fields with 763 // empty values are omitted from API requests. However, any non-pointer, 764 // non-interface field appearing in ForceSendFields will be sent to the 765 // server regardless of whether the field is empty or not. This may be 766 // used to include empty fields in Patch requests. 767 ForceSendFields []string `json:"-"` 768 769 // NullFields is a list of field names (e.g. "ConsentList") to include 770 // in API requests with the JSON null value. By default, fields with 771 // empty values are omitted from API requests. However, any field with 772 // an empty value appearing in NullFields will be sent to the server as 773 // null. It is an error if a field in this list has a non-empty value. 774 // This may be used to include null fields in Patch requests. 775 NullFields []string `json:"-"` 776} 777 778func (s *CheckDataAccessRequest) MarshalJSON() ([]byte, error) { 779 type NoMethod CheckDataAccessRequest 780 raw := NoMethod(*s) 781 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 782} 783 784// CheckDataAccessResponse: Checks if a particular data_id of a User 785// data mapping in the given consent store is consented for a given use. 786type CheckDataAccessResponse struct { 787 // ConsentDetails: The resource names of all evaluated Consents mapped 788 // to their evaluation. 789 ConsentDetails map[string]ConsentEvaluation `json:"consentDetails,omitempty"` 790 791 // Consented: Whether the requested resource is consented for the given 792 // use. 793 Consented bool `json:"consented,omitempty"` 794 795 // ServerResponse contains the HTTP response code and headers from the 796 // server. 797 googleapi.ServerResponse `json:"-"` 798 799 // ForceSendFields is a list of field names (e.g. "ConsentDetails") to 800 // unconditionally include in API requests. By default, fields with 801 // empty values are omitted from API requests. However, any non-pointer, 802 // non-interface field appearing in ForceSendFields will be sent to the 803 // server regardless of whether the field is empty or not. This may be 804 // used to include empty fields in Patch requests. 805 ForceSendFields []string `json:"-"` 806 807 // NullFields is a list of field names (e.g. "ConsentDetails") to 808 // include in API requests with the JSON null value. By default, fields 809 // with empty values are omitted from API requests. However, any field 810 // with an empty value appearing in NullFields will be sent to the 811 // server as null. It is an error if a field in this list has a 812 // non-empty value. This may be used to include null fields in Patch 813 // requests. 814 NullFields []string `json:"-"` 815} 816 817func (s *CheckDataAccessResponse) MarshalJSON() ([]byte, error) { 818 type NoMethod CheckDataAccessResponse 819 raw := NoMethod(*s) 820 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 821} 822 823// Consent: Represents a user's consent. 824type Consent struct { 825 // ConsentArtifact: Required. The resource name of the Consent artifact 826 // that contains proof of the end user's consent, of the form 827 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/c 828 // onsentStores/{consent_store_id}/consentArtifacts/{consent_artifact_id} 829 // `. 830 ConsentArtifact string `json:"consentArtifact,omitempty"` 831 832 // ExpireTime: Timestamp in UTC of when this Consent is considered 833 // expired. 834 ExpireTime string `json:"expireTime,omitempty"` 835 836 // Metadata: Optional. User-supplied key-value pairs used to organize 837 // Consent resources. Metadata keys must: - be between 1 and 63 838 // characters long - have a UTF-8 encoding of maximum 128 bytes - begin 839 // with a letter - consist of up to 63 characters including lowercase 840 // letters, numeric characters, underscores, and dashes Metadata values 841 // must be: - be between 1 and 63 characters long - have a UTF-8 842 // encoding of maximum 128 bytes - consist of up to 63 characters 843 // including lowercase letters, numeric characters, underscores, and 844 // dashes No more than 64 metadata entries can be associated with a 845 // given consent. 846 Metadata map[string]string `json:"metadata,omitempty"` 847 848 // Name: Resource name of the Consent, of the form 849 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/c 850 // onsentStores/{consent_store_id}/consents/{consent_id}`. Cannot be 851 // changed after creation. 852 Name string `json:"name,omitempty"` 853 854 // Policies: Optional. Represents a user's consent in terms of the 855 // resources that can be accessed and under what conditions. 856 Policies []*GoogleCloudHealthcareV1ConsentPolicy `json:"policies,omitempty"` 857 858 // RevisionCreateTime: Output only. The timestamp that the revision was 859 // created. 860 RevisionCreateTime string `json:"revisionCreateTime,omitempty"` 861 862 // RevisionId: Output only. The revision ID of the Consent. The format 863 // is an 8-character hexadecimal string. Refer to a specific revision of 864 // a Consent by appending `@{revision_id}` to the Consent's resource 865 // name. 866 RevisionId string `json:"revisionId,omitempty"` 867 868 // State: Required. Indicates the current state of this Consent. 869 // 870 // Possible values: 871 // "STATE_UNSPECIFIED" - No state specified. 872 // "ACTIVE" - The Consent is active and is considered when evaluating 873 // a user's consent on resources. 874 // "ARCHIVED" - When a Consent is updated, the current version is 875 // archived and a new one is created with its state set to the updated 876 // Consent's previous state. 877 // "REVOKED" - A revoked Consent is not considered when evaluating a 878 // user's consent on resources. 879 // "DRAFT" - A draft Consent is not considered when evaluating a 880 // user's consent on resources unless explicitly specified. 881 // "REJECTED" - When a draft Consent is rejected by a user, it is set 882 // to a rejected state. A rejected Consent is not considered when 883 // evaluating a user's consent on resources. 884 State string `json:"state,omitempty"` 885 886 // Ttl: Input only. The time to live for this Consent from when it is 887 // created. 888 Ttl string `json:"ttl,omitempty"` 889 890 // UserId: Required. User's UUID provided by the client. 891 UserId string `json:"userId,omitempty"` 892 893 // ServerResponse contains the HTTP response code and headers from the 894 // server. 895 googleapi.ServerResponse `json:"-"` 896 897 // ForceSendFields is a list of field names (e.g. "ConsentArtifact") to 898 // unconditionally include in API requests. By default, fields with 899 // empty values are omitted from API requests. However, any non-pointer, 900 // non-interface field appearing in ForceSendFields will be sent to the 901 // server regardless of whether the field is empty or not. This may be 902 // used to include empty fields in Patch requests. 903 ForceSendFields []string `json:"-"` 904 905 // NullFields is a list of field names (e.g. "ConsentArtifact") to 906 // include in API requests with the JSON null value. By default, fields 907 // with empty values are omitted from API requests. However, any field 908 // with an empty value appearing in NullFields will be sent to the 909 // server as null. It is an error if a field in this list has a 910 // non-empty value. This may be used to include null fields in Patch 911 // requests. 912 NullFields []string `json:"-"` 913} 914 915func (s *Consent) MarshalJSON() ([]byte, error) { 916 type NoMethod Consent 917 raw := NoMethod(*s) 918 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 919} 920 921// ConsentArtifact: Documentation of a user's consent. 922type ConsentArtifact struct { 923 // ConsentContentScreenshots: Optional. Screenshots, PDFs, or other 924 // binary information documenting the user's consent. 925 ConsentContentScreenshots []*Image `json:"consentContentScreenshots,omitempty"` 926 927 // ConsentContentVersion: Optional. An string indicating the version of 928 // the consent information shown to the user. 929 ConsentContentVersion string `json:"consentContentVersion,omitempty"` 930 931 // GuardianSignature: Optional. A signature from a guardian. 932 GuardianSignature *Signature `json:"guardianSignature,omitempty"` 933 934 // Metadata: Optional. Metadata associated with the Consent artifact. 935 // For example, the consent locale or user agent version. 936 Metadata map[string]string `json:"metadata,omitempty"` 937 938 // Name: Resource name of the Consent artifact, of the form 939 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/c 940 // onsentStores/{consent_store_id}/consentArtifacts/{consent_artifact_id} 941 // `. Cannot be changed after creation. 942 Name string `json:"name,omitempty"` 943 944 // UserId: Required. User's UUID provided by the client. 945 UserId string `json:"userId,omitempty"` 946 947 // UserSignature: Optional. User's signature. 948 UserSignature *Signature `json:"userSignature,omitempty"` 949 950 // WitnessSignature: Optional. A signature from a witness. 951 WitnessSignature *Signature `json:"witnessSignature,omitempty"` 952 953 // ServerResponse contains the HTTP response code and headers from the 954 // server. 955 googleapi.ServerResponse `json:"-"` 956 957 // ForceSendFields is a list of field names (e.g. 958 // "ConsentContentScreenshots") to unconditionally include in API 959 // requests. By default, fields with empty values are omitted from API 960 // requests. However, any non-pointer, non-interface field appearing in 961 // ForceSendFields will be sent to the server regardless of whether the 962 // field is empty or not. This may be used to include empty fields in 963 // Patch requests. 964 ForceSendFields []string `json:"-"` 965 966 // NullFields is a list of field names (e.g. 967 // "ConsentContentScreenshots") to include in API requests with the JSON 968 // null value. By default, fields with empty values are omitted from API 969 // requests. However, any field with an empty value appearing in 970 // NullFields will be sent to the server as null. It is an error if a 971 // field in this list has a non-empty value. This may be used to include 972 // null fields in Patch requests. 973 NullFields []string `json:"-"` 974} 975 976func (s *ConsentArtifact) MarshalJSON() ([]byte, error) { 977 type NoMethod ConsentArtifact 978 raw := NoMethod(*s) 979 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 980} 981 982// ConsentEvaluation: The detailed evaluation of a particular Consent. 983type ConsentEvaluation struct { 984 // EvaluationResult: The evaluation result. 985 // 986 // Possible values: 987 // "EVALUATION_RESULT_UNSPECIFIED" - No evaluation result specified. 988 // This option is invalid. 989 // "NOT_APPLICABLE" - The Consent is not applicable to the requested 990 // access determination. For example, the Consent does not apply to the 991 // user for which the access determination is requested, or it has a 992 // `state` of `REVOKED`. 993 // "NO_MATCHING_POLICY" - The Consent does not have a policy that 994 // matches the `resource_attributes` of the evaluated resource. 995 // "NO_SATISFIED_POLICY" - The Consent has at least one policy that 996 // matches the `resource_attributes` of the evaluated resource, but no 997 // `authorization_rule` was satisfied. 998 // "HAS_SATISFIED_POLICY" - The Consent has at least one policy that 999 // matches the `resource_attributes` of the evaluated resource, and at 1000 // least one `authorization_rule` was satisfied. 1001 EvaluationResult string `json:"evaluationResult,omitempty"` 1002 1003 // ForceSendFields is a list of field names (e.g. "EvaluationResult") to 1004 // unconditionally include in API requests. By default, fields with 1005 // empty values are omitted from API requests. However, any non-pointer, 1006 // non-interface field appearing in ForceSendFields will be sent to the 1007 // server regardless of whether the field is empty or not. This may be 1008 // used to include empty fields in Patch requests. 1009 ForceSendFields []string `json:"-"` 1010 1011 // NullFields is a list of field names (e.g. "EvaluationResult") to 1012 // include in API requests with the JSON null value. By default, fields 1013 // with empty values are omitted from API requests. However, any field 1014 // with an empty value appearing in NullFields will be sent to the 1015 // server as null. It is an error if a field in this list has a 1016 // non-empty value. This may be used to include null fields in Patch 1017 // requests. 1018 NullFields []string `json:"-"` 1019} 1020 1021func (s *ConsentEvaluation) MarshalJSON() ([]byte, error) { 1022 type NoMethod ConsentEvaluation 1023 raw := NoMethod(*s) 1024 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1025} 1026 1027// ConsentList: List of resource names of Consent resources. 1028type ConsentList struct { 1029 // Consents: The resource names of the Consents to evaluate against, of 1030 // the form 1031 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/c 1032 // onsentStores/{consent_store_id}/consents/{consent_id}`. 1033 Consents []string `json:"consents,omitempty"` 1034 1035 // ForceSendFields is a list of field names (e.g. "Consents") to 1036 // unconditionally include in API requests. By default, fields with 1037 // empty values are omitted from API requests. However, any non-pointer, 1038 // non-interface field appearing in ForceSendFields will be sent to the 1039 // server regardless of whether the field is empty or not. This may be 1040 // used to include empty fields in Patch requests. 1041 ForceSendFields []string `json:"-"` 1042 1043 // NullFields is a list of field names (e.g. "Consents") to include in 1044 // API requests with the JSON null value. By default, fields with empty 1045 // values are omitted from API requests. However, any field with an 1046 // empty value appearing in NullFields will be sent to the server as 1047 // null. It is an error if a field in this list has a non-empty value. 1048 // This may be used to include null fields in Patch requests. 1049 NullFields []string `json:"-"` 1050} 1051 1052func (s *ConsentList) MarshalJSON() ([]byte, error) { 1053 type NoMethod ConsentList 1054 raw := NoMethod(*s) 1055 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1056} 1057 1058// ConsentStore: Represents a consent store. 1059type ConsentStore struct { 1060 // DefaultConsentTtl: Optional. Default time to live for Consents 1061 // created in this store. Must be at least 24 hours. Updating this field 1062 // will not affect the expiration time of existing consents. 1063 DefaultConsentTtl string `json:"defaultConsentTtl,omitempty"` 1064 1065 // EnableConsentCreateOnUpdate: Optional. If `true`, UpdateConsent 1066 // creates the Consent if it does not already exist. If unspecified, 1067 // defaults to `false`. 1068 EnableConsentCreateOnUpdate bool `json:"enableConsentCreateOnUpdate,omitempty"` 1069 1070 // Labels: Optional. User-supplied key-value pairs used to organize 1071 // consent stores. Label keys must be between 1 and 63 characters long, 1072 // have a UTF-8 encoding of maximum 128 bytes, and must conform to the 1073 // following PCRE regular expression: \p{Ll}\p{Lo}{0,62}. Label values 1074 // must be between 1 and 63 characters long, have a UTF-8 encoding of 1075 // maximum 128 bytes, and must conform to the following PCRE regular 1076 // expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}. No more than 64 labels can 1077 // be associated with a given store. For more information: 1078 // https://cloud.google.com/healthcare/docs/how-tos/labeling-resources 1079 Labels map[string]string `json:"labels,omitempty"` 1080 1081 // Name: Resource name of the consent store, of the form 1082 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/c 1083 // onsentStores/{consent_store_id}`. Cannot be changed after creation. 1084 Name string `json:"name,omitempty"` 1085 1086 // ServerResponse contains the HTTP response code and headers from the 1087 // server. 1088 googleapi.ServerResponse `json:"-"` 1089 1090 // ForceSendFields is a list of field names (e.g. "DefaultConsentTtl") 1091 // to unconditionally include in API requests. By default, fields with 1092 // empty values are omitted from API requests. However, any non-pointer, 1093 // non-interface field appearing in ForceSendFields will be sent to the 1094 // server regardless of whether the field is empty or not. This may be 1095 // used to include empty fields in Patch requests. 1096 ForceSendFields []string `json:"-"` 1097 1098 // NullFields is a list of field names (e.g. "DefaultConsentTtl") to 1099 // include in API requests with the JSON null value. By default, fields 1100 // with empty values are omitted from API requests. However, any field 1101 // with an empty value appearing in NullFields will be sent to the 1102 // server as null. It is an error if a field in this list has a 1103 // non-empty value. This may be used to include null fields in Patch 1104 // requests. 1105 NullFields []string `json:"-"` 1106} 1107 1108func (s *ConsentStore) MarshalJSON() ([]byte, error) { 1109 type NoMethod ConsentStore 1110 raw := NoMethod(*s) 1111 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1112} 1113 1114// CreateMessageRequest: Creates a new message. 1115type CreateMessageRequest struct { 1116 // Message: HL7v2 message. 1117 Message *Message `json:"message,omitempty"` 1118 1119 // ForceSendFields is a list of field names (e.g. "Message") to 1120 // unconditionally include in API requests. By default, fields with 1121 // empty values are omitted from API requests. However, any non-pointer, 1122 // non-interface field appearing in ForceSendFields will be sent to the 1123 // server regardless of whether the field is empty or not. This may be 1124 // used to include empty fields in Patch requests. 1125 ForceSendFields []string `json:"-"` 1126 1127 // NullFields is a list of field names (e.g. "Message") to include in 1128 // API requests with the JSON null value. By default, fields with empty 1129 // values are omitted from API requests. However, any field with an 1130 // empty value appearing in NullFields will be sent to the server as 1131 // null. It is an error if a field in this list has a non-empty value. 1132 // This may be used to include null fields in Patch requests. 1133 NullFields []string `json:"-"` 1134} 1135 1136func (s *CreateMessageRequest) MarshalJSON() ([]byte, error) { 1137 type NoMethod CreateMessageRequest 1138 raw := NoMethod(*s) 1139 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1140} 1141 1142// CryptoHashConfig: Pseudonymization method that generates surrogates 1143// via cryptographic hashing. Uses SHA-256. Outputs a base64-encoded 1144// representation of the hashed output (for example, 1145// `L7k0BHmF1ha5U3NfGykjro4xWi1MPVQPjhMAZbSV9mM=`). 1146type CryptoHashConfig struct { 1147 // CryptoKey: An AES 128/192/256 bit key. Causes the hash to be computed 1148 // based on this key. A default key is generated for each Deidentify 1149 // operation and is used wherever crypto_key is not specified. 1150 CryptoKey string `json:"cryptoKey,omitempty"` 1151 1152 // ForceSendFields is a list of field names (e.g. "CryptoKey") to 1153 // unconditionally include in API requests. By default, fields with 1154 // empty values are omitted from API requests. However, any non-pointer, 1155 // non-interface field appearing in ForceSendFields will be sent to the 1156 // server regardless of whether the field is empty or not. This may be 1157 // used to include empty fields in Patch requests. 1158 ForceSendFields []string `json:"-"` 1159 1160 // NullFields is a list of field names (e.g. "CryptoKey") to include in 1161 // API requests with the JSON null value. By default, fields with empty 1162 // values are omitted from API requests. However, any field with an 1163 // empty value appearing in NullFields will be sent to the server as 1164 // null. It is an error if a field in this list has a non-empty value. 1165 // This may be used to include null fields in Patch requests. 1166 NullFields []string `json:"-"` 1167} 1168 1169func (s *CryptoHashConfig) MarshalJSON() ([]byte, error) { 1170 type NoMethod CryptoHashConfig 1171 raw := NoMethod(*s) 1172 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1173} 1174 1175// Dataset: A message representing a health dataset. A health dataset 1176// represents a collection of healthcare data pertaining to one or more 1177// patients. This may include multiple modalities of healthcare data, 1178// such as electronic medical records or medical imaging data. 1179type Dataset struct { 1180 // Name: Resource name of the dataset, of the form 1181 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`. 1182 Name string `json:"name,omitempty"` 1183 1184 // TimeZone: The default timezone used by this dataset. Must be a either 1185 // a valid IANA time zone name such as "America/New_York" or empty, 1186 // which defaults to UTC. This is used for parsing times in resources, 1187 // such as HL7 messages, where no explicit timezone is specified. 1188 TimeZone string `json:"timeZone,omitempty"` 1189 1190 // ServerResponse contains the HTTP response code and headers from the 1191 // server. 1192 googleapi.ServerResponse `json:"-"` 1193 1194 // ForceSendFields is a list of field names (e.g. "Name") to 1195 // unconditionally include in API requests. By default, fields with 1196 // empty values are omitted from API requests. However, any non-pointer, 1197 // non-interface field appearing in ForceSendFields will be sent to the 1198 // server regardless of whether the field is empty or not. This may be 1199 // used to include empty fields in Patch requests. 1200 ForceSendFields []string `json:"-"` 1201 1202 // NullFields is a list of field names (e.g. "Name") to include in API 1203 // requests with the JSON null value. By default, fields with empty 1204 // values are omitted from API requests. However, any field with an 1205 // empty value appearing in NullFields will be sent to the server as 1206 // null. It is an error if a field in this list has a non-empty value. 1207 // This may be used to include null fields in Patch requests. 1208 NullFields []string `json:"-"` 1209} 1210 1211func (s *Dataset) MarshalJSON() ([]byte, error) { 1212 type NoMethod Dataset 1213 raw := NoMethod(*s) 1214 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1215} 1216 1217// DateShiftConfig: Shift a date forward or backward in time by a random 1218// amount which is consistent for a given patient and crypto key 1219// combination. 1220type DateShiftConfig struct { 1221 // CryptoKey: An AES 128/192/256 bit key. Causes the shift to be 1222 // computed based on this key and the patient ID. A default key is 1223 // generated for each Deidentify operation and is used wherever 1224 // crypto_key is not specified. 1225 CryptoKey string `json:"cryptoKey,omitempty"` 1226 1227 // ForceSendFields is a list of field names (e.g. "CryptoKey") to 1228 // unconditionally include in API requests. By default, fields with 1229 // empty values are omitted from API requests. However, any non-pointer, 1230 // non-interface field appearing in ForceSendFields will be sent to the 1231 // server regardless of whether the field is empty or not. This may be 1232 // used to include empty fields in Patch requests. 1233 ForceSendFields []string `json:"-"` 1234 1235 // NullFields is a list of field names (e.g. "CryptoKey") to include in 1236 // API requests with the JSON null value. By default, fields with empty 1237 // values are omitted from API requests. However, any field with an 1238 // empty value appearing in NullFields will be sent to the server as 1239 // null. It is an error if a field in this list has a non-empty value. 1240 // This may be used to include null fields in Patch requests. 1241 NullFields []string `json:"-"` 1242} 1243 1244func (s *DateShiftConfig) MarshalJSON() ([]byte, error) { 1245 type NoMethod DateShiftConfig 1246 raw := NoMethod(*s) 1247 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1248} 1249 1250// DeidentifyConfig: Configures de-id options specific to different 1251// types of content. Each submessage customizes the handling of an 1252// https://tools.ietf.org/html/rfc6838 media type or subtype. Configs 1253// are applied in a nested manner at runtime. 1254type DeidentifyConfig struct { 1255 // Dicom: Configures de-id of application/DICOM content. 1256 Dicom *DicomConfig `json:"dicom,omitempty"` 1257 1258 // Fhir: Configures de-id of application/FHIR content. 1259 Fhir *FhirConfig `json:"fhir,omitempty"` 1260 1261 // Image: Configures de-identification of image pixels wherever they are 1262 // found in the source_dataset. 1263 Image *ImageConfig `json:"image,omitempty"` 1264 1265 // Text: Configures de-identification of text wherever it is found in 1266 // the source_dataset. 1267 Text *TextConfig `json:"text,omitempty"` 1268 1269 // ForceSendFields is a list of field names (e.g. "Dicom") 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. "Dicom") 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 *DeidentifyConfig) MarshalJSON() ([]byte, error) { 1287 type NoMethod DeidentifyConfig 1288 raw := NoMethod(*s) 1289 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1290} 1291 1292// DeidentifyDatasetRequest: Redacts identifying information from the 1293// specified dataset. 1294type DeidentifyDatasetRequest struct { 1295 // Config: Deidentify configuration. 1296 Config *DeidentifyConfig `json:"config,omitempty"` 1297 1298 // DestinationDataset: The name of the dataset resource to create and 1299 // write the redacted data to. * The destination dataset must not exist. 1300 // * The destination dataset must be in the same location as the source 1301 // dataset. De-identifying data across multiple locations is not 1302 // supported. 1303 DestinationDataset string `json:"destinationDataset,omitempty"` 1304 1305 // ForceSendFields is a list of field names (e.g. "Config") to 1306 // unconditionally include in API requests. By default, fields with 1307 // empty values are omitted from API requests. However, any non-pointer, 1308 // non-interface field appearing in ForceSendFields will be sent to the 1309 // server regardless of whether the field is empty or not. This may be 1310 // used to include empty fields in Patch requests. 1311 ForceSendFields []string `json:"-"` 1312 1313 // NullFields is a list of field names (e.g. "Config") to include in API 1314 // requests with the JSON null value. By default, fields with empty 1315 // values are omitted from API requests. However, any field with an 1316 // empty value appearing in NullFields will be sent to the server as 1317 // null. It is an error if a field in this list has a non-empty value. 1318 // This may be used to include null fields in Patch requests. 1319 NullFields []string `json:"-"` 1320} 1321 1322func (s *DeidentifyDatasetRequest) MarshalJSON() ([]byte, error) { 1323 type NoMethod DeidentifyDatasetRequest 1324 raw := NoMethod(*s) 1325 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1326} 1327 1328// DeidentifyDicomStoreRequest: Creates a new DICOM store with sensitive 1329// information de-identified. 1330type DeidentifyDicomStoreRequest struct { 1331 // Config: De-identify configuration. 1332 Config *DeidentifyConfig `json:"config,omitempty"` 1333 1334 // DestinationStore: The name of the DICOM store to create and write the 1335 // redacted data to. For example, 1336 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/d 1337 // icomStores/{dicom_store_id}`. * The destination dataset must exist. * 1338 // The source dataset and destination dataset must both reside in the 1339 // same location. De-identifying data across multiple locations is not 1340 // supported. * The destination DICOM store must not exist. * The caller 1341 // must have the necessary permissions to create the destination DICOM 1342 // store. 1343 DestinationStore string `json:"destinationStore,omitempty"` 1344 1345 // FilterConfig: Filter configuration. 1346 FilterConfig *DicomFilterConfig `json:"filterConfig,omitempty"` 1347 1348 // ForceSendFields is a list of field names (e.g. "Config") to 1349 // unconditionally include in API requests. By default, fields with 1350 // empty values are omitted from API requests. However, any non-pointer, 1351 // non-interface field appearing in ForceSendFields will be sent to the 1352 // server regardless of whether the field is empty or not. This may be 1353 // used to include empty fields in Patch requests. 1354 ForceSendFields []string `json:"-"` 1355 1356 // NullFields is a list of field names (e.g. "Config") to include in API 1357 // requests with the JSON null value. By default, fields with empty 1358 // values are omitted from API requests. However, any field with an 1359 // empty value appearing in NullFields will be sent to the server as 1360 // null. It is an error if a field in this list has a non-empty value. 1361 // This may be used to include null fields in Patch requests. 1362 NullFields []string `json:"-"` 1363} 1364 1365func (s *DeidentifyDicomStoreRequest) MarshalJSON() ([]byte, error) { 1366 type NoMethod DeidentifyDicomStoreRequest 1367 raw := NoMethod(*s) 1368 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1369} 1370 1371// DeidentifyFhirStoreRequest: Creates a new FHIR store with sensitive 1372// information de-identified. 1373type DeidentifyFhirStoreRequest struct { 1374 // Config: Deidentify configuration. 1375 Config *DeidentifyConfig `json:"config,omitempty"` 1376 1377 // DestinationStore: The name of the FHIR store to create and write the 1378 // redacted data to. For example, 1379 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/f 1380 // hirStores/{fhir_store_id}`. * The destination dataset must exist. * 1381 // The source dataset and destination dataset must both reside in the 1382 // same location. De-identifying data across multiple locations is not 1383 // supported. * The destination FHIR store must exist. * The caller must 1384 // have the healthcare.fhirResources.update permission to write to the 1385 // destination FHIR store. 1386 DestinationStore string `json:"destinationStore,omitempty"` 1387 1388 // ResourceFilter: A filter specifying the resources to include in the 1389 // output. If not specified, all resources are included in the output. 1390 ResourceFilter *FhirFilter `json:"resourceFilter,omitempty"` 1391 1392 // ForceSendFields is a list of field names (e.g. "Config") to 1393 // unconditionally include in API requests. By default, fields with 1394 // empty values are omitted from API requests. However, any non-pointer, 1395 // non-interface field appearing in ForceSendFields will be sent to the 1396 // server regardless of whether the field is empty or not. This may be 1397 // used to include empty fields in Patch requests. 1398 ForceSendFields []string `json:"-"` 1399 1400 // NullFields is a list of field names (e.g. "Config") to include in API 1401 // requests with the JSON null value. By default, fields with empty 1402 // values are omitted from API requests. However, any field with an 1403 // empty value appearing in NullFields will be sent to the server as 1404 // null. It is an error if a field in this list has a non-empty value. 1405 // This may be used to include null fields in Patch requests. 1406 NullFields []string `json:"-"` 1407} 1408 1409func (s *DeidentifyFhirStoreRequest) MarshalJSON() ([]byte, error) { 1410 type NoMethod DeidentifyFhirStoreRequest 1411 raw := NoMethod(*s) 1412 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1413} 1414 1415// DeidentifySummary: Contains a summary of the Deidentify operation. 1416type DeidentifySummary struct { 1417} 1418 1419// DicomConfig: Specifies the parameters needed for de-identification of 1420// DICOM stores. 1421type DicomConfig struct { 1422 // FilterProfile: Tag filtering profile that determines which tags to 1423 // keep/remove. 1424 // 1425 // Possible values: 1426 // "TAG_FILTER_PROFILE_UNSPECIFIED" - No tag filtration profile 1427 // provided. Same as KEEP_ALL_PROFILE. 1428 // "MINIMAL_KEEP_LIST_PROFILE" - Keep only tags required to produce 1429 // valid DICOM. 1430 // "ATTRIBUTE_CONFIDENTIALITY_BASIC_PROFILE" - Remove tags based on 1431 // DICOM Standard's Attribute Confidentiality Basic Profile (DICOM 1432 // Standard Edition 2018e) 1433 // http://dicom.nema.org/medical/dicom/2018e/output/chtml/part15/chapter_E.html. 1434 // "KEEP_ALL_PROFILE" - Keep all tags. 1435 // "DEIDENTIFY_TAG_CONTENTS" - Inspects within tag contents and 1436 // replaces sensitive text. The process can be configured using the 1437 // TextConfig. Applies to all tags with the following Value 1438 // Representation names: AE, LO, LT, PN, SH, ST, UC, UT, DA, DT, AS 1439 FilterProfile string `json:"filterProfile,omitempty"` 1440 1441 // KeepList: List of tags to keep. Remove all other tags. 1442 KeepList *TagFilterList `json:"keepList,omitempty"` 1443 1444 // RemoveList: List of tags to remove. Keep all other tags. 1445 RemoveList *TagFilterList `json:"removeList,omitempty"` 1446 1447 // SkipIdRedaction: If true, skip replacing StudyInstanceUID, 1448 // SeriesInstanceUID, SOPInstanceUID, and MediaStorageSOPInstanceUID and 1449 // leave them untouched. The Cloud Healthcare API regenerates these UIDs 1450 // by default based on the DICOM Standard's reasoning: "Whilst these 1451 // UIDs cannot be mapped directly to an individual out of context, given 1452 // access to the original images, or to a database of the original 1453 // images containing the UIDs, it would be possible to recover the 1454 // individual's identity." 1455 // http://dicom.nema.org/medical/dicom/current/output/chtml/part15/sect_E.3.9.html 1456 SkipIdRedaction bool `json:"skipIdRedaction,omitempty"` 1457 1458 // ForceSendFields is a list of field names (e.g. "FilterProfile") to 1459 // unconditionally include in API requests. By default, fields with 1460 // empty values are omitted from API requests. However, any non-pointer, 1461 // non-interface field appearing in ForceSendFields will be sent to the 1462 // server regardless of whether the field is empty or not. This may be 1463 // used to include empty fields in Patch requests. 1464 ForceSendFields []string `json:"-"` 1465 1466 // NullFields is a list of field names (e.g. "FilterProfile") to include 1467 // in API requests with the JSON null value. By default, fields with 1468 // empty values are omitted from API requests. However, any field with 1469 // an empty value appearing in NullFields will be sent to the server as 1470 // null. It is an error if a field in this list has a non-empty value. 1471 // This may be used to include null fields in Patch requests. 1472 NullFields []string `json:"-"` 1473} 1474 1475func (s *DicomConfig) MarshalJSON() ([]byte, error) { 1476 type NoMethod DicomConfig 1477 raw := NoMethod(*s) 1478 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1479} 1480 1481// DicomFilterConfig: Specifies the filter configuration for DICOM 1482// resources. 1483type DicomFilterConfig struct { 1484 // ResourcePathsGcsUri: The Cloud Storage location of the filter 1485 // configuration file. The `gcs_uri` must be in the format 1486 // `gs://bucket/path/to/object`. The filter configuration file must 1487 // contain a list of resource paths separated by newline characters (\n 1488 // or \r\n). Each resource path must be in the format 1489 // "/studies/{studyUID}[/series/{seriesUID}[/instances/{instanceUID}]]" 1490 // The Cloud Healthcare API service account must have the 1491 // `roles/storage.objectViewer` Cloud IAM role for this Cloud Storage 1492 // location. 1493 ResourcePathsGcsUri string `json:"resourcePathsGcsUri,omitempty"` 1494 1495 // ForceSendFields is a list of field names (e.g. "ResourcePathsGcsUri") 1496 // to unconditionally include in API requests. By default, fields with 1497 // empty values are omitted from API requests. However, any non-pointer, 1498 // non-interface field appearing in ForceSendFields will be sent to the 1499 // server regardless of whether the field is empty or not. This may be 1500 // used to include empty fields in Patch requests. 1501 ForceSendFields []string `json:"-"` 1502 1503 // NullFields is a list of field names (e.g. "ResourcePathsGcsUri") to 1504 // include in API requests with the JSON null value. By default, fields 1505 // with empty values are omitted from API requests. However, any field 1506 // with an empty value appearing in NullFields will be sent to the 1507 // server as null. It is an error if a field in this list has a 1508 // non-empty value. This may be used to include null fields in Patch 1509 // requests. 1510 NullFields []string `json:"-"` 1511} 1512 1513func (s *DicomFilterConfig) MarshalJSON() ([]byte, error) { 1514 type NoMethod DicomFilterConfig 1515 raw := NoMethod(*s) 1516 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1517} 1518 1519// DicomStore: Represents a DICOM store. 1520type DicomStore struct { 1521 // Labels: User-supplied key-value pairs used to organize DICOM stores. 1522 // Label keys must be between 1 and 63 characters long, have a UTF-8 1523 // encoding of maximum 128 bytes, and must conform to the following PCRE 1524 // regular expression: \p{Ll}\p{Lo}{0,62} Label values are optional, 1525 // must be between 1 and 63 characters long, have a UTF-8 encoding of 1526 // maximum 128 bytes, and must conform to the following PCRE regular 1527 // expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64 labels can be 1528 // associated with a given store. 1529 Labels map[string]string `json:"labels,omitempty"` 1530 1531 // Name: Resource name of the DICOM store, of the form 1532 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/d 1533 // icomStores/{dicom_store_id}`. 1534 Name string `json:"name,omitempty"` 1535 1536 // NotificationConfig: Notification destination for new DICOM instances. 1537 // Supplied by the client. 1538 NotificationConfig *NotificationConfig `json:"notificationConfig,omitempty"` 1539 1540 // ServerResponse contains the HTTP response code and headers from the 1541 // server. 1542 googleapi.ServerResponse `json:"-"` 1543 1544 // ForceSendFields is a list of field names (e.g. "Labels") to 1545 // unconditionally include in API requests. By default, fields with 1546 // empty values are omitted from API requests. However, any non-pointer, 1547 // non-interface field appearing in ForceSendFields will be sent to the 1548 // server regardless of whether the field is empty or not. This may be 1549 // used to include empty fields in Patch requests. 1550 ForceSendFields []string `json:"-"` 1551 1552 // NullFields is a list of field names (e.g. "Labels") to include in API 1553 // requests with the JSON null value. By default, fields with empty 1554 // values are omitted from API requests. However, any field with an 1555 // empty value appearing in NullFields will be sent to the server as 1556 // null. It is an error if a field in this list has a non-empty value. 1557 // This may be used to include null fields in Patch requests. 1558 NullFields []string `json:"-"` 1559} 1560 1561func (s *DicomStore) MarshalJSON() ([]byte, error) { 1562 type NoMethod DicomStore 1563 raw := NoMethod(*s) 1564 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1565} 1566 1567// Empty: A generic empty message that you can re-use to avoid defining 1568// duplicated empty messages in your APIs. A typical example is to use 1569// it as the request or the response type of an API method. For 1570// instance: service Foo { rpc Bar(google.protobuf.Empty) returns 1571// (google.protobuf.Empty); } The JSON representation for `Empty` is 1572// empty JSON object `{}`. 1573type Empty struct { 1574 // ServerResponse contains the HTTP response code and headers from the 1575 // server. 1576 googleapi.ServerResponse `json:"-"` 1577} 1578 1579// EvaluateUserConsentsRequest: Evaluate a user's Consents for all 1580// matching User data mappings. Note: User data mappings are indexed 1581// asynchronously, causing slight delays between the time mappings are 1582// created or updated and when they are included in EvaluateUserConsents 1583// results. 1584type EvaluateUserConsentsRequest struct { 1585 // ConsentList: Optional. Specific Consents to evaluate the access 1586 // request against. These Consents must have the same `user_id` as the 1587 // User data mappings being evalauted, must exist in the current 1588 // `consent_store`, and must have a `state` of either `ACTIVE` or 1589 // `DRAFT`. A maximum of 100 Consents can be provided here. If 1590 // unspecified, all `ACTIVE` unexpired Consents in the current 1591 // `consent_store` will be evaluated. 1592 ConsentList *ConsentList `json:"consentList,omitempty"` 1593 1594 // PageSize: Optional. Limit on the number of User data mappings to 1595 // return in a single response. If not specified, 100 is used. May not 1596 // be larger than 1000. 1597 PageSize int64 `json:"pageSize,omitempty"` 1598 1599 // PageToken: Optional. Token to retrieve the next page of results, or 1600 // empty to get the first page. 1601 PageToken string `json:"pageToken,omitempty"` 1602 1603 // RequestAttributes: Required. The values of request attributes 1604 // associated with this access request. 1605 RequestAttributes map[string]string `json:"requestAttributes,omitempty"` 1606 1607 // ResourceAttributes: Optional. The values of resource attributes 1608 // associated with the resources being requested. If no values are 1609 // specified, then all resources are queried. 1610 ResourceAttributes map[string]string `json:"resourceAttributes,omitempty"` 1611 1612 // ResponseView: Optional. The view for EvaluateUserConsentsResponse. If 1613 // unspecified, defaults to `BASIC` and returns `consented` as `TRUE` or 1614 // `FALSE`. 1615 // 1616 // Possible values: 1617 // "RESPONSE_VIEW_UNSPECIFIED" - No response view specified. The API 1618 // will default to the BASIC view. 1619 // "BASIC" - Only the `data_id` and `consented` fields are populated 1620 // in the response. 1621 // "FULL" - All fields within the response are populated. When set to 1622 // `FULL`, all `ACTIVE` Consents are evaluated even if a matching policy 1623 // is found during evaluation. 1624 ResponseView string `json:"responseView,omitempty"` 1625 1626 // UserId: Required. User ID to evaluate consents for. 1627 UserId string `json:"userId,omitempty"` 1628 1629 // ForceSendFields is a list of field names (e.g. "ConsentList") to 1630 // unconditionally include in API requests. By default, fields with 1631 // empty values are omitted from API requests. However, any non-pointer, 1632 // non-interface field appearing in ForceSendFields will be sent to the 1633 // server regardless of whether the field is empty or not. This may be 1634 // used to include empty fields in Patch requests. 1635 ForceSendFields []string `json:"-"` 1636 1637 // NullFields is a list of field names (e.g. "ConsentList") to include 1638 // in API requests with the JSON null value. By default, fields with 1639 // empty values are omitted from API requests. However, any field with 1640 // an empty value appearing in NullFields will be sent to the server as 1641 // null. It is an error if a field in this list has a non-empty value. 1642 // This may be used to include null fields in Patch requests. 1643 NullFields []string `json:"-"` 1644} 1645 1646func (s *EvaluateUserConsentsRequest) MarshalJSON() ([]byte, error) { 1647 type NoMethod EvaluateUserConsentsRequest 1648 raw := NoMethod(*s) 1649 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1650} 1651 1652type EvaluateUserConsentsResponse struct { 1653 // NextPageToken: Token to retrieve the next page of results, or empty 1654 // if there are no more results in the list. This token is valid for 72 1655 // hours after it is created. 1656 NextPageToken string `json:"nextPageToken,omitempty"` 1657 1658 // Results: The consent evaluation result for each `data_id`. 1659 Results []*Result `json:"results,omitempty"` 1660 1661 // ServerResponse contains the HTTP response code and headers from the 1662 // server. 1663 googleapi.ServerResponse `json:"-"` 1664 1665 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 1666 // unconditionally include in API requests. By default, fields with 1667 // empty values are omitted from API requests. However, any non-pointer, 1668 // non-interface field appearing in ForceSendFields will be sent to the 1669 // server regardless of whether the field is empty or not. This may be 1670 // used to include empty fields in Patch requests. 1671 ForceSendFields []string `json:"-"` 1672 1673 // NullFields is a list of field names (e.g. "NextPageToken") to include 1674 // in API requests with the JSON null value. By default, fields with 1675 // empty values are omitted from API requests. However, any field with 1676 // an empty value appearing in NullFields will be sent to the server as 1677 // null. It is an error if a field in this list has a non-empty value. 1678 // This may be used to include null fields in Patch requests. 1679 NullFields []string `json:"-"` 1680} 1681 1682func (s *EvaluateUserConsentsResponse) MarshalJSON() ([]byte, error) { 1683 type NoMethod EvaluateUserConsentsResponse 1684 raw := NoMethod(*s) 1685 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1686} 1687 1688// ExportDicomDataRequest: Exports data from the specified DICOM store. 1689// If a given resource, such as a DICOM object with the same SOPInstance 1690// UID, already exists in the output, it is overwritten with the version 1691// in the source dataset. Exported DICOM data persists when the DICOM 1692// store from which it was exported is deleted. 1693type ExportDicomDataRequest struct { 1694 // BigqueryDestination: The BigQuery output destination. You can only 1695 // export to a BigQuery dataset that's in the same project as the DICOM 1696 // store you're exporting from. The Cloud Healthcare Service Agent 1697 // requires two IAM roles on the BigQuery location: 1698 // `roles/bigquery.dataEditor` and `roles/bigquery.jobUser`. 1699 BigqueryDestination *GoogleCloudHealthcareV1DicomBigQueryDestination `json:"bigqueryDestination,omitempty"` 1700 1701 // GcsDestination: The Cloud Storage output destination. The Cloud 1702 // Healthcare Service Agent requires the `roles/storage.objectAdmin` 1703 // Cloud IAM roles on the Cloud Storage location. 1704 GcsDestination *GoogleCloudHealthcareV1DicomGcsDestination `json:"gcsDestination,omitempty"` 1705 1706 // ForceSendFields is a list of field names (e.g. "BigqueryDestination") 1707 // to unconditionally include in API requests. By default, fields with 1708 // empty values are omitted from API requests. However, any non-pointer, 1709 // non-interface field appearing in ForceSendFields will be sent to the 1710 // server regardless of whether the field is empty or not. This may be 1711 // used to include empty fields in Patch requests. 1712 ForceSendFields []string `json:"-"` 1713 1714 // NullFields is a list of field names (e.g. "BigqueryDestination") to 1715 // include in API requests with the JSON null value. By default, fields 1716 // with empty values are omitted from API requests. However, any field 1717 // with an empty value appearing in NullFields will be sent to the 1718 // server as null. It is an error if a field in this list has a 1719 // non-empty value. This may be used to include null fields in Patch 1720 // requests. 1721 NullFields []string `json:"-"` 1722} 1723 1724func (s *ExportDicomDataRequest) MarshalJSON() ([]byte, error) { 1725 type NoMethod ExportDicomDataRequest 1726 raw := NoMethod(*s) 1727 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1728} 1729 1730// ExportDicomDataResponse: Returns additional information in regards to 1731// a completed DICOM store export. 1732type ExportDicomDataResponse struct { 1733} 1734 1735// ExportResourcesRequest: Request to export resources. 1736type ExportResourcesRequest struct { 1737 // BigqueryDestination: The BigQuery output destination. The Cloud 1738 // Healthcare Service Agent requires two IAM roles on the BigQuery 1739 // location: `roles/bigquery.dataEditor` and `roles/bigquery.jobUser`. 1740 // The output is one BigQuery table per resource type. Note that unlike 1741 // in FhirStore.StreamConfig.BigQueryDestination, BigQuery views will 1742 // not be created by ExportResources. 1743 BigqueryDestination *GoogleCloudHealthcareV1FhirBigQueryDestination `json:"bigqueryDestination,omitempty"` 1744 1745 // GcsDestination: The Cloud Storage output destination. The Healthcare 1746 // Service Agent account requires the `roles/storage.objectAdmin` role 1747 // on the Cloud Storage location. The exported outputs are organized by 1748 // FHIR resource types. The server creates one object per resource type. 1749 // Each object contains newline delimited JSON, and each line is a FHIR 1750 // resource. 1751 GcsDestination *GoogleCloudHealthcareV1FhirGcsDestination `json:"gcsDestination,omitempty"` 1752 1753 // ForceSendFields is a list of field names (e.g. "BigqueryDestination") 1754 // to unconditionally include in API requests. By default, fields with 1755 // empty values are omitted from API requests. However, any non-pointer, 1756 // non-interface field appearing in ForceSendFields will be sent to the 1757 // server regardless of whether the field is empty or not. This may be 1758 // used to include empty fields in Patch requests. 1759 ForceSendFields []string `json:"-"` 1760 1761 // NullFields is a list of field names (e.g. "BigqueryDestination") to 1762 // include in API requests with the JSON null value. By default, fields 1763 // with empty values are omitted from API requests. However, any field 1764 // with an empty value appearing in NullFields will be sent to the 1765 // server as null. It is an error if a field in this list has a 1766 // non-empty value. This may be used to include null fields in Patch 1767 // requests. 1768 NullFields []string `json:"-"` 1769} 1770 1771func (s *ExportResourcesRequest) MarshalJSON() ([]byte, error) { 1772 type NoMethod ExportResourcesRequest 1773 raw := NoMethod(*s) 1774 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1775} 1776 1777// ExportResourcesResponse: Response when all resources export 1778// successfully. This structure is included in the response to describe 1779// the detailed outcome after the operation finishes successfully. 1780type ExportResourcesResponse struct { 1781} 1782 1783// Expr: Represents a textual expression in the Common Expression 1784// Language (CEL) syntax. CEL is a C-like expression language. The 1785// syntax and semantics of CEL are documented at 1786// https://github.com/google/cel-spec. Example (Comparison): title: 1787// "Summary size limit" description: "Determines if a summary is less 1788// than 100 chars" expression: "document.summary.size() < 100" Example 1789// (Equality): title: "Requestor is owner" description: "Determines if 1790// requestor is the document owner" expression: "document.owner == 1791// request.auth.claims.email" Example (Logic): title: "Public documents" 1792// description: "Determine whether the document should be publicly 1793// visible" expression: "document.type != 'private' && document.type != 1794// 'internal'" Example (Data Manipulation): title: "Notification string" 1795// description: "Create a notification string with a timestamp." 1796// expression: "'New message received at ' + 1797// string(document.create_time)" The exact variables and functions that 1798// may be referenced within an expression are determined by the service 1799// that evaluates it. See the service documentation for additional 1800// information. 1801type Expr struct { 1802 // Description: Optional. Description of the expression. This is a 1803 // longer text which describes the expression, e.g. when hovered over it 1804 // in a UI. 1805 Description string `json:"description,omitempty"` 1806 1807 // Expression: Textual representation of an expression in Common 1808 // Expression Language syntax. 1809 Expression string `json:"expression,omitempty"` 1810 1811 // Location: Optional. String indicating the location of the expression 1812 // for error reporting, e.g. a file name and a position in the file. 1813 Location string `json:"location,omitempty"` 1814 1815 // Title: Optional. Title for the expression, i.e. a short string 1816 // describing its purpose. This can be used e.g. in UIs which allow to 1817 // enter the expression. 1818 Title string `json:"title,omitempty"` 1819 1820 // ForceSendFields is a list of field names (e.g. "Description") to 1821 // unconditionally include in API requests. By default, fields with 1822 // empty values are omitted from API requests. However, any non-pointer, 1823 // non-interface field appearing in ForceSendFields will be sent to the 1824 // server regardless of whether the field is empty or not. This may be 1825 // used to include empty fields in Patch requests. 1826 ForceSendFields []string `json:"-"` 1827 1828 // NullFields is a list of field names (e.g. "Description") to include 1829 // in API requests with the JSON null value. By default, fields with 1830 // empty values are omitted from API requests. However, any field with 1831 // an empty value appearing in NullFields will be sent to the server as 1832 // null. It is an error if a field in this list has a non-empty value. 1833 // This may be used to include null fields in Patch requests. 1834 NullFields []string `json:"-"` 1835} 1836 1837func (s *Expr) MarshalJSON() ([]byte, error) { 1838 type NoMethod Expr 1839 raw := NoMethod(*s) 1840 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1841} 1842 1843// FhirConfig: Specifies how to handle de-identification of a FHIR 1844// store. 1845type FhirConfig struct { 1846 // FieldMetadataList: Specifies FHIR paths to match and how to transform 1847 // them. Any field that is not matched by a FieldMetadata is passed 1848 // through to the output dataset unmodified. All extensions are removed 1849 // in the output. 1850 FieldMetadataList []*FieldMetadata `json:"fieldMetadataList,omitempty"` 1851 1852 // ForceSendFields is a list of field names (e.g. "FieldMetadataList") 1853 // to unconditionally include in API requests. By default, fields with 1854 // empty values are omitted from API requests. However, any non-pointer, 1855 // non-interface field appearing in ForceSendFields will be sent to the 1856 // server regardless of whether the field is empty or not. This may be 1857 // used to include empty fields in Patch requests. 1858 ForceSendFields []string `json:"-"` 1859 1860 // NullFields is a list of field names (e.g. "FieldMetadataList") to 1861 // include in API requests with the JSON null value. By default, fields 1862 // with empty values are omitted from API requests. However, any field 1863 // with an empty value appearing in NullFields will be sent to the 1864 // server as null. It is an error if a field in this list has a 1865 // non-empty value. This may be used to include null fields in Patch 1866 // requests. 1867 NullFields []string `json:"-"` 1868} 1869 1870func (s *FhirConfig) MarshalJSON() ([]byte, error) { 1871 type NoMethod FhirConfig 1872 raw := NoMethod(*s) 1873 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1874} 1875 1876// FhirFilter: Filter configuration. 1877type FhirFilter struct { 1878 // Resources: List of resources to include in the output. If this list 1879 // is empty or not specified, all resources are included in the output. 1880 Resources *Resources `json:"resources,omitempty"` 1881 1882 // ForceSendFields is a list of field names (e.g. "Resources") to 1883 // unconditionally include in API requests. By default, fields with 1884 // empty values are omitted from API requests. However, any non-pointer, 1885 // non-interface field appearing in ForceSendFields will be sent to the 1886 // server regardless of whether the field is empty or not. This may be 1887 // used to include empty fields in Patch requests. 1888 ForceSendFields []string `json:"-"` 1889 1890 // NullFields is a list of field names (e.g. "Resources") to include in 1891 // API requests with the JSON null value. By default, fields with empty 1892 // values are omitted from API requests. However, any field with an 1893 // empty value appearing in NullFields will be sent to the server as 1894 // null. It is an error if a field in this list has a non-empty value. 1895 // This may be used to include null fields in Patch requests. 1896 NullFields []string `json:"-"` 1897} 1898 1899func (s *FhirFilter) MarshalJSON() ([]byte, error) { 1900 type NoMethod FhirFilter 1901 raw := NoMethod(*s) 1902 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1903} 1904 1905// FhirStore: Represents a FHIR store. 1906type FhirStore struct { 1907 // DefaultSearchHandlingStrict: If true, overrides the default search 1908 // behavior for this FHIR store to `handling=strict` which returns an 1909 // error for unrecognized search parameters. If false, uses the FHIR 1910 // specification default `handling=lenient` which ignores unrecognized 1911 // search parameters. The handling can always be changed from the 1912 // default on an individual API call by setting the HTTP header `Prefer: 1913 // handling=strict` or `Prefer: handling=lenient`. 1914 DefaultSearchHandlingStrict bool `json:"defaultSearchHandlingStrict,omitempty"` 1915 1916 // DisableReferentialIntegrity: Immutable. Whether to disable 1917 // referential integrity in this FHIR store. This field is immutable 1918 // after FHIR store creation. The default value is false, meaning that 1919 // the API enforces referential integrity and fails the requests that 1920 // result in inconsistent state in the FHIR store. When this field is 1921 // set to true, the API skips referential integrity checks. 1922 // Consequently, operations that rely on references, such as 1923 // GetPatientEverything, do not return all the results if broken 1924 // references exist. 1925 DisableReferentialIntegrity bool `json:"disableReferentialIntegrity,omitempty"` 1926 1927 // DisableResourceVersioning: Immutable. Whether to disable resource 1928 // versioning for this FHIR store. This field can not be changed after 1929 // the creation of FHIR store. If set to false, which is the default 1930 // behavior, all write operations cause historical versions to be 1931 // recorded automatically. The historical versions can be fetched 1932 // through the history APIs, but cannot be updated. If set to true, no 1933 // historical versions are kept. The server sends errors for attempts to 1934 // read the historical versions. 1935 DisableResourceVersioning bool `json:"disableResourceVersioning,omitempty"` 1936 1937 // EnableUpdateCreate: Whether this FHIR store has the updateCreate 1938 // capability 1939 // (https://www.hl7.org/fhir/capabilitystatement-definitions.html#CapabilityStatement.rest.resource.updateCreate). 1940 // This determines if the client can use an Update operation to create a 1941 // new resource with a client-specified ID. If false, all IDs are 1942 // server-assigned through the Create operation and attempts to update a 1943 // non-existent resource return errors. It is strongly advised not to 1944 // include or encode any sensitive data such as patient identifiers in 1945 // client-specified resource IDs. Those IDs are part of the FHIR 1946 // resource path recorded in Cloud audit logs and Pub/Sub notifications. 1947 // Those IDs can also be contained in reference fields within other 1948 // resources. 1949 EnableUpdateCreate bool `json:"enableUpdateCreate,omitempty"` 1950 1951 // Labels: User-supplied key-value pairs used to organize FHIR stores. 1952 // Label keys must be between 1 and 63 characters long, have a UTF-8 1953 // encoding of maximum 128 bytes, and must conform to the following PCRE 1954 // regular expression: \p{Ll}\p{Lo}{0,62} Label values are optional, 1955 // must be between 1 and 63 characters long, have a UTF-8 encoding of 1956 // maximum 128 bytes, and must conform to the following PCRE regular 1957 // expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64 labels can be 1958 // associated with a given store. 1959 Labels map[string]string `json:"labels,omitempty"` 1960 1961 // Name: Output only. Resource name of the FHIR store, of the form 1962 // `projects/{project_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id 1963 // }`. 1964 Name string `json:"name,omitempty"` 1965 1966 // NotificationConfig: If non-empty, publish all resource modifications 1967 // of this FHIR store to this destination. The Pub/Sub message 1968 // attributes contain a map with a string describing the action that has 1969 // triggered the notification. For example, "action":"CreateResource". 1970 NotificationConfig *NotificationConfig `json:"notificationConfig,omitempty"` 1971 1972 // StreamConfigs: A list of streaming configs that configure the 1973 // destinations of streaming export for every resource mutation in this 1974 // FHIR store. Each store is allowed to have up to 10 streaming configs. 1975 // After a new config is added, the next resource mutation is streamed 1976 // to the new location in addition to the existing ones. When a location 1977 // is removed from the list, the server stops streaming to that 1978 // location. Before adding a new config, you must add the required 1979 // `bigquery.dataEditor` 1980 // (https://cloud.google.com/bigquery/docs/access-control#bigquery.dataEditor) 1981 // role to your project's **Cloud Healthcare Service Agent** service 1982 // account (https://cloud.google.com/iam/docs/service-accounts). Some 1983 // lag (typically on the order of dozens of seconds) is expected before 1984 // the results show up in the streaming destination. 1985 StreamConfigs []*StreamConfig `json:"streamConfigs,omitempty"` 1986 1987 // Version: Immutable. The FHIR specification version that this FHIR 1988 // store supports natively. This field is immutable after store 1989 // creation. Requests are rejected if they contain FHIR resources of a 1990 // different version. Version is required for every FHIR store. 1991 // 1992 // Possible values: 1993 // "VERSION_UNSPECIFIED" - Users must specify a version on store 1994 // creation or an error is returned. 1995 // "DSTU2" - Draft Standard for Trial Use, [Release 1996 // 2](https://www.hl7.org/fhir/DSTU2) 1997 // "STU3" - Standard for Trial Use, [Release 1998 // 3](https://www.hl7.org/fhir/STU3) 1999 // "R4" - [Release 4](https://www.hl7.org/fhir/R4) 2000 Version string `json:"version,omitempty"` 2001 2002 // ServerResponse contains the HTTP response code and headers from the 2003 // server. 2004 googleapi.ServerResponse `json:"-"` 2005 2006 // ForceSendFields is a list of field names (e.g. 2007 // "DefaultSearchHandlingStrict") to unconditionally include in API 2008 // requests. By default, fields with empty values are omitted from API 2009 // requests. However, any non-pointer, non-interface field appearing in 2010 // ForceSendFields will be sent to the server regardless of whether the 2011 // field is empty or not. This may be used to include empty fields in 2012 // Patch requests. 2013 ForceSendFields []string `json:"-"` 2014 2015 // NullFields is a list of field names (e.g. 2016 // "DefaultSearchHandlingStrict") to include in API requests with the 2017 // JSON null value. By default, fields with empty values are omitted 2018 // from API requests. However, any field with an empty value appearing 2019 // in NullFields will be sent to the server as null. It is an error if a 2020 // field in this list has a non-empty value. This may be used to include 2021 // null fields in Patch requests. 2022 NullFields []string `json:"-"` 2023} 2024 2025func (s *FhirStore) MarshalJSON() ([]byte, error) { 2026 type NoMethod FhirStore 2027 raw := NoMethod(*s) 2028 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2029} 2030 2031// Field: A (sub) field of a type. 2032type Field struct { 2033 // MaxOccurs: The maximum number of times this field can be repeated. 0 2034 // or -1 means unbounded. 2035 MaxOccurs int64 `json:"maxOccurs,omitempty"` 2036 2037 // MinOccurs: The minimum number of times this field must be 2038 // present/repeated. 2039 MinOccurs int64 `json:"minOccurs,omitempty"` 2040 2041 // Name: The name of the field. For example, "PID-1" or just "1". 2042 Name string `json:"name,omitempty"` 2043 2044 // Table: The HL7v2 table this field refers to. For example, PID-15 2045 // (Patient's Primary Language) usually refers to table "0296". 2046 Table string `json:"table,omitempty"` 2047 2048 // Type: The type of this field. A Type with this name must be defined 2049 // in an Hl7TypesConfig. 2050 Type string `json:"type,omitempty"` 2051 2052 // ForceSendFields is a list of field names (e.g. "MaxOccurs") to 2053 // unconditionally include in API requests. By default, fields with 2054 // empty values are omitted from API requests. However, any non-pointer, 2055 // non-interface field appearing in ForceSendFields will be sent to the 2056 // server regardless of whether the field is empty or not. This may be 2057 // used to include empty fields in Patch requests. 2058 ForceSendFields []string `json:"-"` 2059 2060 // NullFields is a list of field names (e.g. "MaxOccurs") to include in 2061 // API requests with the JSON null value. By default, fields with empty 2062 // values are omitted from API requests. However, any field with an 2063 // empty value appearing in NullFields will be sent to the server as 2064 // null. It is an error if a field in this list has a non-empty value. 2065 // This may be used to include null fields in Patch requests. 2066 NullFields []string `json:"-"` 2067} 2068 2069func (s *Field) MarshalJSON() ([]byte, error) { 2070 type NoMethod Field 2071 raw := NoMethod(*s) 2072 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2073} 2074 2075// FieldMetadata: Specifies FHIR paths to match, and how to handle 2076// de-identification of matching fields. 2077type FieldMetadata struct { 2078 // Action: Deidentify action for one field. 2079 // 2080 // Possible values: 2081 // "ACTION_UNSPECIFIED" - No action specified. 2082 // "TRANSFORM" - Transform the entire field. 2083 // "INSPECT_AND_TRANSFORM" - Inspect and transform any found PHI. 2084 // "DO_NOT_TRANSFORM" - Do not transform. 2085 Action string `json:"action,omitempty"` 2086 2087 // Paths: List of paths to FHIR fields to be redacted. Each path is a 2088 // period-separated list where each component is either a field name or 2089 // FHIR type name, for example: Patient, HumanName. For "choice" types 2090 // (those defined in the FHIR spec with the form: field[x]) we use two 2091 // separate components. For example, "deceasedAge.unit" is matched by 2092 // "Deceased.Age.unit". Supported types are: AdministrativeGenderCode, 2093 // Code, Date, DateTime, Decimal, HumanName, Id, LanguageCode, Markdown, 2094 // Oid, String, Uri, Uuid, Xhtml. Base64Binary is also supported, but 2095 // may only be kept as-is or have all the content removed. 2096 Paths []string `json:"paths,omitempty"` 2097 2098 // ForceSendFields is a list of field names (e.g. "Action") to 2099 // unconditionally include in API requests. By default, fields with 2100 // empty values are omitted from API requests. However, any non-pointer, 2101 // non-interface field appearing in ForceSendFields will be sent to the 2102 // server regardless of whether the field is empty or not. This may be 2103 // used to include empty fields in Patch requests. 2104 ForceSendFields []string `json:"-"` 2105 2106 // NullFields is a list of field names (e.g. "Action") to include in API 2107 // requests with the JSON null value. By default, fields with empty 2108 // values are omitted from API requests. However, any field with an 2109 // empty value appearing in NullFields will be sent to the server as 2110 // null. It is an error if a field in this list has a non-empty value. 2111 // This may be used to include null fields in Patch requests. 2112 NullFields []string `json:"-"` 2113} 2114 2115func (s *FieldMetadata) MarshalJSON() ([]byte, error) { 2116 type NoMethod FieldMetadata 2117 raw := NoMethod(*s) 2118 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2119} 2120 2121// GoogleCloudHealthcareV1ConsentGcsDestination: The Cloud Storage 2122// location for export. 2123type GoogleCloudHealthcareV1ConsentGcsDestination struct { 2124 // UriPrefix: URI for a Cloud Storage directory where the server writes 2125 // result files, in the format 2126 // `gs://{bucket-id}/{path/to/destination/dir}`. If there is no trailing 2127 // slash, the service appends one when composing the object path. The 2128 // user is responsible for creating the Cloud Storage bucket and 2129 // directory referenced in `uri_prefix`. 2130 UriPrefix string `json:"uriPrefix,omitempty"` 2131 2132 // ForceSendFields is a list of field names (e.g. "UriPrefix") to 2133 // unconditionally include in API requests. By default, fields with 2134 // empty values are omitted from API requests. However, any non-pointer, 2135 // non-interface field appearing in ForceSendFields will be sent to the 2136 // server regardless of whether the field is empty or not. This may be 2137 // used to include empty fields in Patch requests. 2138 ForceSendFields []string `json:"-"` 2139 2140 // NullFields is a list of field names (e.g. "UriPrefix") to include in 2141 // API requests with the JSON null value. By default, fields with empty 2142 // values are omitted from API requests. However, any field with an 2143 // empty value appearing in NullFields will be sent to the server as 2144 // null. It is an error if a field in this list has a non-empty value. 2145 // This may be used to include null fields in Patch requests. 2146 NullFields []string `json:"-"` 2147} 2148 2149func (s *GoogleCloudHealthcareV1ConsentGcsDestination) MarshalJSON() ([]byte, error) { 2150 type NoMethod GoogleCloudHealthcareV1ConsentGcsDestination 2151 raw := NoMethod(*s) 2152 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2153} 2154 2155// GoogleCloudHealthcareV1ConsentPolicy: Represents a user's consent in 2156// terms of the resources that can be accessed and under what 2157// conditions. 2158type GoogleCloudHealthcareV1ConsentPolicy struct { 2159 // AuthorizationRule: Required. The request conditions to meet to grant 2160 // access. In addition to any supported comparison operators, 2161 // authorization rules may have `IN` operator as well as at most 10 2162 // logical operators that are limited to `AND` (`&&`), `OR` (`||`). 2163 AuthorizationRule *Expr `json:"authorizationRule,omitempty"` 2164 2165 // ResourceAttributes: The resources that this policy applies to. A 2166 // resource is a match if it matches all the attributes listed here. If 2167 // empty, this policy applies to all User data mappings for the given 2168 // user. 2169 ResourceAttributes []*Attribute `json:"resourceAttributes,omitempty"` 2170 2171 // ForceSendFields is a list of field names (e.g. "AuthorizationRule") 2172 // to unconditionally include in API requests. By default, fields with 2173 // empty values are omitted from API requests. However, any non-pointer, 2174 // non-interface field appearing in ForceSendFields will be sent to the 2175 // server regardless of whether the field is empty or not. This may be 2176 // used to include empty fields in Patch requests. 2177 ForceSendFields []string `json:"-"` 2178 2179 // NullFields is a list of field names (e.g. "AuthorizationRule") to 2180 // include in API requests with the JSON null value. By default, fields 2181 // with empty values are omitted from API requests. However, any field 2182 // with an empty value appearing in NullFields will be sent to the 2183 // server as null. It is an error if a field in this list has a 2184 // non-empty value. This may be used to include null fields in Patch 2185 // requests. 2186 NullFields []string `json:"-"` 2187} 2188 2189func (s *GoogleCloudHealthcareV1ConsentPolicy) MarshalJSON() ([]byte, error) { 2190 type NoMethod GoogleCloudHealthcareV1ConsentPolicy 2191 raw := NoMethod(*s) 2192 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2193} 2194 2195// GoogleCloudHealthcareV1DeidentifyDeidentifyDicomStoreSummary: 2196// Contains a summary of the DeidentifyDicomStore operation. 2197type GoogleCloudHealthcareV1DeidentifyDeidentifyDicomStoreSummary struct { 2198} 2199 2200// GoogleCloudHealthcareV1DeidentifyDeidentifyFhirStoreSummary: Contains 2201// a summary of the DeidentifyFhirStore operation. 2202type GoogleCloudHealthcareV1DeidentifyDeidentifyFhirStoreSummary struct { 2203} 2204 2205// GoogleCloudHealthcareV1DicomBigQueryDestination: The BigQuery table 2206// where the server writes the output. 2207type GoogleCloudHealthcareV1DicomBigQueryDestination struct { 2208 // Force: If the destination table already exists and this flag is 2209 // `TRUE`, the table is overwritten by the contents of the DICOM store. 2210 // If the flag is not set and the destination table already exists, the 2211 // export call returns an error. 2212 Force bool `json:"force,omitempty"` 2213 2214 // TableUri: BigQuery URI to a table, up to 2000 characters long, in the 2215 // format `bq://projectId.bqDatasetId.tableId` 2216 TableUri string `json:"tableUri,omitempty"` 2217 2218 // ForceSendFields is a list of field names (e.g. "Force") to 2219 // unconditionally include in API requests. By default, fields with 2220 // empty values are omitted from API requests. However, any non-pointer, 2221 // non-interface field appearing in ForceSendFields will be sent to the 2222 // server regardless of whether the field is empty or not. This may be 2223 // used to include empty fields in Patch requests. 2224 ForceSendFields []string `json:"-"` 2225 2226 // NullFields is a list of field names (e.g. "Force") to include in API 2227 // requests with the JSON null value. By default, fields with empty 2228 // values are omitted from API requests. However, any field with an 2229 // empty value appearing in NullFields will be sent to the server as 2230 // null. It is an error if a field in this list has a non-empty value. 2231 // This may be used to include null fields in Patch requests. 2232 NullFields []string `json:"-"` 2233} 2234 2235func (s *GoogleCloudHealthcareV1DicomBigQueryDestination) MarshalJSON() ([]byte, error) { 2236 type NoMethod GoogleCloudHealthcareV1DicomBigQueryDestination 2237 raw := NoMethod(*s) 2238 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2239} 2240 2241// GoogleCloudHealthcareV1DicomGcsDestination: The Cloud Storage 2242// location where the server writes the output and the export 2243// configuration. 2244type GoogleCloudHealthcareV1DicomGcsDestination struct { 2245 // MimeType: MIME types supported by DICOM spec. Each file is written in 2246 // the following format: 2247 // `.../{study_id}/{series_id}/{instance_id}[/{frame_number}].{extension} 2248 // ` The frame_number component exists only for multi-frame instances. 2249 // Supported MIME types are consistent with supported formats in 2250 // DICOMweb: 2251 // https://cloud.google.com/healthcare/docs/dicom#retrieve_transaction. 2252 // Specifically, the following are supported: - application/dicom; 2253 // transfer-syntax=1.2.840.10008.1.2.1 (uncompressed DICOM) - 2254 // application/dicom; transfer-syntax=1.2.840.10008.1.2.4.50 (DICOM with 2255 // embedded JPEG Baseline) - application/dicom; 2256 // transfer-syntax=1.2.840.10008.1.2.4.90 (DICOM with embedded JPEG 2000 2257 // Lossless Only) - application/dicom; 2258 // transfer-syntax=1.2.840.10008.1.2.4.91 (DICOM with embedded JPEG 2259 // 2000) - application/dicom; transfer-syntax=* (DICOM with no 2260 // transcoding) - application/octet-stream; 2261 // transfer-syntax=1.2.840.10008.1.2.1 (raw uncompressed PixelData) - 2262 // application/octet-stream; transfer-syntax=* (raw PixelData in 2263 // whatever format it was uploaded in) - image/jpeg; 2264 // transfer-syntax=1.2.840.10008.1.2.4.50 (Consumer JPEG) - image/png 2265 // The following extensions are used for output files: - 2266 // application/dicom -> .dcm - image/jpeg -> .jpg - image/png -> .png - 2267 // application/octet-stream -> no extension If unspecified, the 2268 // instances are exported in the original DICOM format they were 2269 // uploaded in. 2270 MimeType string `json:"mimeType,omitempty"` 2271 2272 // UriPrefix: The Cloud Storage destination to export to. URI for a 2273 // Cloud Storage directory where the server writes the result files, in 2274 // the format `gs://{bucket-id}/{path/to/destination/dir}`). If there is 2275 // no trailing slash, the service appends one when composing the object 2276 // path. The user is responsible for creating the Cloud Storage bucket 2277 // referenced in `uri_prefix`. 2278 UriPrefix string `json:"uriPrefix,omitempty"` 2279 2280 // ForceSendFields is a list of field names (e.g. "MimeType") to 2281 // unconditionally include in API requests. By default, fields with 2282 // empty values are omitted from API requests. However, any non-pointer, 2283 // non-interface field appearing in ForceSendFields will be sent to the 2284 // server regardless of whether the field is empty or not. This may be 2285 // used to include empty fields in Patch requests. 2286 ForceSendFields []string `json:"-"` 2287 2288 // NullFields is a list of field names (e.g. "MimeType") to include in 2289 // API requests with the JSON null value. By default, fields with empty 2290 // values are omitted from API requests. However, any field with an 2291 // empty value appearing in NullFields will be sent to the server as 2292 // null. It is an error if a field in this list has a non-empty value. 2293 // This may be used to include null fields in Patch requests. 2294 NullFields []string `json:"-"` 2295} 2296 2297func (s *GoogleCloudHealthcareV1DicomGcsDestination) MarshalJSON() ([]byte, error) { 2298 type NoMethod GoogleCloudHealthcareV1DicomGcsDestination 2299 raw := NoMethod(*s) 2300 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2301} 2302 2303// GoogleCloudHealthcareV1DicomGcsSource: Specifies the configuration 2304// for importing data from Cloud Storage. 2305type GoogleCloudHealthcareV1DicomGcsSource struct { 2306 // Uri: Points to a Cloud Storage URI containing file(s) with content 2307 // only. The URI must be in the following format: 2308 // `gs://{bucket_id}/{object_id}`. The URI can include wildcards in 2309 // `object_id` and thus identify multiple files. Supported wildcards: * 2310 // '*' to match 0 or more non-separator characters * '**' to match 0 or 2311 // more characters (including separators). Must be used at the end of a 2312 // path and with no other wildcards in the path. Can also be used with a 2313 // file extension (such as .dcm), which imports all files with the 2314 // extension in the specified directory and its sub-directories. For 2315 // example, `gs://my-bucket/my-directory/**.dcm` imports all files with 2316 // .dcm extensions in `my-directory/` and its sub-directories. * '?' to 2317 // match 1 character. All other URI formats are invalid. Files matching 2318 // the wildcard are expected to contain content only, no metadata. 2319 Uri string `json:"uri,omitempty"` 2320 2321 // ForceSendFields is a list of field names (e.g. "Uri") to 2322 // unconditionally include in API requests. By default, fields with 2323 // empty values are omitted from API requests. However, any non-pointer, 2324 // non-interface field appearing in ForceSendFields will be sent to the 2325 // server regardless of whether the field is empty or not. This may be 2326 // used to include empty fields in Patch requests. 2327 ForceSendFields []string `json:"-"` 2328 2329 // NullFields is a list of field names (e.g. "Uri") to include in API 2330 // requests with the JSON null value. By default, fields with empty 2331 // values are omitted from API requests. However, any field with an 2332 // empty value appearing in NullFields will be sent to the server as 2333 // null. It is an error if a field in this list has a non-empty value. 2334 // This may be used to include null fields in Patch requests. 2335 NullFields []string `json:"-"` 2336} 2337 2338func (s *GoogleCloudHealthcareV1DicomGcsSource) MarshalJSON() ([]byte, error) { 2339 type NoMethod GoogleCloudHealthcareV1DicomGcsSource 2340 raw := NoMethod(*s) 2341 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2342} 2343 2344// GoogleCloudHealthcareV1FhirBigQueryDestination: The configuration for 2345// exporting to BigQuery. 2346type GoogleCloudHealthcareV1FhirBigQueryDestination struct { 2347 // DatasetUri: BigQuery URI to an existing dataset, up to 2000 2348 // characters long, in the format `bq://projectId.bqDatasetId`. 2349 DatasetUri string `json:"datasetUri,omitempty"` 2350 2351 // Force: If this flag is `TRUE`, all tables are deleted from the 2352 // dataset before the new exported tables are written. If the flag is 2353 // not set and the destination dataset contains tables, the export call 2354 // returns an error. If `write_disposition` is specified, this parameter 2355 // is ignored. force=false is equivalent to 2356 // write_disposition=WRITE_EMPTY and force=true is equivalent to 2357 // write_disposition=WRITE_TRUNCATE. 2358 Force bool `json:"force,omitempty"` 2359 2360 // SchemaConfig: The configuration for the exported BigQuery schema. 2361 SchemaConfig *SchemaConfig `json:"schemaConfig,omitempty"` 2362 2363 // WriteDisposition: Determines if existing data in the destination 2364 // dataset is overwritten, appended to, or not written if the tables 2365 // contain data. If a write_disposition is specified, the `force` 2366 // parameter is ignored. 2367 // 2368 // Possible values: 2369 // "WRITE_DISPOSITION_UNSPECIFIED" - Default behavior is the same as 2370 // WRITE_EMPTY. 2371 // "WRITE_EMPTY" - Only export data if the destination tables are 2372 // empty. 2373 // "WRITE_TRUNCATE" - Erase all existing data in the tables before 2374 // writing the instances. 2375 // "WRITE_APPEND" - Append data to the existing tables. 2376 WriteDisposition string `json:"writeDisposition,omitempty"` 2377 2378 // ForceSendFields is a list of field names (e.g. "DatasetUri") to 2379 // unconditionally include in API requests. By default, fields with 2380 // empty values are omitted from API requests. However, any non-pointer, 2381 // non-interface field appearing in ForceSendFields will be sent to the 2382 // server regardless of whether the field is empty or not. This may be 2383 // used to include empty fields in Patch requests. 2384 ForceSendFields []string `json:"-"` 2385 2386 // NullFields is a list of field names (e.g. "DatasetUri") to include in 2387 // API requests with the JSON null value. By default, fields with empty 2388 // values are omitted from API requests. However, any field with an 2389 // empty value appearing in NullFields will be sent to the server as 2390 // null. It is an error if a field in this list has a non-empty value. 2391 // This may be used to include null fields in Patch requests. 2392 NullFields []string `json:"-"` 2393} 2394 2395func (s *GoogleCloudHealthcareV1FhirBigQueryDestination) MarshalJSON() ([]byte, error) { 2396 type NoMethod GoogleCloudHealthcareV1FhirBigQueryDestination 2397 raw := NoMethod(*s) 2398 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2399} 2400 2401// GoogleCloudHealthcareV1FhirGcsDestination: The configuration for 2402// exporting to Cloud Storage. 2403type GoogleCloudHealthcareV1FhirGcsDestination struct { 2404 // UriPrefix: URI for a Cloud Storage directory where result files 2405 // should be written, in the format of 2406 // `gs://{bucket-id}/{path/to/destination/dir}`. If there is no trailing 2407 // slash, the service appends one when composing the object path. The 2408 // user is responsible for creating the Cloud Storage bucket referenced 2409 // in `uri_prefix`. 2410 UriPrefix string `json:"uriPrefix,omitempty"` 2411 2412 // ForceSendFields is a list of field names (e.g. "UriPrefix") to 2413 // unconditionally include in API requests. By default, fields with 2414 // empty values are omitted from API requests. However, any non-pointer, 2415 // non-interface field appearing in ForceSendFields will be sent to the 2416 // server regardless of whether the field is empty or not. This may be 2417 // used to include empty fields in Patch requests. 2418 ForceSendFields []string `json:"-"` 2419 2420 // NullFields is a list of field names (e.g. "UriPrefix") to include in 2421 // API requests with the JSON null value. By default, fields with empty 2422 // values are omitted from API requests. However, any field with an 2423 // empty value appearing in NullFields will be sent to the server as 2424 // null. It is an error if a field in this list has a non-empty value. 2425 // This may be used to include null fields in Patch requests. 2426 NullFields []string `json:"-"` 2427} 2428 2429func (s *GoogleCloudHealthcareV1FhirGcsDestination) MarshalJSON() ([]byte, error) { 2430 type NoMethod GoogleCloudHealthcareV1FhirGcsDestination 2431 raw := NoMethod(*s) 2432 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2433} 2434 2435// GoogleCloudHealthcareV1FhirGcsSource: Specifies the configuration for 2436// importing data from Cloud Storage. 2437type GoogleCloudHealthcareV1FhirGcsSource struct { 2438 // Uri: Points to a Cloud Storage URI containing file(s) to import. The 2439 // URI must be in the following format: `gs://{bucket_id}/{object_id}`. 2440 // The URI can include wildcards in `object_id` and thus identify 2441 // multiple files. Supported wildcards: * `*` to match 0 or more 2442 // non-separator characters * `**` to match 0 or more characters 2443 // (including separators). Must be used at the end of a path and with no 2444 // other wildcards in the path. Can also be used with a file extension 2445 // (such as .ndjson), which imports all files with the extension in the 2446 // specified directory and its sub-directories. For example, 2447 // `gs://my-bucket/my-directory/**.ndjson` imports all files with 2448 // `.ndjson` extensions in `my-directory/` and its sub-directories. * 2449 // `?` to match 1 character Files matching the wildcard are expected to 2450 // contain content only, no metadata. 2451 Uri string `json:"uri,omitempty"` 2452 2453 // ForceSendFields is a list of field names (e.g. "Uri") to 2454 // unconditionally include in API requests. By default, fields with 2455 // empty values are omitted from API requests. However, any non-pointer, 2456 // non-interface field appearing in ForceSendFields will be sent to the 2457 // server regardless of whether the field is empty or not. This may be 2458 // used to include empty fields in Patch requests. 2459 ForceSendFields []string `json:"-"` 2460 2461 // NullFields is a list of field names (e.g. "Uri") to include in API 2462 // requests with the JSON null value. By default, fields with empty 2463 // values are omitted from API requests. However, any field with an 2464 // empty value appearing in NullFields will be sent to the server as 2465 // null. It is an error if a field in this list has a non-empty value. 2466 // This may be used to include null fields in Patch requests. 2467 NullFields []string `json:"-"` 2468} 2469 2470func (s *GoogleCloudHealthcareV1FhirGcsSource) MarshalJSON() ([]byte, error) { 2471 type NoMethod GoogleCloudHealthcareV1FhirGcsSource 2472 raw := NoMethod(*s) 2473 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2474} 2475 2476// GroupOrSegment: Construct representing a logical group or a segment. 2477type GroupOrSegment struct { 2478 Group *SchemaGroup `json:"group,omitempty"` 2479 2480 Segment *SchemaSegment `json:"segment,omitempty"` 2481 2482 // ForceSendFields is a list of field names (e.g. "Group") to 2483 // unconditionally include in API requests. By default, fields with 2484 // empty values are omitted from API requests. However, any non-pointer, 2485 // non-interface field appearing in ForceSendFields will be sent to the 2486 // server regardless of whether the field is empty or not. This may be 2487 // used to include empty fields in Patch requests. 2488 ForceSendFields []string `json:"-"` 2489 2490 // NullFields is a list of field names (e.g. "Group") to include in API 2491 // requests with the JSON null value. By default, fields with empty 2492 // values are omitted from API requests. However, any field with an 2493 // empty value appearing in NullFields will be sent to the server as 2494 // null. It is an error if a field in this list has a non-empty value. 2495 // This may be used to include null fields in Patch requests. 2496 NullFields []string `json:"-"` 2497} 2498 2499func (s *GroupOrSegment) MarshalJSON() ([]byte, error) { 2500 type NoMethod GroupOrSegment 2501 raw := NoMethod(*s) 2502 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2503} 2504 2505// Hl7SchemaConfig: Root config message for HL7v2 schema. This contains 2506// a schema structure of groups and segments, and filters that determine 2507// which messages to apply the schema structure to. 2508type Hl7SchemaConfig struct { 2509 // MessageSchemaConfigs: Map from each HL7v2 message type and trigger 2510 // event pair, such as ADT_A04, to its schema configuration root group. 2511 MessageSchemaConfigs map[string]SchemaGroup `json:"messageSchemaConfigs,omitempty"` 2512 2513 // Version: Each VersionSource is tested and only if they all match is 2514 // the schema used for the message. 2515 Version []*VersionSource `json:"version,omitempty"` 2516 2517 // ForceSendFields is a list of field names (e.g. 2518 // "MessageSchemaConfigs") to unconditionally include in API requests. 2519 // By default, fields with empty values are omitted from API requests. 2520 // However, any non-pointer, non-interface field appearing in 2521 // ForceSendFields will be sent to the server regardless of whether the 2522 // field is empty or not. This may be used to include empty fields in 2523 // Patch requests. 2524 ForceSendFields []string `json:"-"` 2525 2526 // NullFields is a list of field names (e.g. "MessageSchemaConfigs") to 2527 // include in API requests with the JSON null value. By default, fields 2528 // with empty values are omitted from API requests. However, any field 2529 // with an empty value appearing in NullFields will be sent to the 2530 // server as null. It is an error if a field in this list has a 2531 // non-empty value. This may be used to include null fields in Patch 2532 // requests. 2533 NullFields []string `json:"-"` 2534} 2535 2536func (s *Hl7SchemaConfig) MarshalJSON() ([]byte, error) { 2537 type NoMethod Hl7SchemaConfig 2538 raw := NoMethod(*s) 2539 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2540} 2541 2542// Hl7TypesConfig: Root config for HL7v2 datatype definitions for a 2543// specific HL7v2 version. 2544type Hl7TypesConfig struct { 2545 // Type: The HL7v2 type definitions. 2546 Type []*Type `json:"type,omitempty"` 2547 2548 // Version: The version selectors that this config applies to. A message 2549 // must match ALL version sources to apply. 2550 Version []*VersionSource `json:"version,omitempty"` 2551 2552 // ForceSendFields is a list of field names (e.g. "Type") to 2553 // unconditionally include in API requests. By default, fields with 2554 // empty values are omitted from API requests. However, any non-pointer, 2555 // non-interface field appearing in ForceSendFields will be sent to the 2556 // server regardless of whether the field is empty or not. This may be 2557 // used to include empty fields in Patch requests. 2558 ForceSendFields []string `json:"-"` 2559 2560 // NullFields is a list of field names (e.g. "Type") to include in API 2561 // requests with the JSON null value. By default, fields with empty 2562 // values are omitted from API requests. However, any field with an 2563 // empty value appearing in NullFields will be sent to the server as 2564 // null. It is an error if a field in this list has a non-empty value. 2565 // This may be used to include null fields in Patch requests. 2566 NullFields []string `json:"-"` 2567} 2568 2569func (s *Hl7TypesConfig) MarshalJSON() ([]byte, error) { 2570 type NoMethod Hl7TypesConfig 2571 raw := NoMethod(*s) 2572 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2573} 2574 2575// Hl7V2NotificationConfig: Specifies where and whether to send 2576// notifications upon changes to a data store. 2577type Hl7V2NotificationConfig struct { 2578 // Filter: Restricts notifications sent for messages matching a filter. 2579 // If this is empty, all messages are matched. The following syntax is 2580 // available: * A string field value can be written as text inside 2581 // quotation marks, for example "query text". The only valid 2582 // relational operation for text fields is equality (`=`), where text is 2583 // searched within the field, rather than having the field be equal to 2584 // the text. For example, "Comment = great" returns messages with 2585 // `great` in the comment field. * A number field value can be written 2586 // as an integer, a decimal, or an exponential. The valid relational 2587 // operators for number fields are the equality operator (`=`), along 2588 // with the less than/greater than operators (`<`, `<=`, `>`, `>=`). 2589 // Note that there is no inequality (`!=`) operator. You can prepend the 2590 // `NOT` operator to an expression to negate it. * A date field value 2591 // must be written in `yyyy-mm-dd` form. Fields with date and time use 2592 // the RFC3339 time format. Leading zeros are required for one-digit 2593 // months and days. The valid relational operators for date fields are 2594 // the equality operator (`=`) , along with the less than/greater than 2595 // operators (`<`, `<=`, `>`, `>=`). Note that there is no inequality 2596 // (`!=`) operator. You can prepend the `NOT` operator to an expression 2597 // to negate it. * Multiple field query expressions can be combined in 2598 // one query by adding `AND` or `OR` operators between the expressions. 2599 // If a boolean operator appears within a quoted string, it is not 2600 // treated as special, it's just another part of the character string to 2601 // be matched. You can prepend the `NOT` operator to an expression to 2602 // negate it. The following fields and functions are available for 2603 // filtering: * `message_type`, from the MSH-9.1 field. For example, 2604 // `NOT message_type = "ADT". * `send_date` or `sendDate`, the 2605 // YYYY-MM-DD date the message was sent in the dataset's time_zone, from 2606 // the MSH-7 segment. For example, `send_date < "2017-01-02". * 2607 // `send_time`, the timestamp when the message was sent, using the 2608 // RFC3339 time format for comparisons, from the MSH-7 segment. For 2609 // example, `send_time < "2017-01-02T00:00:00-05:00". * `create_time`, 2610 // the timestamp when the message was created in the HL7v2 store. Use 2611 // the RFC3339 time format for comparisons. For example, `create_time < 2612 // "2017-01-02T00:00:00-05:00". * `send_facility`, the care center that 2613 // the message came from, from the MSH-4 segment. For example, 2614 // `send_facility = "ABC". * `PatientId(value, type)`, which matches if 2615 // the message lists a patient having an ID of the given value and type 2616 // in the PID-2, PID-3, or PID-4 segments. For example, 2617 // `PatientId("123456", "MRN")`. * `labels.x`, a string value of the 2618 // label with key `x` as set using the Message.labels map. For example, 2619 // `labels."priority"="high". The operator `:*` can be used to assert 2620 // the existence of a label. For example, `labels."priority":*`. 2621 Filter string `json:"filter,omitempty"` 2622 2623 // PubsubTopic: The Pub/Sub (https://cloud.google.com/pubsub/docs/) 2624 // topic that notifications of changes are published on. Supplied by the 2625 // client. The notification is a `PubsubMessage` with the following 2626 // fields: * `PubsubMessage.Data` contains the resource name. * 2627 // `PubsubMessage.MessageId` is the ID of this notification. It's 2628 // guaranteed to be unique within the topic. * 2629 // `PubsubMessage.PublishTime` is the time when the message was 2630 // published. Note that notifications are only sent if the topic is 2631 // non-empty. Topic names 2632 // (https://cloud.google.com/pubsub/docs/overview#names) must be scoped 2633 // to a project. The Cloud Healthcare API service account, 2634 // service-PROJECT_NUMBER@gcp-sa-healthcare.iam.gserviceaccount.com, 2635 // must have publisher permissions on the given Pub/Sub topic. Not 2636 // having adequate permissions causes the calls that send notifications 2637 // to fail. If a notification cannot be published to Pub/Sub, errors are 2638 // logged to Cloud Logging. For more information, see Viewing error logs 2639 // in Cloud Logging 2640 // (https://cloud.google.com/healthcare/docs/how-tos/logging)). 2641 PubsubTopic string `json:"pubsubTopic,omitempty"` 2642 2643 // ForceSendFields is a list of field names (e.g. "Filter") to 2644 // unconditionally include in API requests. By default, fields with 2645 // empty values are omitted from API requests. However, any non-pointer, 2646 // non-interface field appearing in ForceSendFields will be sent to the 2647 // server regardless of whether the field is empty or not. This may be 2648 // used to include empty fields in Patch requests. 2649 ForceSendFields []string `json:"-"` 2650 2651 // NullFields is a list of field names (e.g. "Filter") to include in API 2652 // requests with the JSON null value. By default, fields with empty 2653 // values are omitted from API requests. However, any field with an 2654 // empty value appearing in NullFields will be sent to the server as 2655 // null. It is an error if a field in this list has a non-empty value. 2656 // This may be used to include null fields in Patch requests. 2657 NullFields []string `json:"-"` 2658} 2659 2660func (s *Hl7V2NotificationConfig) MarshalJSON() ([]byte, error) { 2661 type NoMethod Hl7V2NotificationConfig 2662 raw := NoMethod(*s) 2663 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2664} 2665 2666// Hl7V2Store: Represents an HL7v2 store. 2667type Hl7V2Store struct { 2668 // Labels: User-supplied key-value pairs used to organize HL7v2 stores. 2669 // Label keys must be between 1 and 63 characters long, have a UTF-8 2670 // encoding of maximum 128 bytes, and must conform to the following PCRE 2671 // regular expression: \p{Ll}\p{Lo}{0,62} Label values are optional, 2672 // must be between 1 and 63 characters long, have a UTF-8 encoding of 2673 // maximum 128 bytes, and must conform to the following PCRE regular 2674 // expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64 labels can be 2675 // associated with a given store. 2676 Labels map[string]string `json:"labels,omitempty"` 2677 2678 // Name: Resource name of the HL7v2 store, of the form 2679 // `projects/{project_id}/datasets/{dataset_id}/hl7V2Stores/{hl7v2_store_ 2680 // id}`. 2681 Name string `json:"name,omitempty"` 2682 2683 // NotificationConfigs: A list of notification configs. Each 2684 // configuration uses a filter to determine whether to publish a message 2685 // (both Ingest & Create) on the corresponding notification destination. 2686 // Only the message name is sent as part of the notification. Supplied 2687 // by the client. 2688 NotificationConfigs []*Hl7V2NotificationConfig `json:"notificationConfigs,omitempty"` 2689 2690 // ParserConfig: The configuration for the parser. It determines how the 2691 // server parses the messages. 2692 ParserConfig *ParserConfig `json:"parserConfig,omitempty"` 2693 2694 // RejectDuplicateMessage: Determines whether to reject duplicate 2695 // messages. A duplicate message is a message with the same raw bytes as 2696 // a message that has already been ingested/created in this HL7v2 store. 2697 // The default value is false, meaning that the store accepts the 2698 // duplicate messages and it also returns the same ACK message in the 2699 // IngestMessageResponse as has been returned previously. Note that only 2700 // one resource is created in the store. When this field is set to true, 2701 // CreateMessage/IngestMessage requests with a duplicate message will be 2702 // rejected by the store, and IngestMessageErrorDetail returns a NACK 2703 // message upon rejection. 2704 RejectDuplicateMessage bool `json:"rejectDuplicateMessage,omitempty"` 2705 2706 // ServerResponse contains the HTTP response code and headers from the 2707 // server. 2708 googleapi.ServerResponse `json:"-"` 2709 2710 // ForceSendFields is a list of field names (e.g. "Labels") to 2711 // unconditionally include in API requests. By default, fields with 2712 // empty values are omitted from API requests. However, any non-pointer, 2713 // non-interface field appearing in ForceSendFields will be sent to the 2714 // server regardless of whether the field is empty or not. This may be 2715 // used to include empty fields in Patch requests. 2716 ForceSendFields []string `json:"-"` 2717 2718 // NullFields is a list of field names (e.g. "Labels") to include in API 2719 // requests with the JSON null value. By default, fields with empty 2720 // values are omitted from API requests. However, any field with an 2721 // empty value appearing in NullFields will be sent to the server as 2722 // null. It is an error if a field in this list has a non-empty value. 2723 // This may be used to include null fields in Patch requests. 2724 NullFields []string `json:"-"` 2725} 2726 2727func (s *Hl7V2Store) MarshalJSON() ([]byte, error) { 2728 type NoMethod Hl7V2Store 2729 raw := NoMethod(*s) 2730 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2731} 2732 2733// HttpBody: Message that represents an arbitrary HTTP body. It should 2734// only be used for payload formats that can't be represented as JSON, 2735// such as raw binary or an HTML page. This message can be used both in 2736// streaming and non-streaming API methods in the request as well as the 2737// response. It can be used as a top-level request field, which is 2738// convenient if one wants to extract parameters from either the URL or 2739// HTTP template into the request fields and also want access to the raw 2740// HTTP body. Example: message GetResourceRequest { // A unique request 2741// id. string request_id = 1; // The raw HTTP body is bound to this 2742// field. google.api.HttpBody http_body = 2; } service ResourceService { 2743// rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); 2744// rpc UpdateResource(google.api.HttpBody) returns 2745// (google.protobuf.Empty); } Example with streaming methods: service 2746// CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns 2747// (stream google.api.HttpBody); rpc UpdateCalendar(stream 2748// google.api.HttpBody) returns (stream google.api.HttpBody); } Use of 2749// this type only changes how the request and response bodies are 2750// handled, all other features will continue to work unchanged. 2751type HttpBody struct { 2752 // ContentType: The HTTP Content-Type header value specifying the 2753 // content type of the body. 2754 ContentType string `json:"contentType,omitempty"` 2755 2756 // Data: The HTTP request/response body as raw binary. 2757 Data string `json:"data,omitempty"` 2758 2759 // Extensions: Application specific response metadata. Must be set in 2760 // the first response for streaming APIs. 2761 Extensions []googleapi.RawMessage `json:"extensions,omitempty"` 2762 2763 // ServerResponse contains the HTTP response code and headers from the 2764 // server. 2765 googleapi.ServerResponse `json:"-"` 2766 2767 // ForceSendFields is a list of field names (e.g. "ContentType") to 2768 // unconditionally include in API requests. By default, fields with 2769 // empty values are omitted from API requests. However, any non-pointer, 2770 // non-interface field appearing in ForceSendFields will be sent to the 2771 // server regardless of whether the field is empty or not. This may be 2772 // used to include empty fields in Patch requests. 2773 ForceSendFields []string `json:"-"` 2774 2775 // NullFields is a list of field names (e.g. "ContentType") to include 2776 // in API requests with the JSON null value. By default, fields with 2777 // empty values are omitted from API requests. However, any field with 2778 // an empty value appearing in NullFields will be sent to the server as 2779 // null. It is an error if a field in this list has a non-empty value. 2780 // This may be used to include null fields in Patch requests. 2781 NullFields []string `json:"-"` 2782} 2783 2784func (s *HttpBody) MarshalJSON() ([]byte, error) { 2785 type NoMethod HttpBody 2786 raw := NoMethod(*s) 2787 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2788} 2789 2790// Image: Raw bytes representing consent artifact content. 2791type Image struct { 2792 // GcsUri: Input only. Points to a Cloud Storage URI containing the 2793 // consent artifact content. The URI must be in the following format: 2794 // `gs://{bucket_id}/{object_id}`. The Cloud Healthcare API service 2795 // account must have the `roles/storage.objectViewer` Cloud IAM role for 2796 // this Cloud Storage location. The consent artifact content at this URI 2797 // is copied to a Cloud Storage location managed by the Cloud Healthcare 2798 // API. Responses to fetching requests return the consent artifact 2799 // content in raw_bytes. 2800 GcsUri string `json:"gcsUri,omitempty"` 2801 2802 // RawBytes: Consent artifact content represented as a stream of bytes. 2803 // This field is populated when returned in GetConsentArtifact response, 2804 // but not included in CreateConsentArtifact and ListConsentArtifact 2805 // response. 2806 RawBytes string `json:"rawBytes,omitempty"` 2807 2808 // ForceSendFields is a list of field names (e.g. "GcsUri") to 2809 // unconditionally include in API requests. By default, fields with 2810 // empty values are omitted from API requests. However, any non-pointer, 2811 // non-interface field appearing in ForceSendFields will be sent to the 2812 // server regardless of whether the field is empty or not. This may be 2813 // used to include empty fields in Patch requests. 2814 ForceSendFields []string `json:"-"` 2815 2816 // NullFields is a list of field names (e.g. "GcsUri") to include in API 2817 // requests with the JSON null value. By default, fields with empty 2818 // values are omitted from API requests. However, any field with an 2819 // empty value appearing in NullFields will be sent to the server as 2820 // null. It is an error if a field in this list has a non-empty value. 2821 // This may be used to include null fields in Patch requests. 2822 NullFields []string `json:"-"` 2823} 2824 2825func (s *Image) MarshalJSON() ([]byte, error) { 2826 type NoMethod Image 2827 raw := NoMethod(*s) 2828 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2829} 2830 2831// ImageConfig: Specifies how to handle de-identification of image 2832// pixels. 2833type ImageConfig struct { 2834 // TextRedactionMode: Determines how to redact text from image. 2835 // 2836 // Possible values: 2837 // "TEXT_REDACTION_MODE_UNSPECIFIED" - No text redaction specified. 2838 // Same as REDACT_NO_TEXT. 2839 // "REDACT_ALL_TEXT" - Redact all text. 2840 // "REDACT_SENSITIVE_TEXT" - Redact sensitive text. 2841 // "REDACT_NO_TEXT" - Do not redact text. 2842 TextRedactionMode string `json:"textRedactionMode,omitempty"` 2843 2844 // ForceSendFields is a list of field names (e.g. "TextRedactionMode") 2845 // to unconditionally include in API requests. By default, fields with 2846 // empty values are omitted from API requests. However, any non-pointer, 2847 // non-interface field appearing in ForceSendFields will be sent to the 2848 // server regardless of whether the field is empty or not. This may be 2849 // used to include empty fields in Patch requests. 2850 ForceSendFields []string `json:"-"` 2851 2852 // NullFields is a list of field names (e.g. "TextRedactionMode") to 2853 // include in API requests with the JSON null value. By default, fields 2854 // with empty values are omitted from API requests. However, any field 2855 // with an empty value appearing in NullFields will be sent to the 2856 // server as null. It is an error if a field in this list has a 2857 // non-empty value. This may be used to include null fields in Patch 2858 // requests. 2859 NullFields []string `json:"-"` 2860} 2861 2862func (s *ImageConfig) MarshalJSON() ([]byte, error) { 2863 type NoMethod ImageConfig 2864 raw := NoMethod(*s) 2865 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2866} 2867 2868// ImportDicomDataRequest: Imports data into the specified DICOM store. 2869// Returns an error if any of the files to import are not DICOM files. 2870// This API accepts duplicate DICOM instances by ignoring the 2871// newly-pushed instance. It does not overwrite. 2872type ImportDicomDataRequest struct { 2873 // GcsSource: Cloud Storage source data location and import 2874 // configuration. The Cloud Healthcare Service Agent requires the 2875 // `roles/storage.objectViewer` Cloud IAM roles on the Cloud Storage 2876 // location. 2877 GcsSource *GoogleCloudHealthcareV1DicomGcsSource `json:"gcsSource,omitempty"` 2878 2879 // ForceSendFields is a list of field names (e.g. "GcsSource") to 2880 // unconditionally include in API requests. By default, fields with 2881 // empty values are omitted from API requests. However, any non-pointer, 2882 // non-interface field appearing in ForceSendFields will be sent to the 2883 // server regardless of whether the field is empty or not. This may be 2884 // used to include empty fields in Patch requests. 2885 ForceSendFields []string `json:"-"` 2886 2887 // NullFields is a list of field names (e.g. "GcsSource") to include in 2888 // API requests with the JSON null value. By default, fields with empty 2889 // values are omitted from API requests. However, any field with an 2890 // empty value appearing in NullFields will be sent to the server as 2891 // null. It is an error if a field in this list has a non-empty value. 2892 // This may be used to include null fields in Patch requests. 2893 NullFields []string `json:"-"` 2894} 2895 2896func (s *ImportDicomDataRequest) MarshalJSON() ([]byte, error) { 2897 type NoMethod ImportDicomDataRequest 2898 raw := NoMethod(*s) 2899 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2900} 2901 2902// ImportDicomDataResponse: Returns additional information in regards to 2903// a completed DICOM store import. 2904type ImportDicomDataResponse struct { 2905} 2906 2907// ImportResourcesRequest: Request to import resources. 2908type ImportResourcesRequest struct { 2909 // ContentStructure: The content structure in the source location. If 2910 // not specified, the server treats the input source files as BUNDLE. 2911 // 2912 // Possible values: 2913 // "CONTENT_STRUCTURE_UNSPECIFIED" - If the content structure is not 2914 // specified, the default value `BUNDLE` is used. 2915 // "BUNDLE" - The source file contains one or more lines of 2916 // newline-delimited JSON (ndjson). Each line is a bundle that contains 2917 // one or more resources. 2918 // "RESOURCE" - The source file contains one or more lines of 2919 // newline-delimited JSON (ndjson). Each line is a single resource. 2920 // "BUNDLE_PRETTY" - The entire file is one JSON bundle. The JSON can 2921 // span multiple lines. 2922 // "RESOURCE_PRETTY" - The entire file is one JSON resource. The JSON 2923 // can span multiple lines. 2924 ContentStructure string `json:"contentStructure,omitempty"` 2925 2926 // GcsSource: Cloud Storage source data location and import 2927 // configuration. The Healthcare Service Agent account requires the 2928 // `roles/storage.objectAdmin` role on the Cloud Storage location. Each 2929 // Cloud Storage object should be a text file that contains the format 2930 // specified in ContentStructure. 2931 GcsSource *GoogleCloudHealthcareV1FhirGcsSource `json:"gcsSource,omitempty"` 2932 2933 // ForceSendFields is a list of field names (e.g. "ContentStructure") to 2934 // unconditionally include in API requests. By default, fields with 2935 // empty values are omitted from API requests. However, any non-pointer, 2936 // non-interface field appearing in ForceSendFields will be sent to the 2937 // server regardless of whether the field is empty or not. This may be 2938 // used to include empty fields in Patch requests. 2939 ForceSendFields []string `json:"-"` 2940 2941 // NullFields is a list of field names (e.g. "ContentStructure") to 2942 // include in API requests with the JSON null value. By default, fields 2943 // with empty values are omitted from API requests. However, any field 2944 // with an empty value appearing in NullFields will be sent to the 2945 // server as null. It is an error if a field in this list has a 2946 // non-empty value. This may be used to include null fields in Patch 2947 // requests. 2948 NullFields []string `json:"-"` 2949} 2950 2951func (s *ImportResourcesRequest) MarshalJSON() ([]byte, error) { 2952 type NoMethod ImportResourcesRequest 2953 raw := NoMethod(*s) 2954 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2955} 2956 2957// ImportResourcesResponse: Final response of importing resources. This 2958// structure is included in the response to describe the detailed 2959// outcome after the operation finishes successfully. 2960type ImportResourcesResponse struct { 2961} 2962 2963// InfoTypeTransformation: A transformation to apply to text that is 2964// identified as a specific info_type. 2965type InfoTypeTransformation struct { 2966 // CharacterMaskConfig: Config for character mask. 2967 CharacterMaskConfig *CharacterMaskConfig `json:"characterMaskConfig,omitempty"` 2968 2969 // CryptoHashConfig: Config for crypto hash. 2970 CryptoHashConfig *CryptoHashConfig `json:"cryptoHashConfig,omitempty"` 2971 2972 // DateShiftConfig: Config for date shift. 2973 DateShiftConfig *DateShiftConfig `json:"dateShiftConfig,omitempty"` 2974 2975 // InfoTypes: InfoTypes to apply this transformation to. If this is not 2976 // specified, the transformation applies to any info_type. 2977 InfoTypes []string `json:"infoTypes,omitempty"` 2978 2979 // RedactConfig: Config for text redaction. 2980 RedactConfig *RedactConfig `json:"redactConfig,omitempty"` 2981 2982 // ReplaceWithInfoTypeConfig: Config for replace with InfoType. 2983 ReplaceWithInfoTypeConfig *ReplaceWithInfoTypeConfig `json:"replaceWithInfoTypeConfig,omitempty"` 2984 2985 // ForceSendFields is a list of field names (e.g. "CharacterMaskConfig") 2986 // to unconditionally include in API requests. By default, fields with 2987 // empty values are omitted from API requests. However, any non-pointer, 2988 // non-interface field appearing in ForceSendFields will be sent to the 2989 // server regardless of whether the field is empty or not. This may be 2990 // used to include empty fields in Patch requests. 2991 ForceSendFields []string `json:"-"` 2992 2993 // NullFields is a list of field names (e.g. "CharacterMaskConfig") to 2994 // include in API requests with the JSON null value. By default, fields 2995 // with empty values are omitted from API requests. However, any field 2996 // with an empty value appearing in NullFields will be sent to the 2997 // server as null. It is an error if a field in this list has a 2998 // non-empty value. This may be used to include null fields in Patch 2999 // requests. 3000 NullFields []string `json:"-"` 3001} 3002 3003func (s *InfoTypeTransformation) MarshalJSON() ([]byte, error) { 3004 type NoMethod InfoTypeTransformation 3005 raw := NoMethod(*s) 3006 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3007} 3008 3009// IngestMessageRequest: Ingests a message into the specified HL7v2 3010// store. 3011type IngestMessageRequest struct { 3012 // Message: HL7v2 message to ingest. 3013 Message *Message `json:"message,omitempty"` 3014 3015 // ForceSendFields is a list of field names (e.g. "Message") to 3016 // unconditionally include in API requests. By default, fields with 3017 // empty values are omitted from API requests. However, any non-pointer, 3018 // non-interface field appearing in ForceSendFields will be sent to the 3019 // server regardless of whether the field is empty or not. This may be 3020 // used to include empty fields in Patch requests. 3021 ForceSendFields []string `json:"-"` 3022 3023 // NullFields is a list of field names (e.g. "Message") to include in 3024 // API requests with the JSON null value. By default, fields with empty 3025 // values are omitted from API requests. However, any field with an 3026 // empty value appearing in NullFields will be sent to the server as 3027 // null. It is an error if a field in this list has a non-empty value. 3028 // This may be used to include null fields in Patch requests. 3029 NullFields []string `json:"-"` 3030} 3031 3032func (s *IngestMessageRequest) MarshalJSON() ([]byte, error) { 3033 type NoMethod IngestMessageRequest 3034 raw := NoMethod(*s) 3035 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3036} 3037 3038// IngestMessageResponse: Acknowledges that a message has been ingested 3039// into the specified HL7v2 store. 3040type IngestMessageResponse struct { 3041 // Hl7Ack: HL7v2 ACK message. 3042 Hl7Ack string `json:"hl7Ack,omitempty"` 3043 3044 // Message: Created message resource. 3045 Message *Message `json:"message,omitempty"` 3046 3047 // ServerResponse contains the HTTP response code and headers from the 3048 // server. 3049 googleapi.ServerResponse `json:"-"` 3050 3051 // ForceSendFields is a list of field names (e.g. "Hl7Ack") to 3052 // unconditionally include in API requests. By default, fields with 3053 // empty values are omitted from API requests. However, any non-pointer, 3054 // non-interface field appearing in ForceSendFields will be sent to the 3055 // server regardless of whether the field is empty or not. This may be 3056 // used to include empty fields in Patch requests. 3057 ForceSendFields []string `json:"-"` 3058 3059 // NullFields is a list of field names (e.g. "Hl7Ack") to include in API 3060 // requests with the JSON null value. By default, fields with empty 3061 // values are omitted from API requests. However, any field with an 3062 // empty value appearing in NullFields will be sent to the server as 3063 // null. It is an error if a field in this list has a non-empty value. 3064 // This may be used to include null fields in Patch requests. 3065 NullFields []string `json:"-"` 3066} 3067 3068func (s *IngestMessageResponse) MarshalJSON() ([]byte, error) { 3069 type NoMethod IngestMessageResponse 3070 raw := NoMethod(*s) 3071 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3072} 3073 3074type ListAttributeDefinitionsResponse struct { 3075 // AttributeDefinitions: The returned Attribute definitions. The maximum 3076 // number of attributes returned is determined by the value of page_size 3077 // in the ListAttributeDefinitionsRequest. 3078 AttributeDefinitions []*AttributeDefinition `json:"attributeDefinitions,omitempty"` 3079 3080 // NextPageToken: Token to retrieve the next page of results, or empty 3081 // if there are no more results in the list. 3082 NextPageToken string `json:"nextPageToken,omitempty"` 3083 3084 // ServerResponse contains the HTTP response code and headers from the 3085 // server. 3086 googleapi.ServerResponse `json:"-"` 3087 3088 // ForceSendFields is a list of field names (e.g. 3089 // "AttributeDefinitions") to unconditionally include in API requests. 3090 // By default, fields with empty values are omitted from API requests. 3091 // However, any non-pointer, non-interface field appearing in 3092 // ForceSendFields will be sent to the server regardless of whether the 3093 // field is empty or not. This may be used to include empty fields in 3094 // Patch requests. 3095 ForceSendFields []string `json:"-"` 3096 3097 // NullFields is a list of field names (e.g. "AttributeDefinitions") to 3098 // include in API requests with the JSON null value. By default, fields 3099 // with empty values are omitted from API requests. However, any field 3100 // with an empty value appearing in NullFields will be sent to the 3101 // server as null. It is an error if a field in this list has a 3102 // non-empty value. This may be used to include null fields in Patch 3103 // requests. 3104 NullFields []string `json:"-"` 3105} 3106 3107func (s *ListAttributeDefinitionsResponse) MarshalJSON() ([]byte, error) { 3108 type NoMethod ListAttributeDefinitionsResponse 3109 raw := NoMethod(*s) 3110 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3111} 3112 3113type ListConsentArtifactsResponse struct { 3114 // ConsentArtifacts: The returned Consent artifacts. The maximum number 3115 // of artifacts returned is determined by the value of page_size in the 3116 // ListConsentArtifactsRequest. 3117 ConsentArtifacts []*ConsentArtifact `json:"consentArtifacts,omitempty"` 3118 3119 // NextPageToken: Token to retrieve the next page of results, or empty 3120 // if there are no more results in the list. 3121 NextPageToken string `json:"nextPageToken,omitempty"` 3122 3123 // ServerResponse contains the HTTP response code and headers from the 3124 // server. 3125 googleapi.ServerResponse `json:"-"` 3126 3127 // ForceSendFields is a list of field names (e.g. "ConsentArtifacts") to 3128 // unconditionally include in API requests. By default, fields with 3129 // empty values are omitted from API requests. However, any non-pointer, 3130 // non-interface field appearing in ForceSendFields will be sent to the 3131 // server regardless of whether the field is empty or not. This may be 3132 // used to include empty fields in Patch requests. 3133 ForceSendFields []string `json:"-"` 3134 3135 // NullFields is a list of field names (e.g. "ConsentArtifacts") to 3136 // include in API requests with the JSON null value. By default, fields 3137 // with empty values are omitted from API requests. However, any field 3138 // with an empty value appearing in NullFields will be sent to the 3139 // server as null. It is an error if a field in this list has a 3140 // non-empty value. This may be used to include null fields in Patch 3141 // requests. 3142 NullFields []string `json:"-"` 3143} 3144 3145func (s *ListConsentArtifactsResponse) MarshalJSON() ([]byte, error) { 3146 type NoMethod ListConsentArtifactsResponse 3147 raw := NoMethod(*s) 3148 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3149} 3150 3151type ListConsentRevisionsResponse struct { 3152 // Consents: The returned Consent revisions. The maximum number of 3153 // revisions returned is determined by the value of `page_size` in the 3154 // ListConsentRevisionsRequest. 3155 Consents []*Consent `json:"consents,omitempty"` 3156 3157 // NextPageToken: Token to retrieve the next page of results, or empty 3158 // if there are no more results in the list. 3159 NextPageToken string `json:"nextPageToken,omitempty"` 3160 3161 // ServerResponse contains the HTTP response code and headers from the 3162 // server. 3163 googleapi.ServerResponse `json:"-"` 3164 3165 // ForceSendFields is a list of field names (e.g. "Consents") to 3166 // unconditionally include in API requests. By default, fields with 3167 // empty values are omitted from API requests. However, any non-pointer, 3168 // non-interface field appearing in ForceSendFields will be sent to the 3169 // server regardless of whether the field is empty or not. This may be 3170 // used to include empty fields in Patch requests. 3171 ForceSendFields []string `json:"-"` 3172 3173 // NullFields is a list of field names (e.g. "Consents") to include in 3174 // API requests with the JSON null value. By default, fields with empty 3175 // values are omitted from API requests. However, any field with an 3176 // empty value appearing in NullFields will be sent to the server as 3177 // null. It is an error if a field in this list has a non-empty value. 3178 // This may be used to include null fields in Patch requests. 3179 NullFields []string `json:"-"` 3180} 3181 3182func (s *ListConsentRevisionsResponse) MarshalJSON() ([]byte, error) { 3183 type NoMethod ListConsentRevisionsResponse 3184 raw := NoMethod(*s) 3185 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3186} 3187 3188type ListConsentStoresResponse struct { 3189 // ConsentStores: The returned consent stores. The maximum number of 3190 // stores returned is determined by the value of page_size in the 3191 // ListConsentStoresRequest. 3192 ConsentStores []*ConsentStore `json:"consentStores,omitempty"` 3193 3194 // NextPageToken: Token to retrieve the next page of results, or empty 3195 // if there are no more results in the list. 3196 NextPageToken string `json:"nextPageToken,omitempty"` 3197 3198 // ServerResponse contains the HTTP response code and headers from the 3199 // server. 3200 googleapi.ServerResponse `json:"-"` 3201 3202 // ForceSendFields is a list of field names (e.g. "ConsentStores") to 3203 // unconditionally include in API requests. By default, fields with 3204 // empty values are omitted from API requests. However, any non-pointer, 3205 // non-interface field appearing in ForceSendFields will be sent to the 3206 // server regardless of whether the field is empty or not. This may be 3207 // used to include empty fields in Patch requests. 3208 ForceSendFields []string `json:"-"` 3209 3210 // NullFields is a list of field names (e.g. "ConsentStores") to include 3211 // in API requests with the JSON null value. By default, fields with 3212 // empty values are omitted from API requests. However, any field with 3213 // an empty value appearing in NullFields will be sent to the server as 3214 // null. It is an error if a field in this list has a non-empty value. 3215 // This may be used to include null fields in Patch requests. 3216 NullFields []string `json:"-"` 3217} 3218 3219func (s *ListConsentStoresResponse) MarshalJSON() ([]byte, error) { 3220 type NoMethod ListConsentStoresResponse 3221 raw := NoMethod(*s) 3222 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3223} 3224 3225type ListConsentsResponse struct { 3226 // Consents: The returned Consents. The maximum number of Consents 3227 // returned is determined by the value of page_size in the 3228 // ListConsentsRequest. 3229 Consents []*Consent `json:"consents,omitempty"` 3230 3231 // NextPageToken: Token to retrieve the next page of results, or empty 3232 // if there are no more results in the list. 3233 NextPageToken string `json:"nextPageToken,omitempty"` 3234 3235 // ServerResponse contains the HTTP response code and headers from the 3236 // server. 3237 googleapi.ServerResponse `json:"-"` 3238 3239 // ForceSendFields is a list of field names (e.g. "Consents") to 3240 // unconditionally include in API requests. By default, fields with 3241 // empty values are omitted from API requests. However, any non-pointer, 3242 // non-interface field appearing in ForceSendFields will be sent to the 3243 // server regardless of whether the field is empty or not. This may be 3244 // used to include empty fields in Patch requests. 3245 ForceSendFields []string `json:"-"` 3246 3247 // NullFields is a list of field names (e.g. "Consents") to include in 3248 // API requests with the JSON null value. By default, fields with empty 3249 // values are omitted from API requests. However, any field with an 3250 // empty value appearing in NullFields will be sent to the server as 3251 // null. It is an error if a field in this list has a non-empty value. 3252 // This may be used to include null fields in Patch requests. 3253 NullFields []string `json:"-"` 3254} 3255 3256func (s *ListConsentsResponse) MarshalJSON() ([]byte, error) { 3257 type NoMethod ListConsentsResponse 3258 raw := NoMethod(*s) 3259 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3260} 3261 3262// ListDatasetsResponse: Lists the available datasets. 3263type ListDatasetsResponse struct { 3264 // Datasets: The first page of datasets. 3265 Datasets []*Dataset `json:"datasets,omitempty"` 3266 3267 // NextPageToken: Token to retrieve the next page of results, or empty 3268 // if there are no more results in the list. 3269 NextPageToken string `json:"nextPageToken,omitempty"` 3270 3271 // ServerResponse contains the HTTP response code and headers from the 3272 // server. 3273 googleapi.ServerResponse `json:"-"` 3274 3275 // ForceSendFields is a list of field names (e.g. "Datasets") to 3276 // unconditionally include in API requests. By default, fields with 3277 // empty values are omitted from API requests. However, any non-pointer, 3278 // non-interface field appearing in ForceSendFields will be sent to the 3279 // server regardless of whether the field is empty or not. This may be 3280 // used to include empty fields in Patch requests. 3281 ForceSendFields []string `json:"-"` 3282 3283 // NullFields is a list of field names (e.g. "Datasets") to include in 3284 // API requests with the JSON null value. By default, fields with empty 3285 // values are omitted from API requests. However, any field with an 3286 // empty value appearing in NullFields will be sent to the server as 3287 // null. It is an error if a field in this list has a non-empty value. 3288 // This may be used to include null fields in Patch requests. 3289 NullFields []string `json:"-"` 3290} 3291 3292func (s *ListDatasetsResponse) MarshalJSON() ([]byte, error) { 3293 type NoMethod ListDatasetsResponse 3294 raw := NoMethod(*s) 3295 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3296} 3297 3298// ListDicomStoresResponse: Lists the DICOM stores in the given dataset. 3299type ListDicomStoresResponse struct { 3300 // DicomStores: The returned DICOM stores. Won't be more DICOM stores 3301 // than the value of page_size in the request. 3302 DicomStores []*DicomStore `json:"dicomStores,omitempty"` 3303 3304 // NextPageToken: Token to retrieve the next page of results or empty if 3305 // there are no more results in the list. 3306 NextPageToken string `json:"nextPageToken,omitempty"` 3307 3308 // ServerResponse contains the HTTP response code and headers from the 3309 // server. 3310 googleapi.ServerResponse `json:"-"` 3311 3312 // ForceSendFields is a list of field names (e.g. "DicomStores") to 3313 // unconditionally include in API requests. By default, fields with 3314 // empty values are omitted from API requests. However, any non-pointer, 3315 // non-interface field appearing in ForceSendFields will be sent to the 3316 // server regardless of whether the field is empty or not. This may be 3317 // used to include empty fields in Patch requests. 3318 ForceSendFields []string `json:"-"` 3319 3320 // NullFields is a list of field names (e.g. "DicomStores") to include 3321 // in API requests with the JSON null value. By default, fields with 3322 // empty values are omitted from API requests. However, any field with 3323 // an empty value appearing in NullFields will be sent to the server as 3324 // null. It is an error if a field in this list has a non-empty value. 3325 // This may be used to include null fields in Patch requests. 3326 NullFields []string `json:"-"` 3327} 3328 3329func (s *ListDicomStoresResponse) MarshalJSON() ([]byte, error) { 3330 type NoMethod ListDicomStoresResponse 3331 raw := NoMethod(*s) 3332 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3333} 3334 3335// ListFhirStoresResponse: Lists the FHIR stores in the given dataset. 3336type ListFhirStoresResponse struct { 3337 // FhirStores: The returned FHIR stores. Won't be more FHIR stores than 3338 // the value of page_size in the request. 3339 FhirStores []*FhirStore `json:"fhirStores,omitempty"` 3340 3341 // NextPageToken: Token to retrieve the next page of results or empty if 3342 // there are no more results in the list. 3343 NextPageToken string `json:"nextPageToken,omitempty"` 3344 3345 // ServerResponse contains the HTTP response code and headers from the 3346 // server. 3347 googleapi.ServerResponse `json:"-"` 3348 3349 // ForceSendFields is a list of field names (e.g. "FhirStores") to 3350 // unconditionally include in API requests. By default, fields with 3351 // empty values are omitted from API requests. However, any non-pointer, 3352 // non-interface field appearing in ForceSendFields will be sent to the 3353 // server regardless of whether the field is empty or not. This may be 3354 // used to include empty fields in Patch requests. 3355 ForceSendFields []string `json:"-"` 3356 3357 // NullFields is a list of field names (e.g. "FhirStores") to include in 3358 // API requests with the JSON null value. By default, fields with empty 3359 // values are omitted from API requests. However, any field with an 3360 // empty value appearing in NullFields will be sent to the server as 3361 // null. It is an error if a field in this list has a non-empty value. 3362 // This may be used to include null fields in Patch requests. 3363 NullFields []string `json:"-"` 3364} 3365 3366func (s *ListFhirStoresResponse) MarshalJSON() ([]byte, error) { 3367 type NoMethod ListFhirStoresResponse 3368 raw := NoMethod(*s) 3369 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3370} 3371 3372// ListHl7V2StoresResponse: Lists the HL7v2 stores in the given dataset. 3373type ListHl7V2StoresResponse struct { 3374 // Hl7V2Stores: The returned HL7v2 stores. Won't be more HL7v2 stores 3375 // than the value of page_size in the request. 3376 Hl7V2Stores []*Hl7V2Store `json:"hl7V2Stores,omitempty"` 3377 3378 // NextPageToken: Token to retrieve the next page of results or empty if 3379 // there are no more results in the list. 3380 NextPageToken string `json:"nextPageToken,omitempty"` 3381 3382 // ServerResponse contains the HTTP response code and headers from the 3383 // server. 3384 googleapi.ServerResponse `json:"-"` 3385 3386 // ForceSendFields is a list of field names (e.g. "Hl7V2Stores") to 3387 // unconditionally include in API requests. By default, fields with 3388 // empty values are omitted from API requests. However, any non-pointer, 3389 // non-interface field appearing in ForceSendFields will be sent to the 3390 // server regardless of whether the field is empty or not. This may be 3391 // used to include empty fields in Patch requests. 3392 ForceSendFields []string `json:"-"` 3393 3394 // NullFields is a list of field names (e.g. "Hl7V2Stores") to include 3395 // in API requests with the JSON null value. By default, fields with 3396 // empty values are omitted from API requests. However, any field with 3397 // an empty value appearing in NullFields will be sent to the server as 3398 // null. It is an error if a field in this list has a non-empty value. 3399 // This may be used to include null fields in Patch requests. 3400 NullFields []string `json:"-"` 3401} 3402 3403func (s *ListHl7V2StoresResponse) MarshalJSON() ([]byte, error) { 3404 type NoMethod ListHl7V2StoresResponse 3405 raw := NoMethod(*s) 3406 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3407} 3408 3409// ListLocationsResponse: The response message for 3410// Locations.ListLocations. 3411type ListLocationsResponse struct { 3412 // Locations: A list of locations that matches the specified filter in 3413 // the request. 3414 Locations []*Location `json:"locations,omitempty"` 3415 3416 // NextPageToken: The standard List next-page token. 3417 NextPageToken string `json:"nextPageToken,omitempty"` 3418 3419 // ServerResponse contains the HTTP response code and headers from the 3420 // server. 3421 googleapi.ServerResponse `json:"-"` 3422 3423 // ForceSendFields is a list of field names (e.g. "Locations") to 3424 // unconditionally include in API requests. By default, fields with 3425 // empty values are omitted from API requests. However, any non-pointer, 3426 // non-interface field appearing in ForceSendFields will be sent to the 3427 // server regardless of whether the field is empty or not. This may be 3428 // used to include empty fields in Patch requests. 3429 ForceSendFields []string `json:"-"` 3430 3431 // NullFields is a list of field names (e.g. "Locations") to include in 3432 // API requests with the JSON null value. By default, fields with empty 3433 // values are omitted from API requests. However, any field with an 3434 // empty value appearing in NullFields will be sent to the server as 3435 // null. It is an error if a field in this list has a non-empty value. 3436 // This may be used to include null fields in Patch requests. 3437 NullFields []string `json:"-"` 3438} 3439 3440func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { 3441 type NoMethod ListLocationsResponse 3442 raw := NoMethod(*s) 3443 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3444} 3445 3446// ListMessagesResponse: Lists the messages in the specified HL7v2 3447// store. 3448type ListMessagesResponse struct { 3449 // Hl7V2Messages: The returned Messages. Won't be more Messages than the 3450 // value of page_size in the request. See view for populated fields. 3451 Hl7V2Messages []*Message `json:"hl7V2Messages,omitempty"` 3452 3453 // NextPageToken: Token to retrieve the next page of results or empty if 3454 // there are no more results in the list. 3455 NextPageToken string `json:"nextPageToken,omitempty"` 3456 3457 // ServerResponse contains the HTTP response code and headers from the 3458 // server. 3459 googleapi.ServerResponse `json:"-"` 3460 3461 // ForceSendFields is a list of field names (e.g. "Hl7V2Messages") to 3462 // unconditionally include in API requests. By default, fields with 3463 // empty values are omitted from API requests. However, any non-pointer, 3464 // non-interface field appearing in ForceSendFields will be sent to the 3465 // server regardless of whether the field is empty or not. This may be 3466 // used to include empty fields in Patch requests. 3467 ForceSendFields []string `json:"-"` 3468 3469 // NullFields is a list of field names (e.g. "Hl7V2Messages") to include 3470 // in API requests with the JSON null value. By default, fields with 3471 // empty values are omitted from API requests. However, any field with 3472 // an empty value appearing in NullFields will be sent to the server as 3473 // null. It is an error if a field in this list has a non-empty value. 3474 // This may be used to include null fields in Patch requests. 3475 NullFields []string `json:"-"` 3476} 3477 3478func (s *ListMessagesResponse) MarshalJSON() ([]byte, error) { 3479 type NoMethod ListMessagesResponse 3480 raw := NoMethod(*s) 3481 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3482} 3483 3484// ListOperationsResponse: The response message for 3485// Operations.ListOperations. 3486type ListOperationsResponse struct { 3487 // NextPageToken: The standard List next-page token. 3488 NextPageToken string `json:"nextPageToken,omitempty"` 3489 3490 // Operations: A list of operations that matches the specified filter in 3491 // the request. 3492 Operations []*Operation `json:"operations,omitempty"` 3493 3494 // ServerResponse contains the HTTP response code and headers from the 3495 // server. 3496 googleapi.ServerResponse `json:"-"` 3497 3498 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 3499 // unconditionally include in API requests. By default, fields with 3500 // empty values are omitted from API requests. However, any non-pointer, 3501 // non-interface field appearing in ForceSendFields will be sent to the 3502 // server regardless of whether the field is empty or not. This may be 3503 // used to include empty fields in Patch requests. 3504 ForceSendFields []string `json:"-"` 3505 3506 // NullFields is a list of field names (e.g. "NextPageToken") to include 3507 // in API requests with the JSON null value. By default, fields with 3508 // empty values are omitted from API requests. However, any field with 3509 // an empty value appearing in NullFields will be sent to the server as 3510 // null. It is an error if a field in this list has a non-empty value. 3511 // This may be used to include null fields in Patch requests. 3512 NullFields []string `json:"-"` 3513} 3514 3515func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { 3516 type NoMethod ListOperationsResponse 3517 raw := NoMethod(*s) 3518 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3519} 3520 3521type ListUserDataMappingsResponse struct { 3522 // NextPageToken: Token to retrieve the next page of results, or empty 3523 // if there are no more results in the list. 3524 NextPageToken string `json:"nextPageToken,omitempty"` 3525 3526 // UserDataMappings: The returned User data mappings. The maximum number 3527 // of User data mappings returned is determined by the value of 3528 // page_size in the ListUserDataMappingsRequest. 3529 UserDataMappings []*UserDataMapping `json:"userDataMappings,omitempty"` 3530 3531 // ServerResponse contains the HTTP response code and headers from the 3532 // server. 3533 googleapi.ServerResponse `json:"-"` 3534 3535 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 3536 // unconditionally include in API requests. By default, fields with 3537 // empty values are omitted from API requests. However, any non-pointer, 3538 // non-interface field appearing in ForceSendFields will be sent to the 3539 // server regardless of whether the field is empty or not. This may be 3540 // used to include empty fields in Patch requests. 3541 ForceSendFields []string `json:"-"` 3542 3543 // NullFields is a list of field names (e.g. "NextPageToken") to include 3544 // in API requests with the JSON null value. By default, fields with 3545 // empty values are omitted from API requests. However, any field with 3546 // an empty value appearing in NullFields will be sent to the server as 3547 // null. It is an error if a field in this list has a non-empty value. 3548 // This may be used to include null fields in Patch requests. 3549 NullFields []string `json:"-"` 3550} 3551 3552func (s *ListUserDataMappingsResponse) MarshalJSON() ([]byte, error) { 3553 type NoMethod ListUserDataMappingsResponse 3554 raw := NoMethod(*s) 3555 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3556} 3557 3558// Location: A resource that represents Google Cloud Platform location. 3559type Location struct { 3560 // DisplayName: The friendly name for this location, typically a nearby 3561 // city name. For example, "Tokyo". 3562 DisplayName string `json:"displayName,omitempty"` 3563 3564 // Labels: Cross-service attributes for the location. For example 3565 // {"cloud.googleapis.com/region": "us-east1"} 3566 Labels map[string]string `json:"labels,omitempty"` 3567 3568 // LocationId: The canonical id for this location. For example: 3569 // "us-east1". 3570 LocationId string `json:"locationId,omitempty"` 3571 3572 // Metadata: Service-specific metadata. For example the available 3573 // capacity at the given location. 3574 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 3575 3576 // Name: Resource name for the location, which may vary between 3577 // implementations. For example: 3578 // "projects/example-project/locations/us-east1" 3579 Name string `json:"name,omitempty"` 3580 3581 // ServerResponse contains the HTTP response code and headers from the 3582 // server. 3583 googleapi.ServerResponse `json:"-"` 3584 3585 // ForceSendFields is a list of field names (e.g. "DisplayName") to 3586 // unconditionally include in API requests. By default, fields with 3587 // empty values are omitted from API requests. However, any non-pointer, 3588 // non-interface field appearing in ForceSendFields will be sent to the 3589 // server regardless of whether the field is empty or not. This may be 3590 // used to include empty fields in Patch requests. 3591 ForceSendFields []string `json:"-"` 3592 3593 // NullFields is a list of field names (e.g. "DisplayName") to include 3594 // in API requests with the JSON null value. By default, fields with 3595 // empty values are omitted from API requests. However, any field with 3596 // an empty value appearing in NullFields will be sent to the server as 3597 // null. It is an error if a field in this list has a non-empty value. 3598 // This may be used to include null fields in Patch requests. 3599 NullFields []string `json:"-"` 3600} 3601 3602func (s *Location) MarshalJSON() ([]byte, error) { 3603 type NoMethod Location 3604 raw := NoMethod(*s) 3605 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3606} 3607 3608// Message: A complete HL7v2 message. See [Introduction to HL7 3609// Standards] 3610// (https://www.hl7.org/implement/standards/index.cfm?ref=common) for 3611// details on the standard. 3612type Message struct { 3613 // CreateTime: Output only. The datetime when the message was created. 3614 // Set by the server. 3615 CreateTime string `json:"createTime,omitempty"` 3616 3617 // Data: Raw message bytes. 3618 Data string `json:"data,omitempty"` 3619 3620 // Labels: User-supplied key-value pairs used to organize HL7v2 stores. 3621 // Label keys must be between 1 and 63 characters long, have a UTF-8 3622 // encoding of maximum 128 bytes, and must conform to the following PCRE 3623 // regular expression: \p{Ll}\p{Lo}{0,62} Label values are optional, 3624 // must be between 1 and 63 characters long, have a UTF-8 encoding of 3625 // maximum 128 bytes, and must conform to the following PCRE regular 3626 // expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64 labels can be 3627 // associated with a given store. 3628 Labels map[string]string `json:"labels,omitempty"` 3629 3630 // MessageType: The message type for this message. MSH-9.1. 3631 MessageType string `json:"messageType,omitempty"` 3632 3633 // Name: Resource name of the Message, of the form 3634 // `projects/{project_id}/datasets/{dataset_id}/hl7V2Stores/{hl7_v2_store 3635 // _id}/messages/{message_id}`. Assigned by the server. 3636 Name string `json:"name,omitempty"` 3637 3638 // ParsedData: Output only. The parsed version of the raw message data. 3639 ParsedData *ParsedData `json:"parsedData,omitempty"` 3640 3641 // PatientIds: All patient IDs listed in the PID-2, PID-3, and PID-4 3642 // segments of this message. 3643 PatientIds []*PatientId `json:"patientIds,omitempty"` 3644 3645 // SchematizedData: The parsed version of the raw message data 3646 // schematized according to this store's schemas and type definitions. 3647 SchematizedData *SchematizedData `json:"schematizedData,omitempty"` 3648 3649 // SendFacility: The hospital that this message came from. MSH-4. 3650 SendFacility string `json:"sendFacility,omitempty"` 3651 3652 // SendTime: The datetime the sending application sent this message. 3653 // MSH-7. 3654 SendTime string `json:"sendTime,omitempty"` 3655 3656 // ServerResponse contains the HTTP response code and headers from the 3657 // server. 3658 googleapi.ServerResponse `json:"-"` 3659 3660 // ForceSendFields is a list of field names (e.g. "CreateTime") to 3661 // unconditionally include in API requests. By default, fields with 3662 // empty values are omitted from API requests. However, any non-pointer, 3663 // non-interface field appearing in ForceSendFields will be sent to the 3664 // server regardless of whether the field is empty or not. This may be 3665 // used to include empty fields in Patch requests. 3666 ForceSendFields []string `json:"-"` 3667 3668 // NullFields is a list of field names (e.g. "CreateTime") to include in 3669 // API requests with the JSON null value. By default, fields with empty 3670 // values are omitted from API requests. However, any field with an 3671 // empty value appearing in NullFields will be sent to the server as 3672 // null. It is an error if a field in this list has a non-empty value. 3673 // This may be used to include null fields in Patch requests. 3674 NullFields []string `json:"-"` 3675} 3676 3677func (s *Message) MarshalJSON() ([]byte, error) { 3678 type NoMethod Message 3679 raw := NoMethod(*s) 3680 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3681} 3682 3683// NotificationConfig: Specifies where to send notifications upon 3684// changes to a data store. 3685type NotificationConfig struct { 3686 // PubsubTopic: The Pub/Sub (https://cloud.google.com/pubsub/docs/) 3687 // topic that notifications of changes are published on. Supplied by the 3688 // client. PubsubMessage.Data contains the resource name. 3689 // PubsubMessage.MessageId is the ID of this message. It is guaranteed 3690 // to be unique within the topic. PubsubMessage.PublishTime is the time 3691 // at which the message was published. Notifications are only sent if 3692 // the topic is non-empty. Topic names 3693 // (https://cloud.google.com/pubsub/docs/overview#names) must be scoped 3694 // to a project. Cloud Healthcare API service account must have 3695 // publisher permissions on the given Pub/Sub topic. Not having adequate 3696 // permissions causes the calls that send notifications to fail. If a 3697 // notification can't be published to Pub/Sub, errors are logged to 3698 // Cloud Logging (see Viewing error logs in Cloud Logging 3699 // (https://cloud.google.com/healthcare/docs/how-tos/logging)). If the 3700 // number of errors exceeds a certain rate, some aren't submitted. Note 3701 // that not all operations trigger notifications, see Configuring 3702 // Pub/Sub notifications 3703 // (https://cloud.google.com/healthcare/docs/how-tos/pubsub) for 3704 // specific details. 3705 PubsubTopic string `json:"pubsubTopic,omitempty"` 3706 3707 // ForceSendFields is a list of field names (e.g. "PubsubTopic") to 3708 // unconditionally include in API requests. By default, fields with 3709 // empty values are omitted from API requests. However, any non-pointer, 3710 // non-interface field appearing in ForceSendFields will be sent to the 3711 // server regardless of whether the field is empty or not. This may be 3712 // used to include empty fields in Patch requests. 3713 ForceSendFields []string `json:"-"` 3714 3715 // NullFields is a list of field names (e.g. "PubsubTopic") to include 3716 // in API requests with the JSON null value. By default, fields with 3717 // empty values are omitted from API requests. However, any field with 3718 // an empty value appearing in NullFields will be sent to the server as 3719 // null. It is an error if a field in this list has a non-empty value. 3720 // This may be used to include null fields in Patch requests. 3721 NullFields []string `json:"-"` 3722} 3723 3724func (s *NotificationConfig) MarshalJSON() ([]byte, error) { 3725 type NoMethod NotificationConfig 3726 raw := NoMethod(*s) 3727 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3728} 3729 3730// Operation: This resource represents a long-running operation that is 3731// the result of a network API call. 3732type Operation struct { 3733 // Done: If the value is `false`, it means the operation is still in 3734 // progress. If `true`, the operation is completed, and either `error` 3735 // or `response` is available. 3736 Done bool `json:"done,omitempty"` 3737 3738 // Error: The error result of the operation in case of failure or 3739 // cancellation. 3740 Error *Status `json:"error,omitempty"` 3741 3742 // Metadata: Service-specific metadata associated with the operation. It 3743 // typically contains progress information and common metadata such as 3744 // create time. Some services might not provide such metadata. Any 3745 // method that returns a long-running operation should document the 3746 // metadata type, if any. 3747 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 3748 3749 // Name: The server-assigned name, which is only unique within the same 3750 // service that originally returns it. If you use the default HTTP 3751 // mapping, the `name` should be a resource name ending with 3752 // `operations/{unique_id}`. 3753 Name string `json:"name,omitempty"` 3754 3755 // Response: The normal response of the operation in case of success. If 3756 // the original method returns no data on success, such as `Delete`, the 3757 // response is `google.protobuf.Empty`. If the original method is 3758 // standard `Get`/`Create`/`Update`, the response should be the 3759 // resource. For other methods, the response should have the type 3760 // `XxxResponse`, where `Xxx` is the original method name. For example, 3761 // if the original method name is `TakeSnapshot()`, the inferred 3762 // response type is `TakeSnapshotResponse`. 3763 Response googleapi.RawMessage `json:"response,omitempty"` 3764 3765 // ServerResponse contains the HTTP response code and headers from the 3766 // server. 3767 googleapi.ServerResponse `json:"-"` 3768 3769 // ForceSendFields is a list of field names (e.g. "Done") to 3770 // unconditionally include in API requests. By default, fields with 3771 // empty values are omitted from API requests. However, any non-pointer, 3772 // non-interface field appearing in ForceSendFields will be sent to the 3773 // server regardless of whether the field is empty or not. This may be 3774 // used to include empty fields in Patch requests. 3775 ForceSendFields []string `json:"-"` 3776 3777 // NullFields is a list of field names (e.g. "Done") to include in API 3778 // requests with the JSON null value. By default, fields with empty 3779 // values are omitted from API requests. However, any field with an 3780 // empty value appearing in NullFields will be sent to the server as 3781 // null. It is an error if a field in this list has a non-empty value. 3782 // This may be used to include null fields in Patch requests. 3783 NullFields []string `json:"-"` 3784} 3785 3786func (s *Operation) MarshalJSON() ([]byte, error) { 3787 type NoMethod Operation 3788 raw := NoMethod(*s) 3789 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3790} 3791 3792// OperationMetadata: OperationMetadata provides information about the 3793// operation execution. Returned in the long-running operation's 3794// metadata field. 3795type OperationMetadata struct { 3796 // ApiMethodName: The name of the API method that initiated the 3797 // operation. 3798 ApiMethodName string `json:"apiMethodName,omitempty"` 3799 3800 // CancelRequested: Specifies if cancellation was requested for the 3801 // operation. 3802 CancelRequested bool `json:"cancelRequested,omitempty"` 3803 3804 Counter *ProgressCounter `json:"counter,omitempty"` 3805 3806 // CreateTime: The time at which the operation was created by the API. 3807 CreateTime string `json:"createTime,omitempty"` 3808 3809 // EndTime: The time at which execution was completed. 3810 EndTime string `json:"endTime,omitempty"` 3811 3812 // LogsUrl: A link to audit and error logs in the log viewer. Error logs 3813 // are generated only by some operations, listed at Viewing error logs 3814 // in Cloud Logging 3815 // (https://cloud.google.com/healthcare/docs/how-tos/logging). 3816 LogsUrl string `json:"logsUrl,omitempty"` 3817 3818 // ForceSendFields is a list of field names (e.g. "ApiMethodName") to 3819 // unconditionally include in API requests. By default, fields with 3820 // empty values are omitted from API requests. However, any non-pointer, 3821 // non-interface field appearing in ForceSendFields will be sent to the 3822 // server regardless of whether the field is empty or not. This may be 3823 // used to include empty fields in Patch requests. 3824 ForceSendFields []string `json:"-"` 3825 3826 // NullFields is a list of field names (e.g. "ApiMethodName") to include 3827 // in API requests with the JSON null value. By default, fields with 3828 // empty values are omitted from API requests. However, any field with 3829 // an empty value appearing in NullFields will be sent to the server as 3830 // null. It is an error if a field in this list has a non-empty value. 3831 // This may be used to include null fields in Patch requests. 3832 NullFields []string `json:"-"` 3833} 3834 3835func (s *OperationMetadata) MarshalJSON() ([]byte, error) { 3836 type NoMethod OperationMetadata 3837 raw := NoMethod(*s) 3838 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3839} 3840 3841// ParsedData: The content of a HL7v2 message in a structured format. 3842type ParsedData struct { 3843 Segments []*Segment `json:"segments,omitempty"` 3844 3845 // ForceSendFields is a list of field names (e.g. "Segments") to 3846 // unconditionally include in API requests. By default, fields with 3847 // empty values are omitted from API requests. However, any non-pointer, 3848 // non-interface field appearing in ForceSendFields will be sent to the 3849 // server regardless of whether the field is empty or not. This may be 3850 // used to include empty fields in Patch requests. 3851 ForceSendFields []string `json:"-"` 3852 3853 // NullFields is a list of field names (e.g. "Segments") to include in 3854 // API requests with the JSON null value. By default, fields with empty 3855 // values are omitted from API requests. However, any field with an 3856 // empty value appearing in NullFields will be sent to the server as 3857 // null. It is an error if a field in this list has a non-empty value. 3858 // This may be used to include null fields in Patch requests. 3859 NullFields []string `json:"-"` 3860} 3861 3862func (s *ParsedData) MarshalJSON() ([]byte, error) { 3863 type NoMethod ParsedData 3864 raw := NoMethod(*s) 3865 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3866} 3867 3868// ParserConfig: The configuration for the parser. It determines how the 3869// server parses the messages. 3870type ParserConfig struct { 3871 // AllowNullHeader: Determines whether messages with no header are 3872 // allowed. 3873 AllowNullHeader bool `json:"allowNullHeader,omitempty"` 3874 3875 // Schema: Schemas used to parse messages in this store, if schematized 3876 // parsing is desired. 3877 Schema *SchemaPackage `json:"schema,omitempty"` 3878 3879 // SegmentTerminator: Byte(s) to use as the segment terminator. If this 3880 // is unset, '\r' is used as segment terminator, matching the HL7 3881 // version 2 specification. 3882 SegmentTerminator string `json:"segmentTerminator,omitempty"` 3883 3884 // ForceSendFields is a list of field names (e.g. "AllowNullHeader") to 3885 // unconditionally include in API requests. By default, fields with 3886 // empty values are omitted from API requests. However, any non-pointer, 3887 // non-interface field appearing in ForceSendFields will be sent to the 3888 // server regardless of whether the field is empty or not. This may be 3889 // used to include empty fields in Patch requests. 3890 ForceSendFields []string `json:"-"` 3891 3892 // NullFields is a list of field names (e.g. "AllowNullHeader") to 3893 // include in API requests with the JSON null value. By default, fields 3894 // with empty values are omitted from API requests. However, any field 3895 // with an empty value appearing in NullFields will be sent to the 3896 // server as null. It is an error if a field in this list has a 3897 // non-empty value. This may be used to include null fields in Patch 3898 // requests. 3899 NullFields []string `json:"-"` 3900} 3901 3902func (s *ParserConfig) MarshalJSON() ([]byte, error) { 3903 type NoMethod ParserConfig 3904 raw := NoMethod(*s) 3905 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3906} 3907 3908// PatientId: A patient identifier and associated type. 3909type PatientId struct { 3910 // Type: ID type. For example, MRN or NHS. 3911 Type string `json:"type,omitempty"` 3912 3913 // Value: The patient's unique identifier. 3914 Value string `json:"value,omitempty"` 3915 3916 // ForceSendFields is a list of field names (e.g. "Type") to 3917 // unconditionally include in API requests. By default, fields with 3918 // empty values are omitted from API requests. However, any non-pointer, 3919 // non-interface field appearing in ForceSendFields will be sent to the 3920 // server regardless of whether the field is empty or not. This may be 3921 // used to include empty fields in Patch requests. 3922 ForceSendFields []string `json:"-"` 3923 3924 // NullFields is a list of field names (e.g. "Type") to include in API 3925 // requests with the JSON null value. By default, fields with empty 3926 // values are omitted from API requests. However, any field with an 3927 // empty value appearing in NullFields will be sent to the server as 3928 // null. It is an error if a field in this list has a non-empty value. 3929 // This may be used to include null fields in Patch requests. 3930 NullFields []string `json:"-"` 3931} 3932 3933func (s *PatientId) MarshalJSON() ([]byte, error) { 3934 type NoMethod PatientId 3935 raw := NoMethod(*s) 3936 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3937} 3938 3939// Policy: An Identity and Access Management (IAM) policy, which 3940// specifies access controls for Google Cloud resources. A `Policy` is a 3941// collection of `bindings`. A `binding` binds one or more `members` to 3942// a single `role`. Members can be user accounts, service accounts, 3943// Google groups, and domains (such as G Suite). A `role` is a named 3944// list of permissions; each `role` can be an IAM predefined role or a 3945// user-created custom role. For some types of Google Cloud resources, a 3946// `binding` can also specify a `condition`, which is a logical 3947// expression that allows access to a resource only if the expression 3948// evaluates to `true`. A condition can add constraints based on 3949// attributes of the request, the resource, or both. To learn which 3950// resources support conditions in their IAM policies, see the IAM 3951// documentation 3952// (https://cloud.google.com/iam/help/conditions/resource-policies). 3953// **JSON example:** { "bindings": [ { "role": 3954// "roles/resourcemanager.organizationAdmin", "members": [ 3955// "user:mike@example.com", "group:admins@example.com", 3956// "domain:google.com", 3957// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { 3958// "role": "roles/resourcemanager.organizationViewer", "members": [ 3959// "user:eve@example.com" ], "condition": { "title": "expirable access", 3960// "description": "Does not grant access after Sep 2020", "expression": 3961// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], 3962// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - 3963// members: - user:mike@example.com - group:admins@example.com - 3964// domain:google.com - 3965// serviceAccount:my-project-id@appspot.gserviceaccount.com role: 3966// roles/resourcemanager.organizationAdmin - members: - 3967// user:eve@example.com role: roles/resourcemanager.organizationViewer 3968// condition: title: expirable access description: Does not grant access 3969// after Sep 2020 expression: request.time < 3970// timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3971// 3 For a description of IAM and its features, see the IAM 3972// documentation (https://cloud.google.com/iam/docs/). 3973type Policy struct { 3974 // AuditConfigs: Specifies cloud audit logging configuration for this 3975 // policy. 3976 AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` 3977 3978 // Bindings: Associates a list of `members` to a `role`. Optionally, may 3979 // specify a `condition` that determines how and when the `bindings` are 3980 // applied. Each of the `bindings` must contain at least one member. 3981 Bindings []*Binding `json:"bindings,omitempty"` 3982 3983 // Etag: `etag` is used for optimistic concurrency control as a way to 3984 // help prevent simultaneous updates of a policy from overwriting each 3985 // other. It is strongly suggested that systems make use of the `etag` 3986 // in the read-modify-write cycle to perform policy updates in order to 3987 // avoid race conditions: An `etag` is returned in the response to 3988 // `getIamPolicy`, and systems are expected to put that etag in the 3989 // request to `setIamPolicy` to ensure that their change will be applied 3990 // to the same version of the policy. **Important:** If you use IAM 3991 // Conditions, you must include the `etag` field whenever you call 3992 // `setIamPolicy`. If you omit this field, then IAM allows you to 3993 // overwrite a version `3` policy with a version `1` policy, and all of 3994 // the conditions in the version `3` policy are lost. 3995 Etag string `json:"etag,omitempty"` 3996 3997 // Version: Specifies the format of the policy. Valid values are `0`, 3998 // `1`, and `3`. Requests that specify an invalid value are rejected. 3999 // Any operation that affects conditional role bindings must specify 4000 // version `3`. This requirement applies to the following operations: * 4001 // Getting a policy that includes a conditional role binding * Adding a 4002 // conditional role binding to a policy * Changing a conditional role 4003 // binding in a policy * Removing any role binding, with or without a 4004 // condition, from a policy that includes conditions **Important:** If 4005 // you use IAM Conditions, you must include the `etag` field whenever 4006 // you call `setIamPolicy`. If you omit this field, then IAM allows you 4007 // to overwrite a version `3` policy with a version `1` policy, and all 4008 // of the conditions in the version `3` policy are lost. If a policy 4009 // does not include any conditions, operations on that policy may 4010 // specify any valid version or leave the field unset. To learn which 4011 // resources support conditions in their IAM policies, see the IAM 4012 // documentation 4013 // (https://cloud.google.com/iam/help/conditions/resource-policies). 4014 Version int64 `json:"version,omitempty"` 4015 4016 // ServerResponse contains the HTTP response code and headers from the 4017 // server. 4018 googleapi.ServerResponse `json:"-"` 4019 4020 // ForceSendFields is a list of field names (e.g. "AuditConfigs") to 4021 // unconditionally include in API requests. By default, fields with 4022 // empty values are omitted from API requests. However, any non-pointer, 4023 // non-interface field appearing in ForceSendFields will be sent to the 4024 // server regardless of whether the field is empty or not. This may be 4025 // used to include empty fields in Patch requests. 4026 ForceSendFields []string `json:"-"` 4027 4028 // NullFields is a list of field names (e.g. "AuditConfigs") to include 4029 // in API requests with the JSON null value. By default, fields with 4030 // empty values are omitted from API requests. However, any field with 4031 // an empty value appearing in NullFields will be sent to the server as 4032 // null. It is an error if a field in this list has a non-empty value. 4033 // This may be used to include null fields in Patch requests. 4034 NullFields []string `json:"-"` 4035} 4036 4037func (s *Policy) MarshalJSON() ([]byte, error) { 4038 type NoMethod Policy 4039 raw := NoMethod(*s) 4040 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4041} 4042 4043// ProgressCounter: ProgressCounter provides counters to describe an 4044// operation's progress. 4045type ProgressCounter struct { 4046 // Failure: The number of units that failed in the operation. 4047 Failure int64 `json:"failure,omitempty,string"` 4048 4049 // Pending: The number of units that are pending in the operation. 4050 Pending int64 `json:"pending,omitempty,string"` 4051 4052 // Success: The number of units that succeeded in the operation. 4053 Success int64 `json:"success,omitempty,string"` 4054 4055 // ForceSendFields is a list of field names (e.g. "Failure") to 4056 // unconditionally include in API requests. By default, fields with 4057 // empty values are omitted from API requests. However, any non-pointer, 4058 // non-interface field appearing in ForceSendFields will be sent to the 4059 // server regardless of whether the field is empty or not. This may be 4060 // used to include empty fields in Patch requests. 4061 ForceSendFields []string `json:"-"` 4062 4063 // NullFields is a list of field names (e.g. "Failure") to include in 4064 // API requests with the JSON null value. By default, fields with empty 4065 // values are omitted from API requests. However, any field with an 4066 // empty value appearing in NullFields will be sent to the server as 4067 // null. It is an error if a field in this list has a non-empty value. 4068 // This may be used to include null fields in Patch requests. 4069 NullFields []string `json:"-"` 4070} 4071 4072func (s *ProgressCounter) MarshalJSON() ([]byte, error) { 4073 type NoMethod ProgressCounter 4074 raw := NoMethod(*s) 4075 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4076} 4077 4078// QueryAccessibleDataRequest: Queries all data_ids that are consented 4079// for a given use in the given consent store and writes them to a 4080// specified destination. The returned Operation includes a progress 4081// counter for the number of User data mappings processed. Errors are 4082// logged to Cloud Logging (see [Viewing error logs in Cloud Logging] 4083// (https://cloud.google.com/healthcare/docs/how-tos/logging) and 4084// [QueryAccessibleData] for a sample log entry). 4085type QueryAccessibleDataRequest struct { 4086 // GcsDestination: The Cloud Storage destination. The Cloud Healthcare 4087 // API service account must have the `roles/storage.objectAdmin` Cloud 4088 // IAM role for this Cloud Storage location. 4089 GcsDestination *GoogleCloudHealthcareV1ConsentGcsDestination `json:"gcsDestination,omitempty"` 4090 4091 // RequestAttributes: The values of request attributes associated with 4092 // this access request. 4093 RequestAttributes map[string]string `json:"requestAttributes,omitempty"` 4094 4095 // ResourceAttributes: Optional. The values of resource attributes 4096 // associated with the type of resources being requested. If no values 4097 // are specified, then all resource types are included in the output. 4098 ResourceAttributes map[string]string `json:"resourceAttributes,omitempty"` 4099 4100 // ForceSendFields is a list of field names (e.g. "GcsDestination") to 4101 // unconditionally include in API requests. By default, fields with 4102 // empty values are omitted from API requests. However, any non-pointer, 4103 // non-interface field appearing in ForceSendFields will be sent to the 4104 // server regardless of whether the field is empty or not. This may be 4105 // used to include empty fields in Patch requests. 4106 ForceSendFields []string `json:"-"` 4107 4108 // NullFields is a list of field names (e.g. "GcsDestination") to 4109 // include in API requests with the JSON null value. By default, fields 4110 // with empty values are omitted from API requests. However, any field 4111 // with an empty value appearing in NullFields will be sent to the 4112 // server as null. It is an error if a field in this list has a 4113 // non-empty value. This may be used to include null fields in Patch 4114 // requests. 4115 NullFields []string `json:"-"` 4116} 4117 4118func (s *QueryAccessibleDataRequest) MarshalJSON() ([]byte, error) { 4119 type NoMethod QueryAccessibleDataRequest 4120 raw := NoMethod(*s) 4121 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4122} 4123 4124// QueryAccessibleDataResponse: Response for successful 4125// QueryAccessibleData operations. This structure is included in the 4126// response upon operation completion. 4127type QueryAccessibleDataResponse struct { 4128 // GcsUris: List of files, each of which contains a list of data_id(s) 4129 // that are consented for a specified use in the request. 4130 GcsUris []string `json:"gcsUris,omitempty"` 4131 4132 // ForceSendFields is a list of field names (e.g. "GcsUris") to 4133 // unconditionally include in API requests. By default, fields with 4134 // empty values are omitted from API requests. However, any non-pointer, 4135 // non-interface field appearing in ForceSendFields will be sent to the 4136 // server regardless of whether the field is empty or not. This may be 4137 // used to include empty fields in Patch requests. 4138 ForceSendFields []string `json:"-"` 4139 4140 // NullFields is a list of field names (e.g. "GcsUris") to include in 4141 // API requests with the JSON null value. By default, fields with empty 4142 // values are omitted from API requests. However, any field with an 4143 // empty value appearing in NullFields will be sent to the server as 4144 // null. It is an error if a field in this list has a non-empty value. 4145 // This may be used to include null fields in Patch requests. 4146 NullFields []string `json:"-"` 4147} 4148 4149func (s *QueryAccessibleDataResponse) MarshalJSON() ([]byte, error) { 4150 type NoMethod QueryAccessibleDataResponse 4151 raw := NoMethod(*s) 4152 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4153} 4154 4155// RedactConfig: Define how to redact sensitive values. Default 4156// behaviour is erase. For example, "My name is Jane." becomes "My name 4157// is ." 4158type RedactConfig struct { 4159} 4160 4161// RejectConsentRequest: Rejects the latest revision of the specified 4162// Consent by committing a new revision with `state` updated to 4163// `REJECTED`. If the latest revision of the given Consent is in the 4164// `REJECTED` state, no new revision is committed. 4165type RejectConsentRequest struct { 4166 // ConsentArtifact: Optional. The resource name of the Consent artifact 4167 // that contains documentation of the user's rejection of the draft 4168 // Consent, of the form 4169 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/c 4170 // onsentStores/{consent_store_id}/consentArtifacts/{consent_artifact_id} 4171 // `. If the draft Consent had a Consent artifact, this Consent artifact 4172 // overwrites it. 4173 ConsentArtifact string `json:"consentArtifact,omitempty"` 4174 4175 // ForceSendFields is a list of field names (e.g. "ConsentArtifact") to 4176 // unconditionally include in API requests. By default, fields with 4177 // empty values are omitted from API requests. However, any non-pointer, 4178 // non-interface field appearing in ForceSendFields will be sent to the 4179 // server regardless of whether the field is empty or not. This may be 4180 // used to include empty fields in Patch requests. 4181 ForceSendFields []string `json:"-"` 4182 4183 // NullFields is a list of field names (e.g. "ConsentArtifact") to 4184 // include in API requests with the JSON null value. By default, fields 4185 // with empty values are omitted from API requests. However, any field 4186 // with an empty value appearing in NullFields will be sent to the 4187 // server as null. It is an error if a field in this list has a 4188 // non-empty value. This may be used to include null fields in Patch 4189 // requests. 4190 NullFields []string `json:"-"` 4191} 4192 4193func (s *RejectConsentRequest) MarshalJSON() ([]byte, error) { 4194 type NoMethod RejectConsentRequest 4195 raw := NoMethod(*s) 4196 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4197} 4198 4199// ReplaceWithInfoTypeConfig: When using the INSPECT_AND_TRANSFORM 4200// action, each match is replaced with the name of the info_type. For 4201// example, "My name is Jane" becomes "My name is [PERSON_NAME]." The 4202// TRANSFORM action is equivalent to redacting. 4203type ReplaceWithInfoTypeConfig struct { 4204} 4205 4206// Resources: A list of FHIR resources. 4207type Resources struct { 4208 // Resources: List of resources IDs. For example, "Patient/1234". 4209 Resources []string `json:"resources,omitempty"` 4210 4211 // ForceSendFields is a list of field names (e.g. "Resources") to 4212 // unconditionally include in API requests. By default, fields with 4213 // empty values are omitted from API requests. However, any non-pointer, 4214 // non-interface field appearing in ForceSendFields will be sent to the 4215 // server regardless of whether the field is empty or not. This may be 4216 // used to include empty fields in Patch requests. 4217 ForceSendFields []string `json:"-"` 4218 4219 // NullFields is a list of field names (e.g. "Resources") to include in 4220 // API requests with the JSON null value. By default, fields with empty 4221 // values are omitted from API requests. However, any field with an 4222 // empty value appearing in NullFields will be sent to the server as 4223 // null. It is an error if a field in this list has a non-empty value. 4224 // This may be used to include null fields in Patch requests. 4225 NullFields []string `json:"-"` 4226} 4227 4228func (s *Resources) MarshalJSON() ([]byte, error) { 4229 type NoMethod Resources 4230 raw := NoMethod(*s) 4231 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4232} 4233 4234// Result: The consent evaluation result for a single `data_id`. 4235type Result struct { 4236 // ConsentDetails: The resource names of all evaluated Consents mapped 4237 // to their evaluation. 4238 ConsentDetails map[string]ConsentEvaluation `json:"consentDetails,omitempty"` 4239 4240 // Consented: Whether the resource is consented for the given use. 4241 Consented bool `json:"consented,omitempty"` 4242 4243 // DataId: The unique identifier of the evaluated resource. 4244 DataId string `json:"dataId,omitempty"` 4245 4246 // ForceSendFields is a list of field names (e.g. "ConsentDetails") to 4247 // unconditionally include in API requests. By default, fields with 4248 // empty values are omitted from API requests. However, any non-pointer, 4249 // non-interface field appearing in ForceSendFields will be sent to the 4250 // server regardless of whether the field is empty or not. This may be 4251 // used to include empty fields in Patch requests. 4252 ForceSendFields []string `json:"-"` 4253 4254 // NullFields is a list of field names (e.g. "ConsentDetails") to 4255 // include in API requests with the JSON null value. By default, fields 4256 // with empty values are omitted from API requests. However, any field 4257 // with an empty value appearing in NullFields will be sent to the 4258 // server as null. It is an error if a field in this list has a 4259 // non-empty value. This may be used to include null fields in Patch 4260 // requests. 4261 NullFields []string `json:"-"` 4262} 4263 4264func (s *Result) MarshalJSON() ([]byte, error) { 4265 type NoMethod Result 4266 raw := NoMethod(*s) 4267 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4268} 4269 4270// RevokeConsentRequest: Revokes the latest revision of the specified 4271// Consent by committing a new revision with `state` updated to 4272// `REVOKED`. If the latest revision of the given Consent is in the 4273// `REVOKED` state, no new revision is committed. 4274type RevokeConsentRequest struct { 4275 // ConsentArtifact: Optional. The resource name of the Consent artifact 4276 // that contains proof of the user's revocation of the Consent, of the 4277 // form 4278 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/c 4279 // onsentStores/{consent_store_id}/consentArtifacts/{consent_artifact_id} 4280 // `. 4281 ConsentArtifact string `json:"consentArtifact,omitempty"` 4282 4283 // ForceSendFields is a list of field names (e.g. "ConsentArtifact") to 4284 // unconditionally include in API requests. By default, fields with 4285 // empty values are omitted from API requests. However, any non-pointer, 4286 // non-interface field appearing in ForceSendFields will be sent to the 4287 // server regardless of whether the field is empty or not. This may be 4288 // used to include empty fields in Patch requests. 4289 ForceSendFields []string `json:"-"` 4290 4291 // NullFields is a list of field names (e.g. "ConsentArtifact") to 4292 // include in API requests with the JSON null value. By default, fields 4293 // with empty values are omitted from API requests. However, any field 4294 // with an empty value appearing in NullFields will be sent to the 4295 // server as null. It is an error if a field in this list has a 4296 // non-empty value. This may be used to include null fields in Patch 4297 // requests. 4298 NullFields []string `json:"-"` 4299} 4300 4301func (s *RevokeConsentRequest) MarshalJSON() ([]byte, error) { 4302 type NoMethod RevokeConsentRequest 4303 raw := NoMethod(*s) 4304 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4305} 4306 4307// SchemaConfig: Configuration for the FHIR BigQuery schema. Determines 4308// how the server generates the schema. 4309type SchemaConfig struct { 4310 // RecursiveStructureDepth: The depth for all recursive structures in 4311 // the output analytics schema. For example, `concept` in the CodeSystem 4312 // resource is a recursive structure; when the depth is 2, the 4313 // CodeSystem table will have a column called `concept.concept` but not 4314 // `concept.concept.concept`. If not specified or set to 0, the server 4315 // will use the default value 2. The maximum depth allowed is 5. 4316 RecursiveStructureDepth int64 `json:"recursiveStructureDepth,omitempty,string"` 4317 4318 // SchemaType: Specifies the output schema type. Schema type is 4319 // required. 4320 // 4321 // Possible values: 4322 // "SCHEMA_TYPE_UNSPECIFIED" - No schema type specified. This type is 4323 // unsupported. 4324 // "ANALYTICS" - Analytics schema defined by the FHIR community. See 4325 // https://github.com/FHIR/sql-on-fhir/blob/master/sql-on-fhir.md. 4326 // BigQuery only allows a maximum of 10,000 columns per table. Due to 4327 // this limitation, the server will not generate schemas for fields of 4328 // type `Resource`, which can hold any resource type. The affected 4329 // fields are `Parameters.parameter.resource`, `Bundle.entry.resource`, 4330 // and `Bundle.entry.response.outcome`. 4331 SchemaType string `json:"schemaType,omitempty"` 4332 4333 // ForceSendFields is a list of field names (e.g. 4334 // "RecursiveStructureDepth") to unconditionally include in API 4335 // requests. By default, fields with empty values are omitted from API 4336 // requests. However, any non-pointer, non-interface field appearing in 4337 // ForceSendFields will be sent to the server regardless of whether the 4338 // field is empty or not. This may be used to include empty fields in 4339 // Patch requests. 4340 ForceSendFields []string `json:"-"` 4341 4342 // NullFields is a list of field names (e.g. "RecursiveStructureDepth") 4343 // to include in API requests with the JSON null value. By default, 4344 // fields with empty values are omitted from API requests. However, any 4345 // field with an empty value appearing in NullFields will be sent to the 4346 // server as null. It is an error if a field in this list has a 4347 // non-empty value. This may be used to include null fields in Patch 4348 // requests. 4349 NullFields []string `json:"-"` 4350} 4351 4352func (s *SchemaConfig) MarshalJSON() ([]byte, error) { 4353 type NoMethod SchemaConfig 4354 raw := NoMethod(*s) 4355 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4356} 4357 4358// SchemaGroup: An HL7v2 logical group construct. 4359type SchemaGroup struct { 4360 // Choice: True indicates that this is a choice group, meaning that only 4361 // one of its segments can exist in a given message. 4362 Choice bool `json:"choice,omitempty"` 4363 4364 // MaxOccurs: The maximum number of times this group can be repeated. 0 4365 // or -1 means unbounded. 4366 MaxOccurs int64 `json:"maxOccurs,omitempty"` 4367 4368 // Members: Nested groups and/or segments. 4369 Members []*GroupOrSegment `json:"members,omitempty"` 4370 4371 // MinOccurs: The minimum number of times this group must be 4372 // present/repeated. 4373 MinOccurs int64 `json:"minOccurs,omitempty"` 4374 4375 // Name: The name of this group. For example, "ORDER_DETAIL". 4376 Name string `json:"name,omitempty"` 4377 4378 // ForceSendFields is a list of field names (e.g. "Choice") to 4379 // unconditionally include in API requests. By default, fields with 4380 // empty values are omitted from API requests. However, any non-pointer, 4381 // non-interface field appearing in ForceSendFields will be sent to the 4382 // server regardless of whether the field is empty or not. This may be 4383 // used to include empty fields in Patch requests. 4384 ForceSendFields []string `json:"-"` 4385 4386 // NullFields is a list of field names (e.g. "Choice") to include in API 4387 // requests with the JSON null value. By default, fields with empty 4388 // values are omitted from API requests. However, any field with an 4389 // empty value appearing in NullFields will be sent to the server as 4390 // null. It is an error if a field in this list has a non-empty value. 4391 // This may be used to include null fields in Patch requests. 4392 NullFields []string `json:"-"` 4393} 4394 4395func (s *SchemaGroup) MarshalJSON() ([]byte, error) { 4396 type NoMethod SchemaGroup 4397 raw := NoMethod(*s) 4398 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4399} 4400 4401// SchemaPackage: A schema package contains a set of schemas and type 4402// definitions. 4403type SchemaPackage struct { 4404 // IgnoreMinOccurs: Flag to ignore all min_occurs restrictions in the 4405 // schema. This means that incoming messages can omit any group, 4406 // segment, field, component, or subcomponent. 4407 IgnoreMinOccurs bool `json:"ignoreMinOccurs,omitempty"` 4408 4409 // Schemas: Schema configs that are layered based on their 4410 // VersionSources that match the incoming message. Schema configs 4411 // present in higher indices override those in lower indices with the 4412 // same message type and trigger event if their VersionSources all match 4413 // an incoming message. 4414 Schemas []*Hl7SchemaConfig `json:"schemas,omitempty"` 4415 4416 // SchematizedParsingType: Determines how messages that fail to parse 4417 // are handled. 4418 // 4419 // Possible values: 4420 // "SCHEMATIZED_PARSING_TYPE_UNSPECIFIED" - Unspecified schematized 4421 // parsing type, equivalent to `SOFT_FAIL`. 4422 // "SOFT_FAIL" - Messages that fail to parse are still stored and 4423 // ACKed but a parser error is stored in place of the schematized data. 4424 // "HARD_FAIL" - Messages that fail to parse are rejected from 4425 // ingestion/insertion and return an error code. 4426 SchematizedParsingType string `json:"schematizedParsingType,omitempty"` 4427 4428 // Types: Schema type definitions that are layered based on their 4429 // VersionSources that match the incoming message. Type definitions 4430 // present in higher indices override those in lower indices with the 4431 // same type name if their VersionSources all match an incoming message. 4432 Types []*Hl7TypesConfig `json:"types,omitempty"` 4433 4434 // ForceSendFields is a list of field names (e.g. "IgnoreMinOccurs") to 4435 // unconditionally include in API requests. By default, fields with 4436 // empty values are omitted from API requests. However, any non-pointer, 4437 // non-interface field appearing in ForceSendFields will be sent to the 4438 // server regardless of whether the field is empty or not. This may be 4439 // used to include empty fields in Patch requests. 4440 ForceSendFields []string `json:"-"` 4441 4442 // NullFields is a list of field names (e.g. "IgnoreMinOccurs") to 4443 // include in API requests with the JSON null value. By default, fields 4444 // with empty values are omitted from API requests. However, any field 4445 // with an empty value appearing in NullFields will be sent to the 4446 // server as null. It is an error if a field in this list has a 4447 // non-empty value. This may be used to include null fields in Patch 4448 // requests. 4449 NullFields []string `json:"-"` 4450} 4451 4452func (s *SchemaPackage) MarshalJSON() ([]byte, error) { 4453 type NoMethod SchemaPackage 4454 raw := NoMethod(*s) 4455 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4456} 4457 4458// SchemaSegment: An HL7v2 Segment. 4459type SchemaSegment struct { 4460 // MaxOccurs: The maximum number of times this segment can be present in 4461 // this group. 0 or -1 means unbounded. 4462 MaxOccurs int64 `json:"maxOccurs,omitempty"` 4463 4464 // MinOccurs: The minimum number of times this segment can be present in 4465 // this group. 4466 MinOccurs int64 `json:"minOccurs,omitempty"` 4467 4468 // Type: The Segment type. For example, "PID". 4469 Type string `json:"type,omitempty"` 4470 4471 // ForceSendFields is a list of field names (e.g. "MaxOccurs") to 4472 // unconditionally include in API requests. By default, fields with 4473 // empty values are omitted from API requests. However, any non-pointer, 4474 // non-interface field appearing in ForceSendFields will be sent to the 4475 // server regardless of whether the field is empty or not. This may be 4476 // used to include empty fields in Patch requests. 4477 ForceSendFields []string `json:"-"` 4478 4479 // NullFields is a list of field names (e.g. "MaxOccurs") to include in 4480 // API requests with the JSON null value. By default, fields with empty 4481 // values are omitted from API requests. However, any field with an 4482 // empty value appearing in NullFields will be sent to the server as 4483 // null. It is an error if a field in this list has a non-empty value. 4484 // This may be used to include null fields in Patch requests. 4485 NullFields []string `json:"-"` 4486} 4487 4488func (s *SchemaSegment) MarshalJSON() ([]byte, error) { 4489 type NoMethod SchemaSegment 4490 raw := NoMethod(*s) 4491 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4492} 4493 4494// SchematizedData: The content of an HL7v2 message in a structured 4495// format as specified by a schema. 4496type SchematizedData struct { 4497 // Data: JSON output of the parser. 4498 Data string `json:"data,omitempty"` 4499 4500 // Error: The error output of the parser. 4501 Error string `json:"error,omitempty"` 4502 4503 // ForceSendFields is a list of field names (e.g. "Data") to 4504 // unconditionally include in API requests. By default, fields with 4505 // empty values are omitted from API requests. However, any non-pointer, 4506 // non-interface field appearing in ForceSendFields will be sent to the 4507 // server regardless of whether the field is empty or not. This may be 4508 // used to include empty fields in Patch requests. 4509 ForceSendFields []string `json:"-"` 4510 4511 // NullFields is a list of field names (e.g. "Data") to include in API 4512 // requests with the JSON null value. By default, fields with empty 4513 // values are omitted from API requests. However, any field with an 4514 // empty value appearing in NullFields will be sent to the server as 4515 // null. It is an error if a field in this list has a non-empty value. 4516 // This may be used to include null fields in Patch requests. 4517 NullFields []string `json:"-"` 4518} 4519 4520func (s *SchematizedData) MarshalJSON() ([]byte, error) { 4521 type NoMethod SchematizedData 4522 raw := NoMethod(*s) 4523 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4524} 4525 4526// SearchResourcesRequest: Request to search the resources in the 4527// specified FHIR store. 4528type SearchResourcesRequest struct { 4529 // ResourceType: The FHIR resource type to search, such as Patient or 4530 // Observation. For a complete list, see the FHIR Resource Index (DSTU2 4531 // (http://hl7.org/implement/standards/fhir/DSTU2/resourcelist.html), 4532 // STU3 4533 // (http://hl7.org/implement/standards/fhir/STU3/resourcelist.html), R4 4534 // (http://hl7.org/implement/standards/fhir/R4/resourcelist.html)). 4535 ResourceType string `json:"resourceType,omitempty"` 4536 4537 // ForceSendFields is a list of field names (e.g. "ResourceType") to 4538 // unconditionally include in API requests. By default, fields with 4539 // empty values are omitted from API requests. However, any non-pointer, 4540 // non-interface field appearing in ForceSendFields will be sent to the 4541 // server regardless of whether the field is empty or not. This may be 4542 // used to include empty fields in Patch requests. 4543 ForceSendFields []string `json:"-"` 4544 4545 // NullFields is a list of field names (e.g. "ResourceType") to include 4546 // in API requests with the JSON null value. By default, fields with 4547 // empty values are omitted from API requests. However, any field with 4548 // an empty value appearing in NullFields will be sent to the server as 4549 // null. It is an error if a field in this list has a non-empty value. 4550 // This may be used to include null fields in Patch requests. 4551 NullFields []string `json:"-"` 4552} 4553 4554func (s *SearchResourcesRequest) MarshalJSON() ([]byte, error) { 4555 type NoMethod SearchResourcesRequest 4556 raw := NoMethod(*s) 4557 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4558} 4559 4560// Segment: A segment in a structured format. 4561type Segment struct { 4562 // Fields: A mapping from the positional location to the value. The key 4563 // string uses zero-based indexes separated by dots to identify Fields, 4564 // components and sub-components. A bracket notation is also used to 4565 // identify different instances of a repeated field. Regex for key: 4566 // (\d+)(\[\d+\])?(.\d+)?(.\d+)? Examples of (key, value) pairs: * (0.1, 4567 // "hemoglobin") denotes that the first component of Field 0 has the 4568 // value "hemoglobin". * (1.1.2, "CBC") denotes that the second 4569 // sub-component of the first component of Field 1 has the value "CBC". 4570 // * (1[0].1, "HbA1c") denotes that the first component of the first 4571 // Instance of Field 1, which is repeated, has the value "HbA1c". 4572 Fields map[string]string `json:"fields,omitempty"` 4573 4574 // SegmentId: A string that indicates the type of segment. For example, 4575 // EVN or PID. 4576 SegmentId string `json:"segmentId,omitempty"` 4577 4578 // SetId: Set ID for segments that can be in a set. This can be empty if 4579 // it's missing or isn't applicable. 4580 SetId string `json:"setId,omitempty"` 4581 4582 // ForceSendFields is a list of field names (e.g. "Fields") to 4583 // unconditionally include in API requests. By default, fields with 4584 // empty values are omitted from API requests. However, any non-pointer, 4585 // non-interface field appearing in ForceSendFields will be sent to the 4586 // server regardless of whether the field is empty or not. This may be 4587 // used to include empty fields in Patch requests. 4588 ForceSendFields []string `json:"-"` 4589 4590 // NullFields is a list of field names (e.g. "Fields") to include in API 4591 // requests with the JSON null value. By default, fields with empty 4592 // values are omitted from API requests. However, any field with an 4593 // empty value appearing in NullFields will be sent to the server as 4594 // null. It is an error if a field in this list has a non-empty value. 4595 // This may be used to include null fields in Patch requests. 4596 NullFields []string `json:"-"` 4597} 4598 4599func (s *Segment) MarshalJSON() ([]byte, error) { 4600 type NoMethod Segment 4601 raw := NoMethod(*s) 4602 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4603} 4604 4605// SetIamPolicyRequest: Request message for `SetIamPolicy` method. 4606type SetIamPolicyRequest struct { 4607 // Policy: REQUIRED: The complete policy to be applied to the 4608 // `resource`. The size of the policy is limited to a few 10s of KB. An 4609 // empty policy is a valid policy but certain Cloud Platform services 4610 // (such as Projects) might reject them. 4611 Policy *Policy `json:"policy,omitempty"` 4612 4613 // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the 4614 // policy to modify. Only the fields in the mask will be modified. If no 4615 // mask is provided, the following default mask is used: `paths: 4616 // "bindings, etag" 4617 UpdateMask string `json:"updateMask,omitempty"` 4618 4619 // ForceSendFields is a list of field names (e.g. "Policy") to 4620 // unconditionally include in API requests. By default, fields with 4621 // empty values are omitted from API requests. However, any non-pointer, 4622 // non-interface field appearing in ForceSendFields will be sent to the 4623 // server regardless of whether the field is empty or not. This may be 4624 // used to include empty fields in Patch requests. 4625 ForceSendFields []string `json:"-"` 4626 4627 // NullFields is a list of field names (e.g. "Policy") to include in API 4628 // requests with the JSON null value. By default, fields with empty 4629 // values are omitted from API requests. However, any field with an 4630 // empty value appearing in NullFields will be sent to the server as 4631 // null. It is an error if a field in this list has a non-empty value. 4632 // This may be used to include null fields in Patch requests. 4633 NullFields []string `json:"-"` 4634} 4635 4636func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { 4637 type NoMethod SetIamPolicyRequest 4638 raw := NoMethod(*s) 4639 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4640} 4641 4642// Signature: User signature. 4643type Signature struct { 4644 // Image: Optional. An image of the user's signature. 4645 Image *Image `json:"image,omitempty"` 4646 4647 // Metadata: Optional. Metadata associated with the user's signature. 4648 // For example, the user's name or the user's title. 4649 Metadata map[string]string `json:"metadata,omitempty"` 4650 4651 // SignatureTime: Optional. Timestamp of the signature. 4652 SignatureTime string `json:"signatureTime,omitempty"` 4653 4654 // UserId: Required. User's UUID provided by the client. 4655 UserId string `json:"userId,omitempty"` 4656 4657 // ForceSendFields is a list of field names (e.g. "Image") to 4658 // unconditionally include in API requests. By default, fields with 4659 // empty values are omitted from API requests. However, any non-pointer, 4660 // non-interface field appearing in ForceSendFields will be sent to the 4661 // server regardless of whether the field is empty or not. This may be 4662 // used to include empty fields in Patch requests. 4663 ForceSendFields []string `json:"-"` 4664 4665 // NullFields is a list of field names (e.g. "Image") to include in API 4666 // requests with the JSON null value. By default, fields with empty 4667 // values are omitted from API requests. However, any field with an 4668 // empty value appearing in NullFields will be sent to the server as 4669 // null. It is an error if a field in this list has a non-empty value. 4670 // This may be used to include null fields in Patch requests. 4671 NullFields []string `json:"-"` 4672} 4673 4674func (s *Signature) MarshalJSON() ([]byte, error) { 4675 type NoMethod Signature 4676 raw := NoMethod(*s) 4677 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4678} 4679 4680// Status: The `Status` type defines a logical error model that is 4681// suitable for different programming environments, including REST APIs 4682// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each 4683// `Status` message contains three pieces of data: error code, error 4684// message, and error details. You can find out more about this error 4685// model and how to work with it in the API Design Guide 4686// (https://cloud.google.com/apis/design/errors). 4687type Status struct { 4688 // Code: The status code, which should be an enum value of 4689 // google.rpc.Code. 4690 Code int64 `json:"code,omitempty"` 4691 4692 // Details: A list of messages that carry the error details. There is a 4693 // common set of message types for APIs to use. 4694 Details []googleapi.RawMessage `json:"details,omitempty"` 4695 4696 // Message: A developer-facing error message, which should be in 4697 // English. Any user-facing error message should be localized and sent 4698 // in the google.rpc.Status.details field, or localized by the client. 4699 Message string `json:"message,omitempty"` 4700 4701 // ForceSendFields is a list of field names (e.g. "Code") to 4702 // unconditionally include in API requests. By default, fields with 4703 // empty values are omitted from API requests. However, any non-pointer, 4704 // non-interface field appearing in ForceSendFields will be sent to the 4705 // server regardless of whether the field is empty or not. This may be 4706 // used to include empty fields in Patch requests. 4707 ForceSendFields []string `json:"-"` 4708 4709 // NullFields is a list of field names (e.g. "Code") to include in API 4710 // requests with the JSON null value. By default, fields with empty 4711 // values are omitted from API requests. However, any field with an 4712 // empty value appearing in NullFields will be sent to the server as 4713 // null. It is an error if a field in this list has a non-empty value. 4714 // This may be used to include null fields in Patch requests. 4715 NullFields []string `json:"-"` 4716} 4717 4718func (s *Status) MarshalJSON() ([]byte, error) { 4719 type NoMethod Status 4720 raw := NoMethod(*s) 4721 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4722} 4723 4724// StreamConfig: Contains configuration for streaming FHIR export. 4725type StreamConfig struct { 4726 // BigqueryDestination: The destination BigQuery structure that contains 4727 // both the dataset location and corresponding schema config. The output 4728 // is organized in one table per resource type. The server reuses the 4729 // existing tables (if any) that are named after the resource types. For 4730 // example, "Patient", "Observation". When there is no existing table 4731 // for a given resource type, the server attempts to create one. When a 4732 // table schema doesn't align with the schema config, either because of 4733 // existing incompatible schema or out of band incompatible 4734 // modification, the server does not stream in new data. BigQuery 4735 // imposes a 1 MB limit on streaming insert row size, therefore any 4736 // resource mutation that generates more than 1 MB of BigQuery data is 4737 // not streamed. One resolution in this case is to delete the 4738 // incompatible table and let the server recreate one, though the newly 4739 // created table only contains data after the table recreation. Results 4740 // are appended to the corresponding BigQuery tables. Different versions 4741 // of the same resource are distinguishable by the meta.versionId and 4742 // meta.lastUpdated columns. The operation (CREATE/UPDATE/DELETE) that 4743 // results in the new version is recorded in the meta.tag. The tables 4744 // contain all historical resource versions since streaming was enabled. 4745 // For query convenience, the server also creates one view per table of 4746 // the same name containing only the current resource version. The 4747 // streamed data in the BigQuery dataset is not guaranteed to be 4748 // completely unique. The combination of the id and meta.versionId 4749 // columns should ideally identify a single unique row. But in rare 4750 // cases, duplicates may exist. At query time, users may use the SQL 4751 // select statement to keep only one of the duplicate rows given an id 4752 // and meta.versionId pair. Alternatively, the server created view 4753 // mentioned above also filters out duplicates. If a resource mutation 4754 // cannot be streamed to BigQuery, errors are logged to Cloud Logging. 4755 // For more information, see Viewing error logs in Cloud Logging 4756 // (https://cloud.google.com/healthcare/docs/how-tos/logging)). 4757 BigqueryDestination *GoogleCloudHealthcareV1FhirBigQueryDestination `json:"bigqueryDestination,omitempty"` 4758 4759 // ResourceTypes: Supply a FHIR resource type (such as "Patient" or 4760 // "Observation"). See 4761 // https://www.hl7.org/fhir/valueset-resource-types.html for a list of 4762 // all FHIR resource types. The server treats an empty list as an intent 4763 // to stream all the supported resource types in this FHIR store. 4764 ResourceTypes []string `json:"resourceTypes,omitempty"` 4765 4766 // ForceSendFields is a list of field names (e.g. "BigqueryDestination") 4767 // to unconditionally include in API requests. By default, fields with 4768 // empty values are omitted from API requests. However, any non-pointer, 4769 // non-interface field appearing in ForceSendFields will be sent to the 4770 // server regardless of whether the field is empty or not. This may be 4771 // used to include empty fields in Patch requests. 4772 ForceSendFields []string `json:"-"` 4773 4774 // NullFields is a list of field names (e.g. "BigqueryDestination") to 4775 // include in API requests with the JSON null value. By default, fields 4776 // with empty values are omitted from API requests. However, any field 4777 // with an empty value appearing in NullFields will be sent to the 4778 // server as null. It is an error if a field in this list has a 4779 // non-empty value. This may be used to include null fields in Patch 4780 // requests. 4781 NullFields []string `json:"-"` 4782} 4783 4784func (s *StreamConfig) MarshalJSON() ([]byte, error) { 4785 type NoMethod StreamConfig 4786 raw := NoMethod(*s) 4787 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4788} 4789 4790// TagFilterList: List of tags to be filtered. 4791type TagFilterList struct { 4792 // Tags: Tags to be filtered. Tags must be DICOM Data Elements, File 4793 // Meta Elements, or Directory Structuring Elements, as defined at: 4794 // http://dicom.nema.org/medical/dicom/current/output/html/part06.html#table_6-1,. 4795 // They may be provided by "Keyword" or "Tag". For example "PatientID", 4796 // "00100010". 4797 Tags []string `json:"tags,omitempty"` 4798 4799 // ForceSendFields is a list of field names (e.g. "Tags") to 4800 // unconditionally include in API requests. By default, fields with 4801 // empty values are omitted from API requests. However, any non-pointer, 4802 // non-interface field appearing in ForceSendFields will be sent to the 4803 // server regardless of whether the field is empty or not. This may be 4804 // used to include empty fields in Patch requests. 4805 ForceSendFields []string `json:"-"` 4806 4807 // NullFields is a list of field names (e.g. "Tags") to include in API 4808 // requests with the JSON null value. By default, fields with empty 4809 // values are omitted from API requests. However, any field with an 4810 // empty value appearing in NullFields will be sent to the server as 4811 // null. It is an error if a field in this list has a non-empty value. 4812 // This may be used to include null fields in Patch requests. 4813 NullFields []string `json:"-"` 4814} 4815 4816func (s *TagFilterList) MarshalJSON() ([]byte, error) { 4817 type NoMethod TagFilterList 4818 raw := NoMethod(*s) 4819 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4820} 4821 4822// TestIamPermissionsRequest: Request message for `TestIamPermissions` 4823// method. 4824type TestIamPermissionsRequest struct { 4825 // Permissions: The set of permissions to check for the `resource`. 4826 // Permissions with wildcards (such as '*' or 'storage.*') are not 4827 // allowed. For more information see IAM Overview 4828 // (https://cloud.google.com/iam/docs/overview#permissions). 4829 Permissions []string `json:"permissions,omitempty"` 4830 4831 // ForceSendFields is a list of field names (e.g. "Permissions") to 4832 // unconditionally include in API requests. By default, fields with 4833 // empty values are omitted from API requests. However, any non-pointer, 4834 // non-interface field appearing in ForceSendFields will be sent to the 4835 // server regardless of whether the field is empty or not. This may be 4836 // used to include empty fields in Patch requests. 4837 ForceSendFields []string `json:"-"` 4838 4839 // NullFields is a list of field names (e.g. "Permissions") to include 4840 // in API requests with the JSON null value. By default, fields with 4841 // empty values are omitted from API requests. However, any field with 4842 // an empty value appearing in NullFields will be sent to the server as 4843 // null. It is an error if a field in this list has a non-empty value. 4844 // This may be used to include null fields in Patch requests. 4845 NullFields []string `json:"-"` 4846} 4847 4848func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { 4849 type NoMethod TestIamPermissionsRequest 4850 raw := NoMethod(*s) 4851 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4852} 4853 4854// TestIamPermissionsResponse: Response message for `TestIamPermissions` 4855// method. 4856type TestIamPermissionsResponse struct { 4857 // Permissions: A subset of `TestPermissionsRequest.permissions` that 4858 // the caller is allowed. 4859 Permissions []string `json:"permissions,omitempty"` 4860 4861 // ServerResponse contains the HTTP response code and headers from the 4862 // server. 4863 googleapi.ServerResponse `json:"-"` 4864 4865 // ForceSendFields is a list of field names (e.g. "Permissions") to 4866 // unconditionally include in API requests. By default, fields with 4867 // empty values are omitted from API requests. However, any non-pointer, 4868 // non-interface field appearing in ForceSendFields will be sent to the 4869 // server regardless of whether the field is empty or not. This may be 4870 // used to include empty fields in Patch requests. 4871 ForceSendFields []string `json:"-"` 4872 4873 // NullFields is a list of field names (e.g. "Permissions") to include 4874 // in API requests with the JSON null value. By default, fields with 4875 // empty values are omitted from API requests. However, any field with 4876 // an empty value appearing in NullFields will be sent to the server as 4877 // null. It is an error if a field in this list has a non-empty value. 4878 // This may be used to include null fields in Patch requests. 4879 NullFields []string `json:"-"` 4880} 4881 4882func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { 4883 type NoMethod TestIamPermissionsResponse 4884 raw := NoMethod(*s) 4885 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4886} 4887 4888type TextConfig struct { 4889 // Transformations: The transformations to apply to the detected data. 4890 Transformations []*InfoTypeTransformation `json:"transformations,omitempty"` 4891 4892 // ForceSendFields is a list of field names (e.g. "Transformations") to 4893 // unconditionally include in API requests. By default, fields with 4894 // empty values are omitted from API requests. However, any non-pointer, 4895 // non-interface field appearing in ForceSendFields will be sent to the 4896 // server regardless of whether the field is empty or not. This may be 4897 // used to include empty fields in Patch requests. 4898 ForceSendFields []string `json:"-"` 4899 4900 // NullFields is a list of field names (e.g. "Transformations") to 4901 // include in API requests with the JSON null value. By default, fields 4902 // with empty values are omitted from API requests. However, any field 4903 // with an empty value appearing in NullFields will be sent to the 4904 // server as null. It is an error if a field in this list has a 4905 // non-empty value. This may be used to include null fields in Patch 4906 // requests. 4907 NullFields []string `json:"-"` 4908} 4909 4910func (s *TextConfig) MarshalJSON() ([]byte, error) { 4911 type NoMethod TextConfig 4912 raw := NoMethod(*s) 4913 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4914} 4915 4916// Type: A type definition for some HL7v2 type (incl. Segments and 4917// Datatypes). 4918type Type struct { 4919 // Fields: The (sub) fields this type has (if not primitive). 4920 Fields []*Field `json:"fields,omitempty"` 4921 4922 // Name: The name of this type. This would be the segment or datatype 4923 // name. For example, "PID" or "XPN". 4924 Name string `json:"name,omitempty"` 4925 4926 // Primitive: If this is a primitive type then this field is the type of 4927 // the primitive For example, STRING. Leave unspecified for composite 4928 // types. 4929 // 4930 // Possible values: 4931 // "PRIMITIVE_UNSPECIFIED" - Not a primitive. 4932 // "STRING" - String primitive. 4933 // "VARIES" - Element that can have unschematized children. 4934 // "UNESCAPED_STRING" - Like STRING, but all delimiters below this 4935 // element are ignored. 4936 Primitive string `json:"primitive,omitempty"` 4937 4938 // ForceSendFields is a list of field names (e.g. "Fields") to 4939 // unconditionally include in API requests. By default, fields with 4940 // empty values are omitted from API requests. However, any non-pointer, 4941 // non-interface field appearing in ForceSendFields will be sent to the 4942 // server regardless of whether the field is empty or not. This may be 4943 // used to include empty fields in Patch requests. 4944 ForceSendFields []string `json:"-"` 4945 4946 // NullFields is a list of field names (e.g. "Fields") to include in API 4947 // requests with the JSON null value. By default, fields with empty 4948 // values are omitted from API requests. However, any field with an 4949 // empty value appearing in NullFields will be sent to the server as 4950 // null. It is an error if a field in this list has a non-empty value. 4951 // This may be used to include null fields in Patch requests. 4952 NullFields []string `json:"-"` 4953} 4954 4955func (s *Type) MarshalJSON() ([]byte, error) { 4956 type NoMethod Type 4957 raw := NoMethod(*s) 4958 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4959} 4960 4961// UserDataMapping: Maps a resource to the associated user and 4962// Attributes. 4963type UserDataMapping struct { 4964 // ArchiveTime: Output only. Indicates the time when this mapping was 4965 // archived. 4966 ArchiveTime string `json:"archiveTime,omitempty"` 4967 4968 // Archived: Output only. Indicates whether this mapping is archived. 4969 Archived bool `json:"archived,omitempty"` 4970 4971 // DataId: Required. A unique identifier for the mapped resource. 4972 DataId string `json:"dataId,omitempty"` 4973 4974 // Name: Resource name of the User data mapping, of the form 4975 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/c 4976 // onsentStores/{consent_store_id}/userDataMappings/{user_data_mapping_id 4977 // }`. 4978 Name string `json:"name,omitempty"` 4979 4980 // ResourceAttributes: Attributes of the resource. Only explicitly set 4981 // attributes are displayed here. Attribute definitions with defaults 4982 // set implicitly apply to these User data mappings. Attributes listed 4983 // here must be single valued, that is, exactly one value is specified 4984 // for the field "values" in each Attribute. 4985 ResourceAttributes []*Attribute `json:"resourceAttributes,omitempty"` 4986 4987 // UserId: Required. User's UUID provided by the client. 4988 UserId string `json:"userId,omitempty"` 4989 4990 // ServerResponse contains the HTTP response code and headers from the 4991 // server. 4992 googleapi.ServerResponse `json:"-"` 4993 4994 // ForceSendFields is a list of field names (e.g. "ArchiveTime") to 4995 // unconditionally include in API requests. By default, fields with 4996 // empty values are omitted from API requests. However, any non-pointer, 4997 // non-interface field appearing in ForceSendFields will be sent to the 4998 // server regardless of whether the field is empty or not. This may be 4999 // used to include empty fields in Patch requests. 5000 ForceSendFields []string `json:"-"` 5001 5002 // NullFields is a list of field names (e.g. "ArchiveTime") to include 5003 // in API requests with the JSON null value. By default, fields with 5004 // empty values are omitted from API requests. However, any field with 5005 // an empty value appearing in NullFields will be sent to the server as 5006 // null. It is an error if a field in this list has a non-empty value. 5007 // This may be used to include null fields in Patch requests. 5008 NullFields []string `json:"-"` 5009} 5010 5011func (s *UserDataMapping) MarshalJSON() ([]byte, error) { 5012 type NoMethod UserDataMapping 5013 raw := NoMethod(*s) 5014 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5015} 5016 5017// VersionSource: Describes a selector for extracting and matching an 5018// MSH field to a value. 5019type VersionSource struct { 5020 // MshField: The field to extract from the MSH segment. For example, 5021 // "3.1" or "18[1].1". 5022 MshField string `json:"mshField,omitempty"` 5023 5024 // Value: The value to match with the field. For example, "My 5025 // Application Name" or "2.3". 5026 Value string `json:"value,omitempty"` 5027 5028 // ForceSendFields is a list of field names (e.g. "MshField") to 5029 // unconditionally include in API requests. By default, fields with 5030 // empty values are omitted from API requests. However, any non-pointer, 5031 // non-interface field appearing in ForceSendFields will be sent to the 5032 // server regardless of whether the field is empty or not. This may be 5033 // used to include empty fields in Patch requests. 5034 ForceSendFields []string `json:"-"` 5035 5036 // NullFields is a list of field names (e.g. "MshField") to include in 5037 // API requests with the JSON null value. By default, fields with empty 5038 // values are omitted from API requests. However, any field with an 5039 // empty value appearing in NullFields will be sent to the server as 5040 // null. It is an error if a field in this list has a non-empty value. 5041 // This may be used to include null fields in Patch requests. 5042 NullFields []string `json:"-"` 5043} 5044 5045func (s *VersionSource) MarshalJSON() ([]byte, error) { 5046 type NoMethod VersionSource 5047 raw := NoMethod(*s) 5048 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5049} 5050 5051// method id "healthcare.projects.locations.get": 5052 5053type ProjectsLocationsGetCall struct { 5054 s *Service 5055 name string 5056 urlParams_ gensupport.URLParams 5057 ifNoneMatch_ string 5058 ctx_ context.Context 5059 header_ http.Header 5060} 5061 5062// Get: Gets information about a location. 5063// 5064// - name: Resource name for the location. 5065func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { 5066 c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5067 c.name = name 5068 return c 5069} 5070 5071// Fields allows partial responses to be retrieved. See 5072// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5073// for more information. 5074func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { 5075 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5076 return c 5077} 5078 5079// IfNoneMatch sets the optional parameter which makes the operation 5080// fail if the object's ETag matches the given value. This is useful for 5081// getting updates only after the object has changed since the last 5082// request. Use googleapi.IsNotModified to check whether the response 5083// error from Do is the result of In-None-Match. 5084func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { 5085 c.ifNoneMatch_ = entityTag 5086 return c 5087} 5088 5089// Context sets the context to be used in this call's Do method. Any 5090// pending HTTP request will be aborted if the provided context is 5091// canceled. 5092func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { 5093 c.ctx_ = ctx 5094 return c 5095} 5096 5097// Header returns an http.Header that can be modified by the caller to 5098// add HTTP headers to the request. 5099func (c *ProjectsLocationsGetCall) Header() http.Header { 5100 if c.header_ == nil { 5101 c.header_ = make(http.Header) 5102 } 5103 return c.header_ 5104} 5105 5106func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { 5107 reqHeaders := make(http.Header) 5108 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 5109 for k, v := range c.header_ { 5110 reqHeaders[k] = v 5111 } 5112 reqHeaders.Set("User-Agent", c.s.userAgent()) 5113 if c.ifNoneMatch_ != "" { 5114 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5115 } 5116 var body io.Reader = nil 5117 c.urlParams_.Set("alt", alt) 5118 c.urlParams_.Set("prettyPrint", "false") 5119 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 5120 urls += "?" + c.urlParams_.Encode() 5121 req, err := http.NewRequest("GET", urls, body) 5122 if err != nil { 5123 return nil, err 5124 } 5125 req.Header = reqHeaders 5126 googleapi.Expand(req.URL, map[string]string{ 5127 "name": c.name, 5128 }) 5129 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5130} 5131 5132// Do executes the "healthcare.projects.locations.get" call. 5133// Exactly one of *Location or error will be non-nil. Any non-2xx status 5134// code is an error. Response headers are in either 5135// *Location.ServerResponse.Header or (if a response was returned at 5136// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 5137// to check whether the returned error was because 5138// http.StatusNotModified was returned. 5139func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { 5140 gensupport.SetOptions(c.urlParams_, opts...) 5141 res, err := c.doRequest("json") 5142 if res != nil && res.StatusCode == http.StatusNotModified { 5143 if res.Body != nil { 5144 res.Body.Close() 5145 } 5146 return nil, &googleapi.Error{ 5147 Code: res.StatusCode, 5148 Header: res.Header, 5149 } 5150 } 5151 if err != nil { 5152 return nil, err 5153 } 5154 defer googleapi.CloseBody(res) 5155 if err := googleapi.CheckResponse(res); err != nil { 5156 return nil, err 5157 } 5158 ret := &Location{ 5159 ServerResponse: googleapi.ServerResponse{ 5160 Header: res.Header, 5161 HTTPStatusCode: res.StatusCode, 5162 }, 5163 } 5164 target := &ret 5165 if err := gensupport.DecodeResponse(target, res); err != nil { 5166 return nil, err 5167 } 5168 return ret, nil 5169 // { 5170 // "description": "Gets information about a location.", 5171 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", 5172 // "httpMethod": "GET", 5173 // "id": "healthcare.projects.locations.get", 5174 // "parameterOrder": [ 5175 // "name" 5176 // ], 5177 // "parameters": { 5178 // "name": { 5179 // "description": "Resource name for the location.", 5180 // "location": "path", 5181 // "pattern": "^projects/[^/]+/locations/[^/]+$", 5182 // "required": true, 5183 // "type": "string" 5184 // } 5185 // }, 5186 // "path": "v1/{+name}", 5187 // "response": { 5188 // "$ref": "Location" 5189 // }, 5190 // "scopes": [ 5191 // "https://www.googleapis.com/auth/cloud-platform" 5192 // ] 5193 // } 5194 5195} 5196 5197// method id "healthcare.projects.locations.list": 5198 5199type ProjectsLocationsListCall struct { 5200 s *Service 5201 name string 5202 urlParams_ gensupport.URLParams 5203 ifNoneMatch_ string 5204 ctx_ context.Context 5205 header_ http.Header 5206} 5207 5208// List: Lists information about the supported locations for this 5209// service. 5210// 5211// - name: The resource that owns the locations collection, if 5212// applicable. 5213func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { 5214 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5215 c.name = name 5216 return c 5217} 5218 5219// Filter sets the optional parameter "filter": A filter to narrow down 5220// results to a preferred subset. The filtering language accepts strings 5221// like "displayName=tokyo", and is documented in more detail in AIP-160 5222// (https://google.aip.dev/160). 5223func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { 5224 c.urlParams_.Set("filter", filter) 5225 return c 5226} 5227 5228// PageSize sets the optional parameter "pageSize": The maximum number 5229// of results to return. If not set, the service selects a default. 5230func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { 5231 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 5232 return c 5233} 5234 5235// PageToken sets the optional parameter "pageToken": A page token 5236// received from the `next_page_token` field in the response. Send that 5237// page token to receive the subsequent page. 5238func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { 5239 c.urlParams_.Set("pageToken", pageToken) 5240 return c 5241} 5242 5243// Fields allows partial responses to be retrieved. See 5244// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5245// for more information. 5246func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { 5247 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5248 return c 5249} 5250 5251// IfNoneMatch sets the optional parameter which makes the operation 5252// fail if the object's ETag matches the given value. This is useful for 5253// getting updates only after the object has changed since the last 5254// request. Use googleapi.IsNotModified to check whether the response 5255// error from Do is the result of In-None-Match. 5256func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { 5257 c.ifNoneMatch_ = entityTag 5258 return c 5259} 5260 5261// Context sets the context to be used in this call's Do method. Any 5262// pending HTTP request will be aborted if the provided context is 5263// canceled. 5264func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { 5265 c.ctx_ = ctx 5266 return c 5267} 5268 5269// Header returns an http.Header that can be modified by the caller to 5270// add HTTP headers to the request. 5271func (c *ProjectsLocationsListCall) Header() http.Header { 5272 if c.header_ == nil { 5273 c.header_ = make(http.Header) 5274 } 5275 return c.header_ 5276} 5277 5278func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { 5279 reqHeaders := make(http.Header) 5280 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 5281 for k, v := range c.header_ { 5282 reqHeaders[k] = v 5283 } 5284 reqHeaders.Set("User-Agent", c.s.userAgent()) 5285 if c.ifNoneMatch_ != "" { 5286 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5287 } 5288 var body io.Reader = nil 5289 c.urlParams_.Set("alt", alt) 5290 c.urlParams_.Set("prettyPrint", "false") 5291 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations") 5292 urls += "?" + c.urlParams_.Encode() 5293 req, err := http.NewRequest("GET", urls, body) 5294 if err != nil { 5295 return nil, err 5296 } 5297 req.Header = reqHeaders 5298 googleapi.Expand(req.URL, map[string]string{ 5299 "name": c.name, 5300 }) 5301 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5302} 5303 5304// Do executes the "healthcare.projects.locations.list" call. 5305// Exactly one of *ListLocationsResponse or error will be non-nil. Any 5306// non-2xx status code is an error. Response headers are in either 5307// *ListLocationsResponse.ServerResponse.Header or (if a response was 5308// returned at all) in error.(*googleapi.Error).Header. Use 5309// googleapi.IsNotModified to check whether the returned error was 5310// because http.StatusNotModified was returned. 5311func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { 5312 gensupport.SetOptions(c.urlParams_, opts...) 5313 res, err := c.doRequest("json") 5314 if res != nil && res.StatusCode == http.StatusNotModified { 5315 if res.Body != nil { 5316 res.Body.Close() 5317 } 5318 return nil, &googleapi.Error{ 5319 Code: res.StatusCode, 5320 Header: res.Header, 5321 } 5322 } 5323 if err != nil { 5324 return nil, err 5325 } 5326 defer googleapi.CloseBody(res) 5327 if err := googleapi.CheckResponse(res); err != nil { 5328 return nil, err 5329 } 5330 ret := &ListLocationsResponse{ 5331 ServerResponse: googleapi.ServerResponse{ 5332 Header: res.Header, 5333 HTTPStatusCode: res.StatusCode, 5334 }, 5335 } 5336 target := &ret 5337 if err := gensupport.DecodeResponse(target, res); err != nil { 5338 return nil, err 5339 } 5340 return ret, nil 5341 // { 5342 // "description": "Lists information about the supported locations for this service.", 5343 // "flatPath": "v1/projects/{projectsId}/locations", 5344 // "httpMethod": "GET", 5345 // "id": "healthcare.projects.locations.list", 5346 // "parameterOrder": [ 5347 // "name" 5348 // ], 5349 // "parameters": { 5350 // "filter": { 5351 // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like \"displayName=tokyo\", and is documented in more detail in [AIP-160](https://google.aip.dev/160).", 5352 // "location": "query", 5353 // "type": "string" 5354 // }, 5355 // "name": { 5356 // "description": "The resource that owns the locations collection, if applicable.", 5357 // "location": "path", 5358 // "pattern": "^projects/[^/]+$", 5359 // "required": true, 5360 // "type": "string" 5361 // }, 5362 // "pageSize": { 5363 // "description": "The maximum number of results to return. If not set, the service selects a default.", 5364 // "format": "int32", 5365 // "location": "query", 5366 // "type": "integer" 5367 // }, 5368 // "pageToken": { 5369 // "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", 5370 // "location": "query", 5371 // "type": "string" 5372 // } 5373 // }, 5374 // "path": "v1/{+name}/locations", 5375 // "response": { 5376 // "$ref": "ListLocationsResponse" 5377 // }, 5378 // "scopes": [ 5379 // "https://www.googleapis.com/auth/cloud-platform" 5380 // ] 5381 // } 5382 5383} 5384 5385// Pages invokes f for each page of results. 5386// A non-nil error returned from f will halt the iteration. 5387// The provided context supersedes any context provided to the Context method. 5388func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { 5389 c.ctx_ = ctx 5390 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 5391 for { 5392 x, err := c.Do() 5393 if err != nil { 5394 return err 5395 } 5396 if err := f(x); err != nil { 5397 return err 5398 } 5399 if x.NextPageToken == "" { 5400 return nil 5401 } 5402 c.PageToken(x.NextPageToken) 5403 } 5404} 5405 5406// method id "healthcare.projects.locations.datasets.create": 5407 5408type ProjectsLocationsDatasetsCreateCall struct { 5409 s *Service 5410 parent string 5411 dataset *Dataset 5412 urlParams_ gensupport.URLParams 5413 ctx_ context.Context 5414 header_ http.Header 5415} 5416 5417// Create: Creates a new health dataset. Results are returned through 5418// the Operation interface which returns either an `Operation.response` 5419// which contains a Dataset or `Operation.error`. The metadata field 5420// type is OperationMetadata. 5421// 5422// - parent: The name of the project where the server creates the 5423// dataset. For example, 5424// `projects/{project_id}/locations/{location_id}`. 5425func (r *ProjectsLocationsDatasetsService) Create(parent string, dataset *Dataset) *ProjectsLocationsDatasetsCreateCall { 5426 c := &ProjectsLocationsDatasetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5427 c.parent = parent 5428 c.dataset = dataset 5429 return c 5430} 5431 5432// DatasetId sets the optional parameter "datasetId": The ID of the 5433// dataset that is being created. The string must match the following 5434// regex: `[\p{L}\p{N}_\-\.]{1,256}`. 5435func (c *ProjectsLocationsDatasetsCreateCall) DatasetId(datasetId string) *ProjectsLocationsDatasetsCreateCall { 5436 c.urlParams_.Set("datasetId", datasetId) 5437 return c 5438} 5439 5440// Fields allows partial responses to be retrieved. See 5441// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5442// for more information. 5443func (c *ProjectsLocationsDatasetsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsCreateCall { 5444 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5445 return c 5446} 5447 5448// Context sets the context to be used in this call's Do method. Any 5449// pending HTTP request will be aborted if the provided context is 5450// canceled. 5451func (c *ProjectsLocationsDatasetsCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsCreateCall { 5452 c.ctx_ = ctx 5453 return c 5454} 5455 5456// Header returns an http.Header that can be modified by the caller to 5457// add HTTP headers to the request. 5458func (c *ProjectsLocationsDatasetsCreateCall) Header() http.Header { 5459 if c.header_ == nil { 5460 c.header_ = make(http.Header) 5461 } 5462 return c.header_ 5463} 5464 5465func (c *ProjectsLocationsDatasetsCreateCall) doRequest(alt string) (*http.Response, error) { 5466 reqHeaders := make(http.Header) 5467 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 5468 for k, v := range c.header_ { 5469 reqHeaders[k] = v 5470 } 5471 reqHeaders.Set("User-Agent", c.s.userAgent()) 5472 var body io.Reader = nil 5473 body, err := googleapi.WithoutDataWrapper.JSONReader(c.dataset) 5474 if err != nil { 5475 return nil, err 5476 } 5477 reqHeaders.Set("Content-Type", "application/json") 5478 c.urlParams_.Set("alt", alt) 5479 c.urlParams_.Set("prettyPrint", "false") 5480 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datasets") 5481 urls += "?" + c.urlParams_.Encode() 5482 req, err := http.NewRequest("POST", urls, body) 5483 if err != nil { 5484 return nil, err 5485 } 5486 req.Header = reqHeaders 5487 googleapi.Expand(req.URL, map[string]string{ 5488 "parent": c.parent, 5489 }) 5490 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5491} 5492 5493// Do executes the "healthcare.projects.locations.datasets.create" call. 5494// Exactly one of *Operation or error will be non-nil. Any non-2xx 5495// status code is an error. Response headers are in either 5496// *Operation.ServerResponse.Header or (if a response was returned at 5497// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 5498// to check whether the returned error was because 5499// http.StatusNotModified was returned. 5500func (c *ProjectsLocationsDatasetsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 5501 gensupport.SetOptions(c.urlParams_, opts...) 5502 res, err := c.doRequest("json") 5503 if res != nil && res.StatusCode == http.StatusNotModified { 5504 if res.Body != nil { 5505 res.Body.Close() 5506 } 5507 return nil, &googleapi.Error{ 5508 Code: res.StatusCode, 5509 Header: res.Header, 5510 } 5511 } 5512 if err != nil { 5513 return nil, err 5514 } 5515 defer googleapi.CloseBody(res) 5516 if err := googleapi.CheckResponse(res); err != nil { 5517 return nil, err 5518 } 5519 ret := &Operation{ 5520 ServerResponse: googleapi.ServerResponse{ 5521 Header: res.Header, 5522 HTTPStatusCode: res.StatusCode, 5523 }, 5524 } 5525 target := &ret 5526 if err := gensupport.DecodeResponse(target, res); err != nil { 5527 return nil, err 5528 } 5529 return ret, nil 5530 // { 5531 // "description": "Creates a new health dataset. Results are returned through the Operation interface which returns either an `Operation.response` which contains a Dataset or `Operation.error`. The metadata field type is OperationMetadata.", 5532 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets", 5533 // "httpMethod": "POST", 5534 // "id": "healthcare.projects.locations.datasets.create", 5535 // "parameterOrder": [ 5536 // "parent" 5537 // ], 5538 // "parameters": { 5539 // "datasetId": { 5540 // "description": "The ID of the dataset that is being created. The string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`.", 5541 // "location": "query", 5542 // "type": "string" 5543 // }, 5544 // "parent": { 5545 // "description": "The name of the project where the server creates the dataset. For example, `projects/{project_id}/locations/{location_id}`.", 5546 // "location": "path", 5547 // "pattern": "^projects/[^/]+/locations/[^/]+$", 5548 // "required": true, 5549 // "type": "string" 5550 // } 5551 // }, 5552 // "path": "v1/{+parent}/datasets", 5553 // "request": { 5554 // "$ref": "Dataset" 5555 // }, 5556 // "response": { 5557 // "$ref": "Operation" 5558 // }, 5559 // "scopes": [ 5560 // "https://www.googleapis.com/auth/cloud-platform" 5561 // ] 5562 // } 5563 5564} 5565 5566// method id "healthcare.projects.locations.datasets.deidentify": 5567 5568type ProjectsLocationsDatasetsDeidentifyCall struct { 5569 s *Service 5570 sourceDataset string 5571 deidentifydatasetrequest *DeidentifyDatasetRequest 5572 urlParams_ gensupport.URLParams 5573 ctx_ context.Context 5574 header_ http.Header 5575} 5576 5577// Deidentify: Creates a new dataset containing de-identified data from 5578// the source dataset. The metadata field type is OperationMetadata. If 5579// the request is successful, the response field type is 5580// DeidentifySummary. If errors occur, error is set. The LRO result may 5581// still be successful if de-identification fails for some DICOM 5582// instances. The new de-identified dataset will not contain these 5583// failed resources. Failed resource totals are tracked in 5584// Operation.metadata. Error details are also logged to Cloud Logging. 5585// For more information, see Viewing error logs in Cloud Logging 5586// (https://cloud.google.com/healthcare/docs/how-tos/logging). 5587// 5588// - sourceDataset: Source dataset resource name. For example, 5589// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 5590// `. 5591func (r *ProjectsLocationsDatasetsService) Deidentify(sourceDataset string, deidentifydatasetrequest *DeidentifyDatasetRequest) *ProjectsLocationsDatasetsDeidentifyCall { 5592 c := &ProjectsLocationsDatasetsDeidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5593 c.sourceDataset = sourceDataset 5594 c.deidentifydatasetrequest = deidentifydatasetrequest 5595 return c 5596} 5597 5598// Fields allows partial responses to be retrieved. See 5599// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5600// for more information. 5601func (c *ProjectsLocationsDatasetsDeidentifyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDeidentifyCall { 5602 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5603 return c 5604} 5605 5606// Context sets the context to be used in this call's Do method. Any 5607// pending HTTP request will be aborted if the provided context is 5608// canceled. 5609func (c *ProjectsLocationsDatasetsDeidentifyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDeidentifyCall { 5610 c.ctx_ = ctx 5611 return c 5612} 5613 5614// Header returns an http.Header that can be modified by the caller to 5615// add HTTP headers to the request. 5616func (c *ProjectsLocationsDatasetsDeidentifyCall) Header() http.Header { 5617 if c.header_ == nil { 5618 c.header_ = make(http.Header) 5619 } 5620 return c.header_ 5621} 5622 5623func (c *ProjectsLocationsDatasetsDeidentifyCall) doRequest(alt string) (*http.Response, error) { 5624 reqHeaders := make(http.Header) 5625 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 5626 for k, v := range c.header_ { 5627 reqHeaders[k] = v 5628 } 5629 reqHeaders.Set("User-Agent", c.s.userAgent()) 5630 var body io.Reader = nil 5631 body, err := googleapi.WithoutDataWrapper.JSONReader(c.deidentifydatasetrequest) 5632 if err != nil { 5633 return nil, err 5634 } 5635 reqHeaders.Set("Content-Type", "application/json") 5636 c.urlParams_.Set("alt", alt) 5637 c.urlParams_.Set("prettyPrint", "false") 5638 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+sourceDataset}:deidentify") 5639 urls += "?" + c.urlParams_.Encode() 5640 req, err := http.NewRequest("POST", urls, body) 5641 if err != nil { 5642 return nil, err 5643 } 5644 req.Header = reqHeaders 5645 googleapi.Expand(req.URL, map[string]string{ 5646 "sourceDataset": c.sourceDataset, 5647 }) 5648 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5649} 5650 5651// Do executes the "healthcare.projects.locations.datasets.deidentify" call. 5652// Exactly one of *Operation or error will be non-nil. Any non-2xx 5653// status code is an error. Response headers are in either 5654// *Operation.ServerResponse.Header or (if a response was returned at 5655// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 5656// to check whether the returned error was because 5657// http.StatusNotModified was returned. 5658func (c *ProjectsLocationsDatasetsDeidentifyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 5659 gensupport.SetOptions(c.urlParams_, opts...) 5660 res, err := c.doRequest("json") 5661 if res != nil && res.StatusCode == http.StatusNotModified { 5662 if res.Body != nil { 5663 res.Body.Close() 5664 } 5665 return nil, &googleapi.Error{ 5666 Code: res.StatusCode, 5667 Header: res.Header, 5668 } 5669 } 5670 if err != nil { 5671 return nil, err 5672 } 5673 defer googleapi.CloseBody(res) 5674 if err := googleapi.CheckResponse(res); err != nil { 5675 return nil, err 5676 } 5677 ret := &Operation{ 5678 ServerResponse: googleapi.ServerResponse{ 5679 Header: res.Header, 5680 HTTPStatusCode: res.StatusCode, 5681 }, 5682 } 5683 target := &ret 5684 if err := gensupport.DecodeResponse(target, res); err != nil { 5685 return nil, err 5686 } 5687 return ret, nil 5688 // { 5689 // "description": "Creates a new dataset containing de-identified data from the source dataset. The metadata field type is OperationMetadata. If the request is successful, the response field type is DeidentifySummary. If errors occur, error is set. The LRO result may still be successful if de-identification fails for some DICOM instances. The new de-identified dataset will not contain these failed resources. Failed resource totals are tracked in Operation.metadata. Error details are also logged to Cloud Logging. For more information, see [Viewing error logs in Cloud Logging](https://cloud.google.com/healthcare/docs/how-tos/logging).", 5690 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}:deidentify", 5691 // "httpMethod": "POST", 5692 // "id": "healthcare.projects.locations.datasets.deidentify", 5693 // "parameterOrder": [ 5694 // "sourceDataset" 5695 // ], 5696 // "parameters": { 5697 // "sourceDataset": { 5698 // "description": "Source dataset resource name. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.", 5699 // "location": "path", 5700 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", 5701 // "required": true, 5702 // "type": "string" 5703 // } 5704 // }, 5705 // "path": "v1/{+sourceDataset}:deidentify", 5706 // "request": { 5707 // "$ref": "DeidentifyDatasetRequest" 5708 // }, 5709 // "response": { 5710 // "$ref": "Operation" 5711 // }, 5712 // "scopes": [ 5713 // "https://www.googleapis.com/auth/cloud-platform" 5714 // ] 5715 // } 5716 5717} 5718 5719// method id "healthcare.projects.locations.datasets.delete": 5720 5721type ProjectsLocationsDatasetsDeleteCall struct { 5722 s *Service 5723 name string 5724 urlParams_ gensupport.URLParams 5725 ctx_ context.Context 5726 header_ http.Header 5727} 5728 5729// Delete: Deletes the specified health dataset and all data contained 5730// in the dataset. Deleting a dataset does not affect the sources from 5731// which the dataset was imported (if any). 5732// 5733// - name: The name of the dataset to delete. For example, 5734// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 5735// `. 5736func (r *ProjectsLocationsDatasetsService) Delete(name string) *ProjectsLocationsDatasetsDeleteCall { 5737 c := &ProjectsLocationsDatasetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5738 c.name = name 5739 return c 5740} 5741 5742// Fields allows partial responses to be retrieved. See 5743// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5744// for more information. 5745func (c *ProjectsLocationsDatasetsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDeleteCall { 5746 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5747 return c 5748} 5749 5750// Context sets the context to be used in this call's Do method. Any 5751// pending HTTP request will be aborted if the provided context is 5752// canceled. 5753func (c *ProjectsLocationsDatasetsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDeleteCall { 5754 c.ctx_ = ctx 5755 return c 5756} 5757 5758// Header returns an http.Header that can be modified by the caller to 5759// add HTTP headers to the request. 5760func (c *ProjectsLocationsDatasetsDeleteCall) Header() http.Header { 5761 if c.header_ == nil { 5762 c.header_ = make(http.Header) 5763 } 5764 return c.header_ 5765} 5766 5767func (c *ProjectsLocationsDatasetsDeleteCall) doRequest(alt string) (*http.Response, error) { 5768 reqHeaders := make(http.Header) 5769 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 5770 for k, v := range c.header_ { 5771 reqHeaders[k] = v 5772 } 5773 reqHeaders.Set("User-Agent", c.s.userAgent()) 5774 var body io.Reader = nil 5775 c.urlParams_.Set("alt", alt) 5776 c.urlParams_.Set("prettyPrint", "false") 5777 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 5778 urls += "?" + c.urlParams_.Encode() 5779 req, err := http.NewRequest("DELETE", urls, body) 5780 if err != nil { 5781 return nil, err 5782 } 5783 req.Header = reqHeaders 5784 googleapi.Expand(req.URL, map[string]string{ 5785 "name": c.name, 5786 }) 5787 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5788} 5789 5790// Do executes the "healthcare.projects.locations.datasets.delete" call. 5791// Exactly one of *Empty or error will be non-nil. Any non-2xx status 5792// code is an error. Response headers are in either 5793// *Empty.ServerResponse.Header or (if a response was returned at all) 5794// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 5795// check whether the returned error was because http.StatusNotModified 5796// was returned. 5797func (c *ProjectsLocationsDatasetsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 5798 gensupport.SetOptions(c.urlParams_, opts...) 5799 res, err := c.doRequest("json") 5800 if res != nil && res.StatusCode == http.StatusNotModified { 5801 if res.Body != nil { 5802 res.Body.Close() 5803 } 5804 return nil, &googleapi.Error{ 5805 Code: res.StatusCode, 5806 Header: res.Header, 5807 } 5808 } 5809 if err != nil { 5810 return nil, err 5811 } 5812 defer googleapi.CloseBody(res) 5813 if err := googleapi.CheckResponse(res); err != nil { 5814 return nil, err 5815 } 5816 ret := &Empty{ 5817 ServerResponse: googleapi.ServerResponse{ 5818 Header: res.Header, 5819 HTTPStatusCode: res.StatusCode, 5820 }, 5821 } 5822 target := &ret 5823 if err := gensupport.DecodeResponse(target, res); err != nil { 5824 return nil, err 5825 } 5826 return ret, nil 5827 // { 5828 // "description": "Deletes the specified health dataset and all data contained in the dataset. Deleting a dataset does not affect the sources from which the dataset was imported (if any).", 5829 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}", 5830 // "httpMethod": "DELETE", 5831 // "id": "healthcare.projects.locations.datasets.delete", 5832 // "parameterOrder": [ 5833 // "name" 5834 // ], 5835 // "parameters": { 5836 // "name": { 5837 // "description": "The name of the dataset to delete. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.", 5838 // "location": "path", 5839 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", 5840 // "required": true, 5841 // "type": "string" 5842 // } 5843 // }, 5844 // "path": "v1/{+name}", 5845 // "response": { 5846 // "$ref": "Empty" 5847 // }, 5848 // "scopes": [ 5849 // "https://www.googleapis.com/auth/cloud-platform" 5850 // ] 5851 // } 5852 5853} 5854 5855// method id "healthcare.projects.locations.datasets.get": 5856 5857type ProjectsLocationsDatasetsGetCall struct { 5858 s *Service 5859 name string 5860 urlParams_ gensupport.URLParams 5861 ifNoneMatch_ string 5862 ctx_ context.Context 5863 header_ http.Header 5864} 5865 5866// Get: Gets any metadata associated with a dataset. 5867// 5868// - name: The name of the dataset to read. For example, 5869// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 5870// `. 5871func (r *ProjectsLocationsDatasetsService) Get(name string) *ProjectsLocationsDatasetsGetCall { 5872 c := &ProjectsLocationsDatasetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5873 c.name = name 5874 return c 5875} 5876 5877// Fields allows partial responses to be retrieved. See 5878// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5879// for more information. 5880func (c *ProjectsLocationsDatasetsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsGetCall { 5881 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5882 return c 5883} 5884 5885// IfNoneMatch sets the optional parameter which makes the operation 5886// fail if the object's ETag matches the given value. This is useful for 5887// getting updates only after the object has changed since the last 5888// request. Use googleapi.IsNotModified to check whether the response 5889// error from Do is the result of In-None-Match. 5890func (c *ProjectsLocationsDatasetsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsGetCall { 5891 c.ifNoneMatch_ = entityTag 5892 return c 5893} 5894 5895// Context sets the context to be used in this call's Do method. Any 5896// pending HTTP request will be aborted if the provided context is 5897// canceled. 5898func (c *ProjectsLocationsDatasetsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsGetCall { 5899 c.ctx_ = ctx 5900 return c 5901} 5902 5903// Header returns an http.Header that can be modified by the caller to 5904// add HTTP headers to the request. 5905func (c *ProjectsLocationsDatasetsGetCall) Header() http.Header { 5906 if c.header_ == nil { 5907 c.header_ = make(http.Header) 5908 } 5909 return c.header_ 5910} 5911 5912func (c *ProjectsLocationsDatasetsGetCall) doRequest(alt string) (*http.Response, error) { 5913 reqHeaders := make(http.Header) 5914 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 5915 for k, v := range c.header_ { 5916 reqHeaders[k] = v 5917 } 5918 reqHeaders.Set("User-Agent", c.s.userAgent()) 5919 if c.ifNoneMatch_ != "" { 5920 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5921 } 5922 var body io.Reader = nil 5923 c.urlParams_.Set("alt", alt) 5924 c.urlParams_.Set("prettyPrint", "false") 5925 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 5926 urls += "?" + c.urlParams_.Encode() 5927 req, err := http.NewRequest("GET", urls, body) 5928 if err != nil { 5929 return nil, err 5930 } 5931 req.Header = reqHeaders 5932 googleapi.Expand(req.URL, map[string]string{ 5933 "name": c.name, 5934 }) 5935 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5936} 5937 5938// Do executes the "healthcare.projects.locations.datasets.get" call. 5939// Exactly one of *Dataset or error will be non-nil. Any non-2xx status 5940// code is an error. Response headers are in either 5941// *Dataset.ServerResponse.Header or (if a response was returned at all) 5942// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 5943// check whether the returned error was because http.StatusNotModified 5944// was returned. 5945func (c *ProjectsLocationsDatasetsGetCall) Do(opts ...googleapi.CallOption) (*Dataset, error) { 5946 gensupport.SetOptions(c.urlParams_, opts...) 5947 res, err := c.doRequest("json") 5948 if res != nil && res.StatusCode == http.StatusNotModified { 5949 if res.Body != nil { 5950 res.Body.Close() 5951 } 5952 return nil, &googleapi.Error{ 5953 Code: res.StatusCode, 5954 Header: res.Header, 5955 } 5956 } 5957 if err != nil { 5958 return nil, err 5959 } 5960 defer googleapi.CloseBody(res) 5961 if err := googleapi.CheckResponse(res); err != nil { 5962 return nil, err 5963 } 5964 ret := &Dataset{ 5965 ServerResponse: googleapi.ServerResponse{ 5966 Header: res.Header, 5967 HTTPStatusCode: res.StatusCode, 5968 }, 5969 } 5970 target := &ret 5971 if err := gensupport.DecodeResponse(target, res); err != nil { 5972 return nil, err 5973 } 5974 return ret, nil 5975 // { 5976 // "description": "Gets any metadata associated with a dataset.", 5977 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}", 5978 // "httpMethod": "GET", 5979 // "id": "healthcare.projects.locations.datasets.get", 5980 // "parameterOrder": [ 5981 // "name" 5982 // ], 5983 // "parameters": { 5984 // "name": { 5985 // "description": "The name of the dataset to read. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.", 5986 // "location": "path", 5987 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", 5988 // "required": true, 5989 // "type": "string" 5990 // } 5991 // }, 5992 // "path": "v1/{+name}", 5993 // "response": { 5994 // "$ref": "Dataset" 5995 // }, 5996 // "scopes": [ 5997 // "https://www.googleapis.com/auth/cloud-platform" 5998 // ] 5999 // } 6000 6001} 6002 6003// method id "healthcare.projects.locations.datasets.getIamPolicy": 6004 6005type ProjectsLocationsDatasetsGetIamPolicyCall struct { 6006 s *Service 6007 resource string 6008 urlParams_ gensupport.URLParams 6009 ifNoneMatch_ string 6010 ctx_ context.Context 6011 header_ http.Header 6012} 6013 6014// GetIamPolicy: Gets the access control policy for a resource. Returns 6015// an empty policy if the resource exists and does not have a policy 6016// set. 6017// 6018// - resource: REQUIRED: The resource for which the policy is being 6019// requested. See the operation documentation for the appropriate 6020// value for this field. 6021func (r *ProjectsLocationsDatasetsService) GetIamPolicy(resource string) *ProjectsLocationsDatasetsGetIamPolicyCall { 6022 c := &ProjectsLocationsDatasetsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6023 c.resource = resource 6024 return c 6025} 6026 6027// OptionsRequestedPolicyVersion sets the optional parameter 6028// "options.requestedPolicyVersion": The policy format version to be 6029// returned. Valid values are 0, 1, and 3. Requests specifying an 6030// invalid value will be rejected. Requests for policies with any 6031// conditional bindings must specify version 3. Policies without any 6032// conditional bindings may specify any valid value or leave the field 6033// unset. To learn which resources support conditions in their IAM 6034// policies, see the IAM documentation 6035// (https://cloud.google.com/iam/help/conditions/resource-policies). 6036func (c *ProjectsLocationsDatasetsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDatasetsGetIamPolicyCall { 6037 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) 6038 return c 6039} 6040 6041// Fields allows partial responses to be retrieved. See 6042// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6043// for more information. 6044func (c *ProjectsLocationsDatasetsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsGetIamPolicyCall { 6045 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6046 return c 6047} 6048 6049// IfNoneMatch sets the optional parameter which makes the operation 6050// fail if the object's ETag matches the given value. This is useful for 6051// getting updates only after the object has changed since the last 6052// request. Use googleapi.IsNotModified to check whether the response 6053// error from Do is the result of In-None-Match. 6054func (c *ProjectsLocationsDatasetsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsGetIamPolicyCall { 6055 c.ifNoneMatch_ = entityTag 6056 return c 6057} 6058 6059// Context sets the context to be used in this call's Do method. Any 6060// pending HTTP request will be aborted if the provided context is 6061// canceled. 6062func (c *ProjectsLocationsDatasetsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsGetIamPolicyCall { 6063 c.ctx_ = ctx 6064 return c 6065} 6066 6067// Header returns an http.Header that can be modified by the caller to 6068// add HTTP headers to the request. 6069func (c *ProjectsLocationsDatasetsGetIamPolicyCall) Header() http.Header { 6070 if c.header_ == nil { 6071 c.header_ = make(http.Header) 6072 } 6073 return c.header_ 6074} 6075 6076func (c *ProjectsLocationsDatasetsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 6077 reqHeaders := make(http.Header) 6078 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 6079 for k, v := range c.header_ { 6080 reqHeaders[k] = v 6081 } 6082 reqHeaders.Set("User-Agent", c.s.userAgent()) 6083 if c.ifNoneMatch_ != "" { 6084 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6085 } 6086 var body io.Reader = nil 6087 c.urlParams_.Set("alt", alt) 6088 c.urlParams_.Set("prettyPrint", "false") 6089 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") 6090 urls += "?" + c.urlParams_.Encode() 6091 req, err := http.NewRequest("GET", urls, body) 6092 if err != nil { 6093 return nil, err 6094 } 6095 req.Header = reqHeaders 6096 googleapi.Expand(req.URL, map[string]string{ 6097 "resource": c.resource, 6098 }) 6099 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6100} 6101 6102// Do executes the "healthcare.projects.locations.datasets.getIamPolicy" call. 6103// Exactly one of *Policy or error will be non-nil. Any non-2xx status 6104// code is an error. Response headers are in either 6105// *Policy.ServerResponse.Header or (if a response was returned at all) 6106// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 6107// check whether the returned error was because http.StatusNotModified 6108// was returned. 6109func (c *ProjectsLocationsDatasetsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 6110 gensupport.SetOptions(c.urlParams_, opts...) 6111 res, err := c.doRequest("json") 6112 if res != nil && res.StatusCode == http.StatusNotModified { 6113 if res.Body != nil { 6114 res.Body.Close() 6115 } 6116 return nil, &googleapi.Error{ 6117 Code: res.StatusCode, 6118 Header: res.Header, 6119 } 6120 } 6121 if err != nil { 6122 return nil, err 6123 } 6124 defer googleapi.CloseBody(res) 6125 if err := googleapi.CheckResponse(res); err != nil { 6126 return nil, err 6127 } 6128 ret := &Policy{ 6129 ServerResponse: googleapi.ServerResponse{ 6130 Header: res.Header, 6131 HTTPStatusCode: res.StatusCode, 6132 }, 6133 } 6134 target := &ret 6135 if err := gensupport.DecodeResponse(target, res); err != nil { 6136 return nil, err 6137 } 6138 return ret, nil 6139 // { 6140 // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", 6141 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}:getIamPolicy", 6142 // "httpMethod": "GET", 6143 // "id": "healthcare.projects.locations.datasets.getIamPolicy", 6144 // "parameterOrder": [ 6145 // "resource" 6146 // ], 6147 // "parameters": { 6148 // "options.requestedPolicyVersion": { 6149 // "description": "Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", 6150 // "format": "int32", 6151 // "location": "query", 6152 // "type": "integer" 6153 // }, 6154 // "resource": { 6155 // "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", 6156 // "location": "path", 6157 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", 6158 // "required": true, 6159 // "type": "string" 6160 // } 6161 // }, 6162 // "path": "v1/{+resource}:getIamPolicy", 6163 // "response": { 6164 // "$ref": "Policy" 6165 // }, 6166 // "scopes": [ 6167 // "https://www.googleapis.com/auth/cloud-platform" 6168 // ] 6169 // } 6170 6171} 6172 6173// method id "healthcare.projects.locations.datasets.list": 6174 6175type ProjectsLocationsDatasetsListCall struct { 6176 s *Service 6177 parent string 6178 urlParams_ gensupport.URLParams 6179 ifNoneMatch_ string 6180 ctx_ context.Context 6181 header_ http.Header 6182} 6183 6184// List: Lists the health datasets in the current project. 6185// 6186// - parent: The name of the project whose datasets should be listed. 6187// For example, `projects/{project_id}/locations/{location_id}`. 6188func (r *ProjectsLocationsDatasetsService) List(parent string) *ProjectsLocationsDatasetsListCall { 6189 c := &ProjectsLocationsDatasetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6190 c.parent = parent 6191 return c 6192} 6193 6194// PageSize sets the optional parameter "pageSize": The maximum number 6195// of items to return. If not specified, 100 is used. May not be larger 6196// than 1000. 6197func (c *ProjectsLocationsDatasetsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsListCall { 6198 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 6199 return c 6200} 6201 6202// PageToken sets the optional parameter "pageToken": The 6203// next_page_token value returned from a previous List request, if any. 6204func (c *ProjectsLocationsDatasetsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsListCall { 6205 c.urlParams_.Set("pageToken", pageToken) 6206 return c 6207} 6208 6209// Fields allows partial responses to be retrieved. See 6210// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6211// for more information. 6212func (c *ProjectsLocationsDatasetsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsListCall { 6213 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6214 return c 6215} 6216 6217// IfNoneMatch sets the optional parameter which makes the operation 6218// fail if the object's ETag matches the given value. This is useful for 6219// getting updates only after the object has changed since the last 6220// request. Use googleapi.IsNotModified to check whether the response 6221// error from Do is the result of In-None-Match. 6222func (c *ProjectsLocationsDatasetsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsListCall { 6223 c.ifNoneMatch_ = entityTag 6224 return c 6225} 6226 6227// Context sets the context to be used in this call's Do method. Any 6228// pending HTTP request will be aborted if the provided context is 6229// canceled. 6230func (c *ProjectsLocationsDatasetsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsListCall { 6231 c.ctx_ = ctx 6232 return c 6233} 6234 6235// Header returns an http.Header that can be modified by the caller to 6236// add HTTP headers to the request. 6237func (c *ProjectsLocationsDatasetsListCall) Header() http.Header { 6238 if c.header_ == nil { 6239 c.header_ = make(http.Header) 6240 } 6241 return c.header_ 6242} 6243 6244func (c *ProjectsLocationsDatasetsListCall) doRequest(alt string) (*http.Response, error) { 6245 reqHeaders := make(http.Header) 6246 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 6247 for k, v := range c.header_ { 6248 reqHeaders[k] = v 6249 } 6250 reqHeaders.Set("User-Agent", c.s.userAgent()) 6251 if c.ifNoneMatch_ != "" { 6252 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6253 } 6254 var body io.Reader = nil 6255 c.urlParams_.Set("alt", alt) 6256 c.urlParams_.Set("prettyPrint", "false") 6257 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datasets") 6258 urls += "?" + c.urlParams_.Encode() 6259 req, err := http.NewRequest("GET", urls, body) 6260 if err != nil { 6261 return nil, err 6262 } 6263 req.Header = reqHeaders 6264 googleapi.Expand(req.URL, map[string]string{ 6265 "parent": c.parent, 6266 }) 6267 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6268} 6269 6270// Do executes the "healthcare.projects.locations.datasets.list" call. 6271// Exactly one of *ListDatasetsResponse or error will be non-nil. Any 6272// non-2xx status code is an error. Response headers are in either 6273// *ListDatasetsResponse.ServerResponse.Header or (if a response was 6274// returned at all) in error.(*googleapi.Error).Header. Use 6275// googleapi.IsNotModified to check whether the returned error was 6276// because http.StatusNotModified was returned. 6277func (c *ProjectsLocationsDatasetsListCall) Do(opts ...googleapi.CallOption) (*ListDatasetsResponse, error) { 6278 gensupport.SetOptions(c.urlParams_, opts...) 6279 res, err := c.doRequest("json") 6280 if res != nil && res.StatusCode == http.StatusNotModified { 6281 if res.Body != nil { 6282 res.Body.Close() 6283 } 6284 return nil, &googleapi.Error{ 6285 Code: res.StatusCode, 6286 Header: res.Header, 6287 } 6288 } 6289 if err != nil { 6290 return nil, err 6291 } 6292 defer googleapi.CloseBody(res) 6293 if err := googleapi.CheckResponse(res); err != nil { 6294 return nil, err 6295 } 6296 ret := &ListDatasetsResponse{ 6297 ServerResponse: googleapi.ServerResponse{ 6298 Header: res.Header, 6299 HTTPStatusCode: res.StatusCode, 6300 }, 6301 } 6302 target := &ret 6303 if err := gensupport.DecodeResponse(target, res); err != nil { 6304 return nil, err 6305 } 6306 return ret, nil 6307 // { 6308 // "description": "Lists the health datasets in the current project.", 6309 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets", 6310 // "httpMethod": "GET", 6311 // "id": "healthcare.projects.locations.datasets.list", 6312 // "parameterOrder": [ 6313 // "parent" 6314 // ], 6315 // "parameters": { 6316 // "pageSize": { 6317 // "description": "The maximum number of items to return. If not specified, 100 is used. May not be larger than 1000.", 6318 // "format": "int32", 6319 // "location": "query", 6320 // "type": "integer" 6321 // }, 6322 // "pageToken": { 6323 // "description": "The next_page_token value returned from a previous List request, if any.", 6324 // "location": "query", 6325 // "type": "string" 6326 // }, 6327 // "parent": { 6328 // "description": "The name of the project whose datasets should be listed. For example, `projects/{project_id}/locations/{location_id}`.", 6329 // "location": "path", 6330 // "pattern": "^projects/[^/]+/locations/[^/]+$", 6331 // "required": true, 6332 // "type": "string" 6333 // } 6334 // }, 6335 // "path": "v1/{+parent}/datasets", 6336 // "response": { 6337 // "$ref": "ListDatasetsResponse" 6338 // }, 6339 // "scopes": [ 6340 // "https://www.googleapis.com/auth/cloud-platform" 6341 // ] 6342 // } 6343 6344} 6345 6346// Pages invokes f for each page of results. 6347// A non-nil error returned from f will halt the iteration. 6348// The provided context supersedes any context provided to the Context method. 6349func (c *ProjectsLocationsDatasetsListCall) Pages(ctx context.Context, f func(*ListDatasetsResponse) error) error { 6350 c.ctx_ = ctx 6351 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 6352 for { 6353 x, err := c.Do() 6354 if err != nil { 6355 return err 6356 } 6357 if err := f(x); err != nil { 6358 return err 6359 } 6360 if x.NextPageToken == "" { 6361 return nil 6362 } 6363 c.PageToken(x.NextPageToken) 6364 } 6365} 6366 6367// method id "healthcare.projects.locations.datasets.patch": 6368 6369type ProjectsLocationsDatasetsPatchCall struct { 6370 s *Service 6371 name string 6372 dataset *Dataset 6373 urlParams_ gensupport.URLParams 6374 ctx_ context.Context 6375 header_ http.Header 6376} 6377 6378// Patch: Updates dataset metadata. 6379// 6380// - name: Resource name of the dataset, of the form 6381// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 6382// `. 6383func (r *ProjectsLocationsDatasetsService) Patch(name string, dataset *Dataset) *ProjectsLocationsDatasetsPatchCall { 6384 c := &ProjectsLocationsDatasetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6385 c.name = name 6386 c.dataset = dataset 6387 return c 6388} 6389 6390// UpdateMask sets the optional parameter "updateMask": The update mask 6391// applies to the resource. For the `FieldMask` definition, see 6392// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask 6393func (c *ProjectsLocationsDatasetsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsPatchCall { 6394 c.urlParams_.Set("updateMask", updateMask) 6395 return c 6396} 6397 6398// Fields allows partial responses to be retrieved. See 6399// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6400// for more information. 6401func (c *ProjectsLocationsDatasetsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsPatchCall { 6402 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6403 return c 6404} 6405 6406// Context sets the context to be used in this call's Do method. Any 6407// pending HTTP request will be aborted if the provided context is 6408// canceled. 6409func (c *ProjectsLocationsDatasetsPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsPatchCall { 6410 c.ctx_ = ctx 6411 return c 6412} 6413 6414// Header returns an http.Header that can be modified by the caller to 6415// add HTTP headers to the request. 6416func (c *ProjectsLocationsDatasetsPatchCall) Header() http.Header { 6417 if c.header_ == nil { 6418 c.header_ = make(http.Header) 6419 } 6420 return c.header_ 6421} 6422 6423func (c *ProjectsLocationsDatasetsPatchCall) doRequest(alt string) (*http.Response, error) { 6424 reqHeaders := make(http.Header) 6425 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 6426 for k, v := range c.header_ { 6427 reqHeaders[k] = v 6428 } 6429 reqHeaders.Set("User-Agent", c.s.userAgent()) 6430 var body io.Reader = nil 6431 body, err := googleapi.WithoutDataWrapper.JSONReader(c.dataset) 6432 if err != nil { 6433 return nil, err 6434 } 6435 reqHeaders.Set("Content-Type", "application/json") 6436 c.urlParams_.Set("alt", alt) 6437 c.urlParams_.Set("prettyPrint", "false") 6438 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 6439 urls += "?" + c.urlParams_.Encode() 6440 req, err := http.NewRequest("PATCH", urls, body) 6441 if err != nil { 6442 return nil, err 6443 } 6444 req.Header = reqHeaders 6445 googleapi.Expand(req.URL, map[string]string{ 6446 "name": c.name, 6447 }) 6448 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6449} 6450 6451// Do executes the "healthcare.projects.locations.datasets.patch" call. 6452// Exactly one of *Dataset or error will be non-nil. Any non-2xx status 6453// code is an error. Response headers are in either 6454// *Dataset.ServerResponse.Header or (if a response was returned at all) 6455// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 6456// check whether the returned error was because http.StatusNotModified 6457// was returned. 6458func (c *ProjectsLocationsDatasetsPatchCall) Do(opts ...googleapi.CallOption) (*Dataset, error) { 6459 gensupport.SetOptions(c.urlParams_, opts...) 6460 res, err := c.doRequest("json") 6461 if res != nil && res.StatusCode == http.StatusNotModified { 6462 if res.Body != nil { 6463 res.Body.Close() 6464 } 6465 return nil, &googleapi.Error{ 6466 Code: res.StatusCode, 6467 Header: res.Header, 6468 } 6469 } 6470 if err != nil { 6471 return nil, err 6472 } 6473 defer googleapi.CloseBody(res) 6474 if err := googleapi.CheckResponse(res); err != nil { 6475 return nil, err 6476 } 6477 ret := &Dataset{ 6478 ServerResponse: googleapi.ServerResponse{ 6479 Header: res.Header, 6480 HTTPStatusCode: res.StatusCode, 6481 }, 6482 } 6483 target := &ret 6484 if err := gensupport.DecodeResponse(target, res); err != nil { 6485 return nil, err 6486 } 6487 return ret, nil 6488 // { 6489 // "description": "Updates dataset metadata.", 6490 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}", 6491 // "httpMethod": "PATCH", 6492 // "id": "healthcare.projects.locations.datasets.patch", 6493 // "parameterOrder": [ 6494 // "name" 6495 // ], 6496 // "parameters": { 6497 // "name": { 6498 // "description": "Resource name of the dataset, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.", 6499 // "location": "path", 6500 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", 6501 // "required": true, 6502 // "type": "string" 6503 // }, 6504 // "updateMask": { 6505 // "description": "The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", 6506 // "format": "google-fieldmask", 6507 // "location": "query", 6508 // "type": "string" 6509 // } 6510 // }, 6511 // "path": "v1/{+name}", 6512 // "request": { 6513 // "$ref": "Dataset" 6514 // }, 6515 // "response": { 6516 // "$ref": "Dataset" 6517 // }, 6518 // "scopes": [ 6519 // "https://www.googleapis.com/auth/cloud-platform" 6520 // ] 6521 // } 6522 6523} 6524 6525// method id "healthcare.projects.locations.datasets.setIamPolicy": 6526 6527type ProjectsLocationsDatasetsSetIamPolicyCall struct { 6528 s *Service 6529 resource string 6530 setiampolicyrequest *SetIamPolicyRequest 6531 urlParams_ gensupport.URLParams 6532 ctx_ context.Context 6533 header_ http.Header 6534} 6535 6536// SetIamPolicy: Sets the access control policy on the specified 6537// resource. Replaces any existing policy. Can return `NOT_FOUND`, 6538// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. 6539// 6540// - resource: REQUIRED: The resource for which the policy is being 6541// specified. See the operation documentation for the appropriate 6542// value for this field. 6543func (r *ProjectsLocationsDatasetsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsSetIamPolicyCall { 6544 c := &ProjectsLocationsDatasetsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6545 c.resource = resource 6546 c.setiampolicyrequest = setiampolicyrequest 6547 return c 6548} 6549 6550// Fields allows partial responses to be retrieved. See 6551// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6552// for more information. 6553func (c *ProjectsLocationsDatasetsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSetIamPolicyCall { 6554 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6555 return c 6556} 6557 6558// Context sets the context to be used in this call's Do method. Any 6559// pending HTTP request will be aborted if the provided context is 6560// canceled. 6561func (c *ProjectsLocationsDatasetsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSetIamPolicyCall { 6562 c.ctx_ = ctx 6563 return c 6564} 6565 6566// Header returns an http.Header that can be modified by the caller to 6567// add HTTP headers to the request. 6568func (c *ProjectsLocationsDatasetsSetIamPolicyCall) Header() http.Header { 6569 if c.header_ == nil { 6570 c.header_ = make(http.Header) 6571 } 6572 return c.header_ 6573} 6574 6575func (c *ProjectsLocationsDatasetsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 6576 reqHeaders := make(http.Header) 6577 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 6578 for k, v := range c.header_ { 6579 reqHeaders[k] = v 6580 } 6581 reqHeaders.Set("User-Agent", c.s.userAgent()) 6582 var body io.Reader = nil 6583 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 6584 if err != nil { 6585 return nil, err 6586 } 6587 reqHeaders.Set("Content-Type", "application/json") 6588 c.urlParams_.Set("alt", alt) 6589 c.urlParams_.Set("prettyPrint", "false") 6590 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") 6591 urls += "?" + c.urlParams_.Encode() 6592 req, err := http.NewRequest("POST", urls, body) 6593 if err != nil { 6594 return nil, err 6595 } 6596 req.Header = reqHeaders 6597 googleapi.Expand(req.URL, map[string]string{ 6598 "resource": c.resource, 6599 }) 6600 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6601} 6602 6603// Do executes the "healthcare.projects.locations.datasets.setIamPolicy" call. 6604// Exactly one of *Policy or error will be non-nil. Any non-2xx status 6605// code is an error. Response headers are in either 6606// *Policy.ServerResponse.Header or (if a response was returned at all) 6607// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 6608// check whether the returned error was because http.StatusNotModified 6609// was returned. 6610func (c *ProjectsLocationsDatasetsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 6611 gensupport.SetOptions(c.urlParams_, opts...) 6612 res, err := c.doRequest("json") 6613 if res != nil && res.StatusCode == http.StatusNotModified { 6614 if res.Body != nil { 6615 res.Body.Close() 6616 } 6617 return nil, &googleapi.Error{ 6618 Code: res.StatusCode, 6619 Header: res.Header, 6620 } 6621 } 6622 if err != nil { 6623 return nil, err 6624 } 6625 defer googleapi.CloseBody(res) 6626 if err := googleapi.CheckResponse(res); err != nil { 6627 return nil, err 6628 } 6629 ret := &Policy{ 6630 ServerResponse: googleapi.ServerResponse{ 6631 Header: res.Header, 6632 HTTPStatusCode: res.StatusCode, 6633 }, 6634 } 6635 target := &ret 6636 if err := gensupport.DecodeResponse(target, res); err != nil { 6637 return nil, err 6638 } 6639 return ret, nil 6640 // { 6641 // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", 6642 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}:setIamPolicy", 6643 // "httpMethod": "POST", 6644 // "id": "healthcare.projects.locations.datasets.setIamPolicy", 6645 // "parameterOrder": [ 6646 // "resource" 6647 // ], 6648 // "parameters": { 6649 // "resource": { 6650 // "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", 6651 // "location": "path", 6652 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", 6653 // "required": true, 6654 // "type": "string" 6655 // } 6656 // }, 6657 // "path": "v1/{+resource}:setIamPolicy", 6658 // "request": { 6659 // "$ref": "SetIamPolicyRequest" 6660 // }, 6661 // "response": { 6662 // "$ref": "Policy" 6663 // }, 6664 // "scopes": [ 6665 // "https://www.googleapis.com/auth/cloud-platform" 6666 // ] 6667 // } 6668 6669} 6670 6671// method id "healthcare.projects.locations.datasets.testIamPermissions": 6672 6673type ProjectsLocationsDatasetsTestIamPermissionsCall struct { 6674 s *Service 6675 resource string 6676 testiampermissionsrequest *TestIamPermissionsRequest 6677 urlParams_ gensupport.URLParams 6678 ctx_ context.Context 6679 header_ http.Header 6680} 6681 6682// TestIamPermissions: Returns permissions that a caller has on the 6683// specified resource. If the resource does not exist, this will return 6684// an empty set of permissions, not a `NOT_FOUND` error. Note: This 6685// operation is designed to be used for building permission-aware UIs 6686// and command-line tools, not for authorization checking. This 6687// operation may "fail open" without warning. 6688// 6689// - resource: REQUIRED: The resource for which the policy detail is 6690// being requested. See the operation documentation for the 6691// appropriate value for this field. 6692func (r *ProjectsLocationsDatasetsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsTestIamPermissionsCall { 6693 c := &ProjectsLocationsDatasetsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6694 c.resource = resource 6695 c.testiampermissionsrequest = testiampermissionsrequest 6696 return c 6697} 6698 6699// Fields allows partial responses to be retrieved. See 6700// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6701// for more information. 6702func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsTestIamPermissionsCall { 6703 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6704 return c 6705} 6706 6707// Context sets the context to be used in this call's Do method. Any 6708// pending HTTP request will be aborted if the provided context is 6709// canceled. 6710func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsTestIamPermissionsCall { 6711 c.ctx_ = ctx 6712 return c 6713} 6714 6715// Header returns an http.Header that can be modified by the caller to 6716// add HTTP headers to the request. 6717func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) Header() http.Header { 6718 if c.header_ == nil { 6719 c.header_ = make(http.Header) 6720 } 6721 return c.header_ 6722} 6723 6724func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 6725 reqHeaders := make(http.Header) 6726 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 6727 for k, v := range c.header_ { 6728 reqHeaders[k] = v 6729 } 6730 reqHeaders.Set("User-Agent", c.s.userAgent()) 6731 var body io.Reader = nil 6732 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 6733 if err != nil { 6734 return nil, err 6735 } 6736 reqHeaders.Set("Content-Type", "application/json") 6737 c.urlParams_.Set("alt", alt) 6738 c.urlParams_.Set("prettyPrint", "false") 6739 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") 6740 urls += "?" + c.urlParams_.Encode() 6741 req, err := http.NewRequest("POST", urls, body) 6742 if err != nil { 6743 return nil, err 6744 } 6745 req.Header = reqHeaders 6746 googleapi.Expand(req.URL, map[string]string{ 6747 "resource": c.resource, 6748 }) 6749 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6750} 6751 6752// Do executes the "healthcare.projects.locations.datasets.testIamPermissions" call. 6753// Exactly one of *TestIamPermissionsResponse or error will be non-nil. 6754// Any non-2xx status code is an error. Response headers are in either 6755// *TestIamPermissionsResponse.ServerResponse.Header or (if a response 6756// was returned at all) in error.(*googleapi.Error).Header. Use 6757// googleapi.IsNotModified to check whether the returned error was 6758// because http.StatusNotModified was returned. 6759func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 6760 gensupport.SetOptions(c.urlParams_, opts...) 6761 res, err := c.doRequest("json") 6762 if res != nil && res.StatusCode == http.StatusNotModified { 6763 if res.Body != nil { 6764 res.Body.Close() 6765 } 6766 return nil, &googleapi.Error{ 6767 Code: res.StatusCode, 6768 Header: res.Header, 6769 } 6770 } 6771 if err != nil { 6772 return nil, err 6773 } 6774 defer googleapi.CloseBody(res) 6775 if err := googleapi.CheckResponse(res); err != nil { 6776 return nil, err 6777 } 6778 ret := &TestIamPermissionsResponse{ 6779 ServerResponse: googleapi.ServerResponse{ 6780 Header: res.Header, 6781 HTTPStatusCode: res.StatusCode, 6782 }, 6783 } 6784 target := &ret 6785 if err := gensupport.DecodeResponse(target, res); err != nil { 6786 return nil, err 6787 } 6788 return ret, nil 6789 // { 6790 // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", 6791 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}:testIamPermissions", 6792 // "httpMethod": "POST", 6793 // "id": "healthcare.projects.locations.datasets.testIamPermissions", 6794 // "parameterOrder": [ 6795 // "resource" 6796 // ], 6797 // "parameters": { 6798 // "resource": { 6799 // "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", 6800 // "location": "path", 6801 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", 6802 // "required": true, 6803 // "type": "string" 6804 // } 6805 // }, 6806 // "path": "v1/{+resource}:testIamPermissions", 6807 // "request": { 6808 // "$ref": "TestIamPermissionsRequest" 6809 // }, 6810 // "response": { 6811 // "$ref": "TestIamPermissionsResponse" 6812 // }, 6813 // "scopes": [ 6814 // "https://www.googleapis.com/auth/cloud-platform" 6815 // ] 6816 // } 6817 6818} 6819 6820// method id "healthcare.projects.locations.datasets.consentStores.checkDataAccess": 6821 6822type ProjectsLocationsDatasetsConsentStoresCheckDataAccessCall struct { 6823 s *Service 6824 consentStore string 6825 checkdataaccessrequest *CheckDataAccessRequest 6826 urlParams_ gensupport.URLParams 6827 ctx_ context.Context 6828 header_ http.Header 6829} 6830 6831// CheckDataAccess: Checks if a particular data_id of a User data 6832// mapping in the specified consent store is consented for the specified 6833// use. 6834// 6835// - consentStore: Name of the consent store where the requested data_id 6836// is stored, of the form 6837// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 6838// /consentStores/{consent_store_id}`. 6839func (r *ProjectsLocationsDatasetsConsentStoresService) CheckDataAccess(consentStore string, checkdataaccessrequest *CheckDataAccessRequest) *ProjectsLocationsDatasetsConsentStoresCheckDataAccessCall { 6840 c := &ProjectsLocationsDatasetsConsentStoresCheckDataAccessCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6841 c.consentStore = consentStore 6842 c.checkdataaccessrequest = checkdataaccessrequest 6843 return c 6844} 6845 6846// Fields allows partial responses to be retrieved. See 6847// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6848// for more information. 6849func (c *ProjectsLocationsDatasetsConsentStoresCheckDataAccessCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresCheckDataAccessCall { 6850 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6851 return c 6852} 6853 6854// Context sets the context to be used in this call's Do method. Any 6855// pending HTTP request will be aborted if the provided context is 6856// canceled. 6857func (c *ProjectsLocationsDatasetsConsentStoresCheckDataAccessCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresCheckDataAccessCall { 6858 c.ctx_ = ctx 6859 return c 6860} 6861 6862// Header returns an http.Header that can be modified by the caller to 6863// add HTTP headers to the request. 6864func (c *ProjectsLocationsDatasetsConsentStoresCheckDataAccessCall) Header() http.Header { 6865 if c.header_ == nil { 6866 c.header_ = make(http.Header) 6867 } 6868 return c.header_ 6869} 6870 6871func (c *ProjectsLocationsDatasetsConsentStoresCheckDataAccessCall) doRequest(alt string) (*http.Response, error) { 6872 reqHeaders := make(http.Header) 6873 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 6874 for k, v := range c.header_ { 6875 reqHeaders[k] = v 6876 } 6877 reqHeaders.Set("User-Agent", c.s.userAgent()) 6878 var body io.Reader = nil 6879 body, err := googleapi.WithoutDataWrapper.JSONReader(c.checkdataaccessrequest) 6880 if err != nil { 6881 return nil, err 6882 } 6883 reqHeaders.Set("Content-Type", "application/json") 6884 c.urlParams_.Set("alt", alt) 6885 c.urlParams_.Set("prettyPrint", "false") 6886 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+consentStore}:checkDataAccess") 6887 urls += "?" + c.urlParams_.Encode() 6888 req, err := http.NewRequest("POST", urls, body) 6889 if err != nil { 6890 return nil, err 6891 } 6892 req.Header = reqHeaders 6893 googleapi.Expand(req.URL, map[string]string{ 6894 "consentStore": c.consentStore, 6895 }) 6896 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6897} 6898 6899// Do executes the "healthcare.projects.locations.datasets.consentStores.checkDataAccess" call. 6900// Exactly one of *CheckDataAccessResponse or error will be non-nil. Any 6901// non-2xx status code is an error. Response headers are in either 6902// *CheckDataAccessResponse.ServerResponse.Header or (if a response was 6903// returned at all) in error.(*googleapi.Error).Header. Use 6904// googleapi.IsNotModified to check whether the returned error was 6905// because http.StatusNotModified was returned. 6906func (c *ProjectsLocationsDatasetsConsentStoresCheckDataAccessCall) Do(opts ...googleapi.CallOption) (*CheckDataAccessResponse, error) { 6907 gensupport.SetOptions(c.urlParams_, opts...) 6908 res, err := c.doRequest("json") 6909 if res != nil && res.StatusCode == http.StatusNotModified { 6910 if res.Body != nil { 6911 res.Body.Close() 6912 } 6913 return nil, &googleapi.Error{ 6914 Code: res.StatusCode, 6915 Header: res.Header, 6916 } 6917 } 6918 if err != nil { 6919 return nil, err 6920 } 6921 defer googleapi.CloseBody(res) 6922 if err := googleapi.CheckResponse(res); err != nil { 6923 return nil, err 6924 } 6925 ret := &CheckDataAccessResponse{ 6926 ServerResponse: googleapi.ServerResponse{ 6927 Header: res.Header, 6928 HTTPStatusCode: res.StatusCode, 6929 }, 6930 } 6931 target := &ret 6932 if err := gensupport.DecodeResponse(target, res); err != nil { 6933 return nil, err 6934 } 6935 return ret, nil 6936 // { 6937 // "description": "Checks if a particular data_id of a User data mapping in the specified consent store is consented for the specified use.", 6938 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/consentStores/{consentStoresId}:checkDataAccess", 6939 // "httpMethod": "POST", 6940 // "id": "healthcare.projects.locations.datasets.consentStores.checkDataAccess", 6941 // "parameterOrder": [ 6942 // "consentStore" 6943 // ], 6944 // "parameters": { 6945 // "consentStore": { 6946 // "description": "Required. Name of the consent store where the requested data_id is stored, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}`.", 6947 // "location": "path", 6948 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+$", 6949 // "required": true, 6950 // "type": "string" 6951 // } 6952 // }, 6953 // "path": "v1/{+consentStore}:checkDataAccess", 6954 // "request": { 6955 // "$ref": "CheckDataAccessRequest" 6956 // }, 6957 // "response": { 6958 // "$ref": "CheckDataAccessResponse" 6959 // }, 6960 // "scopes": [ 6961 // "https://www.googleapis.com/auth/cloud-platform" 6962 // ] 6963 // } 6964 6965} 6966 6967// method id "healthcare.projects.locations.datasets.consentStores.create": 6968 6969type ProjectsLocationsDatasetsConsentStoresCreateCall struct { 6970 s *Service 6971 parent string 6972 consentstore *ConsentStore 6973 urlParams_ gensupport.URLParams 6974 ctx_ context.Context 6975 header_ http.Header 6976} 6977 6978// Create: Creates a new consent store in the parent dataset. Attempting 6979// to create a consent store with the same ID as an existing store fails 6980// with an ALREADY_EXISTS error. 6981// 6982// - parent: The name of the dataset this consent store belongs to. 6983func (r *ProjectsLocationsDatasetsConsentStoresService) Create(parent string, consentstore *ConsentStore) *ProjectsLocationsDatasetsConsentStoresCreateCall { 6984 c := &ProjectsLocationsDatasetsConsentStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6985 c.parent = parent 6986 c.consentstore = consentstore 6987 return c 6988} 6989 6990// ConsentStoreId sets the optional parameter "consentStoreId": 6991// Required. The ID of the consent store to create. The string must 6992// match the following regex: `[\p{L}\p{N}_\-\.]{1,256}`. Cannot be 6993// changed after creation. 6994func (c *ProjectsLocationsDatasetsConsentStoresCreateCall) ConsentStoreId(consentStoreId string) *ProjectsLocationsDatasetsConsentStoresCreateCall { 6995 c.urlParams_.Set("consentStoreId", consentStoreId) 6996 return c 6997} 6998 6999// Fields allows partial responses to be retrieved. See 7000// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7001// for more information. 7002func (c *ProjectsLocationsDatasetsConsentStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresCreateCall { 7003 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7004 return c 7005} 7006 7007// Context sets the context to be used in this call's Do method. Any 7008// pending HTTP request will be aborted if the provided context is 7009// canceled. 7010func (c *ProjectsLocationsDatasetsConsentStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresCreateCall { 7011 c.ctx_ = ctx 7012 return c 7013} 7014 7015// Header returns an http.Header that can be modified by the caller to 7016// add HTTP headers to the request. 7017func (c *ProjectsLocationsDatasetsConsentStoresCreateCall) Header() http.Header { 7018 if c.header_ == nil { 7019 c.header_ = make(http.Header) 7020 } 7021 return c.header_ 7022} 7023 7024func (c *ProjectsLocationsDatasetsConsentStoresCreateCall) doRequest(alt string) (*http.Response, error) { 7025 reqHeaders := make(http.Header) 7026 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 7027 for k, v := range c.header_ { 7028 reqHeaders[k] = v 7029 } 7030 reqHeaders.Set("User-Agent", c.s.userAgent()) 7031 var body io.Reader = nil 7032 body, err := googleapi.WithoutDataWrapper.JSONReader(c.consentstore) 7033 if err != nil { 7034 return nil, err 7035 } 7036 reqHeaders.Set("Content-Type", "application/json") 7037 c.urlParams_.Set("alt", alt) 7038 c.urlParams_.Set("prettyPrint", "false") 7039 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/consentStores") 7040 urls += "?" + c.urlParams_.Encode() 7041 req, err := http.NewRequest("POST", urls, body) 7042 if err != nil { 7043 return nil, err 7044 } 7045 req.Header = reqHeaders 7046 googleapi.Expand(req.URL, map[string]string{ 7047 "parent": c.parent, 7048 }) 7049 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7050} 7051 7052// Do executes the "healthcare.projects.locations.datasets.consentStores.create" call. 7053// Exactly one of *ConsentStore or error will be non-nil. Any non-2xx 7054// status code is an error. Response headers are in either 7055// *ConsentStore.ServerResponse.Header or (if a response was returned at 7056// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7057// to check whether the returned error was because 7058// http.StatusNotModified was returned. 7059func (c *ProjectsLocationsDatasetsConsentStoresCreateCall) Do(opts ...googleapi.CallOption) (*ConsentStore, error) { 7060 gensupport.SetOptions(c.urlParams_, opts...) 7061 res, err := c.doRequest("json") 7062 if res != nil && res.StatusCode == http.StatusNotModified { 7063 if res.Body != nil { 7064 res.Body.Close() 7065 } 7066 return nil, &googleapi.Error{ 7067 Code: res.StatusCode, 7068 Header: res.Header, 7069 } 7070 } 7071 if err != nil { 7072 return nil, err 7073 } 7074 defer googleapi.CloseBody(res) 7075 if err := googleapi.CheckResponse(res); err != nil { 7076 return nil, err 7077 } 7078 ret := &ConsentStore{ 7079 ServerResponse: googleapi.ServerResponse{ 7080 Header: res.Header, 7081 HTTPStatusCode: res.StatusCode, 7082 }, 7083 } 7084 target := &ret 7085 if err := gensupport.DecodeResponse(target, res); err != nil { 7086 return nil, err 7087 } 7088 return ret, nil 7089 // { 7090 // "description": "Creates a new consent store in the parent dataset. Attempting to create a consent store with the same ID as an existing store fails with an ALREADY_EXISTS error.", 7091 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/consentStores", 7092 // "httpMethod": "POST", 7093 // "id": "healthcare.projects.locations.datasets.consentStores.create", 7094 // "parameterOrder": [ 7095 // "parent" 7096 // ], 7097 // "parameters": { 7098 // "consentStoreId": { 7099 // "description": "Required. The ID of the consent store to create. The string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`. Cannot be changed after creation.", 7100 // "location": "query", 7101 // "type": "string" 7102 // }, 7103 // "parent": { 7104 // "description": "Required. The name of the dataset this consent store belongs to.", 7105 // "location": "path", 7106 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", 7107 // "required": true, 7108 // "type": "string" 7109 // } 7110 // }, 7111 // "path": "v1/{+parent}/consentStores", 7112 // "request": { 7113 // "$ref": "ConsentStore" 7114 // }, 7115 // "response": { 7116 // "$ref": "ConsentStore" 7117 // }, 7118 // "scopes": [ 7119 // "https://www.googleapis.com/auth/cloud-platform" 7120 // ] 7121 // } 7122 7123} 7124 7125// method id "healthcare.projects.locations.datasets.consentStores.delete": 7126 7127type ProjectsLocationsDatasetsConsentStoresDeleteCall struct { 7128 s *Service 7129 name string 7130 urlParams_ gensupport.URLParams 7131 ctx_ context.Context 7132 header_ http.Header 7133} 7134 7135// Delete: Deletes the specified consent store and removes all the 7136// consent store's data. 7137// 7138// - name: The resource name of the consent store to delete. 7139func (r *ProjectsLocationsDatasetsConsentStoresService) Delete(name string) *ProjectsLocationsDatasetsConsentStoresDeleteCall { 7140 c := &ProjectsLocationsDatasetsConsentStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7141 c.name = name 7142 return c 7143} 7144 7145// Fields allows partial responses to be retrieved. See 7146// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7147// for more information. 7148func (c *ProjectsLocationsDatasetsConsentStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresDeleteCall { 7149 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7150 return c 7151} 7152 7153// Context sets the context to be used in this call's Do method. Any 7154// pending HTTP request will be aborted if the provided context is 7155// canceled. 7156func (c *ProjectsLocationsDatasetsConsentStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresDeleteCall { 7157 c.ctx_ = ctx 7158 return c 7159} 7160 7161// Header returns an http.Header that can be modified by the caller to 7162// add HTTP headers to the request. 7163func (c *ProjectsLocationsDatasetsConsentStoresDeleteCall) Header() http.Header { 7164 if c.header_ == nil { 7165 c.header_ = make(http.Header) 7166 } 7167 return c.header_ 7168} 7169 7170func (c *ProjectsLocationsDatasetsConsentStoresDeleteCall) doRequest(alt string) (*http.Response, error) { 7171 reqHeaders := make(http.Header) 7172 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 7173 for k, v := range c.header_ { 7174 reqHeaders[k] = v 7175 } 7176 reqHeaders.Set("User-Agent", c.s.userAgent()) 7177 var body io.Reader = nil 7178 c.urlParams_.Set("alt", alt) 7179 c.urlParams_.Set("prettyPrint", "false") 7180 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 7181 urls += "?" + c.urlParams_.Encode() 7182 req, err := http.NewRequest("DELETE", urls, body) 7183 if err != nil { 7184 return nil, err 7185 } 7186 req.Header = reqHeaders 7187 googleapi.Expand(req.URL, map[string]string{ 7188 "name": c.name, 7189 }) 7190 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7191} 7192 7193// Do executes the "healthcare.projects.locations.datasets.consentStores.delete" call. 7194// Exactly one of *Empty or error will be non-nil. Any non-2xx status 7195// code is an error. Response headers are in either 7196// *Empty.ServerResponse.Header or (if a response was returned at all) 7197// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 7198// check whether the returned error was because http.StatusNotModified 7199// was returned. 7200func (c *ProjectsLocationsDatasetsConsentStoresDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 7201 gensupport.SetOptions(c.urlParams_, opts...) 7202 res, err := c.doRequest("json") 7203 if res != nil && res.StatusCode == http.StatusNotModified { 7204 if res.Body != nil { 7205 res.Body.Close() 7206 } 7207 return nil, &googleapi.Error{ 7208 Code: res.StatusCode, 7209 Header: res.Header, 7210 } 7211 } 7212 if err != nil { 7213 return nil, err 7214 } 7215 defer googleapi.CloseBody(res) 7216 if err := googleapi.CheckResponse(res); err != nil { 7217 return nil, err 7218 } 7219 ret := &Empty{ 7220 ServerResponse: googleapi.ServerResponse{ 7221 Header: res.Header, 7222 HTTPStatusCode: res.StatusCode, 7223 }, 7224 } 7225 target := &ret 7226 if err := gensupport.DecodeResponse(target, res); err != nil { 7227 return nil, err 7228 } 7229 return ret, nil 7230 // { 7231 // "description": "Deletes the specified consent store and removes all the consent store's data.", 7232 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/consentStores/{consentStoresId}", 7233 // "httpMethod": "DELETE", 7234 // "id": "healthcare.projects.locations.datasets.consentStores.delete", 7235 // "parameterOrder": [ 7236 // "name" 7237 // ], 7238 // "parameters": { 7239 // "name": { 7240 // "description": "Required. The resource name of the consent store to delete.", 7241 // "location": "path", 7242 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+$", 7243 // "required": true, 7244 // "type": "string" 7245 // } 7246 // }, 7247 // "path": "v1/{+name}", 7248 // "response": { 7249 // "$ref": "Empty" 7250 // }, 7251 // "scopes": [ 7252 // "https://www.googleapis.com/auth/cloud-platform" 7253 // ] 7254 // } 7255 7256} 7257 7258// method id "healthcare.projects.locations.datasets.consentStores.evaluateUserConsents": 7259 7260type ProjectsLocationsDatasetsConsentStoresEvaluateUserConsentsCall struct { 7261 s *Service 7262 consentStore string 7263 evaluateuserconsentsrequest *EvaluateUserConsentsRequest 7264 urlParams_ gensupport.URLParams 7265 ctx_ context.Context 7266 header_ http.Header 7267} 7268 7269// EvaluateUserConsents: Evaluates the user's Consents for all matching 7270// User data mappings. Note: User data mappings are indexed 7271// asynchronously, which can cause a slight delay between the time 7272// mappings are created or updated and when they are included in 7273// EvaluateUserConsents results. 7274// 7275// - consentStore: Name of the consent store to retrieve User data 7276// mappings from. 7277func (r *ProjectsLocationsDatasetsConsentStoresService) EvaluateUserConsents(consentStore string, evaluateuserconsentsrequest *EvaluateUserConsentsRequest) *ProjectsLocationsDatasetsConsentStoresEvaluateUserConsentsCall { 7278 c := &ProjectsLocationsDatasetsConsentStoresEvaluateUserConsentsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7279 c.consentStore = consentStore 7280 c.evaluateuserconsentsrequest = evaluateuserconsentsrequest 7281 return c 7282} 7283 7284// Fields allows partial responses to be retrieved. See 7285// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7286// for more information. 7287func (c *ProjectsLocationsDatasetsConsentStoresEvaluateUserConsentsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresEvaluateUserConsentsCall { 7288 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7289 return c 7290} 7291 7292// Context sets the context to be used in this call's Do method. Any 7293// pending HTTP request will be aborted if the provided context is 7294// canceled. 7295func (c *ProjectsLocationsDatasetsConsentStoresEvaluateUserConsentsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresEvaluateUserConsentsCall { 7296 c.ctx_ = ctx 7297 return c 7298} 7299 7300// Header returns an http.Header that can be modified by the caller to 7301// add HTTP headers to the request. 7302func (c *ProjectsLocationsDatasetsConsentStoresEvaluateUserConsentsCall) Header() http.Header { 7303 if c.header_ == nil { 7304 c.header_ = make(http.Header) 7305 } 7306 return c.header_ 7307} 7308 7309func (c *ProjectsLocationsDatasetsConsentStoresEvaluateUserConsentsCall) doRequest(alt string) (*http.Response, error) { 7310 reqHeaders := make(http.Header) 7311 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 7312 for k, v := range c.header_ { 7313 reqHeaders[k] = v 7314 } 7315 reqHeaders.Set("User-Agent", c.s.userAgent()) 7316 var body io.Reader = nil 7317 body, err := googleapi.WithoutDataWrapper.JSONReader(c.evaluateuserconsentsrequest) 7318 if err != nil { 7319 return nil, err 7320 } 7321 reqHeaders.Set("Content-Type", "application/json") 7322 c.urlParams_.Set("alt", alt) 7323 c.urlParams_.Set("prettyPrint", "false") 7324 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+consentStore}:evaluateUserConsents") 7325 urls += "?" + c.urlParams_.Encode() 7326 req, err := http.NewRequest("POST", urls, body) 7327 if err != nil { 7328 return nil, err 7329 } 7330 req.Header = reqHeaders 7331 googleapi.Expand(req.URL, map[string]string{ 7332 "consentStore": c.consentStore, 7333 }) 7334 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7335} 7336 7337// Do executes the "healthcare.projects.locations.datasets.consentStores.evaluateUserConsents" call. 7338// Exactly one of *EvaluateUserConsentsResponse or error will be 7339// non-nil. Any non-2xx status code is an error. Response headers are in 7340// either *EvaluateUserConsentsResponse.ServerResponse.Header or (if a 7341// response was returned at all) in error.(*googleapi.Error).Header. Use 7342// googleapi.IsNotModified to check whether the returned error was 7343// because http.StatusNotModified was returned. 7344func (c *ProjectsLocationsDatasetsConsentStoresEvaluateUserConsentsCall) Do(opts ...googleapi.CallOption) (*EvaluateUserConsentsResponse, error) { 7345 gensupport.SetOptions(c.urlParams_, opts...) 7346 res, err := c.doRequest("json") 7347 if res != nil && res.StatusCode == http.StatusNotModified { 7348 if res.Body != nil { 7349 res.Body.Close() 7350 } 7351 return nil, &googleapi.Error{ 7352 Code: res.StatusCode, 7353 Header: res.Header, 7354 } 7355 } 7356 if err != nil { 7357 return nil, err 7358 } 7359 defer googleapi.CloseBody(res) 7360 if err := googleapi.CheckResponse(res); err != nil { 7361 return nil, err 7362 } 7363 ret := &EvaluateUserConsentsResponse{ 7364 ServerResponse: googleapi.ServerResponse{ 7365 Header: res.Header, 7366 HTTPStatusCode: res.StatusCode, 7367 }, 7368 } 7369 target := &ret 7370 if err := gensupport.DecodeResponse(target, res); err != nil { 7371 return nil, err 7372 } 7373 return ret, nil 7374 // { 7375 // "description": "Evaluates the user's Consents for all matching User data mappings. Note: User data mappings are indexed asynchronously, which can cause a slight delay between the time mappings are created or updated and when they are included in EvaluateUserConsents results.", 7376 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/consentStores/{consentStoresId}:evaluateUserConsents", 7377 // "httpMethod": "POST", 7378 // "id": "healthcare.projects.locations.datasets.consentStores.evaluateUserConsents", 7379 // "parameterOrder": [ 7380 // "consentStore" 7381 // ], 7382 // "parameters": { 7383 // "consentStore": { 7384 // "description": "Required. Name of the consent store to retrieve User data mappings from.", 7385 // "location": "path", 7386 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+$", 7387 // "required": true, 7388 // "type": "string" 7389 // } 7390 // }, 7391 // "path": "v1/{+consentStore}:evaluateUserConsents", 7392 // "request": { 7393 // "$ref": "EvaluateUserConsentsRequest" 7394 // }, 7395 // "response": { 7396 // "$ref": "EvaluateUserConsentsResponse" 7397 // }, 7398 // "scopes": [ 7399 // "https://www.googleapis.com/auth/cloud-platform" 7400 // ] 7401 // } 7402 7403} 7404 7405// Pages invokes f for each page of results. 7406// A non-nil error returned from f will halt the iteration. 7407// The provided context supersedes any context provided to the Context method. 7408func (c *ProjectsLocationsDatasetsConsentStoresEvaluateUserConsentsCall) Pages(ctx context.Context, f func(*EvaluateUserConsentsResponse) error) error { 7409 c.ctx_ = ctx 7410 defer func(pt string) { c.evaluateuserconsentsrequest.PageToken = pt }(c.evaluateuserconsentsrequest.PageToken) // reset paging to original point 7411 for { 7412 x, err := c.Do() 7413 if err != nil { 7414 return err 7415 } 7416 if err := f(x); err != nil { 7417 return err 7418 } 7419 if x.NextPageToken == "" { 7420 return nil 7421 } 7422 c.evaluateuserconsentsrequest.PageToken = x.NextPageToken 7423 } 7424} 7425 7426// method id "healthcare.projects.locations.datasets.consentStores.get": 7427 7428type ProjectsLocationsDatasetsConsentStoresGetCall struct { 7429 s *Service 7430 name string 7431 urlParams_ gensupport.URLParams 7432 ifNoneMatch_ string 7433 ctx_ context.Context 7434 header_ http.Header 7435} 7436 7437// Get: Gets the specified consent store. 7438// 7439// - name: The resource name of the consent store to get. 7440func (r *ProjectsLocationsDatasetsConsentStoresService) Get(name string) *ProjectsLocationsDatasetsConsentStoresGetCall { 7441 c := &ProjectsLocationsDatasetsConsentStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7442 c.name = name 7443 return c 7444} 7445 7446// Fields allows partial responses to be retrieved. See 7447// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7448// for more information. 7449func (c *ProjectsLocationsDatasetsConsentStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresGetCall { 7450 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7451 return c 7452} 7453 7454// IfNoneMatch sets the optional parameter which makes the operation 7455// fail if the object's ETag matches the given value. This is useful for 7456// getting updates only after the object has changed since the last 7457// request. Use googleapi.IsNotModified to check whether the response 7458// error from Do is the result of In-None-Match. 7459func (c *ProjectsLocationsDatasetsConsentStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsConsentStoresGetCall { 7460 c.ifNoneMatch_ = entityTag 7461 return c 7462} 7463 7464// Context sets the context to be used in this call's Do method. Any 7465// pending HTTP request will be aborted if the provided context is 7466// canceled. 7467func (c *ProjectsLocationsDatasetsConsentStoresGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresGetCall { 7468 c.ctx_ = ctx 7469 return c 7470} 7471 7472// Header returns an http.Header that can be modified by the caller to 7473// add HTTP headers to the request. 7474func (c *ProjectsLocationsDatasetsConsentStoresGetCall) Header() http.Header { 7475 if c.header_ == nil { 7476 c.header_ = make(http.Header) 7477 } 7478 return c.header_ 7479} 7480 7481func (c *ProjectsLocationsDatasetsConsentStoresGetCall) doRequest(alt string) (*http.Response, error) { 7482 reqHeaders := make(http.Header) 7483 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 7484 for k, v := range c.header_ { 7485 reqHeaders[k] = v 7486 } 7487 reqHeaders.Set("User-Agent", c.s.userAgent()) 7488 if c.ifNoneMatch_ != "" { 7489 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7490 } 7491 var body io.Reader = nil 7492 c.urlParams_.Set("alt", alt) 7493 c.urlParams_.Set("prettyPrint", "false") 7494 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 7495 urls += "?" + c.urlParams_.Encode() 7496 req, err := http.NewRequest("GET", urls, body) 7497 if err != nil { 7498 return nil, err 7499 } 7500 req.Header = reqHeaders 7501 googleapi.Expand(req.URL, map[string]string{ 7502 "name": c.name, 7503 }) 7504 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7505} 7506 7507// Do executes the "healthcare.projects.locations.datasets.consentStores.get" call. 7508// Exactly one of *ConsentStore or error will be non-nil. Any non-2xx 7509// status code is an error. Response headers are in either 7510// *ConsentStore.ServerResponse.Header or (if a response was returned at 7511// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7512// to check whether the returned error was because 7513// http.StatusNotModified was returned. 7514func (c *ProjectsLocationsDatasetsConsentStoresGetCall) Do(opts ...googleapi.CallOption) (*ConsentStore, error) { 7515 gensupport.SetOptions(c.urlParams_, opts...) 7516 res, err := c.doRequest("json") 7517 if res != nil && res.StatusCode == http.StatusNotModified { 7518 if res.Body != nil { 7519 res.Body.Close() 7520 } 7521 return nil, &googleapi.Error{ 7522 Code: res.StatusCode, 7523 Header: res.Header, 7524 } 7525 } 7526 if err != nil { 7527 return nil, err 7528 } 7529 defer googleapi.CloseBody(res) 7530 if err := googleapi.CheckResponse(res); err != nil { 7531 return nil, err 7532 } 7533 ret := &ConsentStore{ 7534 ServerResponse: googleapi.ServerResponse{ 7535 Header: res.Header, 7536 HTTPStatusCode: res.StatusCode, 7537 }, 7538 } 7539 target := &ret 7540 if err := gensupport.DecodeResponse(target, res); err != nil { 7541 return nil, err 7542 } 7543 return ret, nil 7544 // { 7545 // "description": "Gets the specified consent store.", 7546 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/consentStores/{consentStoresId}", 7547 // "httpMethod": "GET", 7548 // "id": "healthcare.projects.locations.datasets.consentStores.get", 7549 // "parameterOrder": [ 7550 // "name" 7551 // ], 7552 // "parameters": { 7553 // "name": { 7554 // "description": "Required. The resource name of the consent store to get.", 7555 // "location": "path", 7556 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+$", 7557 // "required": true, 7558 // "type": "string" 7559 // } 7560 // }, 7561 // "path": "v1/{+name}", 7562 // "response": { 7563 // "$ref": "ConsentStore" 7564 // }, 7565 // "scopes": [ 7566 // "https://www.googleapis.com/auth/cloud-platform" 7567 // ] 7568 // } 7569 7570} 7571 7572// method id "healthcare.projects.locations.datasets.consentStores.getIamPolicy": 7573 7574type ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall struct { 7575 s *Service 7576 resource string 7577 urlParams_ gensupport.URLParams 7578 ifNoneMatch_ string 7579 ctx_ context.Context 7580 header_ http.Header 7581} 7582 7583// GetIamPolicy: Gets the access control policy for a resource. Returns 7584// an empty policy if the resource exists and does not have a policy 7585// set. 7586// 7587// - resource: REQUIRED: The resource for which the policy is being 7588// requested. See the operation documentation for the appropriate 7589// value for this field. 7590func (r *ProjectsLocationsDatasetsConsentStoresService) GetIamPolicy(resource string) *ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall { 7591 c := &ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7592 c.resource = resource 7593 return c 7594} 7595 7596// OptionsRequestedPolicyVersion sets the optional parameter 7597// "options.requestedPolicyVersion": The policy format version to be 7598// returned. Valid values are 0, 1, and 3. Requests specifying an 7599// invalid value will be rejected. Requests for policies with any 7600// conditional bindings must specify version 3. Policies without any 7601// conditional bindings may specify any valid value or leave the field 7602// unset. To learn which resources support conditions in their IAM 7603// policies, see the IAM documentation 7604// (https://cloud.google.com/iam/help/conditions/resource-policies). 7605func (c *ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall { 7606 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) 7607 return c 7608} 7609 7610// Fields allows partial responses to be retrieved. See 7611// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7612// for more information. 7613func (c *ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall { 7614 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7615 return c 7616} 7617 7618// IfNoneMatch sets the optional parameter which makes the operation 7619// fail if the object's ETag matches the given value. This is useful for 7620// getting updates only after the object has changed since the last 7621// request. Use googleapi.IsNotModified to check whether the response 7622// error from Do is the result of In-None-Match. 7623func (c *ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall { 7624 c.ifNoneMatch_ = entityTag 7625 return c 7626} 7627 7628// Context sets the context to be used in this call's Do method. Any 7629// pending HTTP request will be aborted if the provided context is 7630// canceled. 7631func (c *ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall { 7632 c.ctx_ = ctx 7633 return c 7634} 7635 7636// Header returns an http.Header that can be modified by the caller to 7637// add HTTP headers to the request. 7638func (c *ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall) Header() http.Header { 7639 if c.header_ == nil { 7640 c.header_ = make(http.Header) 7641 } 7642 return c.header_ 7643} 7644 7645func (c *ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 7646 reqHeaders := make(http.Header) 7647 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 7648 for k, v := range c.header_ { 7649 reqHeaders[k] = v 7650 } 7651 reqHeaders.Set("User-Agent", c.s.userAgent()) 7652 if c.ifNoneMatch_ != "" { 7653 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7654 } 7655 var body io.Reader = nil 7656 c.urlParams_.Set("alt", alt) 7657 c.urlParams_.Set("prettyPrint", "false") 7658 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") 7659 urls += "?" + c.urlParams_.Encode() 7660 req, err := http.NewRequest("GET", urls, body) 7661 if err != nil { 7662 return nil, err 7663 } 7664 req.Header = reqHeaders 7665 googleapi.Expand(req.URL, map[string]string{ 7666 "resource": c.resource, 7667 }) 7668 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7669} 7670 7671// Do executes the "healthcare.projects.locations.datasets.consentStores.getIamPolicy" call. 7672// Exactly one of *Policy or error will be non-nil. Any non-2xx status 7673// code is an error. Response headers are in either 7674// *Policy.ServerResponse.Header or (if a response was returned at all) 7675// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 7676// check whether the returned error was because http.StatusNotModified 7677// was returned. 7678func (c *ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 7679 gensupport.SetOptions(c.urlParams_, opts...) 7680 res, err := c.doRequest("json") 7681 if res != nil && res.StatusCode == http.StatusNotModified { 7682 if res.Body != nil { 7683 res.Body.Close() 7684 } 7685 return nil, &googleapi.Error{ 7686 Code: res.StatusCode, 7687 Header: res.Header, 7688 } 7689 } 7690 if err != nil { 7691 return nil, err 7692 } 7693 defer googleapi.CloseBody(res) 7694 if err := googleapi.CheckResponse(res); err != nil { 7695 return nil, err 7696 } 7697 ret := &Policy{ 7698 ServerResponse: googleapi.ServerResponse{ 7699 Header: res.Header, 7700 HTTPStatusCode: res.StatusCode, 7701 }, 7702 } 7703 target := &ret 7704 if err := gensupport.DecodeResponse(target, res); err != nil { 7705 return nil, err 7706 } 7707 return ret, nil 7708 // { 7709 // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", 7710 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/consentStores/{consentStoresId}:getIamPolicy", 7711 // "httpMethod": "GET", 7712 // "id": "healthcare.projects.locations.datasets.consentStores.getIamPolicy", 7713 // "parameterOrder": [ 7714 // "resource" 7715 // ], 7716 // "parameters": { 7717 // "options.requestedPolicyVersion": { 7718 // "description": "Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", 7719 // "format": "int32", 7720 // "location": "query", 7721 // "type": "integer" 7722 // }, 7723 // "resource": { 7724 // "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", 7725 // "location": "path", 7726 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+$", 7727 // "required": true, 7728 // "type": "string" 7729 // } 7730 // }, 7731 // "path": "v1/{+resource}:getIamPolicy", 7732 // "response": { 7733 // "$ref": "Policy" 7734 // }, 7735 // "scopes": [ 7736 // "https://www.googleapis.com/auth/cloud-platform" 7737 // ] 7738 // } 7739 7740} 7741 7742// method id "healthcare.projects.locations.datasets.consentStores.list": 7743 7744type ProjectsLocationsDatasetsConsentStoresListCall struct { 7745 s *Service 7746 parent string 7747 urlParams_ gensupport.URLParams 7748 ifNoneMatch_ string 7749 ctx_ context.Context 7750 header_ http.Header 7751} 7752 7753// List: Lists the consent stores in the specified dataset. 7754// 7755// - parent: Name of the dataset. 7756func (r *ProjectsLocationsDatasetsConsentStoresService) List(parent string) *ProjectsLocationsDatasetsConsentStoresListCall { 7757 c := &ProjectsLocationsDatasetsConsentStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7758 c.parent = parent 7759 return c 7760} 7761 7762// Filter sets the optional parameter "filter": Restricts the stores 7763// returned to those matching a filter. Only filtering on labels is 7764// supported. For example, `filter=labels.key=value`. 7765func (c *ProjectsLocationsDatasetsConsentStoresListCall) Filter(filter string) *ProjectsLocationsDatasetsConsentStoresListCall { 7766 c.urlParams_.Set("filter", filter) 7767 return c 7768} 7769 7770// PageSize sets the optional parameter "pageSize": Limit on the number 7771// of consent stores to return in a single response. If not specified, 7772// 100 is used. May not be larger than 1000. 7773func (c *ProjectsLocationsDatasetsConsentStoresListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsConsentStoresListCall { 7774 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 7775 return c 7776} 7777 7778// PageToken sets the optional parameter "pageToken": Token to retrieve 7779// the next page of results, or empty to get the first page. 7780func (c *ProjectsLocationsDatasetsConsentStoresListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsConsentStoresListCall { 7781 c.urlParams_.Set("pageToken", pageToken) 7782 return c 7783} 7784 7785// Fields allows partial responses to be retrieved. See 7786// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7787// for more information. 7788func (c *ProjectsLocationsDatasetsConsentStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresListCall { 7789 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7790 return c 7791} 7792 7793// IfNoneMatch sets the optional parameter which makes the operation 7794// fail if the object's ETag matches the given value. This is useful for 7795// getting updates only after the object has changed since the last 7796// request. Use googleapi.IsNotModified to check whether the response 7797// error from Do is the result of In-None-Match. 7798func (c *ProjectsLocationsDatasetsConsentStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsConsentStoresListCall { 7799 c.ifNoneMatch_ = entityTag 7800 return c 7801} 7802 7803// Context sets the context to be used in this call's Do method. Any 7804// pending HTTP request will be aborted if the provided context is 7805// canceled. 7806func (c *ProjectsLocationsDatasetsConsentStoresListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresListCall { 7807 c.ctx_ = ctx 7808 return c 7809} 7810 7811// Header returns an http.Header that can be modified by the caller to 7812// add HTTP headers to the request. 7813func (c *ProjectsLocationsDatasetsConsentStoresListCall) Header() http.Header { 7814 if c.header_ == nil { 7815 c.header_ = make(http.Header) 7816 } 7817 return c.header_ 7818} 7819 7820func (c *ProjectsLocationsDatasetsConsentStoresListCall) doRequest(alt string) (*http.Response, error) { 7821 reqHeaders := make(http.Header) 7822 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 7823 for k, v := range c.header_ { 7824 reqHeaders[k] = v 7825 } 7826 reqHeaders.Set("User-Agent", c.s.userAgent()) 7827 if c.ifNoneMatch_ != "" { 7828 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7829 } 7830 var body io.Reader = nil 7831 c.urlParams_.Set("alt", alt) 7832 c.urlParams_.Set("prettyPrint", "false") 7833 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/consentStores") 7834 urls += "?" + c.urlParams_.Encode() 7835 req, err := http.NewRequest("GET", urls, body) 7836 if err != nil { 7837 return nil, err 7838 } 7839 req.Header = reqHeaders 7840 googleapi.Expand(req.URL, map[string]string{ 7841 "parent": c.parent, 7842 }) 7843 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7844} 7845 7846// Do executes the "healthcare.projects.locations.datasets.consentStores.list" call. 7847// Exactly one of *ListConsentStoresResponse or error will be non-nil. 7848// Any non-2xx status code is an error. Response headers are in either 7849// *ListConsentStoresResponse.ServerResponse.Header or (if a response 7850// was returned at all) in error.(*googleapi.Error).Header. Use 7851// googleapi.IsNotModified to check whether the returned error was 7852// because http.StatusNotModified was returned. 7853func (c *ProjectsLocationsDatasetsConsentStoresListCall) Do(opts ...googleapi.CallOption) (*ListConsentStoresResponse, error) { 7854 gensupport.SetOptions(c.urlParams_, opts...) 7855 res, err := c.doRequest("json") 7856 if res != nil && res.StatusCode == http.StatusNotModified { 7857 if res.Body != nil { 7858 res.Body.Close() 7859 } 7860 return nil, &googleapi.Error{ 7861 Code: res.StatusCode, 7862 Header: res.Header, 7863 } 7864 } 7865 if err != nil { 7866 return nil, err 7867 } 7868 defer googleapi.CloseBody(res) 7869 if err := googleapi.CheckResponse(res); err != nil { 7870 return nil, err 7871 } 7872 ret := &ListConsentStoresResponse{ 7873 ServerResponse: googleapi.ServerResponse{ 7874 Header: res.Header, 7875 HTTPStatusCode: res.StatusCode, 7876 }, 7877 } 7878 target := &ret 7879 if err := gensupport.DecodeResponse(target, res); err != nil { 7880 return nil, err 7881 } 7882 return ret, nil 7883 // { 7884 // "description": "Lists the consent stores in the specified dataset.", 7885 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/consentStores", 7886 // "httpMethod": "GET", 7887 // "id": "healthcare.projects.locations.datasets.consentStores.list", 7888 // "parameterOrder": [ 7889 // "parent" 7890 // ], 7891 // "parameters": { 7892 // "filter": { 7893 // "description": "Optional. Restricts the stores returned to those matching a filter. Only filtering on labels is supported. For example, `filter=labels.key=value`.", 7894 // "location": "query", 7895 // "type": "string" 7896 // }, 7897 // "pageSize": { 7898 // "description": "Optional. Limit on the number of consent stores to return in a single response. If not specified, 100 is used. May not be larger than 1000.", 7899 // "format": "int32", 7900 // "location": "query", 7901 // "type": "integer" 7902 // }, 7903 // "pageToken": { 7904 // "description": "Optional. Token to retrieve the next page of results, or empty to get the first page.", 7905 // "location": "query", 7906 // "type": "string" 7907 // }, 7908 // "parent": { 7909 // "description": "Required. Name of the dataset.", 7910 // "location": "path", 7911 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", 7912 // "required": true, 7913 // "type": "string" 7914 // } 7915 // }, 7916 // "path": "v1/{+parent}/consentStores", 7917 // "response": { 7918 // "$ref": "ListConsentStoresResponse" 7919 // }, 7920 // "scopes": [ 7921 // "https://www.googleapis.com/auth/cloud-platform" 7922 // ] 7923 // } 7924 7925} 7926 7927// Pages invokes f for each page of results. 7928// A non-nil error returned from f will halt the iteration. 7929// The provided context supersedes any context provided to the Context method. 7930func (c *ProjectsLocationsDatasetsConsentStoresListCall) Pages(ctx context.Context, f func(*ListConsentStoresResponse) error) error { 7931 c.ctx_ = ctx 7932 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 7933 for { 7934 x, err := c.Do() 7935 if err != nil { 7936 return err 7937 } 7938 if err := f(x); err != nil { 7939 return err 7940 } 7941 if x.NextPageToken == "" { 7942 return nil 7943 } 7944 c.PageToken(x.NextPageToken) 7945 } 7946} 7947 7948// method id "healthcare.projects.locations.datasets.consentStores.patch": 7949 7950type ProjectsLocationsDatasetsConsentStoresPatchCall struct { 7951 s *Service 7952 name string 7953 consentstore *ConsentStore 7954 urlParams_ gensupport.URLParams 7955 ctx_ context.Context 7956 header_ http.Header 7957} 7958 7959// Patch: Updates the specified consent store. 7960// 7961// - name: Resource name of the consent store, of the form 7962// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 7963// /consentStores/{consent_store_id}`. Cannot be changed after 7964// creation. 7965func (r *ProjectsLocationsDatasetsConsentStoresService) Patch(name string, consentstore *ConsentStore) *ProjectsLocationsDatasetsConsentStoresPatchCall { 7966 c := &ProjectsLocationsDatasetsConsentStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7967 c.name = name 7968 c.consentstore = consentstore 7969 return c 7970} 7971 7972// UpdateMask sets the optional parameter "updateMask": Required. The 7973// update mask that applies to the resource. For the `FieldMask` 7974// definition, see 7975// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. 7976// Only the `labels`, `default_consent_ttl`, and 7977// `enable_consent_create_on_update` fields are allowed to be updated. 7978func (c *ProjectsLocationsDatasetsConsentStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsConsentStoresPatchCall { 7979 c.urlParams_.Set("updateMask", updateMask) 7980 return c 7981} 7982 7983// Fields allows partial responses to be retrieved. See 7984// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7985// for more information. 7986func (c *ProjectsLocationsDatasetsConsentStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresPatchCall { 7987 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7988 return c 7989} 7990 7991// Context sets the context to be used in this call's Do method. Any 7992// pending HTTP request will be aborted if the provided context is 7993// canceled. 7994func (c *ProjectsLocationsDatasetsConsentStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresPatchCall { 7995 c.ctx_ = ctx 7996 return c 7997} 7998 7999// Header returns an http.Header that can be modified by the caller to 8000// add HTTP headers to the request. 8001func (c *ProjectsLocationsDatasetsConsentStoresPatchCall) Header() http.Header { 8002 if c.header_ == nil { 8003 c.header_ = make(http.Header) 8004 } 8005 return c.header_ 8006} 8007 8008func (c *ProjectsLocationsDatasetsConsentStoresPatchCall) doRequest(alt string) (*http.Response, error) { 8009 reqHeaders := make(http.Header) 8010 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 8011 for k, v := range c.header_ { 8012 reqHeaders[k] = v 8013 } 8014 reqHeaders.Set("User-Agent", c.s.userAgent()) 8015 var body io.Reader = nil 8016 body, err := googleapi.WithoutDataWrapper.JSONReader(c.consentstore) 8017 if err != nil { 8018 return nil, err 8019 } 8020 reqHeaders.Set("Content-Type", "application/json") 8021 c.urlParams_.Set("alt", alt) 8022 c.urlParams_.Set("prettyPrint", "false") 8023 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 8024 urls += "?" + c.urlParams_.Encode() 8025 req, err := http.NewRequest("PATCH", urls, body) 8026 if err != nil { 8027 return nil, err 8028 } 8029 req.Header = reqHeaders 8030 googleapi.Expand(req.URL, map[string]string{ 8031 "name": c.name, 8032 }) 8033 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8034} 8035 8036// Do executes the "healthcare.projects.locations.datasets.consentStores.patch" call. 8037// Exactly one of *ConsentStore or error will be non-nil. Any non-2xx 8038// status code is an error. Response headers are in either 8039// *ConsentStore.ServerResponse.Header or (if a response was returned at 8040// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8041// to check whether the returned error was because 8042// http.StatusNotModified was returned. 8043func (c *ProjectsLocationsDatasetsConsentStoresPatchCall) Do(opts ...googleapi.CallOption) (*ConsentStore, error) { 8044 gensupport.SetOptions(c.urlParams_, opts...) 8045 res, err := c.doRequest("json") 8046 if res != nil && res.StatusCode == http.StatusNotModified { 8047 if res.Body != nil { 8048 res.Body.Close() 8049 } 8050 return nil, &googleapi.Error{ 8051 Code: res.StatusCode, 8052 Header: res.Header, 8053 } 8054 } 8055 if err != nil { 8056 return nil, err 8057 } 8058 defer googleapi.CloseBody(res) 8059 if err := googleapi.CheckResponse(res); err != nil { 8060 return nil, err 8061 } 8062 ret := &ConsentStore{ 8063 ServerResponse: googleapi.ServerResponse{ 8064 Header: res.Header, 8065 HTTPStatusCode: res.StatusCode, 8066 }, 8067 } 8068 target := &ret 8069 if err := gensupport.DecodeResponse(target, res); err != nil { 8070 return nil, err 8071 } 8072 return ret, nil 8073 // { 8074 // "description": "Updates the specified consent store.", 8075 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/consentStores/{consentStoresId}", 8076 // "httpMethod": "PATCH", 8077 // "id": "healthcare.projects.locations.datasets.consentStores.patch", 8078 // "parameterOrder": [ 8079 // "name" 8080 // ], 8081 // "parameters": { 8082 // "name": { 8083 // "description": "Resource name of the consent store, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}`. Cannot be changed after creation.", 8084 // "location": "path", 8085 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+$", 8086 // "required": true, 8087 // "type": "string" 8088 // }, 8089 // "updateMask": { 8090 // "description": "Required. The update mask that applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. Only the `labels`, `default_consent_ttl`, and `enable_consent_create_on_update` fields are allowed to be updated.", 8091 // "format": "google-fieldmask", 8092 // "location": "query", 8093 // "type": "string" 8094 // } 8095 // }, 8096 // "path": "v1/{+name}", 8097 // "request": { 8098 // "$ref": "ConsentStore" 8099 // }, 8100 // "response": { 8101 // "$ref": "ConsentStore" 8102 // }, 8103 // "scopes": [ 8104 // "https://www.googleapis.com/auth/cloud-platform" 8105 // ] 8106 // } 8107 8108} 8109 8110// method id "healthcare.projects.locations.datasets.consentStores.queryAccessibleData": 8111 8112type ProjectsLocationsDatasetsConsentStoresQueryAccessibleDataCall struct { 8113 s *Service 8114 consentStore string 8115 queryaccessibledatarequest *QueryAccessibleDataRequest 8116 urlParams_ gensupport.URLParams 8117 ctx_ context.Context 8118 header_ http.Header 8119} 8120 8121// QueryAccessibleData: Queries all data_ids that are consented for a 8122// specified use in the given consent store and writes them to a 8123// specified destination. The returned Operation includes a progress 8124// counter for the number of User data mappings processed. If the 8125// request is successful, a detailed response is returned of type 8126// QueryAccessibleDataResponse, contained in the response field when the 8127// operation finishes. The metadata field type is OperationMetadata. 8128// Errors are logged to Cloud Logging (see Viewing error logs in Cloud 8129// Logging (https://cloud.google.com/healthcare/docs/how-tos/logging)). 8130// For example, the following sample log entry shows a `failed to 8131// evaluate consent policy` error that occurred during a 8132// QueryAccessibleData call to consent store 8133// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/c 8134// onsentStores/{consent_store_id}`. ```json jsonPayload: { @type: 8135// "type.googleapis.com/google.cloud.healthcare.logging.QueryAccessibleDa 8136// taLogEntry" error: { code: 9 message: "failed to evaluate consent 8137// policy" } resourceName: 8138// "projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/c 8139// onsentStores/{consent_store_id}/consents/{consent_id}" } logName: 8140// "projects/{project_id}/logs/healthcare.googleapis.com%2Fquery_accessib 8141// le_data" operation: { id: 8142// "projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/o 8143// perations/{operation_id}" producer: 8144// "healthcare.googleapis.com/QueryAccessibleData" } receiveTimestamp: 8145// "TIMESTAMP" resource: { labels: { consent_store_id: 8146// "{consent_store_id}" dataset_id: "{dataset_id}" location: 8147// "{location_id}" project_id: "{project_id}" } type: 8148// "healthcare_consent_store" } severity: "ERROR" timestamp: "TIMESTAMP" 8149// ``` 8150// 8151// - consentStore: Name of the consent store to retrieve User data 8152// mappings from. 8153func (r *ProjectsLocationsDatasetsConsentStoresService) QueryAccessibleData(consentStore string, queryaccessibledatarequest *QueryAccessibleDataRequest) *ProjectsLocationsDatasetsConsentStoresQueryAccessibleDataCall { 8154 c := &ProjectsLocationsDatasetsConsentStoresQueryAccessibleDataCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8155 c.consentStore = consentStore 8156 c.queryaccessibledatarequest = queryaccessibledatarequest 8157 return c 8158} 8159 8160// Fields allows partial responses to be retrieved. See 8161// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8162// for more information. 8163func (c *ProjectsLocationsDatasetsConsentStoresQueryAccessibleDataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresQueryAccessibleDataCall { 8164 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8165 return c 8166} 8167 8168// Context sets the context to be used in this call's Do method. Any 8169// pending HTTP request will be aborted if the provided context is 8170// canceled. 8171func (c *ProjectsLocationsDatasetsConsentStoresQueryAccessibleDataCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresQueryAccessibleDataCall { 8172 c.ctx_ = ctx 8173 return c 8174} 8175 8176// Header returns an http.Header that can be modified by the caller to 8177// add HTTP headers to the request. 8178func (c *ProjectsLocationsDatasetsConsentStoresQueryAccessibleDataCall) Header() http.Header { 8179 if c.header_ == nil { 8180 c.header_ = make(http.Header) 8181 } 8182 return c.header_ 8183} 8184 8185func (c *ProjectsLocationsDatasetsConsentStoresQueryAccessibleDataCall) doRequest(alt string) (*http.Response, error) { 8186 reqHeaders := make(http.Header) 8187 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 8188 for k, v := range c.header_ { 8189 reqHeaders[k] = v 8190 } 8191 reqHeaders.Set("User-Agent", c.s.userAgent()) 8192 var body io.Reader = nil 8193 body, err := googleapi.WithoutDataWrapper.JSONReader(c.queryaccessibledatarequest) 8194 if err != nil { 8195 return nil, err 8196 } 8197 reqHeaders.Set("Content-Type", "application/json") 8198 c.urlParams_.Set("alt", alt) 8199 c.urlParams_.Set("prettyPrint", "false") 8200 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+consentStore}:queryAccessibleData") 8201 urls += "?" + c.urlParams_.Encode() 8202 req, err := http.NewRequest("POST", urls, body) 8203 if err != nil { 8204 return nil, err 8205 } 8206 req.Header = reqHeaders 8207 googleapi.Expand(req.URL, map[string]string{ 8208 "consentStore": c.consentStore, 8209 }) 8210 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8211} 8212 8213// Do executes the "healthcare.projects.locations.datasets.consentStores.queryAccessibleData" call. 8214// Exactly one of *Operation or error will be non-nil. Any non-2xx 8215// status code is an error. Response headers are in either 8216// *Operation.ServerResponse.Header or (if a response was returned at 8217// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8218// to check whether the returned error was because 8219// http.StatusNotModified was returned. 8220func (c *ProjectsLocationsDatasetsConsentStoresQueryAccessibleDataCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 8221 gensupport.SetOptions(c.urlParams_, opts...) 8222 res, err := c.doRequest("json") 8223 if res != nil && res.StatusCode == http.StatusNotModified { 8224 if res.Body != nil { 8225 res.Body.Close() 8226 } 8227 return nil, &googleapi.Error{ 8228 Code: res.StatusCode, 8229 Header: res.Header, 8230 } 8231 } 8232 if err != nil { 8233 return nil, err 8234 } 8235 defer googleapi.CloseBody(res) 8236 if err := googleapi.CheckResponse(res); err != nil { 8237 return nil, err 8238 } 8239 ret := &Operation{ 8240 ServerResponse: googleapi.ServerResponse{ 8241 Header: res.Header, 8242 HTTPStatusCode: res.StatusCode, 8243 }, 8244 } 8245 target := &ret 8246 if err := gensupport.DecodeResponse(target, res); err != nil { 8247 return nil, err 8248 } 8249 return ret, nil 8250 // { 8251 // "description": "Queries all data_ids that are consented for a specified use in the given consent store and writes them to a specified destination. The returned Operation includes a progress counter for the number of User data mappings processed. If the request is successful, a detailed response is returned of type QueryAccessibleDataResponse, contained in the response field when the operation finishes. The metadata field type is OperationMetadata. Errors are logged to Cloud Logging (see [Viewing error logs in Cloud Logging](https://cloud.google.com/healthcare/docs/how-tos/logging)). For example, the following sample log entry shows a `failed to evaluate consent policy` error that occurred during a QueryAccessibleData call to consent store `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}`. ```json jsonPayload: { @type: \"type.googleapis.com/google.cloud.healthcare.logging.QueryAccessibleDataLogEntry\" error: { code: 9 message: \"failed to evaluate consent policy\" } resourceName: \"projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}\" } logName: \"projects/{project_id}/logs/healthcare.googleapis.com%2Fquery_accessible_data\" operation: { id: \"projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/operations/{operation_id}\" producer: \"healthcare.googleapis.com/QueryAccessibleData\" } receiveTimestamp: \"TIMESTAMP\" resource: { labels: { consent_store_id: \"{consent_store_id}\" dataset_id: \"{dataset_id}\" location: \"{location_id}\" project_id: \"{project_id}\" } type: \"healthcare_consent_store\" } severity: \"ERROR\" timestamp: \"TIMESTAMP\" ```", 8252 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/consentStores/{consentStoresId}:queryAccessibleData", 8253 // "httpMethod": "POST", 8254 // "id": "healthcare.projects.locations.datasets.consentStores.queryAccessibleData", 8255 // "parameterOrder": [ 8256 // "consentStore" 8257 // ], 8258 // "parameters": { 8259 // "consentStore": { 8260 // "description": "Required. Name of the consent store to retrieve User data mappings from.", 8261 // "location": "path", 8262 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+$", 8263 // "required": true, 8264 // "type": "string" 8265 // } 8266 // }, 8267 // "path": "v1/{+consentStore}:queryAccessibleData", 8268 // "request": { 8269 // "$ref": "QueryAccessibleDataRequest" 8270 // }, 8271 // "response": { 8272 // "$ref": "Operation" 8273 // }, 8274 // "scopes": [ 8275 // "https://www.googleapis.com/auth/cloud-platform" 8276 // ] 8277 // } 8278 8279} 8280 8281// method id "healthcare.projects.locations.datasets.consentStores.setIamPolicy": 8282 8283type ProjectsLocationsDatasetsConsentStoresSetIamPolicyCall struct { 8284 s *Service 8285 resource string 8286 setiampolicyrequest *SetIamPolicyRequest 8287 urlParams_ gensupport.URLParams 8288 ctx_ context.Context 8289 header_ http.Header 8290} 8291 8292// SetIamPolicy: Sets the access control policy on the specified 8293// resource. Replaces any existing policy. Can return `NOT_FOUND`, 8294// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. 8295// 8296// - resource: REQUIRED: The resource for which the policy is being 8297// specified. See the operation documentation for the appropriate 8298// value for this field. 8299func (r *ProjectsLocationsDatasetsConsentStoresService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsConsentStoresSetIamPolicyCall { 8300 c := &ProjectsLocationsDatasetsConsentStoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8301 c.resource = resource 8302 c.setiampolicyrequest = setiampolicyrequest 8303 return c 8304} 8305 8306// Fields allows partial responses to be retrieved. See 8307// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8308// for more information. 8309func (c *ProjectsLocationsDatasetsConsentStoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresSetIamPolicyCall { 8310 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8311 return c 8312} 8313 8314// Context sets the context to be used in this call's Do method. Any 8315// pending HTTP request will be aborted if the provided context is 8316// canceled. 8317func (c *ProjectsLocationsDatasetsConsentStoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresSetIamPolicyCall { 8318 c.ctx_ = ctx 8319 return c 8320} 8321 8322// Header returns an http.Header that can be modified by the caller to 8323// add HTTP headers to the request. 8324func (c *ProjectsLocationsDatasetsConsentStoresSetIamPolicyCall) Header() http.Header { 8325 if c.header_ == nil { 8326 c.header_ = make(http.Header) 8327 } 8328 return c.header_ 8329} 8330 8331func (c *ProjectsLocationsDatasetsConsentStoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 8332 reqHeaders := make(http.Header) 8333 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 8334 for k, v := range c.header_ { 8335 reqHeaders[k] = v 8336 } 8337 reqHeaders.Set("User-Agent", c.s.userAgent()) 8338 var body io.Reader = nil 8339 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 8340 if err != nil { 8341 return nil, err 8342 } 8343 reqHeaders.Set("Content-Type", "application/json") 8344 c.urlParams_.Set("alt", alt) 8345 c.urlParams_.Set("prettyPrint", "false") 8346 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") 8347 urls += "?" + c.urlParams_.Encode() 8348 req, err := http.NewRequest("POST", urls, body) 8349 if err != nil { 8350 return nil, err 8351 } 8352 req.Header = reqHeaders 8353 googleapi.Expand(req.URL, map[string]string{ 8354 "resource": c.resource, 8355 }) 8356 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8357} 8358 8359// Do executes the "healthcare.projects.locations.datasets.consentStores.setIamPolicy" call. 8360// Exactly one of *Policy or error will be non-nil. Any non-2xx status 8361// code is an error. Response headers are in either 8362// *Policy.ServerResponse.Header or (if a response was returned at all) 8363// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 8364// check whether the returned error was because http.StatusNotModified 8365// was returned. 8366func (c *ProjectsLocationsDatasetsConsentStoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 8367 gensupport.SetOptions(c.urlParams_, opts...) 8368 res, err := c.doRequest("json") 8369 if res != nil && res.StatusCode == http.StatusNotModified { 8370 if res.Body != nil { 8371 res.Body.Close() 8372 } 8373 return nil, &googleapi.Error{ 8374 Code: res.StatusCode, 8375 Header: res.Header, 8376 } 8377 } 8378 if err != nil { 8379 return nil, err 8380 } 8381 defer googleapi.CloseBody(res) 8382 if err := googleapi.CheckResponse(res); err != nil { 8383 return nil, err 8384 } 8385 ret := &Policy{ 8386 ServerResponse: googleapi.ServerResponse{ 8387 Header: res.Header, 8388 HTTPStatusCode: res.StatusCode, 8389 }, 8390 } 8391 target := &ret 8392 if err := gensupport.DecodeResponse(target, res); err != nil { 8393 return nil, err 8394 } 8395 return ret, nil 8396 // { 8397 // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", 8398 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/consentStores/{consentStoresId}:setIamPolicy", 8399 // "httpMethod": "POST", 8400 // "id": "healthcare.projects.locations.datasets.consentStores.setIamPolicy", 8401 // "parameterOrder": [ 8402 // "resource" 8403 // ], 8404 // "parameters": { 8405 // "resource": { 8406 // "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", 8407 // "location": "path", 8408 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+$", 8409 // "required": true, 8410 // "type": "string" 8411 // } 8412 // }, 8413 // "path": "v1/{+resource}:setIamPolicy", 8414 // "request": { 8415 // "$ref": "SetIamPolicyRequest" 8416 // }, 8417 // "response": { 8418 // "$ref": "Policy" 8419 // }, 8420 // "scopes": [ 8421 // "https://www.googleapis.com/auth/cloud-platform" 8422 // ] 8423 // } 8424 8425} 8426 8427// method id "healthcare.projects.locations.datasets.consentStores.testIamPermissions": 8428 8429type ProjectsLocationsDatasetsConsentStoresTestIamPermissionsCall struct { 8430 s *Service 8431 resource string 8432 testiampermissionsrequest *TestIamPermissionsRequest 8433 urlParams_ gensupport.URLParams 8434 ctx_ context.Context 8435 header_ http.Header 8436} 8437 8438// TestIamPermissions: Returns permissions that a caller has on the 8439// specified resource. If the resource does not exist, this will return 8440// an empty set of permissions, not a `NOT_FOUND` error. Note: This 8441// operation is designed to be used for building permission-aware UIs 8442// and command-line tools, not for authorization checking. This 8443// operation may "fail open" without warning. 8444// 8445// - resource: REQUIRED: The resource for which the policy detail is 8446// being requested. See the operation documentation for the 8447// appropriate value for this field. 8448func (r *ProjectsLocationsDatasetsConsentStoresService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsConsentStoresTestIamPermissionsCall { 8449 c := &ProjectsLocationsDatasetsConsentStoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8450 c.resource = resource 8451 c.testiampermissionsrequest = testiampermissionsrequest 8452 return c 8453} 8454 8455// Fields allows partial responses to be retrieved. See 8456// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8457// for more information. 8458func (c *ProjectsLocationsDatasetsConsentStoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresTestIamPermissionsCall { 8459 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8460 return c 8461} 8462 8463// Context sets the context to be used in this call's Do method. Any 8464// pending HTTP request will be aborted if the provided context is 8465// canceled. 8466func (c *ProjectsLocationsDatasetsConsentStoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresTestIamPermissionsCall { 8467 c.ctx_ = ctx 8468 return c 8469} 8470 8471// Header returns an http.Header that can be modified by the caller to 8472// add HTTP headers to the request. 8473func (c *ProjectsLocationsDatasetsConsentStoresTestIamPermissionsCall) Header() http.Header { 8474 if c.header_ == nil { 8475 c.header_ = make(http.Header) 8476 } 8477 return c.header_ 8478} 8479 8480func (c *ProjectsLocationsDatasetsConsentStoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 8481 reqHeaders := make(http.Header) 8482 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 8483 for k, v := range c.header_ { 8484 reqHeaders[k] = v 8485 } 8486 reqHeaders.Set("User-Agent", c.s.userAgent()) 8487 var body io.Reader = nil 8488 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 8489 if err != nil { 8490 return nil, err 8491 } 8492 reqHeaders.Set("Content-Type", "application/json") 8493 c.urlParams_.Set("alt", alt) 8494 c.urlParams_.Set("prettyPrint", "false") 8495 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") 8496 urls += "?" + c.urlParams_.Encode() 8497 req, err := http.NewRequest("POST", urls, body) 8498 if err != nil { 8499 return nil, err 8500 } 8501 req.Header = reqHeaders 8502 googleapi.Expand(req.URL, map[string]string{ 8503 "resource": c.resource, 8504 }) 8505 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8506} 8507 8508// Do executes the "healthcare.projects.locations.datasets.consentStores.testIamPermissions" call. 8509// Exactly one of *TestIamPermissionsResponse or error will be non-nil. 8510// Any non-2xx status code is an error. Response headers are in either 8511// *TestIamPermissionsResponse.ServerResponse.Header or (if a response 8512// was returned at all) in error.(*googleapi.Error).Header. Use 8513// googleapi.IsNotModified to check whether the returned error was 8514// because http.StatusNotModified was returned. 8515func (c *ProjectsLocationsDatasetsConsentStoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 8516 gensupport.SetOptions(c.urlParams_, opts...) 8517 res, err := c.doRequest("json") 8518 if res != nil && res.StatusCode == http.StatusNotModified { 8519 if res.Body != nil { 8520 res.Body.Close() 8521 } 8522 return nil, &googleapi.Error{ 8523 Code: res.StatusCode, 8524 Header: res.Header, 8525 } 8526 } 8527 if err != nil { 8528 return nil, err 8529 } 8530 defer googleapi.CloseBody(res) 8531 if err := googleapi.CheckResponse(res); err != nil { 8532 return nil, err 8533 } 8534 ret := &TestIamPermissionsResponse{ 8535 ServerResponse: googleapi.ServerResponse{ 8536 Header: res.Header, 8537 HTTPStatusCode: res.StatusCode, 8538 }, 8539 } 8540 target := &ret 8541 if err := gensupport.DecodeResponse(target, res); err != nil { 8542 return nil, err 8543 } 8544 return ret, nil 8545 // { 8546 // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", 8547 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/consentStores/{consentStoresId}:testIamPermissions", 8548 // "httpMethod": "POST", 8549 // "id": "healthcare.projects.locations.datasets.consentStores.testIamPermissions", 8550 // "parameterOrder": [ 8551 // "resource" 8552 // ], 8553 // "parameters": { 8554 // "resource": { 8555 // "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", 8556 // "location": "path", 8557 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+$", 8558 // "required": true, 8559 // "type": "string" 8560 // } 8561 // }, 8562 // "path": "v1/{+resource}:testIamPermissions", 8563 // "request": { 8564 // "$ref": "TestIamPermissionsRequest" 8565 // }, 8566 // "response": { 8567 // "$ref": "TestIamPermissionsResponse" 8568 // }, 8569 // "scopes": [ 8570 // "https://www.googleapis.com/auth/cloud-platform" 8571 // ] 8572 // } 8573 8574} 8575 8576// method id "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.create": 8577 8578type ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsCreateCall struct { 8579 s *Service 8580 parent string 8581 attributedefinition *AttributeDefinition 8582 urlParams_ gensupport.URLParams 8583 ctx_ context.Context 8584 header_ http.Header 8585} 8586 8587// Create: Creates a new Attribute definition in the parent consent 8588// store. 8589// 8590// - parent: The name of the consent store that this Attribute 8591// definition belongs to. 8592func (r *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsService) Create(parent string, attributedefinition *AttributeDefinition) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsCreateCall { 8593 c := &ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8594 c.parent = parent 8595 c.attributedefinition = attributedefinition 8596 return c 8597} 8598 8599// AttributeDefinitionId sets the optional parameter 8600// "attributeDefinitionId": Required. The ID of the Attribute definition 8601// to create. The string must match the following regex: 8602// `_a-zA-Z{0,255}` and must not be a reserved keyword within the Common 8603// Expression Language as listed on 8604// https://github.com/google/cel-spec/blob/master/doc/langdef.md. 8605func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsCreateCall) AttributeDefinitionId(attributeDefinitionId string) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsCreateCall { 8606 c.urlParams_.Set("attributeDefinitionId", attributeDefinitionId) 8607 return c 8608} 8609 8610// Fields allows partial responses to be retrieved. See 8611// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8612// for more information. 8613func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsCreateCall { 8614 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8615 return c 8616} 8617 8618// Context sets the context to be used in this call's Do method. Any 8619// pending HTTP request will be aborted if the provided context is 8620// canceled. 8621func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsCreateCall { 8622 c.ctx_ = ctx 8623 return c 8624} 8625 8626// Header returns an http.Header that can be modified by the caller to 8627// add HTTP headers to the request. 8628func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsCreateCall) Header() http.Header { 8629 if c.header_ == nil { 8630 c.header_ = make(http.Header) 8631 } 8632 return c.header_ 8633} 8634 8635func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsCreateCall) doRequest(alt string) (*http.Response, error) { 8636 reqHeaders := make(http.Header) 8637 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 8638 for k, v := range c.header_ { 8639 reqHeaders[k] = v 8640 } 8641 reqHeaders.Set("User-Agent", c.s.userAgent()) 8642 var body io.Reader = nil 8643 body, err := googleapi.WithoutDataWrapper.JSONReader(c.attributedefinition) 8644 if err != nil { 8645 return nil, err 8646 } 8647 reqHeaders.Set("Content-Type", "application/json") 8648 c.urlParams_.Set("alt", alt) 8649 c.urlParams_.Set("prettyPrint", "false") 8650 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/attributeDefinitions") 8651 urls += "?" + c.urlParams_.Encode() 8652 req, err := http.NewRequest("POST", urls, body) 8653 if err != nil { 8654 return nil, err 8655 } 8656 req.Header = reqHeaders 8657 googleapi.Expand(req.URL, map[string]string{ 8658 "parent": c.parent, 8659 }) 8660 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8661} 8662 8663// Do executes the "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.create" call. 8664// Exactly one of *AttributeDefinition or error will be non-nil. Any 8665// non-2xx status code is an error. Response headers are in either 8666// *AttributeDefinition.ServerResponse.Header or (if a response was 8667// returned at all) in error.(*googleapi.Error).Header. Use 8668// googleapi.IsNotModified to check whether the returned error was 8669// because http.StatusNotModified was returned. 8670func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsCreateCall) Do(opts ...googleapi.CallOption) (*AttributeDefinition, error) { 8671 gensupport.SetOptions(c.urlParams_, opts...) 8672 res, err := c.doRequest("json") 8673 if res != nil && res.StatusCode == http.StatusNotModified { 8674 if res.Body != nil { 8675 res.Body.Close() 8676 } 8677 return nil, &googleapi.Error{ 8678 Code: res.StatusCode, 8679 Header: res.Header, 8680 } 8681 } 8682 if err != nil { 8683 return nil, err 8684 } 8685 defer googleapi.CloseBody(res) 8686 if err := googleapi.CheckResponse(res); err != nil { 8687 return nil, err 8688 } 8689 ret := &AttributeDefinition{ 8690 ServerResponse: googleapi.ServerResponse{ 8691 Header: res.Header, 8692 HTTPStatusCode: res.StatusCode, 8693 }, 8694 } 8695 target := &ret 8696 if err := gensupport.DecodeResponse(target, res); err != nil { 8697 return nil, err 8698 } 8699 return ret, nil 8700 // { 8701 // "description": "Creates a new Attribute definition in the parent consent store.", 8702 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/consentStores/{consentStoresId}/attributeDefinitions", 8703 // "httpMethod": "POST", 8704 // "id": "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.create", 8705 // "parameterOrder": [ 8706 // "parent" 8707 // ], 8708 // "parameters": { 8709 // "attributeDefinitionId": { 8710 // "description": "Required. The ID of the Attribute definition to create. The string must match the following regex: `_a-zA-Z{0,255}` and must not be a reserved keyword within the Common Expression Language as listed on https://github.com/google/cel-spec/blob/master/doc/langdef.md.", 8711 // "location": "query", 8712 // "type": "string" 8713 // }, 8714 // "parent": { 8715 // "description": "Required. The name of the consent store that this Attribute definition belongs to.", 8716 // "location": "path", 8717 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+$", 8718 // "required": true, 8719 // "type": "string" 8720 // } 8721 // }, 8722 // "path": "v1/{+parent}/attributeDefinitions", 8723 // "request": { 8724 // "$ref": "AttributeDefinition" 8725 // }, 8726 // "response": { 8727 // "$ref": "AttributeDefinition" 8728 // }, 8729 // "scopes": [ 8730 // "https://www.googleapis.com/auth/cloud-platform" 8731 // ] 8732 // } 8733 8734} 8735 8736// method id "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.delete": 8737 8738type ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsDeleteCall struct { 8739 s *Service 8740 name string 8741 urlParams_ gensupport.URLParams 8742 ctx_ context.Context 8743 header_ http.Header 8744} 8745 8746// Delete: Deletes the specified Attribute definition. Fails if the 8747// Attribute definition is referenced by any User data mapping, or the 8748// latest revision of any Consent. 8749// 8750// - name: The resource name of the Attribute definition to delete. To 8751// preserve referential integrity, Attribute definitions referenced by 8752// a User data mapping or the latest revision of a Consent cannot be 8753// deleted. 8754func (r *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsService) Delete(name string) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsDeleteCall { 8755 c := &ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8756 c.name = name 8757 return c 8758} 8759 8760// Fields allows partial responses to be retrieved. See 8761// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8762// for more information. 8763func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsDeleteCall { 8764 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8765 return c 8766} 8767 8768// Context sets the context to be used in this call's Do method. Any 8769// pending HTTP request will be aborted if the provided context is 8770// canceled. 8771func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsDeleteCall { 8772 c.ctx_ = ctx 8773 return c 8774} 8775 8776// Header returns an http.Header that can be modified by the caller to 8777// add HTTP headers to the request. 8778func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsDeleteCall) Header() http.Header { 8779 if c.header_ == nil { 8780 c.header_ = make(http.Header) 8781 } 8782 return c.header_ 8783} 8784 8785func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsDeleteCall) doRequest(alt string) (*http.Response, error) { 8786 reqHeaders := make(http.Header) 8787 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 8788 for k, v := range c.header_ { 8789 reqHeaders[k] = v 8790 } 8791 reqHeaders.Set("User-Agent", c.s.userAgent()) 8792 var body io.Reader = nil 8793 c.urlParams_.Set("alt", alt) 8794 c.urlParams_.Set("prettyPrint", "false") 8795 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 8796 urls += "?" + c.urlParams_.Encode() 8797 req, err := http.NewRequest("DELETE", urls, body) 8798 if err != nil { 8799 return nil, err 8800 } 8801 req.Header = reqHeaders 8802 googleapi.Expand(req.URL, map[string]string{ 8803 "name": c.name, 8804 }) 8805 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8806} 8807 8808// Do executes the "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.delete" call. 8809// Exactly one of *Empty or error will be non-nil. Any non-2xx status 8810// code is an error. Response headers are in either 8811// *Empty.ServerResponse.Header or (if a response was returned at all) 8812// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 8813// check whether the returned error was because http.StatusNotModified 8814// was returned. 8815func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 8816 gensupport.SetOptions(c.urlParams_, opts...) 8817 res, err := c.doRequest("json") 8818 if res != nil && res.StatusCode == http.StatusNotModified { 8819 if res.Body != nil { 8820 res.Body.Close() 8821 } 8822 return nil, &googleapi.Error{ 8823 Code: res.StatusCode, 8824 Header: res.Header, 8825 } 8826 } 8827 if err != nil { 8828 return nil, err 8829 } 8830 defer googleapi.CloseBody(res) 8831 if err := googleapi.CheckResponse(res); err != nil { 8832 return nil, err 8833 } 8834 ret := &Empty{ 8835 ServerResponse: googleapi.ServerResponse{ 8836 Header: res.Header, 8837 HTTPStatusCode: res.StatusCode, 8838 }, 8839 } 8840 target := &ret 8841 if err := gensupport.DecodeResponse(target, res); err != nil { 8842 return nil, err 8843 } 8844 return ret, nil 8845 // { 8846 // "description": "Deletes the specified Attribute definition. Fails if the Attribute definition is referenced by any User data mapping, or the latest revision of any Consent.", 8847 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/consentStores/{consentStoresId}/attributeDefinitions/{attributeDefinitionsId}", 8848 // "httpMethod": "DELETE", 8849 // "id": "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.delete", 8850 // "parameterOrder": [ 8851 // "name" 8852 // ], 8853 // "parameters": { 8854 // "name": { 8855 // "description": "Required. The resource name of the Attribute definition to delete. To preserve referential integrity, Attribute definitions referenced by a User data mapping or the latest revision of a Consent cannot be deleted.", 8856 // "location": "path", 8857 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+/attributeDefinitions/[^/]+$", 8858 // "required": true, 8859 // "type": "string" 8860 // } 8861 // }, 8862 // "path": "v1/{+name}", 8863 // "response": { 8864 // "$ref": "Empty" 8865 // }, 8866 // "scopes": [ 8867 // "https://www.googleapis.com/auth/cloud-platform" 8868 // ] 8869 // } 8870 8871} 8872 8873// method id "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.get": 8874 8875type ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsGetCall struct { 8876 s *Service 8877 name string 8878 urlParams_ gensupport.URLParams 8879 ifNoneMatch_ string 8880 ctx_ context.Context 8881 header_ http.Header 8882} 8883 8884// Get: Gets the specified Attribute definition. 8885// 8886// - name: The resource name of the Attribute definition to get. 8887func (r *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsService) Get(name string) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsGetCall { 8888 c := &ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8889 c.name = name 8890 return c 8891} 8892 8893// Fields allows partial responses to be retrieved. See 8894// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8895// for more information. 8896func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsGetCall { 8897 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8898 return c 8899} 8900 8901// IfNoneMatch sets the optional parameter which makes the operation 8902// fail if the object's ETag matches the given value. This is useful for 8903// getting updates only after the object has changed since the last 8904// request. Use googleapi.IsNotModified to check whether the response 8905// error from Do is the result of In-None-Match. 8906func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsGetCall { 8907 c.ifNoneMatch_ = entityTag 8908 return c 8909} 8910 8911// Context sets the context to be used in this call's Do method. Any 8912// pending HTTP request will be aborted if the provided context is 8913// canceled. 8914func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsGetCall { 8915 c.ctx_ = ctx 8916 return c 8917} 8918 8919// Header returns an http.Header that can be modified by the caller to 8920// add HTTP headers to the request. 8921func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsGetCall) Header() http.Header { 8922 if c.header_ == nil { 8923 c.header_ = make(http.Header) 8924 } 8925 return c.header_ 8926} 8927 8928func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsGetCall) doRequest(alt string) (*http.Response, error) { 8929 reqHeaders := make(http.Header) 8930 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 8931 for k, v := range c.header_ { 8932 reqHeaders[k] = v 8933 } 8934 reqHeaders.Set("User-Agent", c.s.userAgent()) 8935 if c.ifNoneMatch_ != "" { 8936 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8937 } 8938 var body io.Reader = nil 8939 c.urlParams_.Set("alt", alt) 8940 c.urlParams_.Set("prettyPrint", "false") 8941 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 8942 urls += "?" + c.urlParams_.Encode() 8943 req, err := http.NewRequest("GET", urls, body) 8944 if err != nil { 8945 return nil, err 8946 } 8947 req.Header = reqHeaders 8948 googleapi.Expand(req.URL, map[string]string{ 8949 "name": c.name, 8950 }) 8951 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8952} 8953 8954// Do executes the "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.get" call. 8955// Exactly one of *AttributeDefinition or error will be non-nil. Any 8956// non-2xx status code is an error. Response headers are in either 8957// *AttributeDefinition.ServerResponse.Header or (if a response was 8958// returned at all) in error.(*googleapi.Error).Header. Use 8959// googleapi.IsNotModified to check whether the returned error was 8960// because http.StatusNotModified was returned. 8961func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsGetCall) Do(opts ...googleapi.CallOption) (*AttributeDefinition, error) { 8962 gensupport.SetOptions(c.urlParams_, opts...) 8963 res, err := c.doRequest("json") 8964 if res != nil && res.StatusCode == http.StatusNotModified { 8965 if res.Body != nil { 8966 res.Body.Close() 8967 } 8968 return nil, &googleapi.Error{ 8969 Code: res.StatusCode, 8970 Header: res.Header, 8971 } 8972 } 8973 if err != nil { 8974 return nil, err 8975 } 8976 defer googleapi.CloseBody(res) 8977 if err := googleapi.CheckResponse(res); err != nil { 8978 return nil, err 8979 } 8980 ret := &AttributeDefinition{ 8981 ServerResponse: googleapi.ServerResponse{ 8982 Header: res.Header, 8983 HTTPStatusCode: res.StatusCode, 8984 }, 8985 } 8986 target := &ret 8987 if err := gensupport.DecodeResponse(target, res); err != nil { 8988 return nil, err 8989 } 8990 return ret, nil 8991 // { 8992 // "description": "Gets the specified Attribute definition.", 8993 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/consentStores/{consentStoresId}/attributeDefinitions/{attributeDefinitionsId}", 8994 // "httpMethod": "GET", 8995 // "id": "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.get", 8996 // "parameterOrder": [ 8997 // "name" 8998 // ], 8999 // "parameters": { 9000 // "name": { 9001 // "description": "Required. The resource name of the Attribute definition to get.", 9002 // "location": "path", 9003 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+/attributeDefinitions/[^/]+$", 9004 // "required": true, 9005 // "type": "string" 9006 // } 9007 // }, 9008 // "path": "v1/{+name}", 9009 // "response": { 9010 // "$ref": "AttributeDefinition" 9011 // }, 9012 // "scopes": [ 9013 // "https://www.googleapis.com/auth/cloud-platform" 9014 // ] 9015 // } 9016 9017} 9018 9019// method id "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.list": 9020 9021type ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall struct { 9022 s *Service 9023 parent string 9024 urlParams_ gensupport.URLParams 9025 ifNoneMatch_ string 9026 ctx_ context.Context 9027 header_ http.Header 9028} 9029 9030// List: Lists the Attribute definitions in the specified consent store. 9031// 9032// - parent: Name of the consent store to retrieve Attribute definitions 9033// from. 9034func (r *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsService) List(parent string) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall { 9035 c := &ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9036 c.parent = parent 9037 return c 9038} 9039 9040// Filter sets the optional parameter "filter": Restricts the attributes 9041// returned to those matching a filter. The only field available for 9042// filtering is `category`. For example, `filter=category=\"REQUEST\". 9043func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall) Filter(filter string) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall { 9044 c.urlParams_.Set("filter", filter) 9045 return c 9046} 9047 9048// PageSize sets the optional parameter "pageSize": Limit on the number 9049// of Attribute definitions to return in a single response. If not 9050// specified, 100 is used. May not be larger than 1000. 9051func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall { 9052 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 9053 return c 9054} 9055 9056// PageToken sets the optional parameter "pageToken": Token to retrieve 9057// the next page of results or empty to get the first page. 9058func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall { 9059 c.urlParams_.Set("pageToken", pageToken) 9060 return c 9061} 9062 9063// Fields allows partial responses to be retrieved. See 9064// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9065// for more information. 9066func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall { 9067 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9068 return c 9069} 9070 9071// IfNoneMatch sets the optional parameter which makes the operation 9072// fail if the object's ETag matches the given value. This is useful for 9073// getting updates only after the object has changed since the last 9074// request. Use googleapi.IsNotModified to check whether the response 9075// error from Do is the result of In-None-Match. 9076func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall { 9077 c.ifNoneMatch_ = entityTag 9078 return c 9079} 9080 9081// Context sets the context to be used in this call's Do method. Any 9082// pending HTTP request will be aborted if the provided context is 9083// canceled. 9084func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall { 9085 c.ctx_ = ctx 9086 return c 9087} 9088 9089// Header returns an http.Header that can be modified by the caller to 9090// add HTTP headers to the request. 9091func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall) Header() http.Header { 9092 if c.header_ == nil { 9093 c.header_ = make(http.Header) 9094 } 9095 return c.header_ 9096} 9097 9098func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall) doRequest(alt string) (*http.Response, error) { 9099 reqHeaders := make(http.Header) 9100 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 9101 for k, v := range c.header_ { 9102 reqHeaders[k] = v 9103 } 9104 reqHeaders.Set("User-Agent", c.s.userAgent()) 9105 if c.ifNoneMatch_ != "" { 9106 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9107 } 9108 var body io.Reader = nil 9109 c.urlParams_.Set("alt", alt) 9110 c.urlParams_.Set("prettyPrint", "false") 9111 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/attributeDefinitions") 9112 urls += "?" + c.urlParams_.Encode() 9113 req, err := http.NewRequest("GET", urls, body) 9114 if err != nil { 9115 return nil, err 9116 } 9117 req.Header = reqHeaders 9118 googleapi.Expand(req.URL, map[string]string{ 9119 "parent": c.parent, 9120 }) 9121 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9122} 9123 9124// Do executes the "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.list" call. 9125// Exactly one of *ListAttributeDefinitionsResponse or error will be 9126// non-nil. Any non-2xx status code is an error. Response headers are in 9127// either *ListAttributeDefinitionsResponse.ServerResponse.Header or (if 9128// a response was returned at all) in error.(*googleapi.Error).Header. 9129// Use googleapi.IsNotModified to check whether the returned error was 9130// because http.StatusNotModified was returned. 9131func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall) Do(opts ...googleapi.CallOption) (*ListAttributeDefinitionsResponse, error) { 9132 gensupport.SetOptions(c.urlParams_, opts...) 9133 res, err := c.doRequest("json") 9134 if res != nil && res.StatusCode == http.StatusNotModified { 9135 if res.Body != nil { 9136 res.Body.Close() 9137 } 9138 return nil, &googleapi.Error{ 9139 Code: res.StatusCode, 9140 Header: res.Header, 9141 } 9142 } 9143 if err != nil { 9144 return nil, err 9145 } 9146 defer googleapi.CloseBody(res) 9147 if err := googleapi.CheckResponse(res); err != nil { 9148 return nil, err 9149 } 9150 ret := &ListAttributeDefinitionsResponse{ 9151 ServerResponse: googleapi.ServerResponse{ 9152 Header: res.Header, 9153 HTTPStatusCode: res.StatusCode, 9154 }, 9155 } 9156 target := &ret 9157 if err := gensupport.DecodeResponse(target, res); err != nil { 9158 return nil, err 9159 } 9160 return ret, nil 9161 // { 9162 // "description": "Lists the Attribute definitions in the specified consent store.", 9163 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/consentStores/{consentStoresId}/attributeDefinitions", 9164 // "httpMethod": "GET", 9165 // "id": "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.list", 9166 // "parameterOrder": [ 9167 // "parent" 9168 // ], 9169 // "parameters": { 9170 // "filter": { 9171 // "description": "Optional. Restricts the attributes returned to those matching a filter. The only field available for filtering is `category`. For example, `filter=category=\\\"REQUEST\\\"`.", 9172 // "location": "query", 9173 // "type": "string" 9174 // }, 9175 // "pageSize": { 9176 // "description": "Optional. Limit on the number of Attribute definitions to return in a single response. If not specified, 100 is used. May not be larger than 1000.", 9177 // "format": "int32", 9178 // "location": "query", 9179 // "type": "integer" 9180 // }, 9181 // "pageToken": { 9182 // "description": "Optional. Token to retrieve the next page of results or empty to get the first page.", 9183 // "location": "query", 9184 // "type": "string" 9185 // }, 9186 // "parent": { 9187 // "description": "Required. Name of the consent store to retrieve Attribute definitions from.", 9188 // "location": "path", 9189 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+$", 9190 // "required": true, 9191 // "type": "string" 9192 // } 9193 // }, 9194 // "path": "v1/{+parent}/attributeDefinitions", 9195 // "response": { 9196 // "$ref": "ListAttributeDefinitionsResponse" 9197 // }, 9198 // "scopes": [ 9199 // "https://www.googleapis.com/auth/cloud-platform" 9200 // ] 9201 // } 9202 9203} 9204 9205// Pages invokes f for each page of results. 9206// A non-nil error returned from f will halt the iteration. 9207// The provided context supersedes any context provided to the Context method. 9208func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall) Pages(ctx context.Context, f func(*ListAttributeDefinitionsResponse) error) error { 9209 c.ctx_ = ctx 9210 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 9211 for { 9212 x, err := c.Do() 9213 if err != nil { 9214 return err 9215 } 9216 if err := f(x); err != nil { 9217 return err 9218 } 9219 if x.NextPageToken == "" { 9220 return nil 9221 } 9222 c.PageToken(x.NextPageToken) 9223 } 9224} 9225 9226// method id "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.patch": 9227 9228type ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsPatchCall struct { 9229 s *Service 9230 name string 9231 attributedefinition *AttributeDefinition 9232 urlParams_ gensupport.URLParams 9233 ctx_ context.Context 9234 header_ http.Header 9235} 9236 9237// Patch: Updates the specified Attribute definition. 9238// 9239// - name: Resource name of the Attribute definition, of the form 9240// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 9241// /consentStores/{consent_store_id}/attributeDefinitions/{attribute_de 9242// finition_id}`. Cannot be changed after creation. 9243func (r *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsService) Patch(name string, attributedefinition *AttributeDefinition) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsPatchCall { 9244 c := &ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9245 c.name = name 9246 c.attributedefinition = attributedefinition 9247 return c 9248} 9249 9250// UpdateMask sets the optional parameter "updateMask": Required. The 9251// update mask that applies to the resource. For the `FieldMask` 9252// definition, see 9253// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. 9254// Only the `description`, `allowed_values`, `consent_default_values` 9255// and `data_mapping_default_value` fields can be updated. The updated 9256// `allowed_values` must contain all values from the previous 9257// `allowed_values`. 9258func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsPatchCall { 9259 c.urlParams_.Set("updateMask", updateMask) 9260 return c 9261} 9262 9263// Fields allows partial responses to be retrieved. See 9264// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9265// for more information. 9266func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsPatchCall { 9267 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9268 return c 9269} 9270 9271// Context sets the context to be used in this call's Do method. Any 9272// pending HTTP request will be aborted if the provided context is 9273// canceled. 9274func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsPatchCall { 9275 c.ctx_ = ctx 9276 return c 9277} 9278 9279// Header returns an http.Header that can be modified by the caller to 9280// add HTTP headers to the request. 9281func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsPatchCall) Header() http.Header { 9282 if c.header_ == nil { 9283 c.header_ = make(http.Header) 9284 } 9285 return c.header_ 9286} 9287 9288func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsPatchCall) doRequest(alt string) (*http.Response, error) { 9289 reqHeaders := make(http.Header) 9290 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 9291 for k, v := range c.header_ { 9292 reqHeaders[k] = v 9293 } 9294 reqHeaders.Set("User-Agent", c.s.userAgent()) 9295 var body io.Reader = nil 9296 body, err := googleapi.WithoutDataWrapper.JSONReader(c.attributedefinition) 9297 if err != nil { 9298 return nil, err 9299 } 9300 reqHeaders.Set("Content-Type", "application/json") 9301 c.urlParams_.Set("alt", alt) 9302 c.urlParams_.Set("prettyPrint", "false") 9303 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 9304 urls += "?" + c.urlParams_.Encode() 9305 req, err := http.NewRequest("PATCH", urls, body) 9306 if err != nil { 9307 return nil, err 9308 } 9309 req.Header = reqHeaders 9310 googleapi.Expand(req.URL, map[string]string{ 9311 "name": c.name, 9312 }) 9313 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9314} 9315 9316// Do executes the "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.patch" call. 9317// Exactly one of *AttributeDefinition or error will be non-nil. Any 9318// non-2xx status code is an error. Response headers are in either 9319// *AttributeDefinition.ServerResponse.Header or (if a response was 9320// returned at all) in error.(*googleapi.Error).Header. Use 9321// googleapi.IsNotModified to check whether the returned error was 9322// because http.StatusNotModified was returned. 9323func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsPatchCall) Do(opts ...googleapi.CallOption) (*AttributeDefinition, error) { 9324 gensupport.SetOptions(c.urlParams_, opts...) 9325 res, err := c.doRequest("json") 9326 if res != nil && res.StatusCode == http.StatusNotModified { 9327 if res.Body != nil { 9328 res.Body.Close() 9329 } 9330 return nil, &googleapi.Error{ 9331 Code: res.StatusCode, 9332 Header: res.Header, 9333 } 9334 } 9335 if err != nil { 9336 return nil, err 9337 } 9338 defer googleapi.CloseBody(res) 9339 if err := googleapi.CheckResponse(res); err != nil { 9340 return nil, err 9341 } 9342 ret := &AttributeDefinition{ 9343 ServerResponse: googleapi.ServerResponse{ 9344 Header: res.Header, 9345 HTTPStatusCode: res.StatusCode, 9346 }, 9347 } 9348 target := &ret 9349 if err := gensupport.DecodeResponse(target, res); err != nil { 9350 return nil, err 9351 } 9352 return ret, nil 9353 // { 9354 // "description": "Updates the specified Attribute definition.", 9355 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/consentStores/{consentStoresId}/attributeDefinitions/{attributeDefinitionsId}", 9356 // "httpMethod": "PATCH", 9357 // "id": "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.patch", 9358 // "parameterOrder": [ 9359 // "name" 9360 // ], 9361 // "parameters": { 9362 // "name": { 9363 // "description": "Resource name of the Attribute definition, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/attributeDefinitions/{attribute_definition_id}`. Cannot be changed after creation.", 9364 // "location": "path", 9365 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+/attributeDefinitions/[^/]+$", 9366 // "required": true, 9367 // "type": "string" 9368 // }, 9369 // "updateMask": { 9370 // "description": "Required. The update mask that applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. Only the `description`, `allowed_values`, `consent_default_values` and `data_mapping_default_value` fields can be updated. The updated `allowed_values` must contain all values from the previous `allowed_values`.", 9371 // "format": "google-fieldmask", 9372 // "location": "query", 9373 // "type": "string" 9374 // } 9375 // }, 9376 // "path": "v1/{+name}", 9377 // "request": { 9378 // "$ref": "AttributeDefinition" 9379 // }, 9380 // "response": { 9381 // "$ref": "AttributeDefinition" 9382 // }, 9383 // "scopes": [ 9384 // "https://www.googleapis.com/auth/cloud-platform" 9385 // ] 9386 // } 9387 9388} 9389 9390// method id "healthcare.projects.locations.datasets.consentStores.consentArtifacts.create": 9391 9392type ProjectsLocationsDatasetsConsentStoresConsentArtifactsCreateCall struct { 9393 s *Service 9394 parent string 9395 consentartifact *ConsentArtifact 9396 urlParams_ gensupport.URLParams 9397 ctx_ context.Context 9398 header_ http.Header 9399} 9400 9401// Create: Creates a new Consent artifact in the parent consent store. 9402// 9403// - parent: The name of the consent store this Consent artifact belongs 9404// to. 9405func (r *ProjectsLocationsDatasetsConsentStoresConsentArtifactsService) Create(parent string, consentartifact *ConsentArtifact) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsCreateCall { 9406 c := &ProjectsLocationsDatasetsConsentStoresConsentArtifactsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9407 c.parent = parent 9408 c.consentartifact = consentartifact 9409 return c 9410} 9411 9412// Fields allows partial responses to be retrieved. See 9413// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9414// for more information. 9415func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsCreateCall { 9416 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9417 return c 9418} 9419 9420// Context sets the context to be used in this call's Do method. Any 9421// pending HTTP request will be aborted if the provided context is 9422// canceled. 9423func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsCreateCall { 9424 c.ctx_ = ctx 9425 return c 9426} 9427 9428// Header returns an http.Header that can be modified by the caller to 9429// add HTTP headers to the request. 9430func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsCreateCall) Header() http.Header { 9431 if c.header_ == nil { 9432 c.header_ = make(http.Header) 9433 } 9434 return c.header_ 9435} 9436 9437func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsCreateCall) doRequest(alt string) (*http.Response, error) { 9438 reqHeaders := make(http.Header) 9439 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 9440 for k, v := range c.header_ { 9441 reqHeaders[k] = v 9442 } 9443 reqHeaders.Set("User-Agent", c.s.userAgent()) 9444 var body io.Reader = nil 9445 body, err := googleapi.WithoutDataWrapper.JSONReader(c.consentartifact) 9446 if err != nil { 9447 return nil, err 9448 } 9449 reqHeaders.Set("Content-Type", "application/json") 9450 c.urlParams_.Set("alt", alt) 9451 c.urlParams_.Set("prettyPrint", "false") 9452 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/consentArtifacts") 9453 urls += "?" + c.urlParams_.Encode() 9454 req, err := http.NewRequest("POST", urls, body) 9455 if err != nil { 9456 return nil, err 9457 } 9458 req.Header = reqHeaders 9459 googleapi.Expand(req.URL, map[string]string{ 9460 "parent": c.parent, 9461 }) 9462 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9463} 9464 9465// Do executes the "healthcare.projects.locations.datasets.consentStores.consentArtifacts.create" call. 9466// Exactly one of *ConsentArtifact or error will be non-nil. Any non-2xx 9467// status code is an error. Response headers are in either 9468// *ConsentArtifact.ServerResponse.Header or (if a response was returned 9469// at all) in error.(*googleapi.Error).Header. Use 9470// googleapi.IsNotModified to check whether the returned error was 9471// because http.StatusNotModified was returned. 9472func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsCreateCall) Do(opts ...googleapi.CallOption) (*ConsentArtifact, error) { 9473 gensupport.SetOptions(c.urlParams_, opts...) 9474 res, err := c.doRequest("json") 9475 if res != nil && res.StatusCode == http.StatusNotModified { 9476 if res.Body != nil { 9477 res.Body.Close() 9478 } 9479 return nil, &googleapi.Error{ 9480 Code: res.StatusCode, 9481 Header: res.Header, 9482 } 9483 } 9484 if err != nil { 9485 return nil, err 9486 } 9487 defer googleapi.CloseBody(res) 9488 if err := googleapi.CheckResponse(res); err != nil { 9489 return nil, err 9490 } 9491 ret := &ConsentArtifact{ 9492 ServerResponse: googleapi.ServerResponse{ 9493 Header: res.Header, 9494 HTTPStatusCode: res.StatusCode, 9495 }, 9496 } 9497 target := &ret 9498 if err := gensupport.DecodeResponse(target, res); err != nil { 9499 return nil, err 9500 } 9501 return ret, nil 9502 // { 9503 // "description": "Creates a new Consent artifact in the parent consent store.", 9504 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/consentStores/{consentStoresId}/consentArtifacts", 9505 // "httpMethod": "POST", 9506 // "id": "healthcare.projects.locations.datasets.consentStores.consentArtifacts.create", 9507 // "parameterOrder": [ 9508 // "parent" 9509 // ], 9510 // "parameters": { 9511 // "parent": { 9512 // "description": "Required. The name of the consent store this Consent artifact belongs to.", 9513 // "location": "path", 9514 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+$", 9515 // "required": true, 9516 // "type": "string" 9517 // } 9518 // }, 9519 // "path": "v1/{+parent}/consentArtifacts", 9520 // "request": { 9521 // "$ref": "ConsentArtifact" 9522 // }, 9523 // "response": { 9524 // "$ref": "ConsentArtifact" 9525 // }, 9526 // "scopes": [ 9527 // "https://www.googleapis.com/auth/cloud-platform" 9528 // ] 9529 // } 9530 9531} 9532 9533// method id "healthcare.projects.locations.datasets.consentStores.consentArtifacts.delete": 9534 9535type ProjectsLocationsDatasetsConsentStoresConsentArtifactsDeleteCall struct { 9536 s *Service 9537 name string 9538 urlParams_ gensupport.URLParams 9539 ctx_ context.Context 9540 header_ http.Header 9541} 9542 9543// Delete: Deletes the specified Consent artifact. Fails if the artifact 9544// is referenced by the latest revision of any Consent. 9545// 9546// - name: The resource name of the Consent artifact to delete. To 9547// preserve referential integrity, Consent artifacts referenced by the 9548// latest revision of a Consent cannot be deleted. 9549func (r *ProjectsLocationsDatasetsConsentStoresConsentArtifactsService) Delete(name string) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsDeleteCall { 9550 c := &ProjectsLocationsDatasetsConsentStoresConsentArtifactsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9551 c.name = name 9552 return c 9553} 9554 9555// Fields allows partial responses to be retrieved. See 9556// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9557// for more information. 9558func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsDeleteCall { 9559 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9560 return c 9561} 9562 9563// Context sets the context to be used in this call's Do method. Any 9564// pending HTTP request will be aborted if the provided context is 9565// canceled. 9566func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsDeleteCall { 9567 c.ctx_ = ctx 9568 return c 9569} 9570 9571// Header returns an http.Header that can be modified by the caller to 9572// add HTTP headers to the request. 9573func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsDeleteCall) Header() http.Header { 9574 if c.header_ == nil { 9575 c.header_ = make(http.Header) 9576 } 9577 return c.header_ 9578} 9579 9580func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsDeleteCall) doRequest(alt string) (*http.Response, error) { 9581 reqHeaders := make(http.Header) 9582 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 9583 for k, v := range c.header_ { 9584 reqHeaders[k] = v 9585 } 9586 reqHeaders.Set("User-Agent", c.s.userAgent()) 9587 var body io.Reader = nil 9588 c.urlParams_.Set("alt", alt) 9589 c.urlParams_.Set("prettyPrint", "false") 9590 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 9591 urls += "?" + c.urlParams_.Encode() 9592 req, err := http.NewRequest("DELETE", urls, body) 9593 if err != nil { 9594 return nil, err 9595 } 9596 req.Header = reqHeaders 9597 googleapi.Expand(req.URL, map[string]string{ 9598 "name": c.name, 9599 }) 9600 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9601} 9602 9603// Do executes the "healthcare.projects.locations.datasets.consentStores.consentArtifacts.delete" call. 9604// Exactly one of *Empty or error will be non-nil. Any non-2xx status 9605// code is an error. Response headers are in either 9606// *Empty.ServerResponse.Header or (if a response was returned at all) 9607// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 9608// check whether the returned error was because http.StatusNotModified 9609// was returned. 9610func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 9611 gensupport.SetOptions(c.urlParams_, opts...) 9612 res, err := c.doRequest("json") 9613 if res != nil && res.StatusCode == http.StatusNotModified { 9614 if res.Body != nil { 9615 res.Body.Close() 9616 } 9617 return nil, &googleapi.Error{ 9618 Code: res.StatusCode, 9619 Header: res.Header, 9620 } 9621 } 9622 if err != nil { 9623 return nil, err 9624 } 9625 defer googleapi.CloseBody(res) 9626 if err := googleapi.CheckResponse(res); err != nil { 9627 return nil, err 9628 } 9629 ret := &Empty{ 9630 ServerResponse: googleapi.ServerResponse{ 9631 Header: res.Header, 9632 HTTPStatusCode: res.StatusCode, 9633 }, 9634 } 9635 target := &ret 9636 if err := gensupport.DecodeResponse(target, res); err != nil { 9637 return nil, err 9638 } 9639 return ret, nil 9640 // { 9641 // "description": "Deletes the specified Consent artifact. Fails if the artifact is referenced by the latest revision of any Consent.", 9642 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/consentStores/{consentStoresId}/consentArtifacts/{consentArtifactsId}", 9643 // "httpMethod": "DELETE", 9644 // "id": "healthcare.projects.locations.datasets.consentStores.consentArtifacts.delete", 9645 // "parameterOrder": [ 9646 // "name" 9647 // ], 9648 // "parameters": { 9649 // "name": { 9650 // "description": "Required. The resource name of the Consent artifact to delete. To preserve referential integrity, Consent artifacts referenced by the latest revision of a Consent cannot be deleted.", 9651 // "location": "path", 9652 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+/consentArtifacts/[^/]+$", 9653 // "required": true, 9654 // "type": "string" 9655 // } 9656 // }, 9657 // "path": "v1/{+name}", 9658 // "response": { 9659 // "$ref": "Empty" 9660 // }, 9661 // "scopes": [ 9662 // "https://www.googleapis.com/auth/cloud-platform" 9663 // ] 9664 // } 9665 9666} 9667 9668// method id "healthcare.projects.locations.datasets.consentStores.consentArtifacts.get": 9669 9670type ProjectsLocationsDatasetsConsentStoresConsentArtifactsGetCall struct { 9671 s *Service 9672 name string 9673 urlParams_ gensupport.URLParams 9674 ifNoneMatch_ string 9675 ctx_ context.Context 9676 header_ http.Header 9677} 9678 9679// Get: Gets the specified Consent artifact. 9680// 9681// - name: The resource name of the Consent artifact to retrieve. 9682func (r *ProjectsLocationsDatasetsConsentStoresConsentArtifactsService) Get(name string) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsGetCall { 9683 c := &ProjectsLocationsDatasetsConsentStoresConsentArtifactsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9684 c.name = name 9685 return c 9686} 9687 9688// Fields allows partial responses to be retrieved. See 9689// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9690// for more information. 9691func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsGetCall { 9692 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9693 return c 9694} 9695 9696// IfNoneMatch sets the optional parameter which makes the operation 9697// fail if the object's ETag matches the given value. This is useful for 9698// getting updates only after the object has changed since the last 9699// request. Use googleapi.IsNotModified to check whether the response 9700// error from Do is the result of In-None-Match. 9701func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsGetCall { 9702 c.ifNoneMatch_ = entityTag 9703 return c 9704} 9705 9706// Context sets the context to be used in this call's Do method. Any 9707// pending HTTP request will be aborted if the provided context is 9708// canceled. 9709func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsGetCall { 9710 c.ctx_ = ctx 9711 return c 9712} 9713 9714// Header returns an http.Header that can be modified by the caller to 9715// add HTTP headers to the request. 9716func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsGetCall) Header() http.Header { 9717 if c.header_ == nil { 9718 c.header_ = make(http.Header) 9719 } 9720 return c.header_ 9721} 9722 9723func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsGetCall) doRequest(alt string) (*http.Response, error) { 9724 reqHeaders := make(http.Header) 9725 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 9726 for k, v := range c.header_ { 9727 reqHeaders[k] = v 9728 } 9729 reqHeaders.Set("User-Agent", c.s.userAgent()) 9730 if c.ifNoneMatch_ != "" { 9731 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9732 } 9733 var body io.Reader = nil 9734 c.urlParams_.Set("alt", alt) 9735 c.urlParams_.Set("prettyPrint", "false") 9736 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 9737 urls += "?" + c.urlParams_.Encode() 9738 req, err := http.NewRequest("GET", urls, body) 9739 if err != nil { 9740 return nil, err 9741 } 9742 req.Header = reqHeaders 9743 googleapi.Expand(req.URL, map[string]string{ 9744 "name": c.name, 9745 }) 9746 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9747} 9748 9749// Do executes the "healthcare.projects.locations.datasets.consentStores.consentArtifacts.get" call. 9750// Exactly one of *ConsentArtifact or error will be non-nil. Any non-2xx 9751// status code is an error. Response headers are in either 9752// *ConsentArtifact.ServerResponse.Header or (if a response was returned 9753// at all) in error.(*googleapi.Error).Header. Use 9754// googleapi.IsNotModified to check whether the returned error was 9755// because http.StatusNotModified was returned. 9756func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsGetCall) Do(opts ...googleapi.CallOption) (*ConsentArtifact, error) { 9757 gensupport.SetOptions(c.urlParams_, opts...) 9758 res, err := c.doRequest("json") 9759 if res != nil && res.StatusCode == http.StatusNotModified { 9760 if res.Body != nil { 9761 res.Body.Close() 9762 } 9763 return nil, &googleapi.Error{ 9764 Code: res.StatusCode, 9765 Header: res.Header, 9766 } 9767 } 9768 if err != nil { 9769 return nil, err 9770 } 9771 defer googleapi.CloseBody(res) 9772 if err := googleapi.CheckResponse(res); err != nil { 9773 return nil, err 9774 } 9775 ret := &ConsentArtifact{ 9776 ServerResponse: googleapi.ServerResponse{ 9777 Header: res.Header, 9778 HTTPStatusCode: res.StatusCode, 9779 }, 9780 } 9781 target := &ret 9782 if err := gensupport.DecodeResponse(target, res); err != nil { 9783 return nil, err 9784 } 9785 return ret, nil 9786 // { 9787 // "description": "Gets the specified Consent artifact.", 9788 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/consentStores/{consentStoresId}/consentArtifacts/{consentArtifactsId}", 9789 // "httpMethod": "GET", 9790 // "id": "healthcare.projects.locations.datasets.consentStores.consentArtifacts.get", 9791 // "parameterOrder": [ 9792 // "name" 9793 // ], 9794 // "parameters": { 9795 // "name": { 9796 // "description": "Required. The resource name of the Consent artifact to retrieve.", 9797 // "location": "path", 9798 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+/consentArtifacts/[^/]+$", 9799 // "required": true, 9800 // "type": "string" 9801 // } 9802 // }, 9803 // "path": "v1/{+name}", 9804 // "response": { 9805 // "$ref": "ConsentArtifact" 9806 // }, 9807 // "scopes": [ 9808 // "https://www.googleapis.com/auth/cloud-platform" 9809 // ] 9810 // } 9811 9812} 9813 9814// method id "healthcare.projects.locations.datasets.consentStores.consentArtifacts.list": 9815 9816type ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall struct { 9817 s *Service 9818 parent string 9819 urlParams_ gensupport.URLParams 9820 ifNoneMatch_ string 9821 ctx_ context.Context 9822 header_ http.Header 9823} 9824 9825// List: Lists the Consent artifacts in the specified consent store. 9826// 9827// - parent: Name of the consent store to retrieve consent artifacts 9828// from. 9829func (r *ProjectsLocationsDatasetsConsentStoresConsentArtifactsService) List(parent string) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall { 9830 c := &ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9831 c.parent = parent 9832 return c 9833} 9834 9835// Filter sets the optional parameter "filter": Restricts the artifacts 9836// returned to those matching a filter. The following syntax is 9837// available: * A string field value can be written as text inside 9838// quotation marks, for example "query text". The only valid 9839// relational operation for text fields is equality (`=`), where text is 9840// searched within the field, rather than having the field be equal to 9841// the text. For example, "Comment = great" returns messages with 9842// `great` in the comment field. * A number field value can be written 9843// as an integer, a decimal, or an exponential. The valid relational 9844// operators for number fields are the equality operator (`=`), along 9845// with the less than/greater than operators (`<`, `<=`, `>`, `>=`). 9846// Note that there is no inequality (`!=`) operator. You can prepend the 9847// `NOT` operator to an expression to negate it. * A date field value 9848// must be written in `yyyy-mm-dd` form. Fields with date and time use 9849// the RFC3339 time format. Leading zeros are required for one-digit 9850// months and days. The valid relational operators for date fields are 9851// the equality operator (`=`) , along with the less than/greater than 9852// operators (`<`, `<=`, `>`, `>=`). Note that there is no inequality 9853// (`!=`) operator. You can prepend the `NOT` operator to an expression 9854// to negate it. * Multiple field query expressions can be combined in 9855// one query by adding `AND` or `OR` operators between the expressions. 9856// If a boolean operator appears within a quoted string, it is not 9857// treated as special, it's just another part of the character string to 9858// be matched. You can prepend the `NOT` operator to an expression to 9859// negate it. The fields available for filtering are: - user_id. For 9860// example, `filter=user_id=\"user123\". - consent_content_version - 9861// metadata. For example, `filter=Metadata(\"testkey\")=\"value\" or 9862// `filter=HasMetadata(\"testkey\")`. 9863func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall) Filter(filter string) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall { 9864 c.urlParams_.Set("filter", filter) 9865 return c 9866} 9867 9868// PageSize sets the optional parameter "pageSize": Limit on the number 9869// of consent artifacts to return in a single response. If not 9870// specified, 100 is used. May not be larger than 1000. 9871func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall { 9872 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 9873 return c 9874} 9875 9876// PageToken sets the optional parameter "pageToken": The 9877// next_page_token value returned from the previous List request, if 9878// any. 9879func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall { 9880 c.urlParams_.Set("pageToken", pageToken) 9881 return c 9882} 9883 9884// Fields allows partial responses to be retrieved. See 9885// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9886// for more information. 9887func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall { 9888 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9889 return c 9890} 9891 9892// IfNoneMatch sets the optional parameter which makes the operation 9893// fail if the object's ETag matches the given value. This is useful for 9894// getting updates only after the object has changed since the last 9895// request. Use googleapi.IsNotModified to check whether the response 9896// error from Do is the result of In-None-Match. 9897func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall { 9898 c.ifNoneMatch_ = entityTag 9899 return c 9900} 9901 9902// Context sets the context to be used in this call's Do method. Any 9903// pending HTTP request will be aborted if the provided context is 9904// canceled. 9905func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall { 9906 c.ctx_ = ctx 9907 return c 9908} 9909 9910// Header returns an http.Header that can be modified by the caller to 9911// add HTTP headers to the request. 9912func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall) Header() http.Header { 9913 if c.header_ == nil { 9914 c.header_ = make(http.Header) 9915 } 9916 return c.header_ 9917} 9918 9919func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall) doRequest(alt string) (*http.Response, error) { 9920 reqHeaders := make(http.Header) 9921 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 9922 for k, v := range c.header_ { 9923 reqHeaders[k] = v 9924 } 9925 reqHeaders.Set("User-Agent", c.s.userAgent()) 9926 if c.ifNoneMatch_ != "" { 9927 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9928 } 9929 var body io.Reader = nil 9930 c.urlParams_.Set("alt", alt) 9931 c.urlParams_.Set("prettyPrint", "false") 9932 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/consentArtifacts") 9933 urls += "?" + c.urlParams_.Encode() 9934 req, err := http.NewRequest("GET", urls, body) 9935 if err != nil { 9936 return nil, err 9937 } 9938 req.Header = reqHeaders 9939 googleapi.Expand(req.URL, map[string]string{ 9940 "parent": c.parent, 9941 }) 9942 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9943} 9944 9945// Do executes the "healthcare.projects.locations.datasets.consentStores.consentArtifacts.list" call. 9946// Exactly one of *ListConsentArtifactsResponse or error will be 9947// non-nil. Any non-2xx status code is an error. Response headers are in 9948// either *ListConsentArtifactsResponse.ServerResponse.Header or (if a 9949// response was returned at all) in error.(*googleapi.Error).Header. Use 9950// googleapi.IsNotModified to check whether the returned error was 9951// because http.StatusNotModified was returned. 9952func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall) Do(opts ...googleapi.CallOption) (*ListConsentArtifactsResponse, error) { 9953 gensupport.SetOptions(c.urlParams_, opts...) 9954 res, err := c.doRequest("json") 9955 if res != nil && res.StatusCode == http.StatusNotModified { 9956 if res.Body != nil { 9957 res.Body.Close() 9958 } 9959 return nil, &googleapi.Error{ 9960 Code: res.StatusCode, 9961 Header: res.Header, 9962 } 9963 } 9964 if err != nil { 9965 return nil, err 9966 } 9967 defer googleapi.CloseBody(res) 9968 if err := googleapi.CheckResponse(res); err != nil { 9969 return nil, err 9970 } 9971 ret := &ListConsentArtifactsResponse{ 9972 ServerResponse: googleapi.ServerResponse{ 9973 Header: res.Header, 9974 HTTPStatusCode: res.StatusCode, 9975 }, 9976 } 9977 target := &ret 9978 if err := gensupport.DecodeResponse(target, res); err != nil { 9979 return nil, err 9980 } 9981 return ret, nil 9982 // { 9983 // "description": "Lists the Consent artifacts in the specified consent store.", 9984 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/consentStores/{consentStoresId}/consentArtifacts", 9985 // "httpMethod": "GET", 9986 // "id": "healthcare.projects.locations.datasets.consentStores.consentArtifacts.list", 9987 // "parameterOrder": [ 9988 // "parent" 9989 // ], 9990 // "parameters": { 9991 // "filter": { 9992 // "description": "Optional. Restricts the artifacts returned to those matching a filter. The following syntax is available: * A string field value can be written as text inside quotation marks, for example `\"query text\"`. The only valid relational operation for text fields is equality (`=`), where text is searched within the field, rather than having the field be equal to the text. For example, `\"Comment = great\"` returns messages with `great` in the comment field. * A number field value can be written as an integer, a decimal, or an exponential. The valid relational operators for number fields are the equality operator (`=`), along with the less than/greater than operators (`\u003c`, `\u003c=`, `\u003e`, `\u003e=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * A date field value must be written in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format. Leading zeros are required for one-digit months and days. The valid relational operators for date fields are the equality operator (`=`) , along with the less than/greater than operators (`\u003c`, `\u003c=`, `\u003e`, `\u003e=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * Multiple field query expressions can be combined in one query by adding `AND` or `OR` operators between the expressions. If a boolean operator appears within a quoted string, it is not treated as special, it's just another part of the character string to be matched. You can prepend the `NOT` operator to an expression to negate it. The fields available for filtering are: - user_id. For example, `filter=user_id=\\\"user123\\\"`. - consent_content_version - metadata. For example, `filter=Metadata(\\\"testkey\\\")=\\\"value\\\"` or `filter=HasMetadata(\\\"testkey\\\")`.", 9993 // "location": "query", 9994 // "type": "string" 9995 // }, 9996 // "pageSize": { 9997 // "description": "Optional. Limit on the number of consent artifacts to return in a single response. If not specified, 100 is used. May not be larger than 1000.", 9998 // "format": "int32", 9999 // "location": "query", 10000 // "type": "integer" 10001 // }, 10002 // "pageToken": { 10003 // "description": "Optional. The next_page_token value returned from the previous List request, if any.", 10004 // "location": "query", 10005 // "type": "string" 10006 // }, 10007 // "parent": { 10008 // "description": "Required. Name of the consent store to retrieve consent artifacts from.", 10009 // "location": "path", 10010 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+$", 10011 // "required": true, 10012 // "type": "string" 10013 // } 10014 // }, 10015 // "path": "v1/{+parent}/consentArtifacts", 10016 // "response": { 10017 // "$ref": "ListConsentArtifactsResponse" 10018 // }, 10019 // "scopes": [ 10020 // "https://www.googleapis.com/auth/cloud-platform" 10021 // ] 10022 // } 10023 10024} 10025 10026// Pages invokes f for each page of results. 10027// A non-nil error returned from f will halt the iteration. 10028// The provided context supersedes any context provided to the Context method. 10029func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall) Pages(ctx context.Context, f func(*ListConsentArtifactsResponse) error) error { 10030 c.ctx_ = ctx 10031 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 10032 for { 10033 x, err := c.Do() 10034 if err != nil { 10035 return err 10036 } 10037 if err := f(x); err != nil { 10038 return err 10039 } 10040 if x.NextPageToken == "" { 10041 return nil 10042 } 10043 c.PageToken(x.NextPageToken) 10044 } 10045} 10046 10047// method id "healthcare.projects.locations.datasets.consentStores.consents.activate": 10048 10049type ProjectsLocationsDatasetsConsentStoresConsentsActivateCall struct { 10050 s *Service 10051 name string 10052 activateconsentrequest *ActivateConsentRequest 10053 urlParams_ gensupport.URLParams 10054 ctx_ context.Context 10055 header_ http.Header 10056} 10057 10058// Activate: Activates the latest revision of the specified Consent by 10059// committing a new revision with `state` updated to `ACTIVE`. If the 10060// latest revision of the specified Consent is in the `ACTIVE` state, no 10061// new revision is committed. A FAILED_PRECONDITION error occurs if the 10062// latest revision of the specified Consent is in the `REJECTED` or 10063// `REVOKED` state. 10064// 10065// - name: The resource name of the Consent to activate, of the form 10066// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 10067// /consentStores/{consent_store_id}/consents/{consent_id}`. An 10068// INVALID_ARGUMENT error occurs if `revision_id` is specified in the 10069// name. 10070func (r *ProjectsLocationsDatasetsConsentStoresConsentsService) Activate(name string, activateconsentrequest *ActivateConsentRequest) *ProjectsLocationsDatasetsConsentStoresConsentsActivateCall { 10071 c := &ProjectsLocationsDatasetsConsentStoresConsentsActivateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10072 c.name = name 10073 c.activateconsentrequest = activateconsentrequest 10074 return c 10075} 10076 10077// Fields allows partial responses to be retrieved. See 10078// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10079// for more information. 10080func (c *ProjectsLocationsDatasetsConsentStoresConsentsActivateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentsActivateCall { 10081 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10082 return c 10083} 10084 10085// Context sets the context to be used in this call's Do method. Any 10086// pending HTTP request will be aborted if the provided context is 10087// canceled. 10088func (c *ProjectsLocationsDatasetsConsentStoresConsentsActivateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentsActivateCall { 10089 c.ctx_ = ctx 10090 return c 10091} 10092 10093// Header returns an http.Header that can be modified by the caller to 10094// add HTTP headers to the request. 10095func (c *ProjectsLocationsDatasetsConsentStoresConsentsActivateCall) Header() http.Header { 10096 if c.header_ == nil { 10097 c.header_ = make(http.Header) 10098 } 10099 return c.header_ 10100} 10101 10102func (c *ProjectsLocationsDatasetsConsentStoresConsentsActivateCall) doRequest(alt string) (*http.Response, error) { 10103 reqHeaders := make(http.Header) 10104 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 10105 for k, v := range c.header_ { 10106 reqHeaders[k] = v 10107 } 10108 reqHeaders.Set("User-Agent", c.s.userAgent()) 10109 var body io.Reader = nil 10110 body, err := googleapi.WithoutDataWrapper.JSONReader(c.activateconsentrequest) 10111 if err != nil { 10112 return nil, err 10113 } 10114 reqHeaders.Set("Content-Type", "application/json") 10115 c.urlParams_.Set("alt", alt) 10116 c.urlParams_.Set("prettyPrint", "false") 10117 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:activate") 10118 urls += "?" + c.urlParams_.Encode() 10119 req, err := http.NewRequest("POST", urls, body) 10120 if err != nil { 10121 return nil, err 10122 } 10123 req.Header = reqHeaders 10124 googleapi.Expand(req.URL, map[string]string{ 10125 "name": c.name, 10126 }) 10127 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10128} 10129 10130// Do executes the "healthcare.projects.locations.datasets.consentStores.consents.activate" call. 10131// Exactly one of *Consent or error will be non-nil. Any non-2xx status 10132// code is an error. Response headers are in either 10133// *Consent.ServerResponse.Header or (if a response was returned at all) 10134// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 10135// check whether the returned error was because http.StatusNotModified 10136// was returned. 10137func (c *ProjectsLocationsDatasetsConsentStoresConsentsActivateCall) Do(opts ...googleapi.CallOption) (*Consent, error) { 10138 gensupport.SetOptions(c.urlParams_, opts...) 10139 res, err := c.doRequest("json") 10140 if res != nil && res.StatusCode == http.StatusNotModified { 10141 if res.Body != nil { 10142 res.Body.Close() 10143 } 10144 return nil, &googleapi.Error{ 10145 Code: res.StatusCode, 10146 Header: res.Header, 10147 } 10148 } 10149 if err != nil { 10150 return nil, err 10151 } 10152 defer googleapi.CloseBody(res) 10153 if err := googleapi.CheckResponse(res); err != nil { 10154 return nil, err 10155 } 10156 ret := &Consent{ 10157 ServerResponse: googleapi.ServerResponse{ 10158 Header: res.Header, 10159 HTTPStatusCode: res.StatusCode, 10160 }, 10161 } 10162 target := &ret 10163 if err := gensupport.DecodeResponse(target, res); err != nil { 10164 return nil, err 10165 } 10166 return ret, nil 10167 // { 10168 // "description": "Activates the latest revision of the specified Consent by committing a new revision with `state` updated to `ACTIVE`. If the latest revision of the specified Consent is in the `ACTIVE` state, no new revision is committed. A FAILED_PRECONDITION error occurs if the latest revision of the specified Consent is in the `REJECTED` or `REVOKED` state.", 10169 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/consentStores/{consentStoresId}/consents/{consentsId}:activate", 10170 // "httpMethod": "POST", 10171 // "id": "healthcare.projects.locations.datasets.consentStores.consents.activate", 10172 // "parameterOrder": [ 10173 // "name" 10174 // ], 10175 // "parameters": { 10176 // "name": { 10177 // "description": "Required. The resource name of the Consent to activate, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}`. An INVALID_ARGUMENT error occurs if `revision_id` is specified in the name.", 10178 // "location": "path", 10179 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+/consents/[^/]+$", 10180 // "required": true, 10181 // "type": "string" 10182 // } 10183 // }, 10184 // "path": "v1/{+name}:activate", 10185 // "request": { 10186 // "$ref": "ActivateConsentRequest" 10187 // }, 10188 // "response": { 10189 // "$ref": "Consent" 10190 // }, 10191 // "scopes": [ 10192 // "https://www.googleapis.com/auth/cloud-platform" 10193 // ] 10194 // } 10195 10196} 10197 10198// method id "healthcare.projects.locations.datasets.consentStores.consents.create": 10199 10200type ProjectsLocationsDatasetsConsentStoresConsentsCreateCall struct { 10201 s *Service 10202 parent string 10203 consent *Consent 10204 urlParams_ gensupport.URLParams 10205 ctx_ context.Context 10206 header_ http.Header 10207} 10208 10209// Create: Creates a new Consent in the parent consent store. 10210// 10211// - parent: Name of the consent store. 10212func (r *ProjectsLocationsDatasetsConsentStoresConsentsService) Create(parent string, consent *Consent) *ProjectsLocationsDatasetsConsentStoresConsentsCreateCall { 10213 c := &ProjectsLocationsDatasetsConsentStoresConsentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10214 c.parent = parent 10215 c.consent = consent 10216 return c 10217} 10218 10219// Fields allows partial responses to be retrieved. See 10220// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10221// for more information. 10222func (c *ProjectsLocationsDatasetsConsentStoresConsentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentsCreateCall { 10223 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10224 return c 10225} 10226 10227// Context sets the context to be used in this call's Do method. Any 10228// pending HTTP request will be aborted if the provided context is 10229// canceled. 10230func (c *ProjectsLocationsDatasetsConsentStoresConsentsCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentsCreateCall { 10231 c.ctx_ = ctx 10232 return c 10233} 10234 10235// Header returns an http.Header that can be modified by the caller to 10236// add HTTP headers to the request. 10237func (c *ProjectsLocationsDatasetsConsentStoresConsentsCreateCall) Header() http.Header { 10238 if c.header_ == nil { 10239 c.header_ = make(http.Header) 10240 } 10241 return c.header_ 10242} 10243 10244func (c *ProjectsLocationsDatasetsConsentStoresConsentsCreateCall) doRequest(alt string) (*http.Response, error) { 10245 reqHeaders := make(http.Header) 10246 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 10247 for k, v := range c.header_ { 10248 reqHeaders[k] = v 10249 } 10250 reqHeaders.Set("User-Agent", c.s.userAgent()) 10251 var body io.Reader = nil 10252 body, err := googleapi.WithoutDataWrapper.JSONReader(c.consent) 10253 if err != nil { 10254 return nil, err 10255 } 10256 reqHeaders.Set("Content-Type", "application/json") 10257 c.urlParams_.Set("alt", alt) 10258 c.urlParams_.Set("prettyPrint", "false") 10259 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/consents") 10260 urls += "?" + c.urlParams_.Encode() 10261 req, err := http.NewRequest("POST", urls, body) 10262 if err != nil { 10263 return nil, err 10264 } 10265 req.Header = reqHeaders 10266 googleapi.Expand(req.URL, map[string]string{ 10267 "parent": c.parent, 10268 }) 10269 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10270} 10271 10272// Do executes the "healthcare.projects.locations.datasets.consentStores.consents.create" call. 10273// Exactly one of *Consent or error will be non-nil. Any non-2xx status 10274// code is an error. Response headers are in either 10275// *Consent.ServerResponse.Header or (if a response was returned at all) 10276// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 10277// check whether the returned error was because http.StatusNotModified 10278// was returned. 10279func (c *ProjectsLocationsDatasetsConsentStoresConsentsCreateCall) Do(opts ...googleapi.CallOption) (*Consent, error) { 10280 gensupport.SetOptions(c.urlParams_, opts...) 10281 res, err := c.doRequest("json") 10282 if res != nil && res.StatusCode == http.StatusNotModified { 10283 if res.Body != nil { 10284 res.Body.Close() 10285 } 10286 return nil, &googleapi.Error{ 10287 Code: res.StatusCode, 10288 Header: res.Header, 10289 } 10290 } 10291 if err != nil { 10292 return nil, err 10293 } 10294 defer googleapi.CloseBody(res) 10295 if err := googleapi.CheckResponse(res); err != nil { 10296 return nil, err 10297 } 10298 ret := &Consent{ 10299 ServerResponse: googleapi.ServerResponse{ 10300 Header: res.Header, 10301 HTTPStatusCode: res.StatusCode, 10302 }, 10303 } 10304 target := &ret 10305 if err := gensupport.DecodeResponse(target, res); err != nil { 10306 return nil, err 10307 } 10308 return ret, nil 10309 // { 10310 // "description": "Creates a new Consent in the parent consent store.", 10311 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/consentStores/{consentStoresId}/consents", 10312 // "httpMethod": "POST", 10313 // "id": "healthcare.projects.locations.datasets.consentStores.consents.create", 10314 // "parameterOrder": [ 10315 // "parent" 10316 // ], 10317 // "parameters": { 10318 // "parent": { 10319 // "description": "Required. Name of the consent store.", 10320 // "location": "path", 10321 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+$", 10322 // "required": true, 10323 // "type": "string" 10324 // } 10325 // }, 10326 // "path": "v1/{+parent}/consents", 10327 // "request": { 10328 // "$ref": "Consent" 10329 // }, 10330 // "response": { 10331 // "$ref": "Consent" 10332 // }, 10333 // "scopes": [ 10334 // "https://www.googleapis.com/auth/cloud-platform" 10335 // ] 10336 // } 10337 10338} 10339 10340// method id "healthcare.projects.locations.datasets.consentStores.consents.delete": 10341 10342type ProjectsLocationsDatasetsConsentStoresConsentsDeleteCall struct { 10343 s *Service 10344 name string 10345 urlParams_ gensupport.URLParams 10346 ctx_ context.Context 10347 header_ http.Header 10348} 10349 10350// Delete: Deletes the Consent and its revisions. To keep a record of 10351// the Consent but mark it inactive, see [RevokeConsent]. To delete a 10352// revision of a Consent, see [DeleteConsentRevision]. This operation 10353// does not delete the related Consent artifact. 10354// 10355// - name: The resource name of the Consent to delete, of the form 10356// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 10357// /consentStores/{consent_store_id}/consents/{consent_id}`. An 10358// INVALID_ARGUMENT error occurs if `revision_id` is specified in the 10359// name. 10360func (r *ProjectsLocationsDatasetsConsentStoresConsentsService) Delete(name string) *ProjectsLocationsDatasetsConsentStoresConsentsDeleteCall { 10361 c := &ProjectsLocationsDatasetsConsentStoresConsentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10362 c.name = name 10363 return c 10364} 10365 10366// Fields allows partial responses to be retrieved. See 10367// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10368// for more information. 10369func (c *ProjectsLocationsDatasetsConsentStoresConsentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentsDeleteCall { 10370 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10371 return c 10372} 10373 10374// Context sets the context to be used in this call's Do method. Any 10375// pending HTTP request will be aborted if the provided context is 10376// canceled. 10377func (c *ProjectsLocationsDatasetsConsentStoresConsentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentsDeleteCall { 10378 c.ctx_ = ctx 10379 return c 10380} 10381 10382// Header returns an http.Header that can be modified by the caller to 10383// add HTTP headers to the request. 10384func (c *ProjectsLocationsDatasetsConsentStoresConsentsDeleteCall) Header() http.Header { 10385 if c.header_ == nil { 10386 c.header_ = make(http.Header) 10387 } 10388 return c.header_ 10389} 10390 10391func (c *ProjectsLocationsDatasetsConsentStoresConsentsDeleteCall) doRequest(alt string) (*http.Response, error) { 10392 reqHeaders := make(http.Header) 10393 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 10394 for k, v := range c.header_ { 10395 reqHeaders[k] = v 10396 } 10397 reqHeaders.Set("User-Agent", c.s.userAgent()) 10398 var body io.Reader = nil 10399 c.urlParams_.Set("alt", alt) 10400 c.urlParams_.Set("prettyPrint", "false") 10401 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 10402 urls += "?" + c.urlParams_.Encode() 10403 req, err := http.NewRequest("DELETE", urls, body) 10404 if err != nil { 10405 return nil, err 10406 } 10407 req.Header = reqHeaders 10408 googleapi.Expand(req.URL, map[string]string{ 10409 "name": c.name, 10410 }) 10411 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10412} 10413 10414// Do executes the "healthcare.projects.locations.datasets.consentStores.consents.delete" call. 10415// Exactly one of *Empty or error will be non-nil. Any non-2xx status 10416// code is an error. Response headers are in either 10417// *Empty.ServerResponse.Header or (if a response was returned at all) 10418// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 10419// check whether the returned error was because http.StatusNotModified 10420// was returned. 10421func (c *ProjectsLocationsDatasetsConsentStoresConsentsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 10422 gensupport.SetOptions(c.urlParams_, opts...) 10423 res, err := c.doRequest("json") 10424 if res != nil && res.StatusCode == http.StatusNotModified { 10425 if res.Body != nil { 10426 res.Body.Close() 10427 } 10428 return nil, &googleapi.Error{ 10429 Code: res.StatusCode, 10430 Header: res.Header, 10431 } 10432 } 10433 if err != nil { 10434 return nil, err 10435 } 10436 defer googleapi.CloseBody(res) 10437 if err := googleapi.CheckResponse(res); err != nil { 10438 return nil, err 10439 } 10440 ret := &Empty{ 10441 ServerResponse: googleapi.ServerResponse{ 10442 Header: res.Header, 10443 HTTPStatusCode: res.StatusCode, 10444 }, 10445 } 10446 target := &ret 10447 if err := gensupport.DecodeResponse(target, res); err != nil { 10448 return nil, err 10449 } 10450 return ret, nil 10451 // { 10452 // "description": "Deletes the Consent and its revisions. To keep a record of the Consent but mark it inactive, see [RevokeConsent]. To delete a revision of a Consent, see [DeleteConsentRevision]. This operation does not delete the related Consent artifact.", 10453 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/consentStores/{consentStoresId}/consents/{consentsId}", 10454 // "httpMethod": "DELETE", 10455 // "id": "healthcare.projects.locations.datasets.consentStores.consents.delete", 10456 // "parameterOrder": [ 10457 // "name" 10458 // ], 10459 // "parameters": { 10460 // "name": { 10461 // "description": "Required. The resource name of the Consent to delete, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}`. An INVALID_ARGUMENT error occurs if `revision_id` is specified in the name.", 10462 // "location": "path", 10463 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+/consents/[^/]+$", 10464 // "required": true, 10465 // "type": "string" 10466 // } 10467 // }, 10468 // "path": "v1/{+name}", 10469 // "response": { 10470 // "$ref": "Empty" 10471 // }, 10472 // "scopes": [ 10473 // "https://www.googleapis.com/auth/cloud-platform" 10474 // ] 10475 // } 10476 10477} 10478 10479// method id "healthcare.projects.locations.datasets.consentStores.consents.deleteRevision": 10480 10481type ProjectsLocationsDatasetsConsentStoresConsentsDeleteRevisionCall struct { 10482 s *Service 10483 name string 10484 urlParams_ gensupport.URLParams 10485 ctx_ context.Context 10486 header_ http.Header 10487} 10488 10489// DeleteRevision: Deletes the specified revision of a Consent. An 10490// INVALID_ARGUMENT error occurs if the specified revision is the latest 10491// revision. 10492// 10493// - name: The resource name of the Consent revision to delete, of the 10494// form 10495// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 10496// /consentStores/{consent_store_id}/consents/{consent_id}@{revision_id 10497// }`. An INVALID_ARGUMENT error occurs if `revision_id` is not 10498// specified in the name. 10499func (r *ProjectsLocationsDatasetsConsentStoresConsentsService) DeleteRevision(name string) *ProjectsLocationsDatasetsConsentStoresConsentsDeleteRevisionCall { 10500 c := &ProjectsLocationsDatasetsConsentStoresConsentsDeleteRevisionCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10501 c.name = name 10502 return c 10503} 10504 10505// Fields allows partial responses to be retrieved. See 10506// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10507// for more information. 10508func (c *ProjectsLocationsDatasetsConsentStoresConsentsDeleteRevisionCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentsDeleteRevisionCall { 10509 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10510 return c 10511} 10512 10513// Context sets the context to be used in this call's Do method. Any 10514// pending HTTP request will be aborted if the provided context is 10515// canceled. 10516func (c *ProjectsLocationsDatasetsConsentStoresConsentsDeleteRevisionCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentsDeleteRevisionCall { 10517 c.ctx_ = ctx 10518 return c 10519} 10520 10521// Header returns an http.Header that can be modified by the caller to 10522// add HTTP headers to the request. 10523func (c *ProjectsLocationsDatasetsConsentStoresConsentsDeleteRevisionCall) Header() http.Header { 10524 if c.header_ == nil { 10525 c.header_ = make(http.Header) 10526 } 10527 return c.header_ 10528} 10529 10530func (c *ProjectsLocationsDatasetsConsentStoresConsentsDeleteRevisionCall) doRequest(alt string) (*http.Response, error) { 10531 reqHeaders := make(http.Header) 10532 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 10533 for k, v := range c.header_ { 10534 reqHeaders[k] = v 10535 } 10536 reqHeaders.Set("User-Agent", c.s.userAgent()) 10537 var body io.Reader = nil 10538 c.urlParams_.Set("alt", alt) 10539 c.urlParams_.Set("prettyPrint", "false") 10540 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:deleteRevision") 10541 urls += "?" + c.urlParams_.Encode() 10542 req, err := http.NewRequest("DELETE", urls, body) 10543 if err != nil { 10544 return nil, err 10545 } 10546 req.Header = reqHeaders 10547 googleapi.Expand(req.URL, map[string]string{ 10548 "name": c.name, 10549 }) 10550 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10551} 10552 10553// Do executes the "healthcare.projects.locations.datasets.consentStores.consents.deleteRevision" call. 10554// Exactly one of *Empty or error will be non-nil. Any non-2xx status 10555// code is an error. Response headers are in either 10556// *Empty.ServerResponse.Header or (if a response was returned at all) 10557// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 10558// check whether the returned error was because http.StatusNotModified 10559// was returned. 10560func (c *ProjectsLocationsDatasetsConsentStoresConsentsDeleteRevisionCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 10561 gensupport.SetOptions(c.urlParams_, opts...) 10562 res, err := c.doRequest("json") 10563 if res != nil && res.StatusCode == http.StatusNotModified { 10564 if res.Body != nil { 10565 res.Body.Close() 10566 } 10567 return nil, &googleapi.Error{ 10568 Code: res.StatusCode, 10569 Header: res.Header, 10570 } 10571 } 10572 if err != nil { 10573 return nil, err 10574 } 10575 defer googleapi.CloseBody(res) 10576 if err := googleapi.CheckResponse(res); err != nil { 10577 return nil, err 10578 } 10579 ret := &Empty{ 10580 ServerResponse: googleapi.ServerResponse{ 10581 Header: res.Header, 10582 HTTPStatusCode: res.StatusCode, 10583 }, 10584 } 10585 target := &ret 10586 if err := gensupport.DecodeResponse(target, res); err != nil { 10587 return nil, err 10588 } 10589 return ret, nil 10590 // { 10591 // "description": "Deletes the specified revision of a Consent. An INVALID_ARGUMENT error occurs if the specified revision is the latest revision.", 10592 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/consentStores/{consentStoresId}/consents/{consentsId}:deleteRevision", 10593 // "httpMethod": "DELETE", 10594 // "id": "healthcare.projects.locations.datasets.consentStores.consents.deleteRevision", 10595 // "parameterOrder": [ 10596 // "name" 10597 // ], 10598 // "parameters": { 10599 // "name": { 10600 // "description": "Required. The resource name of the Consent revision to delete, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}@{revision_id}`. An INVALID_ARGUMENT error occurs if `revision_id` is not specified in the name.", 10601 // "location": "path", 10602 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+/consents/[^/]+$", 10603 // "required": true, 10604 // "type": "string" 10605 // } 10606 // }, 10607 // "path": "v1/{+name}:deleteRevision", 10608 // "response": { 10609 // "$ref": "Empty" 10610 // }, 10611 // "scopes": [ 10612 // "https://www.googleapis.com/auth/cloud-platform" 10613 // ] 10614 // } 10615 10616} 10617 10618// method id "healthcare.projects.locations.datasets.consentStores.consents.get": 10619 10620type ProjectsLocationsDatasetsConsentStoresConsentsGetCall struct { 10621 s *Service 10622 name string 10623 urlParams_ gensupport.URLParams 10624 ifNoneMatch_ string 10625 ctx_ context.Context 10626 header_ http.Header 10627} 10628 10629// Get: Gets the specified revision of a Consent, or the latest revision 10630// if `revision_id` is not specified in the resource name. 10631// 10632// - name: The resource name of the Consent to retrieve, of the form 10633// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 10634// /consentStores/{consent_store_id}/consents/{consent_id}`. In order 10635// to retrieve a previous revision of the Consent, also provide the 10636// revision ID: 10637// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 10638// /consentStores/{consent_store_id}/consents/{consent_id}@{revision_id 10639// }`. 10640func (r *ProjectsLocationsDatasetsConsentStoresConsentsService) Get(name string) *ProjectsLocationsDatasetsConsentStoresConsentsGetCall { 10641 c := &ProjectsLocationsDatasetsConsentStoresConsentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10642 c.name = name 10643 return c 10644} 10645 10646// Fields allows partial responses to be retrieved. See 10647// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10648// for more information. 10649func (c *ProjectsLocationsDatasetsConsentStoresConsentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentsGetCall { 10650 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10651 return c 10652} 10653 10654// IfNoneMatch sets the optional parameter which makes the operation 10655// fail if the object's ETag matches the given value. This is useful for 10656// getting updates only after the object has changed since the last 10657// request. Use googleapi.IsNotModified to check whether the response 10658// error from Do is the result of In-None-Match. 10659func (c *ProjectsLocationsDatasetsConsentStoresConsentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsConsentStoresConsentsGetCall { 10660 c.ifNoneMatch_ = entityTag 10661 return c 10662} 10663 10664// Context sets the context to be used in this call's Do method. Any 10665// pending HTTP request will be aborted if the provided context is 10666// canceled. 10667func (c *ProjectsLocationsDatasetsConsentStoresConsentsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentsGetCall { 10668 c.ctx_ = ctx 10669 return c 10670} 10671 10672// Header returns an http.Header that can be modified by the caller to 10673// add HTTP headers to the request. 10674func (c *ProjectsLocationsDatasetsConsentStoresConsentsGetCall) Header() http.Header { 10675 if c.header_ == nil { 10676 c.header_ = make(http.Header) 10677 } 10678 return c.header_ 10679} 10680 10681func (c *ProjectsLocationsDatasetsConsentStoresConsentsGetCall) doRequest(alt string) (*http.Response, error) { 10682 reqHeaders := make(http.Header) 10683 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 10684 for k, v := range c.header_ { 10685 reqHeaders[k] = v 10686 } 10687 reqHeaders.Set("User-Agent", c.s.userAgent()) 10688 if c.ifNoneMatch_ != "" { 10689 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10690 } 10691 var body io.Reader = nil 10692 c.urlParams_.Set("alt", alt) 10693 c.urlParams_.Set("prettyPrint", "false") 10694 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 10695 urls += "?" + c.urlParams_.Encode() 10696 req, err := http.NewRequest("GET", urls, body) 10697 if err != nil { 10698 return nil, err 10699 } 10700 req.Header = reqHeaders 10701 googleapi.Expand(req.URL, map[string]string{ 10702 "name": c.name, 10703 }) 10704 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10705} 10706 10707// Do executes the "healthcare.projects.locations.datasets.consentStores.consents.get" call. 10708// Exactly one of *Consent or error will be non-nil. Any non-2xx status 10709// code is an error. Response headers are in either 10710// *Consent.ServerResponse.Header or (if a response was returned at all) 10711// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 10712// check whether the returned error was because http.StatusNotModified 10713// was returned. 10714func (c *ProjectsLocationsDatasetsConsentStoresConsentsGetCall) Do(opts ...googleapi.CallOption) (*Consent, error) { 10715 gensupport.SetOptions(c.urlParams_, opts...) 10716 res, err := c.doRequest("json") 10717 if res != nil && res.StatusCode == http.StatusNotModified { 10718 if res.Body != nil { 10719 res.Body.Close() 10720 } 10721 return nil, &googleapi.Error{ 10722 Code: res.StatusCode, 10723 Header: res.Header, 10724 } 10725 } 10726 if err != nil { 10727 return nil, err 10728 } 10729 defer googleapi.CloseBody(res) 10730 if err := googleapi.CheckResponse(res); err != nil { 10731 return nil, err 10732 } 10733 ret := &Consent{ 10734 ServerResponse: googleapi.ServerResponse{ 10735 Header: res.Header, 10736 HTTPStatusCode: res.StatusCode, 10737 }, 10738 } 10739 target := &ret 10740 if err := gensupport.DecodeResponse(target, res); err != nil { 10741 return nil, err 10742 } 10743 return ret, nil 10744 // { 10745 // "description": "Gets the specified revision of a Consent, or the latest revision if `revision_id` is not specified in the resource name.", 10746 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/consentStores/{consentStoresId}/consents/{consentsId}", 10747 // "httpMethod": "GET", 10748 // "id": "healthcare.projects.locations.datasets.consentStores.consents.get", 10749 // "parameterOrder": [ 10750 // "name" 10751 // ], 10752 // "parameters": { 10753 // "name": { 10754 // "description": "Required. The resource name of the Consent to retrieve, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}`. In order to retrieve a previous revision of the Consent, also provide the revision ID: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}@{revision_id}`", 10755 // "location": "path", 10756 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+/consents/[^/]+$", 10757 // "required": true, 10758 // "type": "string" 10759 // } 10760 // }, 10761 // "path": "v1/{+name}", 10762 // "response": { 10763 // "$ref": "Consent" 10764 // }, 10765 // "scopes": [ 10766 // "https://www.googleapis.com/auth/cloud-platform" 10767 // ] 10768 // } 10769 10770} 10771 10772// method id "healthcare.projects.locations.datasets.consentStores.consents.list": 10773 10774type ProjectsLocationsDatasetsConsentStoresConsentsListCall struct { 10775 s *Service 10776 parent string 10777 urlParams_ gensupport.URLParams 10778 ifNoneMatch_ string 10779 ctx_ context.Context 10780 header_ http.Header 10781} 10782 10783// List: Lists the Consent in the given consent store, returning each 10784// Consent's latest revision. 10785// 10786// - parent: Name of the consent store to retrieve Consents from. 10787func (r *ProjectsLocationsDatasetsConsentStoresConsentsService) List(parent string) *ProjectsLocationsDatasetsConsentStoresConsentsListCall { 10788 c := &ProjectsLocationsDatasetsConsentStoresConsentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10789 c.parent = parent 10790 return c 10791} 10792 10793// Filter sets the optional parameter "filter": Restricts the Consents 10794// returned to those matching a filter. The following syntax is 10795// available: * A string field value can be written as text inside 10796// quotation marks, for example "query text". The only valid 10797// relational operation for text fields is equality (`=`), where text is 10798// searched within the field, rather than having the field be equal to 10799// the text. For example, "Comment = great" returns messages with 10800// `great` in the comment field. * A number field value can be written 10801// as an integer, a decimal, or an exponential. The valid relational 10802// operators for number fields are the equality operator (`=`), along 10803// with the less than/greater than operators (`<`, `<=`, `>`, `>=`). 10804// Note that there is no inequality (`!=`) operator. You can prepend the 10805// `NOT` operator to an expression to negate it. * A date field value 10806// must be written in `yyyy-mm-dd` form. Fields with date and time use 10807// the RFC3339 time format. Leading zeros are required for one-digit 10808// months and days. The valid relational operators for date fields are 10809// the equality operator (`=`) , along with the less than/greater than 10810// operators (`<`, `<=`, `>`, `>=`). Note that there is no inequality 10811// (`!=`) operator. You can prepend the `NOT` operator to an expression 10812// to negate it. * Multiple field query expressions can be combined in 10813// one query by adding `AND` or `OR` operators between the expressions. 10814// If a boolean operator appears within a quoted string, it is not 10815// treated as special, it's just another part of the character string to 10816// be matched. You can prepend the `NOT` operator to an expression to 10817// negate it. The fields available for filtering are: - user_id. For 10818// example, `filter='user_id="user123"'`. - consent_artifact - state - 10819// revision_create_time - metadata. For example, 10820// `filter=Metadata(\"testkey\")=\"value\" or 10821// `filter=HasMetadata(\"testkey\")`. 10822func (c *ProjectsLocationsDatasetsConsentStoresConsentsListCall) Filter(filter string) *ProjectsLocationsDatasetsConsentStoresConsentsListCall { 10823 c.urlParams_.Set("filter", filter) 10824 return c 10825} 10826 10827// PageSize sets the optional parameter "pageSize": Limit on the number 10828// of Consents to return in a single response. If not specified, 100 is 10829// used. May not be larger than 1000. 10830func (c *ProjectsLocationsDatasetsConsentStoresConsentsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsConsentStoresConsentsListCall { 10831 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 10832 return c 10833} 10834 10835// PageToken sets the optional parameter "pageToken": The 10836// next_page_token value returned from the previous List request, if 10837// any. 10838func (c *ProjectsLocationsDatasetsConsentStoresConsentsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsConsentStoresConsentsListCall { 10839 c.urlParams_.Set("pageToken", pageToken) 10840 return c 10841} 10842 10843// Fields allows partial responses to be retrieved. See 10844// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10845// for more information. 10846func (c *ProjectsLocationsDatasetsConsentStoresConsentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentsListCall { 10847 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10848 return c 10849} 10850 10851// IfNoneMatch sets the optional parameter which makes the operation 10852// fail if the object's ETag matches the given value. This is useful for 10853// getting updates only after the object has changed since the last 10854// request. Use googleapi.IsNotModified to check whether the response 10855// error from Do is the result of In-None-Match. 10856func (c *ProjectsLocationsDatasetsConsentStoresConsentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsConsentStoresConsentsListCall { 10857 c.ifNoneMatch_ = entityTag 10858 return c 10859} 10860 10861// Context sets the context to be used in this call's Do method. Any 10862// pending HTTP request will be aborted if the provided context is 10863// canceled. 10864func (c *ProjectsLocationsDatasetsConsentStoresConsentsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentsListCall { 10865 c.ctx_ = ctx 10866 return c 10867} 10868 10869// Header returns an http.Header that can be modified by the caller to 10870// add HTTP headers to the request. 10871func (c *ProjectsLocationsDatasetsConsentStoresConsentsListCall) Header() http.Header { 10872 if c.header_ == nil { 10873 c.header_ = make(http.Header) 10874 } 10875 return c.header_ 10876} 10877 10878func (c *ProjectsLocationsDatasetsConsentStoresConsentsListCall) doRequest(alt string) (*http.Response, error) { 10879 reqHeaders := make(http.Header) 10880 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 10881 for k, v := range c.header_ { 10882 reqHeaders[k] = v 10883 } 10884 reqHeaders.Set("User-Agent", c.s.userAgent()) 10885 if c.ifNoneMatch_ != "" { 10886 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10887 } 10888 var body io.Reader = nil 10889 c.urlParams_.Set("alt", alt) 10890 c.urlParams_.Set("prettyPrint", "false") 10891 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/consents") 10892 urls += "?" + c.urlParams_.Encode() 10893 req, err := http.NewRequest("GET", urls, body) 10894 if err != nil { 10895 return nil, err 10896 } 10897 req.Header = reqHeaders 10898 googleapi.Expand(req.URL, map[string]string{ 10899 "parent": c.parent, 10900 }) 10901 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10902} 10903 10904// Do executes the "healthcare.projects.locations.datasets.consentStores.consents.list" call. 10905// Exactly one of *ListConsentsResponse or error will be non-nil. Any 10906// non-2xx status code is an error. Response headers are in either 10907// *ListConsentsResponse.ServerResponse.Header or (if a response was 10908// returned at all) in error.(*googleapi.Error).Header. Use 10909// googleapi.IsNotModified to check whether the returned error was 10910// because http.StatusNotModified was returned. 10911func (c *ProjectsLocationsDatasetsConsentStoresConsentsListCall) Do(opts ...googleapi.CallOption) (*ListConsentsResponse, error) { 10912 gensupport.SetOptions(c.urlParams_, opts...) 10913 res, err := c.doRequest("json") 10914 if res != nil && res.StatusCode == http.StatusNotModified { 10915 if res.Body != nil { 10916 res.Body.Close() 10917 } 10918 return nil, &googleapi.Error{ 10919 Code: res.StatusCode, 10920 Header: res.Header, 10921 } 10922 } 10923 if err != nil { 10924 return nil, err 10925 } 10926 defer googleapi.CloseBody(res) 10927 if err := googleapi.CheckResponse(res); err != nil { 10928 return nil, err 10929 } 10930 ret := &ListConsentsResponse{ 10931 ServerResponse: googleapi.ServerResponse{ 10932 Header: res.Header, 10933 HTTPStatusCode: res.StatusCode, 10934 }, 10935 } 10936 target := &ret 10937 if err := gensupport.DecodeResponse(target, res); err != nil { 10938 return nil, err 10939 } 10940 return ret, nil 10941 // { 10942 // "description": "Lists the Consent in the given consent store, returning each Consent's latest revision.", 10943 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/consentStores/{consentStoresId}/consents", 10944 // "httpMethod": "GET", 10945 // "id": "healthcare.projects.locations.datasets.consentStores.consents.list", 10946 // "parameterOrder": [ 10947 // "parent" 10948 // ], 10949 // "parameters": { 10950 // "filter": { 10951 // "description": "Optional. Restricts the Consents returned to those matching a filter. The following syntax is available: * A string field value can be written as text inside quotation marks, for example `\"query text\"`. The only valid relational operation for text fields is equality (`=`), where text is searched within the field, rather than having the field be equal to the text. For example, `\"Comment = great\"` returns messages with `great` in the comment field. * A number field value can be written as an integer, a decimal, or an exponential. The valid relational operators for number fields are the equality operator (`=`), along with the less than/greater than operators (`\u003c`, `\u003c=`, `\u003e`, `\u003e=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * A date field value must be written in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format. Leading zeros are required for one-digit months and days. The valid relational operators for date fields are the equality operator (`=`) , along with the less than/greater than operators (`\u003c`, `\u003c=`, `\u003e`, `\u003e=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * Multiple field query expressions can be combined in one query by adding `AND` or `OR` operators between the expressions. If a boolean operator appears within a quoted string, it is not treated as special, it's just another part of the character string to be matched. You can prepend the `NOT` operator to an expression to negate it. The fields available for filtering are: - user_id. For example, `filter='user_id=\"user123\"'`. - consent_artifact - state - revision_create_time - metadata. For example, `filter=Metadata(\\\"testkey\\\")=\\\"value\\\"` or `filter=HasMetadata(\\\"testkey\\\")`.", 10952 // "location": "query", 10953 // "type": "string" 10954 // }, 10955 // "pageSize": { 10956 // "description": "Optional. Limit on the number of Consents to return in a single response. If not specified, 100 is used. May not be larger than 1000.", 10957 // "format": "int32", 10958 // "location": "query", 10959 // "type": "integer" 10960 // }, 10961 // "pageToken": { 10962 // "description": "Optional. The next_page_token value returned from the previous List request, if any.", 10963 // "location": "query", 10964 // "type": "string" 10965 // }, 10966 // "parent": { 10967 // "description": "Required. Name of the consent store to retrieve Consents from.", 10968 // "location": "path", 10969 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+$", 10970 // "required": true, 10971 // "type": "string" 10972 // } 10973 // }, 10974 // "path": "v1/{+parent}/consents", 10975 // "response": { 10976 // "$ref": "ListConsentsResponse" 10977 // }, 10978 // "scopes": [ 10979 // "https://www.googleapis.com/auth/cloud-platform" 10980 // ] 10981 // } 10982 10983} 10984 10985// Pages invokes f for each page of results. 10986// A non-nil error returned from f will halt the iteration. 10987// The provided context supersedes any context provided to the Context method. 10988func (c *ProjectsLocationsDatasetsConsentStoresConsentsListCall) Pages(ctx context.Context, f func(*ListConsentsResponse) error) error { 10989 c.ctx_ = ctx 10990 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 10991 for { 10992 x, err := c.Do() 10993 if err != nil { 10994 return err 10995 } 10996 if err := f(x); err != nil { 10997 return err 10998 } 10999 if x.NextPageToken == "" { 11000 return nil 11001 } 11002 c.PageToken(x.NextPageToken) 11003 } 11004} 11005 11006// method id "healthcare.projects.locations.datasets.consentStores.consents.listRevisions": 11007 11008type ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall struct { 11009 s *Service 11010 name string 11011 urlParams_ gensupport.URLParams 11012 ifNoneMatch_ string 11013 ctx_ context.Context 11014 header_ http.Header 11015} 11016 11017// ListRevisions: Lists the revisions of the specified Consent in 11018// reverse chronological order. 11019// 11020// - name: The resource name of the Consent to retrieve revisions for. 11021func (r *ProjectsLocationsDatasetsConsentStoresConsentsService) ListRevisions(name string) *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall { 11022 c := &ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11023 c.name = name 11024 return c 11025} 11026 11027// Filter sets the optional parameter "filter": Restricts the revisions 11028// returned to those matching a filter. The following syntax is 11029// available: * A string field value can be written as text inside 11030// quotation marks, for example "query text". The only valid 11031// relational operation for text fields is equality (`=`), where text is 11032// searched within the field, rather than having the field be equal to 11033// the text. For example, "Comment = great" returns messages with 11034// `great` in the comment field. * A number field value can be written 11035// as an integer, a decimal, or an exponential. The valid relational 11036// operators for number fields are the equality operator (`=`), along 11037// with the less than/greater than operators (`<`, `<=`, `>`, `>=`). 11038// Note that there is no inequality (`!=`) operator. You can prepend the 11039// `NOT` operator to an expression to negate it. * A date field value 11040// must be written in `yyyy-mm-dd` form. Fields with date and time use 11041// the RFC3339 time format. Leading zeros are required for one-digit 11042// months and days. The valid relational operators for date fields are 11043// the equality operator (`=`) , along with the less than/greater than 11044// operators (`<`, `<=`, `>`, `>=`). Note that there is no inequality 11045// (`!=`) operator. You can prepend the `NOT` operator to an expression 11046// to negate it. * Multiple field query expressions can be combined in 11047// one query by adding `AND` or `OR` operators between the expressions. 11048// If a boolean operator appears within a quoted string, it is not 11049// treated as special, it's just another part of the character string to 11050// be matched. You can prepend the `NOT` operator to an expression to 11051// negate it. Fields available for filtering are: - user_id. For 11052// example, `filter='user_id="user123"'`. - consent_artifact - state - 11053// revision_create_time - metadata. For example, 11054// `filter=Metadata(\"testkey\")=\"value\" or 11055// `filter=HasMetadata(\"testkey\")`. 11056func (c *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall) Filter(filter string) *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall { 11057 c.urlParams_.Set("filter", filter) 11058 return c 11059} 11060 11061// PageSize sets the optional parameter "pageSize": Limit on the number 11062// of revisions to return in a single response. If not specified, 100 is 11063// used. May not be larger than 1000. 11064func (c *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall { 11065 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 11066 return c 11067} 11068 11069// PageToken sets the optional parameter "pageToken": Token to retrieve 11070// the next page of results or empty if there are no more results in the 11071// list. 11072func (c *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall) PageToken(pageToken string) *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall { 11073 c.urlParams_.Set("pageToken", pageToken) 11074 return c 11075} 11076 11077// Fields allows partial responses to be retrieved. See 11078// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11079// for more information. 11080func (c *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall { 11081 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11082 return c 11083} 11084 11085// IfNoneMatch sets the optional parameter which makes the operation 11086// fail if the object's ETag matches the given value. This is useful for 11087// getting updates only after the object has changed since the last 11088// request. Use googleapi.IsNotModified to check whether the response 11089// error from Do is the result of In-None-Match. 11090func (c *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall { 11091 c.ifNoneMatch_ = entityTag 11092 return c 11093} 11094 11095// Context sets the context to be used in this call's Do method. Any 11096// pending HTTP request will be aborted if the provided context is 11097// canceled. 11098func (c *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall { 11099 c.ctx_ = ctx 11100 return c 11101} 11102 11103// Header returns an http.Header that can be modified by the caller to 11104// add HTTP headers to the request. 11105func (c *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall) Header() http.Header { 11106 if c.header_ == nil { 11107 c.header_ = make(http.Header) 11108 } 11109 return c.header_ 11110} 11111 11112func (c *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall) doRequest(alt string) (*http.Response, error) { 11113 reqHeaders := make(http.Header) 11114 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 11115 for k, v := range c.header_ { 11116 reqHeaders[k] = v 11117 } 11118 reqHeaders.Set("User-Agent", c.s.userAgent()) 11119 if c.ifNoneMatch_ != "" { 11120 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11121 } 11122 var body io.Reader = nil 11123 c.urlParams_.Set("alt", alt) 11124 c.urlParams_.Set("prettyPrint", "false") 11125 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:listRevisions") 11126 urls += "?" + c.urlParams_.Encode() 11127 req, err := http.NewRequest("GET", urls, body) 11128 if err != nil { 11129 return nil, err 11130 } 11131 req.Header = reqHeaders 11132 googleapi.Expand(req.URL, map[string]string{ 11133 "name": c.name, 11134 }) 11135 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11136} 11137 11138// Do executes the "healthcare.projects.locations.datasets.consentStores.consents.listRevisions" call. 11139// Exactly one of *ListConsentRevisionsResponse or error will be 11140// non-nil. Any non-2xx status code is an error. Response headers are in 11141// either *ListConsentRevisionsResponse.ServerResponse.Header or (if a 11142// response was returned at all) in error.(*googleapi.Error).Header. Use 11143// googleapi.IsNotModified to check whether the returned error was 11144// because http.StatusNotModified was returned. 11145func (c *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall) Do(opts ...googleapi.CallOption) (*ListConsentRevisionsResponse, error) { 11146 gensupport.SetOptions(c.urlParams_, opts...) 11147 res, err := c.doRequest("json") 11148 if res != nil && res.StatusCode == http.StatusNotModified { 11149 if res.Body != nil { 11150 res.Body.Close() 11151 } 11152 return nil, &googleapi.Error{ 11153 Code: res.StatusCode, 11154 Header: res.Header, 11155 } 11156 } 11157 if err != nil { 11158 return nil, err 11159 } 11160 defer googleapi.CloseBody(res) 11161 if err := googleapi.CheckResponse(res); err != nil { 11162 return nil, err 11163 } 11164 ret := &ListConsentRevisionsResponse{ 11165 ServerResponse: googleapi.ServerResponse{ 11166 Header: res.Header, 11167 HTTPStatusCode: res.StatusCode, 11168 }, 11169 } 11170 target := &ret 11171 if err := gensupport.DecodeResponse(target, res); err != nil { 11172 return nil, err 11173 } 11174 return ret, nil 11175 // { 11176 // "description": "Lists the revisions of the specified Consent in reverse chronological order.", 11177 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/consentStores/{consentStoresId}/consents/{consentsId}:listRevisions", 11178 // "httpMethod": "GET", 11179 // "id": "healthcare.projects.locations.datasets.consentStores.consents.listRevisions", 11180 // "parameterOrder": [ 11181 // "name" 11182 // ], 11183 // "parameters": { 11184 // "filter": { 11185 // "description": "Optional. Restricts the revisions returned to those matching a filter. The following syntax is available: * A string field value can be written as text inside quotation marks, for example `\"query text\"`. The only valid relational operation for text fields is equality (`=`), where text is searched within the field, rather than having the field be equal to the text. For example, `\"Comment = great\"` returns messages with `great` in the comment field. * A number field value can be written as an integer, a decimal, or an exponential. The valid relational operators for number fields are the equality operator (`=`), along with the less than/greater than operators (`\u003c`, `\u003c=`, `\u003e`, `\u003e=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * A date field value must be written in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format. Leading zeros are required for one-digit months and days. The valid relational operators for date fields are the equality operator (`=`) , along with the less than/greater than operators (`\u003c`, `\u003c=`, `\u003e`, `\u003e=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * Multiple field query expressions can be combined in one query by adding `AND` or `OR` operators between the expressions. If a boolean operator appears within a quoted string, it is not treated as special, it's just another part of the character string to be matched. You can prepend the `NOT` operator to an expression to negate it. Fields available for filtering are: - user_id. For example, `filter='user_id=\"user123\"'`. - consent_artifact - state - revision_create_time - metadata. For example, `filter=Metadata(\\\"testkey\\\")=\\\"value\\\"` or `filter=HasMetadata(\\\"testkey\\\")`.", 11186 // "location": "query", 11187 // "type": "string" 11188 // }, 11189 // "name": { 11190 // "description": "Required. The resource name of the Consent to retrieve revisions for.", 11191 // "location": "path", 11192 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+/consents/[^/]+$", 11193 // "required": true, 11194 // "type": "string" 11195 // }, 11196 // "pageSize": { 11197 // "description": "Optional. Limit on the number of revisions to return in a single response. If not specified, 100 is used. May not be larger than 1000.", 11198 // "format": "int32", 11199 // "location": "query", 11200 // "type": "integer" 11201 // }, 11202 // "pageToken": { 11203 // "description": "Optional. Token to retrieve the next page of results or empty if there are no more results in the list.", 11204 // "location": "query", 11205 // "type": "string" 11206 // } 11207 // }, 11208 // "path": "v1/{+name}:listRevisions", 11209 // "response": { 11210 // "$ref": "ListConsentRevisionsResponse" 11211 // }, 11212 // "scopes": [ 11213 // "https://www.googleapis.com/auth/cloud-platform" 11214 // ] 11215 // } 11216 11217} 11218 11219// Pages invokes f for each page of results. 11220// A non-nil error returned from f will halt the iteration. 11221// The provided context supersedes any context provided to the Context method. 11222func (c *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall) Pages(ctx context.Context, f func(*ListConsentRevisionsResponse) error) error { 11223 c.ctx_ = ctx 11224 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 11225 for { 11226 x, err := c.Do() 11227 if err != nil { 11228 return err 11229 } 11230 if err := f(x); err != nil { 11231 return err 11232 } 11233 if x.NextPageToken == "" { 11234 return nil 11235 } 11236 c.PageToken(x.NextPageToken) 11237 } 11238} 11239 11240// method id "healthcare.projects.locations.datasets.consentStores.consents.patch": 11241 11242type ProjectsLocationsDatasetsConsentStoresConsentsPatchCall struct { 11243 s *Service 11244 name string 11245 consent *Consent 11246 urlParams_ gensupport.URLParams 11247 ctx_ context.Context 11248 header_ http.Header 11249} 11250 11251// Patch: Updates the latest revision of the specified Consent by 11252// committing a new revision with the changes. A FAILED_PRECONDITION 11253// error occurs if the latest revision of the specified Consent is in 11254// the `REJECTED` or `REVOKED` state. 11255// 11256// - name: Resource name of the Consent, of the form 11257// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 11258// /consentStores/{consent_store_id}/consents/{consent_id}`. Cannot be 11259// changed after creation. 11260func (r *ProjectsLocationsDatasetsConsentStoresConsentsService) Patch(name string, consent *Consent) *ProjectsLocationsDatasetsConsentStoresConsentsPatchCall { 11261 c := &ProjectsLocationsDatasetsConsentStoresConsentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11262 c.name = name 11263 c.consent = consent 11264 return c 11265} 11266 11267// UpdateMask sets the optional parameter "updateMask": Required. The 11268// update mask to apply to the resource. For the `FieldMask` definition, 11269// see 11270// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. 11271// Only the `user_id`, `policies`, `consent_artifact`, and `metadata` 11272// fields can be updated. 11273func (c *ProjectsLocationsDatasetsConsentStoresConsentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsConsentStoresConsentsPatchCall { 11274 c.urlParams_.Set("updateMask", updateMask) 11275 return c 11276} 11277 11278// Fields allows partial responses to be retrieved. See 11279// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11280// for more information. 11281func (c *ProjectsLocationsDatasetsConsentStoresConsentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentsPatchCall { 11282 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11283 return c 11284} 11285 11286// Context sets the context to be used in this call's Do method. Any 11287// pending HTTP request will be aborted if the provided context is 11288// canceled. 11289func (c *ProjectsLocationsDatasetsConsentStoresConsentsPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentsPatchCall { 11290 c.ctx_ = ctx 11291 return c 11292} 11293 11294// Header returns an http.Header that can be modified by the caller to 11295// add HTTP headers to the request. 11296func (c *ProjectsLocationsDatasetsConsentStoresConsentsPatchCall) Header() http.Header { 11297 if c.header_ == nil { 11298 c.header_ = make(http.Header) 11299 } 11300 return c.header_ 11301} 11302 11303func (c *ProjectsLocationsDatasetsConsentStoresConsentsPatchCall) doRequest(alt string) (*http.Response, error) { 11304 reqHeaders := make(http.Header) 11305 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 11306 for k, v := range c.header_ { 11307 reqHeaders[k] = v 11308 } 11309 reqHeaders.Set("User-Agent", c.s.userAgent()) 11310 var body io.Reader = nil 11311 body, err := googleapi.WithoutDataWrapper.JSONReader(c.consent) 11312 if err != nil { 11313 return nil, err 11314 } 11315 reqHeaders.Set("Content-Type", "application/json") 11316 c.urlParams_.Set("alt", alt) 11317 c.urlParams_.Set("prettyPrint", "false") 11318 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 11319 urls += "?" + c.urlParams_.Encode() 11320 req, err := http.NewRequest("PATCH", urls, body) 11321 if err != nil { 11322 return nil, err 11323 } 11324 req.Header = reqHeaders 11325 googleapi.Expand(req.URL, map[string]string{ 11326 "name": c.name, 11327 }) 11328 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11329} 11330 11331// Do executes the "healthcare.projects.locations.datasets.consentStores.consents.patch" call. 11332// Exactly one of *Consent or error will be non-nil. Any non-2xx status 11333// code is an error. Response headers are in either 11334// *Consent.ServerResponse.Header or (if a response was returned at all) 11335// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 11336// check whether the returned error was because http.StatusNotModified 11337// was returned. 11338func (c *ProjectsLocationsDatasetsConsentStoresConsentsPatchCall) Do(opts ...googleapi.CallOption) (*Consent, error) { 11339 gensupport.SetOptions(c.urlParams_, opts...) 11340 res, err := c.doRequest("json") 11341 if res != nil && res.StatusCode == http.StatusNotModified { 11342 if res.Body != nil { 11343 res.Body.Close() 11344 } 11345 return nil, &googleapi.Error{ 11346 Code: res.StatusCode, 11347 Header: res.Header, 11348 } 11349 } 11350 if err != nil { 11351 return nil, err 11352 } 11353 defer googleapi.CloseBody(res) 11354 if err := googleapi.CheckResponse(res); err != nil { 11355 return nil, err 11356 } 11357 ret := &Consent{ 11358 ServerResponse: googleapi.ServerResponse{ 11359 Header: res.Header, 11360 HTTPStatusCode: res.StatusCode, 11361 }, 11362 } 11363 target := &ret 11364 if err := gensupport.DecodeResponse(target, res); err != nil { 11365 return nil, err 11366 } 11367 return ret, nil 11368 // { 11369 // "description": "Updates the latest revision of the specified Consent by committing a new revision with the changes. A FAILED_PRECONDITION error occurs if the latest revision of the specified Consent is in the `REJECTED` or `REVOKED` state.", 11370 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/consentStores/{consentStoresId}/consents/{consentsId}", 11371 // "httpMethod": "PATCH", 11372 // "id": "healthcare.projects.locations.datasets.consentStores.consents.patch", 11373 // "parameterOrder": [ 11374 // "name" 11375 // ], 11376 // "parameters": { 11377 // "name": { 11378 // "description": "Resource name of the Consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}`. Cannot be changed after creation.", 11379 // "location": "path", 11380 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+/consents/[^/]+$", 11381 // "required": true, 11382 // "type": "string" 11383 // }, 11384 // "updateMask": { 11385 // "description": "Required. The update mask to apply to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. Only the `user_id`, `policies`, `consent_artifact`, and `metadata` fields can be updated.", 11386 // "format": "google-fieldmask", 11387 // "location": "query", 11388 // "type": "string" 11389 // } 11390 // }, 11391 // "path": "v1/{+name}", 11392 // "request": { 11393 // "$ref": "Consent" 11394 // }, 11395 // "response": { 11396 // "$ref": "Consent" 11397 // }, 11398 // "scopes": [ 11399 // "https://www.googleapis.com/auth/cloud-platform" 11400 // ] 11401 // } 11402 11403} 11404 11405// method id "healthcare.projects.locations.datasets.consentStores.consents.reject": 11406 11407type ProjectsLocationsDatasetsConsentStoresConsentsRejectCall struct { 11408 s *Service 11409 name string 11410 rejectconsentrequest *RejectConsentRequest 11411 urlParams_ gensupport.URLParams 11412 ctx_ context.Context 11413 header_ http.Header 11414} 11415 11416// Reject: Rejects the latest revision of the specified Consent by 11417// committing a new revision with `state` updated to `REJECTED`. If the 11418// latest revision of the specified Consent is in the `REJECTED` state, 11419// no new revision is committed. A FAILED_PRECONDITION error occurs if 11420// the latest revision of the specified Consent is in the `ACTIVE` or 11421// `REVOKED` state. 11422// 11423// - name: The resource name of the Consent to reject, of the form 11424// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 11425// /consentStores/{consent_store_id}/consents/{consent_id}`. An 11426// INVALID_ARGUMENT error occurs if `revision_id` is specified in the 11427// name. 11428func (r *ProjectsLocationsDatasetsConsentStoresConsentsService) Reject(name string, rejectconsentrequest *RejectConsentRequest) *ProjectsLocationsDatasetsConsentStoresConsentsRejectCall { 11429 c := &ProjectsLocationsDatasetsConsentStoresConsentsRejectCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11430 c.name = name 11431 c.rejectconsentrequest = rejectconsentrequest 11432 return c 11433} 11434 11435// Fields allows partial responses to be retrieved. See 11436// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11437// for more information. 11438func (c *ProjectsLocationsDatasetsConsentStoresConsentsRejectCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentsRejectCall { 11439 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11440 return c 11441} 11442 11443// Context sets the context to be used in this call's Do method. Any 11444// pending HTTP request will be aborted if the provided context is 11445// canceled. 11446func (c *ProjectsLocationsDatasetsConsentStoresConsentsRejectCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentsRejectCall { 11447 c.ctx_ = ctx 11448 return c 11449} 11450 11451// Header returns an http.Header that can be modified by the caller to 11452// add HTTP headers to the request. 11453func (c *ProjectsLocationsDatasetsConsentStoresConsentsRejectCall) Header() http.Header { 11454 if c.header_ == nil { 11455 c.header_ = make(http.Header) 11456 } 11457 return c.header_ 11458} 11459 11460func (c *ProjectsLocationsDatasetsConsentStoresConsentsRejectCall) doRequest(alt string) (*http.Response, error) { 11461 reqHeaders := make(http.Header) 11462 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 11463 for k, v := range c.header_ { 11464 reqHeaders[k] = v 11465 } 11466 reqHeaders.Set("User-Agent", c.s.userAgent()) 11467 var body io.Reader = nil 11468 body, err := googleapi.WithoutDataWrapper.JSONReader(c.rejectconsentrequest) 11469 if err != nil { 11470 return nil, err 11471 } 11472 reqHeaders.Set("Content-Type", "application/json") 11473 c.urlParams_.Set("alt", alt) 11474 c.urlParams_.Set("prettyPrint", "false") 11475 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:reject") 11476 urls += "?" + c.urlParams_.Encode() 11477 req, err := http.NewRequest("POST", urls, body) 11478 if err != nil { 11479 return nil, err 11480 } 11481 req.Header = reqHeaders 11482 googleapi.Expand(req.URL, map[string]string{ 11483 "name": c.name, 11484 }) 11485 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11486} 11487 11488// Do executes the "healthcare.projects.locations.datasets.consentStores.consents.reject" call. 11489// Exactly one of *Consent or error will be non-nil. Any non-2xx status 11490// code is an error. Response headers are in either 11491// *Consent.ServerResponse.Header or (if a response was returned at all) 11492// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 11493// check whether the returned error was because http.StatusNotModified 11494// was returned. 11495func (c *ProjectsLocationsDatasetsConsentStoresConsentsRejectCall) Do(opts ...googleapi.CallOption) (*Consent, error) { 11496 gensupport.SetOptions(c.urlParams_, opts...) 11497 res, err := c.doRequest("json") 11498 if res != nil && res.StatusCode == http.StatusNotModified { 11499 if res.Body != nil { 11500 res.Body.Close() 11501 } 11502 return nil, &googleapi.Error{ 11503 Code: res.StatusCode, 11504 Header: res.Header, 11505 } 11506 } 11507 if err != nil { 11508 return nil, err 11509 } 11510 defer googleapi.CloseBody(res) 11511 if err := googleapi.CheckResponse(res); err != nil { 11512 return nil, err 11513 } 11514 ret := &Consent{ 11515 ServerResponse: googleapi.ServerResponse{ 11516 Header: res.Header, 11517 HTTPStatusCode: res.StatusCode, 11518 }, 11519 } 11520 target := &ret 11521 if err := gensupport.DecodeResponse(target, res); err != nil { 11522 return nil, err 11523 } 11524 return ret, nil 11525 // { 11526 // "description": "Rejects the latest revision of the specified Consent by committing a new revision with `state` updated to `REJECTED`. If the latest revision of the specified Consent is in the `REJECTED` state, no new revision is committed. A FAILED_PRECONDITION error occurs if the latest revision of the specified Consent is in the `ACTIVE` or `REVOKED` state.", 11527 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/consentStores/{consentStoresId}/consents/{consentsId}:reject", 11528 // "httpMethod": "POST", 11529 // "id": "healthcare.projects.locations.datasets.consentStores.consents.reject", 11530 // "parameterOrder": [ 11531 // "name" 11532 // ], 11533 // "parameters": { 11534 // "name": { 11535 // "description": "Required. The resource name of the Consent to reject, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}`. An INVALID_ARGUMENT error occurs if `revision_id` is specified in the name.", 11536 // "location": "path", 11537 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+/consents/[^/]+$", 11538 // "required": true, 11539 // "type": "string" 11540 // } 11541 // }, 11542 // "path": "v1/{+name}:reject", 11543 // "request": { 11544 // "$ref": "RejectConsentRequest" 11545 // }, 11546 // "response": { 11547 // "$ref": "Consent" 11548 // }, 11549 // "scopes": [ 11550 // "https://www.googleapis.com/auth/cloud-platform" 11551 // ] 11552 // } 11553 11554} 11555 11556// method id "healthcare.projects.locations.datasets.consentStores.consents.revoke": 11557 11558type ProjectsLocationsDatasetsConsentStoresConsentsRevokeCall struct { 11559 s *Service 11560 name string 11561 revokeconsentrequest *RevokeConsentRequest 11562 urlParams_ gensupport.URLParams 11563 ctx_ context.Context 11564 header_ http.Header 11565} 11566 11567// Revoke: Revokes the latest revision of the specified Consent by 11568// committing a new revision with `state` updated to `REVOKED`. If the 11569// latest revision of the specified Consent is in the `REVOKED` state, 11570// no new revision is committed. A FAILED_PRECONDITION error occurs if 11571// the latest revision of the given consent is in `DRAFT` or `REJECTED` 11572// state. 11573// 11574// - name: The resource name of the Consent to revoke, of the form 11575// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 11576// /consentStores/{consent_store_id}/consents/{consent_id}`. An 11577// INVALID_ARGUMENT error occurs if `revision_id` is specified in the 11578// name. 11579func (r *ProjectsLocationsDatasetsConsentStoresConsentsService) Revoke(name string, revokeconsentrequest *RevokeConsentRequest) *ProjectsLocationsDatasetsConsentStoresConsentsRevokeCall { 11580 c := &ProjectsLocationsDatasetsConsentStoresConsentsRevokeCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11581 c.name = name 11582 c.revokeconsentrequest = revokeconsentrequest 11583 return c 11584} 11585 11586// Fields allows partial responses to be retrieved. See 11587// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11588// for more information. 11589func (c *ProjectsLocationsDatasetsConsentStoresConsentsRevokeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentsRevokeCall { 11590 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11591 return c 11592} 11593 11594// Context sets the context to be used in this call's Do method. Any 11595// pending HTTP request will be aborted if the provided context is 11596// canceled. 11597func (c *ProjectsLocationsDatasetsConsentStoresConsentsRevokeCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentsRevokeCall { 11598 c.ctx_ = ctx 11599 return c 11600} 11601 11602// Header returns an http.Header that can be modified by the caller to 11603// add HTTP headers to the request. 11604func (c *ProjectsLocationsDatasetsConsentStoresConsentsRevokeCall) Header() http.Header { 11605 if c.header_ == nil { 11606 c.header_ = make(http.Header) 11607 } 11608 return c.header_ 11609} 11610 11611func (c *ProjectsLocationsDatasetsConsentStoresConsentsRevokeCall) doRequest(alt string) (*http.Response, error) { 11612 reqHeaders := make(http.Header) 11613 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 11614 for k, v := range c.header_ { 11615 reqHeaders[k] = v 11616 } 11617 reqHeaders.Set("User-Agent", c.s.userAgent()) 11618 var body io.Reader = nil 11619 body, err := googleapi.WithoutDataWrapper.JSONReader(c.revokeconsentrequest) 11620 if err != nil { 11621 return nil, err 11622 } 11623 reqHeaders.Set("Content-Type", "application/json") 11624 c.urlParams_.Set("alt", alt) 11625 c.urlParams_.Set("prettyPrint", "false") 11626 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:revoke") 11627 urls += "?" + c.urlParams_.Encode() 11628 req, err := http.NewRequest("POST", urls, body) 11629 if err != nil { 11630 return nil, err 11631 } 11632 req.Header = reqHeaders 11633 googleapi.Expand(req.URL, map[string]string{ 11634 "name": c.name, 11635 }) 11636 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11637} 11638 11639// Do executes the "healthcare.projects.locations.datasets.consentStores.consents.revoke" call. 11640// Exactly one of *Consent or error will be non-nil. Any non-2xx status 11641// code is an error. Response headers are in either 11642// *Consent.ServerResponse.Header or (if a response was returned at all) 11643// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 11644// check whether the returned error was because http.StatusNotModified 11645// was returned. 11646func (c *ProjectsLocationsDatasetsConsentStoresConsentsRevokeCall) Do(opts ...googleapi.CallOption) (*Consent, error) { 11647 gensupport.SetOptions(c.urlParams_, opts...) 11648 res, err := c.doRequest("json") 11649 if res != nil && res.StatusCode == http.StatusNotModified { 11650 if res.Body != nil { 11651 res.Body.Close() 11652 } 11653 return nil, &googleapi.Error{ 11654 Code: res.StatusCode, 11655 Header: res.Header, 11656 } 11657 } 11658 if err != nil { 11659 return nil, err 11660 } 11661 defer googleapi.CloseBody(res) 11662 if err := googleapi.CheckResponse(res); err != nil { 11663 return nil, err 11664 } 11665 ret := &Consent{ 11666 ServerResponse: googleapi.ServerResponse{ 11667 Header: res.Header, 11668 HTTPStatusCode: res.StatusCode, 11669 }, 11670 } 11671 target := &ret 11672 if err := gensupport.DecodeResponse(target, res); err != nil { 11673 return nil, err 11674 } 11675 return ret, nil 11676 // { 11677 // "description": "Revokes the latest revision of the specified Consent by committing a new revision with `state` updated to `REVOKED`. If the latest revision of the specified Consent is in the `REVOKED` state, no new revision is committed. A FAILED_PRECONDITION error occurs if the latest revision of the given consent is in `DRAFT` or `REJECTED` state.", 11678 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/consentStores/{consentStoresId}/consents/{consentsId}:revoke", 11679 // "httpMethod": "POST", 11680 // "id": "healthcare.projects.locations.datasets.consentStores.consents.revoke", 11681 // "parameterOrder": [ 11682 // "name" 11683 // ], 11684 // "parameters": { 11685 // "name": { 11686 // "description": "Required. The resource name of the Consent to revoke, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}`. An INVALID_ARGUMENT error occurs if `revision_id` is specified in the name.", 11687 // "location": "path", 11688 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+/consents/[^/]+$", 11689 // "required": true, 11690 // "type": "string" 11691 // } 11692 // }, 11693 // "path": "v1/{+name}:revoke", 11694 // "request": { 11695 // "$ref": "RevokeConsentRequest" 11696 // }, 11697 // "response": { 11698 // "$ref": "Consent" 11699 // }, 11700 // "scopes": [ 11701 // "https://www.googleapis.com/auth/cloud-platform" 11702 // ] 11703 // } 11704 11705} 11706 11707// method id "healthcare.projects.locations.datasets.consentStores.userDataMappings.archive": 11708 11709type ProjectsLocationsDatasetsConsentStoresUserDataMappingsArchiveCall struct { 11710 s *Service 11711 name string 11712 archiveuserdatamappingrequest *ArchiveUserDataMappingRequest 11713 urlParams_ gensupport.URLParams 11714 ctx_ context.Context 11715 header_ http.Header 11716} 11717 11718// Archive: Archives the specified User data mapping. 11719// 11720// - name: The resource name of the User data mapping to archive. 11721func (r *ProjectsLocationsDatasetsConsentStoresUserDataMappingsService) Archive(name string, archiveuserdatamappingrequest *ArchiveUserDataMappingRequest) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsArchiveCall { 11722 c := &ProjectsLocationsDatasetsConsentStoresUserDataMappingsArchiveCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11723 c.name = name 11724 c.archiveuserdatamappingrequest = archiveuserdatamappingrequest 11725 return c 11726} 11727 11728// Fields allows partial responses to be retrieved. See 11729// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11730// for more information. 11731func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsArchiveCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsArchiveCall { 11732 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11733 return c 11734} 11735 11736// Context sets the context to be used in this call's Do method. Any 11737// pending HTTP request will be aborted if the provided context is 11738// canceled. 11739func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsArchiveCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsArchiveCall { 11740 c.ctx_ = ctx 11741 return c 11742} 11743 11744// Header returns an http.Header that can be modified by the caller to 11745// add HTTP headers to the request. 11746func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsArchiveCall) Header() http.Header { 11747 if c.header_ == nil { 11748 c.header_ = make(http.Header) 11749 } 11750 return c.header_ 11751} 11752 11753func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsArchiveCall) doRequest(alt string) (*http.Response, error) { 11754 reqHeaders := make(http.Header) 11755 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 11756 for k, v := range c.header_ { 11757 reqHeaders[k] = v 11758 } 11759 reqHeaders.Set("User-Agent", c.s.userAgent()) 11760 var body io.Reader = nil 11761 body, err := googleapi.WithoutDataWrapper.JSONReader(c.archiveuserdatamappingrequest) 11762 if err != nil { 11763 return nil, err 11764 } 11765 reqHeaders.Set("Content-Type", "application/json") 11766 c.urlParams_.Set("alt", alt) 11767 c.urlParams_.Set("prettyPrint", "false") 11768 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:archive") 11769 urls += "?" + c.urlParams_.Encode() 11770 req, err := http.NewRequest("POST", urls, body) 11771 if err != nil { 11772 return nil, err 11773 } 11774 req.Header = reqHeaders 11775 googleapi.Expand(req.URL, map[string]string{ 11776 "name": c.name, 11777 }) 11778 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11779} 11780 11781// Do executes the "healthcare.projects.locations.datasets.consentStores.userDataMappings.archive" call. 11782// Exactly one of *ArchiveUserDataMappingResponse or error will be 11783// non-nil. Any non-2xx status code is an error. Response headers are in 11784// either *ArchiveUserDataMappingResponse.ServerResponse.Header or (if a 11785// response was returned at all) in error.(*googleapi.Error).Header. Use 11786// googleapi.IsNotModified to check whether the returned error was 11787// because http.StatusNotModified was returned. 11788func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsArchiveCall) Do(opts ...googleapi.CallOption) (*ArchiveUserDataMappingResponse, error) { 11789 gensupport.SetOptions(c.urlParams_, opts...) 11790 res, err := c.doRequest("json") 11791 if res != nil && res.StatusCode == http.StatusNotModified { 11792 if res.Body != nil { 11793 res.Body.Close() 11794 } 11795 return nil, &googleapi.Error{ 11796 Code: res.StatusCode, 11797 Header: res.Header, 11798 } 11799 } 11800 if err != nil { 11801 return nil, err 11802 } 11803 defer googleapi.CloseBody(res) 11804 if err := googleapi.CheckResponse(res); err != nil { 11805 return nil, err 11806 } 11807 ret := &ArchiveUserDataMappingResponse{ 11808 ServerResponse: googleapi.ServerResponse{ 11809 Header: res.Header, 11810 HTTPStatusCode: res.StatusCode, 11811 }, 11812 } 11813 target := &ret 11814 if err := gensupport.DecodeResponse(target, res); err != nil { 11815 return nil, err 11816 } 11817 return ret, nil 11818 // { 11819 // "description": "Archives the specified User data mapping.", 11820 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/consentStores/{consentStoresId}/userDataMappings/{userDataMappingsId}:archive", 11821 // "httpMethod": "POST", 11822 // "id": "healthcare.projects.locations.datasets.consentStores.userDataMappings.archive", 11823 // "parameterOrder": [ 11824 // "name" 11825 // ], 11826 // "parameters": { 11827 // "name": { 11828 // "description": "Required. The resource name of the User data mapping to archive.", 11829 // "location": "path", 11830 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+/userDataMappings/[^/]+$", 11831 // "required": true, 11832 // "type": "string" 11833 // } 11834 // }, 11835 // "path": "v1/{+name}:archive", 11836 // "request": { 11837 // "$ref": "ArchiveUserDataMappingRequest" 11838 // }, 11839 // "response": { 11840 // "$ref": "ArchiveUserDataMappingResponse" 11841 // }, 11842 // "scopes": [ 11843 // "https://www.googleapis.com/auth/cloud-platform" 11844 // ] 11845 // } 11846 11847} 11848 11849// method id "healthcare.projects.locations.datasets.consentStores.userDataMappings.create": 11850 11851type ProjectsLocationsDatasetsConsentStoresUserDataMappingsCreateCall struct { 11852 s *Service 11853 parent string 11854 userdatamapping *UserDataMapping 11855 urlParams_ gensupport.URLParams 11856 ctx_ context.Context 11857 header_ http.Header 11858} 11859 11860// Create: Creates a new User data mapping in the parent consent store. 11861// 11862// - parent: Name of the consent store. 11863func (r *ProjectsLocationsDatasetsConsentStoresUserDataMappingsService) Create(parent string, userdatamapping *UserDataMapping) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsCreateCall { 11864 c := &ProjectsLocationsDatasetsConsentStoresUserDataMappingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11865 c.parent = parent 11866 c.userdatamapping = userdatamapping 11867 return c 11868} 11869 11870// Fields allows partial responses to be retrieved. See 11871// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11872// for more information. 11873func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsCreateCall { 11874 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11875 return c 11876} 11877 11878// Context sets the context to be used in this call's Do method. Any 11879// pending HTTP request will be aborted if the provided context is 11880// canceled. 11881func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsCreateCall { 11882 c.ctx_ = ctx 11883 return c 11884} 11885 11886// Header returns an http.Header that can be modified by the caller to 11887// add HTTP headers to the request. 11888func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsCreateCall) Header() http.Header { 11889 if c.header_ == nil { 11890 c.header_ = make(http.Header) 11891 } 11892 return c.header_ 11893} 11894 11895func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsCreateCall) doRequest(alt string) (*http.Response, error) { 11896 reqHeaders := make(http.Header) 11897 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 11898 for k, v := range c.header_ { 11899 reqHeaders[k] = v 11900 } 11901 reqHeaders.Set("User-Agent", c.s.userAgent()) 11902 var body io.Reader = nil 11903 body, err := googleapi.WithoutDataWrapper.JSONReader(c.userdatamapping) 11904 if err != nil { 11905 return nil, err 11906 } 11907 reqHeaders.Set("Content-Type", "application/json") 11908 c.urlParams_.Set("alt", alt) 11909 c.urlParams_.Set("prettyPrint", "false") 11910 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/userDataMappings") 11911 urls += "?" + c.urlParams_.Encode() 11912 req, err := http.NewRequest("POST", urls, body) 11913 if err != nil { 11914 return nil, err 11915 } 11916 req.Header = reqHeaders 11917 googleapi.Expand(req.URL, map[string]string{ 11918 "parent": c.parent, 11919 }) 11920 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11921} 11922 11923// Do executes the "healthcare.projects.locations.datasets.consentStores.userDataMappings.create" call. 11924// Exactly one of *UserDataMapping or error will be non-nil. Any non-2xx 11925// status code is an error. Response headers are in either 11926// *UserDataMapping.ServerResponse.Header or (if a response was returned 11927// at all) in error.(*googleapi.Error).Header. Use 11928// googleapi.IsNotModified to check whether the returned error was 11929// because http.StatusNotModified was returned. 11930func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsCreateCall) Do(opts ...googleapi.CallOption) (*UserDataMapping, error) { 11931 gensupport.SetOptions(c.urlParams_, opts...) 11932 res, err := c.doRequest("json") 11933 if res != nil && res.StatusCode == http.StatusNotModified { 11934 if res.Body != nil { 11935 res.Body.Close() 11936 } 11937 return nil, &googleapi.Error{ 11938 Code: res.StatusCode, 11939 Header: res.Header, 11940 } 11941 } 11942 if err != nil { 11943 return nil, err 11944 } 11945 defer googleapi.CloseBody(res) 11946 if err := googleapi.CheckResponse(res); err != nil { 11947 return nil, err 11948 } 11949 ret := &UserDataMapping{ 11950 ServerResponse: googleapi.ServerResponse{ 11951 Header: res.Header, 11952 HTTPStatusCode: res.StatusCode, 11953 }, 11954 } 11955 target := &ret 11956 if err := gensupport.DecodeResponse(target, res); err != nil { 11957 return nil, err 11958 } 11959 return ret, nil 11960 // { 11961 // "description": "Creates a new User data mapping in the parent consent store.", 11962 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/consentStores/{consentStoresId}/userDataMappings", 11963 // "httpMethod": "POST", 11964 // "id": "healthcare.projects.locations.datasets.consentStores.userDataMappings.create", 11965 // "parameterOrder": [ 11966 // "parent" 11967 // ], 11968 // "parameters": { 11969 // "parent": { 11970 // "description": "Required. Name of the consent store.", 11971 // "location": "path", 11972 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+$", 11973 // "required": true, 11974 // "type": "string" 11975 // } 11976 // }, 11977 // "path": "v1/{+parent}/userDataMappings", 11978 // "request": { 11979 // "$ref": "UserDataMapping" 11980 // }, 11981 // "response": { 11982 // "$ref": "UserDataMapping" 11983 // }, 11984 // "scopes": [ 11985 // "https://www.googleapis.com/auth/cloud-platform" 11986 // ] 11987 // } 11988 11989} 11990 11991// method id "healthcare.projects.locations.datasets.consentStores.userDataMappings.delete": 11992 11993type ProjectsLocationsDatasetsConsentStoresUserDataMappingsDeleteCall struct { 11994 s *Service 11995 name string 11996 urlParams_ gensupport.URLParams 11997 ctx_ context.Context 11998 header_ http.Header 11999} 12000 12001// Delete: Deletes the specified User data mapping. 12002// 12003// - name: The resource name of the User data mapping to delete. 12004func (r *ProjectsLocationsDatasetsConsentStoresUserDataMappingsService) Delete(name string) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsDeleteCall { 12005 c := &ProjectsLocationsDatasetsConsentStoresUserDataMappingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12006 c.name = name 12007 return c 12008} 12009 12010// Fields allows partial responses to be retrieved. See 12011// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12012// for more information. 12013func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsDeleteCall { 12014 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12015 return c 12016} 12017 12018// Context sets the context to be used in this call's Do method. Any 12019// pending HTTP request will be aborted if the provided context is 12020// canceled. 12021func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsDeleteCall { 12022 c.ctx_ = ctx 12023 return c 12024} 12025 12026// Header returns an http.Header that can be modified by the caller to 12027// add HTTP headers to the request. 12028func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsDeleteCall) Header() http.Header { 12029 if c.header_ == nil { 12030 c.header_ = make(http.Header) 12031 } 12032 return c.header_ 12033} 12034 12035func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsDeleteCall) doRequest(alt string) (*http.Response, error) { 12036 reqHeaders := make(http.Header) 12037 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 12038 for k, v := range c.header_ { 12039 reqHeaders[k] = v 12040 } 12041 reqHeaders.Set("User-Agent", c.s.userAgent()) 12042 var body io.Reader = nil 12043 c.urlParams_.Set("alt", alt) 12044 c.urlParams_.Set("prettyPrint", "false") 12045 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 12046 urls += "?" + c.urlParams_.Encode() 12047 req, err := http.NewRequest("DELETE", urls, body) 12048 if err != nil { 12049 return nil, err 12050 } 12051 req.Header = reqHeaders 12052 googleapi.Expand(req.URL, map[string]string{ 12053 "name": c.name, 12054 }) 12055 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12056} 12057 12058// Do executes the "healthcare.projects.locations.datasets.consentStores.userDataMappings.delete" call. 12059// Exactly one of *Empty or error will be non-nil. Any non-2xx status 12060// code is an error. Response headers are in either 12061// *Empty.ServerResponse.Header or (if a response was returned at all) 12062// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 12063// check whether the returned error was because http.StatusNotModified 12064// was returned. 12065func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 12066 gensupport.SetOptions(c.urlParams_, opts...) 12067 res, err := c.doRequest("json") 12068 if res != nil && res.StatusCode == http.StatusNotModified { 12069 if res.Body != nil { 12070 res.Body.Close() 12071 } 12072 return nil, &googleapi.Error{ 12073 Code: res.StatusCode, 12074 Header: res.Header, 12075 } 12076 } 12077 if err != nil { 12078 return nil, err 12079 } 12080 defer googleapi.CloseBody(res) 12081 if err := googleapi.CheckResponse(res); err != nil { 12082 return nil, err 12083 } 12084 ret := &Empty{ 12085 ServerResponse: googleapi.ServerResponse{ 12086 Header: res.Header, 12087 HTTPStatusCode: res.StatusCode, 12088 }, 12089 } 12090 target := &ret 12091 if err := gensupport.DecodeResponse(target, res); err != nil { 12092 return nil, err 12093 } 12094 return ret, nil 12095 // { 12096 // "description": "Deletes the specified User data mapping.", 12097 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/consentStores/{consentStoresId}/userDataMappings/{userDataMappingsId}", 12098 // "httpMethod": "DELETE", 12099 // "id": "healthcare.projects.locations.datasets.consentStores.userDataMappings.delete", 12100 // "parameterOrder": [ 12101 // "name" 12102 // ], 12103 // "parameters": { 12104 // "name": { 12105 // "description": "Required. The resource name of the User data mapping to delete.", 12106 // "location": "path", 12107 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+/userDataMappings/[^/]+$", 12108 // "required": true, 12109 // "type": "string" 12110 // } 12111 // }, 12112 // "path": "v1/{+name}", 12113 // "response": { 12114 // "$ref": "Empty" 12115 // }, 12116 // "scopes": [ 12117 // "https://www.googleapis.com/auth/cloud-platform" 12118 // ] 12119 // } 12120 12121} 12122 12123// method id "healthcare.projects.locations.datasets.consentStores.userDataMappings.get": 12124 12125type ProjectsLocationsDatasetsConsentStoresUserDataMappingsGetCall struct { 12126 s *Service 12127 name string 12128 urlParams_ gensupport.URLParams 12129 ifNoneMatch_ string 12130 ctx_ context.Context 12131 header_ http.Header 12132} 12133 12134// Get: Gets the specified User data mapping. 12135// 12136// - name: The resource name of the User data mapping to retrieve. 12137func (r *ProjectsLocationsDatasetsConsentStoresUserDataMappingsService) Get(name string) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsGetCall { 12138 c := &ProjectsLocationsDatasetsConsentStoresUserDataMappingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12139 c.name = name 12140 return c 12141} 12142 12143// Fields allows partial responses to be retrieved. See 12144// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12145// for more information. 12146func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsGetCall { 12147 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12148 return c 12149} 12150 12151// IfNoneMatch sets the optional parameter which makes the operation 12152// fail if the object's ETag matches the given value. This is useful for 12153// getting updates only after the object has changed since the last 12154// request. Use googleapi.IsNotModified to check whether the response 12155// error from Do is the result of In-None-Match. 12156func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsGetCall { 12157 c.ifNoneMatch_ = entityTag 12158 return c 12159} 12160 12161// Context sets the context to be used in this call's Do method. Any 12162// pending HTTP request will be aborted if the provided context is 12163// canceled. 12164func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsGetCall { 12165 c.ctx_ = ctx 12166 return c 12167} 12168 12169// Header returns an http.Header that can be modified by the caller to 12170// add HTTP headers to the request. 12171func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsGetCall) Header() http.Header { 12172 if c.header_ == nil { 12173 c.header_ = make(http.Header) 12174 } 12175 return c.header_ 12176} 12177 12178func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsGetCall) doRequest(alt string) (*http.Response, error) { 12179 reqHeaders := make(http.Header) 12180 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 12181 for k, v := range c.header_ { 12182 reqHeaders[k] = v 12183 } 12184 reqHeaders.Set("User-Agent", c.s.userAgent()) 12185 if c.ifNoneMatch_ != "" { 12186 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12187 } 12188 var body io.Reader = nil 12189 c.urlParams_.Set("alt", alt) 12190 c.urlParams_.Set("prettyPrint", "false") 12191 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 12192 urls += "?" + c.urlParams_.Encode() 12193 req, err := http.NewRequest("GET", urls, body) 12194 if err != nil { 12195 return nil, err 12196 } 12197 req.Header = reqHeaders 12198 googleapi.Expand(req.URL, map[string]string{ 12199 "name": c.name, 12200 }) 12201 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12202} 12203 12204// Do executes the "healthcare.projects.locations.datasets.consentStores.userDataMappings.get" call. 12205// Exactly one of *UserDataMapping or error will be non-nil. Any non-2xx 12206// status code is an error. Response headers are in either 12207// *UserDataMapping.ServerResponse.Header or (if a response was returned 12208// at all) in error.(*googleapi.Error).Header. Use 12209// googleapi.IsNotModified to check whether the returned error was 12210// because http.StatusNotModified was returned. 12211func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsGetCall) Do(opts ...googleapi.CallOption) (*UserDataMapping, error) { 12212 gensupport.SetOptions(c.urlParams_, opts...) 12213 res, err := c.doRequest("json") 12214 if res != nil && res.StatusCode == http.StatusNotModified { 12215 if res.Body != nil { 12216 res.Body.Close() 12217 } 12218 return nil, &googleapi.Error{ 12219 Code: res.StatusCode, 12220 Header: res.Header, 12221 } 12222 } 12223 if err != nil { 12224 return nil, err 12225 } 12226 defer googleapi.CloseBody(res) 12227 if err := googleapi.CheckResponse(res); err != nil { 12228 return nil, err 12229 } 12230 ret := &UserDataMapping{ 12231 ServerResponse: googleapi.ServerResponse{ 12232 Header: res.Header, 12233 HTTPStatusCode: res.StatusCode, 12234 }, 12235 } 12236 target := &ret 12237 if err := gensupport.DecodeResponse(target, res); err != nil { 12238 return nil, err 12239 } 12240 return ret, nil 12241 // { 12242 // "description": "Gets the specified User data mapping.", 12243 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/consentStores/{consentStoresId}/userDataMappings/{userDataMappingsId}", 12244 // "httpMethod": "GET", 12245 // "id": "healthcare.projects.locations.datasets.consentStores.userDataMappings.get", 12246 // "parameterOrder": [ 12247 // "name" 12248 // ], 12249 // "parameters": { 12250 // "name": { 12251 // "description": "Required. The resource name of the User data mapping to retrieve.", 12252 // "location": "path", 12253 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+/userDataMappings/[^/]+$", 12254 // "required": true, 12255 // "type": "string" 12256 // } 12257 // }, 12258 // "path": "v1/{+name}", 12259 // "response": { 12260 // "$ref": "UserDataMapping" 12261 // }, 12262 // "scopes": [ 12263 // "https://www.googleapis.com/auth/cloud-platform" 12264 // ] 12265 // } 12266 12267} 12268 12269// method id "healthcare.projects.locations.datasets.consentStores.userDataMappings.list": 12270 12271type ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall struct { 12272 s *Service 12273 parent string 12274 urlParams_ gensupport.URLParams 12275 ifNoneMatch_ string 12276 ctx_ context.Context 12277 header_ http.Header 12278} 12279 12280// List: Lists the User data mappings in the specified consent store. 12281// 12282// - parent: Name of the consent store to retrieve User data mappings 12283// from. 12284func (r *ProjectsLocationsDatasetsConsentStoresUserDataMappingsService) List(parent string) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall { 12285 c := &ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12286 c.parent = parent 12287 return c 12288} 12289 12290// Filter sets the optional parameter "filter": Restricts the User data 12291// mappings returned to those matching a filter. The following syntax is 12292// available: * A string field value can be written as text inside 12293// quotation marks, for example "query text". The only valid 12294// relational operation for text fields is equality (`=`), where text is 12295// searched within the field, rather than having the field be equal to 12296// the text. For example, "Comment = great" returns messages with 12297// `great` in the comment field. * A number field value can be written 12298// as an integer, a decimal, or an exponential. The valid relational 12299// operators for number fields are the equality operator (`=`), along 12300// with the less than/greater than operators (`<`, `<=`, `>`, `>=`). 12301// Note that there is no inequality (`!=`) operator. You can prepend the 12302// `NOT` operator to an expression to negate it. * A date field value 12303// must be written in `yyyy-mm-dd` form. Fields with date and time use 12304// the RFC3339 time format. Leading zeros are required for one-digit 12305// months and days. The valid relational operators for date fields are 12306// the equality operator (`=`) , along with the less than/greater than 12307// operators (`<`, `<=`, `>`, `>=`). Note that there is no inequality 12308// (`!=`) operator. You can prepend the `NOT` operator to an expression 12309// to negate it. * Multiple field query expressions can be combined in 12310// one query by adding `AND` or `OR` operators between the expressions. 12311// If a boolean operator appears within a quoted string, it is not 12312// treated as special, it's just another part of the character string to 12313// be matched. You can prepend the `NOT` operator to an expression to 12314// negate it. The fields available for filtering are: - data_id - 12315// user_id. For example, `filter=user_id=\"user123\". - archived - 12316// archive_time 12317func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall) Filter(filter string) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall { 12318 c.urlParams_.Set("filter", filter) 12319 return c 12320} 12321 12322// PageSize sets the optional parameter "pageSize": Limit on the number 12323// of User data mappings to return in a single response. If not 12324// specified, 100 is used. May not be larger than 1000. 12325func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall { 12326 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 12327 return c 12328} 12329 12330// PageToken sets the optional parameter "pageToken": Token to retrieve 12331// the next page of results, or empty to get the first page. 12332func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall { 12333 c.urlParams_.Set("pageToken", pageToken) 12334 return c 12335} 12336 12337// Fields allows partial responses to be retrieved. See 12338// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12339// for more information. 12340func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall { 12341 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12342 return c 12343} 12344 12345// IfNoneMatch sets the optional parameter which makes the operation 12346// fail if the object's ETag matches the given value. This is useful for 12347// getting updates only after the object has changed since the last 12348// request. Use googleapi.IsNotModified to check whether the response 12349// error from Do is the result of In-None-Match. 12350func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall { 12351 c.ifNoneMatch_ = entityTag 12352 return c 12353} 12354 12355// Context sets the context to be used in this call's Do method. Any 12356// pending HTTP request will be aborted if the provided context is 12357// canceled. 12358func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall { 12359 c.ctx_ = ctx 12360 return c 12361} 12362 12363// Header returns an http.Header that can be modified by the caller to 12364// add HTTP headers to the request. 12365func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall) Header() http.Header { 12366 if c.header_ == nil { 12367 c.header_ = make(http.Header) 12368 } 12369 return c.header_ 12370} 12371 12372func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall) doRequest(alt string) (*http.Response, error) { 12373 reqHeaders := make(http.Header) 12374 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 12375 for k, v := range c.header_ { 12376 reqHeaders[k] = v 12377 } 12378 reqHeaders.Set("User-Agent", c.s.userAgent()) 12379 if c.ifNoneMatch_ != "" { 12380 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12381 } 12382 var body io.Reader = nil 12383 c.urlParams_.Set("alt", alt) 12384 c.urlParams_.Set("prettyPrint", "false") 12385 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/userDataMappings") 12386 urls += "?" + c.urlParams_.Encode() 12387 req, err := http.NewRequest("GET", urls, body) 12388 if err != nil { 12389 return nil, err 12390 } 12391 req.Header = reqHeaders 12392 googleapi.Expand(req.URL, map[string]string{ 12393 "parent": c.parent, 12394 }) 12395 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12396} 12397 12398// Do executes the "healthcare.projects.locations.datasets.consentStores.userDataMappings.list" call. 12399// Exactly one of *ListUserDataMappingsResponse or error will be 12400// non-nil. Any non-2xx status code is an error. Response headers are in 12401// either *ListUserDataMappingsResponse.ServerResponse.Header or (if a 12402// response was returned at all) in error.(*googleapi.Error).Header. Use 12403// googleapi.IsNotModified to check whether the returned error was 12404// because http.StatusNotModified was returned. 12405func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall) Do(opts ...googleapi.CallOption) (*ListUserDataMappingsResponse, error) { 12406 gensupport.SetOptions(c.urlParams_, opts...) 12407 res, err := c.doRequest("json") 12408 if res != nil && res.StatusCode == http.StatusNotModified { 12409 if res.Body != nil { 12410 res.Body.Close() 12411 } 12412 return nil, &googleapi.Error{ 12413 Code: res.StatusCode, 12414 Header: res.Header, 12415 } 12416 } 12417 if err != nil { 12418 return nil, err 12419 } 12420 defer googleapi.CloseBody(res) 12421 if err := googleapi.CheckResponse(res); err != nil { 12422 return nil, err 12423 } 12424 ret := &ListUserDataMappingsResponse{ 12425 ServerResponse: googleapi.ServerResponse{ 12426 Header: res.Header, 12427 HTTPStatusCode: res.StatusCode, 12428 }, 12429 } 12430 target := &ret 12431 if err := gensupport.DecodeResponse(target, res); err != nil { 12432 return nil, err 12433 } 12434 return ret, nil 12435 // { 12436 // "description": "Lists the User data mappings in the specified consent store.", 12437 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/consentStores/{consentStoresId}/userDataMappings", 12438 // "httpMethod": "GET", 12439 // "id": "healthcare.projects.locations.datasets.consentStores.userDataMappings.list", 12440 // "parameterOrder": [ 12441 // "parent" 12442 // ], 12443 // "parameters": { 12444 // "filter": { 12445 // "description": "Optional. Restricts the User data mappings returned to those matching a filter. The following syntax is available: * A string field value can be written as text inside quotation marks, for example `\"query text\"`. The only valid relational operation for text fields is equality (`=`), where text is searched within the field, rather than having the field be equal to the text. For example, `\"Comment = great\"` returns messages with `great` in the comment field. * A number field value can be written as an integer, a decimal, or an exponential. The valid relational operators for number fields are the equality operator (`=`), along with the less than/greater than operators (`\u003c`, `\u003c=`, `\u003e`, `\u003e=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * A date field value must be written in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format. Leading zeros are required for one-digit months and days. The valid relational operators for date fields are the equality operator (`=`) , along with the less than/greater than operators (`\u003c`, `\u003c=`, `\u003e`, `\u003e=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * Multiple field query expressions can be combined in one query by adding `AND` or `OR` operators between the expressions. If a boolean operator appears within a quoted string, it is not treated as special, it's just another part of the character string to be matched. You can prepend the `NOT` operator to an expression to negate it. The fields available for filtering are: - data_id - user_id. For example, `filter=user_id=\\\"user123\\\"`. - archived - archive_time", 12446 // "location": "query", 12447 // "type": "string" 12448 // }, 12449 // "pageSize": { 12450 // "description": "Optional. Limit on the number of User data mappings to return in a single response. If not specified, 100 is used. May not be larger than 1000.", 12451 // "format": "int32", 12452 // "location": "query", 12453 // "type": "integer" 12454 // }, 12455 // "pageToken": { 12456 // "description": "Optional. Token to retrieve the next page of results, or empty to get the first page.", 12457 // "location": "query", 12458 // "type": "string" 12459 // }, 12460 // "parent": { 12461 // "description": "Required. Name of the consent store to retrieve User data mappings from.", 12462 // "location": "path", 12463 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+$", 12464 // "required": true, 12465 // "type": "string" 12466 // } 12467 // }, 12468 // "path": "v1/{+parent}/userDataMappings", 12469 // "response": { 12470 // "$ref": "ListUserDataMappingsResponse" 12471 // }, 12472 // "scopes": [ 12473 // "https://www.googleapis.com/auth/cloud-platform" 12474 // ] 12475 // } 12476 12477} 12478 12479// Pages invokes f for each page of results. 12480// A non-nil error returned from f will halt the iteration. 12481// The provided context supersedes any context provided to the Context method. 12482func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall) Pages(ctx context.Context, f func(*ListUserDataMappingsResponse) error) error { 12483 c.ctx_ = ctx 12484 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 12485 for { 12486 x, err := c.Do() 12487 if err != nil { 12488 return err 12489 } 12490 if err := f(x); err != nil { 12491 return err 12492 } 12493 if x.NextPageToken == "" { 12494 return nil 12495 } 12496 c.PageToken(x.NextPageToken) 12497 } 12498} 12499 12500// method id "healthcare.projects.locations.datasets.consentStores.userDataMappings.patch": 12501 12502type ProjectsLocationsDatasetsConsentStoresUserDataMappingsPatchCall struct { 12503 s *Service 12504 name string 12505 userdatamapping *UserDataMapping 12506 urlParams_ gensupport.URLParams 12507 ctx_ context.Context 12508 header_ http.Header 12509} 12510 12511// Patch: Updates the specified User data mapping. 12512// 12513// - name: Resource name of the User data mapping, of the form 12514// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 12515// /consentStores/{consent_store_id}/userDataMappings/{user_data_mappin 12516// g_id}`. 12517func (r *ProjectsLocationsDatasetsConsentStoresUserDataMappingsService) Patch(name string, userdatamapping *UserDataMapping) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsPatchCall { 12518 c := &ProjectsLocationsDatasetsConsentStoresUserDataMappingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12519 c.name = name 12520 c.userdatamapping = userdatamapping 12521 return c 12522} 12523 12524// UpdateMask sets the optional parameter "updateMask": Required. The 12525// update mask that applies to the resource. For the `FieldMask` 12526// definition, see 12527// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. 12528// Only the `data_id`, `user_id` and `resource_attributes` fields can be 12529// updated. 12530func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsPatchCall { 12531 c.urlParams_.Set("updateMask", updateMask) 12532 return c 12533} 12534 12535// Fields allows partial responses to be retrieved. See 12536// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12537// for more information. 12538func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsPatchCall { 12539 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12540 return c 12541} 12542 12543// Context sets the context to be used in this call's Do method. Any 12544// pending HTTP request will be aborted if the provided context is 12545// canceled. 12546func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsPatchCall { 12547 c.ctx_ = ctx 12548 return c 12549} 12550 12551// Header returns an http.Header that can be modified by the caller to 12552// add HTTP headers to the request. 12553func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsPatchCall) Header() http.Header { 12554 if c.header_ == nil { 12555 c.header_ = make(http.Header) 12556 } 12557 return c.header_ 12558} 12559 12560func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsPatchCall) doRequest(alt string) (*http.Response, error) { 12561 reqHeaders := make(http.Header) 12562 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 12563 for k, v := range c.header_ { 12564 reqHeaders[k] = v 12565 } 12566 reqHeaders.Set("User-Agent", c.s.userAgent()) 12567 var body io.Reader = nil 12568 body, err := googleapi.WithoutDataWrapper.JSONReader(c.userdatamapping) 12569 if err != nil { 12570 return nil, err 12571 } 12572 reqHeaders.Set("Content-Type", "application/json") 12573 c.urlParams_.Set("alt", alt) 12574 c.urlParams_.Set("prettyPrint", "false") 12575 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 12576 urls += "?" + c.urlParams_.Encode() 12577 req, err := http.NewRequest("PATCH", urls, body) 12578 if err != nil { 12579 return nil, err 12580 } 12581 req.Header = reqHeaders 12582 googleapi.Expand(req.URL, map[string]string{ 12583 "name": c.name, 12584 }) 12585 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12586} 12587 12588// Do executes the "healthcare.projects.locations.datasets.consentStores.userDataMappings.patch" call. 12589// Exactly one of *UserDataMapping or error will be non-nil. Any non-2xx 12590// status code is an error. Response headers are in either 12591// *UserDataMapping.ServerResponse.Header or (if a response was returned 12592// at all) in error.(*googleapi.Error).Header. Use 12593// googleapi.IsNotModified to check whether the returned error was 12594// because http.StatusNotModified was returned. 12595func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsPatchCall) Do(opts ...googleapi.CallOption) (*UserDataMapping, error) { 12596 gensupport.SetOptions(c.urlParams_, opts...) 12597 res, err := c.doRequest("json") 12598 if res != nil && res.StatusCode == http.StatusNotModified { 12599 if res.Body != nil { 12600 res.Body.Close() 12601 } 12602 return nil, &googleapi.Error{ 12603 Code: res.StatusCode, 12604 Header: res.Header, 12605 } 12606 } 12607 if err != nil { 12608 return nil, err 12609 } 12610 defer googleapi.CloseBody(res) 12611 if err := googleapi.CheckResponse(res); err != nil { 12612 return nil, err 12613 } 12614 ret := &UserDataMapping{ 12615 ServerResponse: googleapi.ServerResponse{ 12616 Header: res.Header, 12617 HTTPStatusCode: res.StatusCode, 12618 }, 12619 } 12620 target := &ret 12621 if err := gensupport.DecodeResponse(target, res); err != nil { 12622 return nil, err 12623 } 12624 return ret, nil 12625 // { 12626 // "description": "Updates the specified User data mapping.", 12627 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/consentStores/{consentStoresId}/userDataMappings/{userDataMappingsId}", 12628 // "httpMethod": "PATCH", 12629 // "id": "healthcare.projects.locations.datasets.consentStores.userDataMappings.patch", 12630 // "parameterOrder": [ 12631 // "name" 12632 // ], 12633 // "parameters": { 12634 // "name": { 12635 // "description": "Resource name of the User data mapping, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/userDataMappings/{user_data_mapping_id}`.", 12636 // "location": "path", 12637 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+/userDataMappings/[^/]+$", 12638 // "required": true, 12639 // "type": "string" 12640 // }, 12641 // "updateMask": { 12642 // "description": "Required. The update mask that applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. Only the `data_id`, `user_id` and `resource_attributes` fields can be updated.", 12643 // "format": "google-fieldmask", 12644 // "location": "query", 12645 // "type": "string" 12646 // } 12647 // }, 12648 // "path": "v1/{+name}", 12649 // "request": { 12650 // "$ref": "UserDataMapping" 12651 // }, 12652 // "response": { 12653 // "$ref": "UserDataMapping" 12654 // }, 12655 // "scopes": [ 12656 // "https://www.googleapis.com/auth/cloud-platform" 12657 // ] 12658 // } 12659 12660} 12661 12662// method id "healthcare.projects.locations.datasets.dicomStores.create": 12663 12664type ProjectsLocationsDatasetsDicomStoresCreateCall struct { 12665 s *Service 12666 parent string 12667 dicomstore *DicomStore 12668 urlParams_ gensupport.URLParams 12669 ctx_ context.Context 12670 header_ http.Header 12671} 12672 12673// Create: Creates a new DICOM store within the parent dataset. 12674// 12675// - parent: The name of the dataset this DICOM store belongs to. 12676func (r *ProjectsLocationsDatasetsDicomStoresService) Create(parent string, dicomstore *DicomStore) *ProjectsLocationsDatasetsDicomStoresCreateCall { 12677 c := &ProjectsLocationsDatasetsDicomStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12678 c.parent = parent 12679 c.dicomstore = dicomstore 12680 return c 12681} 12682 12683// DicomStoreId sets the optional parameter "dicomStoreId": The ID of 12684// the DICOM store that is being created. Any string value up to 256 12685// characters in length. 12686func (c *ProjectsLocationsDatasetsDicomStoresCreateCall) DicomStoreId(dicomStoreId string) *ProjectsLocationsDatasetsDicomStoresCreateCall { 12687 c.urlParams_.Set("dicomStoreId", dicomStoreId) 12688 return c 12689} 12690 12691// Fields allows partial responses to be retrieved. See 12692// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12693// for more information. 12694func (c *ProjectsLocationsDatasetsDicomStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresCreateCall { 12695 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12696 return c 12697} 12698 12699// Context sets the context to be used in this call's Do method. Any 12700// pending HTTP request will be aborted if the provided context is 12701// canceled. 12702func (c *ProjectsLocationsDatasetsDicomStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresCreateCall { 12703 c.ctx_ = ctx 12704 return c 12705} 12706 12707// Header returns an http.Header that can be modified by the caller to 12708// add HTTP headers to the request. 12709func (c *ProjectsLocationsDatasetsDicomStoresCreateCall) Header() http.Header { 12710 if c.header_ == nil { 12711 c.header_ = make(http.Header) 12712 } 12713 return c.header_ 12714} 12715 12716func (c *ProjectsLocationsDatasetsDicomStoresCreateCall) doRequest(alt string) (*http.Response, error) { 12717 reqHeaders := make(http.Header) 12718 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 12719 for k, v := range c.header_ { 12720 reqHeaders[k] = v 12721 } 12722 reqHeaders.Set("User-Agent", c.s.userAgent()) 12723 var body io.Reader = nil 12724 body, err := googleapi.WithoutDataWrapper.JSONReader(c.dicomstore) 12725 if err != nil { 12726 return nil, err 12727 } 12728 reqHeaders.Set("Content-Type", "application/json") 12729 c.urlParams_.Set("alt", alt) 12730 c.urlParams_.Set("prettyPrint", "false") 12731 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomStores") 12732 urls += "?" + c.urlParams_.Encode() 12733 req, err := http.NewRequest("POST", urls, body) 12734 if err != nil { 12735 return nil, err 12736 } 12737 req.Header = reqHeaders 12738 googleapi.Expand(req.URL, map[string]string{ 12739 "parent": c.parent, 12740 }) 12741 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12742} 12743 12744// Do executes the "healthcare.projects.locations.datasets.dicomStores.create" call. 12745// Exactly one of *DicomStore or error will be non-nil. Any non-2xx 12746// status code is an error. Response headers are in either 12747// *DicomStore.ServerResponse.Header or (if a response was returned at 12748// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 12749// to check whether the returned error was because 12750// http.StatusNotModified was returned. 12751func (c *ProjectsLocationsDatasetsDicomStoresCreateCall) Do(opts ...googleapi.CallOption) (*DicomStore, error) { 12752 gensupport.SetOptions(c.urlParams_, opts...) 12753 res, err := c.doRequest("json") 12754 if res != nil && res.StatusCode == http.StatusNotModified { 12755 if res.Body != nil { 12756 res.Body.Close() 12757 } 12758 return nil, &googleapi.Error{ 12759 Code: res.StatusCode, 12760 Header: res.Header, 12761 } 12762 } 12763 if err != nil { 12764 return nil, err 12765 } 12766 defer googleapi.CloseBody(res) 12767 if err := googleapi.CheckResponse(res); err != nil { 12768 return nil, err 12769 } 12770 ret := &DicomStore{ 12771 ServerResponse: googleapi.ServerResponse{ 12772 Header: res.Header, 12773 HTTPStatusCode: res.StatusCode, 12774 }, 12775 } 12776 target := &ret 12777 if err := gensupport.DecodeResponse(target, res); err != nil { 12778 return nil, err 12779 } 12780 return ret, nil 12781 // { 12782 // "description": "Creates a new DICOM store within the parent dataset.", 12783 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores", 12784 // "httpMethod": "POST", 12785 // "id": "healthcare.projects.locations.datasets.dicomStores.create", 12786 // "parameterOrder": [ 12787 // "parent" 12788 // ], 12789 // "parameters": { 12790 // "dicomStoreId": { 12791 // "description": "The ID of the DICOM store that is being created. Any string value up to 256 characters in length.", 12792 // "location": "query", 12793 // "type": "string" 12794 // }, 12795 // "parent": { 12796 // "description": "The name of the dataset this DICOM store belongs to.", 12797 // "location": "path", 12798 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", 12799 // "required": true, 12800 // "type": "string" 12801 // } 12802 // }, 12803 // "path": "v1/{+parent}/dicomStores", 12804 // "request": { 12805 // "$ref": "DicomStore" 12806 // }, 12807 // "response": { 12808 // "$ref": "DicomStore" 12809 // }, 12810 // "scopes": [ 12811 // "https://www.googleapis.com/auth/cloud-platform" 12812 // ] 12813 // } 12814 12815} 12816 12817// method id "healthcare.projects.locations.datasets.dicomStores.deidentify": 12818 12819type ProjectsLocationsDatasetsDicomStoresDeidentifyCall struct { 12820 s *Service 12821 sourceStore string 12822 deidentifydicomstorerequest *DeidentifyDicomStoreRequest 12823 urlParams_ gensupport.URLParams 12824 ctx_ context.Context 12825 header_ http.Header 12826} 12827 12828// Deidentify: De-identifies data from the source store and writes it to 12829// the destination store. The metadata field type is OperationMetadata. 12830// If the request is successful, the response field type is 12831// DeidentifyDicomStoreSummary. If errors occur, error is set. The LRO 12832// result may still be successful if de-identification fails for some 12833// DICOM instances. The output DICOM store will not contain these failed 12834// resources. Failed resource totals are tracked in Operation.metadata. 12835// Error details are also logged to Cloud Logging (see Viewing error 12836// logs in Cloud Logging (/healthcare/docs/how-tos/logging)). 12837// 12838// - sourceStore: Source DICOM store resource name. For example, 12839// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 12840// /dicomStores/{dicom_store_id}`. 12841func (r *ProjectsLocationsDatasetsDicomStoresService) Deidentify(sourceStore string, deidentifydicomstorerequest *DeidentifyDicomStoreRequest) *ProjectsLocationsDatasetsDicomStoresDeidentifyCall { 12842 c := &ProjectsLocationsDatasetsDicomStoresDeidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12843 c.sourceStore = sourceStore 12844 c.deidentifydicomstorerequest = deidentifydicomstorerequest 12845 return c 12846} 12847 12848// Fields allows partial responses to be retrieved. See 12849// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12850// for more information. 12851func (c *ProjectsLocationsDatasetsDicomStoresDeidentifyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDeidentifyCall { 12852 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12853 return c 12854} 12855 12856// Context sets the context to be used in this call's Do method. Any 12857// pending HTTP request will be aborted if the provided context is 12858// canceled. 12859func (c *ProjectsLocationsDatasetsDicomStoresDeidentifyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDeidentifyCall { 12860 c.ctx_ = ctx 12861 return c 12862} 12863 12864// Header returns an http.Header that can be modified by the caller to 12865// add HTTP headers to the request. 12866func (c *ProjectsLocationsDatasetsDicomStoresDeidentifyCall) Header() http.Header { 12867 if c.header_ == nil { 12868 c.header_ = make(http.Header) 12869 } 12870 return c.header_ 12871} 12872 12873func (c *ProjectsLocationsDatasetsDicomStoresDeidentifyCall) doRequest(alt string) (*http.Response, error) { 12874 reqHeaders := make(http.Header) 12875 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 12876 for k, v := range c.header_ { 12877 reqHeaders[k] = v 12878 } 12879 reqHeaders.Set("User-Agent", c.s.userAgent()) 12880 var body io.Reader = nil 12881 body, err := googleapi.WithoutDataWrapper.JSONReader(c.deidentifydicomstorerequest) 12882 if err != nil { 12883 return nil, err 12884 } 12885 reqHeaders.Set("Content-Type", "application/json") 12886 c.urlParams_.Set("alt", alt) 12887 c.urlParams_.Set("prettyPrint", "false") 12888 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+sourceStore}:deidentify") 12889 urls += "?" + c.urlParams_.Encode() 12890 req, err := http.NewRequest("POST", urls, body) 12891 if err != nil { 12892 return nil, err 12893 } 12894 req.Header = reqHeaders 12895 googleapi.Expand(req.URL, map[string]string{ 12896 "sourceStore": c.sourceStore, 12897 }) 12898 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12899} 12900 12901// Do executes the "healthcare.projects.locations.datasets.dicomStores.deidentify" call. 12902// Exactly one of *Operation or error will be non-nil. Any non-2xx 12903// status code is an error. Response headers are in either 12904// *Operation.ServerResponse.Header or (if a response was returned at 12905// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 12906// to check whether the returned error was because 12907// http.StatusNotModified was returned. 12908func (c *ProjectsLocationsDatasetsDicomStoresDeidentifyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 12909 gensupport.SetOptions(c.urlParams_, opts...) 12910 res, err := c.doRequest("json") 12911 if res != nil && res.StatusCode == http.StatusNotModified { 12912 if res.Body != nil { 12913 res.Body.Close() 12914 } 12915 return nil, &googleapi.Error{ 12916 Code: res.StatusCode, 12917 Header: res.Header, 12918 } 12919 } 12920 if err != nil { 12921 return nil, err 12922 } 12923 defer googleapi.CloseBody(res) 12924 if err := googleapi.CheckResponse(res); err != nil { 12925 return nil, err 12926 } 12927 ret := &Operation{ 12928 ServerResponse: googleapi.ServerResponse{ 12929 Header: res.Header, 12930 HTTPStatusCode: res.StatusCode, 12931 }, 12932 } 12933 target := &ret 12934 if err := gensupport.DecodeResponse(target, res); err != nil { 12935 return nil, err 12936 } 12937 return ret, nil 12938 // { 12939 // "description": "De-identifies data from the source store and writes it to the destination store. The metadata field type is OperationMetadata. If the request is successful, the response field type is DeidentifyDicomStoreSummary. If errors occur, error is set. The LRO result may still be successful if de-identification fails for some DICOM instances. The output DICOM store will not contain these failed resources. Failed resource totals are tracked in Operation.metadata. Error details are also logged to Cloud Logging (see [Viewing error logs in Cloud Logging](/healthcare/docs/how-tos/logging)).", 12940 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}:deidentify", 12941 // "httpMethod": "POST", 12942 // "id": "healthcare.projects.locations.datasets.dicomStores.deidentify", 12943 // "parameterOrder": [ 12944 // "sourceStore" 12945 // ], 12946 // "parameters": { 12947 // "sourceStore": { 12948 // "description": "Source DICOM store resource name. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`.", 12949 // "location": "path", 12950 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 12951 // "required": true, 12952 // "type": "string" 12953 // } 12954 // }, 12955 // "path": "v1/{+sourceStore}:deidentify", 12956 // "request": { 12957 // "$ref": "DeidentifyDicomStoreRequest" 12958 // }, 12959 // "response": { 12960 // "$ref": "Operation" 12961 // }, 12962 // "scopes": [ 12963 // "https://www.googleapis.com/auth/cloud-platform" 12964 // ] 12965 // } 12966 12967} 12968 12969// method id "healthcare.projects.locations.datasets.dicomStores.delete": 12970 12971type ProjectsLocationsDatasetsDicomStoresDeleteCall struct { 12972 s *Service 12973 name string 12974 urlParams_ gensupport.URLParams 12975 ctx_ context.Context 12976 header_ http.Header 12977} 12978 12979// Delete: Deletes the specified DICOM store and removes all images that 12980// are contained within it. 12981// 12982// - name: The resource name of the DICOM store to delete. 12983func (r *ProjectsLocationsDatasetsDicomStoresService) Delete(name string) *ProjectsLocationsDatasetsDicomStoresDeleteCall { 12984 c := &ProjectsLocationsDatasetsDicomStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12985 c.name = name 12986 return c 12987} 12988 12989// Fields allows partial responses to be retrieved. See 12990// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12991// for more information. 12992func (c *ProjectsLocationsDatasetsDicomStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDeleteCall { 12993 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12994 return c 12995} 12996 12997// Context sets the context to be used in this call's Do method. Any 12998// pending HTTP request will be aborted if the provided context is 12999// canceled. 13000func (c *ProjectsLocationsDatasetsDicomStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDeleteCall { 13001 c.ctx_ = ctx 13002 return c 13003} 13004 13005// Header returns an http.Header that can be modified by the caller to 13006// add HTTP headers to the request. 13007func (c *ProjectsLocationsDatasetsDicomStoresDeleteCall) Header() http.Header { 13008 if c.header_ == nil { 13009 c.header_ = make(http.Header) 13010 } 13011 return c.header_ 13012} 13013 13014func (c *ProjectsLocationsDatasetsDicomStoresDeleteCall) doRequest(alt string) (*http.Response, error) { 13015 reqHeaders := make(http.Header) 13016 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 13017 for k, v := range c.header_ { 13018 reqHeaders[k] = v 13019 } 13020 reqHeaders.Set("User-Agent", c.s.userAgent()) 13021 var body io.Reader = nil 13022 c.urlParams_.Set("alt", alt) 13023 c.urlParams_.Set("prettyPrint", "false") 13024 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 13025 urls += "?" + c.urlParams_.Encode() 13026 req, err := http.NewRequest("DELETE", urls, body) 13027 if err != nil { 13028 return nil, err 13029 } 13030 req.Header = reqHeaders 13031 googleapi.Expand(req.URL, map[string]string{ 13032 "name": c.name, 13033 }) 13034 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13035} 13036 13037// Do executes the "healthcare.projects.locations.datasets.dicomStores.delete" call. 13038// Exactly one of *Empty or error will be non-nil. Any non-2xx status 13039// code is an error. Response headers are in either 13040// *Empty.ServerResponse.Header or (if a response was returned at all) 13041// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 13042// check whether the returned error was because http.StatusNotModified 13043// was returned. 13044func (c *ProjectsLocationsDatasetsDicomStoresDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 13045 gensupport.SetOptions(c.urlParams_, opts...) 13046 res, err := c.doRequest("json") 13047 if res != nil && res.StatusCode == http.StatusNotModified { 13048 if res.Body != nil { 13049 res.Body.Close() 13050 } 13051 return nil, &googleapi.Error{ 13052 Code: res.StatusCode, 13053 Header: res.Header, 13054 } 13055 } 13056 if err != nil { 13057 return nil, err 13058 } 13059 defer googleapi.CloseBody(res) 13060 if err := googleapi.CheckResponse(res); err != nil { 13061 return nil, err 13062 } 13063 ret := &Empty{ 13064 ServerResponse: googleapi.ServerResponse{ 13065 Header: res.Header, 13066 HTTPStatusCode: res.StatusCode, 13067 }, 13068 } 13069 target := &ret 13070 if err := gensupport.DecodeResponse(target, res); err != nil { 13071 return nil, err 13072 } 13073 return ret, nil 13074 // { 13075 // "description": "Deletes the specified DICOM store and removes all images that are contained within it.", 13076 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}", 13077 // "httpMethod": "DELETE", 13078 // "id": "healthcare.projects.locations.datasets.dicomStores.delete", 13079 // "parameterOrder": [ 13080 // "name" 13081 // ], 13082 // "parameters": { 13083 // "name": { 13084 // "description": "The resource name of the DICOM store to delete.", 13085 // "location": "path", 13086 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 13087 // "required": true, 13088 // "type": "string" 13089 // } 13090 // }, 13091 // "path": "v1/{+name}", 13092 // "response": { 13093 // "$ref": "Empty" 13094 // }, 13095 // "scopes": [ 13096 // "https://www.googleapis.com/auth/cloud-platform" 13097 // ] 13098 // } 13099 13100} 13101 13102// method id "healthcare.projects.locations.datasets.dicomStores.export": 13103 13104type ProjectsLocationsDatasetsDicomStoresExportCall struct { 13105 s *Service 13106 name string 13107 exportdicomdatarequest *ExportDicomDataRequest 13108 urlParams_ gensupport.URLParams 13109 ctx_ context.Context 13110 header_ http.Header 13111} 13112 13113// Export: Exports data to the specified destination by copying it from 13114// the DICOM store. Errors are also logged to Cloud Logging. For more 13115// information, see Viewing error logs in Cloud Logging 13116// (https://cloud.google.com/healthcare/docs/how-tos/logging). The 13117// metadata field type is OperationMetadata. 13118// 13119// - name: The DICOM store resource name from which to export the data. 13120// For example, 13121// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 13122// /dicomStores/{dicom_store_id}`. 13123func (r *ProjectsLocationsDatasetsDicomStoresService) Export(name string, exportdicomdatarequest *ExportDicomDataRequest) *ProjectsLocationsDatasetsDicomStoresExportCall { 13124 c := &ProjectsLocationsDatasetsDicomStoresExportCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13125 c.name = name 13126 c.exportdicomdatarequest = exportdicomdatarequest 13127 return c 13128} 13129 13130// Fields allows partial responses to be retrieved. See 13131// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13132// for more information. 13133func (c *ProjectsLocationsDatasetsDicomStoresExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresExportCall { 13134 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13135 return c 13136} 13137 13138// Context sets the context to be used in this call's Do method. Any 13139// pending HTTP request will be aborted if the provided context is 13140// canceled. 13141func (c *ProjectsLocationsDatasetsDicomStoresExportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresExportCall { 13142 c.ctx_ = ctx 13143 return c 13144} 13145 13146// Header returns an http.Header that can be modified by the caller to 13147// add HTTP headers to the request. 13148func (c *ProjectsLocationsDatasetsDicomStoresExportCall) Header() http.Header { 13149 if c.header_ == nil { 13150 c.header_ = make(http.Header) 13151 } 13152 return c.header_ 13153} 13154 13155func (c *ProjectsLocationsDatasetsDicomStoresExportCall) doRequest(alt string) (*http.Response, error) { 13156 reqHeaders := make(http.Header) 13157 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 13158 for k, v := range c.header_ { 13159 reqHeaders[k] = v 13160 } 13161 reqHeaders.Set("User-Agent", c.s.userAgent()) 13162 var body io.Reader = nil 13163 body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportdicomdatarequest) 13164 if err != nil { 13165 return nil, err 13166 } 13167 reqHeaders.Set("Content-Type", "application/json") 13168 c.urlParams_.Set("alt", alt) 13169 c.urlParams_.Set("prettyPrint", "false") 13170 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:export") 13171 urls += "?" + c.urlParams_.Encode() 13172 req, err := http.NewRequest("POST", urls, body) 13173 if err != nil { 13174 return nil, err 13175 } 13176 req.Header = reqHeaders 13177 googleapi.Expand(req.URL, map[string]string{ 13178 "name": c.name, 13179 }) 13180 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13181} 13182 13183// Do executes the "healthcare.projects.locations.datasets.dicomStores.export" call. 13184// Exactly one of *Operation or error will be non-nil. Any non-2xx 13185// status code is an error. Response headers are in either 13186// *Operation.ServerResponse.Header or (if a response was returned at 13187// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 13188// to check whether the returned error was because 13189// http.StatusNotModified was returned. 13190func (c *ProjectsLocationsDatasetsDicomStoresExportCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 13191 gensupport.SetOptions(c.urlParams_, opts...) 13192 res, err := c.doRequest("json") 13193 if res != nil && res.StatusCode == http.StatusNotModified { 13194 if res.Body != nil { 13195 res.Body.Close() 13196 } 13197 return nil, &googleapi.Error{ 13198 Code: res.StatusCode, 13199 Header: res.Header, 13200 } 13201 } 13202 if err != nil { 13203 return nil, err 13204 } 13205 defer googleapi.CloseBody(res) 13206 if err := googleapi.CheckResponse(res); err != nil { 13207 return nil, err 13208 } 13209 ret := &Operation{ 13210 ServerResponse: googleapi.ServerResponse{ 13211 Header: res.Header, 13212 HTTPStatusCode: res.StatusCode, 13213 }, 13214 } 13215 target := &ret 13216 if err := gensupport.DecodeResponse(target, res); err != nil { 13217 return nil, err 13218 } 13219 return ret, nil 13220 // { 13221 // "description": "Exports data to the specified destination by copying it from the DICOM store. Errors are also logged to Cloud Logging. For more information, see [Viewing error logs in Cloud Logging](https://cloud.google.com/healthcare/docs/how-tos/logging). The metadata field type is OperationMetadata.", 13222 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}:export", 13223 // "httpMethod": "POST", 13224 // "id": "healthcare.projects.locations.datasets.dicomStores.export", 13225 // "parameterOrder": [ 13226 // "name" 13227 // ], 13228 // "parameters": { 13229 // "name": { 13230 // "description": "The DICOM store resource name from which to export the data. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`.", 13231 // "location": "path", 13232 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 13233 // "required": true, 13234 // "type": "string" 13235 // } 13236 // }, 13237 // "path": "v1/{+name}:export", 13238 // "request": { 13239 // "$ref": "ExportDicomDataRequest" 13240 // }, 13241 // "response": { 13242 // "$ref": "Operation" 13243 // }, 13244 // "scopes": [ 13245 // "https://www.googleapis.com/auth/cloud-platform" 13246 // ] 13247 // } 13248 13249} 13250 13251// method id "healthcare.projects.locations.datasets.dicomStores.get": 13252 13253type ProjectsLocationsDatasetsDicomStoresGetCall struct { 13254 s *Service 13255 name string 13256 urlParams_ gensupport.URLParams 13257 ifNoneMatch_ string 13258 ctx_ context.Context 13259 header_ http.Header 13260} 13261 13262// Get: Gets the specified DICOM store. 13263// 13264// - name: The resource name of the DICOM store to get. 13265func (r *ProjectsLocationsDatasetsDicomStoresService) Get(name string) *ProjectsLocationsDatasetsDicomStoresGetCall { 13266 c := &ProjectsLocationsDatasetsDicomStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13267 c.name = name 13268 return c 13269} 13270 13271// Fields allows partial responses to be retrieved. See 13272// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13273// for more information. 13274func (c *ProjectsLocationsDatasetsDicomStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresGetCall { 13275 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13276 return c 13277} 13278 13279// IfNoneMatch sets the optional parameter which makes the operation 13280// fail if the object's ETag matches the given value. This is useful for 13281// getting updates only after the object has changed since the last 13282// request. Use googleapi.IsNotModified to check whether the response 13283// error from Do is the result of In-None-Match. 13284func (c *ProjectsLocationsDatasetsDicomStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresGetCall { 13285 c.ifNoneMatch_ = entityTag 13286 return c 13287} 13288 13289// Context sets the context to be used in this call's Do method. Any 13290// pending HTTP request will be aborted if the provided context is 13291// canceled. 13292func (c *ProjectsLocationsDatasetsDicomStoresGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresGetCall { 13293 c.ctx_ = ctx 13294 return c 13295} 13296 13297// Header returns an http.Header that can be modified by the caller to 13298// add HTTP headers to the request. 13299func (c *ProjectsLocationsDatasetsDicomStoresGetCall) Header() http.Header { 13300 if c.header_ == nil { 13301 c.header_ = make(http.Header) 13302 } 13303 return c.header_ 13304} 13305 13306func (c *ProjectsLocationsDatasetsDicomStoresGetCall) doRequest(alt string) (*http.Response, error) { 13307 reqHeaders := make(http.Header) 13308 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 13309 for k, v := range c.header_ { 13310 reqHeaders[k] = v 13311 } 13312 reqHeaders.Set("User-Agent", c.s.userAgent()) 13313 if c.ifNoneMatch_ != "" { 13314 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13315 } 13316 var body io.Reader = nil 13317 c.urlParams_.Set("alt", alt) 13318 c.urlParams_.Set("prettyPrint", "false") 13319 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 13320 urls += "?" + c.urlParams_.Encode() 13321 req, err := http.NewRequest("GET", urls, body) 13322 if err != nil { 13323 return nil, err 13324 } 13325 req.Header = reqHeaders 13326 googleapi.Expand(req.URL, map[string]string{ 13327 "name": c.name, 13328 }) 13329 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13330} 13331 13332// Do executes the "healthcare.projects.locations.datasets.dicomStores.get" call. 13333// Exactly one of *DicomStore or error will be non-nil. Any non-2xx 13334// status code is an error. Response headers are in either 13335// *DicomStore.ServerResponse.Header or (if a response was returned at 13336// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 13337// to check whether the returned error was because 13338// http.StatusNotModified was returned. 13339func (c *ProjectsLocationsDatasetsDicomStoresGetCall) Do(opts ...googleapi.CallOption) (*DicomStore, error) { 13340 gensupport.SetOptions(c.urlParams_, opts...) 13341 res, err := c.doRequest("json") 13342 if res != nil && res.StatusCode == http.StatusNotModified { 13343 if res.Body != nil { 13344 res.Body.Close() 13345 } 13346 return nil, &googleapi.Error{ 13347 Code: res.StatusCode, 13348 Header: res.Header, 13349 } 13350 } 13351 if err != nil { 13352 return nil, err 13353 } 13354 defer googleapi.CloseBody(res) 13355 if err := googleapi.CheckResponse(res); err != nil { 13356 return nil, err 13357 } 13358 ret := &DicomStore{ 13359 ServerResponse: googleapi.ServerResponse{ 13360 Header: res.Header, 13361 HTTPStatusCode: res.StatusCode, 13362 }, 13363 } 13364 target := &ret 13365 if err := gensupport.DecodeResponse(target, res); err != nil { 13366 return nil, err 13367 } 13368 return ret, nil 13369 // { 13370 // "description": "Gets the specified DICOM store.", 13371 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}", 13372 // "httpMethod": "GET", 13373 // "id": "healthcare.projects.locations.datasets.dicomStores.get", 13374 // "parameterOrder": [ 13375 // "name" 13376 // ], 13377 // "parameters": { 13378 // "name": { 13379 // "description": "The resource name of the DICOM store to get.", 13380 // "location": "path", 13381 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 13382 // "required": true, 13383 // "type": "string" 13384 // } 13385 // }, 13386 // "path": "v1/{+name}", 13387 // "response": { 13388 // "$ref": "DicomStore" 13389 // }, 13390 // "scopes": [ 13391 // "https://www.googleapis.com/auth/cloud-platform" 13392 // ] 13393 // } 13394 13395} 13396 13397// method id "healthcare.projects.locations.datasets.dicomStores.getIamPolicy": 13398 13399type ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall struct { 13400 s *Service 13401 resource string 13402 urlParams_ gensupport.URLParams 13403 ifNoneMatch_ string 13404 ctx_ context.Context 13405 header_ http.Header 13406} 13407 13408// GetIamPolicy: Gets the access control policy for a resource. Returns 13409// an empty policy if the resource exists and does not have a policy 13410// set. 13411// 13412// - resource: REQUIRED: The resource for which the policy is being 13413// requested. See the operation documentation for the appropriate 13414// value for this field. 13415func (r *ProjectsLocationsDatasetsDicomStoresService) GetIamPolicy(resource string) *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall { 13416 c := &ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13417 c.resource = resource 13418 return c 13419} 13420 13421// OptionsRequestedPolicyVersion sets the optional parameter 13422// "options.requestedPolicyVersion": The policy format version to be 13423// returned. Valid values are 0, 1, and 3. Requests specifying an 13424// invalid value will be rejected. Requests for policies with any 13425// conditional bindings must specify version 3. Policies without any 13426// conditional bindings may specify any valid value or leave the field 13427// unset. To learn which resources support conditions in their IAM 13428// policies, see the IAM documentation 13429// (https://cloud.google.com/iam/help/conditions/resource-policies). 13430func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall { 13431 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) 13432 return c 13433} 13434 13435// Fields allows partial responses to be retrieved. See 13436// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13437// for more information. 13438func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall { 13439 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13440 return c 13441} 13442 13443// IfNoneMatch sets the optional parameter which makes the operation 13444// fail if the object's ETag matches the given value. This is useful for 13445// getting updates only after the object has changed since the last 13446// request. Use googleapi.IsNotModified to check whether the response 13447// error from Do is the result of In-None-Match. 13448func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall { 13449 c.ifNoneMatch_ = entityTag 13450 return c 13451} 13452 13453// Context sets the context to be used in this call's Do method. Any 13454// pending HTTP request will be aborted if the provided context is 13455// canceled. 13456func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall { 13457 c.ctx_ = ctx 13458 return c 13459} 13460 13461// Header returns an http.Header that can be modified by the caller to 13462// add HTTP headers to the request. 13463func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) Header() http.Header { 13464 if c.header_ == nil { 13465 c.header_ = make(http.Header) 13466 } 13467 return c.header_ 13468} 13469 13470func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 13471 reqHeaders := make(http.Header) 13472 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 13473 for k, v := range c.header_ { 13474 reqHeaders[k] = v 13475 } 13476 reqHeaders.Set("User-Agent", c.s.userAgent()) 13477 if c.ifNoneMatch_ != "" { 13478 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13479 } 13480 var body io.Reader = nil 13481 c.urlParams_.Set("alt", alt) 13482 c.urlParams_.Set("prettyPrint", "false") 13483 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") 13484 urls += "?" + c.urlParams_.Encode() 13485 req, err := http.NewRequest("GET", urls, body) 13486 if err != nil { 13487 return nil, err 13488 } 13489 req.Header = reqHeaders 13490 googleapi.Expand(req.URL, map[string]string{ 13491 "resource": c.resource, 13492 }) 13493 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13494} 13495 13496// Do executes the "healthcare.projects.locations.datasets.dicomStores.getIamPolicy" call. 13497// Exactly one of *Policy or error will be non-nil. Any non-2xx status 13498// code is an error. Response headers are in either 13499// *Policy.ServerResponse.Header or (if a response was returned at all) 13500// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 13501// check whether the returned error was because http.StatusNotModified 13502// was returned. 13503func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 13504 gensupport.SetOptions(c.urlParams_, opts...) 13505 res, err := c.doRequest("json") 13506 if res != nil && res.StatusCode == http.StatusNotModified { 13507 if res.Body != nil { 13508 res.Body.Close() 13509 } 13510 return nil, &googleapi.Error{ 13511 Code: res.StatusCode, 13512 Header: res.Header, 13513 } 13514 } 13515 if err != nil { 13516 return nil, err 13517 } 13518 defer googleapi.CloseBody(res) 13519 if err := googleapi.CheckResponse(res); err != nil { 13520 return nil, err 13521 } 13522 ret := &Policy{ 13523 ServerResponse: googleapi.ServerResponse{ 13524 Header: res.Header, 13525 HTTPStatusCode: res.StatusCode, 13526 }, 13527 } 13528 target := &ret 13529 if err := gensupport.DecodeResponse(target, res); err != nil { 13530 return nil, err 13531 } 13532 return ret, nil 13533 // { 13534 // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", 13535 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}:getIamPolicy", 13536 // "httpMethod": "GET", 13537 // "id": "healthcare.projects.locations.datasets.dicomStores.getIamPolicy", 13538 // "parameterOrder": [ 13539 // "resource" 13540 // ], 13541 // "parameters": { 13542 // "options.requestedPolicyVersion": { 13543 // "description": "Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", 13544 // "format": "int32", 13545 // "location": "query", 13546 // "type": "integer" 13547 // }, 13548 // "resource": { 13549 // "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", 13550 // "location": "path", 13551 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 13552 // "required": true, 13553 // "type": "string" 13554 // } 13555 // }, 13556 // "path": "v1/{+resource}:getIamPolicy", 13557 // "response": { 13558 // "$ref": "Policy" 13559 // }, 13560 // "scopes": [ 13561 // "https://www.googleapis.com/auth/cloud-platform" 13562 // ] 13563 // } 13564 13565} 13566 13567// method id "healthcare.projects.locations.datasets.dicomStores.import": 13568 13569type ProjectsLocationsDatasetsDicomStoresImportCall struct { 13570 s *Service 13571 name string 13572 importdicomdatarequest *ImportDicomDataRequest 13573 urlParams_ gensupport.URLParams 13574 ctx_ context.Context 13575 header_ http.Header 13576} 13577 13578// Import: Imports data into the DICOM store by copying it from the 13579// specified source. Errors are logged to Cloud Logging. For more 13580// information, see Viewing error logs in Cloud Logging 13581// (https://cloud.google.com/healthcare/docs/how-tos/logging). The 13582// metadata field type is OperationMetadata. 13583// 13584// - name: The name of the DICOM store resource into which the data is 13585// imported. For example, 13586// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 13587// /dicomStores/{dicom_store_id}`. 13588func (r *ProjectsLocationsDatasetsDicomStoresService) Import(name string, importdicomdatarequest *ImportDicomDataRequest) *ProjectsLocationsDatasetsDicomStoresImportCall { 13589 c := &ProjectsLocationsDatasetsDicomStoresImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13590 c.name = name 13591 c.importdicomdatarequest = importdicomdatarequest 13592 return c 13593} 13594 13595// Fields allows partial responses to be retrieved. See 13596// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13597// for more information. 13598func (c *ProjectsLocationsDatasetsDicomStoresImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresImportCall { 13599 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13600 return c 13601} 13602 13603// Context sets the context to be used in this call's Do method. Any 13604// pending HTTP request will be aborted if the provided context is 13605// canceled. 13606func (c *ProjectsLocationsDatasetsDicomStoresImportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresImportCall { 13607 c.ctx_ = ctx 13608 return c 13609} 13610 13611// Header returns an http.Header that can be modified by the caller to 13612// add HTTP headers to the request. 13613func (c *ProjectsLocationsDatasetsDicomStoresImportCall) Header() http.Header { 13614 if c.header_ == nil { 13615 c.header_ = make(http.Header) 13616 } 13617 return c.header_ 13618} 13619 13620func (c *ProjectsLocationsDatasetsDicomStoresImportCall) doRequest(alt string) (*http.Response, error) { 13621 reqHeaders := make(http.Header) 13622 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 13623 for k, v := range c.header_ { 13624 reqHeaders[k] = v 13625 } 13626 reqHeaders.Set("User-Agent", c.s.userAgent()) 13627 var body io.Reader = nil 13628 body, err := googleapi.WithoutDataWrapper.JSONReader(c.importdicomdatarequest) 13629 if err != nil { 13630 return nil, err 13631 } 13632 reqHeaders.Set("Content-Type", "application/json") 13633 c.urlParams_.Set("alt", alt) 13634 c.urlParams_.Set("prettyPrint", "false") 13635 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:import") 13636 urls += "?" + c.urlParams_.Encode() 13637 req, err := http.NewRequest("POST", urls, body) 13638 if err != nil { 13639 return nil, err 13640 } 13641 req.Header = reqHeaders 13642 googleapi.Expand(req.URL, map[string]string{ 13643 "name": c.name, 13644 }) 13645 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13646} 13647 13648// Do executes the "healthcare.projects.locations.datasets.dicomStores.import" call. 13649// Exactly one of *Operation or error will be non-nil. Any non-2xx 13650// status code is an error. Response headers are in either 13651// *Operation.ServerResponse.Header or (if a response was returned at 13652// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 13653// to check whether the returned error was because 13654// http.StatusNotModified was returned. 13655func (c *ProjectsLocationsDatasetsDicomStoresImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 13656 gensupport.SetOptions(c.urlParams_, opts...) 13657 res, err := c.doRequest("json") 13658 if res != nil && res.StatusCode == http.StatusNotModified { 13659 if res.Body != nil { 13660 res.Body.Close() 13661 } 13662 return nil, &googleapi.Error{ 13663 Code: res.StatusCode, 13664 Header: res.Header, 13665 } 13666 } 13667 if err != nil { 13668 return nil, err 13669 } 13670 defer googleapi.CloseBody(res) 13671 if err := googleapi.CheckResponse(res); err != nil { 13672 return nil, err 13673 } 13674 ret := &Operation{ 13675 ServerResponse: googleapi.ServerResponse{ 13676 Header: res.Header, 13677 HTTPStatusCode: res.StatusCode, 13678 }, 13679 } 13680 target := &ret 13681 if err := gensupport.DecodeResponse(target, res); err != nil { 13682 return nil, err 13683 } 13684 return ret, nil 13685 // { 13686 // "description": "Imports data into the DICOM store by copying it from the specified source. Errors are logged to Cloud Logging. For more information, see [Viewing error logs in Cloud Logging](https://cloud.google.com/healthcare/docs/how-tos/logging). The metadata field type is OperationMetadata.", 13687 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}:import", 13688 // "httpMethod": "POST", 13689 // "id": "healthcare.projects.locations.datasets.dicomStores.import", 13690 // "parameterOrder": [ 13691 // "name" 13692 // ], 13693 // "parameters": { 13694 // "name": { 13695 // "description": "The name of the DICOM store resource into which the data is imported. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`.", 13696 // "location": "path", 13697 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 13698 // "required": true, 13699 // "type": "string" 13700 // } 13701 // }, 13702 // "path": "v1/{+name}:import", 13703 // "request": { 13704 // "$ref": "ImportDicomDataRequest" 13705 // }, 13706 // "response": { 13707 // "$ref": "Operation" 13708 // }, 13709 // "scopes": [ 13710 // "https://www.googleapis.com/auth/cloud-platform" 13711 // ] 13712 // } 13713 13714} 13715 13716// method id "healthcare.projects.locations.datasets.dicomStores.list": 13717 13718type ProjectsLocationsDatasetsDicomStoresListCall struct { 13719 s *Service 13720 parent string 13721 urlParams_ gensupport.URLParams 13722 ifNoneMatch_ string 13723 ctx_ context.Context 13724 header_ http.Header 13725} 13726 13727// List: Lists the DICOM stores in the given dataset. 13728// 13729// - parent: Name of the dataset. 13730func (r *ProjectsLocationsDatasetsDicomStoresService) List(parent string) *ProjectsLocationsDatasetsDicomStoresListCall { 13731 c := &ProjectsLocationsDatasetsDicomStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13732 c.parent = parent 13733 return c 13734} 13735 13736// Filter sets the optional parameter "filter": Restricts stores 13737// returned to those matching a filter. The following syntax is 13738// available: * A string field value can be written as text inside 13739// quotation marks, for example "query text". The only valid 13740// relational operation for text fields is equality (`=`), where text is 13741// searched within the field, rather than having the field be equal to 13742// the text. For example, "Comment = great" returns messages with 13743// `great` in the comment field. * A number field value can be written 13744// as an integer, a decimal, or an exponential. The valid relational 13745// operators for number fields are the equality operator (`=`), along 13746// with the less than/greater than operators (`<`, `<=`, `>`, `>=`). 13747// Note that there is no inequality (`!=`) operator. You can prepend the 13748// `NOT` operator to an expression to negate it. * A date field value 13749// must be written in `yyyy-mm-dd` form. Fields with date and time use 13750// the RFC3339 time format. Leading zeros are required for one-digit 13751// months and days. The valid relational operators for date fields are 13752// the equality operator (`=`) , along with the less than/greater than 13753// operators (`<`, `<=`, `>`, `>=`). Note that there is no inequality 13754// (`!=`) operator. You can prepend the `NOT` operator to an expression 13755// to negate it. * Multiple field query expressions can be combined in 13756// one query by adding `AND` or `OR` operators between the expressions. 13757// If a boolean operator appears within a quoted string, it is not 13758// treated as special, it's just another part of the character string to 13759// be matched. You can prepend the `NOT` operator to an expression to 13760// negate it. Only filtering on labels is supported. For example, 13761// `labels.key=value`. 13762func (c *ProjectsLocationsDatasetsDicomStoresListCall) Filter(filter string) *ProjectsLocationsDatasetsDicomStoresListCall { 13763 c.urlParams_.Set("filter", filter) 13764 return c 13765} 13766 13767// PageSize sets the optional parameter "pageSize": Limit on the number 13768// of DICOM stores to return in a single response. If not specified, 100 13769// is used. May not be larger than 1000. 13770func (c *ProjectsLocationsDatasetsDicomStoresListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsDicomStoresListCall { 13771 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 13772 return c 13773} 13774 13775// PageToken sets the optional parameter "pageToken": The 13776// next_page_token value returned from the previous List request, if 13777// any. 13778func (c *ProjectsLocationsDatasetsDicomStoresListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsDicomStoresListCall { 13779 c.urlParams_.Set("pageToken", pageToken) 13780 return c 13781} 13782 13783// Fields allows partial responses to be retrieved. See 13784// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13785// for more information. 13786func (c *ProjectsLocationsDatasetsDicomStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresListCall { 13787 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13788 return c 13789} 13790 13791// IfNoneMatch sets the optional parameter which makes the operation 13792// fail if the object's ETag matches the given value. This is useful for 13793// getting updates only after the object has changed since the last 13794// request. Use googleapi.IsNotModified to check whether the response 13795// error from Do is the result of In-None-Match. 13796func (c *ProjectsLocationsDatasetsDicomStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresListCall { 13797 c.ifNoneMatch_ = entityTag 13798 return c 13799} 13800 13801// Context sets the context to be used in this call's Do method. Any 13802// pending HTTP request will be aborted if the provided context is 13803// canceled. 13804func (c *ProjectsLocationsDatasetsDicomStoresListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresListCall { 13805 c.ctx_ = ctx 13806 return c 13807} 13808 13809// Header returns an http.Header that can be modified by the caller to 13810// add HTTP headers to the request. 13811func (c *ProjectsLocationsDatasetsDicomStoresListCall) Header() http.Header { 13812 if c.header_ == nil { 13813 c.header_ = make(http.Header) 13814 } 13815 return c.header_ 13816} 13817 13818func (c *ProjectsLocationsDatasetsDicomStoresListCall) doRequest(alt string) (*http.Response, error) { 13819 reqHeaders := make(http.Header) 13820 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 13821 for k, v := range c.header_ { 13822 reqHeaders[k] = v 13823 } 13824 reqHeaders.Set("User-Agent", c.s.userAgent()) 13825 if c.ifNoneMatch_ != "" { 13826 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13827 } 13828 var body io.Reader = nil 13829 c.urlParams_.Set("alt", alt) 13830 c.urlParams_.Set("prettyPrint", "false") 13831 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomStores") 13832 urls += "?" + c.urlParams_.Encode() 13833 req, err := http.NewRequest("GET", urls, body) 13834 if err != nil { 13835 return nil, err 13836 } 13837 req.Header = reqHeaders 13838 googleapi.Expand(req.URL, map[string]string{ 13839 "parent": c.parent, 13840 }) 13841 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13842} 13843 13844// Do executes the "healthcare.projects.locations.datasets.dicomStores.list" call. 13845// Exactly one of *ListDicomStoresResponse or error will be non-nil. Any 13846// non-2xx status code is an error. Response headers are in either 13847// *ListDicomStoresResponse.ServerResponse.Header or (if a response was 13848// returned at all) in error.(*googleapi.Error).Header. Use 13849// googleapi.IsNotModified to check whether the returned error was 13850// because http.StatusNotModified was returned. 13851func (c *ProjectsLocationsDatasetsDicomStoresListCall) Do(opts ...googleapi.CallOption) (*ListDicomStoresResponse, error) { 13852 gensupport.SetOptions(c.urlParams_, opts...) 13853 res, err := c.doRequest("json") 13854 if res != nil && res.StatusCode == http.StatusNotModified { 13855 if res.Body != nil { 13856 res.Body.Close() 13857 } 13858 return nil, &googleapi.Error{ 13859 Code: res.StatusCode, 13860 Header: res.Header, 13861 } 13862 } 13863 if err != nil { 13864 return nil, err 13865 } 13866 defer googleapi.CloseBody(res) 13867 if err := googleapi.CheckResponse(res); err != nil { 13868 return nil, err 13869 } 13870 ret := &ListDicomStoresResponse{ 13871 ServerResponse: googleapi.ServerResponse{ 13872 Header: res.Header, 13873 HTTPStatusCode: res.StatusCode, 13874 }, 13875 } 13876 target := &ret 13877 if err := gensupport.DecodeResponse(target, res); err != nil { 13878 return nil, err 13879 } 13880 return ret, nil 13881 // { 13882 // "description": "Lists the DICOM stores in the given dataset.", 13883 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores", 13884 // "httpMethod": "GET", 13885 // "id": "healthcare.projects.locations.datasets.dicomStores.list", 13886 // "parameterOrder": [ 13887 // "parent" 13888 // ], 13889 // "parameters": { 13890 // "filter": { 13891 // "description": "Restricts stores returned to those matching a filter. The following syntax is available: * A string field value can be written as text inside quotation marks, for example `\"query text\"`. The only valid relational operation for text fields is equality (`=`), where text is searched within the field, rather than having the field be equal to the text. For example, `\"Comment = great\"` returns messages with `great` in the comment field. * A number field value can be written as an integer, a decimal, or an exponential. The valid relational operators for number fields are the equality operator (`=`), along with the less than/greater than operators (`\u003c`, `\u003c=`, `\u003e`, `\u003e=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * A date field value must be written in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format. Leading zeros are required for one-digit months and days. The valid relational operators for date fields are the equality operator (`=`) , along with the less than/greater than operators (`\u003c`, `\u003c=`, `\u003e`, `\u003e=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * Multiple field query expressions can be combined in one query by adding `AND` or `OR` operators between the expressions. If a boolean operator appears within a quoted string, it is not treated as special, it's just another part of the character string to be matched. You can prepend the `NOT` operator to an expression to negate it. Only filtering on labels is supported. For example, `labels.key=value`.", 13892 // "location": "query", 13893 // "type": "string" 13894 // }, 13895 // "pageSize": { 13896 // "description": "Limit on the number of DICOM stores to return in a single response. If not specified, 100 is used. May not be larger than 1000.", 13897 // "format": "int32", 13898 // "location": "query", 13899 // "type": "integer" 13900 // }, 13901 // "pageToken": { 13902 // "description": "The next_page_token value returned from the previous List request, if any.", 13903 // "location": "query", 13904 // "type": "string" 13905 // }, 13906 // "parent": { 13907 // "description": "Name of the dataset.", 13908 // "location": "path", 13909 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", 13910 // "required": true, 13911 // "type": "string" 13912 // } 13913 // }, 13914 // "path": "v1/{+parent}/dicomStores", 13915 // "response": { 13916 // "$ref": "ListDicomStoresResponse" 13917 // }, 13918 // "scopes": [ 13919 // "https://www.googleapis.com/auth/cloud-platform" 13920 // ] 13921 // } 13922 13923} 13924 13925// Pages invokes f for each page of results. 13926// A non-nil error returned from f will halt the iteration. 13927// The provided context supersedes any context provided to the Context method. 13928func (c *ProjectsLocationsDatasetsDicomStoresListCall) Pages(ctx context.Context, f func(*ListDicomStoresResponse) error) error { 13929 c.ctx_ = ctx 13930 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 13931 for { 13932 x, err := c.Do() 13933 if err != nil { 13934 return err 13935 } 13936 if err := f(x); err != nil { 13937 return err 13938 } 13939 if x.NextPageToken == "" { 13940 return nil 13941 } 13942 c.PageToken(x.NextPageToken) 13943 } 13944} 13945 13946// method id "healthcare.projects.locations.datasets.dicomStores.patch": 13947 13948type ProjectsLocationsDatasetsDicomStoresPatchCall struct { 13949 s *Service 13950 name string 13951 dicomstore *DicomStore 13952 urlParams_ gensupport.URLParams 13953 ctx_ context.Context 13954 header_ http.Header 13955} 13956 13957// Patch: Updates the specified DICOM store. 13958// 13959// - name: Resource name of the DICOM store, of the form 13960// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 13961// /dicomStores/{dicom_store_id}`. 13962func (r *ProjectsLocationsDatasetsDicomStoresService) Patch(name string, dicomstore *DicomStore) *ProjectsLocationsDatasetsDicomStoresPatchCall { 13963 c := &ProjectsLocationsDatasetsDicomStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13964 c.name = name 13965 c.dicomstore = dicomstore 13966 return c 13967} 13968 13969// UpdateMask sets the optional parameter "updateMask": The update mask 13970// applies to the resource. For the `FieldMask` definition, see 13971// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask 13972func (c *ProjectsLocationsDatasetsDicomStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsDicomStoresPatchCall { 13973 c.urlParams_.Set("updateMask", updateMask) 13974 return c 13975} 13976 13977// Fields allows partial responses to be retrieved. See 13978// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13979// for more information. 13980func (c *ProjectsLocationsDatasetsDicomStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresPatchCall { 13981 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13982 return c 13983} 13984 13985// Context sets the context to be used in this call's Do method. Any 13986// pending HTTP request will be aborted if the provided context is 13987// canceled. 13988func (c *ProjectsLocationsDatasetsDicomStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresPatchCall { 13989 c.ctx_ = ctx 13990 return c 13991} 13992 13993// Header returns an http.Header that can be modified by the caller to 13994// add HTTP headers to the request. 13995func (c *ProjectsLocationsDatasetsDicomStoresPatchCall) Header() http.Header { 13996 if c.header_ == nil { 13997 c.header_ = make(http.Header) 13998 } 13999 return c.header_ 14000} 14001 14002func (c *ProjectsLocationsDatasetsDicomStoresPatchCall) doRequest(alt string) (*http.Response, error) { 14003 reqHeaders := make(http.Header) 14004 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 14005 for k, v := range c.header_ { 14006 reqHeaders[k] = v 14007 } 14008 reqHeaders.Set("User-Agent", c.s.userAgent()) 14009 var body io.Reader = nil 14010 body, err := googleapi.WithoutDataWrapper.JSONReader(c.dicomstore) 14011 if err != nil { 14012 return nil, err 14013 } 14014 reqHeaders.Set("Content-Type", "application/json") 14015 c.urlParams_.Set("alt", alt) 14016 c.urlParams_.Set("prettyPrint", "false") 14017 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 14018 urls += "?" + c.urlParams_.Encode() 14019 req, err := http.NewRequest("PATCH", urls, body) 14020 if err != nil { 14021 return nil, err 14022 } 14023 req.Header = reqHeaders 14024 googleapi.Expand(req.URL, map[string]string{ 14025 "name": c.name, 14026 }) 14027 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14028} 14029 14030// Do executes the "healthcare.projects.locations.datasets.dicomStores.patch" call. 14031// Exactly one of *DicomStore or error will be non-nil. Any non-2xx 14032// status code is an error. Response headers are in either 14033// *DicomStore.ServerResponse.Header or (if a response was returned at 14034// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 14035// to check whether the returned error was because 14036// http.StatusNotModified was returned. 14037func (c *ProjectsLocationsDatasetsDicomStoresPatchCall) Do(opts ...googleapi.CallOption) (*DicomStore, error) { 14038 gensupport.SetOptions(c.urlParams_, opts...) 14039 res, err := c.doRequest("json") 14040 if res != nil && res.StatusCode == http.StatusNotModified { 14041 if res.Body != nil { 14042 res.Body.Close() 14043 } 14044 return nil, &googleapi.Error{ 14045 Code: res.StatusCode, 14046 Header: res.Header, 14047 } 14048 } 14049 if err != nil { 14050 return nil, err 14051 } 14052 defer googleapi.CloseBody(res) 14053 if err := googleapi.CheckResponse(res); err != nil { 14054 return nil, err 14055 } 14056 ret := &DicomStore{ 14057 ServerResponse: googleapi.ServerResponse{ 14058 Header: res.Header, 14059 HTTPStatusCode: res.StatusCode, 14060 }, 14061 } 14062 target := &ret 14063 if err := gensupport.DecodeResponse(target, res); err != nil { 14064 return nil, err 14065 } 14066 return ret, nil 14067 // { 14068 // "description": "Updates the specified DICOM store.", 14069 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}", 14070 // "httpMethod": "PATCH", 14071 // "id": "healthcare.projects.locations.datasets.dicomStores.patch", 14072 // "parameterOrder": [ 14073 // "name" 14074 // ], 14075 // "parameters": { 14076 // "name": { 14077 // "description": "Resource name of the DICOM store, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`.", 14078 // "location": "path", 14079 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 14080 // "required": true, 14081 // "type": "string" 14082 // }, 14083 // "updateMask": { 14084 // "description": "The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", 14085 // "format": "google-fieldmask", 14086 // "location": "query", 14087 // "type": "string" 14088 // } 14089 // }, 14090 // "path": "v1/{+name}", 14091 // "request": { 14092 // "$ref": "DicomStore" 14093 // }, 14094 // "response": { 14095 // "$ref": "DicomStore" 14096 // }, 14097 // "scopes": [ 14098 // "https://www.googleapis.com/auth/cloud-platform" 14099 // ] 14100 // } 14101 14102} 14103 14104// method id "healthcare.projects.locations.datasets.dicomStores.searchForInstances": 14105 14106type ProjectsLocationsDatasetsDicomStoresSearchForInstancesCall struct { 14107 s *Service 14108 parent string 14109 dicomWebPath string 14110 urlParams_ gensupport.URLParams 14111 ifNoneMatch_ string 14112 ctx_ context.Context 14113 header_ http.Header 14114} 14115 14116// SearchForInstances: SearchForInstances returns a list of matching 14117// instances. See [Search Transaction] 14118// (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.6). 14119// For details on the implementation of SearchForInstances, see Search 14120// transaction 14121// (https://cloud.google.com/healthcare/docs/dicom#search_transaction) 14122// in the Cloud Healthcare API conformance statement. For samples that 14123// show how to call SearchForInstances, see Searching for studies, 14124// series, instances, and frames 14125// (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#searching_for_studies_series_instances_and_frames). 14126// 14127// - dicomWebPath: The path of the SearchForInstancesRequest DICOMweb 14128// request. For example, `instances`, `series/{series_uid}/instances`, 14129// or `studies/{study_uid}/instances`. 14130// - parent: The name of the DICOM store that is being accessed. For 14131// example, 14132// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 14133// /dicomStores/{dicom_store_id}`. 14134func (r *ProjectsLocationsDatasetsDicomStoresService) SearchForInstances(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresSearchForInstancesCall { 14135 c := &ProjectsLocationsDatasetsDicomStoresSearchForInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14136 c.parent = parent 14137 c.dicomWebPath = dicomWebPath 14138 return c 14139} 14140 14141// Fields allows partial responses to be retrieved. See 14142// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14143// for more information. 14144func (c *ProjectsLocationsDatasetsDicomStoresSearchForInstancesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresSearchForInstancesCall { 14145 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14146 return c 14147} 14148 14149// IfNoneMatch sets the optional parameter which makes the operation 14150// fail if the object's ETag matches the given value. This is useful for 14151// getting updates only after the object has changed since the last 14152// request. Use googleapi.IsNotModified to check whether the response 14153// error from Do is the result of In-None-Match. 14154func (c *ProjectsLocationsDatasetsDicomStoresSearchForInstancesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresSearchForInstancesCall { 14155 c.ifNoneMatch_ = entityTag 14156 return c 14157} 14158 14159// Context sets the context to be used in this call's Do method. Any 14160// pending HTTP request will be aborted if the provided context is 14161// canceled. 14162func (c *ProjectsLocationsDatasetsDicomStoresSearchForInstancesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresSearchForInstancesCall { 14163 c.ctx_ = ctx 14164 return c 14165} 14166 14167// Header returns an http.Header that can be modified by the caller to 14168// add HTTP headers to the request. 14169func (c *ProjectsLocationsDatasetsDicomStoresSearchForInstancesCall) Header() http.Header { 14170 if c.header_ == nil { 14171 c.header_ = make(http.Header) 14172 } 14173 return c.header_ 14174} 14175 14176func (c *ProjectsLocationsDatasetsDicomStoresSearchForInstancesCall) doRequest(alt string) (*http.Response, error) { 14177 reqHeaders := make(http.Header) 14178 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 14179 for k, v := range c.header_ { 14180 reqHeaders[k] = v 14181 } 14182 reqHeaders.Set("User-Agent", c.s.userAgent()) 14183 if c.ifNoneMatch_ != "" { 14184 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14185 } 14186 var body io.Reader = nil 14187 c.urlParams_.Set("alt", alt) 14188 c.urlParams_.Set("prettyPrint", "false") 14189 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}") 14190 urls += "?" + c.urlParams_.Encode() 14191 req, err := http.NewRequest("GET", urls, body) 14192 if err != nil { 14193 return nil, err 14194 } 14195 req.Header = reqHeaders 14196 googleapi.Expand(req.URL, map[string]string{ 14197 "parent": c.parent, 14198 "dicomWebPath": c.dicomWebPath, 14199 }) 14200 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14201} 14202 14203// Do executes the "healthcare.projects.locations.datasets.dicomStores.searchForInstances" call. 14204func (c *ProjectsLocationsDatasetsDicomStoresSearchForInstancesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 14205 gensupport.SetOptions(c.urlParams_, opts...) 14206 return c.doRequest("") 14207 // { 14208 // "description": "SearchForInstances returns a list of matching instances. See [Search Transaction] (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.6). For details on the implementation of SearchForInstances, see [Search transaction](https://cloud.google.com/healthcare/docs/dicom#search_transaction) in the Cloud Healthcare API conformance statement. For samples that show how to call SearchForInstances, see [Searching for studies, series, instances, and frames](https://cloud.google.com/healthcare/docs/how-tos/dicomweb#searching_for_studies_series_instances_and_frames).", 14209 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/instances", 14210 // "httpMethod": "GET", 14211 // "id": "healthcare.projects.locations.datasets.dicomStores.searchForInstances", 14212 // "parameterOrder": [ 14213 // "parent", 14214 // "dicomWebPath" 14215 // ], 14216 // "parameters": { 14217 // "dicomWebPath": { 14218 // "description": "The path of the SearchForInstancesRequest DICOMweb request. For example, `instances`, `series/{series_uid}/instances`, or `studies/{study_uid}/instances`.", 14219 // "location": "path", 14220 // "pattern": "^instances$", 14221 // "required": true, 14222 // "type": "string" 14223 // }, 14224 // "parent": { 14225 // "description": "The name of the DICOM store that is being accessed. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`.", 14226 // "location": "path", 14227 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 14228 // "required": true, 14229 // "type": "string" 14230 // } 14231 // }, 14232 // "path": "v1/{+parent}/dicomWeb/{+dicomWebPath}", 14233 // "response": { 14234 // "$ref": "HttpBody" 14235 // }, 14236 // "scopes": [ 14237 // "https://www.googleapis.com/auth/cloud-platform" 14238 // ] 14239 // } 14240 14241} 14242 14243// method id "healthcare.projects.locations.datasets.dicomStores.searchForSeries": 14244 14245type ProjectsLocationsDatasetsDicomStoresSearchForSeriesCall struct { 14246 s *Service 14247 parent string 14248 dicomWebPath string 14249 urlParams_ gensupport.URLParams 14250 ifNoneMatch_ string 14251 ctx_ context.Context 14252 header_ http.Header 14253} 14254 14255// SearchForSeries: SearchForSeries returns a list of matching series. 14256// See [Search Transaction] 14257// (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.6). 14258// For details on the implementation of SearchForSeries, see Search 14259// transaction 14260// (https://cloud.google.com/healthcare/docs/dicom#search_transaction) 14261// in the Cloud Healthcare API conformance statement. For samples that 14262// show how to call SearchForSeries, see Searching for studies, series, 14263// instances, and frames 14264// (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#searching_for_studies_series_instances_and_frames). 14265// 14266// - dicomWebPath: The path of the SearchForSeries DICOMweb request. For 14267// example, `series` or `studies/{study_uid}/series`. 14268// - parent: The name of the DICOM store that is being accessed. For 14269// example, 14270// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 14271// /dicomStores/{dicom_store_id}`. 14272func (r *ProjectsLocationsDatasetsDicomStoresService) SearchForSeries(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresSearchForSeriesCall { 14273 c := &ProjectsLocationsDatasetsDicomStoresSearchForSeriesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14274 c.parent = parent 14275 c.dicomWebPath = dicomWebPath 14276 return c 14277} 14278 14279// Fields allows partial responses to be retrieved. See 14280// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14281// for more information. 14282func (c *ProjectsLocationsDatasetsDicomStoresSearchForSeriesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresSearchForSeriesCall { 14283 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14284 return c 14285} 14286 14287// IfNoneMatch sets the optional parameter which makes the operation 14288// fail if the object's ETag matches the given value. This is useful for 14289// getting updates only after the object has changed since the last 14290// request. Use googleapi.IsNotModified to check whether the response 14291// error from Do is the result of In-None-Match. 14292func (c *ProjectsLocationsDatasetsDicomStoresSearchForSeriesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresSearchForSeriesCall { 14293 c.ifNoneMatch_ = entityTag 14294 return c 14295} 14296 14297// Context sets the context to be used in this call's Do method. Any 14298// pending HTTP request will be aborted if the provided context is 14299// canceled. 14300func (c *ProjectsLocationsDatasetsDicomStoresSearchForSeriesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresSearchForSeriesCall { 14301 c.ctx_ = ctx 14302 return c 14303} 14304 14305// Header returns an http.Header that can be modified by the caller to 14306// add HTTP headers to the request. 14307func (c *ProjectsLocationsDatasetsDicomStoresSearchForSeriesCall) Header() http.Header { 14308 if c.header_ == nil { 14309 c.header_ = make(http.Header) 14310 } 14311 return c.header_ 14312} 14313 14314func (c *ProjectsLocationsDatasetsDicomStoresSearchForSeriesCall) doRequest(alt string) (*http.Response, error) { 14315 reqHeaders := make(http.Header) 14316 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 14317 for k, v := range c.header_ { 14318 reqHeaders[k] = v 14319 } 14320 reqHeaders.Set("User-Agent", c.s.userAgent()) 14321 if c.ifNoneMatch_ != "" { 14322 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14323 } 14324 var body io.Reader = nil 14325 c.urlParams_.Set("alt", alt) 14326 c.urlParams_.Set("prettyPrint", "false") 14327 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}") 14328 urls += "?" + c.urlParams_.Encode() 14329 req, err := http.NewRequest("GET", urls, body) 14330 if err != nil { 14331 return nil, err 14332 } 14333 req.Header = reqHeaders 14334 googleapi.Expand(req.URL, map[string]string{ 14335 "parent": c.parent, 14336 "dicomWebPath": c.dicomWebPath, 14337 }) 14338 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14339} 14340 14341// Do executes the "healthcare.projects.locations.datasets.dicomStores.searchForSeries" call. 14342func (c *ProjectsLocationsDatasetsDicomStoresSearchForSeriesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 14343 gensupport.SetOptions(c.urlParams_, opts...) 14344 return c.doRequest("") 14345 // { 14346 // "description": "SearchForSeries returns a list of matching series. See [Search Transaction] (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.6). For details on the implementation of SearchForSeries, see [Search transaction](https://cloud.google.com/healthcare/docs/dicom#search_transaction) in the Cloud Healthcare API conformance statement. For samples that show how to call SearchForSeries, see [Searching for studies, series, instances, and frames](https://cloud.google.com/healthcare/docs/how-tos/dicomweb#searching_for_studies_series_instances_and_frames).", 14347 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/series", 14348 // "httpMethod": "GET", 14349 // "id": "healthcare.projects.locations.datasets.dicomStores.searchForSeries", 14350 // "parameterOrder": [ 14351 // "parent", 14352 // "dicomWebPath" 14353 // ], 14354 // "parameters": { 14355 // "dicomWebPath": { 14356 // "description": "The path of the SearchForSeries DICOMweb request. For example, `series` or `studies/{study_uid}/series`.", 14357 // "location": "path", 14358 // "pattern": "^series$", 14359 // "required": true, 14360 // "type": "string" 14361 // }, 14362 // "parent": { 14363 // "description": "The name of the DICOM store that is being accessed. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`.", 14364 // "location": "path", 14365 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 14366 // "required": true, 14367 // "type": "string" 14368 // } 14369 // }, 14370 // "path": "v1/{+parent}/dicomWeb/{+dicomWebPath}", 14371 // "response": { 14372 // "$ref": "HttpBody" 14373 // }, 14374 // "scopes": [ 14375 // "https://www.googleapis.com/auth/cloud-platform" 14376 // ] 14377 // } 14378 14379} 14380 14381// method id "healthcare.projects.locations.datasets.dicomStores.searchForStudies": 14382 14383type ProjectsLocationsDatasetsDicomStoresSearchForStudiesCall struct { 14384 s *Service 14385 parent string 14386 dicomWebPath string 14387 urlParams_ gensupport.URLParams 14388 ifNoneMatch_ string 14389 ctx_ context.Context 14390 header_ http.Header 14391} 14392 14393// SearchForStudies: SearchForStudies returns a list of matching 14394// studies. See [Search Transaction] 14395// (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.6). 14396// For details on the implementation of SearchForStudies, see Search 14397// transaction 14398// (https://cloud.google.com/healthcare/docs/dicom#search_transaction) 14399// in the Cloud Healthcare API conformance statement. For samples that 14400// show how to call SearchForStudies, see Searching for studies, series, 14401// instances, and frames 14402// (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#searching_for_studies_series_instances_and_frames). 14403// 14404// - dicomWebPath: The path of the SearchForStudies DICOMweb request. 14405// For example, `studies`. 14406// - parent: The name of the DICOM store that is being accessed. For 14407// example, 14408// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 14409// /dicomStores/{dicom_store_id}`. 14410func (r *ProjectsLocationsDatasetsDicomStoresService) SearchForStudies(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresSearchForStudiesCall { 14411 c := &ProjectsLocationsDatasetsDicomStoresSearchForStudiesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14412 c.parent = parent 14413 c.dicomWebPath = dicomWebPath 14414 return c 14415} 14416 14417// Fields allows partial responses to be retrieved. See 14418// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14419// for more information. 14420func (c *ProjectsLocationsDatasetsDicomStoresSearchForStudiesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresSearchForStudiesCall { 14421 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14422 return c 14423} 14424 14425// IfNoneMatch sets the optional parameter which makes the operation 14426// fail if the object's ETag matches the given value. This is useful for 14427// getting updates only after the object has changed since the last 14428// request. Use googleapi.IsNotModified to check whether the response 14429// error from Do is the result of In-None-Match. 14430func (c *ProjectsLocationsDatasetsDicomStoresSearchForStudiesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresSearchForStudiesCall { 14431 c.ifNoneMatch_ = entityTag 14432 return c 14433} 14434 14435// Context sets the context to be used in this call's Do method. Any 14436// pending HTTP request will be aborted if the provided context is 14437// canceled. 14438func (c *ProjectsLocationsDatasetsDicomStoresSearchForStudiesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresSearchForStudiesCall { 14439 c.ctx_ = ctx 14440 return c 14441} 14442 14443// Header returns an http.Header that can be modified by the caller to 14444// add HTTP headers to the request. 14445func (c *ProjectsLocationsDatasetsDicomStoresSearchForStudiesCall) Header() http.Header { 14446 if c.header_ == nil { 14447 c.header_ = make(http.Header) 14448 } 14449 return c.header_ 14450} 14451 14452func (c *ProjectsLocationsDatasetsDicomStoresSearchForStudiesCall) doRequest(alt string) (*http.Response, error) { 14453 reqHeaders := make(http.Header) 14454 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 14455 for k, v := range c.header_ { 14456 reqHeaders[k] = v 14457 } 14458 reqHeaders.Set("User-Agent", c.s.userAgent()) 14459 if c.ifNoneMatch_ != "" { 14460 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14461 } 14462 var body io.Reader = nil 14463 c.urlParams_.Set("alt", alt) 14464 c.urlParams_.Set("prettyPrint", "false") 14465 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}") 14466 urls += "?" + c.urlParams_.Encode() 14467 req, err := http.NewRequest("GET", urls, body) 14468 if err != nil { 14469 return nil, err 14470 } 14471 req.Header = reqHeaders 14472 googleapi.Expand(req.URL, map[string]string{ 14473 "parent": c.parent, 14474 "dicomWebPath": c.dicomWebPath, 14475 }) 14476 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14477} 14478 14479// Do executes the "healthcare.projects.locations.datasets.dicomStores.searchForStudies" call. 14480func (c *ProjectsLocationsDatasetsDicomStoresSearchForStudiesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 14481 gensupport.SetOptions(c.urlParams_, opts...) 14482 return c.doRequest("") 14483 // { 14484 // "description": "SearchForStudies returns a list of matching studies. See [Search Transaction] (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.6). For details on the implementation of SearchForStudies, see [Search transaction](https://cloud.google.com/healthcare/docs/dicom#search_transaction) in the Cloud Healthcare API conformance statement. For samples that show how to call SearchForStudies, see [Searching for studies, series, instances, and frames](https://cloud.google.com/healthcare/docs/how-tos/dicomweb#searching_for_studies_series_instances_and_frames).", 14485 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies", 14486 // "httpMethod": "GET", 14487 // "id": "healthcare.projects.locations.datasets.dicomStores.searchForStudies", 14488 // "parameterOrder": [ 14489 // "parent", 14490 // "dicomWebPath" 14491 // ], 14492 // "parameters": { 14493 // "dicomWebPath": { 14494 // "description": "The path of the SearchForStudies DICOMweb request. For example, `studies`.", 14495 // "location": "path", 14496 // "pattern": "^studies$", 14497 // "required": true, 14498 // "type": "string" 14499 // }, 14500 // "parent": { 14501 // "description": "The name of the DICOM store that is being accessed. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`.", 14502 // "location": "path", 14503 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 14504 // "required": true, 14505 // "type": "string" 14506 // } 14507 // }, 14508 // "path": "v1/{+parent}/dicomWeb/{+dicomWebPath}", 14509 // "response": { 14510 // "$ref": "HttpBody" 14511 // }, 14512 // "scopes": [ 14513 // "https://www.googleapis.com/auth/cloud-platform" 14514 // ] 14515 // } 14516 14517} 14518 14519// method id "healthcare.projects.locations.datasets.dicomStores.setIamPolicy": 14520 14521type ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall struct { 14522 s *Service 14523 resource string 14524 setiampolicyrequest *SetIamPolicyRequest 14525 urlParams_ gensupport.URLParams 14526 ctx_ context.Context 14527 header_ http.Header 14528} 14529 14530// SetIamPolicy: Sets the access control policy on the specified 14531// resource. Replaces any existing policy. Can return `NOT_FOUND`, 14532// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. 14533// 14534// - resource: REQUIRED: The resource for which the policy is being 14535// specified. See the operation documentation for the appropriate 14536// value for this field. 14537func (r *ProjectsLocationsDatasetsDicomStoresService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall { 14538 c := &ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14539 c.resource = resource 14540 c.setiampolicyrequest = setiampolicyrequest 14541 return c 14542} 14543 14544// Fields allows partial responses to be retrieved. See 14545// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14546// for more information. 14547func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall { 14548 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14549 return c 14550} 14551 14552// Context sets the context to be used in this call's Do method. Any 14553// pending HTTP request will be aborted if the provided context is 14554// canceled. 14555func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall { 14556 c.ctx_ = ctx 14557 return c 14558} 14559 14560// Header returns an http.Header that can be modified by the caller to 14561// add HTTP headers to the request. 14562func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) Header() http.Header { 14563 if c.header_ == nil { 14564 c.header_ = make(http.Header) 14565 } 14566 return c.header_ 14567} 14568 14569func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 14570 reqHeaders := make(http.Header) 14571 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 14572 for k, v := range c.header_ { 14573 reqHeaders[k] = v 14574 } 14575 reqHeaders.Set("User-Agent", c.s.userAgent()) 14576 var body io.Reader = nil 14577 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 14578 if err != nil { 14579 return nil, err 14580 } 14581 reqHeaders.Set("Content-Type", "application/json") 14582 c.urlParams_.Set("alt", alt) 14583 c.urlParams_.Set("prettyPrint", "false") 14584 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") 14585 urls += "?" + c.urlParams_.Encode() 14586 req, err := http.NewRequest("POST", urls, body) 14587 if err != nil { 14588 return nil, err 14589 } 14590 req.Header = reqHeaders 14591 googleapi.Expand(req.URL, map[string]string{ 14592 "resource": c.resource, 14593 }) 14594 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14595} 14596 14597// Do executes the "healthcare.projects.locations.datasets.dicomStores.setIamPolicy" call. 14598// Exactly one of *Policy or error will be non-nil. Any non-2xx status 14599// code is an error. Response headers are in either 14600// *Policy.ServerResponse.Header or (if a response was returned at all) 14601// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 14602// check whether the returned error was because http.StatusNotModified 14603// was returned. 14604func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 14605 gensupport.SetOptions(c.urlParams_, opts...) 14606 res, err := c.doRequest("json") 14607 if res != nil && res.StatusCode == http.StatusNotModified { 14608 if res.Body != nil { 14609 res.Body.Close() 14610 } 14611 return nil, &googleapi.Error{ 14612 Code: res.StatusCode, 14613 Header: res.Header, 14614 } 14615 } 14616 if err != nil { 14617 return nil, err 14618 } 14619 defer googleapi.CloseBody(res) 14620 if err := googleapi.CheckResponse(res); err != nil { 14621 return nil, err 14622 } 14623 ret := &Policy{ 14624 ServerResponse: googleapi.ServerResponse{ 14625 Header: res.Header, 14626 HTTPStatusCode: res.StatusCode, 14627 }, 14628 } 14629 target := &ret 14630 if err := gensupport.DecodeResponse(target, res); err != nil { 14631 return nil, err 14632 } 14633 return ret, nil 14634 // { 14635 // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", 14636 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}:setIamPolicy", 14637 // "httpMethod": "POST", 14638 // "id": "healthcare.projects.locations.datasets.dicomStores.setIamPolicy", 14639 // "parameterOrder": [ 14640 // "resource" 14641 // ], 14642 // "parameters": { 14643 // "resource": { 14644 // "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", 14645 // "location": "path", 14646 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 14647 // "required": true, 14648 // "type": "string" 14649 // } 14650 // }, 14651 // "path": "v1/{+resource}:setIamPolicy", 14652 // "request": { 14653 // "$ref": "SetIamPolicyRequest" 14654 // }, 14655 // "response": { 14656 // "$ref": "Policy" 14657 // }, 14658 // "scopes": [ 14659 // "https://www.googleapis.com/auth/cloud-platform" 14660 // ] 14661 // } 14662 14663} 14664 14665// method id "healthcare.projects.locations.datasets.dicomStores.storeInstances": 14666 14667type ProjectsLocationsDatasetsDicomStoresStoreInstancesCall struct { 14668 s *Service 14669 parent string 14670 dicomWebPath string 14671 body_ io.Reader 14672 urlParams_ gensupport.URLParams 14673 ctx_ context.Context 14674 header_ http.Header 14675} 14676 14677// StoreInstances: StoreInstances stores DICOM instances associated with 14678// study instance unique identifiers (SUID). See [Store Transaction] 14679// (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.5). 14680// For details on the implementation of StoreInstances, see Store 14681// transaction 14682// (https://cloud.google.com/healthcare/docs/dicom#store_transaction) in 14683// the Cloud Healthcare API conformance statement. For samples that show 14684// how to call StoreInstances, see Storing DICOM data 14685// (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#storing_dicom_data). 14686// 14687// - dicomWebPath: The path of the StoreInstances DICOMweb request. For 14688// example, `studies/[{study_uid}]`. Note that the `study_uid` is 14689// optional. 14690// - parent: The name of the DICOM store that is being accessed. For 14691// example, 14692// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 14693// /dicomStores/{dicom_store_id}`. 14694func (r *ProjectsLocationsDatasetsDicomStoresService) StoreInstances(parent string, dicomWebPath string, body_ io.Reader) *ProjectsLocationsDatasetsDicomStoresStoreInstancesCall { 14695 c := &ProjectsLocationsDatasetsDicomStoresStoreInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14696 c.parent = parent 14697 c.dicomWebPath = dicomWebPath 14698 c.body_ = body_ 14699 return c 14700} 14701 14702// Fields allows partial responses to be retrieved. See 14703// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14704// for more information. 14705func (c *ProjectsLocationsDatasetsDicomStoresStoreInstancesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStoreInstancesCall { 14706 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14707 return c 14708} 14709 14710// Context sets the context to be used in this call's Do method. Any 14711// pending HTTP request will be aborted if the provided context is 14712// canceled. 14713func (c *ProjectsLocationsDatasetsDicomStoresStoreInstancesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStoreInstancesCall { 14714 c.ctx_ = ctx 14715 return c 14716} 14717 14718// Header returns an http.Header that can be modified by the caller to 14719// add HTTP headers to the request. 14720func (c *ProjectsLocationsDatasetsDicomStoresStoreInstancesCall) Header() http.Header { 14721 if c.header_ == nil { 14722 c.header_ = make(http.Header) 14723 } 14724 return c.header_ 14725} 14726 14727func (c *ProjectsLocationsDatasetsDicomStoresStoreInstancesCall) doRequest(alt string) (*http.Response, error) { 14728 reqHeaders := make(http.Header) 14729 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 14730 for k, v := range c.header_ { 14731 reqHeaders[k] = v 14732 } 14733 reqHeaders.Set("User-Agent", c.s.userAgent()) 14734 var body io.Reader = nil 14735 body = c.body_ 14736 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}") 14737 urls += "?" + c.urlParams_.Encode() 14738 req, err := http.NewRequest("POST", urls, body) 14739 if err != nil { 14740 return nil, err 14741 } 14742 req.Header = reqHeaders 14743 googleapi.Expand(req.URL, map[string]string{ 14744 "parent": c.parent, 14745 "dicomWebPath": c.dicomWebPath, 14746 }) 14747 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14748} 14749 14750// Do executes the "healthcare.projects.locations.datasets.dicomStores.storeInstances" call. 14751func (c *ProjectsLocationsDatasetsDicomStoresStoreInstancesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 14752 gensupport.SetOptions(c.urlParams_, opts...) 14753 return c.doRequest("") 14754 // { 14755 // "description": "StoreInstances stores DICOM instances associated with study instance unique identifiers (SUID). See [Store Transaction] (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.5). For details on the implementation of StoreInstances, see [Store transaction](https://cloud.google.com/healthcare/docs/dicom#store_transaction) in the Cloud Healthcare API conformance statement. For samples that show how to call StoreInstances, see [Storing DICOM data](https://cloud.google.com/healthcare/docs/how-tos/dicomweb#storing_dicom_data).", 14756 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies", 14757 // "httpMethod": "POST", 14758 // "id": "healthcare.projects.locations.datasets.dicomStores.storeInstances", 14759 // "parameterOrder": [ 14760 // "parent", 14761 // "dicomWebPath" 14762 // ], 14763 // "parameters": { 14764 // "dicomWebPath": { 14765 // "description": "The path of the StoreInstances DICOMweb request. For example, `studies/[{study_uid}]`. Note that the `study_uid` is optional.", 14766 // "location": "path", 14767 // "pattern": "^studies$", 14768 // "required": true, 14769 // "type": "string" 14770 // }, 14771 // "parent": { 14772 // "description": "The name of the DICOM store that is being accessed. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`.", 14773 // "location": "path", 14774 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 14775 // "required": true, 14776 // "type": "string" 14777 // } 14778 // }, 14779 // "path": "v1/{+parent}/dicomWeb/{+dicomWebPath}", 14780 // "request": { 14781 // "$ref": "HttpBody" 14782 // }, 14783 // "response": { 14784 // "$ref": "HttpBody" 14785 // }, 14786 // "scopes": [ 14787 // "https://www.googleapis.com/auth/cloud-platform" 14788 // ] 14789 // } 14790 14791} 14792 14793// method id "healthcare.projects.locations.datasets.dicomStores.testIamPermissions": 14794 14795type ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall struct { 14796 s *Service 14797 resource string 14798 testiampermissionsrequest *TestIamPermissionsRequest 14799 urlParams_ gensupport.URLParams 14800 ctx_ context.Context 14801 header_ http.Header 14802} 14803 14804// TestIamPermissions: Returns permissions that a caller has on the 14805// specified resource. If the resource does not exist, this will return 14806// an empty set of permissions, not a `NOT_FOUND` error. Note: This 14807// operation is designed to be used for building permission-aware UIs 14808// and command-line tools, not for authorization checking. This 14809// operation may "fail open" without warning. 14810// 14811// - resource: REQUIRED: The resource for which the policy detail is 14812// being requested. See the operation documentation for the 14813// appropriate value for this field. 14814func (r *ProjectsLocationsDatasetsDicomStoresService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall { 14815 c := &ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14816 c.resource = resource 14817 c.testiampermissionsrequest = testiampermissionsrequest 14818 return c 14819} 14820 14821// Fields allows partial responses to be retrieved. See 14822// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14823// for more information. 14824func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall { 14825 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14826 return c 14827} 14828 14829// Context sets the context to be used in this call's Do method. Any 14830// pending HTTP request will be aborted if the provided context is 14831// canceled. 14832func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall { 14833 c.ctx_ = ctx 14834 return c 14835} 14836 14837// Header returns an http.Header that can be modified by the caller to 14838// add HTTP headers to the request. 14839func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) Header() http.Header { 14840 if c.header_ == nil { 14841 c.header_ = make(http.Header) 14842 } 14843 return c.header_ 14844} 14845 14846func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 14847 reqHeaders := make(http.Header) 14848 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 14849 for k, v := range c.header_ { 14850 reqHeaders[k] = v 14851 } 14852 reqHeaders.Set("User-Agent", c.s.userAgent()) 14853 var body io.Reader = nil 14854 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 14855 if err != nil { 14856 return nil, err 14857 } 14858 reqHeaders.Set("Content-Type", "application/json") 14859 c.urlParams_.Set("alt", alt) 14860 c.urlParams_.Set("prettyPrint", "false") 14861 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") 14862 urls += "?" + c.urlParams_.Encode() 14863 req, err := http.NewRequest("POST", urls, body) 14864 if err != nil { 14865 return nil, err 14866 } 14867 req.Header = reqHeaders 14868 googleapi.Expand(req.URL, map[string]string{ 14869 "resource": c.resource, 14870 }) 14871 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14872} 14873 14874// Do executes the "healthcare.projects.locations.datasets.dicomStores.testIamPermissions" call. 14875// Exactly one of *TestIamPermissionsResponse or error will be non-nil. 14876// Any non-2xx status code is an error. Response headers are in either 14877// *TestIamPermissionsResponse.ServerResponse.Header or (if a response 14878// was returned at all) in error.(*googleapi.Error).Header. Use 14879// googleapi.IsNotModified to check whether the returned error was 14880// because http.StatusNotModified was returned. 14881func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 14882 gensupport.SetOptions(c.urlParams_, opts...) 14883 res, err := c.doRequest("json") 14884 if res != nil && res.StatusCode == http.StatusNotModified { 14885 if res.Body != nil { 14886 res.Body.Close() 14887 } 14888 return nil, &googleapi.Error{ 14889 Code: res.StatusCode, 14890 Header: res.Header, 14891 } 14892 } 14893 if err != nil { 14894 return nil, err 14895 } 14896 defer googleapi.CloseBody(res) 14897 if err := googleapi.CheckResponse(res); err != nil { 14898 return nil, err 14899 } 14900 ret := &TestIamPermissionsResponse{ 14901 ServerResponse: googleapi.ServerResponse{ 14902 Header: res.Header, 14903 HTTPStatusCode: res.StatusCode, 14904 }, 14905 } 14906 target := &ret 14907 if err := gensupport.DecodeResponse(target, res); err != nil { 14908 return nil, err 14909 } 14910 return ret, nil 14911 // { 14912 // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", 14913 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}:testIamPermissions", 14914 // "httpMethod": "POST", 14915 // "id": "healthcare.projects.locations.datasets.dicomStores.testIamPermissions", 14916 // "parameterOrder": [ 14917 // "resource" 14918 // ], 14919 // "parameters": { 14920 // "resource": { 14921 // "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", 14922 // "location": "path", 14923 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 14924 // "required": true, 14925 // "type": "string" 14926 // } 14927 // }, 14928 // "path": "v1/{+resource}:testIamPermissions", 14929 // "request": { 14930 // "$ref": "TestIamPermissionsRequest" 14931 // }, 14932 // "response": { 14933 // "$ref": "TestIamPermissionsResponse" 14934 // }, 14935 // "scopes": [ 14936 // "https://www.googleapis.com/auth/cloud-platform" 14937 // ] 14938 // } 14939 14940} 14941 14942// method id "healthcare.projects.locations.datasets.dicomStores.studies.delete": 14943 14944type ProjectsLocationsDatasetsDicomStoresStudiesDeleteCall struct { 14945 s *Service 14946 parent string 14947 dicomWebPath string 14948 urlParams_ gensupport.URLParams 14949 ctx_ context.Context 14950 header_ http.Header 14951} 14952 14953// Delete: DeleteStudy deletes all instances within the given study. 14954// Delete requests are equivalent to the GET requests specified in the 14955// Retrieve transaction. The method returns an Operation which will be 14956// marked successful when the deletion is complete. Warning: Instances 14957// cannot be inserted into a study that is being deleted by an operation 14958// until the operation completes. For samples that show how to call 14959// DeleteStudy, see Deleting a study, series, or instance 14960// (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#deleting_a_study_series_or_instance). 14961// 14962// - dicomWebPath: The path of the DeleteStudy request. For example, 14963// `studies/{study_uid}`. 14964// - parent: . 14965func (r *ProjectsLocationsDatasetsDicomStoresStudiesService) Delete(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesDeleteCall { 14966 c := &ProjectsLocationsDatasetsDicomStoresStudiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14967 c.parent = parent 14968 c.dicomWebPath = dicomWebPath 14969 return c 14970} 14971 14972// Fields allows partial responses to be retrieved. See 14973// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14974// for more information. 14975func (c *ProjectsLocationsDatasetsDicomStoresStudiesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesDeleteCall { 14976 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14977 return c 14978} 14979 14980// Context sets the context to be used in this call's Do method. Any 14981// pending HTTP request will be aborted if the provided context is 14982// canceled. 14983func (c *ProjectsLocationsDatasetsDicomStoresStudiesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesDeleteCall { 14984 c.ctx_ = ctx 14985 return c 14986} 14987 14988// Header returns an http.Header that can be modified by the caller to 14989// add HTTP headers to the request. 14990func (c *ProjectsLocationsDatasetsDicomStoresStudiesDeleteCall) Header() http.Header { 14991 if c.header_ == nil { 14992 c.header_ = make(http.Header) 14993 } 14994 return c.header_ 14995} 14996 14997func (c *ProjectsLocationsDatasetsDicomStoresStudiesDeleteCall) doRequest(alt string) (*http.Response, error) { 14998 reqHeaders := make(http.Header) 14999 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 15000 for k, v := range c.header_ { 15001 reqHeaders[k] = v 15002 } 15003 reqHeaders.Set("User-Agent", c.s.userAgent()) 15004 var body io.Reader = nil 15005 c.urlParams_.Set("alt", alt) 15006 c.urlParams_.Set("prettyPrint", "false") 15007 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}") 15008 urls += "?" + c.urlParams_.Encode() 15009 req, err := http.NewRequest("DELETE", urls, body) 15010 if err != nil { 15011 return nil, err 15012 } 15013 req.Header = reqHeaders 15014 googleapi.Expand(req.URL, map[string]string{ 15015 "parent": c.parent, 15016 "dicomWebPath": c.dicomWebPath, 15017 }) 15018 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15019} 15020 15021// Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.delete" call. 15022// Exactly one of *Operation or error will be non-nil. Any non-2xx 15023// status code is an error. Response headers are in either 15024// *Operation.ServerResponse.Header or (if a response was returned at 15025// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 15026// to check whether the returned error was because 15027// http.StatusNotModified was returned. 15028func (c *ProjectsLocationsDatasetsDicomStoresStudiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 15029 gensupport.SetOptions(c.urlParams_, opts...) 15030 res, err := c.doRequest("json") 15031 if res != nil && res.StatusCode == http.StatusNotModified { 15032 if res.Body != nil { 15033 res.Body.Close() 15034 } 15035 return nil, &googleapi.Error{ 15036 Code: res.StatusCode, 15037 Header: res.Header, 15038 } 15039 } 15040 if err != nil { 15041 return nil, err 15042 } 15043 defer googleapi.CloseBody(res) 15044 if err := googleapi.CheckResponse(res); err != nil { 15045 return nil, err 15046 } 15047 ret := &Operation{ 15048 ServerResponse: googleapi.ServerResponse{ 15049 Header: res.Header, 15050 HTTPStatusCode: res.StatusCode, 15051 }, 15052 } 15053 target := &ret 15054 if err := gensupport.DecodeResponse(target, res); err != nil { 15055 return nil, err 15056 } 15057 return ret, nil 15058 // { 15059 // "description": "DeleteStudy deletes all instances within the given study. Delete requests are equivalent to the GET requests specified in the Retrieve transaction. The method returns an Operation which will be marked successful when the deletion is complete. Warning: Instances cannot be inserted into a study that is being deleted by an operation until the operation completes. For samples that show how to call DeleteStudy, see [Deleting a study, series, or instance](https://cloud.google.com/healthcare/docs/how-tos/dicomweb#deleting_a_study_series_or_instance).", 15060 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}", 15061 // "httpMethod": "DELETE", 15062 // "id": "healthcare.projects.locations.datasets.dicomStores.studies.delete", 15063 // "parameterOrder": [ 15064 // "parent", 15065 // "dicomWebPath" 15066 // ], 15067 // "parameters": { 15068 // "dicomWebPath": { 15069 // "description": "The path of the DeleteStudy request. For example, `studies/{study_uid}`.", 15070 // "location": "path", 15071 // "pattern": "^studies/[^/]+$", 15072 // "required": true, 15073 // "type": "string" 15074 // }, 15075 // "parent": { 15076 // "location": "path", 15077 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 15078 // "required": true, 15079 // "type": "string" 15080 // } 15081 // }, 15082 // "path": "v1/{+parent}/dicomWeb/{+dicomWebPath}", 15083 // "response": { 15084 // "$ref": "Operation" 15085 // }, 15086 // "scopes": [ 15087 // "https://www.googleapis.com/auth/cloud-platform" 15088 // ] 15089 // } 15090 15091} 15092 15093// method id "healthcare.projects.locations.datasets.dicomStores.studies.retrieveMetadata": 15094 15095type ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall struct { 15096 s *Service 15097 parent string 15098 dicomWebPath string 15099 urlParams_ gensupport.URLParams 15100 ifNoneMatch_ string 15101 ctx_ context.Context 15102 header_ http.Header 15103} 15104 15105// RetrieveMetadata: RetrieveStudyMetadata returns instance associated 15106// with the given study presented as metadata with the bulk data 15107// removed. See [RetrieveTransaction] 15108// (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). 15109// For details on the implementation of RetrieveStudyMetadata, see 15110// Metadata resources 15111// (https://cloud.google.com/healthcare/docs/dicom#metadata_resources) 15112// in the Cloud Healthcare API conformance statement. For samples that 15113// show how to call RetrieveStudyMetadata, see Retrieving metadata 15114// (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieving_metadata). 15115// 15116// - dicomWebPath: The path of the RetrieveStudyMetadata DICOMweb 15117// request. For example, `studies/{study_uid}/metadata`. 15118// - parent: The name of the DICOM store that is being accessed. For 15119// example, 15120// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 15121// /dicomStores/{dicom_store_id}`. 15122func (r *ProjectsLocationsDatasetsDicomStoresStudiesService) RetrieveMetadata(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall { 15123 c := &ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15124 c.parent = parent 15125 c.dicomWebPath = dicomWebPath 15126 return c 15127} 15128 15129// Fields allows partial responses to be retrieved. See 15130// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15131// for more information. 15132func (c *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall { 15133 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15134 return c 15135} 15136 15137// IfNoneMatch sets the optional parameter which makes the operation 15138// fail if the object's ETag matches the given value. This is useful for 15139// getting updates only after the object has changed since the last 15140// request. Use googleapi.IsNotModified to check whether the response 15141// error from Do is the result of In-None-Match. 15142func (c *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall { 15143 c.ifNoneMatch_ = entityTag 15144 return c 15145} 15146 15147// Context sets the context to be used in this call's Do method. Any 15148// pending HTTP request will be aborted if the provided context is 15149// canceled. 15150func (c *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall { 15151 c.ctx_ = ctx 15152 return c 15153} 15154 15155// Header returns an http.Header that can be modified by the caller to 15156// add HTTP headers to the request. 15157func (c *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall) Header() http.Header { 15158 if c.header_ == nil { 15159 c.header_ = make(http.Header) 15160 } 15161 return c.header_ 15162} 15163 15164func (c *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall) doRequest(alt string) (*http.Response, error) { 15165 reqHeaders := make(http.Header) 15166 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 15167 for k, v := range c.header_ { 15168 reqHeaders[k] = v 15169 } 15170 reqHeaders.Set("User-Agent", c.s.userAgent()) 15171 if c.ifNoneMatch_ != "" { 15172 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15173 } 15174 var body io.Reader = nil 15175 c.urlParams_.Set("alt", alt) 15176 c.urlParams_.Set("prettyPrint", "false") 15177 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}") 15178 urls += "?" + c.urlParams_.Encode() 15179 req, err := http.NewRequest("GET", urls, body) 15180 if err != nil { 15181 return nil, err 15182 } 15183 req.Header = reqHeaders 15184 googleapi.Expand(req.URL, map[string]string{ 15185 "parent": c.parent, 15186 "dicomWebPath": c.dicomWebPath, 15187 }) 15188 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15189} 15190 15191// Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.retrieveMetadata" call. 15192func (c *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 15193 gensupport.SetOptions(c.urlParams_, opts...) 15194 return c.doRequest("") 15195 // { 15196 // "description": "RetrieveStudyMetadata returns instance associated with the given study presented as metadata with the bulk data removed. See [RetrieveTransaction] (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). For details on the implementation of RetrieveStudyMetadata, see [Metadata resources](https://cloud.google.com/healthcare/docs/dicom#metadata_resources) in the Cloud Healthcare API conformance statement. For samples that show how to call RetrieveStudyMetadata, see [Retrieving metadata](https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieving_metadata).", 15197 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/metadata", 15198 // "httpMethod": "GET", 15199 // "id": "healthcare.projects.locations.datasets.dicomStores.studies.retrieveMetadata", 15200 // "parameterOrder": [ 15201 // "parent", 15202 // "dicomWebPath" 15203 // ], 15204 // "parameters": { 15205 // "dicomWebPath": { 15206 // "description": "The path of the RetrieveStudyMetadata DICOMweb request. For example, `studies/{study_uid}/metadata`.", 15207 // "location": "path", 15208 // "pattern": "^studies/[^/]+/metadata$", 15209 // "required": true, 15210 // "type": "string" 15211 // }, 15212 // "parent": { 15213 // "description": "The name of the DICOM store that is being accessed. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`.", 15214 // "location": "path", 15215 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 15216 // "required": true, 15217 // "type": "string" 15218 // } 15219 // }, 15220 // "path": "v1/{+parent}/dicomWeb/{+dicomWebPath}", 15221 // "response": { 15222 // "$ref": "HttpBody" 15223 // }, 15224 // "scopes": [ 15225 // "https://www.googleapis.com/auth/cloud-platform" 15226 // ] 15227 // } 15228 15229} 15230 15231// method id "healthcare.projects.locations.datasets.dicomStores.studies.retrieveStudy": 15232 15233type ProjectsLocationsDatasetsDicomStoresStudiesRetrieveStudyCall struct { 15234 s *Service 15235 parent string 15236 dicomWebPath string 15237 urlParams_ gensupport.URLParams 15238 ifNoneMatch_ string 15239 ctx_ context.Context 15240 header_ http.Header 15241} 15242 15243// RetrieveStudy: RetrieveStudy returns all instances within the given 15244// study. See [RetrieveTransaction] 15245// (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). 15246// For details on the implementation of RetrieveStudy, see DICOM 15247// study/series/instances 15248// (https://cloud.google.com/healthcare/docs/dicom#dicom_studyseriesinstances) 15249// in the Cloud Healthcare API conformance statement. For samples that 15250// show how to call RetrieveStudy, see Retrieving DICOM data 15251// (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieving_dicom_data). 15252// 15253// - dicomWebPath: The path of the RetrieveStudy DICOMweb request. For 15254// example, `studies/{study_uid}`. 15255// - parent: The name of the DICOM store that is being accessed. For 15256// example, 15257// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 15258// /dicomStores/{dicom_store_id}`. 15259func (r *ProjectsLocationsDatasetsDicomStoresStudiesService) RetrieveStudy(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveStudyCall { 15260 c := &ProjectsLocationsDatasetsDicomStoresStudiesRetrieveStudyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15261 c.parent = parent 15262 c.dicomWebPath = dicomWebPath 15263 return c 15264} 15265 15266// Fields allows partial responses to be retrieved. See 15267// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15268// for more information. 15269func (c *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveStudyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveStudyCall { 15270 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15271 return c 15272} 15273 15274// IfNoneMatch sets the optional parameter which makes the operation 15275// fail if the object's ETag matches the given value. This is useful for 15276// getting updates only after the object has changed since the last 15277// request. Use googleapi.IsNotModified to check whether the response 15278// error from Do is the result of In-None-Match. 15279func (c *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveStudyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveStudyCall { 15280 c.ifNoneMatch_ = entityTag 15281 return c 15282} 15283 15284// Context sets the context to be used in this call's Do method. Any 15285// pending HTTP request will be aborted if the provided context is 15286// canceled. 15287func (c *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveStudyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveStudyCall { 15288 c.ctx_ = ctx 15289 return c 15290} 15291 15292// Header returns an http.Header that can be modified by the caller to 15293// add HTTP headers to the request. 15294func (c *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveStudyCall) Header() http.Header { 15295 if c.header_ == nil { 15296 c.header_ = make(http.Header) 15297 } 15298 return c.header_ 15299} 15300 15301func (c *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveStudyCall) doRequest(alt string) (*http.Response, error) { 15302 reqHeaders := make(http.Header) 15303 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 15304 for k, v := range c.header_ { 15305 reqHeaders[k] = v 15306 } 15307 reqHeaders.Set("User-Agent", c.s.userAgent()) 15308 if c.ifNoneMatch_ != "" { 15309 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15310 } 15311 var body io.Reader = nil 15312 c.urlParams_.Set("alt", alt) 15313 c.urlParams_.Set("prettyPrint", "false") 15314 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}") 15315 urls += "?" + c.urlParams_.Encode() 15316 req, err := http.NewRequest("GET", urls, body) 15317 if err != nil { 15318 return nil, err 15319 } 15320 req.Header = reqHeaders 15321 googleapi.Expand(req.URL, map[string]string{ 15322 "parent": c.parent, 15323 "dicomWebPath": c.dicomWebPath, 15324 }) 15325 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15326} 15327 15328// Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.retrieveStudy" call. 15329func (c *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveStudyCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 15330 gensupport.SetOptions(c.urlParams_, opts...) 15331 return c.doRequest("") 15332 // { 15333 // "description": "RetrieveStudy returns all instances within the given study. See [RetrieveTransaction] (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). For details on the implementation of RetrieveStudy, see [DICOM study/series/instances](https://cloud.google.com/healthcare/docs/dicom#dicom_studyseriesinstances) in the Cloud Healthcare API conformance statement. For samples that show how to call RetrieveStudy, see [Retrieving DICOM data](https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieving_dicom_data).", 15334 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}", 15335 // "httpMethod": "GET", 15336 // "id": "healthcare.projects.locations.datasets.dicomStores.studies.retrieveStudy", 15337 // "parameterOrder": [ 15338 // "parent", 15339 // "dicomWebPath" 15340 // ], 15341 // "parameters": { 15342 // "dicomWebPath": { 15343 // "description": "The path of the RetrieveStudy DICOMweb request. For example, `studies/{study_uid}`.", 15344 // "location": "path", 15345 // "pattern": "^studies/[^/]+$", 15346 // "required": true, 15347 // "type": "string" 15348 // }, 15349 // "parent": { 15350 // "description": "The name of the DICOM store that is being accessed. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`.", 15351 // "location": "path", 15352 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 15353 // "required": true, 15354 // "type": "string" 15355 // } 15356 // }, 15357 // "path": "v1/{+parent}/dicomWeb/{+dicomWebPath}", 15358 // "response": { 15359 // "$ref": "HttpBody" 15360 // }, 15361 // "scopes": [ 15362 // "https://www.googleapis.com/auth/cloud-platform" 15363 // ] 15364 // } 15365 15366} 15367 15368// method id "healthcare.projects.locations.datasets.dicomStores.studies.searchForInstances": 15369 15370type ProjectsLocationsDatasetsDicomStoresStudiesSearchForInstancesCall struct { 15371 s *Service 15372 parent string 15373 dicomWebPath string 15374 urlParams_ gensupport.URLParams 15375 ifNoneMatch_ string 15376 ctx_ context.Context 15377 header_ http.Header 15378} 15379 15380// SearchForInstances: SearchForInstances returns a list of matching 15381// instances. See [Search Transaction] 15382// (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.6). 15383// For details on the implementation of SearchForInstances, see Search 15384// transaction 15385// (https://cloud.google.com/healthcare/docs/dicom#search_transaction) 15386// in the Cloud Healthcare API conformance statement. For samples that 15387// show how to call SearchForInstances, see Searching for studies, 15388// series, instances, and frames 15389// (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#searching_for_studies_series_instances_and_frames). 15390// 15391// - dicomWebPath: The path of the SearchForInstancesRequest DICOMweb 15392// request. For example, `instances`, `series/{series_uid}/instances`, 15393// or `studies/{study_uid}/instances`. 15394// - parent: The name of the DICOM store that is being accessed. For 15395// example, 15396// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 15397// /dicomStores/{dicom_store_id}`. 15398func (r *ProjectsLocationsDatasetsDicomStoresStudiesService) SearchForInstances(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSearchForInstancesCall { 15399 c := &ProjectsLocationsDatasetsDicomStoresStudiesSearchForInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15400 c.parent = parent 15401 c.dicomWebPath = dicomWebPath 15402 return c 15403} 15404 15405// Fields allows partial responses to be retrieved. See 15406// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15407// for more information. 15408func (c *ProjectsLocationsDatasetsDicomStoresStudiesSearchForInstancesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSearchForInstancesCall { 15409 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15410 return c 15411} 15412 15413// IfNoneMatch sets the optional parameter which makes the operation 15414// fail if the object's ETag matches the given value. This is useful for 15415// getting updates only after the object has changed since the last 15416// request. Use googleapi.IsNotModified to check whether the response 15417// error from Do is the result of In-None-Match. 15418func (c *ProjectsLocationsDatasetsDicomStoresStudiesSearchForInstancesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesSearchForInstancesCall { 15419 c.ifNoneMatch_ = entityTag 15420 return c 15421} 15422 15423// Context sets the context to be used in this call's Do method. Any 15424// pending HTTP request will be aborted if the provided context is 15425// canceled. 15426func (c *ProjectsLocationsDatasetsDicomStoresStudiesSearchForInstancesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSearchForInstancesCall { 15427 c.ctx_ = ctx 15428 return c 15429} 15430 15431// Header returns an http.Header that can be modified by the caller to 15432// add HTTP headers to the request. 15433func (c *ProjectsLocationsDatasetsDicomStoresStudiesSearchForInstancesCall) Header() http.Header { 15434 if c.header_ == nil { 15435 c.header_ = make(http.Header) 15436 } 15437 return c.header_ 15438} 15439 15440func (c *ProjectsLocationsDatasetsDicomStoresStudiesSearchForInstancesCall) doRequest(alt string) (*http.Response, error) { 15441 reqHeaders := make(http.Header) 15442 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 15443 for k, v := range c.header_ { 15444 reqHeaders[k] = v 15445 } 15446 reqHeaders.Set("User-Agent", c.s.userAgent()) 15447 if c.ifNoneMatch_ != "" { 15448 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15449 } 15450 var body io.Reader = nil 15451 c.urlParams_.Set("alt", alt) 15452 c.urlParams_.Set("prettyPrint", "false") 15453 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}") 15454 urls += "?" + c.urlParams_.Encode() 15455 req, err := http.NewRequest("GET", urls, body) 15456 if err != nil { 15457 return nil, err 15458 } 15459 req.Header = reqHeaders 15460 googleapi.Expand(req.URL, map[string]string{ 15461 "parent": c.parent, 15462 "dicomWebPath": c.dicomWebPath, 15463 }) 15464 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15465} 15466 15467// Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.searchForInstances" call. 15468func (c *ProjectsLocationsDatasetsDicomStoresStudiesSearchForInstancesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 15469 gensupport.SetOptions(c.urlParams_, opts...) 15470 return c.doRequest("") 15471 // { 15472 // "description": "SearchForInstances returns a list of matching instances. See [Search Transaction] (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.6). For details on the implementation of SearchForInstances, see [Search transaction](https://cloud.google.com/healthcare/docs/dicom#search_transaction) in the Cloud Healthcare API conformance statement. For samples that show how to call SearchForInstances, see [Searching for studies, series, instances, and frames](https://cloud.google.com/healthcare/docs/how-tos/dicomweb#searching_for_studies_series_instances_and_frames).", 15473 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/instances", 15474 // "httpMethod": "GET", 15475 // "id": "healthcare.projects.locations.datasets.dicomStores.studies.searchForInstances", 15476 // "parameterOrder": [ 15477 // "parent", 15478 // "dicomWebPath" 15479 // ], 15480 // "parameters": { 15481 // "dicomWebPath": { 15482 // "description": "The path of the SearchForInstancesRequest DICOMweb request. For example, `instances`, `series/{series_uid}/instances`, or `studies/{study_uid}/instances`.", 15483 // "location": "path", 15484 // "pattern": "^studies/[^/]+/instances$", 15485 // "required": true, 15486 // "type": "string" 15487 // }, 15488 // "parent": { 15489 // "description": "The name of the DICOM store that is being accessed. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`.", 15490 // "location": "path", 15491 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 15492 // "required": true, 15493 // "type": "string" 15494 // } 15495 // }, 15496 // "path": "v1/{+parent}/dicomWeb/{+dicomWebPath}", 15497 // "response": { 15498 // "$ref": "HttpBody" 15499 // }, 15500 // "scopes": [ 15501 // "https://www.googleapis.com/auth/cloud-platform" 15502 // ] 15503 // } 15504 15505} 15506 15507// method id "healthcare.projects.locations.datasets.dicomStores.studies.searchForSeries": 15508 15509type ProjectsLocationsDatasetsDicomStoresStudiesSearchForSeriesCall struct { 15510 s *Service 15511 parent string 15512 dicomWebPath string 15513 urlParams_ gensupport.URLParams 15514 ifNoneMatch_ string 15515 ctx_ context.Context 15516 header_ http.Header 15517} 15518 15519// SearchForSeries: SearchForSeries returns a list of matching series. 15520// See [Search Transaction] 15521// (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.6). 15522// For details on the implementation of SearchForSeries, see Search 15523// transaction 15524// (https://cloud.google.com/healthcare/docs/dicom#search_transaction) 15525// in the Cloud Healthcare API conformance statement. For samples that 15526// show how to call SearchForSeries, see Searching for studies, series, 15527// instances, and frames 15528// (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#searching_for_studies_series_instances_and_frames). 15529// 15530// - dicomWebPath: The path of the SearchForSeries DICOMweb request. For 15531// example, `series` or `studies/{study_uid}/series`. 15532// - parent: The name of the DICOM store that is being accessed. For 15533// example, 15534// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 15535// /dicomStores/{dicom_store_id}`. 15536func (r *ProjectsLocationsDatasetsDicomStoresStudiesService) SearchForSeries(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSearchForSeriesCall { 15537 c := &ProjectsLocationsDatasetsDicomStoresStudiesSearchForSeriesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15538 c.parent = parent 15539 c.dicomWebPath = dicomWebPath 15540 return c 15541} 15542 15543// Fields allows partial responses to be retrieved. See 15544// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15545// for more information. 15546func (c *ProjectsLocationsDatasetsDicomStoresStudiesSearchForSeriesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSearchForSeriesCall { 15547 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15548 return c 15549} 15550 15551// IfNoneMatch sets the optional parameter which makes the operation 15552// fail if the object's ETag matches the given value. This is useful for 15553// getting updates only after the object has changed since the last 15554// request. Use googleapi.IsNotModified to check whether the response 15555// error from Do is the result of In-None-Match. 15556func (c *ProjectsLocationsDatasetsDicomStoresStudiesSearchForSeriesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesSearchForSeriesCall { 15557 c.ifNoneMatch_ = entityTag 15558 return c 15559} 15560 15561// Context sets the context to be used in this call's Do method. Any 15562// pending HTTP request will be aborted if the provided context is 15563// canceled. 15564func (c *ProjectsLocationsDatasetsDicomStoresStudiesSearchForSeriesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSearchForSeriesCall { 15565 c.ctx_ = ctx 15566 return c 15567} 15568 15569// Header returns an http.Header that can be modified by the caller to 15570// add HTTP headers to the request. 15571func (c *ProjectsLocationsDatasetsDicomStoresStudiesSearchForSeriesCall) Header() http.Header { 15572 if c.header_ == nil { 15573 c.header_ = make(http.Header) 15574 } 15575 return c.header_ 15576} 15577 15578func (c *ProjectsLocationsDatasetsDicomStoresStudiesSearchForSeriesCall) doRequest(alt string) (*http.Response, error) { 15579 reqHeaders := make(http.Header) 15580 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 15581 for k, v := range c.header_ { 15582 reqHeaders[k] = v 15583 } 15584 reqHeaders.Set("User-Agent", c.s.userAgent()) 15585 if c.ifNoneMatch_ != "" { 15586 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15587 } 15588 var body io.Reader = nil 15589 c.urlParams_.Set("alt", alt) 15590 c.urlParams_.Set("prettyPrint", "false") 15591 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}") 15592 urls += "?" + c.urlParams_.Encode() 15593 req, err := http.NewRequest("GET", urls, body) 15594 if err != nil { 15595 return nil, err 15596 } 15597 req.Header = reqHeaders 15598 googleapi.Expand(req.URL, map[string]string{ 15599 "parent": c.parent, 15600 "dicomWebPath": c.dicomWebPath, 15601 }) 15602 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15603} 15604 15605// Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.searchForSeries" call. 15606func (c *ProjectsLocationsDatasetsDicomStoresStudiesSearchForSeriesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 15607 gensupport.SetOptions(c.urlParams_, opts...) 15608 return c.doRequest("") 15609 // { 15610 // "description": "SearchForSeries returns a list of matching series. See [Search Transaction] (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.6). For details on the implementation of SearchForSeries, see [Search transaction](https://cloud.google.com/healthcare/docs/dicom#search_transaction) in the Cloud Healthcare API conformance statement. For samples that show how to call SearchForSeries, see [Searching for studies, series, instances, and frames](https://cloud.google.com/healthcare/docs/how-tos/dicomweb#searching_for_studies_series_instances_and_frames).", 15611 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series", 15612 // "httpMethod": "GET", 15613 // "id": "healthcare.projects.locations.datasets.dicomStores.studies.searchForSeries", 15614 // "parameterOrder": [ 15615 // "parent", 15616 // "dicomWebPath" 15617 // ], 15618 // "parameters": { 15619 // "dicomWebPath": { 15620 // "description": "The path of the SearchForSeries DICOMweb request. For example, `series` or `studies/{study_uid}/series`.", 15621 // "location": "path", 15622 // "pattern": "^studies/[^/]+/series$", 15623 // "required": true, 15624 // "type": "string" 15625 // }, 15626 // "parent": { 15627 // "description": "The name of the DICOM store that is being accessed. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`.", 15628 // "location": "path", 15629 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 15630 // "required": true, 15631 // "type": "string" 15632 // } 15633 // }, 15634 // "path": "v1/{+parent}/dicomWeb/{+dicomWebPath}", 15635 // "response": { 15636 // "$ref": "HttpBody" 15637 // }, 15638 // "scopes": [ 15639 // "https://www.googleapis.com/auth/cloud-platform" 15640 // ] 15641 // } 15642 15643} 15644 15645// method id "healthcare.projects.locations.datasets.dicomStores.studies.storeInstances": 15646 15647type ProjectsLocationsDatasetsDicomStoresStudiesStoreInstancesCall struct { 15648 s *Service 15649 parent string 15650 dicomWebPath string 15651 body_ io.Reader 15652 urlParams_ gensupport.URLParams 15653 ctx_ context.Context 15654 header_ http.Header 15655} 15656 15657// StoreInstances: StoreInstances stores DICOM instances associated with 15658// study instance unique identifiers (SUID). See [Store Transaction] 15659// (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.5). 15660// For details on the implementation of StoreInstances, see Store 15661// transaction 15662// (https://cloud.google.com/healthcare/docs/dicom#store_transaction) in 15663// the Cloud Healthcare API conformance statement. For samples that show 15664// how to call StoreInstances, see Storing DICOM data 15665// (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#storing_dicom_data). 15666// 15667// - dicomWebPath: The path of the StoreInstances DICOMweb request. For 15668// example, `studies/[{study_uid}]`. Note that the `study_uid` is 15669// optional. 15670// - parent: The name of the DICOM store that is being accessed. For 15671// example, 15672// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 15673// /dicomStores/{dicom_store_id}`. 15674func (r *ProjectsLocationsDatasetsDicomStoresStudiesService) StoreInstances(parent string, dicomWebPath string, body_ io.Reader) *ProjectsLocationsDatasetsDicomStoresStudiesStoreInstancesCall { 15675 c := &ProjectsLocationsDatasetsDicomStoresStudiesStoreInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15676 c.parent = parent 15677 c.dicomWebPath = dicomWebPath 15678 c.body_ = body_ 15679 return c 15680} 15681 15682// Fields allows partial responses to be retrieved. See 15683// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15684// for more information. 15685func (c *ProjectsLocationsDatasetsDicomStoresStudiesStoreInstancesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesStoreInstancesCall { 15686 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15687 return c 15688} 15689 15690// Context sets the context to be used in this call's Do method. Any 15691// pending HTTP request will be aborted if the provided context is 15692// canceled. 15693func (c *ProjectsLocationsDatasetsDicomStoresStudiesStoreInstancesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesStoreInstancesCall { 15694 c.ctx_ = ctx 15695 return c 15696} 15697 15698// Header returns an http.Header that can be modified by the caller to 15699// add HTTP headers to the request. 15700func (c *ProjectsLocationsDatasetsDicomStoresStudiesStoreInstancesCall) Header() http.Header { 15701 if c.header_ == nil { 15702 c.header_ = make(http.Header) 15703 } 15704 return c.header_ 15705} 15706 15707func (c *ProjectsLocationsDatasetsDicomStoresStudiesStoreInstancesCall) doRequest(alt string) (*http.Response, error) { 15708 reqHeaders := make(http.Header) 15709 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 15710 for k, v := range c.header_ { 15711 reqHeaders[k] = v 15712 } 15713 reqHeaders.Set("User-Agent", c.s.userAgent()) 15714 var body io.Reader = nil 15715 body = c.body_ 15716 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}") 15717 urls += "?" + c.urlParams_.Encode() 15718 req, err := http.NewRequest("POST", urls, body) 15719 if err != nil { 15720 return nil, err 15721 } 15722 req.Header = reqHeaders 15723 googleapi.Expand(req.URL, map[string]string{ 15724 "parent": c.parent, 15725 "dicomWebPath": c.dicomWebPath, 15726 }) 15727 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15728} 15729 15730// Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.storeInstances" call. 15731func (c *ProjectsLocationsDatasetsDicomStoresStudiesStoreInstancesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 15732 gensupport.SetOptions(c.urlParams_, opts...) 15733 return c.doRequest("") 15734 // { 15735 // "description": "StoreInstances stores DICOM instances associated with study instance unique identifiers (SUID). See [Store Transaction] (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.5). For details on the implementation of StoreInstances, see [Store transaction](https://cloud.google.com/healthcare/docs/dicom#store_transaction) in the Cloud Healthcare API conformance statement. For samples that show how to call StoreInstances, see [Storing DICOM data](https://cloud.google.com/healthcare/docs/how-tos/dicomweb#storing_dicom_data).", 15736 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}", 15737 // "httpMethod": "POST", 15738 // "id": "healthcare.projects.locations.datasets.dicomStores.studies.storeInstances", 15739 // "parameterOrder": [ 15740 // "parent", 15741 // "dicomWebPath" 15742 // ], 15743 // "parameters": { 15744 // "dicomWebPath": { 15745 // "description": "The path of the StoreInstances DICOMweb request. For example, `studies/[{study_uid}]`. Note that the `study_uid` is optional.", 15746 // "location": "path", 15747 // "pattern": "^studies/[^/]+$", 15748 // "required": true, 15749 // "type": "string" 15750 // }, 15751 // "parent": { 15752 // "description": "The name of the DICOM store that is being accessed. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`.", 15753 // "location": "path", 15754 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 15755 // "required": true, 15756 // "type": "string" 15757 // } 15758 // }, 15759 // "path": "v1/{+parent}/dicomWeb/{+dicomWebPath}", 15760 // "request": { 15761 // "$ref": "HttpBody" 15762 // }, 15763 // "response": { 15764 // "$ref": "HttpBody" 15765 // }, 15766 // "scopes": [ 15767 // "https://www.googleapis.com/auth/cloud-platform" 15768 // ] 15769 // } 15770 15771} 15772 15773// method id "healthcare.projects.locations.datasets.dicomStores.studies.series.delete": 15774 15775type ProjectsLocationsDatasetsDicomStoresStudiesSeriesDeleteCall struct { 15776 s *Service 15777 parent string 15778 dicomWebPath string 15779 urlParams_ gensupport.URLParams 15780 ctx_ context.Context 15781 header_ http.Header 15782} 15783 15784// Delete: DeleteSeries deletes all instances within the given study and 15785// series. Delete requests are equivalent to the GET requests specified 15786// in the Retrieve transaction. The method returns an Operation which 15787// will be marked successful when the deletion is complete. Warning: 15788// Instances cannot be inserted into a series that is being deleted by 15789// an operation until the operation completes. For samples that show how 15790// to call DeleteSeries, see Deleting a study, series, or instance 15791// (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#deleting_a_study_series_or_instance). 15792// 15793// - dicomWebPath: The path of the DeleteSeries request. For example, 15794// `studies/{study_uid}/series/{series_uid}`. 15795// - parent: The name of the DICOM store that is being accessed. For 15796// example, 15797// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 15798// /dicomStores/{dicom_store_id}`. 15799func (r *ProjectsLocationsDatasetsDicomStoresStudiesSeriesService) Delete(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesDeleteCall { 15800 c := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15801 c.parent = parent 15802 c.dicomWebPath = dicomWebPath 15803 return c 15804} 15805 15806// Fields allows partial responses to be retrieved. See 15807// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15808// for more information. 15809func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesDeleteCall { 15810 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15811 return c 15812} 15813 15814// Context sets the context to be used in this call's Do method. Any 15815// pending HTTP request will be aborted if the provided context is 15816// canceled. 15817func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesDeleteCall { 15818 c.ctx_ = ctx 15819 return c 15820} 15821 15822// Header returns an http.Header that can be modified by the caller to 15823// add HTTP headers to the request. 15824func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesDeleteCall) Header() http.Header { 15825 if c.header_ == nil { 15826 c.header_ = make(http.Header) 15827 } 15828 return c.header_ 15829} 15830 15831func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesDeleteCall) doRequest(alt string) (*http.Response, error) { 15832 reqHeaders := make(http.Header) 15833 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 15834 for k, v := range c.header_ { 15835 reqHeaders[k] = v 15836 } 15837 reqHeaders.Set("User-Agent", c.s.userAgent()) 15838 var body io.Reader = nil 15839 c.urlParams_.Set("alt", alt) 15840 c.urlParams_.Set("prettyPrint", "false") 15841 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}") 15842 urls += "?" + c.urlParams_.Encode() 15843 req, err := http.NewRequest("DELETE", urls, body) 15844 if err != nil { 15845 return nil, err 15846 } 15847 req.Header = reqHeaders 15848 googleapi.Expand(req.URL, map[string]string{ 15849 "parent": c.parent, 15850 "dicomWebPath": c.dicomWebPath, 15851 }) 15852 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15853} 15854 15855// Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.series.delete" call. 15856// Exactly one of *Operation or error will be non-nil. Any non-2xx 15857// status code is an error. Response headers are in either 15858// *Operation.ServerResponse.Header or (if a response was returned at 15859// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 15860// to check whether the returned error was because 15861// http.StatusNotModified was returned. 15862func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 15863 gensupport.SetOptions(c.urlParams_, opts...) 15864 res, err := c.doRequest("json") 15865 if res != nil && res.StatusCode == http.StatusNotModified { 15866 if res.Body != nil { 15867 res.Body.Close() 15868 } 15869 return nil, &googleapi.Error{ 15870 Code: res.StatusCode, 15871 Header: res.Header, 15872 } 15873 } 15874 if err != nil { 15875 return nil, err 15876 } 15877 defer googleapi.CloseBody(res) 15878 if err := googleapi.CheckResponse(res); err != nil { 15879 return nil, err 15880 } 15881 ret := &Operation{ 15882 ServerResponse: googleapi.ServerResponse{ 15883 Header: res.Header, 15884 HTTPStatusCode: res.StatusCode, 15885 }, 15886 } 15887 target := &ret 15888 if err := gensupport.DecodeResponse(target, res); err != nil { 15889 return nil, err 15890 } 15891 return ret, nil 15892 // { 15893 // "description": "DeleteSeries deletes all instances within the given study and series. Delete requests are equivalent to the GET requests specified in the Retrieve transaction. The method returns an Operation which will be marked successful when the deletion is complete. Warning: Instances cannot be inserted into a series that is being deleted by an operation until the operation completes. For samples that show how to call DeleteSeries, see [Deleting a study, series, or instance](https://cloud.google.com/healthcare/docs/how-tos/dicomweb#deleting_a_study_series_or_instance).", 15894 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series/{seriesId}", 15895 // "httpMethod": "DELETE", 15896 // "id": "healthcare.projects.locations.datasets.dicomStores.studies.series.delete", 15897 // "parameterOrder": [ 15898 // "parent", 15899 // "dicomWebPath" 15900 // ], 15901 // "parameters": { 15902 // "dicomWebPath": { 15903 // "description": "The path of the DeleteSeries request. For example, `studies/{study_uid}/series/{series_uid}`.", 15904 // "location": "path", 15905 // "pattern": "^studies/[^/]+/series/[^/]+$", 15906 // "required": true, 15907 // "type": "string" 15908 // }, 15909 // "parent": { 15910 // "description": "The name of the DICOM store that is being accessed. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`.", 15911 // "location": "path", 15912 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 15913 // "required": true, 15914 // "type": "string" 15915 // } 15916 // }, 15917 // "path": "v1/{+parent}/dicomWeb/{+dicomWebPath}", 15918 // "response": { 15919 // "$ref": "Operation" 15920 // }, 15921 // "scopes": [ 15922 // "https://www.googleapis.com/auth/cloud-platform" 15923 // ] 15924 // } 15925 15926} 15927 15928// method id "healthcare.projects.locations.datasets.dicomStores.studies.series.retrieveMetadata": 15929 15930type ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall struct { 15931 s *Service 15932 parent string 15933 dicomWebPath string 15934 urlParams_ gensupport.URLParams 15935 ifNoneMatch_ string 15936 ctx_ context.Context 15937 header_ http.Header 15938} 15939 15940// RetrieveMetadata: RetrieveSeriesMetadata returns instance associated 15941// with the given study and series, presented as metadata with the bulk 15942// data removed. See [RetrieveTransaction] 15943// (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). 15944// For details on the implementation of RetrieveSeriesMetadata, see 15945// Metadata resources 15946// (https://cloud.google.com/healthcare/docs/dicom#metadata_resources) 15947// in the Cloud Healthcare API conformance statement. For samples that 15948// show how to call RetrieveSeriesMetadata, see Retrieving metadata 15949// (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieving_metadata). 15950// 15951// - dicomWebPath: The path of the RetrieveSeriesMetadata DICOMweb 15952// request. For example, 15953// `studies/{study_uid}/series/{series_uid}/metadata`. 15954// - parent: The name of the DICOM store that is being accessed. For 15955// example, 15956// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 15957// /dicomStores/{dicom_store_id}`. 15958func (r *ProjectsLocationsDatasetsDicomStoresStudiesSeriesService) RetrieveMetadata(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall { 15959 c := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15960 c.parent = parent 15961 c.dicomWebPath = dicomWebPath 15962 return c 15963} 15964 15965// Fields allows partial responses to be retrieved. See 15966// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15967// for more information. 15968func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall { 15969 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15970 return c 15971} 15972 15973// IfNoneMatch sets the optional parameter which makes the operation 15974// fail if the object's ETag matches the given value. This is useful for 15975// getting updates only after the object has changed since the last 15976// request. Use googleapi.IsNotModified to check whether the response 15977// error from Do is the result of In-None-Match. 15978func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall { 15979 c.ifNoneMatch_ = entityTag 15980 return c 15981} 15982 15983// Context sets the context to be used in this call's Do method. Any 15984// pending HTTP request will be aborted if the provided context is 15985// canceled. 15986func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall { 15987 c.ctx_ = ctx 15988 return c 15989} 15990 15991// Header returns an http.Header that can be modified by the caller to 15992// add HTTP headers to the request. 15993func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall) Header() http.Header { 15994 if c.header_ == nil { 15995 c.header_ = make(http.Header) 15996 } 15997 return c.header_ 15998} 15999 16000func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall) doRequest(alt string) (*http.Response, error) { 16001 reqHeaders := make(http.Header) 16002 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 16003 for k, v := range c.header_ { 16004 reqHeaders[k] = v 16005 } 16006 reqHeaders.Set("User-Agent", c.s.userAgent()) 16007 if c.ifNoneMatch_ != "" { 16008 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16009 } 16010 var body io.Reader = nil 16011 c.urlParams_.Set("alt", alt) 16012 c.urlParams_.Set("prettyPrint", "false") 16013 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}") 16014 urls += "?" + c.urlParams_.Encode() 16015 req, err := http.NewRequest("GET", urls, body) 16016 if err != nil { 16017 return nil, err 16018 } 16019 req.Header = reqHeaders 16020 googleapi.Expand(req.URL, map[string]string{ 16021 "parent": c.parent, 16022 "dicomWebPath": c.dicomWebPath, 16023 }) 16024 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16025} 16026 16027// Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.series.retrieveMetadata" call. 16028func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 16029 gensupport.SetOptions(c.urlParams_, opts...) 16030 return c.doRequest("") 16031 // { 16032 // "description": "RetrieveSeriesMetadata returns instance associated with the given study and series, presented as metadata with the bulk data removed. See [RetrieveTransaction] (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). For details on the implementation of RetrieveSeriesMetadata, see [Metadata resources](https://cloud.google.com/healthcare/docs/dicom#metadata_resources) in the Cloud Healthcare API conformance statement. For samples that show how to call RetrieveSeriesMetadata, see [Retrieving metadata](https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieving_metadata).", 16033 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series/{seriesId}/metadata", 16034 // "httpMethod": "GET", 16035 // "id": "healthcare.projects.locations.datasets.dicomStores.studies.series.retrieveMetadata", 16036 // "parameterOrder": [ 16037 // "parent", 16038 // "dicomWebPath" 16039 // ], 16040 // "parameters": { 16041 // "dicomWebPath": { 16042 // "description": "The path of the RetrieveSeriesMetadata DICOMweb request. For example, `studies/{study_uid}/series/{series_uid}/metadata`.", 16043 // "location": "path", 16044 // "pattern": "^studies/[^/]+/series/[^/]+/metadata$", 16045 // "required": true, 16046 // "type": "string" 16047 // }, 16048 // "parent": { 16049 // "description": "The name of the DICOM store that is being accessed. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`.", 16050 // "location": "path", 16051 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 16052 // "required": true, 16053 // "type": "string" 16054 // } 16055 // }, 16056 // "path": "v1/{+parent}/dicomWeb/{+dicomWebPath}", 16057 // "response": { 16058 // "$ref": "HttpBody" 16059 // }, 16060 // "scopes": [ 16061 // "https://www.googleapis.com/auth/cloud-platform" 16062 // ] 16063 // } 16064 16065} 16066 16067// method id "healthcare.projects.locations.datasets.dicomStores.studies.series.retrieveSeries": 16068 16069type ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveSeriesCall struct { 16070 s *Service 16071 parent string 16072 dicomWebPath string 16073 urlParams_ gensupport.URLParams 16074 ifNoneMatch_ string 16075 ctx_ context.Context 16076 header_ http.Header 16077} 16078 16079// RetrieveSeries: RetrieveSeries returns all instances within the given 16080// study and series. See [RetrieveTransaction] 16081// (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). 16082// For details on the implementation of RetrieveSeries, see DICOM 16083// study/series/instances 16084// (https://cloud.google.com/healthcare/docs/dicom#dicom_studyseriesinstances) 16085// in the Cloud Healthcare API conformance statement. For samples that 16086// show how to call RetrieveSeries, see Retrieving DICOM data 16087// (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieving_dicom_data). 16088// 16089// - dicomWebPath: The path of the RetrieveSeries DICOMweb request. For 16090// example, `studies/{study_uid}/series/{series_uid}`. 16091// - parent: The name of the DICOM store that is being accessed. For 16092// example, 16093// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 16094// /dicomStores/{dicom_store_id}`. 16095func (r *ProjectsLocationsDatasetsDicomStoresStudiesSeriesService) RetrieveSeries(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveSeriesCall { 16096 c := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveSeriesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16097 c.parent = parent 16098 c.dicomWebPath = dicomWebPath 16099 return c 16100} 16101 16102// Fields allows partial responses to be retrieved. See 16103// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16104// for more information. 16105func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveSeriesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveSeriesCall { 16106 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16107 return c 16108} 16109 16110// IfNoneMatch sets the optional parameter which makes the operation 16111// fail if the object's ETag matches the given value. This is useful for 16112// getting updates only after the object has changed since the last 16113// request. Use googleapi.IsNotModified to check whether the response 16114// error from Do is the result of In-None-Match. 16115func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveSeriesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveSeriesCall { 16116 c.ifNoneMatch_ = entityTag 16117 return c 16118} 16119 16120// Context sets the context to be used in this call's Do method. Any 16121// pending HTTP request will be aborted if the provided context is 16122// canceled. 16123func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveSeriesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveSeriesCall { 16124 c.ctx_ = ctx 16125 return c 16126} 16127 16128// Header returns an http.Header that can be modified by the caller to 16129// add HTTP headers to the request. 16130func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveSeriesCall) Header() http.Header { 16131 if c.header_ == nil { 16132 c.header_ = make(http.Header) 16133 } 16134 return c.header_ 16135} 16136 16137func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveSeriesCall) doRequest(alt string) (*http.Response, error) { 16138 reqHeaders := make(http.Header) 16139 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 16140 for k, v := range c.header_ { 16141 reqHeaders[k] = v 16142 } 16143 reqHeaders.Set("User-Agent", c.s.userAgent()) 16144 if c.ifNoneMatch_ != "" { 16145 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16146 } 16147 var body io.Reader = nil 16148 c.urlParams_.Set("alt", alt) 16149 c.urlParams_.Set("prettyPrint", "false") 16150 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}") 16151 urls += "?" + c.urlParams_.Encode() 16152 req, err := http.NewRequest("GET", urls, body) 16153 if err != nil { 16154 return nil, err 16155 } 16156 req.Header = reqHeaders 16157 googleapi.Expand(req.URL, map[string]string{ 16158 "parent": c.parent, 16159 "dicomWebPath": c.dicomWebPath, 16160 }) 16161 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16162} 16163 16164// Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.series.retrieveSeries" call. 16165func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveSeriesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 16166 gensupport.SetOptions(c.urlParams_, opts...) 16167 return c.doRequest("") 16168 // { 16169 // "description": "RetrieveSeries returns all instances within the given study and series. See [RetrieveTransaction] (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). For details on the implementation of RetrieveSeries, see [DICOM study/series/instances](https://cloud.google.com/healthcare/docs/dicom#dicom_studyseriesinstances) in the Cloud Healthcare API conformance statement. For samples that show how to call RetrieveSeries, see [Retrieving DICOM data](https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieving_dicom_data).", 16170 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series/{seriesId}", 16171 // "httpMethod": "GET", 16172 // "id": "healthcare.projects.locations.datasets.dicomStores.studies.series.retrieveSeries", 16173 // "parameterOrder": [ 16174 // "parent", 16175 // "dicomWebPath" 16176 // ], 16177 // "parameters": { 16178 // "dicomWebPath": { 16179 // "description": "The path of the RetrieveSeries DICOMweb request. For example, `studies/{study_uid}/series/{series_uid}`.", 16180 // "location": "path", 16181 // "pattern": "^studies/[^/]+/series/[^/]+$", 16182 // "required": true, 16183 // "type": "string" 16184 // }, 16185 // "parent": { 16186 // "description": "The name of the DICOM store that is being accessed. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`.", 16187 // "location": "path", 16188 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 16189 // "required": true, 16190 // "type": "string" 16191 // } 16192 // }, 16193 // "path": "v1/{+parent}/dicomWeb/{+dicomWebPath}", 16194 // "response": { 16195 // "$ref": "HttpBody" 16196 // }, 16197 // "scopes": [ 16198 // "https://www.googleapis.com/auth/cloud-platform" 16199 // ] 16200 // } 16201 16202} 16203 16204// method id "healthcare.projects.locations.datasets.dicomStores.studies.series.searchForInstances": 16205 16206type ProjectsLocationsDatasetsDicomStoresStudiesSeriesSearchForInstancesCall struct { 16207 s *Service 16208 parent string 16209 dicomWebPath string 16210 urlParams_ gensupport.URLParams 16211 ifNoneMatch_ string 16212 ctx_ context.Context 16213 header_ http.Header 16214} 16215 16216// SearchForInstances: SearchForInstances returns a list of matching 16217// instances. See [Search Transaction] 16218// (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.6). 16219// For details on the implementation of SearchForInstances, see Search 16220// transaction 16221// (https://cloud.google.com/healthcare/docs/dicom#search_transaction) 16222// in the Cloud Healthcare API conformance statement. For samples that 16223// show how to call SearchForInstances, see Searching for studies, 16224// series, instances, and frames 16225// (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#searching_for_studies_series_instances_and_frames). 16226// 16227// - dicomWebPath: The path of the SearchForInstancesRequest DICOMweb 16228// request. For example, `instances`, `series/{series_uid}/instances`, 16229// or `studies/{study_uid}/instances`. 16230// - parent: The name of the DICOM store that is being accessed. For 16231// example, 16232// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 16233// /dicomStores/{dicom_store_id}`. 16234func (r *ProjectsLocationsDatasetsDicomStoresStudiesSeriesService) SearchForInstances(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesSearchForInstancesCall { 16235 c := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesSearchForInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16236 c.parent = parent 16237 c.dicomWebPath = dicomWebPath 16238 return c 16239} 16240 16241// Fields allows partial responses to be retrieved. See 16242// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16243// for more information. 16244func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesSearchForInstancesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesSearchForInstancesCall { 16245 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16246 return c 16247} 16248 16249// IfNoneMatch sets the optional parameter which makes the operation 16250// fail if the object's ETag matches the given value. This is useful for 16251// getting updates only after the object has changed since the last 16252// request. Use googleapi.IsNotModified to check whether the response 16253// error from Do is the result of In-None-Match. 16254func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesSearchForInstancesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesSearchForInstancesCall { 16255 c.ifNoneMatch_ = entityTag 16256 return c 16257} 16258 16259// Context sets the context to be used in this call's Do method. Any 16260// pending HTTP request will be aborted if the provided context is 16261// canceled. 16262func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesSearchForInstancesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesSearchForInstancesCall { 16263 c.ctx_ = ctx 16264 return c 16265} 16266 16267// Header returns an http.Header that can be modified by the caller to 16268// add HTTP headers to the request. 16269func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesSearchForInstancesCall) Header() http.Header { 16270 if c.header_ == nil { 16271 c.header_ = make(http.Header) 16272 } 16273 return c.header_ 16274} 16275 16276func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesSearchForInstancesCall) doRequest(alt string) (*http.Response, error) { 16277 reqHeaders := make(http.Header) 16278 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 16279 for k, v := range c.header_ { 16280 reqHeaders[k] = v 16281 } 16282 reqHeaders.Set("User-Agent", c.s.userAgent()) 16283 if c.ifNoneMatch_ != "" { 16284 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16285 } 16286 var body io.Reader = nil 16287 c.urlParams_.Set("alt", alt) 16288 c.urlParams_.Set("prettyPrint", "false") 16289 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}") 16290 urls += "?" + c.urlParams_.Encode() 16291 req, err := http.NewRequest("GET", urls, body) 16292 if err != nil { 16293 return nil, err 16294 } 16295 req.Header = reqHeaders 16296 googleapi.Expand(req.URL, map[string]string{ 16297 "parent": c.parent, 16298 "dicomWebPath": c.dicomWebPath, 16299 }) 16300 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16301} 16302 16303// Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.series.searchForInstances" call. 16304func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesSearchForInstancesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 16305 gensupport.SetOptions(c.urlParams_, opts...) 16306 return c.doRequest("") 16307 // { 16308 // "description": "SearchForInstances returns a list of matching instances. See [Search Transaction] (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.6). For details on the implementation of SearchForInstances, see [Search transaction](https://cloud.google.com/healthcare/docs/dicom#search_transaction) in the Cloud Healthcare API conformance statement. For samples that show how to call SearchForInstances, see [Searching for studies, series, instances, and frames](https://cloud.google.com/healthcare/docs/how-tos/dicomweb#searching_for_studies_series_instances_and_frames).", 16309 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series/{seriesId}/instances", 16310 // "httpMethod": "GET", 16311 // "id": "healthcare.projects.locations.datasets.dicomStores.studies.series.searchForInstances", 16312 // "parameterOrder": [ 16313 // "parent", 16314 // "dicomWebPath" 16315 // ], 16316 // "parameters": { 16317 // "dicomWebPath": { 16318 // "description": "The path of the SearchForInstancesRequest DICOMweb request. For example, `instances`, `series/{series_uid}/instances`, or `studies/{study_uid}/instances`.", 16319 // "location": "path", 16320 // "pattern": "^studies/[^/]+/series/[^/]+/instances$", 16321 // "required": true, 16322 // "type": "string" 16323 // }, 16324 // "parent": { 16325 // "description": "The name of the DICOM store that is being accessed. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`.", 16326 // "location": "path", 16327 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 16328 // "required": true, 16329 // "type": "string" 16330 // } 16331 // }, 16332 // "path": "v1/{+parent}/dicomWeb/{+dicomWebPath}", 16333 // "response": { 16334 // "$ref": "HttpBody" 16335 // }, 16336 // "scopes": [ 16337 // "https://www.googleapis.com/auth/cloud-platform" 16338 // ] 16339 // } 16340 16341} 16342 16343// method id "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.delete": 16344 16345type ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesDeleteCall struct { 16346 s *Service 16347 parent string 16348 dicomWebPath string 16349 urlParams_ gensupport.URLParams 16350 ctx_ context.Context 16351 header_ http.Header 16352} 16353 16354// Delete: DeleteInstance deletes an instance associated with the given 16355// study, series, and SOP Instance UID. Delete requests are equivalent 16356// to the GET requests specified in the Retrieve transaction. Study and 16357// series search results can take a few seconds to be updated after an 16358// instance is deleted using DeleteInstance. For samples that show how 16359// to call DeleteInstance, see Deleting a study, series, or instance 16360// (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#deleting_a_study_series_or_instance). 16361// 16362// - dicomWebPath: The path of the DeleteInstance request. For example, 16363// `studies/{study_uid}/series/{series_uid}/instances/{instance_uid}`. 16364// - parent: The name of the DICOM store that is being accessed. For 16365// example, 16366// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 16367// /dicomStores/{dicom_store_id}`. 16368func (r *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesService) Delete(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesDeleteCall { 16369 c := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16370 c.parent = parent 16371 c.dicomWebPath = dicomWebPath 16372 return c 16373} 16374 16375// Fields allows partial responses to be retrieved. See 16376// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16377// for more information. 16378func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesDeleteCall { 16379 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16380 return c 16381} 16382 16383// Context sets the context to be used in this call's Do method. Any 16384// pending HTTP request will be aborted if the provided context is 16385// canceled. 16386func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesDeleteCall { 16387 c.ctx_ = ctx 16388 return c 16389} 16390 16391// Header returns an http.Header that can be modified by the caller to 16392// add HTTP headers to the request. 16393func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesDeleteCall) Header() http.Header { 16394 if c.header_ == nil { 16395 c.header_ = make(http.Header) 16396 } 16397 return c.header_ 16398} 16399 16400func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesDeleteCall) doRequest(alt string) (*http.Response, error) { 16401 reqHeaders := make(http.Header) 16402 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 16403 for k, v := range c.header_ { 16404 reqHeaders[k] = v 16405 } 16406 reqHeaders.Set("User-Agent", c.s.userAgent()) 16407 var body io.Reader = nil 16408 c.urlParams_.Set("alt", alt) 16409 c.urlParams_.Set("prettyPrint", "false") 16410 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}") 16411 urls += "?" + c.urlParams_.Encode() 16412 req, err := http.NewRequest("DELETE", urls, body) 16413 if err != nil { 16414 return nil, err 16415 } 16416 req.Header = reqHeaders 16417 googleapi.Expand(req.URL, map[string]string{ 16418 "parent": c.parent, 16419 "dicomWebPath": c.dicomWebPath, 16420 }) 16421 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16422} 16423 16424// Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.delete" call. 16425// Exactly one of *Empty or error will be non-nil. Any non-2xx status 16426// code is an error. Response headers are in either 16427// *Empty.ServerResponse.Header or (if a response was returned at all) 16428// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 16429// check whether the returned error was because http.StatusNotModified 16430// was returned. 16431func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 16432 gensupport.SetOptions(c.urlParams_, opts...) 16433 res, err := c.doRequest("json") 16434 if res != nil && res.StatusCode == http.StatusNotModified { 16435 if res.Body != nil { 16436 res.Body.Close() 16437 } 16438 return nil, &googleapi.Error{ 16439 Code: res.StatusCode, 16440 Header: res.Header, 16441 } 16442 } 16443 if err != nil { 16444 return nil, err 16445 } 16446 defer googleapi.CloseBody(res) 16447 if err := googleapi.CheckResponse(res); err != nil { 16448 return nil, err 16449 } 16450 ret := &Empty{ 16451 ServerResponse: googleapi.ServerResponse{ 16452 Header: res.Header, 16453 HTTPStatusCode: res.StatusCode, 16454 }, 16455 } 16456 target := &ret 16457 if err := gensupport.DecodeResponse(target, res); err != nil { 16458 return nil, err 16459 } 16460 return ret, nil 16461 // { 16462 // "description": "DeleteInstance deletes an instance associated with the given study, series, and SOP Instance UID. Delete requests are equivalent to the GET requests specified in the Retrieve transaction. Study and series search results can take a few seconds to be updated after an instance is deleted using DeleteInstance. For samples that show how to call DeleteInstance, see [Deleting a study, series, or instance](https://cloud.google.com/healthcare/docs/how-tos/dicomweb#deleting_a_study_series_or_instance).", 16463 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series/{seriesId}/instances/{instancesId}", 16464 // "httpMethod": "DELETE", 16465 // "id": "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.delete", 16466 // "parameterOrder": [ 16467 // "parent", 16468 // "dicomWebPath" 16469 // ], 16470 // "parameters": { 16471 // "dicomWebPath": { 16472 // "description": "The path of the DeleteInstance request. For example, `studies/{study_uid}/series/{series_uid}/instances/{instance_uid}`.", 16473 // "location": "path", 16474 // "pattern": "^studies/[^/]+/series/[^/]+/instances/[^/]+$", 16475 // "required": true, 16476 // "type": "string" 16477 // }, 16478 // "parent": { 16479 // "description": "The name of the DICOM store that is being accessed. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`.", 16480 // "location": "path", 16481 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 16482 // "required": true, 16483 // "type": "string" 16484 // } 16485 // }, 16486 // "path": "v1/{+parent}/dicomWeb/{+dicomWebPath}", 16487 // "response": { 16488 // "$ref": "Empty" 16489 // }, 16490 // "scopes": [ 16491 // "https://www.googleapis.com/auth/cloud-platform" 16492 // ] 16493 // } 16494 16495} 16496 16497// method id "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.retrieveInstance": 16498 16499type ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveInstanceCall struct { 16500 s *Service 16501 parent string 16502 dicomWebPath string 16503 urlParams_ gensupport.URLParams 16504 ifNoneMatch_ string 16505 ctx_ context.Context 16506 header_ http.Header 16507} 16508 16509// RetrieveInstance: RetrieveInstance returns instance associated with 16510// the given study, series, and SOP Instance UID. See 16511// [RetrieveTransaction] 16512// (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). 16513// For details on the implementation of RetrieveInstance, see DICOM 16514// study/series/instances 16515// (https://cloud.google.com/healthcare/docs/dicom#dicom_studyseriesinstances) 16516// and DICOM instances 16517// (https://cloud.google.com/healthcare/docs/dicom#dicom_instances) in 16518// the Cloud Healthcare API conformance statement. For samples that show 16519// how to call RetrieveInstance, see Retrieving an instance 16520// (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieving_an_instance). 16521// 16522// - dicomWebPath: The path of the RetrieveInstance DICOMweb request. 16523// For example, 16524// `studies/{study_uid}/series/{series_uid}/instances/{instance_uid}`. 16525// - parent: The name of the DICOM store that is being accessed. For 16526// example, 16527// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 16528// /dicomStores/{dicom_store_id}`. 16529func (r *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesService) RetrieveInstance(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveInstanceCall { 16530 c := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16531 c.parent = parent 16532 c.dicomWebPath = dicomWebPath 16533 return c 16534} 16535 16536// Fields allows partial responses to be retrieved. See 16537// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16538// for more information. 16539func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveInstanceCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveInstanceCall { 16540 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16541 return c 16542} 16543 16544// IfNoneMatch sets the optional parameter which makes the operation 16545// fail if the object's ETag matches the given value. This is useful for 16546// getting updates only after the object has changed since the last 16547// request. Use googleapi.IsNotModified to check whether the response 16548// error from Do is the result of In-None-Match. 16549func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveInstanceCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveInstanceCall { 16550 c.ifNoneMatch_ = entityTag 16551 return c 16552} 16553 16554// Context sets the context to be used in this call's Do method. Any 16555// pending HTTP request will be aborted if the provided context is 16556// canceled. 16557func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveInstanceCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveInstanceCall { 16558 c.ctx_ = ctx 16559 return c 16560} 16561 16562// Header returns an http.Header that can be modified by the caller to 16563// add HTTP headers to the request. 16564func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveInstanceCall) Header() http.Header { 16565 if c.header_ == nil { 16566 c.header_ = make(http.Header) 16567 } 16568 return c.header_ 16569} 16570 16571func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveInstanceCall) doRequest(alt string) (*http.Response, error) { 16572 reqHeaders := make(http.Header) 16573 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 16574 for k, v := range c.header_ { 16575 reqHeaders[k] = v 16576 } 16577 reqHeaders.Set("User-Agent", c.s.userAgent()) 16578 if c.ifNoneMatch_ != "" { 16579 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16580 } 16581 var body io.Reader = nil 16582 c.urlParams_.Set("alt", alt) 16583 c.urlParams_.Set("prettyPrint", "false") 16584 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}") 16585 urls += "?" + c.urlParams_.Encode() 16586 req, err := http.NewRequest("GET", urls, body) 16587 if err != nil { 16588 return nil, err 16589 } 16590 req.Header = reqHeaders 16591 googleapi.Expand(req.URL, map[string]string{ 16592 "parent": c.parent, 16593 "dicomWebPath": c.dicomWebPath, 16594 }) 16595 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16596} 16597 16598// Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.retrieveInstance" call. 16599func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveInstanceCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 16600 gensupport.SetOptions(c.urlParams_, opts...) 16601 return c.doRequest("") 16602 // { 16603 // "description": "RetrieveInstance returns instance associated with the given study, series, and SOP Instance UID. See [RetrieveTransaction] (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). For details on the implementation of RetrieveInstance, see [DICOM study/series/instances](https://cloud.google.com/healthcare/docs/dicom#dicom_studyseriesinstances) and [DICOM instances](https://cloud.google.com/healthcare/docs/dicom#dicom_instances) in the Cloud Healthcare API conformance statement. For samples that show how to call RetrieveInstance, see [Retrieving an instance](https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieving_an_instance).", 16604 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series/{seriesId}/instances/{instancesId}", 16605 // "httpMethod": "GET", 16606 // "id": "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.retrieveInstance", 16607 // "parameterOrder": [ 16608 // "parent", 16609 // "dicomWebPath" 16610 // ], 16611 // "parameters": { 16612 // "dicomWebPath": { 16613 // "description": "The path of the RetrieveInstance DICOMweb request. For example, `studies/{study_uid}/series/{series_uid}/instances/{instance_uid}`.", 16614 // "location": "path", 16615 // "pattern": "^studies/[^/]+/series/[^/]+/instances/[^/]+$", 16616 // "required": true, 16617 // "type": "string" 16618 // }, 16619 // "parent": { 16620 // "description": "The name of the DICOM store that is being accessed. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`.", 16621 // "location": "path", 16622 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 16623 // "required": true, 16624 // "type": "string" 16625 // } 16626 // }, 16627 // "path": "v1/{+parent}/dicomWeb/{+dicomWebPath}", 16628 // "response": { 16629 // "$ref": "HttpBody" 16630 // }, 16631 // "scopes": [ 16632 // "https://www.googleapis.com/auth/cloud-platform" 16633 // ] 16634 // } 16635 16636} 16637 16638// method id "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.retrieveMetadata": 16639 16640type ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataCall struct { 16641 s *Service 16642 parent string 16643 dicomWebPath string 16644 urlParams_ gensupport.URLParams 16645 ifNoneMatch_ string 16646 ctx_ context.Context 16647 header_ http.Header 16648} 16649 16650// RetrieveMetadata: RetrieveInstanceMetadata returns instance 16651// associated with the given study, series, and SOP Instance UID 16652// presented as metadata with the bulk data removed. See 16653// [RetrieveTransaction] 16654// (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). 16655// For details on the implementation of RetrieveInstanceMetadata, see 16656// Metadata resources 16657// (https://cloud.google.com/healthcare/docs/dicom#metadata_resources) 16658// in the Cloud Healthcare API conformance statement. For samples that 16659// show how to call RetrieveInstanceMetadata, see Retrieving metadata 16660// (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieving_metadata). 16661// 16662// - dicomWebPath: The path of the RetrieveInstanceMetadata DICOMweb 16663// request. For example, 16664// `studies/{study_uid}/series/{series_uid}/instances/{instance_uid}/me 16665// tadata`. 16666// - parent: The name of the DICOM store that is being accessed. For 16667// example, 16668// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 16669// /dicomStores/{dicom_store_id}`. 16670func (r *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesService) RetrieveMetadata(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataCall { 16671 c := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16672 c.parent = parent 16673 c.dicomWebPath = dicomWebPath 16674 return c 16675} 16676 16677// Fields allows partial responses to be retrieved. See 16678// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16679// for more information. 16680func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataCall { 16681 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16682 return c 16683} 16684 16685// IfNoneMatch sets the optional parameter which makes the operation 16686// fail if the object's ETag matches the given value. This is useful for 16687// getting updates only after the object has changed since the last 16688// request. Use googleapi.IsNotModified to check whether the response 16689// error from Do is the result of In-None-Match. 16690func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataCall { 16691 c.ifNoneMatch_ = entityTag 16692 return c 16693} 16694 16695// Context sets the context to be used in this call's Do method. Any 16696// pending HTTP request will be aborted if the provided context is 16697// canceled. 16698func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataCall { 16699 c.ctx_ = ctx 16700 return c 16701} 16702 16703// Header returns an http.Header that can be modified by the caller to 16704// add HTTP headers to the request. 16705func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataCall) Header() http.Header { 16706 if c.header_ == nil { 16707 c.header_ = make(http.Header) 16708 } 16709 return c.header_ 16710} 16711 16712func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataCall) doRequest(alt string) (*http.Response, error) { 16713 reqHeaders := make(http.Header) 16714 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 16715 for k, v := range c.header_ { 16716 reqHeaders[k] = v 16717 } 16718 reqHeaders.Set("User-Agent", c.s.userAgent()) 16719 if c.ifNoneMatch_ != "" { 16720 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16721 } 16722 var body io.Reader = nil 16723 c.urlParams_.Set("alt", alt) 16724 c.urlParams_.Set("prettyPrint", "false") 16725 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}") 16726 urls += "?" + c.urlParams_.Encode() 16727 req, err := http.NewRequest("GET", urls, body) 16728 if err != nil { 16729 return nil, err 16730 } 16731 req.Header = reqHeaders 16732 googleapi.Expand(req.URL, map[string]string{ 16733 "parent": c.parent, 16734 "dicomWebPath": c.dicomWebPath, 16735 }) 16736 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16737} 16738 16739// Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.retrieveMetadata" call. 16740func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 16741 gensupport.SetOptions(c.urlParams_, opts...) 16742 return c.doRequest("") 16743 // { 16744 // "description": "RetrieveInstanceMetadata returns instance associated with the given study, series, and SOP Instance UID presented as metadata with the bulk data removed. See [RetrieveTransaction] (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). For details on the implementation of RetrieveInstanceMetadata, see [Metadata resources](https://cloud.google.com/healthcare/docs/dicom#metadata_resources) in the Cloud Healthcare API conformance statement. For samples that show how to call RetrieveInstanceMetadata, see [Retrieving metadata](https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieving_metadata).", 16745 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series/{seriesId}/instances/{instancesId}/metadata", 16746 // "httpMethod": "GET", 16747 // "id": "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.retrieveMetadata", 16748 // "parameterOrder": [ 16749 // "parent", 16750 // "dicomWebPath" 16751 // ], 16752 // "parameters": { 16753 // "dicomWebPath": { 16754 // "description": "The path of the RetrieveInstanceMetadata DICOMweb request. For example, `studies/{study_uid}/series/{series_uid}/instances/{instance_uid}/metadata`.", 16755 // "location": "path", 16756 // "pattern": "^studies/[^/]+/series/[^/]+/instances/[^/]+/metadata$", 16757 // "required": true, 16758 // "type": "string" 16759 // }, 16760 // "parent": { 16761 // "description": "The name of the DICOM store that is being accessed. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`.", 16762 // "location": "path", 16763 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 16764 // "required": true, 16765 // "type": "string" 16766 // } 16767 // }, 16768 // "path": "v1/{+parent}/dicomWeb/{+dicomWebPath}", 16769 // "response": { 16770 // "$ref": "HttpBody" 16771 // }, 16772 // "scopes": [ 16773 // "https://www.googleapis.com/auth/cloud-platform" 16774 // ] 16775 // } 16776 16777} 16778 16779// method id "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.retrieveRendered": 16780 16781type ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall struct { 16782 s *Service 16783 parent string 16784 dicomWebPath string 16785 urlParams_ gensupport.URLParams 16786 ifNoneMatch_ string 16787 ctx_ context.Context 16788 header_ http.Header 16789} 16790 16791// RetrieveRendered: RetrieveRenderedInstance returns instance 16792// associated with the given study, series, and SOP Instance UID in an 16793// acceptable Rendered Media Type. See [RetrieveTransaction] 16794// (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). 16795// For details on the implementation of RetrieveRenderedInstance, see 16796// Rendered resources 16797// (https://cloud.google.com/healthcare/docs/dicom#rendered_resources) 16798// in the Cloud Healthcare API conformance statement. For samples that 16799// show how to call RetrieveRenderedInstance, see Retrieving consumer 16800// image formats 16801// (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieving_consumer_image_formats). 16802// 16803// - dicomWebPath: The path of the RetrieveRenderedInstance DICOMweb 16804// request. For example, 16805// `studies/{study_uid}/series/{series_uid}/instances/{instance_uid}/re 16806// ndered`. 16807// - parent: The name of the DICOM store that is being accessed. For 16808// example, 16809// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 16810// /dicomStores/{dicom_store_id}`. 16811func (r *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesService) RetrieveRendered(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall { 16812 c := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16813 c.parent = parent 16814 c.dicomWebPath = dicomWebPath 16815 return c 16816} 16817 16818// Fields allows partial responses to be retrieved. See 16819// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16820// for more information. 16821func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall { 16822 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16823 return c 16824} 16825 16826// IfNoneMatch sets the optional parameter which makes the operation 16827// fail if the object's ETag matches the given value. This is useful for 16828// getting updates only after the object has changed since the last 16829// request. Use googleapi.IsNotModified to check whether the response 16830// error from Do is the result of In-None-Match. 16831func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall { 16832 c.ifNoneMatch_ = entityTag 16833 return c 16834} 16835 16836// Context sets the context to be used in this call's Do method. Any 16837// pending HTTP request will be aborted if the provided context is 16838// canceled. 16839func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall { 16840 c.ctx_ = ctx 16841 return c 16842} 16843 16844// Header returns an http.Header that can be modified by the caller to 16845// add HTTP headers to the request. 16846func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall) Header() http.Header { 16847 if c.header_ == nil { 16848 c.header_ = make(http.Header) 16849 } 16850 return c.header_ 16851} 16852 16853func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall) doRequest(alt string) (*http.Response, error) { 16854 reqHeaders := make(http.Header) 16855 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 16856 for k, v := range c.header_ { 16857 reqHeaders[k] = v 16858 } 16859 reqHeaders.Set("User-Agent", c.s.userAgent()) 16860 if c.ifNoneMatch_ != "" { 16861 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16862 } 16863 var body io.Reader = nil 16864 c.urlParams_.Set("alt", alt) 16865 c.urlParams_.Set("prettyPrint", "false") 16866 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}") 16867 urls += "?" + c.urlParams_.Encode() 16868 req, err := http.NewRequest("GET", urls, body) 16869 if err != nil { 16870 return nil, err 16871 } 16872 req.Header = reqHeaders 16873 googleapi.Expand(req.URL, map[string]string{ 16874 "parent": c.parent, 16875 "dicomWebPath": c.dicomWebPath, 16876 }) 16877 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16878} 16879 16880// Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.retrieveRendered" call. 16881func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 16882 gensupport.SetOptions(c.urlParams_, opts...) 16883 return c.doRequest("") 16884 // { 16885 // "description": "RetrieveRenderedInstance returns instance associated with the given study, series, and SOP Instance UID in an acceptable Rendered Media Type. See [RetrieveTransaction] (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). For details on the implementation of RetrieveRenderedInstance, see [Rendered resources](https://cloud.google.com/healthcare/docs/dicom#rendered_resources) in the Cloud Healthcare API conformance statement. For samples that show how to call RetrieveRenderedInstance, see [Retrieving consumer image formats](https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieving_consumer_image_formats).", 16886 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series/{seriesId}/instances/{instancesId}/rendered", 16887 // "httpMethod": "GET", 16888 // "id": "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.retrieveRendered", 16889 // "parameterOrder": [ 16890 // "parent", 16891 // "dicomWebPath" 16892 // ], 16893 // "parameters": { 16894 // "dicomWebPath": { 16895 // "description": "The path of the RetrieveRenderedInstance DICOMweb request. For example, `studies/{study_uid}/series/{series_uid}/instances/{instance_uid}/rendered`.", 16896 // "location": "path", 16897 // "pattern": "^studies/[^/]+/series/[^/]+/instances/[^/]+/rendered$", 16898 // "required": true, 16899 // "type": "string" 16900 // }, 16901 // "parent": { 16902 // "description": "The name of the DICOM store that is being accessed. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`.", 16903 // "location": "path", 16904 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 16905 // "required": true, 16906 // "type": "string" 16907 // } 16908 // }, 16909 // "path": "v1/{+parent}/dicomWeb/{+dicomWebPath}", 16910 // "response": { 16911 // "$ref": "HttpBody" 16912 // }, 16913 // "scopes": [ 16914 // "https://www.googleapis.com/auth/cloud-platform" 16915 // ] 16916 // } 16917 16918} 16919 16920// method id "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.frames.retrieveFrames": 16921 16922type ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveFramesCall struct { 16923 s *Service 16924 parent string 16925 dicomWebPath string 16926 urlParams_ gensupport.URLParams 16927 ifNoneMatch_ string 16928 ctx_ context.Context 16929 header_ http.Header 16930} 16931 16932// RetrieveFrames: RetrieveFrames returns instances associated with the 16933// given study, series, SOP Instance UID and frame numbers. See 16934// [RetrieveTransaction] 16935// (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4}. 16936// For details on the implementation of RetrieveFrames, see DICOM frames 16937// (https://cloud.google.com/healthcare/docs/dicom#dicom_frames) in the 16938// Cloud Healthcare API conformance statement. For samples that show how 16939// to call RetrieveFrames, see Retrieving DICOM data 16940// (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieving_dicom_data). 16941// 16942// - dicomWebPath: The path of the RetrieveFrames DICOMweb request. For 16943// example, 16944// `studies/{study_uid}/series/{series_uid}/instances/{instance_uid}/fr 16945// ames/{frame_list}`. 16946// - parent: The name of the DICOM store that is being accessed. For 16947// example, 16948// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 16949// /dicomStores/{dicom_store_id}`. 16950func (r *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesService) RetrieveFrames(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveFramesCall { 16951 c := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveFramesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16952 c.parent = parent 16953 c.dicomWebPath = dicomWebPath 16954 return c 16955} 16956 16957// Fields allows partial responses to be retrieved. See 16958// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16959// for more information. 16960func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveFramesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveFramesCall { 16961 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16962 return c 16963} 16964 16965// IfNoneMatch sets the optional parameter which makes the operation 16966// fail if the object's ETag matches the given value. This is useful for 16967// getting updates only after the object has changed since the last 16968// request. Use googleapi.IsNotModified to check whether the response 16969// error from Do is the result of In-None-Match. 16970func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveFramesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveFramesCall { 16971 c.ifNoneMatch_ = entityTag 16972 return c 16973} 16974 16975// Context sets the context to be used in this call's Do method. Any 16976// pending HTTP request will be aborted if the provided context is 16977// canceled. 16978func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveFramesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveFramesCall { 16979 c.ctx_ = ctx 16980 return c 16981} 16982 16983// Header returns an http.Header that can be modified by the caller to 16984// add HTTP headers to the request. 16985func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveFramesCall) Header() http.Header { 16986 if c.header_ == nil { 16987 c.header_ = make(http.Header) 16988 } 16989 return c.header_ 16990} 16991 16992func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveFramesCall) doRequest(alt string) (*http.Response, error) { 16993 reqHeaders := make(http.Header) 16994 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 16995 for k, v := range c.header_ { 16996 reqHeaders[k] = v 16997 } 16998 reqHeaders.Set("User-Agent", c.s.userAgent()) 16999 if c.ifNoneMatch_ != "" { 17000 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 17001 } 17002 var body io.Reader = nil 17003 c.urlParams_.Set("alt", alt) 17004 c.urlParams_.Set("prettyPrint", "false") 17005 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}") 17006 urls += "?" + c.urlParams_.Encode() 17007 req, err := http.NewRequest("GET", urls, body) 17008 if err != nil { 17009 return nil, err 17010 } 17011 req.Header = reqHeaders 17012 googleapi.Expand(req.URL, map[string]string{ 17013 "parent": c.parent, 17014 "dicomWebPath": c.dicomWebPath, 17015 }) 17016 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17017} 17018 17019// Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.frames.retrieveFrames" call. 17020func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveFramesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 17021 gensupport.SetOptions(c.urlParams_, opts...) 17022 return c.doRequest("") 17023 // { 17024 // "description": "RetrieveFrames returns instances associated with the given study, series, SOP Instance UID and frame numbers. See [RetrieveTransaction] (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4}. For details on the implementation of RetrieveFrames, see [DICOM frames](https://cloud.google.com/healthcare/docs/dicom#dicom_frames) in the Cloud Healthcare API conformance statement. For samples that show how to call RetrieveFrames, see [Retrieving DICOM data](https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieving_dicom_data).", 17025 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series/{seriesId}/instances/{instancesId}/frames/{framesId}", 17026 // "httpMethod": "GET", 17027 // "id": "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.frames.retrieveFrames", 17028 // "parameterOrder": [ 17029 // "parent", 17030 // "dicomWebPath" 17031 // ], 17032 // "parameters": { 17033 // "dicomWebPath": { 17034 // "description": "The path of the RetrieveFrames DICOMweb request. For example, `studies/{study_uid}/series/{series_uid}/instances/{instance_uid}/frames/{frame_list}`.", 17035 // "location": "path", 17036 // "pattern": "^studies/[^/]+/series/[^/]+/instances/[^/]+/frames/[^/]+$", 17037 // "required": true, 17038 // "type": "string" 17039 // }, 17040 // "parent": { 17041 // "description": "The name of the DICOM store that is being accessed. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`.", 17042 // "location": "path", 17043 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 17044 // "required": true, 17045 // "type": "string" 17046 // } 17047 // }, 17048 // "path": "v1/{+parent}/dicomWeb/{+dicomWebPath}", 17049 // "response": { 17050 // "$ref": "HttpBody" 17051 // }, 17052 // "scopes": [ 17053 // "https://www.googleapis.com/auth/cloud-platform" 17054 // ] 17055 // } 17056 17057} 17058 17059// method id "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.frames.retrieveRendered": 17060 17061type ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall struct { 17062 s *Service 17063 parent string 17064 dicomWebPath string 17065 urlParams_ gensupport.URLParams 17066 ifNoneMatch_ string 17067 ctx_ context.Context 17068 header_ http.Header 17069} 17070 17071// RetrieveRendered: RetrieveRenderedFrames returns instances associated 17072// with the given study, series, SOP Instance UID and frame numbers in 17073// an acceptable Rendered Media Type. See [RetrieveTransaction] 17074// (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). 17075// For details on the implementation of RetrieveRenderedFrames, see 17076// Rendered resources 17077// (https://cloud.google.com/healthcare/docs/dicom#rendered_resources) 17078// in the Cloud Healthcare API conformance statement. For samples that 17079// show how to call RetrieveRenderedFrames, see Retrieving consumer 17080// image formats 17081// (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieving_consumer_image_formats). 17082// 17083// - dicomWebPath: The path of the RetrieveRenderedFrames DICOMweb 17084// request. For example, 17085// `studies/{study_uid}/series/{series_uid}/instances/{instance_uid}/fr 17086// ames/{frame_list}/rendered`. 17087// - parent: The name of the DICOM store that is being accessed. For 17088// example, 17089// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 17090// /dicomStores/{dicom_store_id}`. 17091func (r *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesService) RetrieveRendered(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall { 17092 c := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17093 c.parent = parent 17094 c.dicomWebPath = dicomWebPath 17095 return c 17096} 17097 17098// Fields allows partial responses to be retrieved. See 17099// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17100// for more information. 17101func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall { 17102 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17103 return c 17104} 17105 17106// IfNoneMatch sets the optional parameter which makes the operation 17107// fail if the object's ETag matches the given value. This is useful for 17108// getting updates only after the object has changed since the last 17109// request. Use googleapi.IsNotModified to check whether the response 17110// error from Do is the result of In-None-Match. 17111func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall { 17112 c.ifNoneMatch_ = entityTag 17113 return c 17114} 17115 17116// Context sets the context to be used in this call's Do method. Any 17117// pending HTTP request will be aborted if the provided context is 17118// canceled. 17119func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall { 17120 c.ctx_ = ctx 17121 return c 17122} 17123 17124// Header returns an http.Header that can be modified by the caller to 17125// add HTTP headers to the request. 17126func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall) Header() http.Header { 17127 if c.header_ == nil { 17128 c.header_ = make(http.Header) 17129 } 17130 return c.header_ 17131} 17132 17133func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall) doRequest(alt string) (*http.Response, error) { 17134 reqHeaders := make(http.Header) 17135 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 17136 for k, v := range c.header_ { 17137 reqHeaders[k] = v 17138 } 17139 reqHeaders.Set("User-Agent", c.s.userAgent()) 17140 if c.ifNoneMatch_ != "" { 17141 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 17142 } 17143 var body io.Reader = nil 17144 c.urlParams_.Set("alt", alt) 17145 c.urlParams_.Set("prettyPrint", "false") 17146 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}") 17147 urls += "?" + c.urlParams_.Encode() 17148 req, err := http.NewRequest("GET", urls, body) 17149 if err != nil { 17150 return nil, err 17151 } 17152 req.Header = reqHeaders 17153 googleapi.Expand(req.URL, map[string]string{ 17154 "parent": c.parent, 17155 "dicomWebPath": c.dicomWebPath, 17156 }) 17157 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17158} 17159 17160// Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.frames.retrieveRendered" call. 17161func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 17162 gensupport.SetOptions(c.urlParams_, opts...) 17163 return c.doRequest("") 17164 // { 17165 // "description": "RetrieveRenderedFrames returns instances associated with the given study, series, SOP Instance UID and frame numbers in an acceptable Rendered Media Type. See [RetrieveTransaction] (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4). For details on the implementation of RetrieveRenderedFrames, see [Rendered resources](https://cloud.google.com/healthcare/docs/dicom#rendered_resources) in the Cloud Healthcare API conformance statement. For samples that show how to call RetrieveRenderedFrames, see [Retrieving consumer image formats](https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieving_consumer_image_formats).", 17166 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series/{seriesId}/instances/{instancesId}/frames/{framesId}/rendered", 17167 // "httpMethod": "GET", 17168 // "id": "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.frames.retrieveRendered", 17169 // "parameterOrder": [ 17170 // "parent", 17171 // "dicomWebPath" 17172 // ], 17173 // "parameters": { 17174 // "dicomWebPath": { 17175 // "description": "The path of the RetrieveRenderedFrames DICOMweb request. For example, `studies/{study_uid}/series/{series_uid}/instances/{instance_uid}/frames/{frame_list}/rendered`.", 17176 // "location": "path", 17177 // "pattern": "^studies/[^/]+/series/[^/]+/instances/[^/]+/frames/[^/]+/rendered$", 17178 // "required": true, 17179 // "type": "string" 17180 // }, 17181 // "parent": { 17182 // "description": "The name of the DICOM store that is being accessed. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`.", 17183 // "location": "path", 17184 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$", 17185 // "required": true, 17186 // "type": "string" 17187 // } 17188 // }, 17189 // "path": "v1/{+parent}/dicomWeb/{+dicomWebPath}", 17190 // "response": { 17191 // "$ref": "HttpBody" 17192 // }, 17193 // "scopes": [ 17194 // "https://www.googleapis.com/auth/cloud-platform" 17195 // ] 17196 // } 17197 17198} 17199 17200// method id "healthcare.projects.locations.datasets.fhirStores.create": 17201 17202type ProjectsLocationsDatasetsFhirStoresCreateCall struct { 17203 s *Service 17204 parent string 17205 fhirstore *FhirStore 17206 urlParams_ gensupport.URLParams 17207 ctx_ context.Context 17208 header_ http.Header 17209} 17210 17211// Create: Creates a new FHIR store within the parent dataset. 17212// 17213// - parent: The name of the dataset this FHIR store belongs to. 17214func (r *ProjectsLocationsDatasetsFhirStoresService) Create(parent string, fhirstore *FhirStore) *ProjectsLocationsDatasetsFhirStoresCreateCall { 17215 c := &ProjectsLocationsDatasetsFhirStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17216 c.parent = parent 17217 c.fhirstore = fhirstore 17218 return c 17219} 17220 17221// FhirStoreId sets the optional parameter "fhirStoreId": The ID of the 17222// FHIR store that is being created. The string must match the following 17223// regex: `[\p{L}\p{N}_\-\.]{1,256}`. 17224func (c *ProjectsLocationsDatasetsFhirStoresCreateCall) FhirStoreId(fhirStoreId string) *ProjectsLocationsDatasetsFhirStoresCreateCall { 17225 c.urlParams_.Set("fhirStoreId", fhirStoreId) 17226 return c 17227} 17228 17229// Fields allows partial responses to be retrieved. See 17230// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17231// for more information. 17232func (c *ProjectsLocationsDatasetsFhirStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresCreateCall { 17233 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17234 return c 17235} 17236 17237// Context sets the context to be used in this call's Do method. Any 17238// pending HTTP request will be aborted if the provided context is 17239// canceled. 17240func (c *ProjectsLocationsDatasetsFhirStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresCreateCall { 17241 c.ctx_ = ctx 17242 return c 17243} 17244 17245// Header returns an http.Header that can be modified by the caller to 17246// add HTTP headers to the request. 17247func (c *ProjectsLocationsDatasetsFhirStoresCreateCall) Header() http.Header { 17248 if c.header_ == nil { 17249 c.header_ = make(http.Header) 17250 } 17251 return c.header_ 17252} 17253 17254func (c *ProjectsLocationsDatasetsFhirStoresCreateCall) doRequest(alt string) (*http.Response, error) { 17255 reqHeaders := make(http.Header) 17256 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 17257 for k, v := range c.header_ { 17258 reqHeaders[k] = v 17259 } 17260 reqHeaders.Set("User-Agent", c.s.userAgent()) 17261 var body io.Reader = nil 17262 body, err := googleapi.WithoutDataWrapper.JSONReader(c.fhirstore) 17263 if err != nil { 17264 return nil, err 17265 } 17266 reqHeaders.Set("Content-Type", "application/json") 17267 c.urlParams_.Set("alt", alt) 17268 c.urlParams_.Set("prettyPrint", "false") 17269 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/fhirStores") 17270 urls += "?" + c.urlParams_.Encode() 17271 req, err := http.NewRequest("POST", urls, body) 17272 if err != nil { 17273 return nil, err 17274 } 17275 req.Header = reqHeaders 17276 googleapi.Expand(req.URL, map[string]string{ 17277 "parent": c.parent, 17278 }) 17279 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17280} 17281 17282// Do executes the "healthcare.projects.locations.datasets.fhirStores.create" call. 17283// Exactly one of *FhirStore or error will be non-nil. Any non-2xx 17284// status code is an error. Response headers are in either 17285// *FhirStore.ServerResponse.Header or (if a response was returned at 17286// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 17287// to check whether the returned error was because 17288// http.StatusNotModified was returned. 17289func (c *ProjectsLocationsDatasetsFhirStoresCreateCall) Do(opts ...googleapi.CallOption) (*FhirStore, error) { 17290 gensupport.SetOptions(c.urlParams_, opts...) 17291 res, err := c.doRequest("json") 17292 if res != nil && res.StatusCode == http.StatusNotModified { 17293 if res.Body != nil { 17294 res.Body.Close() 17295 } 17296 return nil, &googleapi.Error{ 17297 Code: res.StatusCode, 17298 Header: res.Header, 17299 } 17300 } 17301 if err != nil { 17302 return nil, err 17303 } 17304 defer googleapi.CloseBody(res) 17305 if err := googleapi.CheckResponse(res); err != nil { 17306 return nil, err 17307 } 17308 ret := &FhirStore{ 17309 ServerResponse: googleapi.ServerResponse{ 17310 Header: res.Header, 17311 HTTPStatusCode: res.StatusCode, 17312 }, 17313 } 17314 target := &ret 17315 if err := gensupport.DecodeResponse(target, res); err != nil { 17316 return nil, err 17317 } 17318 return ret, nil 17319 // { 17320 // "description": "Creates a new FHIR store within the parent dataset.", 17321 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores", 17322 // "httpMethod": "POST", 17323 // "id": "healthcare.projects.locations.datasets.fhirStores.create", 17324 // "parameterOrder": [ 17325 // "parent" 17326 // ], 17327 // "parameters": { 17328 // "fhirStoreId": { 17329 // "description": "The ID of the FHIR store that is being created. The string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`.", 17330 // "location": "query", 17331 // "type": "string" 17332 // }, 17333 // "parent": { 17334 // "description": "The name of the dataset this FHIR store belongs to.", 17335 // "location": "path", 17336 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", 17337 // "required": true, 17338 // "type": "string" 17339 // } 17340 // }, 17341 // "path": "v1/{+parent}/fhirStores", 17342 // "request": { 17343 // "$ref": "FhirStore" 17344 // }, 17345 // "response": { 17346 // "$ref": "FhirStore" 17347 // }, 17348 // "scopes": [ 17349 // "https://www.googleapis.com/auth/cloud-platform" 17350 // ] 17351 // } 17352 17353} 17354 17355// method id "healthcare.projects.locations.datasets.fhirStores.deidentify": 17356 17357type ProjectsLocationsDatasetsFhirStoresDeidentifyCall struct { 17358 s *Service 17359 sourceStore string 17360 deidentifyfhirstorerequest *DeidentifyFhirStoreRequest 17361 urlParams_ gensupport.URLParams 17362 ctx_ context.Context 17363 header_ http.Header 17364} 17365 17366// Deidentify: De-identifies data from the source store and writes it to 17367// the destination store. The metadata field type is OperationMetadata. 17368// If the request is successful, the response field type is 17369// DeidentifyFhirStoreSummary. If errors occur, error is set. Error 17370// details are also logged to Cloud Logging (see Viewing error logs in 17371// Cloud Logging 17372// (https://cloud.google.com/healthcare/docs/how-tos/logging)). 17373// 17374// - sourceStore: Source FHIR store resource name. For example, 17375// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 17376// /fhirStores/{fhir_store_id}`. 17377func (r *ProjectsLocationsDatasetsFhirStoresService) Deidentify(sourceStore string, deidentifyfhirstorerequest *DeidentifyFhirStoreRequest) *ProjectsLocationsDatasetsFhirStoresDeidentifyCall { 17378 c := &ProjectsLocationsDatasetsFhirStoresDeidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17379 c.sourceStore = sourceStore 17380 c.deidentifyfhirstorerequest = deidentifyfhirstorerequest 17381 return c 17382} 17383 17384// Fields allows partial responses to be retrieved. See 17385// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17386// for more information. 17387func (c *ProjectsLocationsDatasetsFhirStoresDeidentifyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresDeidentifyCall { 17388 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17389 return c 17390} 17391 17392// Context sets the context to be used in this call's Do method. Any 17393// pending HTTP request will be aborted if the provided context is 17394// canceled. 17395func (c *ProjectsLocationsDatasetsFhirStoresDeidentifyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresDeidentifyCall { 17396 c.ctx_ = ctx 17397 return c 17398} 17399 17400// Header returns an http.Header that can be modified by the caller to 17401// add HTTP headers to the request. 17402func (c *ProjectsLocationsDatasetsFhirStoresDeidentifyCall) Header() http.Header { 17403 if c.header_ == nil { 17404 c.header_ = make(http.Header) 17405 } 17406 return c.header_ 17407} 17408 17409func (c *ProjectsLocationsDatasetsFhirStoresDeidentifyCall) doRequest(alt string) (*http.Response, error) { 17410 reqHeaders := make(http.Header) 17411 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 17412 for k, v := range c.header_ { 17413 reqHeaders[k] = v 17414 } 17415 reqHeaders.Set("User-Agent", c.s.userAgent()) 17416 var body io.Reader = nil 17417 body, err := googleapi.WithoutDataWrapper.JSONReader(c.deidentifyfhirstorerequest) 17418 if err != nil { 17419 return nil, err 17420 } 17421 reqHeaders.Set("Content-Type", "application/json") 17422 c.urlParams_.Set("alt", alt) 17423 c.urlParams_.Set("prettyPrint", "false") 17424 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+sourceStore}:deidentify") 17425 urls += "?" + c.urlParams_.Encode() 17426 req, err := http.NewRequest("POST", urls, body) 17427 if err != nil { 17428 return nil, err 17429 } 17430 req.Header = reqHeaders 17431 googleapi.Expand(req.URL, map[string]string{ 17432 "sourceStore": c.sourceStore, 17433 }) 17434 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17435} 17436 17437// Do executes the "healthcare.projects.locations.datasets.fhirStores.deidentify" call. 17438// Exactly one of *Operation or error will be non-nil. Any non-2xx 17439// status code is an error. Response headers are in either 17440// *Operation.ServerResponse.Header or (if a response was returned at 17441// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 17442// to check whether the returned error was because 17443// http.StatusNotModified was returned. 17444func (c *ProjectsLocationsDatasetsFhirStoresDeidentifyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 17445 gensupport.SetOptions(c.urlParams_, opts...) 17446 res, err := c.doRequest("json") 17447 if res != nil && res.StatusCode == http.StatusNotModified { 17448 if res.Body != nil { 17449 res.Body.Close() 17450 } 17451 return nil, &googleapi.Error{ 17452 Code: res.StatusCode, 17453 Header: res.Header, 17454 } 17455 } 17456 if err != nil { 17457 return nil, err 17458 } 17459 defer googleapi.CloseBody(res) 17460 if err := googleapi.CheckResponse(res); err != nil { 17461 return nil, err 17462 } 17463 ret := &Operation{ 17464 ServerResponse: googleapi.ServerResponse{ 17465 Header: res.Header, 17466 HTTPStatusCode: res.StatusCode, 17467 }, 17468 } 17469 target := &ret 17470 if err := gensupport.DecodeResponse(target, res); err != nil { 17471 return nil, err 17472 } 17473 return ret, nil 17474 // { 17475 // "description": "De-identifies data from the source store and writes it to the destination store. The metadata field type is OperationMetadata. If the request is successful, the response field type is DeidentifyFhirStoreSummary. If errors occur, error is set. Error details are also logged to Cloud Logging (see [Viewing error logs in Cloud Logging](https://cloud.google.com/healthcare/docs/how-tos/logging)).", 17476 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}:deidentify", 17477 // "httpMethod": "POST", 17478 // "id": "healthcare.projects.locations.datasets.fhirStores.deidentify", 17479 // "parameterOrder": [ 17480 // "sourceStore" 17481 // ], 17482 // "parameters": { 17483 // "sourceStore": { 17484 // "description": "Source FHIR store resource name. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}`.", 17485 // "location": "path", 17486 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$", 17487 // "required": true, 17488 // "type": "string" 17489 // } 17490 // }, 17491 // "path": "v1/{+sourceStore}:deidentify", 17492 // "request": { 17493 // "$ref": "DeidentifyFhirStoreRequest" 17494 // }, 17495 // "response": { 17496 // "$ref": "Operation" 17497 // }, 17498 // "scopes": [ 17499 // "https://www.googleapis.com/auth/cloud-platform" 17500 // ] 17501 // } 17502 17503} 17504 17505// method id "healthcare.projects.locations.datasets.fhirStores.delete": 17506 17507type ProjectsLocationsDatasetsFhirStoresDeleteCall struct { 17508 s *Service 17509 name string 17510 urlParams_ gensupport.URLParams 17511 ctx_ context.Context 17512 header_ http.Header 17513} 17514 17515// Delete: Deletes the specified FHIR store and removes all resources 17516// within it. 17517// 17518// - name: The resource name of the FHIR store to delete. 17519func (r *ProjectsLocationsDatasetsFhirStoresService) Delete(name string) *ProjectsLocationsDatasetsFhirStoresDeleteCall { 17520 c := &ProjectsLocationsDatasetsFhirStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17521 c.name = name 17522 return c 17523} 17524 17525// Fields allows partial responses to be retrieved. See 17526// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17527// for more information. 17528func (c *ProjectsLocationsDatasetsFhirStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresDeleteCall { 17529 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17530 return c 17531} 17532 17533// Context sets the context to be used in this call's Do method. Any 17534// pending HTTP request will be aborted if the provided context is 17535// canceled. 17536func (c *ProjectsLocationsDatasetsFhirStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresDeleteCall { 17537 c.ctx_ = ctx 17538 return c 17539} 17540 17541// Header returns an http.Header that can be modified by the caller to 17542// add HTTP headers to the request. 17543func (c *ProjectsLocationsDatasetsFhirStoresDeleteCall) Header() http.Header { 17544 if c.header_ == nil { 17545 c.header_ = make(http.Header) 17546 } 17547 return c.header_ 17548} 17549 17550func (c *ProjectsLocationsDatasetsFhirStoresDeleteCall) doRequest(alt string) (*http.Response, error) { 17551 reqHeaders := make(http.Header) 17552 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 17553 for k, v := range c.header_ { 17554 reqHeaders[k] = v 17555 } 17556 reqHeaders.Set("User-Agent", c.s.userAgent()) 17557 var body io.Reader = nil 17558 c.urlParams_.Set("alt", alt) 17559 c.urlParams_.Set("prettyPrint", "false") 17560 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 17561 urls += "?" + c.urlParams_.Encode() 17562 req, err := http.NewRequest("DELETE", urls, body) 17563 if err != nil { 17564 return nil, err 17565 } 17566 req.Header = reqHeaders 17567 googleapi.Expand(req.URL, map[string]string{ 17568 "name": c.name, 17569 }) 17570 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17571} 17572 17573// Do executes the "healthcare.projects.locations.datasets.fhirStores.delete" call. 17574// Exactly one of *Empty or error will be non-nil. Any non-2xx status 17575// code is an error. Response headers are in either 17576// *Empty.ServerResponse.Header or (if a response was returned at all) 17577// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 17578// check whether the returned error was because http.StatusNotModified 17579// was returned. 17580func (c *ProjectsLocationsDatasetsFhirStoresDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 17581 gensupport.SetOptions(c.urlParams_, opts...) 17582 res, err := c.doRequest("json") 17583 if res != nil && res.StatusCode == http.StatusNotModified { 17584 if res.Body != nil { 17585 res.Body.Close() 17586 } 17587 return nil, &googleapi.Error{ 17588 Code: res.StatusCode, 17589 Header: res.Header, 17590 } 17591 } 17592 if err != nil { 17593 return nil, err 17594 } 17595 defer googleapi.CloseBody(res) 17596 if err := googleapi.CheckResponse(res); err != nil { 17597 return nil, err 17598 } 17599 ret := &Empty{ 17600 ServerResponse: googleapi.ServerResponse{ 17601 Header: res.Header, 17602 HTTPStatusCode: res.StatusCode, 17603 }, 17604 } 17605 target := &ret 17606 if err := gensupport.DecodeResponse(target, res); err != nil { 17607 return nil, err 17608 } 17609 return ret, nil 17610 // { 17611 // "description": "Deletes the specified FHIR store and removes all resources within it.", 17612 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}", 17613 // "httpMethod": "DELETE", 17614 // "id": "healthcare.projects.locations.datasets.fhirStores.delete", 17615 // "parameterOrder": [ 17616 // "name" 17617 // ], 17618 // "parameters": { 17619 // "name": { 17620 // "description": "The resource name of the FHIR store to delete.", 17621 // "location": "path", 17622 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$", 17623 // "required": true, 17624 // "type": "string" 17625 // } 17626 // }, 17627 // "path": "v1/{+name}", 17628 // "response": { 17629 // "$ref": "Empty" 17630 // }, 17631 // "scopes": [ 17632 // "https://www.googleapis.com/auth/cloud-platform" 17633 // ] 17634 // } 17635 17636} 17637 17638// method id "healthcare.projects.locations.datasets.fhirStores.export": 17639 17640type ProjectsLocationsDatasetsFhirStoresExportCall struct { 17641 s *Service 17642 name string 17643 exportresourcesrequest *ExportResourcesRequest 17644 urlParams_ gensupport.URLParams 17645 ctx_ context.Context 17646 header_ http.Header 17647} 17648 17649// Export: Export resources from the FHIR store to the specified 17650// destination. This method returns an Operation that can be used to 17651// track the status of the export by calling GetOperation. Immediate 17652// fatal errors appear in the error field, errors are also logged to 17653// Cloud Logging (see Viewing error logs in Cloud Logging 17654// (https://cloud.google.com/healthcare/docs/how-tos/logging)). 17655// Otherwise, when the operation finishes, a detailed response of type 17656// ExportResourcesResponse is returned in the response field. The 17657// metadata field type for this operation is OperationMetadata. 17658// 17659// - name: The name of the FHIR store to export resource from, in the 17660// format of 17661// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 17662// /fhirStores/{fhir_store_id}`. 17663func (r *ProjectsLocationsDatasetsFhirStoresService) Export(name string, exportresourcesrequest *ExportResourcesRequest) *ProjectsLocationsDatasetsFhirStoresExportCall { 17664 c := &ProjectsLocationsDatasetsFhirStoresExportCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17665 c.name = name 17666 c.exportresourcesrequest = exportresourcesrequest 17667 return c 17668} 17669 17670// Fields allows partial responses to be retrieved. See 17671// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17672// for more information. 17673func (c *ProjectsLocationsDatasetsFhirStoresExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresExportCall { 17674 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17675 return c 17676} 17677 17678// Context sets the context to be used in this call's Do method. Any 17679// pending HTTP request will be aborted if the provided context is 17680// canceled. 17681func (c *ProjectsLocationsDatasetsFhirStoresExportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresExportCall { 17682 c.ctx_ = ctx 17683 return c 17684} 17685 17686// Header returns an http.Header that can be modified by the caller to 17687// add HTTP headers to the request. 17688func (c *ProjectsLocationsDatasetsFhirStoresExportCall) Header() http.Header { 17689 if c.header_ == nil { 17690 c.header_ = make(http.Header) 17691 } 17692 return c.header_ 17693} 17694 17695func (c *ProjectsLocationsDatasetsFhirStoresExportCall) doRequest(alt string) (*http.Response, error) { 17696 reqHeaders := make(http.Header) 17697 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 17698 for k, v := range c.header_ { 17699 reqHeaders[k] = v 17700 } 17701 reqHeaders.Set("User-Agent", c.s.userAgent()) 17702 var body io.Reader = nil 17703 body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportresourcesrequest) 17704 if err != nil { 17705 return nil, err 17706 } 17707 reqHeaders.Set("Content-Type", "application/json") 17708 c.urlParams_.Set("alt", alt) 17709 c.urlParams_.Set("prettyPrint", "false") 17710 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:export") 17711 urls += "?" + c.urlParams_.Encode() 17712 req, err := http.NewRequest("POST", urls, body) 17713 if err != nil { 17714 return nil, err 17715 } 17716 req.Header = reqHeaders 17717 googleapi.Expand(req.URL, map[string]string{ 17718 "name": c.name, 17719 }) 17720 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17721} 17722 17723// Do executes the "healthcare.projects.locations.datasets.fhirStores.export" call. 17724// Exactly one of *Operation or error will be non-nil. Any non-2xx 17725// status code is an error. Response headers are in either 17726// *Operation.ServerResponse.Header or (if a response was returned at 17727// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 17728// to check whether the returned error was because 17729// http.StatusNotModified was returned. 17730func (c *ProjectsLocationsDatasetsFhirStoresExportCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 17731 gensupport.SetOptions(c.urlParams_, opts...) 17732 res, err := c.doRequest("json") 17733 if res != nil && res.StatusCode == http.StatusNotModified { 17734 if res.Body != nil { 17735 res.Body.Close() 17736 } 17737 return nil, &googleapi.Error{ 17738 Code: res.StatusCode, 17739 Header: res.Header, 17740 } 17741 } 17742 if err != nil { 17743 return nil, err 17744 } 17745 defer googleapi.CloseBody(res) 17746 if err := googleapi.CheckResponse(res); err != nil { 17747 return nil, err 17748 } 17749 ret := &Operation{ 17750 ServerResponse: googleapi.ServerResponse{ 17751 Header: res.Header, 17752 HTTPStatusCode: res.StatusCode, 17753 }, 17754 } 17755 target := &ret 17756 if err := gensupport.DecodeResponse(target, res); err != nil { 17757 return nil, err 17758 } 17759 return ret, nil 17760 // { 17761 // "description": "Export resources from the FHIR store to the specified destination. This method returns an Operation that can be used to track the status of the export by calling GetOperation. Immediate fatal errors appear in the error field, errors are also logged to Cloud Logging (see [Viewing error logs in Cloud Logging](https://cloud.google.com/healthcare/docs/how-tos/logging)). Otherwise, when the operation finishes, a detailed response of type ExportResourcesResponse is returned in the response field. The metadata field type for this operation is OperationMetadata.", 17762 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}:export", 17763 // "httpMethod": "POST", 17764 // "id": "healthcare.projects.locations.datasets.fhirStores.export", 17765 // "parameterOrder": [ 17766 // "name" 17767 // ], 17768 // "parameters": { 17769 // "name": { 17770 // "description": "The name of the FHIR store to export resource from, in the format of `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}`.", 17771 // "location": "path", 17772 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$", 17773 // "required": true, 17774 // "type": "string" 17775 // } 17776 // }, 17777 // "path": "v1/{+name}:export", 17778 // "request": { 17779 // "$ref": "ExportResourcesRequest" 17780 // }, 17781 // "response": { 17782 // "$ref": "Operation" 17783 // }, 17784 // "scopes": [ 17785 // "https://www.googleapis.com/auth/cloud-platform" 17786 // ] 17787 // } 17788 17789} 17790 17791// method id "healthcare.projects.locations.datasets.fhirStores.get": 17792 17793type ProjectsLocationsDatasetsFhirStoresGetCall struct { 17794 s *Service 17795 name string 17796 urlParams_ gensupport.URLParams 17797 ifNoneMatch_ string 17798 ctx_ context.Context 17799 header_ http.Header 17800} 17801 17802// Get: Gets the configuration of the specified FHIR store. 17803// 17804// - name: The resource name of the FHIR store to get. 17805func (r *ProjectsLocationsDatasetsFhirStoresService) Get(name string) *ProjectsLocationsDatasetsFhirStoresGetCall { 17806 c := &ProjectsLocationsDatasetsFhirStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17807 c.name = name 17808 return c 17809} 17810 17811// Fields allows partial responses to be retrieved. See 17812// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17813// for more information. 17814func (c *ProjectsLocationsDatasetsFhirStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresGetCall { 17815 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17816 return c 17817} 17818 17819// IfNoneMatch sets the optional parameter which makes the operation 17820// fail if the object's ETag matches the given value. This is useful for 17821// getting updates only after the object has changed since the last 17822// request. Use googleapi.IsNotModified to check whether the response 17823// error from Do is the result of In-None-Match. 17824func (c *ProjectsLocationsDatasetsFhirStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresGetCall { 17825 c.ifNoneMatch_ = entityTag 17826 return c 17827} 17828 17829// Context sets the context to be used in this call's Do method. Any 17830// pending HTTP request will be aborted if the provided context is 17831// canceled. 17832func (c *ProjectsLocationsDatasetsFhirStoresGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresGetCall { 17833 c.ctx_ = ctx 17834 return c 17835} 17836 17837// Header returns an http.Header that can be modified by the caller to 17838// add HTTP headers to the request. 17839func (c *ProjectsLocationsDatasetsFhirStoresGetCall) Header() http.Header { 17840 if c.header_ == nil { 17841 c.header_ = make(http.Header) 17842 } 17843 return c.header_ 17844} 17845 17846func (c *ProjectsLocationsDatasetsFhirStoresGetCall) doRequest(alt string) (*http.Response, error) { 17847 reqHeaders := make(http.Header) 17848 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 17849 for k, v := range c.header_ { 17850 reqHeaders[k] = v 17851 } 17852 reqHeaders.Set("User-Agent", c.s.userAgent()) 17853 if c.ifNoneMatch_ != "" { 17854 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 17855 } 17856 var body io.Reader = nil 17857 c.urlParams_.Set("alt", alt) 17858 c.urlParams_.Set("prettyPrint", "false") 17859 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 17860 urls += "?" + c.urlParams_.Encode() 17861 req, err := http.NewRequest("GET", urls, body) 17862 if err != nil { 17863 return nil, err 17864 } 17865 req.Header = reqHeaders 17866 googleapi.Expand(req.URL, map[string]string{ 17867 "name": c.name, 17868 }) 17869 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17870} 17871 17872// Do executes the "healthcare.projects.locations.datasets.fhirStores.get" call. 17873// Exactly one of *FhirStore or error will be non-nil. Any non-2xx 17874// status code is an error. Response headers are in either 17875// *FhirStore.ServerResponse.Header or (if a response was returned at 17876// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 17877// to check whether the returned error was because 17878// http.StatusNotModified was returned. 17879func (c *ProjectsLocationsDatasetsFhirStoresGetCall) Do(opts ...googleapi.CallOption) (*FhirStore, error) { 17880 gensupport.SetOptions(c.urlParams_, opts...) 17881 res, err := c.doRequest("json") 17882 if res != nil && res.StatusCode == http.StatusNotModified { 17883 if res.Body != nil { 17884 res.Body.Close() 17885 } 17886 return nil, &googleapi.Error{ 17887 Code: res.StatusCode, 17888 Header: res.Header, 17889 } 17890 } 17891 if err != nil { 17892 return nil, err 17893 } 17894 defer googleapi.CloseBody(res) 17895 if err := googleapi.CheckResponse(res); err != nil { 17896 return nil, err 17897 } 17898 ret := &FhirStore{ 17899 ServerResponse: googleapi.ServerResponse{ 17900 Header: res.Header, 17901 HTTPStatusCode: res.StatusCode, 17902 }, 17903 } 17904 target := &ret 17905 if err := gensupport.DecodeResponse(target, res); err != nil { 17906 return nil, err 17907 } 17908 return ret, nil 17909 // { 17910 // "description": "Gets the configuration of the specified FHIR store.", 17911 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}", 17912 // "httpMethod": "GET", 17913 // "id": "healthcare.projects.locations.datasets.fhirStores.get", 17914 // "parameterOrder": [ 17915 // "name" 17916 // ], 17917 // "parameters": { 17918 // "name": { 17919 // "description": "The resource name of the FHIR store to get.", 17920 // "location": "path", 17921 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$", 17922 // "required": true, 17923 // "type": "string" 17924 // } 17925 // }, 17926 // "path": "v1/{+name}", 17927 // "response": { 17928 // "$ref": "FhirStore" 17929 // }, 17930 // "scopes": [ 17931 // "https://www.googleapis.com/auth/cloud-platform" 17932 // ] 17933 // } 17934 17935} 17936 17937// method id "healthcare.projects.locations.datasets.fhirStores.getIamPolicy": 17938 17939type ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall struct { 17940 s *Service 17941 resource string 17942 urlParams_ gensupport.URLParams 17943 ifNoneMatch_ string 17944 ctx_ context.Context 17945 header_ http.Header 17946} 17947 17948// GetIamPolicy: Gets the access control policy for a resource. Returns 17949// an empty policy if the resource exists and does not have a policy 17950// set. 17951// 17952// - resource: REQUIRED: The resource for which the policy is being 17953// requested. See the operation documentation for the appropriate 17954// value for this field. 17955func (r *ProjectsLocationsDatasetsFhirStoresService) GetIamPolicy(resource string) *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall { 17956 c := &ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17957 c.resource = resource 17958 return c 17959} 17960 17961// OptionsRequestedPolicyVersion sets the optional parameter 17962// "options.requestedPolicyVersion": The policy format version to be 17963// returned. Valid values are 0, 1, and 3. Requests specifying an 17964// invalid value will be rejected. Requests for policies with any 17965// conditional bindings must specify version 3. Policies without any 17966// conditional bindings may specify any valid value or leave the field 17967// unset. To learn which resources support conditions in their IAM 17968// policies, see the IAM documentation 17969// (https://cloud.google.com/iam/help/conditions/resource-policies). 17970func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall { 17971 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) 17972 return c 17973} 17974 17975// Fields allows partial responses to be retrieved. See 17976// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17977// for more information. 17978func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall { 17979 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17980 return c 17981} 17982 17983// IfNoneMatch sets the optional parameter which makes the operation 17984// fail if the object's ETag matches the given value. This is useful for 17985// getting updates only after the object has changed since the last 17986// request. Use googleapi.IsNotModified to check whether the response 17987// error from Do is the result of In-None-Match. 17988func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall { 17989 c.ifNoneMatch_ = entityTag 17990 return c 17991} 17992 17993// Context sets the context to be used in this call's Do method. Any 17994// pending HTTP request will be aborted if the provided context is 17995// canceled. 17996func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall { 17997 c.ctx_ = ctx 17998 return c 17999} 18000 18001// Header returns an http.Header that can be modified by the caller to 18002// add HTTP headers to the request. 18003func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) Header() http.Header { 18004 if c.header_ == nil { 18005 c.header_ = make(http.Header) 18006 } 18007 return c.header_ 18008} 18009 18010func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 18011 reqHeaders := make(http.Header) 18012 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 18013 for k, v := range c.header_ { 18014 reqHeaders[k] = v 18015 } 18016 reqHeaders.Set("User-Agent", c.s.userAgent()) 18017 if c.ifNoneMatch_ != "" { 18018 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 18019 } 18020 var body io.Reader = nil 18021 c.urlParams_.Set("alt", alt) 18022 c.urlParams_.Set("prettyPrint", "false") 18023 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") 18024 urls += "?" + c.urlParams_.Encode() 18025 req, err := http.NewRequest("GET", urls, body) 18026 if err != nil { 18027 return nil, err 18028 } 18029 req.Header = reqHeaders 18030 googleapi.Expand(req.URL, map[string]string{ 18031 "resource": c.resource, 18032 }) 18033 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18034} 18035 18036// Do executes the "healthcare.projects.locations.datasets.fhirStores.getIamPolicy" call. 18037// Exactly one of *Policy or error will be non-nil. Any non-2xx status 18038// code is an error. Response headers are in either 18039// *Policy.ServerResponse.Header or (if a response was returned at all) 18040// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 18041// check whether the returned error was because http.StatusNotModified 18042// was returned. 18043func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 18044 gensupport.SetOptions(c.urlParams_, opts...) 18045 res, err := c.doRequest("json") 18046 if res != nil && res.StatusCode == http.StatusNotModified { 18047 if res.Body != nil { 18048 res.Body.Close() 18049 } 18050 return nil, &googleapi.Error{ 18051 Code: res.StatusCode, 18052 Header: res.Header, 18053 } 18054 } 18055 if err != nil { 18056 return nil, err 18057 } 18058 defer googleapi.CloseBody(res) 18059 if err := googleapi.CheckResponse(res); err != nil { 18060 return nil, err 18061 } 18062 ret := &Policy{ 18063 ServerResponse: googleapi.ServerResponse{ 18064 Header: res.Header, 18065 HTTPStatusCode: res.StatusCode, 18066 }, 18067 } 18068 target := &ret 18069 if err := gensupport.DecodeResponse(target, res); err != nil { 18070 return nil, err 18071 } 18072 return ret, nil 18073 // { 18074 // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", 18075 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}:getIamPolicy", 18076 // "httpMethod": "GET", 18077 // "id": "healthcare.projects.locations.datasets.fhirStores.getIamPolicy", 18078 // "parameterOrder": [ 18079 // "resource" 18080 // ], 18081 // "parameters": { 18082 // "options.requestedPolicyVersion": { 18083 // "description": "Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", 18084 // "format": "int32", 18085 // "location": "query", 18086 // "type": "integer" 18087 // }, 18088 // "resource": { 18089 // "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", 18090 // "location": "path", 18091 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$", 18092 // "required": true, 18093 // "type": "string" 18094 // } 18095 // }, 18096 // "path": "v1/{+resource}:getIamPolicy", 18097 // "response": { 18098 // "$ref": "Policy" 18099 // }, 18100 // "scopes": [ 18101 // "https://www.googleapis.com/auth/cloud-platform" 18102 // ] 18103 // } 18104 18105} 18106 18107// method id "healthcare.projects.locations.datasets.fhirStores.import": 18108 18109type ProjectsLocationsDatasetsFhirStoresImportCall struct { 18110 s *Service 18111 name string 18112 importresourcesrequest *ImportResourcesRequest 18113 urlParams_ gensupport.URLParams 18114 ctx_ context.Context 18115 header_ http.Header 18116} 18117 18118// Import: Imports resources to the FHIR store by loading data from the 18119// specified sources. This method is optimized to load large quantities 18120// of data using import semantics that ignore some FHIR store 18121// configuration options and are not suitable for all use cases. It is 18122// primarily intended to load data into an empty FHIR store that is not 18123// being used by other clients. In cases where this method is not 18124// appropriate, consider using ExecuteBundle to load data. Every 18125// resource in the input must contain a client-supplied ID. Each 18126// resource is stored using the supplied ID regardless of the 18127// enable_update_create setting on the FHIR store. It is strongly 18128// advised not to include or encode any sensitive data such as patient 18129// identifiers in client-specified resource IDs. Those IDs are part of 18130// the FHIR resource path recorded in Cloud Audit Logs and Cloud Pub/Sub 18131// notifications. Those IDs can also be contained in reference fields 18132// within other resources. The import process does not enforce 18133// referential integrity, regardless of the 18134// disable_referential_integrity setting on the FHIR store. This allows 18135// the import of resources with arbitrary interdependencies without 18136// considering grouping or ordering, but if the input data contains 18137// invalid references or if some resources fail to be imported, the FHIR 18138// store might be left in a state that violates referential integrity. 18139// The import process does not trigger Pub/Sub notification or BigQuery 18140// streaming update, regardless of how those are configured on the FHIR 18141// store. If a resource with the specified ID already exists, the most 18142// recent version of the resource is overwritten without creating a new 18143// historical version, regardless of the disable_resource_versioning 18144// setting on the FHIR store. If transient failures occur during the 18145// import, it's possible that successfully imported resources will be 18146// overwritten more than once. The import operation is idempotent unless 18147// the input data contains multiple valid resources with the same ID but 18148// different contents. In that case, after the import completes, the 18149// store contains exactly one resource with that ID but there is no 18150// ordering guarantee on which version of the contents it will have. The 18151// operation result counters do not count duplicate IDs as an error and 18152// count one success for each resource in the input, which might result 18153// in a success count larger than the number of resources in the FHIR 18154// store. This often occurs when importing data organized in bundles 18155// produced by Patient-everything where each bundle contains its own 18156// copy of a resource such as Practitioner that might be referred to by 18157// many patients. If some resources fail to import, for example due to 18158// parsing errors, successfully imported resources are not rolled back. 18159// The location and format of the input data is specified by the 18160// parameters in ImportResourcesRequest. Note that if no format is 18161// specified, this method assumes the `BUNDLE` format. When using the 18162// `BUNDLE` format this method ignores the `Bundle.type` field, except 18163// that `history` bundles are rejected, and does not apply any of the 18164// bundle processing semantics for batch or transaction bundles. Unlike 18165// in ExecuteBundle, transaction bundles are not executed as a single 18166// transaction and bundle-internal references are not rewritten. The 18167// bundle is treated as a collection of resources to be written as 18168// provided in `Bundle.entry.resource`, ignoring `Bundle.entry.request`. 18169// As an example, this allows the import of `searchset` bundles produced 18170// by a FHIR search or Patient-everything operation. This method returns 18171// an Operation that can be used to track the status of the import by 18172// calling GetOperation. Immediate fatal errors appear in the error 18173// field, errors are also logged to Cloud Logging (see Viewing error 18174// logs in Cloud Logging 18175// (https://cloud.google.com/healthcare/docs/how-tos/logging)). 18176// Otherwise, when the operation finishes, a detailed response of type 18177// ImportResourcesResponse is returned in the response field. The 18178// metadata field type for this operation is OperationMetadata. 18179// 18180// - name: The name of the FHIR store to import FHIR resources to, in 18181// the format of 18182// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 18183// /fhirStores/{fhir_store_id}`. 18184func (r *ProjectsLocationsDatasetsFhirStoresService) Import(name string, importresourcesrequest *ImportResourcesRequest) *ProjectsLocationsDatasetsFhirStoresImportCall { 18185 c := &ProjectsLocationsDatasetsFhirStoresImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18186 c.name = name 18187 c.importresourcesrequest = importresourcesrequest 18188 return c 18189} 18190 18191// Fields allows partial responses to be retrieved. See 18192// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18193// for more information. 18194func (c *ProjectsLocationsDatasetsFhirStoresImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresImportCall { 18195 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18196 return c 18197} 18198 18199// Context sets the context to be used in this call's Do method. Any 18200// pending HTTP request will be aborted if the provided context is 18201// canceled. 18202func (c *ProjectsLocationsDatasetsFhirStoresImportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresImportCall { 18203 c.ctx_ = ctx 18204 return c 18205} 18206 18207// Header returns an http.Header that can be modified by the caller to 18208// add HTTP headers to the request. 18209func (c *ProjectsLocationsDatasetsFhirStoresImportCall) Header() http.Header { 18210 if c.header_ == nil { 18211 c.header_ = make(http.Header) 18212 } 18213 return c.header_ 18214} 18215 18216func (c *ProjectsLocationsDatasetsFhirStoresImportCall) doRequest(alt string) (*http.Response, error) { 18217 reqHeaders := make(http.Header) 18218 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 18219 for k, v := range c.header_ { 18220 reqHeaders[k] = v 18221 } 18222 reqHeaders.Set("User-Agent", c.s.userAgent()) 18223 var body io.Reader = nil 18224 body, err := googleapi.WithoutDataWrapper.JSONReader(c.importresourcesrequest) 18225 if err != nil { 18226 return nil, err 18227 } 18228 reqHeaders.Set("Content-Type", "application/json") 18229 c.urlParams_.Set("alt", alt) 18230 c.urlParams_.Set("prettyPrint", "false") 18231 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:import") 18232 urls += "?" + c.urlParams_.Encode() 18233 req, err := http.NewRequest("POST", urls, body) 18234 if err != nil { 18235 return nil, err 18236 } 18237 req.Header = reqHeaders 18238 googleapi.Expand(req.URL, map[string]string{ 18239 "name": c.name, 18240 }) 18241 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18242} 18243 18244// Do executes the "healthcare.projects.locations.datasets.fhirStores.import" call. 18245// Exactly one of *Operation or error will be non-nil. Any non-2xx 18246// status code is an error. Response headers are in either 18247// *Operation.ServerResponse.Header or (if a response was returned at 18248// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 18249// to check whether the returned error was because 18250// http.StatusNotModified was returned. 18251func (c *ProjectsLocationsDatasetsFhirStoresImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 18252 gensupport.SetOptions(c.urlParams_, opts...) 18253 res, err := c.doRequest("json") 18254 if res != nil && res.StatusCode == http.StatusNotModified { 18255 if res.Body != nil { 18256 res.Body.Close() 18257 } 18258 return nil, &googleapi.Error{ 18259 Code: res.StatusCode, 18260 Header: res.Header, 18261 } 18262 } 18263 if err != nil { 18264 return nil, err 18265 } 18266 defer googleapi.CloseBody(res) 18267 if err := googleapi.CheckResponse(res); err != nil { 18268 return nil, err 18269 } 18270 ret := &Operation{ 18271 ServerResponse: googleapi.ServerResponse{ 18272 Header: res.Header, 18273 HTTPStatusCode: res.StatusCode, 18274 }, 18275 } 18276 target := &ret 18277 if err := gensupport.DecodeResponse(target, res); err != nil { 18278 return nil, err 18279 } 18280 return ret, nil 18281 // { 18282 // "description": "Imports resources to the FHIR store by loading data from the specified sources. This method is optimized to load large quantities of data using import semantics that ignore some FHIR store configuration options and are not suitable for all use cases. It is primarily intended to load data into an empty FHIR store that is not being used by other clients. In cases where this method is not appropriate, consider using ExecuteBundle to load data. Every resource in the input must contain a client-supplied ID. Each resource is stored using the supplied ID regardless of the enable_update_create setting on the FHIR store. It is strongly advised not to include or encode any sensitive data such as patient identifiers in client-specified resource IDs. Those IDs are part of the FHIR resource path recorded in Cloud Audit Logs and Cloud Pub/Sub notifications. Those IDs can also be contained in reference fields within other resources. The import process does not enforce referential integrity, regardless of the disable_referential_integrity setting on the FHIR store. This allows the import of resources with arbitrary interdependencies without considering grouping or ordering, but if the input data contains invalid references or if some resources fail to be imported, the FHIR store might be left in a state that violates referential integrity. The import process does not trigger Pub/Sub notification or BigQuery streaming update, regardless of how those are configured on the FHIR store. If a resource with the specified ID already exists, the most recent version of the resource is overwritten without creating a new historical version, regardless of the disable_resource_versioning setting on the FHIR store. If transient failures occur during the import, it's possible that successfully imported resources will be overwritten more than once. The import operation is idempotent unless the input data contains multiple valid resources with the same ID but different contents. In that case, after the import completes, the store contains exactly one resource with that ID but there is no ordering guarantee on which version of the contents it will have. The operation result counters do not count duplicate IDs as an error and count one success for each resource in the input, which might result in a success count larger than the number of resources in the FHIR store. This often occurs when importing data organized in bundles produced by Patient-everything where each bundle contains its own copy of a resource such as Practitioner that might be referred to by many patients. If some resources fail to import, for example due to parsing errors, successfully imported resources are not rolled back. The location and format of the input data is specified by the parameters in ImportResourcesRequest. Note that if no format is specified, this method assumes the `BUNDLE` format. When using the `BUNDLE` format this method ignores the `Bundle.type` field, except that `history` bundles are rejected, and does not apply any of the bundle processing semantics for batch or transaction bundles. Unlike in ExecuteBundle, transaction bundles are not executed as a single transaction and bundle-internal references are not rewritten. The bundle is treated as a collection of resources to be written as provided in `Bundle.entry.resource`, ignoring `Bundle.entry.request`. As an example, this allows the import of `searchset` bundles produced by a FHIR search or Patient-everything operation. This method returns an Operation that can be used to track the status of the import by calling GetOperation. Immediate fatal errors appear in the error field, errors are also logged to Cloud Logging (see [Viewing error logs in Cloud Logging](https://cloud.google.com/healthcare/docs/how-tos/logging)). Otherwise, when the operation finishes, a detailed response of type ImportResourcesResponse is returned in the response field. The metadata field type for this operation is OperationMetadata.", 18283 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}:import", 18284 // "httpMethod": "POST", 18285 // "id": "healthcare.projects.locations.datasets.fhirStores.import", 18286 // "parameterOrder": [ 18287 // "name" 18288 // ], 18289 // "parameters": { 18290 // "name": { 18291 // "description": "The name of the FHIR store to import FHIR resources to, in the format of `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}`.", 18292 // "location": "path", 18293 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$", 18294 // "required": true, 18295 // "type": "string" 18296 // } 18297 // }, 18298 // "path": "v1/{+name}:import", 18299 // "request": { 18300 // "$ref": "ImportResourcesRequest" 18301 // }, 18302 // "response": { 18303 // "$ref": "Operation" 18304 // }, 18305 // "scopes": [ 18306 // "https://www.googleapis.com/auth/cloud-platform" 18307 // ] 18308 // } 18309 18310} 18311 18312// method id "healthcare.projects.locations.datasets.fhirStores.list": 18313 18314type ProjectsLocationsDatasetsFhirStoresListCall struct { 18315 s *Service 18316 parent string 18317 urlParams_ gensupport.URLParams 18318 ifNoneMatch_ string 18319 ctx_ context.Context 18320 header_ http.Header 18321} 18322 18323// List: Lists the FHIR stores in the given dataset. 18324// 18325// - parent: Name of the dataset. 18326func (r *ProjectsLocationsDatasetsFhirStoresService) List(parent string) *ProjectsLocationsDatasetsFhirStoresListCall { 18327 c := &ProjectsLocationsDatasetsFhirStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18328 c.parent = parent 18329 return c 18330} 18331 18332// Filter sets the optional parameter "filter": Restricts stores 18333// returned to those matching a filter. The following syntax is 18334// available: * A string field value can be written as text inside 18335// quotation marks, for example "query text". The only valid 18336// relational operation for text fields is equality (`=`), where text is 18337// searched within the field, rather than having the field be equal to 18338// the text. For example, "Comment = great" returns messages with 18339// `great` in the comment field. * A number field value can be written 18340// as an integer, a decimal, or an exponential. The valid relational 18341// operators for number fields are the equality operator (`=`), along 18342// with the less than/greater than operators (`<`, `<=`, `>`, `>=`). 18343// Note that there is no inequality (`!=`) operator. You can prepend the 18344// `NOT` operator to an expression to negate it. * A date field value 18345// must be written in `yyyy-mm-dd` form. Fields with date and time use 18346// the RFC3339 time format. Leading zeros are required for one-digit 18347// months and days. The valid relational operators for date fields are 18348// the equality operator (`=`) , along with the less than/greater than 18349// operators (`<`, `<=`, `>`, `>=`). Note that there is no inequality 18350// (`!=`) operator. You can prepend the `NOT` operator to an expression 18351// to negate it. * Multiple field query expressions can be combined in 18352// one query by adding `AND` or `OR` operators between the expressions. 18353// If a boolean operator appears within a quoted string, it is not 18354// treated as special, it's just another part of the character string to 18355// be matched. You can prepend the `NOT` operator to an expression to 18356// negate it. Only filtering on labels is supported, for example 18357// `labels.key=value`. 18358func (c *ProjectsLocationsDatasetsFhirStoresListCall) Filter(filter string) *ProjectsLocationsDatasetsFhirStoresListCall { 18359 c.urlParams_.Set("filter", filter) 18360 return c 18361} 18362 18363// PageSize sets the optional parameter "pageSize": Limit on the number 18364// of FHIR stores to return in a single response. If not specified, 100 18365// is used. May not be larger than 1000. 18366func (c *ProjectsLocationsDatasetsFhirStoresListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsFhirStoresListCall { 18367 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 18368 return c 18369} 18370 18371// PageToken sets the optional parameter "pageToken": The 18372// next_page_token value returned from the previous List request, if 18373// any. 18374func (c *ProjectsLocationsDatasetsFhirStoresListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsFhirStoresListCall { 18375 c.urlParams_.Set("pageToken", pageToken) 18376 return c 18377} 18378 18379// Fields allows partial responses to be retrieved. See 18380// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18381// for more information. 18382func (c *ProjectsLocationsDatasetsFhirStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresListCall { 18383 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18384 return c 18385} 18386 18387// IfNoneMatch sets the optional parameter which makes the operation 18388// fail if the object's ETag matches the given value. This is useful for 18389// getting updates only after the object has changed since the last 18390// request. Use googleapi.IsNotModified to check whether the response 18391// error from Do is the result of In-None-Match. 18392func (c *ProjectsLocationsDatasetsFhirStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresListCall { 18393 c.ifNoneMatch_ = entityTag 18394 return c 18395} 18396 18397// Context sets the context to be used in this call's Do method. Any 18398// pending HTTP request will be aborted if the provided context is 18399// canceled. 18400func (c *ProjectsLocationsDatasetsFhirStoresListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresListCall { 18401 c.ctx_ = ctx 18402 return c 18403} 18404 18405// Header returns an http.Header that can be modified by the caller to 18406// add HTTP headers to the request. 18407func (c *ProjectsLocationsDatasetsFhirStoresListCall) Header() http.Header { 18408 if c.header_ == nil { 18409 c.header_ = make(http.Header) 18410 } 18411 return c.header_ 18412} 18413 18414func (c *ProjectsLocationsDatasetsFhirStoresListCall) doRequest(alt string) (*http.Response, error) { 18415 reqHeaders := make(http.Header) 18416 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 18417 for k, v := range c.header_ { 18418 reqHeaders[k] = v 18419 } 18420 reqHeaders.Set("User-Agent", c.s.userAgent()) 18421 if c.ifNoneMatch_ != "" { 18422 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 18423 } 18424 var body io.Reader = nil 18425 c.urlParams_.Set("alt", alt) 18426 c.urlParams_.Set("prettyPrint", "false") 18427 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/fhirStores") 18428 urls += "?" + c.urlParams_.Encode() 18429 req, err := http.NewRequest("GET", urls, body) 18430 if err != nil { 18431 return nil, err 18432 } 18433 req.Header = reqHeaders 18434 googleapi.Expand(req.URL, map[string]string{ 18435 "parent": c.parent, 18436 }) 18437 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18438} 18439 18440// Do executes the "healthcare.projects.locations.datasets.fhirStores.list" call. 18441// Exactly one of *ListFhirStoresResponse or error will be non-nil. Any 18442// non-2xx status code is an error. Response headers are in either 18443// *ListFhirStoresResponse.ServerResponse.Header or (if a response was 18444// returned at all) in error.(*googleapi.Error).Header. Use 18445// googleapi.IsNotModified to check whether the returned error was 18446// because http.StatusNotModified was returned. 18447func (c *ProjectsLocationsDatasetsFhirStoresListCall) Do(opts ...googleapi.CallOption) (*ListFhirStoresResponse, error) { 18448 gensupport.SetOptions(c.urlParams_, opts...) 18449 res, err := c.doRequest("json") 18450 if res != nil && res.StatusCode == http.StatusNotModified { 18451 if res.Body != nil { 18452 res.Body.Close() 18453 } 18454 return nil, &googleapi.Error{ 18455 Code: res.StatusCode, 18456 Header: res.Header, 18457 } 18458 } 18459 if err != nil { 18460 return nil, err 18461 } 18462 defer googleapi.CloseBody(res) 18463 if err := googleapi.CheckResponse(res); err != nil { 18464 return nil, err 18465 } 18466 ret := &ListFhirStoresResponse{ 18467 ServerResponse: googleapi.ServerResponse{ 18468 Header: res.Header, 18469 HTTPStatusCode: res.StatusCode, 18470 }, 18471 } 18472 target := &ret 18473 if err := gensupport.DecodeResponse(target, res); err != nil { 18474 return nil, err 18475 } 18476 return ret, nil 18477 // { 18478 // "description": "Lists the FHIR stores in the given dataset.", 18479 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores", 18480 // "httpMethod": "GET", 18481 // "id": "healthcare.projects.locations.datasets.fhirStores.list", 18482 // "parameterOrder": [ 18483 // "parent" 18484 // ], 18485 // "parameters": { 18486 // "filter": { 18487 // "description": "Restricts stores returned to those matching a filter. The following syntax is available: * A string field value can be written as text inside quotation marks, for example `\"query text\"`. The only valid relational operation for text fields is equality (`=`), where text is searched within the field, rather than having the field be equal to the text. For example, `\"Comment = great\"` returns messages with `great` in the comment field. * A number field value can be written as an integer, a decimal, or an exponential. The valid relational operators for number fields are the equality operator (`=`), along with the less than/greater than operators (`\u003c`, `\u003c=`, `\u003e`, `\u003e=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * A date field value must be written in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format. Leading zeros are required for one-digit months and days. The valid relational operators for date fields are the equality operator (`=`) , along with the less than/greater than operators (`\u003c`, `\u003c=`, `\u003e`, `\u003e=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * Multiple field query expressions can be combined in one query by adding `AND` or `OR` operators between the expressions. If a boolean operator appears within a quoted string, it is not treated as special, it's just another part of the character string to be matched. You can prepend the `NOT` operator to an expression to negate it. Only filtering on labels is supported, for example `labels.key=value`.", 18488 // "location": "query", 18489 // "type": "string" 18490 // }, 18491 // "pageSize": { 18492 // "description": "Limit on the number of FHIR stores to return in a single response. If not specified, 100 is used. May not be larger than 1000.", 18493 // "format": "int32", 18494 // "location": "query", 18495 // "type": "integer" 18496 // }, 18497 // "pageToken": { 18498 // "description": "The next_page_token value returned from the previous List request, if any.", 18499 // "location": "query", 18500 // "type": "string" 18501 // }, 18502 // "parent": { 18503 // "description": "Name of the dataset.", 18504 // "location": "path", 18505 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", 18506 // "required": true, 18507 // "type": "string" 18508 // } 18509 // }, 18510 // "path": "v1/{+parent}/fhirStores", 18511 // "response": { 18512 // "$ref": "ListFhirStoresResponse" 18513 // }, 18514 // "scopes": [ 18515 // "https://www.googleapis.com/auth/cloud-platform" 18516 // ] 18517 // } 18518 18519} 18520 18521// Pages invokes f for each page of results. 18522// A non-nil error returned from f will halt the iteration. 18523// The provided context supersedes any context provided to the Context method. 18524func (c *ProjectsLocationsDatasetsFhirStoresListCall) Pages(ctx context.Context, f func(*ListFhirStoresResponse) error) error { 18525 c.ctx_ = ctx 18526 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 18527 for { 18528 x, err := c.Do() 18529 if err != nil { 18530 return err 18531 } 18532 if err := f(x); err != nil { 18533 return err 18534 } 18535 if x.NextPageToken == "" { 18536 return nil 18537 } 18538 c.PageToken(x.NextPageToken) 18539 } 18540} 18541 18542// method id "healthcare.projects.locations.datasets.fhirStores.patch": 18543 18544type ProjectsLocationsDatasetsFhirStoresPatchCall struct { 18545 s *Service 18546 name string 18547 fhirstore *FhirStore 18548 urlParams_ gensupport.URLParams 18549 ctx_ context.Context 18550 header_ http.Header 18551} 18552 18553// Patch: Updates the configuration of the specified FHIR store. 18554// 18555// - name: Output only. Resource name of the FHIR store, of the form 18556// `projects/{project_id}/datasets/{dataset_id}/fhirStores/{fhir_store_ 18557// id}`. 18558func (r *ProjectsLocationsDatasetsFhirStoresService) Patch(name string, fhirstore *FhirStore) *ProjectsLocationsDatasetsFhirStoresPatchCall { 18559 c := &ProjectsLocationsDatasetsFhirStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18560 c.name = name 18561 c.fhirstore = fhirstore 18562 return c 18563} 18564 18565// UpdateMask sets the optional parameter "updateMask": The update mask 18566// applies to the resource. For the `FieldMask` definition, see 18567// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask 18568func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsFhirStoresPatchCall { 18569 c.urlParams_.Set("updateMask", updateMask) 18570 return c 18571} 18572 18573// Fields allows partial responses to be retrieved. See 18574// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18575// for more information. 18576func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresPatchCall { 18577 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18578 return c 18579} 18580 18581// Context sets the context to be used in this call's Do method. Any 18582// pending HTTP request will be aborted if the provided context is 18583// canceled. 18584func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresPatchCall { 18585 c.ctx_ = ctx 18586 return c 18587} 18588 18589// Header returns an http.Header that can be modified by the caller to 18590// add HTTP headers to the request. 18591func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) Header() http.Header { 18592 if c.header_ == nil { 18593 c.header_ = make(http.Header) 18594 } 18595 return c.header_ 18596} 18597 18598func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) doRequest(alt string) (*http.Response, error) { 18599 reqHeaders := make(http.Header) 18600 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 18601 for k, v := range c.header_ { 18602 reqHeaders[k] = v 18603 } 18604 reqHeaders.Set("User-Agent", c.s.userAgent()) 18605 var body io.Reader = nil 18606 body, err := googleapi.WithoutDataWrapper.JSONReader(c.fhirstore) 18607 if err != nil { 18608 return nil, err 18609 } 18610 reqHeaders.Set("Content-Type", "application/json") 18611 c.urlParams_.Set("alt", alt) 18612 c.urlParams_.Set("prettyPrint", "false") 18613 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 18614 urls += "?" + c.urlParams_.Encode() 18615 req, err := http.NewRequest("PATCH", urls, body) 18616 if err != nil { 18617 return nil, err 18618 } 18619 req.Header = reqHeaders 18620 googleapi.Expand(req.URL, map[string]string{ 18621 "name": c.name, 18622 }) 18623 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18624} 18625 18626// Do executes the "healthcare.projects.locations.datasets.fhirStores.patch" call. 18627// Exactly one of *FhirStore or error will be non-nil. Any non-2xx 18628// status code is an error. Response headers are in either 18629// *FhirStore.ServerResponse.Header or (if a response was returned at 18630// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 18631// to check whether the returned error was because 18632// http.StatusNotModified was returned. 18633func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) Do(opts ...googleapi.CallOption) (*FhirStore, error) { 18634 gensupport.SetOptions(c.urlParams_, opts...) 18635 res, err := c.doRequest("json") 18636 if res != nil && res.StatusCode == http.StatusNotModified { 18637 if res.Body != nil { 18638 res.Body.Close() 18639 } 18640 return nil, &googleapi.Error{ 18641 Code: res.StatusCode, 18642 Header: res.Header, 18643 } 18644 } 18645 if err != nil { 18646 return nil, err 18647 } 18648 defer googleapi.CloseBody(res) 18649 if err := googleapi.CheckResponse(res); err != nil { 18650 return nil, err 18651 } 18652 ret := &FhirStore{ 18653 ServerResponse: googleapi.ServerResponse{ 18654 Header: res.Header, 18655 HTTPStatusCode: res.StatusCode, 18656 }, 18657 } 18658 target := &ret 18659 if err := gensupport.DecodeResponse(target, res); err != nil { 18660 return nil, err 18661 } 18662 return ret, nil 18663 // { 18664 // "description": "Updates the configuration of the specified FHIR store.", 18665 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}", 18666 // "httpMethod": "PATCH", 18667 // "id": "healthcare.projects.locations.datasets.fhirStores.patch", 18668 // "parameterOrder": [ 18669 // "name" 18670 // ], 18671 // "parameters": { 18672 // "name": { 18673 // "description": "Output only. Resource name of the FHIR store, of the form `projects/{project_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}`.", 18674 // "location": "path", 18675 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$", 18676 // "required": true, 18677 // "type": "string" 18678 // }, 18679 // "updateMask": { 18680 // "description": "The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", 18681 // "format": "google-fieldmask", 18682 // "location": "query", 18683 // "type": "string" 18684 // } 18685 // }, 18686 // "path": "v1/{+name}", 18687 // "request": { 18688 // "$ref": "FhirStore" 18689 // }, 18690 // "response": { 18691 // "$ref": "FhirStore" 18692 // }, 18693 // "scopes": [ 18694 // "https://www.googleapis.com/auth/cloud-platform" 18695 // ] 18696 // } 18697 18698} 18699 18700// method id "healthcare.projects.locations.datasets.fhirStores.setIamPolicy": 18701 18702type ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall struct { 18703 s *Service 18704 resource string 18705 setiampolicyrequest *SetIamPolicyRequest 18706 urlParams_ gensupport.URLParams 18707 ctx_ context.Context 18708 header_ http.Header 18709} 18710 18711// SetIamPolicy: Sets the access control policy on the specified 18712// resource. Replaces any existing policy. Can return `NOT_FOUND`, 18713// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. 18714// 18715// - resource: REQUIRED: The resource for which the policy is being 18716// specified. See the operation documentation for the appropriate 18717// value for this field. 18718func (r *ProjectsLocationsDatasetsFhirStoresService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall { 18719 c := &ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18720 c.resource = resource 18721 c.setiampolicyrequest = setiampolicyrequest 18722 return c 18723} 18724 18725// Fields allows partial responses to be retrieved. See 18726// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18727// for more information. 18728func (c *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall { 18729 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18730 return c 18731} 18732 18733// Context sets the context to be used in this call's Do method. Any 18734// pending HTTP request will be aborted if the provided context is 18735// canceled. 18736func (c *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall { 18737 c.ctx_ = ctx 18738 return c 18739} 18740 18741// Header returns an http.Header that can be modified by the caller to 18742// add HTTP headers to the request. 18743func (c *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall) Header() http.Header { 18744 if c.header_ == nil { 18745 c.header_ = make(http.Header) 18746 } 18747 return c.header_ 18748} 18749 18750func (c *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 18751 reqHeaders := make(http.Header) 18752 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 18753 for k, v := range c.header_ { 18754 reqHeaders[k] = v 18755 } 18756 reqHeaders.Set("User-Agent", c.s.userAgent()) 18757 var body io.Reader = nil 18758 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 18759 if err != nil { 18760 return nil, err 18761 } 18762 reqHeaders.Set("Content-Type", "application/json") 18763 c.urlParams_.Set("alt", alt) 18764 c.urlParams_.Set("prettyPrint", "false") 18765 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") 18766 urls += "?" + c.urlParams_.Encode() 18767 req, err := http.NewRequest("POST", urls, body) 18768 if err != nil { 18769 return nil, err 18770 } 18771 req.Header = reqHeaders 18772 googleapi.Expand(req.URL, map[string]string{ 18773 "resource": c.resource, 18774 }) 18775 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18776} 18777 18778// Do executes the "healthcare.projects.locations.datasets.fhirStores.setIamPolicy" call. 18779// Exactly one of *Policy or error will be non-nil. Any non-2xx status 18780// code is an error. Response headers are in either 18781// *Policy.ServerResponse.Header or (if a response was returned at all) 18782// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 18783// check whether the returned error was because http.StatusNotModified 18784// was returned. 18785func (c *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 18786 gensupport.SetOptions(c.urlParams_, opts...) 18787 res, err := c.doRequest("json") 18788 if res != nil && res.StatusCode == http.StatusNotModified { 18789 if res.Body != nil { 18790 res.Body.Close() 18791 } 18792 return nil, &googleapi.Error{ 18793 Code: res.StatusCode, 18794 Header: res.Header, 18795 } 18796 } 18797 if err != nil { 18798 return nil, err 18799 } 18800 defer googleapi.CloseBody(res) 18801 if err := googleapi.CheckResponse(res); err != nil { 18802 return nil, err 18803 } 18804 ret := &Policy{ 18805 ServerResponse: googleapi.ServerResponse{ 18806 Header: res.Header, 18807 HTTPStatusCode: res.StatusCode, 18808 }, 18809 } 18810 target := &ret 18811 if err := gensupport.DecodeResponse(target, res); err != nil { 18812 return nil, err 18813 } 18814 return ret, nil 18815 // { 18816 // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", 18817 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}:setIamPolicy", 18818 // "httpMethod": "POST", 18819 // "id": "healthcare.projects.locations.datasets.fhirStores.setIamPolicy", 18820 // "parameterOrder": [ 18821 // "resource" 18822 // ], 18823 // "parameters": { 18824 // "resource": { 18825 // "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", 18826 // "location": "path", 18827 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$", 18828 // "required": true, 18829 // "type": "string" 18830 // } 18831 // }, 18832 // "path": "v1/{+resource}:setIamPolicy", 18833 // "request": { 18834 // "$ref": "SetIamPolicyRequest" 18835 // }, 18836 // "response": { 18837 // "$ref": "Policy" 18838 // }, 18839 // "scopes": [ 18840 // "https://www.googleapis.com/auth/cloud-platform" 18841 // ] 18842 // } 18843 18844} 18845 18846// method id "healthcare.projects.locations.datasets.fhirStores.testIamPermissions": 18847 18848type ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall struct { 18849 s *Service 18850 resource string 18851 testiampermissionsrequest *TestIamPermissionsRequest 18852 urlParams_ gensupport.URLParams 18853 ctx_ context.Context 18854 header_ http.Header 18855} 18856 18857// TestIamPermissions: Returns permissions that a caller has on the 18858// specified resource. If the resource does not exist, this will return 18859// an empty set of permissions, not a `NOT_FOUND` error. Note: This 18860// operation is designed to be used for building permission-aware UIs 18861// and command-line tools, not for authorization checking. This 18862// operation may "fail open" without warning. 18863// 18864// - resource: REQUIRED: The resource for which the policy detail is 18865// being requested. See the operation documentation for the 18866// appropriate value for this field. 18867func (r *ProjectsLocationsDatasetsFhirStoresService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall { 18868 c := &ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18869 c.resource = resource 18870 c.testiampermissionsrequest = testiampermissionsrequest 18871 return c 18872} 18873 18874// Fields allows partial responses to be retrieved. See 18875// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18876// for more information. 18877func (c *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall { 18878 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18879 return c 18880} 18881 18882// Context sets the context to be used in this call's Do method. Any 18883// pending HTTP request will be aborted if the provided context is 18884// canceled. 18885func (c *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall { 18886 c.ctx_ = ctx 18887 return c 18888} 18889 18890// Header returns an http.Header that can be modified by the caller to 18891// add HTTP headers to the request. 18892func (c *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall) Header() http.Header { 18893 if c.header_ == nil { 18894 c.header_ = make(http.Header) 18895 } 18896 return c.header_ 18897} 18898 18899func (c *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 18900 reqHeaders := make(http.Header) 18901 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 18902 for k, v := range c.header_ { 18903 reqHeaders[k] = v 18904 } 18905 reqHeaders.Set("User-Agent", c.s.userAgent()) 18906 var body io.Reader = nil 18907 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 18908 if err != nil { 18909 return nil, err 18910 } 18911 reqHeaders.Set("Content-Type", "application/json") 18912 c.urlParams_.Set("alt", alt) 18913 c.urlParams_.Set("prettyPrint", "false") 18914 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") 18915 urls += "?" + c.urlParams_.Encode() 18916 req, err := http.NewRequest("POST", urls, body) 18917 if err != nil { 18918 return nil, err 18919 } 18920 req.Header = reqHeaders 18921 googleapi.Expand(req.URL, map[string]string{ 18922 "resource": c.resource, 18923 }) 18924 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18925} 18926 18927// Do executes the "healthcare.projects.locations.datasets.fhirStores.testIamPermissions" call. 18928// Exactly one of *TestIamPermissionsResponse or error will be non-nil. 18929// Any non-2xx status code is an error. Response headers are in either 18930// *TestIamPermissionsResponse.ServerResponse.Header or (if a response 18931// was returned at all) in error.(*googleapi.Error).Header. Use 18932// googleapi.IsNotModified to check whether the returned error was 18933// because http.StatusNotModified was returned. 18934func (c *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 18935 gensupport.SetOptions(c.urlParams_, opts...) 18936 res, err := c.doRequest("json") 18937 if res != nil && res.StatusCode == http.StatusNotModified { 18938 if res.Body != nil { 18939 res.Body.Close() 18940 } 18941 return nil, &googleapi.Error{ 18942 Code: res.StatusCode, 18943 Header: res.Header, 18944 } 18945 } 18946 if err != nil { 18947 return nil, err 18948 } 18949 defer googleapi.CloseBody(res) 18950 if err := googleapi.CheckResponse(res); err != nil { 18951 return nil, err 18952 } 18953 ret := &TestIamPermissionsResponse{ 18954 ServerResponse: googleapi.ServerResponse{ 18955 Header: res.Header, 18956 HTTPStatusCode: res.StatusCode, 18957 }, 18958 } 18959 target := &ret 18960 if err := gensupport.DecodeResponse(target, res); err != nil { 18961 return nil, err 18962 } 18963 return ret, nil 18964 // { 18965 // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", 18966 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}:testIamPermissions", 18967 // "httpMethod": "POST", 18968 // "id": "healthcare.projects.locations.datasets.fhirStores.testIamPermissions", 18969 // "parameterOrder": [ 18970 // "resource" 18971 // ], 18972 // "parameters": { 18973 // "resource": { 18974 // "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", 18975 // "location": "path", 18976 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$", 18977 // "required": true, 18978 // "type": "string" 18979 // } 18980 // }, 18981 // "path": "v1/{+resource}:testIamPermissions", 18982 // "request": { 18983 // "$ref": "TestIamPermissionsRequest" 18984 // }, 18985 // "response": { 18986 // "$ref": "TestIamPermissionsResponse" 18987 // }, 18988 // "scopes": [ 18989 // "https://www.googleapis.com/auth/cloud-platform" 18990 // ] 18991 // } 18992 18993} 18994 18995// method id "healthcare.projects.locations.datasets.fhirStores.fhir.Patient-everything": 18996 18997type ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall struct { 18998 s *Service 18999 name string 19000 urlParams_ gensupport.URLParams 19001 ifNoneMatch_ string 19002 ctx_ context.Context 19003 header_ http.Header 19004} 19005 19006// PatientEverything: Retrieves a Patient resource and resources related 19007// to that patient. Implements the FHIR extended operation 19008// Patient-everything (DSTU2 19009// (http://hl7.org/implement/standards/fhir/DSTU2/patient-operations.html#everything), 19010// STU3 19011// (http://hl7.org/implement/standards/fhir/STU3/patient-operations.html#everything), 19012// R4 19013// (http://hl7.org/implement/standards/fhir/R4/patient-operations.html#everything)). 19014// On success, the response body contains a JSON-encoded representation 19015// of a `Bundle` resource of type `searchset`, containing the results of 19016// the operation. Errors generated by the FHIR store contain a 19017// JSON-encoded `OperationOutcome` resource describing the reason for 19018// the error. If the request cannot be mapped to a valid API method on a 19019// FHIR store, a generic GCP error might be returned instead. The 19020// resources in scope for the response are: * The patient resource 19021// itself. * All the resources directly referenced by the patient 19022// resource. * Resources directly referencing the patient resource that 19023// meet the inclusion criteria. The inclusion criteria are based on the 19024// membership rules in the patient compartment definition (DSTU2 19025// (http://hl7.org/fhir/DSTU2/compartment-patient.html), STU3 19026// (http://www.hl7.org/fhir/stu3/compartmentdefinition-patient.html), R4 19027// (http://hl7.org/fhir/R4/compartmentdefinition-patient.html)), which 19028// details the eligible resource types and referencing search 19029// parameters. For samples that show how to call `Patient-everything`, 19030// see Getting all patient compartment resources 19031// (/healthcare/docs/how-tos/fhir-resources#getting_all_patient_compartme 19032// nt_resources). 19033// 19034// - name: Name of the `Patient` resource for which the information is 19035// required. 19036func (r *ProjectsLocationsDatasetsFhirStoresFhirService) PatientEverything(name string) *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall { 19037 c := &ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19038 c.name = name 19039 return c 19040} 19041 19042// Count sets the optional parameter "_count": Maximum number of 19043// resources in a page. If not specified, 100 is used. May not be larger 19044// than 1000. 19045func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) Count(Count int64) *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall { 19046 c.urlParams_.Set("_count", fmt.Sprint(Count)) 19047 return c 19048} 19049 19050// PageToken sets the optional parameter "_page_token": Used to retrieve 19051// the next or previous page of results when using pagination. Set 19052// `_page_token` to the value of _page_token set in next or previous 19053// page links' url. Next and previous page are returned in the response 19054// bundle's links field, where `link.relation` is "previous" or "next". 19055// Omit `_page_token` if no previous request has been made. 19056func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) PageToken(PageToken string) *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall { 19057 c.urlParams_.Set("_page_token", PageToken) 19058 return c 19059} 19060 19061// Since sets the optional parameter "_since": If provided, only 19062// resources updated after this time are returned. The time uses the 19063// format YYYY-MM-DDThh:mm:ss.sss+zz:zz. For example, 19064// `2015-02-07T13:28:17.239+02:00` or `2017-01-01T00:00:00Z`. The time 19065// must be specified to the second and include a time zone. 19066func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) Since(Since string) *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall { 19067 c.urlParams_.Set("_since", Since) 19068 return c 19069} 19070 19071// Type sets the optional parameter "_type": String of comma-delimited 19072// FHIR resource types. If provided, only resources of the specified 19073// resource type(s) are returned. 19074func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) Type(Type string) *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall { 19075 c.urlParams_.Set("_type", Type) 19076 return c 19077} 19078 19079// End sets the optional parameter "end": The response includes records 19080// prior to the end date. If no end date is provided, all records 19081// subsequent to the start date are in scope. 19082func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) End(end string) *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall { 19083 c.urlParams_.Set("end", end) 19084 return c 19085} 19086 19087// Start sets the optional parameter "start": The response includes 19088// records subsequent to the start date. If no start date is provided, 19089// all records prior to the end date are in scope. 19090func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) Start(start string) *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall { 19091 c.urlParams_.Set("start", start) 19092 return c 19093} 19094 19095// Fields allows partial responses to be retrieved. See 19096// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19097// for more information. 19098func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall { 19099 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19100 return c 19101} 19102 19103// IfNoneMatch sets the optional parameter which makes the operation 19104// fail if the object's ETag matches the given value. This is useful for 19105// getting updates only after the object has changed since the last 19106// request. Use googleapi.IsNotModified to check whether the response 19107// error from Do is the result of In-None-Match. 19108func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall { 19109 c.ifNoneMatch_ = entityTag 19110 return c 19111} 19112 19113// Context sets the context to be used in this call's Do method. Any 19114// pending HTTP request will be aborted if the provided context is 19115// canceled. 19116func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall { 19117 c.ctx_ = ctx 19118 return c 19119} 19120 19121// Header returns an http.Header that can be modified by the caller to 19122// add HTTP headers to the request. 19123func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) Header() http.Header { 19124 if c.header_ == nil { 19125 c.header_ = make(http.Header) 19126 } 19127 return c.header_ 19128} 19129 19130func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) doRequest(alt string) (*http.Response, error) { 19131 reqHeaders := make(http.Header) 19132 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 19133 for k, v := range c.header_ { 19134 reqHeaders[k] = v 19135 } 19136 reqHeaders.Set("User-Agent", c.s.userAgent()) 19137 if c.ifNoneMatch_ != "" { 19138 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 19139 } 19140 var body io.Reader = nil 19141 c.urlParams_.Set("alt", alt) 19142 c.urlParams_.Set("prettyPrint", "false") 19143 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/$everything") 19144 urls += "?" + c.urlParams_.Encode() 19145 req, err := http.NewRequest("GET", urls, body) 19146 if err != nil { 19147 return nil, err 19148 } 19149 req.Header = reqHeaders 19150 googleapi.Expand(req.URL, map[string]string{ 19151 "name": c.name, 19152 }) 19153 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19154} 19155 19156// Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.Patient-everything" call. 19157func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 19158 gensupport.SetOptions(c.urlParams_, opts...) 19159 return c.doRequest("") 19160 // { 19161 // "description": "Retrieves a Patient resource and resources related to that patient. Implements the FHIR extended operation Patient-everything ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/patient-operations.html#everything), [STU3](http://hl7.org/implement/standards/fhir/STU3/patient-operations.html#everything), [R4](http://hl7.org/implement/standards/fhir/R4/patient-operations.html#everything)). On success, the response body contains a JSON-encoded representation of a `Bundle` resource of type `searchset`, containing the results of the operation. Errors generated by the FHIR store contain a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead. The resources in scope for the response are: * The patient resource itself. * All the resources directly referenced by the patient resource. * Resources directly referencing the patient resource that meet the inclusion criteria. The inclusion criteria are based on the membership rules in the patient compartment definition ([DSTU2](http://hl7.org/fhir/DSTU2/compartment-patient.html), [STU3](http://www.hl7.org/fhir/stu3/compartmentdefinition-patient.html), [R4](http://hl7.org/fhir/R4/compartmentdefinition-patient.html)), which details the eligible resource types and referencing search parameters. For samples that show how to call `Patient-everything`, see [Getting all patient compartment resources](/healthcare/docs/how-tos/fhir-resources#getting_all_patient_compartment_resources).", 19162 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/Patient/{PatientId}/$everything", 19163 // "httpMethod": "GET", 19164 // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.Patient-everything", 19165 // "parameterOrder": [ 19166 // "name" 19167 // ], 19168 // "parameters": { 19169 // "_count": { 19170 // "description": "Maximum number of resources in a page. If not specified, 100 is used. May not be larger than 1000.", 19171 // "format": "int32", 19172 // "location": "query", 19173 // "type": "integer" 19174 // }, 19175 // "_page_token": { 19176 // "description": "Used to retrieve the next or previous page of results when using pagination. Set `_page_token` to the value of _page_token set in next or previous page links' url. Next and previous page are returned in the response bundle's links field, where `link.relation` is \"previous\" or \"next\". Omit `_page_token` if no previous request has been made.", 19177 // "location": "query", 19178 // "type": "string" 19179 // }, 19180 // "_since": { 19181 // "description": "If provided, only resources updated after this time are returned. The time uses the format YYYY-MM-DDThh:mm:ss.sss+zz:zz. For example, `2015-02-07T13:28:17.239+02:00` or `2017-01-01T00:00:00Z`. The time must be specified to the second and include a time zone.", 19182 // "location": "query", 19183 // "type": "string" 19184 // }, 19185 // "_type": { 19186 // "description": "String of comma-delimited FHIR resource types. If provided, only resources of the specified resource type(s) are returned.", 19187 // "location": "query", 19188 // "type": "string" 19189 // }, 19190 // "end": { 19191 // "description": "The response includes records prior to the end date. If no end date is provided, all records subsequent to the start date are in scope.", 19192 // "location": "query", 19193 // "type": "string" 19194 // }, 19195 // "name": { 19196 // "description": "Name of the `Patient` resource for which the information is required.", 19197 // "location": "path", 19198 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/fhir/Patient/[^/]+$", 19199 // "required": true, 19200 // "type": "string" 19201 // }, 19202 // "start": { 19203 // "description": "The response includes records subsequent to the start date. If no start date is provided, all records prior to the end date are in scope.", 19204 // "location": "query", 19205 // "type": "string" 19206 // } 19207 // }, 19208 // "path": "v1/{+name}/$everything", 19209 // "response": { 19210 // "$ref": "HttpBody" 19211 // }, 19212 // "scopes": [ 19213 // "https://www.googleapis.com/auth/cloud-platform" 19214 // ] 19215 // } 19216 19217} 19218 19219// method id "healthcare.projects.locations.datasets.fhirStores.fhir.Resource-purge": 19220 19221type ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall struct { 19222 s *Service 19223 name string 19224 urlParams_ gensupport.URLParams 19225 ctx_ context.Context 19226 header_ http.Header 19227} 19228 19229// ResourcePurge: Deletes all the historical versions of a resource 19230// (excluding the current version) from the FHIR store. To remove all 19231// versions of a resource, first delete the current version and then 19232// call this method. This is not a FHIR standard operation. For samples 19233// that show how to call `Resource-purge`, see Deleting historical 19234// versions of a FHIR resource 19235// (/healthcare/docs/how-tos/fhir-resources#deleting_historical_versions_ 19236// of_a_fhir_resource). 19237// 19238// - name: The name of the resource to purge. 19239func (r *ProjectsLocationsDatasetsFhirStoresFhirService) ResourcePurge(name string) *ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall { 19240 c := &ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19241 c.name = name 19242 return c 19243} 19244 19245// Fields allows partial responses to be retrieved. See 19246// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19247// for more information. 19248func (c *ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall { 19249 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19250 return c 19251} 19252 19253// Context sets the context to be used in this call's Do method. Any 19254// pending HTTP request will be aborted if the provided context is 19255// canceled. 19256func (c *ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall { 19257 c.ctx_ = ctx 19258 return c 19259} 19260 19261// Header returns an http.Header that can be modified by the caller to 19262// add HTTP headers to the request. 19263func (c *ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall) Header() http.Header { 19264 if c.header_ == nil { 19265 c.header_ = make(http.Header) 19266 } 19267 return c.header_ 19268} 19269 19270func (c *ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall) doRequest(alt string) (*http.Response, error) { 19271 reqHeaders := make(http.Header) 19272 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 19273 for k, v := range c.header_ { 19274 reqHeaders[k] = v 19275 } 19276 reqHeaders.Set("User-Agent", c.s.userAgent()) 19277 var body io.Reader = nil 19278 c.urlParams_.Set("alt", alt) 19279 c.urlParams_.Set("prettyPrint", "false") 19280 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/$purge") 19281 urls += "?" + c.urlParams_.Encode() 19282 req, err := http.NewRequest("DELETE", urls, body) 19283 if err != nil { 19284 return nil, err 19285 } 19286 req.Header = reqHeaders 19287 googleapi.Expand(req.URL, map[string]string{ 19288 "name": c.name, 19289 }) 19290 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19291} 19292 19293// Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.Resource-purge" call. 19294// Exactly one of *Empty or error will be non-nil. Any non-2xx status 19295// code is an error. Response headers are in either 19296// *Empty.ServerResponse.Header or (if a response was returned at all) 19297// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 19298// check whether the returned error was because http.StatusNotModified 19299// was returned. 19300func (c *ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 19301 gensupport.SetOptions(c.urlParams_, opts...) 19302 res, err := c.doRequest("json") 19303 if res != nil && res.StatusCode == http.StatusNotModified { 19304 if res.Body != nil { 19305 res.Body.Close() 19306 } 19307 return nil, &googleapi.Error{ 19308 Code: res.StatusCode, 19309 Header: res.Header, 19310 } 19311 } 19312 if err != nil { 19313 return nil, err 19314 } 19315 defer googleapi.CloseBody(res) 19316 if err := googleapi.CheckResponse(res); err != nil { 19317 return nil, err 19318 } 19319 ret := &Empty{ 19320 ServerResponse: googleapi.ServerResponse{ 19321 Header: res.Header, 19322 HTTPStatusCode: res.StatusCode, 19323 }, 19324 } 19325 target := &ret 19326 if err := gensupport.DecodeResponse(target, res); err != nil { 19327 return nil, err 19328 } 19329 return ret, nil 19330 // { 19331 // "description": "Deletes all the historical versions of a resource (excluding the current version) from the FHIR store. To remove all versions of a resource, first delete the current version and then call this method. This is not a FHIR standard operation. For samples that show how to call `Resource-purge`, see [Deleting historical versions of a FHIR resource](/healthcare/docs/how-tos/fhir-resources#deleting_historical_versions_of_a_fhir_resource).", 19332 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{fhirId}/{fhirId1}/$purge", 19333 // "httpMethod": "DELETE", 19334 // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.Resource-purge", 19335 // "parameterOrder": [ 19336 // "name" 19337 // ], 19338 // "parameters": { 19339 // "name": { 19340 // "description": "The name of the resource to purge.", 19341 // "location": "path", 19342 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/fhir/[^/]+/[^/]+$", 19343 // "required": true, 19344 // "type": "string" 19345 // } 19346 // }, 19347 // "path": "v1/{+name}/$purge", 19348 // "response": { 19349 // "$ref": "Empty" 19350 // }, 19351 // "scopes": [ 19352 // "https://www.googleapis.com/auth/cloud-platform" 19353 // ] 19354 // } 19355 19356} 19357 19358// method id "healthcare.projects.locations.datasets.fhirStores.fhir.capabilities": 19359 19360type ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall struct { 19361 s *Service 19362 name string 19363 urlParams_ gensupport.URLParams 19364 ifNoneMatch_ string 19365 ctx_ context.Context 19366 header_ http.Header 19367} 19368 19369// Capabilities: Gets the FHIR capability statement (STU3 19370// (http://hl7.org/implement/standards/fhir/STU3/capabilitystatement.html), 19371// R4 19372// (http://hl7.org/implement/standards/fhir/R4/capabilitystatement.html)), 19373// or the conformance statement 19374// (http://hl7.org/implement/standards/fhir/DSTU2/conformance.html) in 19375// the DSTU2 case for the store, which contains a description of 19376// functionality supported by the server. Implements the FHIR standard 19377// capabilities interaction (STU3 19378// (http://hl7.org/implement/standards/fhir/STU3/http.html#capabilities), 19379// R4 19380// (http://hl7.org/implement/standards/fhir/R4/http.html#capabilities)), 19381// or the conformance interaction 19382// (http://hl7.org/implement/standards/fhir/DSTU2/http.html#conformance) 19383// in the DSTU2 case. On success, the response body contains a 19384// JSON-encoded representation of a `CapabilityStatement` resource. 19385// 19386// - name: Name of the FHIR store to retrieve the capabilities for. 19387func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Capabilities(name string) *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall { 19388 c := &ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19389 c.name = name 19390 return c 19391} 19392 19393// Fields allows partial responses to be retrieved. See 19394// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19395// for more information. 19396func (c *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall { 19397 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19398 return c 19399} 19400 19401// IfNoneMatch sets the optional parameter which makes the operation 19402// fail if the object's ETag matches the given value. This is useful for 19403// getting updates only after the object has changed since the last 19404// request. Use googleapi.IsNotModified to check whether the response 19405// error from Do is the result of In-None-Match. 19406func (c *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall { 19407 c.ifNoneMatch_ = entityTag 19408 return c 19409} 19410 19411// Context sets the context to be used in this call's Do method. Any 19412// pending HTTP request will be aborted if the provided context is 19413// canceled. 19414func (c *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall { 19415 c.ctx_ = ctx 19416 return c 19417} 19418 19419// Header returns an http.Header that can be modified by the caller to 19420// add HTTP headers to the request. 19421func (c *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall) Header() http.Header { 19422 if c.header_ == nil { 19423 c.header_ = make(http.Header) 19424 } 19425 return c.header_ 19426} 19427 19428func (c *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall) doRequest(alt string) (*http.Response, error) { 19429 reqHeaders := make(http.Header) 19430 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 19431 for k, v := range c.header_ { 19432 reqHeaders[k] = v 19433 } 19434 reqHeaders.Set("User-Agent", c.s.userAgent()) 19435 if c.ifNoneMatch_ != "" { 19436 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 19437 } 19438 var body io.Reader = nil 19439 c.urlParams_.Set("alt", alt) 19440 c.urlParams_.Set("prettyPrint", "false") 19441 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/fhir/metadata") 19442 urls += "?" + c.urlParams_.Encode() 19443 req, err := http.NewRequest("GET", urls, body) 19444 if err != nil { 19445 return nil, err 19446 } 19447 req.Header = reqHeaders 19448 googleapi.Expand(req.URL, map[string]string{ 19449 "name": c.name, 19450 }) 19451 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19452} 19453 19454// Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.capabilities" call. 19455func (c *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 19456 gensupport.SetOptions(c.urlParams_, opts...) 19457 return c.doRequest("") 19458 // { 19459 // "description": "Gets the FHIR capability statement ([STU3](http://hl7.org/implement/standards/fhir/STU3/capabilitystatement.html), [R4](http://hl7.org/implement/standards/fhir/R4/capabilitystatement.html)), or the [conformance statement](http://hl7.org/implement/standards/fhir/DSTU2/conformance.html) in the DSTU2 case for the store, which contains a description of functionality supported by the server. Implements the FHIR standard capabilities interaction ([STU3](http://hl7.org/implement/standards/fhir/STU3/http.html#capabilities), [R4](http://hl7.org/implement/standards/fhir/R4/http.html#capabilities)), or the [conformance interaction](http://hl7.org/implement/standards/fhir/DSTU2/http.html#conformance) in the DSTU2 case. On success, the response body contains a JSON-encoded representation of a `CapabilityStatement` resource.", 19460 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/metadata", 19461 // "httpMethod": "GET", 19462 // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.capabilities", 19463 // "parameterOrder": [ 19464 // "name" 19465 // ], 19466 // "parameters": { 19467 // "name": { 19468 // "description": "Name of the FHIR store to retrieve the capabilities for.", 19469 // "location": "path", 19470 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$", 19471 // "required": true, 19472 // "type": "string" 19473 // } 19474 // }, 19475 // "path": "v1/{+name}/fhir/metadata", 19476 // "response": { 19477 // "$ref": "HttpBody" 19478 // }, 19479 // "scopes": [ 19480 // "https://www.googleapis.com/auth/cloud-platform" 19481 // ] 19482 // } 19483 19484} 19485 19486// method id "healthcare.projects.locations.datasets.fhirStores.fhir.create": 19487 19488type ProjectsLocationsDatasetsFhirStoresFhirCreateCall struct { 19489 s *Service 19490 parent string 19491 type_ string 19492 body_ io.Reader 19493 urlParams_ gensupport.URLParams 19494 ctx_ context.Context 19495 header_ http.Header 19496} 19497 19498// Create: Creates a FHIR resource. Implements the FHIR standard create 19499// interaction (DSTU2 19500// (http://hl7.org/implement/standards/fhir/DSTU2/http.html#create), 19501// STU3 (http://hl7.org/implement/standards/fhir/STU3/http.html#create), 19502// R4 (http://hl7.org/implement/standards/fhir/R4/http.html#create)), 19503// which creates a new resource with a server-assigned resource ID. The 19504// request body must contain a JSON-encoded FHIR resource, and the 19505// request headers must contain `Content-Type: application/fhir+json`. 19506// On success, the response body contains a JSON-encoded representation 19507// of the resource as it was created on the server, including the 19508// server-assigned resource ID and version ID. Errors generated by the 19509// FHIR store contain a JSON-encoded `OperationOutcome` resource 19510// describing the reason for the error. If the request cannot be mapped 19511// to a valid API method on a FHIR store, a generic GCP error might be 19512// returned instead. For samples that show how to call `create`, see 19513// Creating a FHIR resource 19514// (/healthcare/docs/how-tos/fhir-resources#creating_a_fhir_resource). 19515// 19516// - parent: The name of the FHIR store this resource belongs to. 19517// - type: The FHIR resource type to create, such as Patient or 19518// Observation. For a complete list, see the FHIR Resource Index 19519// (DSTU2 19520// (http://hl7.org/implement/standards/fhir/DSTU2/resourcelist.html), 19521// STU3 19522// (http://hl7.org/implement/standards/fhir/STU3/resourcelist.html), 19523// R4 (http://hl7.org/implement/standards/fhir/R4/resourcelist.html)). 19524// Must match the resource type in the provided content. 19525func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Create(parent string, type_ string, body_ io.Reader) *ProjectsLocationsDatasetsFhirStoresFhirCreateCall { 19526 c := &ProjectsLocationsDatasetsFhirStoresFhirCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19527 c.parent = parent 19528 c.type_ = type_ 19529 c.body_ = body_ 19530 return c 19531} 19532 19533// Fields allows partial responses to be retrieved. See 19534// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19535// for more information. 19536func (c *ProjectsLocationsDatasetsFhirStoresFhirCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirCreateCall { 19537 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19538 return c 19539} 19540 19541// Context sets the context to be used in this call's Do method. Any 19542// pending HTTP request will be aborted if the provided context is 19543// canceled. 19544func (c *ProjectsLocationsDatasetsFhirStoresFhirCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirCreateCall { 19545 c.ctx_ = ctx 19546 return c 19547} 19548 19549// Header returns an http.Header that can be modified by the caller to 19550// add HTTP headers to the request. 19551func (c *ProjectsLocationsDatasetsFhirStoresFhirCreateCall) Header() http.Header { 19552 if c.header_ == nil { 19553 c.header_ = make(http.Header) 19554 } 19555 return c.header_ 19556} 19557 19558func (c *ProjectsLocationsDatasetsFhirStoresFhirCreateCall) doRequest(alt string) (*http.Response, error) { 19559 reqHeaders := make(http.Header) 19560 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 19561 for k, v := range c.header_ { 19562 reqHeaders[k] = v 19563 } 19564 reqHeaders.Set("User-Agent", c.s.userAgent()) 19565 var body io.Reader = nil 19566 body = c.body_ 19567 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/fhir/{+type}") 19568 urls += "?" + c.urlParams_.Encode() 19569 req, err := http.NewRequest("POST", urls, body) 19570 if err != nil { 19571 return nil, err 19572 } 19573 req.Header = reqHeaders 19574 googleapi.Expand(req.URL, map[string]string{ 19575 "parent": c.parent, 19576 "type": c.type_, 19577 }) 19578 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19579} 19580 19581// Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.create" call. 19582func (c *ProjectsLocationsDatasetsFhirStoresFhirCreateCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 19583 gensupport.SetOptions(c.urlParams_, opts...) 19584 return c.doRequest("") 19585 // { 19586 // "description": "Creates a FHIR resource. Implements the FHIR standard create interaction ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/http.html#create), [STU3](http://hl7.org/implement/standards/fhir/STU3/http.html#create), [R4](http://hl7.org/implement/standards/fhir/R4/http.html#create)), which creates a new resource with a server-assigned resource ID. The request body must contain a JSON-encoded FHIR resource, and the request headers must contain `Content-Type: application/fhir+json`. On success, the response body contains a JSON-encoded representation of the resource as it was created on the server, including the server-assigned resource ID and version ID. Errors generated by the FHIR store contain a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead. For samples that show how to call `create`, see [Creating a FHIR resource](/healthcare/docs/how-tos/fhir-resources#creating_a_fhir_resource).", 19587 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{fhirId}", 19588 // "httpMethod": "POST", 19589 // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.create", 19590 // "parameterOrder": [ 19591 // "parent", 19592 // "type" 19593 // ], 19594 // "parameters": { 19595 // "parent": { 19596 // "description": "The name of the FHIR store this resource belongs to.", 19597 // "location": "path", 19598 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$", 19599 // "required": true, 19600 // "type": "string" 19601 // }, 19602 // "type": { 19603 // "description": "The FHIR resource type to create, such as Patient or Observation. For a complete list, see the FHIR Resource Index ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/resourcelist.html), [STU3](http://hl7.org/implement/standards/fhir/STU3/resourcelist.html), [R4](http://hl7.org/implement/standards/fhir/R4/resourcelist.html)). Must match the resource type in the provided content.", 19604 // "location": "path", 19605 // "pattern": "^[^/]+$", 19606 // "required": true, 19607 // "type": "string" 19608 // } 19609 // }, 19610 // "path": "v1/{+parent}/fhir/{+type}", 19611 // "request": { 19612 // "$ref": "HttpBody" 19613 // }, 19614 // "response": { 19615 // "$ref": "HttpBody" 19616 // }, 19617 // "scopes": [ 19618 // "https://www.googleapis.com/auth/cloud-platform" 19619 // ] 19620 // } 19621 19622} 19623 19624// method id "healthcare.projects.locations.datasets.fhirStores.fhir.delete": 19625 19626type ProjectsLocationsDatasetsFhirStoresFhirDeleteCall struct { 19627 s *Service 19628 name string 19629 urlParams_ gensupport.URLParams 19630 ctx_ context.Context 19631 header_ http.Header 19632} 19633 19634// Delete: Deletes a FHIR resource. Implements the FHIR standard delete 19635// interaction (DSTU2 19636// (http://hl7.org/implement/standards/fhir/DSTU2/http.html#delete), 19637// STU3 (http://hl7.org/implement/standards/fhir/STU3/http.html#delete), 19638// R4 (http://hl7.org/implement/standards/fhir/R4/http.html#delete)). 19639// Note: Unless resource versioning is disabled by setting the 19640// disable_resource_versioning flag on the FHIR store, the deleted 19641// resources will be moved to a history repository that can still be 19642// retrieved through vread and related methods, unless they are removed 19643// by the purge method. For samples that show how to call `delete`, see 19644// Deleting a FHIR resource 19645// (/healthcare/docs/how-tos/fhir-resources#deleting_a_fhir_resource). 19646// 19647// - name: The name of the resource to delete. 19648func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Delete(name string) *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall { 19649 c := &ProjectsLocationsDatasetsFhirStoresFhirDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19650 c.name = name 19651 return c 19652} 19653 19654// Fields allows partial responses to be retrieved. See 19655// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19656// for more information. 19657func (c *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall { 19658 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19659 return c 19660} 19661 19662// Context sets the context to be used in this call's Do method. Any 19663// pending HTTP request will be aborted if the provided context is 19664// canceled. 19665func (c *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall { 19666 c.ctx_ = ctx 19667 return c 19668} 19669 19670// Header returns an http.Header that can be modified by the caller to 19671// add HTTP headers to the request. 19672func (c *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall) Header() http.Header { 19673 if c.header_ == nil { 19674 c.header_ = make(http.Header) 19675 } 19676 return c.header_ 19677} 19678 19679func (c *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall) doRequest(alt string) (*http.Response, error) { 19680 reqHeaders := make(http.Header) 19681 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 19682 for k, v := range c.header_ { 19683 reqHeaders[k] = v 19684 } 19685 reqHeaders.Set("User-Agent", c.s.userAgent()) 19686 var body io.Reader = nil 19687 c.urlParams_.Set("alt", alt) 19688 c.urlParams_.Set("prettyPrint", "false") 19689 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 19690 urls += "?" + c.urlParams_.Encode() 19691 req, err := http.NewRequest("DELETE", urls, body) 19692 if err != nil { 19693 return nil, err 19694 } 19695 req.Header = reqHeaders 19696 googleapi.Expand(req.URL, map[string]string{ 19697 "name": c.name, 19698 }) 19699 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19700} 19701 19702// Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.delete" call. 19703func (c *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 19704 gensupport.SetOptions(c.urlParams_, opts...) 19705 return c.doRequest("") 19706 // { 19707 // "description": "Deletes a FHIR resource. Implements the FHIR standard delete interaction ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/http.html#delete), [STU3](http://hl7.org/implement/standards/fhir/STU3/http.html#delete), [R4](http://hl7.org/implement/standards/fhir/R4/http.html#delete)). Note: Unless resource versioning is disabled by setting the disable_resource_versioning flag on the FHIR store, the deleted resources will be moved to a history repository that can still be retrieved through vread and related methods, unless they are removed by the purge method. For samples that show how to call `delete`, see [Deleting a FHIR resource](/healthcare/docs/how-tos/fhir-resources#deleting_a_fhir_resource).", 19708 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{fhirId}/{fhirId1}", 19709 // "httpMethod": "DELETE", 19710 // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.delete", 19711 // "parameterOrder": [ 19712 // "name" 19713 // ], 19714 // "parameters": { 19715 // "name": { 19716 // "description": "The name of the resource to delete.", 19717 // "location": "path", 19718 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/fhir/[^/]+/[^/]+$", 19719 // "required": true, 19720 // "type": "string" 19721 // } 19722 // }, 19723 // "path": "v1/{+name}", 19724 // "response": { 19725 // "$ref": "HttpBody" 19726 // }, 19727 // "scopes": [ 19728 // "https://www.googleapis.com/auth/cloud-platform" 19729 // ] 19730 // } 19731 19732} 19733 19734// method id "healthcare.projects.locations.datasets.fhirStores.fhir.executeBundle": 19735 19736type ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall struct { 19737 s *Service 19738 parent string 19739 body_ io.Reader 19740 urlParams_ gensupport.URLParams 19741 ctx_ context.Context 19742 header_ http.Header 19743} 19744 19745// ExecuteBundle: Executes all the requests in the given Bundle. 19746// Implements the FHIR standard batch/transaction interaction (DSTU2 19747// (http://hl7.org/implement/standards/fhir/DSTU2/http.html#transaction), 19748// STU3 19749// (http://hl7.org/implement/standards/fhir/STU3/http.html#transaction), 19750// R4 19751// (http://hl7.org/implement/standards/fhir/R4/http.html#transaction)). 19752// Supports all interactions within a bundle, except search. This method 19753// accepts Bundles of type `batch` and `transaction`, processing them 19754// according to the batch processing rules (DSTU2 19755// (http://hl7.org/implement/standards/fhir/DSTU2/http.html#2.1.0.16.1), 19756// STU3 19757// (http://hl7.org/implement/standards/fhir/STU3/http.html#2.21.0.17.1), 19758// R4 (http://hl7.org/implement/standards/fhir/R4/http.html#brules)) and 19759// transaction processing rules (DSTU2 19760// (http://hl7.org/implement/standards/fhir/DSTU2/http.html#2.1.0.16.2), 19761// STU3 19762// (http://hl7.org/implement/standards/fhir/STU3/http.html#2.21.0.17.2), 19763// R4 (http://hl7.org/implement/standards/fhir/R4/http.html#trules)). 19764// The request body must contain a JSON-encoded FHIR `Bundle` resource, 19765// and the request headers must contain `Content-Type: 19766// application/fhir+json`. For a batch bundle or a successful 19767// transaction the response body will contain a JSON-encoded 19768// representation of a `Bundle` resource of type `batch-response` or 19769// `transaction-response` containing one entry for each entry in the 19770// request, with the outcome of processing the entry. In the case of an 19771// error for a transaction bundle, the response body will contain a 19772// JSON-encoded `OperationOutcome` resource describing the reason for 19773// the error. If the request cannot be mapped to a valid API method on a 19774// FHIR store, a generic GCP error might be returned instead. For 19775// samples that show how to call `executeBundle`, see Managing FHIR 19776// resources using FHIR bundles (/healthcare/docs/how-tos/fhir-bundles). 19777// 19778// - parent: Name of the FHIR store in which this bundle will be 19779// executed. 19780func (r *ProjectsLocationsDatasetsFhirStoresFhirService) ExecuteBundle(parent string, body_ io.Reader) *ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall { 19781 c := &ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19782 c.parent = parent 19783 c.body_ = body_ 19784 return c 19785} 19786 19787// Fields allows partial responses to be retrieved. See 19788// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19789// for more information. 19790func (c *ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall { 19791 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19792 return c 19793} 19794 19795// Context sets the context to be used in this call's Do method. Any 19796// pending HTTP request will be aborted if the provided context is 19797// canceled. 19798func (c *ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall { 19799 c.ctx_ = ctx 19800 return c 19801} 19802 19803// Header returns an http.Header that can be modified by the caller to 19804// add HTTP headers to the request. 19805func (c *ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall) Header() http.Header { 19806 if c.header_ == nil { 19807 c.header_ = make(http.Header) 19808 } 19809 return c.header_ 19810} 19811 19812func (c *ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall) doRequest(alt string) (*http.Response, error) { 19813 reqHeaders := make(http.Header) 19814 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 19815 for k, v := range c.header_ { 19816 reqHeaders[k] = v 19817 } 19818 reqHeaders.Set("User-Agent", c.s.userAgent()) 19819 var body io.Reader = nil 19820 body = c.body_ 19821 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/fhir") 19822 urls += "?" + c.urlParams_.Encode() 19823 req, err := http.NewRequest("POST", urls, body) 19824 if err != nil { 19825 return nil, err 19826 } 19827 req.Header = reqHeaders 19828 googleapi.Expand(req.URL, map[string]string{ 19829 "parent": c.parent, 19830 }) 19831 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19832} 19833 19834// Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.executeBundle" call. 19835func (c *ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 19836 gensupport.SetOptions(c.urlParams_, opts...) 19837 return c.doRequest("") 19838 // { 19839 // "description": "Executes all the requests in the given Bundle. Implements the FHIR standard batch/transaction interaction ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/http.html#transaction), [STU3](http://hl7.org/implement/standards/fhir/STU3/http.html#transaction), [R4](http://hl7.org/implement/standards/fhir/R4/http.html#transaction)). Supports all interactions within a bundle, except search. This method accepts Bundles of type `batch` and `transaction`, processing them according to the batch processing rules ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/http.html#2.1.0.16.1), [STU3](http://hl7.org/implement/standards/fhir/STU3/http.html#2.21.0.17.1), [R4](http://hl7.org/implement/standards/fhir/R4/http.html#brules)) and transaction processing rules ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/http.html#2.1.0.16.2), [STU3](http://hl7.org/implement/standards/fhir/STU3/http.html#2.21.0.17.2), [R4](http://hl7.org/implement/standards/fhir/R4/http.html#trules)). The request body must contain a JSON-encoded FHIR `Bundle` resource, and the request headers must contain `Content-Type: application/fhir+json`. For a batch bundle or a successful transaction the response body will contain a JSON-encoded representation of a `Bundle` resource of type `batch-response` or `transaction-response` containing one entry for each entry in the request, with the outcome of processing the entry. In the case of an error for a transaction bundle, the response body will contain a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead. For samples that show how to call `executeBundle`, see [Managing FHIR resources using FHIR bundles](/healthcare/docs/how-tos/fhir-bundles).", 19840 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir", 19841 // "httpMethod": "POST", 19842 // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.executeBundle", 19843 // "parameterOrder": [ 19844 // "parent" 19845 // ], 19846 // "parameters": { 19847 // "parent": { 19848 // "description": "Name of the FHIR store in which this bundle will be executed.", 19849 // "location": "path", 19850 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$", 19851 // "required": true, 19852 // "type": "string" 19853 // } 19854 // }, 19855 // "path": "v1/{+parent}/fhir", 19856 // "request": { 19857 // "$ref": "HttpBody" 19858 // }, 19859 // "response": { 19860 // "$ref": "HttpBody" 19861 // }, 19862 // "scopes": [ 19863 // "https://www.googleapis.com/auth/cloud-platform" 19864 // ] 19865 // } 19866 19867} 19868 19869// method id "healthcare.projects.locations.datasets.fhirStores.fhir.history": 19870 19871type ProjectsLocationsDatasetsFhirStoresFhirHistoryCall struct { 19872 s *Service 19873 name string 19874 urlParams_ gensupport.URLParams 19875 ifNoneMatch_ string 19876 ctx_ context.Context 19877 header_ http.Header 19878} 19879 19880// History: Lists all the versions of a resource (including the current 19881// version and deleted versions) from the FHIR store. Implements the 19882// per-resource form of the FHIR standard history interaction (DSTU2 19883// (http://hl7.org/implement/standards/fhir/DSTU2/http.html#history), 19884// STU3 19885// (http://hl7.org/implement/standards/fhir/STU3/http.html#history), R4 19886// (http://hl7.org/implement/standards/fhir/R4/http.html#history)). On 19887// success, the response body contains a JSON-encoded representation of 19888// a `Bundle` resource of type `history`, containing the version history 19889// sorted from most recent to oldest versions. Errors generated by the 19890// FHIR store contain a JSON-encoded `OperationOutcome` resource 19891// describing the reason for the error. If the request cannot be mapped 19892// to a valid API method on a FHIR store, a generic GCP error might be 19893// returned instead. For samples that show how to call `history`, see 19894// Listing FHIR resource versions 19895// (/healthcare/docs/how-tos/fhir-resources#listing_fhir_resource_version 19896// s). 19897// 19898// - name: The name of the resource to retrieve. 19899func (r *ProjectsLocationsDatasetsFhirStoresFhirService) History(name string) *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall { 19900 c := &ProjectsLocationsDatasetsFhirStoresFhirHistoryCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19901 c.name = name 19902 return c 19903} 19904 19905// At sets the optional parameter "_at": Only include resource versions 19906// that were current at some point during the time period specified in 19907// the date time value. The date parameter format is 19908// yyyy-mm-ddThh:mm:ss[Z|(+|-)hh:mm] Clients may specify any of the 19909// following: * An entire year: `_at=2019` * An entire month: 19910// `_at=2019-01` * A specific day: `_at=2019-01-20` * A specific second: 19911// `_at=2018-12-31T23:59:58Z` 19912func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) At(At string) *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall { 19913 c.urlParams_.Set("_at", At) 19914 return c 19915} 19916 19917// Count sets the optional parameter "_count": The maximum number of 19918// search results on a page. If not specified, 100 is used. May not be 19919// larger than 1000. 19920func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) Count(Count int64) *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall { 19921 c.urlParams_.Set("_count", fmt.Sprint(Count)) 19922 return c 19923} 19924 19925// PageToken sets the optional parameter "_page_token": Used to retrieve 19926// the first, previous, next, or last page of resource versions when 19927// using pagination. Value should be set to the value of `_page_token` 19928// set in next or previous page links' URLs. Next and previous page are 19929// returned in the response bundle's links field, where `link.relation` 19930// is "previous" or "next". Omit `_page_token` if no previous request 19931// has been made. 19932func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) PageToken(PageToken string) *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall { 19933 c.urlParams_.Set("_page_token", PageToken) 19934 return c 19935} 19936 19937// Since sets the optional parameter "_since": Only include resource 19938// versions that were created at or after the given instant in time. The 19939// instant in time uses the format YYYY-MM-DDThh:mm:ss.sss+zz:zz (for 19940// example 2015-02-07T13:28:17.239+02:00 or 2017-01-01T00:00:00Z). The 19941// time must be specified to the second and include a time zone. 19942func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) Since(Since string) *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall { 19943 c.urlParams_.Set("_since", Since) 19944 return c 19945} 19946 19947// Fields allows partial responses to be retrieved. See 19948// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19949// for more information. 19950func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall { 19951 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19952 return c 19953} 19954 19955// IfNoneMatch sets the optional parameter which makes the operation 19956// fail if the object's ETag matches the given value. This is useful for 19957// getting updates only after the object has changed since the last 19958// request. Use googleapi.IsNotModified to check whether the response 19959// error from Do is the result of In-None-Match. 19960func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall { 19961 c.ifNoneMatch_ = entityTag 19962 return c 19963} 19964 19965// Context sets the context to be used in this call's Do method. Any 19966// pending HTTP request will be aborted if the provided context is 19967// canceled. 19968func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall { 19969 c.ctx_ = ctx 19970 return c 19971} 19972 19973// Header returns an http.Header that can be modified by the caller to 19974// add HTTP headers to the request. 19975func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) Header() http.Header { 19976 if c.header_ == nil { 19977 c.header_ = make(http.Header) 19978 } 19979 return c.header_ 19980} 19981 19982func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) doRequest(alt string) (*http.Response, error) { 19983 reqHeaders := make(http.Header) 19984 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 19985 for k, v := range c.header_ { 19986 reqHeaders[k] = v 19987 } 19988 reqHeaders.Set("User-Agent", c.s.userAgent()) 19989 if c.ifNoneMatch_ != "" { 19990 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 19991 } 19992 var body io.Reader = nil 19993 c.urlParams_.Set("alt", alt) 19994 c.urlParams_.Set("prettyPrint", "false") 19995 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/_history") 19996 urls += "?" + c.urlParams_.Encode() 19997 req, err := http.NewRequest("GET", urls, body) 19998 if err != nil { 19999 return nil, err 20000 } 20001 req.Header = reqHeaders 20002 googleapi.Expand(req.URL, map[string]string{ 20003 "name": c.name, 20004 }) 20005 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20006} 20007 20008// Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.history" call. 20009func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 20010 gensupport.SetOptions(c.urlParams_, opts...) 20011 return c.doRequest("") 20012 // { 20013 // "description": "Lists all the versions of a resource (including the current version and deleted versions) from the FHIR store. Implements the per-resource form of the FHIR standard history interaction ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/http.html#history), [STU3](http://hl7.org/implement/standards/fhir/STU3/http.html#history), [R4](http://hl7.org/implement/standards/fhir/R4/http.html#history)). On success, the response body contains a JSON-encoded representation of a `Bundle` resource of type `history`, containing the version history sorted from most recent to oldest versions. Errors generated by the FHIR store contain a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead. For samples that show how to call `history`, see [Listing FHIR resource versions](/healthcare/docs/how-tos/fhir-resources#listing_fhir_resource_versions).", 20014 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{fhirId}/{fhirId1}/_history", 20015 // "httpMethod": "GET", 20016 // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.history", 20017 // "parameterOrder": [ 20018 // "name" 20019 // ], 20020 // "parameters": { 20021 // "_at": { 20022 // "description": "Only include resource versions that were current at some point during the time period specified in the date time value. The date parameter format is yyyy-mm-ddThh:mm:ss[Z|(+|-)hh:mm] Clients may specify any of the following: * An entire year: `_at=2019` * An entire month: `_at=2019-01` * A specific day: `_at=2019-01-20` * A specific second: `_at=2018-12-31T23:59:58Z`", 20023 // "location": "query", 20024 // "type": "string" 20025 // }, 20026 // "_count": { 20027 // "description": "The maximum number of search results on a page. If not specified, 100 is used. May not be larger than 1000.", 20028 // "format": "int32", 20029 // "location": "query", 20030 // "type": "integer" 20031 // }, 20032 // "_page_token": { 20033 // "description": "Used to retrieve the first, previous, next, or last page of resource versions when using pagination. Value should be set to the value of `_page_token` set in next or previous page links' URLs. Next and previous page are returned in the response bundle's links field, where `link.relation` is \"previous\" or \"next\". Omit `_page_token` if no previous request has been made.", 20034 // "location": "query", 20035 // "type": "string" 20036 // }, 20037 // "_since": { 20038 // "description": "Only include resource versions that were created at or after the given instant in time. The instant in time uses the format YYYY-MM-DDThh:mm:ss.sss+zz:zz (for example 2015-02-07T13:28:17.239+02:00 or 2017-01-01T00:00:00Z). The time must be specified to the second and include a time zone.", 20039 // "location": "query", 20040 // "type": "string" 20041 // }, 20042 // "name": { 20043 // "description": "The name of the resource to retrieve.", 20044 // "location": "path", 20045 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/fhir/[^/]+/[^/]+$", 20046 // "required": true, 20047 // "type": "string" 20048 // } 20049 // }, 20050 // "path": "v1/{+name}/_history", 20051 // "response": { 20052 // "$ref": "HttpBody" 20053 // }, 20054 // "scopes": [ 20055 // "https://www.googleapis.com/auth/cloud-platform" 20056 // ] 20057 // } 20058 20059} 20060 20061// method id "healthcare.projects.locations.datasets.fhirStores.fhir.patch": 20062 20063type ProjectsLocationsDatasetsFhirStoresFhirPatchCall struct { 20064 s *Service 20065 name string 20066 body_ io.Reader 20067 urlParams_ gensupport.URLParams 20068 ctx_ context.Context 20069 header_ http.Header 20070} 20071 20072// Patch: Updates part of an existing resource by applying the 20073// operations specified in a JSON Patch (http://jsonpatch.com/) 20074// document. Implements the FHIR standard patch interaction (STU3 20075// (http://hl7.org/implement/standards/fhir/STU3/http.html#patch), R4 20076// (http://hl7.org/implement/standards/fhir/R4/http.html#patch)). DSTU2 20077// doesn't define a patch method, but the server supports it in the same 20078// way it supports STU3. The request body must contain a JSON Patch 20079// document, and the request headers must contain `Content-Type: 20080// application/json-patch+json`. On success, the response body contains 20081// a JSON-encoded representation of the updated resource, including the 20082// server-assigned version ID. Errors generated by the FHIR store 20083// contain a JSON-encoded `OperationOutcome` resource describing the 20084// reason for the error. If the request cannot be mapped to a valid API 20085// method on a FHIR store, a generic GCP error might be returned 20086// instead. For samples that show how to call `patch`, see Patching a 20087// FHIR resource 20088// (/healthcare/docs/how-tos/fhir-resources#patching_a_fhir_resource). 20089// 20090// - name: The name of the resource to update. 20091func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Patch(name string, body_ io.Reader) *ProjectsLocationsDatasetsFhirStoresFhirPatchCall { 20092 c := &ProjectsLocationsDatasetsFhirStoresFhirPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20093 c.name = name 20094 c.body_ = body_ 20095 return c 20096} 20097 20098// Fields allows partial responses to be retrieved. See 20099// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20100// for more information. 20101func (c *ProjectsLocationsDatasetsFhirStoresFhirPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirPatchCall { 20102 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20103 return c 20104} 20105 20106// Context sets the context to be used in this call's Do method. Any 20107// pending HTTP request will be aborted if the provided context is 20108// canceled. 20109func (c *ProjectsLocationsDatasetsFhirStoresFhirPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirPatchCall { 20110 c.ctx_ = ctx 20111 return c 20112} 20113 20114// Header returns an http.Header that can be modified by the caller to 20115// add HTTP headers to the request. 20116func (c *ProjectsLocationsDatasetsFhirStoresFhirPatchCall) Header() http.Header { 20117 if c.header_ == nil { 20118 c.header_ = make(http.Header) 20119 } 20120 return c.header_ 20121} 20122 20123func (c *ProjectsLocationsDatasetsFhirStoresFhirPatchCall) doRequest(alt string) (*http.Response, error) { 20124 reqHeaders := make(http.Header) 20125 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 20126 for k, v := range c.header_ { 20127 reqHeaders[k] = v 20128 } 20129 reqHeaders.Set("User-Agent", c.s.userAgent()) 20130 var body io.Reader = nil 20131 body = c.body_ 20132 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 20133 urls += "?" + c.urlParams_.Encode() 20134 req, err := http.NewRequest("PATCH", urls, body) 20135 if err != nil { 20136 return nil, err 20137 } 20138 req.Header = reqHeaders 20139 googleapi.Expand(req.URL, map[string]string{ 20140 "name": c.name, 20141 }) 20142 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20143} 20144 20145// Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.patch" call. 20146func (c *ProjectsLocationsDatasetsFhirStoresFhirPatchCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 20147 gensupport.SetOptions(c.urlParams_, opts...) 20148 return c.doRequest("") 20149 // { 20150 // "description": "Updates part of an existing resource by applying the operations specified in a [JSON Patch](http://jsonpatch.com/) document. Implements the FHIR standard patch interaction ([STU3](http://hl7.org/implement/standards/fhir/STU3/http.html#patch), [R4](http://hl7.org/implement/standards/fhir/R4/http.html#patch)). DSTU2 doesn't define a patch method, but the server supports it in the same way it supports STU3. The request body must contain a JSON Patch document, and the request headers must contain `Content-Type: application/json-patch+json`. On success, the response body contains a JSON-encoded representation of the updated resource, including the server-assigned version ID. Errors generated by the FHIR store contain a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead. For samples that show how to call `patch`, see [Patching a FHIR resource](/healthcare/docs/how-tos/fhir-resources#patching_a_fhir_resource).", 20151 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{fhirId}/{fhirId1}", 20152 // "httpMethod": "PATCH", 20153 // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.patch", 20154 // "parameterOrder": [ 20155 // "name" 20156 // ], 20157 // "parameters": { 20158 // "name": { 20159 // "description": "The name of the resource to update.", 20160 // "location": "path", 20161 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/fhir/[^/]+/[^/]+$", 20162 // "required": true, 20163 // "type": "string" 20164 // } 20165 // }, 20166 // "path": "v1/{+name}", 20167 // "request": { 20168 // "$ref": "HttpBody" 20169 // }, 20170 // "response": { 20171 // "$ref": "HttpBody" 20172 // }, 20173 // "scopes": [ 20174 // "https://www.googleapis.com/auth/cloud-platform" 20175 // ] 20176 // } 20177 20178} 20179 20180// method id "healthcare.projects.locations.datasets.fhirStores.fhir.read": 20181 20182type ProjectsLocationsDatasetsFhirStoresFhirReadCall struct { 20183 s *Service 20184 name string 20185 urlParams_ gensupport.URLParams 20186 ifNoneMatch_ string 20187 ctx_ context.Context 20188 header_ http.Header 20189} 20190 20191// Read: Gets the contents of a FHIR resource. Implements the FHIR 20192// standard read interaction (DSTU2 20193// (http://hl7.org/implement/standards/fhir/DSTU2/http.html#read), STU3 20194// (http://hl7.org/implement/standards/fhir/STU3/http.html#read), R4 20195// (http://hl7.org/implement/standards/fhir/R4/http.html#read)). Also 20196// supports the FHIR standard conditional read interaction (DSTU2 20197// (http://hl7.org/implement/standards/fhir/DSTU2/http.html#cread), STU3 20198// (http://hl7.org/implement/standards/fhir/STU3/http.html#cread), R4 20199// (http://hl7.org/implement/standards/fhir/R4/http.html#cread)) 20200// specified by supplying an `If-Modified-Since` header with a date/time 20201// value or an `If-None-Match` header with an ETag value. On success, 20202// the response body contains a JSON-encoded representation of the 20203// resource. Errors generated by the FHIR store contain a JSON-encoded 20204// `OperationOutcome` resource describing the reason for the error. If 20205// the request cannot be mapped to a valid API method on a FHIR store, a 20206// generic GCP error might be returned instead. For samples that show 20207// how to call `read`, see Getting a FHIR resource 20208// (/healthcare/docs/how-tos/fhir-resources#getting_a_fhir_resource). 20209// 20210// - name: The name of the resource to retrieve. 20211func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Read(name string) *ProjectsLocationsDatasetsFhirStoresFhirReadCall { 20212 c := &ProjectsLocationsDatasetsFhirStoresFhirReadCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20213 c.name = name 20214 return c 20215} 20216 20217// Fields allows partial responses to be retrieved. See 20218// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20219// for more information. 20220func (c *ProjectsLocationsDatasetsFhirStoresFhirReadCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirReadCall { 20221 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20222 return c 20223} 20224 20225// IfNoneMatch sets the optional parameter which makes the operation 20226// fail if the object's ETag matches the given value. This is useful for 20227// getting updates only after the object has changed since the last 20228// request. Use googleapi.IsNotModified to check whether the response 20229// error from Do is the result of In-None-Match. 20230func (c *ProjectsLocationsDatasetsFhirStoresFhirReadCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirReadCall { 20231 c.ifNoneMatch_ = entityTag 20232 return c 20233} 20234 20235// Context sets the context to be used in this call's Do method. Any 20236// pending HTTP request will be aborted if the provided context is 20237// canceled. 20238func (c *ProjectsLocationsDatasetsFhirStoresFhirReadCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirReadCall { 20239 c.ctx_ = ctx 20240 return c 20241} 20242 20243// Header returns an http.Header that can be modified by the caller to 20244// add HTTP headers to the request. 20245func (c *ProjectsLocationsDatasetsFhirStoresFhirReadCall) Header() http.Header { 20246 if c.header_ == nil { 20247 c.header_ = make(http.Header) 20248 } 20249 return c.header_ 20250} 20251 20252func (c *ProjectsLocationsDatasetsFhirStoresFhirReadCall) doRequest(alt string) (*http.Response, error) { 20253 reqHeaders := make(http.Header) 20254 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 20255 for k, v := range c.header_ { 20256 reqHeaders[k] = v 20257 } 20258 reqHeaders.Set("User-Agent", c.s.userAgent()) 20259 if c.ifNoneMatch_ != "" { 20260 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 20261 } 20262 var body io.Reader = nil 20263 c.urlParams_.Set("alt", alt) 20264 c.urlParams_.Set("prettyPrint", "false") 20265 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 20266 urls += "?" + c.urlParams_.Encode() 20267 req, err := http.NewRequest("GET", urls, body) 20268 if err != nil { 20269 return nil, err 20270 } 20271 req.Header = reqHeaders 20272 googleapi.Expand(req.URL, map[string]string{ 20273 "name": c.name, 20274 }) 20275 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20276} 20277 20278// Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.read" call. 20279func (c *ProjectsLocationsDatasetsFhirStoresFhirReadCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 20280 gensupport.SetOptions(c.urlParams_, opts...) 20281 return c.doRequest("") 20282 // { 20283 // "description": "Gets the contents of a FHIR resource. Implements the FHIR standard read interaction ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/http.html#read), [STU3](http://hl7.org/implement/standards/fhir/STU3/http.html#read), [R4](http://hl7.org/implement/standards/fhir/R4/http.html#read)). Also supports the FHIR standard conditional read interaction ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/http.html#cread), [STU3](http://hl7.org/implement/standards/fhir/STU3/http.html#cread), [R4](http://hl7.org/implement/standards/fhir/R4/http.html#cread)) specified by supplying an `If-Modified-Since` header with a date/time value or an `If-None-Match` header with an ETag value. On success, the response body contains a JSON-encoded representation of the resource. Errors generated by the FHIR store contain a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead. For samples that show how to call `read`, see [Getting a FHIR resource](/healthcare/docs/how-tos/fhir-resources#getting_a_fhir_resource).", 20284 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{fhirId}/{fhirId1}", 20285 // "httpMethod": "GET", 20286 // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.read", 20287 // "parameterOrder": [ 20288 // "name" 20289 // ], 20290 // "parameters": { 20291 // "name": { 20292 // "description": "The name of the resource to retrieve.", 20293 // "location": "path", 20294 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/fhir/[^/]+/[^/]+$", 20295 // "required": true, 20296 // "type": "string" 20297 // } 20298 // }, 20299 // "path": "v1/{+name}", 20300 // "response": { 20301 // "$ref": "HttpBody" 20302 // }, 20303 // "scopes": [ 20304 // "https://www.googleapis.com/auth/cloud-platform" 20305 // ] 20306 // } 20307 20308} 20309 20310// method id "healthcare.projects.locations.datasets.fhirStores.fhir.search": 20311 20312type ProjectsLocationsDatasetsFhirStoresFhirSearchCall struct { 20313 s *Service 20314 parent string 20315 searchresourcesrequest *SearchResourcesRequest 20316 urlParams_ gensupport.URLParams 20317 ctx_ context.Context 20318 header_ http.Header 20319} 20320 20321// Search: Searches for resources in the given FHIR store according to 20322// criteria specified as query parameters. Implements the FHIR standard 20323// search interaction (DSTU2 20324// (http://hl7.org/implement/standards/fhir/DSTU2/http.html#search), 20325// STU3 (http://hl7.org/implement/standards/fhir/STU3/http.html#search), 20326// R4 (http://hl7.org/implement/standards/fhir/R4/http.html#search)) 20327// using the search semantics described in the FHIR Search specification 20328// (DSTU2 (http://hl7.org/implement/standards/fhir/DSTU2/search.html), 20329// STU3 (http://hl7.org/implement/standards/fhir/STU3/search.html), R4 20330// (http://hl7.org/implement/standards/fhir/R4/search.html)). Supports 20331// four methods of search defined by the specification: * `GET 20332// [base]?[parameters]` to search across all resources. * `GET 20333// [base]/[type]?[parameters]` to search resources of a specified type. 20334// * `POST [base]/_search?[parameters]` as an alternate form having the 20335// same semantics as the `GET` method across all resources. * `POST 20336// [base]/[type]/_search?[parameters]` as an alternate form having the 20337// same semantics as the `GET` method for the specified type. The `GET` 20338// and `POST` methods do not support compartment searches. The `POST` 20339// method does not support `application/x-www-form-urlencoded` search 20340// parameters. On success, the response body contains a JSON-encoded 20341// representation of a `Bundle` resource of type `searchset`, containing 20342// the results of the search. Errors generated by the FHIR store contain 20343// a JSON-encoded `OperationOutcome` resource describing the reason for 20344// the error. If the request cannot be mapped to a valid API method on a 20345// FHIR store, a generic GCP error might be returned instead. The 20346// server's capability statement, retrieved through capabilities, 20347// indicates what search parameters are supported on each FHIR resource. 20348// A list of all search parameters defined by the specification can be 20349// found in the FHIR Search Parameter Registry (STU3 20350// (http://hl7.org/implement/standards/fhir/STU3/searchparameter-registry.html), 20351// R4 20352// (http://hl7.org/implement/standards/fhir/R4/searchparameter-registry.html)). 20353// FHIR search parameters for DSTU2 can be found on each resource's 20354// definition page. Supported search modifiers: `:missing`, `:exact`, 20355// `:contains`, `:text`, `:in`, `:not-in`, `:above`, `:below`, 20356// `:[type]`, `:not`, and `:recurse`. Supported search result 20357// parameters: `_sort`, `_count`, `_include`, `_revinclude`, 20358// `_summary=text`, `_summary=data`, and `_elements`. The maximum number 20359// of search results returned defaults to 100, which can be overridden 20360// by the `_count` parameter up to a maximum limit of 1000. If there are 20361// additional results, the returned `Bundle` will contain pagination 20362// links. Resources with a total size larger than 5MB or a field count 20363// larger than 50,000 might not be fully searchable as the server might 20364// trim its generated search index in those cases. Note: FHIR resources 20365// are indexed asynchronously, so there might be a slight delay between 20366// the time a resource is created or changes and when the change is 20367// reflected in search results. For samples and detailed information, 20368// see Searching for FHIR resources 20369// (/healthcare/docs/how-tos/fhir-search) and Advanced FHIR search 20370// features (/healthcare/docs/how-tos/fhir-advanced-search). 20371// 20372// - parent: Name of the FHIR store to retrieve resources from. 20373func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Search(parent string, searchresourcesrequest *SearchResourcesRequest) *ProjectsLocationsDatasetsFhirStoresFhirSearchCall { 20374 c := &ProjectsLocationsDatasetsFhirStoresFhirSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20375 c.parent = parent 20376 c.searchresourcesrequest = searchresourcesrequest 20377 return c 20378} 20379 20380// Fields allows partial responses to be retrieved. See 20381// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20382// for more information. 20383func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirSearchCall { 20384 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20385 return c 20386} 20387 20388// Context sets the context to be used in this call's Do method. Any 20389// pending HTTP request will be aborted if the provided context is 20390// canceled. 20391func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirSearchCall { 20392 c.ctx_ = ctx 20393 return c 20394} 20395 20396// Header returns an http.Header that can be modified by the caller to 20397// add HTTP headers to the request. 20398func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchCall) Header() http.Header { 20399 if c.header_ == nil { 20400 c.header_ = make(http.Header) 20401 } 20402 return c.header_ 20403} 20404 20405func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchCall) doRequest(alt string) (*http.Response, error) { 20406 reqHeaders := make(http.Header) 20407 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 20408 for k, v := range c.header_ { 20409 reqHeaders[k] = v 20410 } 20411 reqHeaders.Set("User-Agent", c.s.userAgent()) 20412 var body io.Reader = nil 20413 body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchresourcesrequest) 20414 if err != nil { 20415 return nil, err 20416 } 20417 reqHeaders.Set("Content-Type", "application/json") 20418 c.urlParams_.Set("alt", alt) 20419 c.urlParams_.Set("prettyPrint", "false") 20420 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/fhir/_search") 20421 urls += "?" + c.urlParams_.Encode() 20422 req, err := http.NewRequest("POST", urls, body) 20423 if err != nil { 20424 return nil, err 20425 } 20426 req.Header = reqHeaders 20427 googleapi.Expand(req.URL, map[string]string{ 20428 "parent": c.parent, 20429 }) 20430 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20431} 20432 20433// Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.search" call. 20434func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 20435 gensupport.SetOptions(c.urlParams_, opts...) 20436 return c.doRequest("") 20437 // { 20438 // "description": "Searches for resources in the given FHIR store according to criteria specified as query parameters. Implements the FHIR standard search interaction ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/http.html#search), [STU3](http://hl7.org/implement/standards/fhir/STU3/http.html#search), [R4](http://hl7.org/implement/standards/fhir/R4/http.html#search)) using the search semantics described in the FHIR Search specification ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/search.html), [STU3](http://hl7.org/implement/standards/fhir/STU3/search.html), [R4](http://hl7.org/implement/standards/fhir/R4/search.html)). Supports four methods of search defined by the specification: * `GET [base]?[parameters]` to search across all resources. * `GET [base]/[type]?[parameters]` to search resources of a specified type. * `POST [base]/_search?[parameters]` as an alternate form having the same semantics as the `GET` method across all resources. * `POST [base]/[type]/_search?[parameters]` as an alternate form having the same semantics as the `GET` method for the specified type. The `GET` and `POST` methods do not support compartment searches. The `POST` method does not support `application/x-www-form-urlencoded` search parameters. On success, the response body contains a JSON-encoded representation of a `Bundle` resource of type `searchset`, containing the results of the search. Errors generated by the FHIR store contain a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead. The server's capability statement, retrieved through capabilities, indicates what search parameters are supported on each FHIR resource. A list of all search parameters defined by the specification can be found in the FHIR Search Parameter Registry ([STU3](http://hl7.org/implement/standards/fhir/STU3/searchparameter-registry.html), [R4](http://hl7.org/implement/standards/fhir/R4/searchparameter-registry.html)). FHIR search parameters for DSTU2 can be found on each resource's definition page. Supported search modifiers: `:missing`, `:exact`, `:contains`, `:text`, `:in`, `:not-in`, `:above`, `:below`, `:[type]`, `:not`, and `:recurse`. Supported search result parameters: `_sort`, `_count`, `_include`, `_revinclude`, `_summary=text`, `_summary=data`, and `_elements`. The maximum number of search results returned defaults to 100, which can be overridden by the `_count` parameter up to a maximum limit of 1000. If there are additional results, the returned `Bundle` will contain pagination links. Resources with a total size larger than 5MB or a field count larger than 50,000 might not be fully searchable as the server might trim its generated search index in those cases. Note: FHIR resources are indexed asynchronously, so there might be a slight delay between the time a resource is created or changes and when the change is reflected in search results. For samples and detailed information, see [Searching for FHIR resources](/healthcare/docs/how-tos/fhir-search) and [Advanced FHIR search features](/healthcare/docs/how-tos/fhir-advanced-search).", 20439 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/_search", 20440 // "httpMethod": "POST", 20441 // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.search", 20442 // "parameterOrder": [ 20443 // "parent" 20444 // ], 20445 // "parameters": { 20446 // "parent": { 20447 // "description": "Name of the FHIR store to retrieve resources from.", 20448 // "location": "path", 20449 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$", 20450 // "required": true, 20451 // "type": "string" 20452 // } 20453 // }, 20454 // "path": "v1/{+parent}/fhir/_search", 20455 // "request": { 20456 // "$ref": "SearchResourcesRequest" 20457 // }, 20458 // "response": { 20459 // "$ref": "HttpBody" 20460 // }, 20461 // "scopes": [ 20462 // "https://www.googleapis.com/auth/cloud-platform" 20463 // ] 20464 // } 20465 20466} 20467 20468// method id "healthcare.projects.locations.datasets.fhirStores.fhir.search-type": 20469 20470type ProjectsLocationsDatasetsFhirStoresFhirSearchTypeCall struct { 20471 s *Service 20472 parent string 20473 resourceType string 20474 searchresourcesrequest *SearchResourcesRequest 20475 urlParams_ gensupport.URLParams 20476 ctx_ context.Context 20477 header_ http.Header 20478} 20479 20480// SearchType: Searches for resources in the given FHIR store according 20481// to criteria specified as query parameters. Implements the FHIR 20482// standard search interaction (DSTU2 20483// (http://hl7.org/implement/standards/fhir/DSTU2/http.html#search), 20484// STU3 (http://hl7.org/implement/standards/fhir/STU3/http.html#search), 20485// R4 (http://hl7.org/implement/standards/fhir/R4/http.html#search)) 20486// using the search semantics described in the FHIR Search specification 20487// (DSTU2 (http://hl7.org/implement/standards/fhir/DSTU2/search.html), 20488// STU3 (http://hl7.org/implement/standards/fhir/STU3/search.html), R4 20489// (http://hl7.org/implement/standards/fhir/R4/search.html)). Supports 20490// four methods of search defined by the specification: * `GET 20491// [base]?[parameters]` to search across all resources. * `GET 20492// [base]/[type]?[parameters]` to search resources of a specified type. 20493// * `POST [base]/_search?[parameters]` as an alternate form having the 20494// same semantics as the `GET` method across all resources. * `POST 20495// [base]/[type]/_search?[parameters]` as an alternate form having the 20496// same semantics as the `GET` method for the specified type. The `GET` 20497// and `POST` methods do not support compartment searches. The `POST` 20498// method does not support `application/x-www-form-urlencoded` search 20499// parameters. On success, the response body contains a JSON-encoded 20500// representation of a `Bundle` resource of type `searchset`, containing 20501// the results of the search. Errors generated by the FHIR store contain 20502// a JSON-encoded `OperationOutcome` resource describing the reason for 20503// the error. If the request cannot be mapped to a valid API method on a 20504// FHIR store, a generic GCP error might be returned instead. The 20505// server's capability statement, retrieved through capabilities, 20506// indicates what search parameters are supported on each FHIR resource. 20507// A list of all search parameters defined by the specification can be 20508// found in the FHIR Search Parameter Registry (STU3 20509// (http://hl7.org/implement/standards/fhir/STU3/searchparameter-registry.html), 20510// R4 20511// (http://hl7.org/implement/standards/fhir/R4/searchparameter-registry.html)). 20512// FHIR search parameters for DSTU2 can be found on each resource's 20513// definition page. Supported search modifiers: `:missing`, `:exact`, 20514// `:contains`, `:text`, `:in`, `:not-in`, `:above`, `:below`, 20515// `:[type]`, `:not`, and `:recurse`. Supported search result 20516// parameters: `_sort`, `_count`, `_include`, `_revinclude`, 20517// `_summary=text`, `_summary=data`, and `_elements`. The maximum number 20518// of search results returned defaults to 100, which can be overridden 20519// by the `_count` parameter up to a maximum limit of 1000. If there are 20520// additional results, the returned `Bundle` will contain pagination 20521// links. Resources with a total size larger than 5MB or a field count 20522// larger than 50,000 might not be fully searchable as the server might 20523// trim its generated search index in those cases. Note: FHIR resources 20524// are indexed asynchronously, so there might be a slight delay between 20525// the time a resource is created or changes and when the change is 20526// reflected in search results. For samples and detailed information, 20527// see Searching for FHIR resources 20528// (/healthcare/docs/how-tos/fhir-search) and Advanced FHIR search 20529// features (/healthcare/docs/how-tos/fhir-advanced-search). 20530// 20531// - parent: Name of the FHIR store to retrieve resources from. 20532// - resourceType: The FHIR resource type to search, such as Patient or 20533// Observation. For a complete list, see the FHIR Resource Index 20534// (DSTU2 20535// (http://hl7.org/implement/standards/fhir/DSTU2/resourcelist.html), 20536// STU3 20537// (http://hl7.org/implement/standards/fhir/STU3/resourcelist.html), 20538// R4 (http://hl7.org/implement/standards/fhir/R4/resourcelist.html)). 20539func (r *ProjectsLocationsDatasetsFhirStoresFhirService) SearchType(parent string, resourceType string, searchresourcesrequest *SearchResourcesRequest) *ProjectsLocationsDatasetsFhirStoresFhirSearchTypeCall { 20540 c := &ProjectsLocationsDatasetsFhirStoresFhirSearchTypeCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20541 c.parent = parent 20542 c.resourceType = resourceType 20543 c.searchresourcesrequest = searchresourcesrequest 20544 return c 20545} 20546 20547// Fields allows partial responses to be retrieved. See 20548// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20549// for more information. 20550func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchTypeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirSearchTypeCall { 20551 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20552 return c 20553} 20554 20555// Context sets the context to be used in this call's Do method. Any 20556// pending HTTP request will be aborted if the provided context is 20557// canceled. 20558func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchTypeCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirSearchTypeCall { 20559 c.ctx_ = ctx 20560 return c 20561} 20562 20563// Header returns an http.Header that can be modified by the caller to 20564// add HTTP headers to the request. 20565func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchTypeCall) Header() http.Header { 20566 if c.header_ == nil { 20567 c.header_ = make(http.Header) 20568 } 20569 return c.header_ 20570} 20571 20572func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchTypeCall) doRequest(alt string) (*http.Response, error) { 20573 reqHeaders := make(http.Header) 20574 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 20575 for k, v := range c.header_ { 20576 reqHeaders[k] = v 20577 } 20578 reqHeaders.Set("User-Agent", c.s.userAgent()) 20579 var body io.Reader = nil 20580 body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchresourcesrequest) 20581 if err != nil { 20582 return nil, err 20583 } 20584 reqHeaders.Set("Content-Type", "application/json") 20585 c.urlParams_.Set("alt", alt) 20586 c.urlParams_.Set("prettyPrint", "false") 20587 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/fhir/{resourceType}/_search") 20588 urls += "?" + c.urlParams_.Encode() 20589 req, err := http.NewRequest("POST", urls, body) 20590 if err != nil { 20591 return nil, err 20592 } 20593 req.Header = reqHeaders 20594 googleapi.Expand(req.URL, map[string]string{ 20595 "parent": c.parent, 20596 "resourceType": c.resourceType, 20597 }) 20598 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20599} 20600 20601// Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.search-type" call. 20602func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchTypeCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 20603 gensupport.SetOptions(c.urlParams_, opts...) 20604 return c.doRequest("") 20605 // { 20606 // "description": "Searches for resources in the given FHIR store according to criteria specified as query parameters. Implements the FHIR standard search interaction ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/http.html#search), [STU3](http://hl7.org/implement/standards/fhir/STU3/http.html#search), [R4](http://hl7.org/implement/standards/fhir/R4/http.html#search)) using the search semantics described in the FHIR Search specification ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/search.html), [STU3](http://hl7.org/implement/standards/fhir/STU3/search.html), [R4](http://hl7.org/implement/standards/fhir/R4/search.html)). Supports four methods of search defined by the specification: * `GET [base]?[parameters]` to search across all resources. * `GET [base]/[type]?[parameters]` to search resources of a specified type. * `POST [base]/_search?[parameters]` as an alternate form having the same semantics as the `GET` method across all resources. * `POST [base]/[type]/_search?[parameters]` as an alternate form having the same semantics as the `GET` method for the specified type. The `GET` and `POST` methods do not support compartment searches. The `POST` method does not support `application/x-www-form-urlencoded` search parameters. On success, the response body contains a JSON-encoded representation of a `Bundle` resource of type `searchset`, containing the results of the search. Errors generated by the FHIR store contain a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead. The server's capability statement, retrieved through capabilities, indicates what search parameters are supported on each FHIR resource. A list of all search parameters defined by the specification can be found in the FHIR Search Parameter Registry ([STU3](http://hl7.org/implement/standards/fhir/STU3/searchparameter-registry.html), [R4](http://hl7.org/implement/standards/fhir/R4/searchparameter-registry.html)). FHIR search parameters for DSTU2 can be found on each resource's definition page. Supported search modifiers: `:missing`, `:exact`, `:contains`, `:text`, `:in`, `:not-in`, `:above`, `:below`, `:[type]`, `:not`, and `:recurse`. Supported search result parameters: `_sort`, `_count`, `_include`, `_revinclude`, `_summary=text`, `_summary=data`, and `_elements`. The maximum number of search results returned defaults to 100, which can be overridden by the `_count` parameter up to a maximum limit of 1000. If there are additional results, the returned `Bundle` will contain pagination links. Resources with a total size larger than 5MB or a field count larger than 50,000 might not be fully searchable as the server might trim its generated search index in those cases. Note: FHIR resources are indexed asynchronously, so there might be a slight delay between the time a resource is created or changes and when the change is reflected in search results. For samples and detailed information, see [Searching for FHIR resources](/healthcare/docs/how-tos/fhir-search) and [Advanced FHIR search features](/healthcare/docs/how-tos/fhir-advanced-search).", 20607 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{resourceType}/_search", 20608 // "httpMethod": "POST", 20609 // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.search-type", 20610 // "parameterOrder": [ 20611 // "parent", 20612 // "resourceType" 20613 // ], 20614 // "parameters": { 20615 // "parent": { 20616 // "description": "Name of the FHIR store to retrieve resources from.", 20617 // "location": "path", 20618 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$", 20619 // "required": true, 20620 // "type": "string" 20621 // }, 20622 // "resourceType": { 20623 // "description": "The FHIR resource type to search, such as Patient or Observation. For a complete list, see the FHIR Resource Index ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/resourcelist.html), [STU3](http://hl7.org/implement/standards/fhir/STU3/resourcelist.html), [R4](http://hl7.org/implement/standards/fhir/R4/resourcelist.html)).", 20624 // "location": "path", 20625 // "required": true, 20626 // "type": "string" 20627 // } 20628 // }, 20629 // "path": "v1/{+parent}/fhir/{resourceType}/_search", 20630 // "request": { 20631 // "$ref": "SearchResourcesRequest" 20632 // }, 20633 // "response": { 20634 // "$ref": "HttpBody" 20635 // }, 20636 // "scopes": [ 20637 // "https://www.googleapis.com/auth/cloud-platform" 20638 // ] 20639 // } 20640 20641} 20642 20643// method id "healthcare.projects.locations.datasets.fhirStores.fhir.update": 20644 20645type ProjectsLocationsDatasetsFhirStoresFhirUpdateCall struct { 20646 s *Service 20647 name string 20648 body_ io.Reader 20649 urlParams_ gensupport.URLParams 20650 ctx_ context.Context 20651 header_ http.Header 20652} 20653 20654// Update: Updates the entire contents of a resource. Implements the 20655// FHIR standard update interaction (DSTU2 20656// (http://hl7.org/implement/standards/fhir/DSTU2/http.html#update), 20657// STU3 (http://hl7.org/implement/standards/fhir/STU3/http.html#update), 20658// R4 (http://hl7.org/implement/standards/fhir/R4/http.html#update)). If 20659// the specified resource does not exist and the FHIR store has 20660// enable_update_create set, creates the resource with the 20661// client-specified ID. It is strongly advised not to include or encode 20662// any sensitive data such as patient identifiers in client-specified 20663// resource IDs. Those IDs are part of the FHIR resource path recorded 20664// in Cloud Audit Logs and Pub/Sub notifications. Those IDs can also be 20665// contained in reference fields within other resources. The request 20666// body must contain a JSON-encoded FHIR resource, and the request 20667// headers must contain `Content-Type: application/fhir+json`. The 20668// resource must contain an `id` element having an identical value to 20669// the ID in the REST path of the request. On success, the response body 20670// contains a JSON-encoded representation of the updated resource, 20671// including the server-assigned version ID. Errors generated by the 20672// FHIR store contain a JSON-encoded `OperationOutcome` resource 20673// describing the reason for the error. If the request cannot be mapped 20674// to a valid API method on a FHIR store, a generic GCP error might be 20675// returned instead. For samples that show how to call `update`, see 20676// Updating a FHIR resource 20677// (/healthcare/docs/how-tos/fhir-resources#updating_a_fhir_resource). 20678// 20679// - name: The name of the resource to update. 20680func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Update(name string, body_ io.Reader) *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall { 20681 c := &ProjectsLocationsDatasetsFhirStoresFhirUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20682 c.name = name 20683 c.body_ = body_ 20684 return c 20685} 20686 20687// Fields allows partial responses to be retrieved. See 20688// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20689// for more information. 20690func (c *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall { 20691 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20692 return c 20693} 20694 20695// Context sets the context to be used in this call's Do method. Any 20696// pending HTTP request will be aborted if the provided context is 20697// canceled. 20698func (c *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall { 20699 c.ctx_ = ctx 20700 return c 20701} 20702 20703// Header returns an http.Header that can be modified by the caller to 20704// add HTTP headers to the request. 20705func (c *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall) Header() http.Header { 20706 if c.header_ == nil { 20707 c.header_ = make(http.Header) 20708 } 20709 return c.header_ 20710} 20711 20712func (c *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall) doRequest(alt string) (*http.Response, error) { 20713 reqHeaders := make(http.Header) 20714 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 20715 for k, v := range c.header_ { 20716 reqHeaders[k] = v 20717 } 20718 reqHeaders.Set("User-Agent", c.s.userAgent()) 20719 var body io.Reader = nil 20720 body = c.body_ 20721 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 20722 urls += "?" + c.urlParams_.Encode() 20723 req, err := http.NewRequest("PUT", urls, body) 20724 if err != nil { 20725 return nil, err 20726 } 20727 req.Header = reqHeaders 20728 googleapi.Expand(req.URL, map[string]string{ 20729 "name": c.name, 20730 }) 20731 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20732} 20733 20734// Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.update" call. 20735func (c *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 20736 gensupport.SetOptions(c.urlParams_, opts...) 20737 return c.doRequest("") 20738 // { 20739 // "description": "Updates the entire contents of a resource. Implements the FHIR standard update interaction ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/http.html#update), [STU3](http://hl7.org/implement/standards/fhir/STU3/http.html#update), [R4](http://hl7.org/implement/standards/fhir/R4/http.html#update)). If the specified resource does not exist and the FHIR store has enable_update_create set, creates the resource with the client-specified ID. It is strongly advised not to include or encode any sensitive data such as patient identifiers in client-specified resource IDs. Those IDs are part of the FHIR resource path recorded in Cloud Audit Logs and Pub/Sub notifications. Those IDs can also be contained in reference fields within other resources. The request body must contain a JSON-encoded FHIR resource, and the request headers must contain `Content-Type: application/fhir+json`. The resource must contain an `id` element having an identical value to the ID in the REST path of the request. On success, the response body contains a JSON-encoded representation of the updated resource, including the server-assigned version ID. Errors generated by the FHIR store contain a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead. For samples that show how to call `update`, see [Updating a FHIR resource](/healthcare/docs/how-tos/fhir-resources#updating_a_fhir_resource).", 20740 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{fhirId}/{fhirId1}", 20741 // "httpMethod": "PUT", 20742 // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.update", 20743 // "parameterOrder": [ 20744 // "name" 20745 // ], 20746 // "parameters": { 20747 // "name": { 20748 // "description": "The name of the resource to update.", 20749 // "location": "path", 20750 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/fhir/[^/]+/[^/]+$", 20751 // "required": true, 20752 // "type": "string" 20753 // } 20754 // }, 20755 // "path": "v1/{+name}", 20756 // "request": { 20757 // "$ref": "HttpBody" 20758 // }, 20759 // "response": { 20760 // "$ref": "HttpBody" 20761 // }, 20762 // "scopes": [ 20763 // "https://www.googleapis.com/auth/cloud-platform" 20764 // ] 20765 // } 20766 20767} 20768 20769// method id "healthcare.projects.locations.datasets.fhirStores.fhir.vread": 20770 20771type ProjectsLocationsDatasetsFhirStoresFhirVreadCall struct { 20772 s *Service 20773 name string 20774 urlParams_ gensupport.URLParams 20775 ifNoneMatch_ string 20776 ctx_ context.Context 20777 header_ http.Header 20778} 20779 20780// Vread: Gets the contents of a version (current or historical) of a 20781// FHIR resource by version ID. Implements the FHIR standard vread 20782// interaction (DSTU2 20783// (http://hl7.org/implement/standards/fhir/DSTU2/http.html#vread), STU3 20784// (http://hl7.org/implement/standards/fhir/STU3/http.html#vread), R4 20785// (http://hl7.org/implement/standards/fhir/R4/http.html#vread)). On 20786// success, the response body contains a JSON-encoded representation of 20787// the resource. Errors generated by the FHIR store contain a 20788// JSON-encoded `OperationOutcome` resource describing the reason for 20789// the error. If the request cannot be mapped to a valid API method on a 20790// FHIR store, a generic GCP error might be returned instead. For 20791// samples that show how to call `vread`, see Retrieving a FHIR resource 20792// version 20793// (/healthcare/docs/how-tos/fhir-resources#retrieving_a_fhir_resource_ve 20794// rsion). 20795// 20796// - name: The name of the resource version to retrieve. 20797func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Vread(name string) *ProjectsLocationsDatasetsFhirStoresFhirVreadCall { 20798 c := &ProjectsLocationsDatasetsFhirStoresFhirVreadCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20799 c.name = name 20800 return c 20801} 20802 20803// Fields allows partial responses to be retrieved. See 20804// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20805// for more information. 20806func (c *ProjectsLocationsDatasetsFhirStoresFhirVreadCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirVreadCall { 20807 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20808 return c 20809} 20810 20811// IfNoneMatch sets the optional parameter which makes the operation 20812// fail if the object's ETag matches the given value. This is useful for 20813// getting updates only after the object has changed since the last 20814// request. Use googleapi.IsNotModified to check whether the response 20815// error from Do is the result of In-None-Match. 20816func (c *ProjectsLocationsDatasetsFhirStoresFhirVreadCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirVreadCall { 20817 c.ifNoneMatch_ = entityTag 20818 return c 20819} 20820 20821// Context sets the context to be used in this call's Do method. Any 20822// pending HTTP request will be aborted if the provided context is 20823// canceled. 20824func (c *ProjectsLocationsDatasetsFhirStoresFhirVreadCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirVreadCall { 20825 c.ctx_ = ctx 20826 return c 20827} 20828 20829// Header returns an http.Header that can be modified by the caller to 20830// add HTTP headers to the request. 20831func (c *ProjectsLocationsDatasetsFhirStoresFhirVreadCall) Header() http.Header { 20832 if c.header_ == nil { 20833 c.header_ = make(http.Header) 20834 } 20835 return c.header_ 20836} 20837 20838func (c *ProjectsLocationsDatasetsFhirStoresFhirVreadCall) doRequest(alt string) (*http.Response, error) { 20839 reqHeaders := make(http.Header) 20840 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 20841 for k, v := range c.header_ { 20842 reqHeaders[k] = v 20843 } 20844 reqHeaders.Set("User-Agent", c.s.userAgent()) 20845 if c.ifNoneMatch_ != "" { 20846 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 20847 } 20848 var body io.Reader = nil 20849 c.urlParams_.Set("alt", alt) 20850 c.urlParams_.Set("prettyPrint", "false") 20851 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 20852 urls += "?" + c.urlParams_.Encode() 20853 req, err := http.NewRequest("GET", urls, body) 20854 if err != nil { 20855 return nil, err 20856 } 20857 req.Header = reqHeaders 20858 googleapi.Expand(req.URL, map[string]string{ 20859 "name": c.name, 20860 }) 20861 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20862} 20863 20864// Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.vread" call. 20865func (c *ProjectsLocationsDatasetsFhirStoresFhirVreadCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { 20866 gensupport.SetOptions(c.urlParams_, opts...) 20867 return c.doRequest("") 20868 // { 20869 // "description": "Gets the contents of a version (current or historical) of a FHIR resource by version ID. Implements the FHIR standard vread interaction ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/http.html#vread), [STU3](http://hl7.org/implement/standards/fhir/STU3/http.html#vread), [R4](http://hl7.org/implement/standards/fhir/R4/http.html#vread)). On success, the response body contains a JSON-encoded representation of the resource. Errors generated by the FHIR store contain a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead. For samples that show how to call `vread`, see [Retrieving a FHIR resource version](/healthcare/docs/how-tos/fhir-resources#retrieving_a_fhir_resource_version).", 20870 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{fhirId}/{fhirId1}/_history/{_historyId}", 20871 // "httpMethod": "GET", 20872 // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.vread", 20873 // "parameterOrder": [ 20874 // "name" 20875 // ], 20876 // "parameters": { 20877 // "name": { 20878 // "description": "The name of the resource version to retrieve.", 20879 // "location": "path", 20880 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/fhir/[^/]+/[^/]+/_history/[^/]+$", 20881 // "required": true, 20882 // "type": "string" 20883 // } 20884 // }, 20885 // "path": "v1/{+name}", 20886 // "response": { 20887 // "$ref": "HttpBody" 20888 // }, 20889 // "scopes": [ 20890 // "https://www.googleapis.com/auth/cloud-platform" 20891 // ] 20892 // } 20893 20894} 20895 20896// method id "healthcare.projects.locations.datasets.hl7V2Stores.create": 20897 20898type ProjectsLocationsDatasetsHl7V2StoresCreateCall struct { 20899 s *Service 20900 parent string 20901 hl7v2store *Hl7V2Store 20902 urlParams_ gensupport.URLParams 20903 ctx_ context.Context 20904 header_ http.Header 20905} 20906 20907// Create: Creates a new HL7v2 store within the parent dataset. 20908// 20909// - parent: The name of the dataset this HL7v2 store belongs to. 20910func (r *ProjectsLocationsDatasetsHl7V2StoresService) Create(parent string, hl7v2store *Hl7V2Store) *ProjectsLocationsDatasetsHl7V2StoresCreateCall { 20911 c := &ProjectsLocationsDatasetsHl7V2StoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20912 c.parent = parent 20913 c.hl7v2store = hl7v2store 20914 return c 20915} 20916 20917// Hl7V2StoreId sets the optional parameter "hl7V2StoreId": The ID of 20918// the HL7v2 store that is being created. The string must match the 20919// following regex: `[\p{L}\p{N}_\-\.]{1,256}`. 20920func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) Hl7V2StoreId(hl7V2StoreId string) *ProjectsLocationsDatasetsHl7V2StoresCreateCall { 20921 c.urlParams_.Set("hl7V2StoreId", hl7V2StoreId) 20922 return c 20923} 20924 20925// Fields allows partial responses to be retrieved. See 20926// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20927// for more information. 20928func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresCreateCall { 20929 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20930 return c 20931} 20932 20933// Context sets the context to be used in this call's Do method. Any 20934// pending HTTP request will be aborted if the provided context is 20935// canceled. 20936func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresCreateCall { 20937 c.ctx_ = ctx 20938 return c 20939} 20940 20941// Header returns an http.Header that can be modified by the caller to 20942// add HTTP headers to the request. 20943func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) Header() http.Header { 20944 if c.header_ == nil { 20945 c.header_ = make(http.Header) 20946 } 20947 return c.header_ 20948} 20949 20950func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) doRequest(alt string) (*http.Response, error) { 20951 reqHeaders := make(http.Header) 20952 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 20953 for k, v := range c.header_ { 20954 reqHeaders[k] = v 20955 } 20956 reqHeaders.Set("User-Agent", c.s.userAgent()) 20957 var body io.Reader = nil 20958 body, err := googleapi.WithoutDataWrapper.JSONReader(c.hl7v2store) 20959 if err != nil { 20960 return nil, err 20961 } 20962 reqHeaders.Set("Content-Type", "application/json") 20963 c.urlParams_.Set("alt", alt) 20964 c.urlParams_.Set("prettyPrint", "false") 20965 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/hl7V2Stores") 20966 urls += "?" + c.urlParams_.Encode() 20967 req, err := http.NewRequest("POST", urls, body) 20968 if err != nil { 20969 return nil, err 20970 } 20971 req.Header = reqHeaders 20972 googleapi.Expand(req.URL, map[string]string{ 20973 "parent": c.parent, 20974 }) 20975 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20976} 20977 20978// Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.create" call. 20979// Exactly one of *Hl7V2Store or error will be non-nil. Any non-2xx 20980// status code is an error. Response headers are in either 20981// *Hl7V2Store.ServerResponse.Header or (if a response was returned at 20982// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 20983// to check whether the returned error was because 20984// http.StatusNotModified was returned. 20985func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) Do(opts ...googleapi.CallOption) (*Hl7V2Store, error) { 20986 gensupport.SetOptions(c.urlParams_, opts...) 20987 res, err := c.doRequest("json") 20988 if res != nil && res.StatusCode == http.StatusNotModified { 20989 if res.Body != nil { 20990 res.Body.Close() 20991 } 20992 return nil, &googleapi.Error{ 20993 Code: res.StatusCode, 20994 Header: res.Header, 20995 } 20996 } 20997 if err != nil { 20998 return nil, err 20999 } 21000 defer googleapi.CloseBody(res) 21001 if err := googleapi.CheckResponse(res); err != nil { 21002 return nil, err 21003 } 21004 ret := &Hl7V2Store{ 21005 ServerResponse: googleapi.ServerResponse{ 21006 Header: res.Header, 21007 HTTPStatusCode: res.StatusCode, 21008 }, 21009 } 21010 target := &ret 21011 if err := gensupport.DecodeResponse(target, res); err != nil { 21012 return nil, err 21013 } 21014 return ret, nil 21015 // { 21016 // "description": "Creates a new HL7v2 store within the parent dataset.", 21017 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores", 21018 // "httpMethod": "POST", 21019 // "id": "healthcare.projects.locations.datasets.hl7V2Stores.create", 21020 // "parameterOrder": [ 21021 // "parent" 21022 // ], 21023 // "parameters": { 21024 // "hl7V2StoreId": { 21025 // "description": "The ID of the HL7v2 store that is being created. The string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`.", 21026 // "location": "query", 21027 // "type": "string" 21028 // }, 21029 // "parent": { 21030 // "description": "The name of the dataset this HL7v2 store belongs to.", 21031 // "location": "path", 21032 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", 21033 // "required": true, 21034 // "type": "string" 21035 // } 21036 // }, 21037 // "path": "v1/{+parent}/hl7V2Stores", 21038 // "request": { 21039 // "$ref": "Hl7V2Store" 21040 // }, 21041 // "response": { 21042 // "$ref": "Hl7V2Store" 21043 // }, 21044 // "scopes": [ 21045 // "https://www.googleapis.com/auth/cloud-platform" 21046 // ] 21047 // } 21048 21049} 21050 21051// method id "healthcare.projects.locations.datasets.hl7V2Stores.delete": 21052 21053type ProjectsLocationsDatasetsHl7V2StoresDeleteCall struct { 21054 s *Service 21055 name string 21056 urlParams_ gensupport.URLParams 21057 ctx_ context.Context 21058 header_ http.Header 21059} 21060 21061// Delete: Deletes the specified HL7v2 store and removes all messages 21062// that it contains. 21063// 21064// - name: The resource name of the HL7v2 store to delete. 21065func (r *ProjectsLocationsDatasetsHl7V2StoresService) Delete(name string) *ProjectsLocationsDatasetsHl7V2StoresDeleteCall { 21066 c := &ProjectsLocationsDatasetsHl7V2StoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21067 c.name = name 21068 return c 21069} 21070 21071// Fields allows partial responses to be retrieved. See 21072// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21073// for more information. 21074func (c *ProjectsLocationsDatasetsHl7V2StoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresDeleteCall { 21075 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21076 return c 21077} 21078 21079// Context sets the context to be used in this call's Do method. Any 21080// pending HTTP request will be aborted if the provided context is 21081// canceled. 21082func (c *ProjectsLocationsDatasetsHl7V2StoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresDeleteCall { 21083 c.ctx_ = ctx 21084 return c 21085} 21086 21087// Header returns an http.Header that can be modified by the caller to 21088// add HTTP headers to the request. 21089func (c *ProjectsLocationsDatasetsHl7V2StoresDeleteCall) Header() http.Header { 21090 if c.header_ == nil { 21091 c.header_ = make(http.Header) 21092 } 21093 return c.header_ 21094} 21095 21096func (c *ProjectsLocationsDatasetsHl7V2StoresDeleteCall) doRequest(alt string) (*http.Response, error) { 21097 reqHeaders := make(http.Header) 21098 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 21099 for k, v := range c.header_ { 21100 reqHeaders[k] = v 21101 } 21102 reqHeaders.Set("User-Agent", c.s.userAgent()) 21103 var body io.Reader = nil 21104 c.urlParams_.Set("alt", alt) 21105 c.urlParams_.Set("prettyPrint", "false") 21106 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 21107 urls += "?" + c.urlParams_.Encode() 21108 req, err := http.NewRequest("DELETE", urls, body) 21109 if err != nil { 21110 return nil, err 21111 } 21112 req.Header = reqHeaders 21113 googleapi.Expand(req.URL, map[string]string{ 21114 "name": c.name, 21115 }) 21116 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21117} 21118 21119// Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.delete" call. 21120// Exactly one of *Empty or error will be non-nil. Any non-2xx status 21121// code is an error. Response headers are in either 21122// *Empty.ServerResponse.Header or (if a response was returned at all) 21123// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 21124// check whether the returned error was because http.StatusNotModified 21125// was returned. 21126func (c *ProjectsLocationsDatasetsHl7V2StoresDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 21127 gensupport.SetOptions(c.urlParams_, opts...) 21128 res, err := c.doRequest("json") 21129 if res != nil && res.StatusCode == http.StatusNotModified { 21130 if res.Body != nil { 21131 res.Body.Close() 21132 } 21133 return nil, &googleapi.Error{ 21134 Code: res.StatusCode, 21135 Header: res.Header, 21136 } 21137 } 21138 if err != nil { 21139 return nil, err 21140 } 21141 defer googleapi.CloseBody(res) 21142 if err := googleapi.CheckResponse(res); err != nil { 21143 return nil, err 21144 } 21145 ret := &Empty{ 21146 ServerResponse: googleapi.ServerResponse{ 21147 Header: res.Header, 21148 HTTPStatusCode: res.StatusCode, 21149 }, 21150 } 21151 target := &ret 21152 if err := gensupport.DecodeResponse(target, res); err != nil { 21153 return nil, err 21154 } 21155 return ret, nil 21156 // { 21157 // "description": "Deletes the specified HL7v2 store and removes all messages that it contains.", 21158 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}", 21159 // "httpMethod": "DELETE", 21160 // "id": "healthcare.projects.locations.datasets.hl7V2Stores.delete", 21161 // "parameterOrder": [ 21162 // "name" 21163 // ], 21164 // "parameters": { 21165 // "name": { 21166 // "description": "The resource name of the HL7v2 store to delete.", 21167 // "location": "path", 21168 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", 21169 // "required": true, 21170 // "type": "string" 21171 // } 21172 // }, 21173 // "path": "v1/{+name}", 21174 // "response": { 21175 // "$ref": "Empty" 21176 // }, 21177 // "scopes": [ 21178 // "https://www.googleapis.com/auth/cloud-platform" 21179 // ] 21180 // } 21181 21182} 21183 21184// method id "healthcare.projects.locations.datasets.hl7V2Stores.get": 21185 21186type ProjectsLocationsDatasetsHl7V2StoresGetCall struct { 21187 s *Service 21188 name string 21189 urlParams_ gensupport.URLParams 21190 ifNoneMatch_ string 21191 ctx_ context.Context 21192 header_ http.Header 21193} 21194 21195// Get: Gets the specified HL7v2 store. 21196// 21197// - name: The resource name of the HL7v2 store to get. 21198func (r *ProjectsLocationsDatasetsHl7V2StoresService) Get(name string) *ProjectsLocationsDatasetsHl7V2StoresGetCall { 21199 c := &ProjectsLocationsDatasetsHl7V2StoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21200 c.name = name 21201 return c 21202} 21203 21204// Fields allows partial responses to be retrieved. See 21205// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21206// for more information. 21207func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresGetCall { 21208 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21209 return c 21210} 21211 21212// IfNoneMatch sets the optional parameter which makes the operation 21213// fail if the object's ETag matches the given value. This is useful for 21214// getting updates only after the object has changed since the last 21215// request. Use googleapi.IsNotModified to check whether the response 21216// error from Do is the result of In-None-Match. 21217func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsHl7V2StoresGetCall { 21218 c.ifNoneMatch_ = entityTag 21219 return c 21220} 21221 21222// Context sets the context to be used in this call's Do method. Any 21223// pending HTTP request will be aborted if the provided context is 21224// canceled. 21225func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresGetCall { 21226 c.ctx_ = ctx 21227 return c 21228} 21229 21230// Header returns an http.Header that can be modified by the caller to 21231// add HTTP headers to the request. 21232func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) Header() http.Header { 21233 if c.header_ == nil { 21234 c.header_ = make(http.Header) 21235 } 21236 return c.header_ 21237} 21238 21239func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) doRequest(alt string) (*http.Response, error) { 21240 reqHeaders := make(http.Header) 21241 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 21242 for k, v := range c.header_ { 21243 reqHeaders[k] = v 21244 } 21245 reqHeaders.Set("User-Agent", c.s.userAgent()) 21246 if c.ifNoneMatch_ != "" { 21247 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 21248 } 21249 var body io.Reader = nil 21250 c.urlParams_.Set("alt", alt) 21251 c.urlParams_.Set("prettyPrint", "false") 21252 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 21253 urls += "?" + c.urlParams_.Encode() 21254 req, err := http.NewRequest("GET", urls, body) 21255 if err != nil { 21256 return nil, err 21257 } 21258 req.Header = reqHeaders 21259 googleapi.Expand(req.URL, map[string]string{ 21260 "name": c.name, 21261 }) 21262 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21263} 21264 21265// Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.get" call. 21266// Exactly one of *Hl7V2Store or error will be non-nil. Any non-2xx 21267// status code is an error. Response headers are in either 21268// *Hl7V2Store.ServerResponse.Header or (if a response was returned at 21269// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 21270// to check whether the returned error was because 21271// http.StatusNotModified was returned. 21272func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) Do(opts ...googleapi.CallOption) (*Hl7V2Store, error) { 21273 gensupport.SetOptions(c.urlParams_, opts...) 21274 res, err := c.doRequest("json") 21275 if res != nil && res.StatusCode == http.StatusNotModified { 21276 if res.Body != nil { 21277 res.Body.Close() 21278 } 21279 return nil, &googleapi.Error{ 21280 Code: res.StatusCode, 21281 Header: res.Header, 21282 } 21283 } 21284 if err != nil { 21285 return nil, err 21286 } 21287 defer googleapi.CloseBody(res) 21288 if err := googleapi.CheckResponse(res); err != nil { 21289 return nil, err 21290 } 21291 ret := &Hl7V2Store{ 21292 ServerResponse: googleapi.ServerResponse{ 21293 Header: res.Header, 21294 HTTPStatusCode: res.StatusCode, 21295 }, 21296 } 21297 target := &ret 21298 if err := gensupport.DecodeResponse(target, res); err != nil { 21299 return nil, err 21300 } 21301 return ret, nil 21302 // { 21303 // "description": "Gets the specified HL7v2 store.", 21304 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}", 21305 // "httpMethod": "GET", 21306 // "id": "healthcare.projects.locations.datasets.hl7V2Stores.get", 21307 // "parameterOrder": [ 21308 // "name" 21309 // ], 21310 // "parameters": { 21311 // "name": { 21312 // "description": "The resource name of the HL7v2 store to get.", 21313 // "location": "path", 21314 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", 21315 // "required": true, 21316 // "type": "string" 21317 // } 21318 // }, 21319 // "path": "v1/{+name}", 21320 // "response": { 21321 // "$ref": "Hl7V2Store" 21322 // }, 21323 // "scopes": [ 21324 // "https://www.googleapis.com/auth/cloud-platform" 21325 // ] 21326 // } 21327 21328} 21329 21330// method id "healthcare.projects.locations.datasets.hl7V2Stores.getIamPolicy": 21331 21332type ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall struct { 21333 s *Service 21334 resource string 21335 urlParams_ gensupport.URLParams 21336 ifNoneMatch_ string 21337 ctx_ context.Context 21338 header_ http.Header 21339} 21340 21341// GetIamPolicy: Gets the access control policy for a resource. Returns 21342// an empty policy if the resource exists and does not have a policy 21343// set. 21344// 21345// - resource: REQUIRED: The resource for which the policy is being 21346// requested. See the operation documentation for the appropriate 21347// value for this field. 21348func (r *ProjectsLocationsDatasetsHl7V2StoresService) GetIamPolicy(resource string) *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall { 21349 c := &ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21350 c.resource = resource 21351 return c 21352} 21353 21354// OptionsRequestedPolicyVersion sets the optional parameter 21355// "options.requestedPolicyVersion": The policy format version to be 21356// returned. Valid values are 0, 1, and 3. Requests specifying an 21357// invalid value will be rejected. Requests for policies with any 21358// conditional bindings must specify version 3. Policies without any 21359// conditional bindings may specify any valid value or leave the field 21360// unset. To learn which resources support conditions in their IAM 21361// policies, see the IAM documentation 21362// (https://cloud.google.com/iam/help/conditions/resource-policies). 21363func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall { 21364 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) 21365 return c 21366} 21367 21368// Fields allows partial responses to be retrieved. See 21369// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21370// for more information. 21371func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall { 21372 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21373 return c 21374} 21375 21376// IfNoneMatch sets the optional parameter which makes the operation 21377// fail if the object's ETag matches the given value. This is useful for 21378// getting updates only after the object has changed since the last 21379// request. Use googleapi.IsNotModified to check whether the response 21380// error from Do is the result of In-None-Match. 21381func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall { 21382 c.ifNoneMatch_ = entityTag 21383 return c 21384} 21385 21386// Context sets the context to be used in this call's Do method. Any 21387// pending HTTP request will be aborted if the provided context is 21388// canceled. 21389func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall { 21390 c.ctx_ = ctx 21391 return c 21392} 21393 21394// Header returns an http.Header that can be modified by the caller to 21395// add HTTP headers to the request. 21396func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) Header() http.Header { 21397 if c.header_ == nil { 21398 c.header_ = make(http.Header) 21399 } 21400 return c.header_ 21401} 21402 21403func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 21404 reqHeaders := make(http.Header) 21405 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 21406 for k, v := range c.header_ { 21407 reqHeaders[k] = v 21408 } 21409 reqHeaders.Set("User-Agent", c.s.userAgent()) 21410 if c.ifNoneMatch_ != "" { 21411 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 21412 } 21413 var body io.Reader = nil 21414 c.urlParams_.Set("alt", alt) 21415 c.urlParams_.Set("prettyPrint", "false") 21416 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") 21417 urls += "?" + c.urlParams_.Encode() 21418 req, err := http.NewRequest("GET", urls, body) 21419 if err != nil { 21420 return nil, err 21421 } 21422 req.Header = reqHeaders 21423 googleapi.Expand(req.URL, map[string]string{ 21424 "resource": c.resource, 21425 }) 21426 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21427} 21428 21429// Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.getIamPolicy" call. 21430// Exactly one of *Policy or error will be non-nil. Any non-2xx status 21431// code is an error. Response headers are in either 21432// *Policy.ServerResponse.Header or (if a response was returned at all) 21433// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 21434// check whether the returned error was because http.StatusNotModified 21435// was returned. 21436func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 21437 gensupport.SetOptions(c.urlParams_, opts...) 21438 res, err := c.doRequest("json") 21439 if res != nil && res.StatusCode == http.StatusNotModified { 21440 if res.Body != nil { 21441 res.Body.Close() 21442 } 21443 return nil, &googleapi.Error{ 21444 Code: res.StatusCode, 21445 Header: res.Header, 21446 } 21447 } 21448 if err != nil { 21449 return nil, err 21450 } 21451 defer googleapi.CloseBody(res) 21452 if err := googleapi.CheckResponse(res); err != nil { 21453 return nil, err 21454 } 21455 ret := &Policy{ 21456 ServerResponse: googleapi.ServerResponse{ 21457 Header: res.Header, 21458 HTTPStatusCode: res.StatusCode, 21459 }, 21460 } 21461 target := &ret 21462 if err := gensupport.DecodeResponse(target, res); err != nil { 21463 return nil, err 21464 } 21465 return ret, nil 21466 // { 21467 // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", 21468 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}:getIamPolicy", 21469 // "httpMethod": "GET", 21470 // "id": "healthcare.projects.locations.datasets.hl7V2Stores.getIamPolicy", 21471 // "parameterOrder": [ 21472 // "resource" 21473 // ], 21474 // "parameters": { 21475 // "options.requestedPolicyVersion": { 21476 // "description": "Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", 21477 // "format": "int32", 21478 // "location": "query", 21479 // "type": "integer" 21480 // }, 21481 // "resource": { 21482 // "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", 21483 // "location": "path", 21484 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", 21485 // "required": true, 21486 // "type": "string" 21487 // } 21488 // }, 21489 // "path": "v1/{+resource}:getIamPolicy", 21490 // "response": { 21491 // "$ref": "Policy" 21492 // }, 21493 // "scopes": [ 21494 // "https://www.googleapis.com/auth/cloud-platform" 21495 // ] 21496 // } 21497 21498} 21499 21500// method id "healthcare.projects.locations.datasets.hl7V2Stores.list": 21501 21502type ProjectsLocationsDatasetsHl7V2StoresListCall struct { 21503 s *Service 21504 parent string 21505 urlParams_ gensupport.URLParams 21506 ifNoneMatch_ string 21507 ctx_ context.Context 21508 header_ http.Header 21509} 21510 21511// List: Lists the HL7v2 stores in the given dataset. 21512// 21513// - parent: Name of the dataset. 21514func (r *ProjectsLocationsDatasetsHl7V2StoresService) List(parent string) *ProjectsLocationsDatasetsHl7V2StoresListCall { 21515 c := &ProjectsLocationsDatasetsHl7V2StoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21516 c.parent = parent 21517 return c 21518} 21519 21520// Filter sets the optional parameter "filter": Restricts stores 21521// returned to those matching a filter. The following syntax is 21522// available: * A string field value can be written as text inside 21523// quotation marks, for example "query text". The only valid 21524// relational operation for text fields is equality (`=`), where text is 21525// searched within the field, rather than having the field be equal to 21526// the text. For example, "Comment = great" returns messages with 21527// `great` in the comment field. * A number field value can be written 21528// as an integer, a decimal, or an exponential. The valid relational 21529// operators for number fields are the equality operator (`=`), along 21530// with the less than/greater than operators (`<`, `<=`, `>`, `>=`). 21531// Note that there is no inequality (`!=`) operator. You can prepend the 21532// `NOT` operator to an expression to negate it. * A date field value 21533// must be written in `yyyy-mm-dd` form. Fields with date and time use 21534// the RFC3339 time format. Leading zeros are required for one-digit 21535// months and days. The valid relational operators for date fields are 21536// the equality operator (`=`) , along with the less than/greater than 21537// operators (`<`, `<=`, `>`, `>=`). Note that there is no inequality 21538// (`!=`) operator. You can prepend the `NOT` operator to an expression 21539// to negate it. * Multiple field query expressions can be combined in 21540// one query by adding `AND` or `OR` operators between the expressions. 21541// If a boolean operator appears within a quoted string, it is not 21542// treated as special, it's just another part of the character string to 21543// be matched. You can prepend the `NOT` operator to an expression to 21544// negate it. Only filtering on labels is supported. For example, 21545// `labels.key=value`. 21546func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Filter(filter string) *ProjectsLocationsDatasetsHl7V2StoresListCall { 21547 c.urlParams_.Set("filter", filter) 21548 return c 21549} 21550 21551// PageSize sets the optional parameter "pageSize": Limit on the number 21552// of HL7v2 stores to return in a single response. If not specified, 100 21553// is used. May not be larger than 1000. 21554func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsHl7V2StoresListCall { 21555 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 21556 return c 21557} 21558 21559// PageToken sets the optional parameter "pageToken": The 21560// next_page_token value returned from the previous List request, if 21561// any. 21562func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsHl7V2StoresListCall { 21563 c.urlParams_.Set("pageToken", pageToken) 21564 return c 21565} 21566 21567// Fields allows partial responses to be retrieved. See 21568// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21569// for more information. 21570func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresListCall { 21571 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21572 return c 21573} 21574 21575// IfNoneMatch sets the optional parameter which makes the operation 21576// fail if the object's ETag matches the given value. This is useful for 21577// getting updates only after the object has changed since the last 21578// request. Use googleapi.IsNotModified to check whether the response 21579// error from Do is the result of In-None-Match. 21580func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsHl7V2StoresListCall { 21581 c.ifNoneMatch_ = entityTag 21582 return c 21583} 21584 21585// Context sets the context to be used in this call's Do method. Any 21586// pending HTTP request will be aborted if the provided context is 21587// canceled. 21588func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresListCall { 21589 c.ctx_ = ctx 21590 return c 21591} 21592 21593// Header returns an http.Header that can be modified by the caller to 21594// add HTTP headers to the request. 21595func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Header() http.Header { 21596 if c.header_ == nil { 21597 c.header_ = make(http.Header) 21598 } 21599 return c.header_ 21600} 21601 21602func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) doRequest(alt string) (*http.Response, error) { 21603 reqHeaders := make(http.Header) 21604 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 21605 for k, v := range c.header_ { 21606 reqHeaders[k] = v 21607 } 21608 reqHeaders.Set("User-Agent", c.s.userAgent()) 21609 if c.ifNoneMatch_ != "" { 21610 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 21611 } 21612 var body io.Reader = nil 21613 c.urlParams_.Set("alt", alt) 21614 c.urlParams_.Set("prettyPrint", "false") 21615 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/hl7V2Stores") 21616 urls += "?" + c.urlParams_.Encode() 21617 req, err := http.NewRequest("GET", urls, body) 21618 if err != nil { 21619 return nil, err 21620 } 21621 req.Header = reqHeaders 21622 googleapi.Expand(req.URL, map[string]string{ 21623 "parent": c.parent, 21624 }) 21625 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21626} 21627 21628// Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.list" call. 21629// Exactly one of *ListHl7V2StoresResponse or error will be non-nil. Any 21630// non-2xx status code is an error. Response headers are in either 21631// *ListHl7V2StoresResponse.ServerResponse.Header or (if a response was 21632// returned at all) in error.(*googleapi.Error).Header. Use 21633// googleapi.IsNotModified to check whether the returned error was 21634// because http.StatusNotModified was returned. 21635func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Do(opts ...googleapi.CallOption) (*ListHl7V2StoresResponse, error) { 21636 gensupport.SetOptions(c.urlParams_, opts...) 21637 res, err := c.doRequest("json") 21638 if res != nil && res.StatusCode == http.StatusNotModified { 21639 if res.Body != nil { 21640 res.Body.Close() 21641 } 21642 return nil, &googleapi.Error{ 21643 Code: res.StatusCode, 21644 Header: res.Header, 21645 } 21646 } 21647 if err != nil { 21648 return nil, err 21649 } 21650 defer googleapi.CloseBody(res) 21651 if err := googleapi.CheckResponse(res); err != nil { 21652 return nil, err 21653 } 21654 ret := &ListHl7V2StoresResponse{ 21655 ServerResponse: googleapi.ServerResponse{ 21656 Header: res.Header, 21657 HTTPStatusCode: res.StatusCode, 21658 }, 21659 } 21660 target := &ret 21661 if err := gensupport.DecodeResponse(target, res); err != nil { 21662 return nil, err 21663 } 21664 return ret, nil 21665 // { 21666 // "description": "Lists the HL7v2 stores in the given dataset.", 21667 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores", 21668 // "httpMethod": "GET", 21669 // "id": "healthcare.projects.locations.datasets.hl7V2Stores.list", 21670 // "parameterOrder": [ 21671 // "parent" 21672 // ], 21673 // "parameters": { 21674 // "filter": { 21675 // "description": "Restricts stores returned to those matching a filter. The following syntax is available: * A string field value can be written as text inside quotation marks, for example `\"query text\"`. The only valid relational operation for text fields is equality (`=`), where text is searched within the field, rather than having the field be equal to the text. For example, `\"Comment = great\"` returns messages with `great` in the comment field. * A number field value can be written as an integer, a decimal, or an exponential. The valid relational operators for number fields are the equality operator (`=`), along with the less than/greater than operators (`\u003c`, `\u003c=`, `\u003e`, `\u003e=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * A date field value must be written in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format. Leading zeros are required for one-digit months and days. The valid relational operators for date fields are the equality operator (`=`) , along with the less than/greater than operators (`\u003c`, `\u003c=`, `\u003e`, `\u003e=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * Multiple field query expressions can be combined in one query by adding `AND` or `OR` operators between the expressions. If a boolean operator appears within a quoted string, it is not treated as special, it's just another part of the character string to be matched. You can prepend the `NOT` operator to an expression to negate it. Only filtering on labels is supported. For example, `labels.key=value`.", 21676 // "location": "query", 21677 // "type": "string" 21678 // }, 21679 // "pageSize": { 21680 // "description": "Limit on the number of HL7v2 stores to return in a single response. If not specified, 100 is used. May not be larger than 1000.", 21681 // "format": "int32", 21682 // "location": "query", 21683 // "type": "integer" 21684 // }, 21685 // "pageToken": { 21686 // "description": "The next_page_token value returned from the previous List request, if any.", 21687 // "location": "query", 21688 // "type": "string" 21689 // }, 21690 // "parent": { 21691 // "description": "Name of the dataset.", 21692 // "location": "path", 21693 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", 21694 // "required": true, 21695 // "type": "string" 21696 // } 21697 // }, 21698 // "path": "v1/{+parent}/hl7V2Stores", 21699 // "response": { 21700 // "$ref": "ListHl7V2StoresResponse" 21701 // }, 21702 // "scopes": [ 21703 // "https://www.googleapis.com/auth/cloud-platform" 21704 // ] 21705 // } 21706 21707} 21708 21709// Pages invokes f for each page of results. 21710// A non-nil error returned from f will halt the iteration. 21711// The provided context supersedes any context provided to the Context method. 21712func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Pages(ctx context.Context, f func(*ListHl7V2StoresResponse) error) error { 21713 c.ctx_ = ctx 21714 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 21715 for { 21716 x, err := c.Do() 21717 if err != nil { 21718 return err 21719 } 21720 if err := f(x); err != nil { 21721 return err 21722 } 21723 if x.NextPageToken == "" { 21724 return nil 21725 } 21726 c.PageToken(x.NextPageToken) 21727 } 21728} 21729 21730// method id "healthcare.projects.locations.datasets.hl7V2Stores.patch": 21731 21732type ProjectsLocationsDatasetsHl7V2StoresPatchCall struct { 21733 s *Service 21734 name string 21735 hl7v2store *Hl7V2Store 21736 urlParams_ gensupport.URLParams 21737 ctx_ context.Context 21738 header_ http.Header 21739} 21740 21741// Patch: Updates the HL7v2 store. 21742// 21743// - name: Resource name of the HL7v2 store, of the form 21744// `projects/{project_id}/datasets/{dataset_id}/hl7V2Stores/{hl7v2_stor 21745// e_id}`. 21746func (r *ProjectsLocationsDatasetsHl7V2StoresService) Patch(name string, hl7v2store *Hl7V2Store) *ProjectsLocationsDatasetsHl7V2StoresPatchCall { 21747 c := &ProjectsLocationsDatasetsHl7V2StoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21748 c.name = name 21749 c.hl7v2store = hl7v2store 21750 return c 21751} 21752 21753// UpdateMask sets the optional parameter "updateMask": The update mask 21754// applies to the resource. For the `FieldMask` definition, see 21755// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask 21756func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsHl7V2StoresPatchCall { 21757 c.urlParams_.Set("updateMask", updateMask) 21758 return c 21759} 21760 21761// Fields allows partial responses to be retrieved. See 21762// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21763// for more information. 21764func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresPatchCall { 21765 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21766 return c 21767} 21768 21769// Context sets the context to be used in this call's Do method. Any 21770// pending HTTP request will be aborted if the provided context is 21771// canceled. 21772func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresPatchCall { 21773 c.ctx_ = ctx 21774 return c 21775} 21776 21777// Header returns an http.Header that can be modified by the caller to 21778// add HTTP headers to the request. 21779func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) Header() http.Header { 21780 if c.header_ == nil { 21781 c.header_ = make(http.Header) 21782 } 21783 return c.header_ 21784} 21785 21786func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) doRequest(alt string) (*http.Response, error) { 21787 reqHeaders := make(http.Header) 21788 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 21789 for k, v := range c.header_ { 21790 reqHeaders[k] = v 21791 } 21792 reqHeaders.Set("User-Agent", c.s.userAgent()) 21793 var body io.Reader = nil 21794 body, err := googleapi.WithoutDataWrapper.JSONReader(c.hl7v2store) 21795 if err != nil { 21796 return nil, err 21797 } 21798 reqHeaders.Set("Content-Type", "application/json") 21799 c.urlParams_.Set("alt", alt) 21800 c.urlParams_.Set("prettyPrint", "false") 21801 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 21802 urls += "?" + c.urlParams_.Encode() 21803 req, err := http.NewRequest("PATCH", urls, body) 21804 if err != nil { 21805 return nil, err 21806 } 21807 req.Header = reqHeaders 21808 googleapi.Expand(req.URL, map[string]string{ 21809 "name": c.name, 21810 }) 21811 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21812} 21813 21814// Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.patch" call. 21815// Exactly one of *Hl7V2Store or error will be non-nil. Any non-2xx 21816// status code is an error. Response headers are in either 21817// *Hl7V2Store.ServerResponse.Header or (if a response was returned at 21818// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 21819// to check whether the returned error was because 21820// http.StatusNotModified was returned. 21821func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) Do(opts ...googleapi.CallOption) (*Hl7V2Store, error) { 21822 gensupport.SetOptions(c.urlParams_, opts...) 21823 res, err := c.doRequest("json") 21824 if res != nil && res.StatusCode == http.StatusNotModified { 21825 if res.Body != nil { 21826 res.Body.Close() 21827 } 21828 return nil, &googleapi.Error{ 21829 Code: res.StatusCode, 21830 Header: res.Header, 21831 } 21832 } 21833 if err != nil { 21834 return nil, err 21835 } 21836 defer googleapi.CloseBody(res) 21837 if err := googleapi.CheckResponse(res); err != nil { 21838 return nil, err 21839 } 21840 ret := &Hl7V2Store{ 21841 ServerResponse: googleapi.ServerResponse{ 21842 Header: res.Header, 21843 HTTPStatusCode: res.StatusCode, 21844 }, 21845 } 21846 target := &ret 21847 if err := gensupport.DecodeResponse(target, res); err != nil { 21848 return nil, err 21849 } 21850 return ret, nil 21851 // { 21852 // "description": "Updates the HL7v2 store.", 21853 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}", 21854 // "httpMethod": "PATCH", 21855 // "id": "healthcare.projects.locations.datasets.hl7V2Stores.patch", 21856 // "parameterOrder": [ 21857 // "name" 21858 // ], 21859 // "parameters": { 21860 // "name": { 21861 // "description": "Resource name of the HL7v2 store, of the form `projects/{project_id}/datasets/{dataset_id}/hl7V2Stores/{hl7v2_store_id}`.", 21862 // "location": "path", 21863 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", 21864 // "required": true, 21865 // "type": "string" 21866 // }, 21867 // "updateMask": { 21868 // "description": "The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", 21869 // "format": "google-fieldmask", 21870 // "location": "query", 21871 // "type": "string" 21872 // } 21873 // }, 21874 // "path": "v1/{+name}", 21875 // "request": { 21876 // "$ref": "Hl7V2Store" 21877 // }, 21878 // "response": { 21879 // "$ref": "Hl7V2Store" 21880 // }, 21881 // "scopes": [ 21882 // "https://www.googleapis.com/auth/cloud-platform" 21883 // ] 21884 // } 21885 21886} 21887 21888// method id "healthcare.projects.locations.datasets.hl7V2Stores.setIamPolicy": 21889 21890type ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall struct { 21891 s *Service 21892 resource string 21893 setiampolicyrequest *SetIamPolicyRequest 21894 urlParams_ gensupport.URLParams 21895 ctx_ context.Context 21896 header_ http.Header 21897} 21898 21899// SetIamPolicy: Sets the access control policy on the specified 21900// resource. Replaces any existing policy. Can return `NOT_FOUND`, 21901// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. 21902// 21903// - resource: REQUIRED: The resource for which the policy is being 21904// specified. See the operation documentation for the appropriate 21905// value for this field. 21906func (r *ProjectsLocationsDatasetsHl7V2StoresService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall { 21907 c := &ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21908 c.resource = resource 21909 c.setiampolicyrequest = setiampolicyrequest 21910 return c 21911} 21912 21913// Fields allows partial responses to be retrieved. See 21914// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21915// for more information. 21916func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall { 21917 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21918 return c 21919} 21920 21921// Context sets the context to be used in this call's Do method. Any 21922// pending HTTP request will be aborted if the provided context is 21923// canceled. 21924func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall { 21925 c.ctx_ = ctx 21926 return c 21927} 21928 21929// Header returns an http.Header that can be modified by the caller to 21930// add HTTP headers to the request. 21931func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) Header() http.Header { 21932 if c.header_ == nil { 21933 c.header_ = make(http.Header) 21934 } 21935 return c.header_ 21936} 21937 21938func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 21939 reqHeaders := make(http.Header) 21940 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 21941 for k, v := range c.header_ { 21942 reqHeaders[k] = v 21943 } 21944 reqHeaders.Set("User-Agent", c.s.userAgent()) 21945 var body io.Reader = nil 21946 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 21947 if err != nil { 21948 return nil, err 21949 } 21950 reqHeaders.Set("Content-Type", "application/json") 21951 c.urlParams_.Set("alt", alt) 21952 c.urlParams_.Set("prettyPrint", "false") 21953 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") 21954 urls += "?" + c.urlParams_.Encode() 21955 req, err := http.NewRequest("POST", urls, body) 21956 if err != nil { 21957 return nil, err 21958 } 21959 req.Header = reqHeaders 21960 googleapi.Expand(req.URL, map[string]string{ 21961 "resource": c.resource, 21962 }) 21963 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21964} 21965 21966// Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.setIamPolicy" call. 21967// Exactly one of *Policy or error will be non-nil. Any non-2xx status 21968// code is an error. Response headers are in either 21969// *Policy.ServerResponse.Header or (if a response was returned at all) 21970// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 21971// check whether the returned error was because http.StatusNotModified 21972// was returned. 21973func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 21974 gensupport.SetOptions(c.urlParams_, opts...) 21975 res, err := c.doRequest("json") 21976 if res != nil && res.StatusCode == http.StatusNotModified { 21977 if res.Body != nil { 21978 res.Body.Close() 21979 } 21980 return nil, &googleapi.Error{ 21981 Code: res.StatusCode, 21982 Header: res.Header, 21983 } 21984 } 21985 if err != nil { 21986 return nil, err 21987 } 21988 defer googleapi.CloseBody(res) 21989 if err := googleapi.CheckResponse(res); err != nil { 21990 return nil, err 21991 } 21992 ret := &Policy{ 21993 ServerResponse: googleapi.ServerResponse{ 21994 Header: res.Header, 21995 HTTPStatusCode: res.StatusCode, 21996 }, 21997 } 21998 target := &ret 21999 if err := gensupport.DecodeResponse(target, res); err != nil { 22000 return nil, err 22001 } 22002 return ret, nil 22003 // { 22004 // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", 22005 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}:setIamPolicy", 22006 // "httpMethod": "POST", 22007 // "id": "healthcare.projects.locations.datasets.hl7V2Stores.setIamPolicy", 22008 // "parameterOrder": [ 22009 // "resource" 22010 // ], 22011 // "parameters": { 22012 // "resource": { 22013 // "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", 22014 // "location": "path", 22015 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", 22016 // "required": true, 22017 // "type": "string" 22018 // } 22019 // }, 22020 // "path": "v1/{+resource}:setIamPolicy", 22021 // "request": { 22022 // "$ref": "SetIamPolicyRequest" 22023 // }, 22024 // "response": { 22025 // "$ref": "Policy" 22026 // }, 22027 // "scopes": [ 22028 // "https://www.googleapis.com/auth/cloud-platform" 22029 // ] 22030 // } 22031 22032} 22033 22034// method id "healthcare.projects.locations.datasets.hl7V2Stores.testIamPermissions": 22035 22036type ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall struct { 22037 s *Service 22038 resource string 22039 testiampermissionsrequest *TestIamPermissionsRequest 22040 urlParams_ gensupport.URLParams 22041 ctx_ context.Context 22042 header_ http.Header 22043} 22044 22045// TestIamPermissions: Returns permissions that a caller has on the 22046// specified resource. If the resource does not exist, this will return 22047// an empty set of permissions, not a `NOT_FOUND` error. Note: This 22048// operation is designed to be used for building permission-aware UIs 22049// and command-line tools, not for authorization checking. This 22050// operation may "fail open" without warning. 22051// 22052// - resource: REQUIRED: The resource for which the policy detail is 22053// being requested. See the operation documentation for the 22054// appropriate value for this field. 22055func (r *ProjectsLocationsDatasetsHl7V2StoresService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall { 22056 c := &ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22057 c.resource = resource 22058 c.testiampermissionsrequest = testiampermissionsrequest 22059 return c 22060} 22061 22062// Fields allows partial responses to be retrieved. See 22063// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22064// for more information. 22065func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall { 22066 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22067 return c 22068} 22069 22070// Context sets the context to be used in this call's Do method. Any 22071// pending HTTP request will be aborted if the provided context is 22072// canceled. 22073func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall { 22074 c.ctx_ = ctx 22075 return c 22076} 22077 22078// Header returns an http.Header that can be modified by the caller to 22079// add HTTP headers to the request. 22080func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) Header() http.Header { 22081 if c.header_ == nil { 22082 c.header_ = make(http.Header) 22083 } 22084 return c.header_ 22085} 22086 22087func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 22088 reqHeaders := make(http.Header) 22089 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 22090 for k, v := range c.header_ { 22091 reqHeaders[k] = v 22092 } 22093 reqHeaders.Set("User-Agent", c.s.userAgent()) 22094 var body io.Reader = nil 22095 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 22096 if err != nil { 22097 return nil, err 22098 } 22099 reqHeaders.Set("Content-Type", "application/json") 22100 c.urlParams_.Set("alt", alt) 22101 c.urlParams_.Set("prettyPrint", "false") 22102 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") 22103 urls += "?" + c.urlParams_.Encode() 22104 req, err := http.NewRequest("POST", urls, body) 22105 if err != nil { 22106 return nil, err 22107 } 22108 req.Header = reqHeaders 22109 googleapi.Expand(req.URL, map[string]string{ 22110 "resource": c.resource, 22111 }) 22112 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22113} 22114 22115// Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.testIamPermissions" call. 22116// Exactly one of *TestIamPermissionsResponse or error will be non-nil. 22117// Any non-2xx status code is an error. Response headers are in either 22118// *TestIamPermissionsResponse.ServerResponse.Header or (if a response 22119// was returned at all) in error.(*googleapi.Error).Header. Use 22120// googleapi.IsNotModified to check whether the returned error was 22121// because http.StatusNotModified was returned. 22122func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 22123 gensupport.SetOptions(c.urlParams_, opts...) 22124 res, err := c.doRequest("json") 22125 if res != nil && res.StatusCode == http.StatusNotModified { 22126 if res.Body != nil { 22127 res.Body.Close() 22128 } 22129 return nil, &googleapi.Error{ 22130 Code: res.StatusCode, 22131 Header: res.Header, 22132 } 22133 } 22134 if err != nil { 22135 return nil, err 22136 } 22137 defer googleapi.CloseBody(res) 22138 if err := googleapi.CheckResponse(res); err != nil { 22139 return nil, err 22140 } 22141 ret := &TestIamPermissionsResponse{ 22142 ServerResponse: googleapi.ServerResponse{ 22143 Header: res.Header, 22144 HTTPStatusCode: res.StatusCode, 22145 }, 22146 } 22147 target := &ret 22148 if err := gensupport.DecodeResponse(target, res); err != nil { 22149 return nil, err 22150 } 22151 return ret, nil 22152 // { 22153 // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", 22154 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}:testIamPermissions", 22155 // "httpMethod": "POST", 22156 // "id": "healthcare.projects.locations.datasets.hl7V2Stores.testIamPermissions", 22157 // "parameterOrder": [ 22158 // "resource" 22159 // ], 22160 // "parameters": { 22161 // "resource": { 22162 // "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", 22163 // "location": "path", 22164 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", 22165 // "required": true, 22166 // "type": "string" 22167 // } 22168 // }, 22169 // "path": "v1/{+resource}:testIamPermissions", 22170 // "request": { 22171 // "$ref": "TestIamPermissionsRequest" 22172 // }, 22173 // "response": { 22174 // "$ref": "TestIamPermissionsResponse" 22175 // }, 22176 // "scopes": [ 22177 // "https://www.googleapis.com/auth/cloud-platform" 22178 // ] 22179 // } 22180 22181} 22182 22183// method id "healthcare.projects.locations.datasets.hl7V2Stores.messages.create": 22184 22185type ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall struct { 22186 s *Service 22187 parent string 22188 createmessagerequest *CreateMessageRequest 22189 urlParams_ gensupport.URLParams 22190 ctx_ context.Context 22191 header_ http.Header 22192} 22193 22194// Create: Parses and stores an HL7v2 message. This method triggers an 22195// asynchronous notification to any Pub/Sub topic configured in 22196// Hl7V2Store.Hl7V2NotificationConfig, if the filtering matches the 22197// message. If an MLLP adapter is configured to listen to a Pub/Sub 22198// topic, the adapter transmits the message when a notification is 22199// received. 22200// 22201// - parent: The name of the dataset this message belongs to. 22202func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) Create(parent string, createmessagerequest *CreateMessageRequest) *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall { 22203 c := &ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22204 c.parent = parent 22205 c.createmessagerequest = createmessagerequest 22206 return c 22207} 22208 22209// Fields allows partial responses to be retrieved. See 22210// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22211// for more information. 22212func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall { 22213 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22214 return c 22215} 22216 22217// Context sets the context to be used in this call's Do method. Any 22218// pending HTTP request will be aborted if the provided context is 22219// canceled. 22220func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall { 22221 c.ctx_ = ctx 22222 return c 22223} 22224 22225// Header returns an http.Header that can be modified by the caller to 22226// add HTTP headers to the request. 22227func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall) Header() http.Header { 22228 if c.header_ == nil { 22229 c.header_ = make(http.Header) 22230 } 22231 return c.header_ 22232} 22233 22234func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall) doRequest(alt string) (*http.Response, error) { 22235 reqHeaders := make(http.Header) 22236 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 22237 for k, v := range c.header_ { 22238 reqHeaders[k] = v 22239 } 22240 reqHeaders.Set("User-Agent", c.s.userAgent()) 22241 var body io.Reader = nil 22242 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createmessagerequest) 22243 if err != nil { 22244 return nil, err 22245 } 22246 reqHeaders.Set("Content-Type", "application/json") 22247 c.urlParams_.Set("alt", alt) 22248 c.urlParams_.Set("prettyPrint", "false") 22249 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/messages") 22250 urls += "?" + c.urlParams_.Encode() 22251 req, err := http.NewRequest("POST", urls, body) 22252 if err != nil { 22253 return nil, err 22254 } 22255 req.Header = reqHeaders 22256 googleapi.Expand(req.URL, map[string]string{ 22257 "parent": c.parent, 22258 }) 22259 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22260} 22261 22262// Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.create" call. 22263// Exactly one of *Message or error will be non-nil. Any non-2xx status 22264// code is an error. Response headers are in either 22265// *Message.ServerResponse.Header or (if a response was returned at all) 22266// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 22267// check whether the returned error was because http.StatusNotModified 22268// was returned. 22269func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall) Do(opts ...googleapi.CallOption) (*Message, error) { 22270 gensupport.SetOptions(c.urlParams_, opts...) 22271 res, err := c.doRequest("json") 22272 if res != nil && res.StatusCode == http.StatusNotModified { 22273 if res.Body != nil { 22274 res.Body.Close() 22275 } 22276 return nil, &googleapi.Error{ 22277 Code: res.StatusCode, 22278 Header: res.Header, 22279 } 22280 } 22281 if err != nil { 22282 return nil, err 22283 } 22284 defer googleapi.CloseBody(res) 22285 if err := googleapi.CheckResponse(res); err != nil { 22286 return nil, err 22287 } 22288 ret := &Message{ 22289 ServerResponse: googleapi.ServerResponse{ 22290 Header: res.Header, 22291 HTTPStatusCode: res.StatusCode, 22292 }, 22293 } 22294 target := &ret 22295 if err := gensupport.DecodeResponse(target, res); err != nil { 22296 return nil, err 22297 } 22298 return ret, nil 22299 // { 22300 // "description": "Parses and stores an HL7v2 message. This method triggers an asynchronous notification to any Pub/Sub topic configured in Hl7V2Store.Hl7V2NotificationConfig, if the filtering matches the message. If an MLLP adapter is configured to listen to a Pub/Sub topic, the adapter transmits the message when a notification is received.", 22301 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}/messages", 22302 // "httpMethod": "POST", 22303 // "id": "healthcare.projects.locations.datasets.hl7V2Stores.messages.create", 22304 // "parameterOrder": [ 22305 // "parent" 22306 // ], 22307 // "parameters": { 22308 // "parent": { 22309 // "description": "The name of the dataset this message belongs to.", 22310 // "location": "path", 22311 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", 22312 // "required": true, 22313 // "type": "string" 22314 // } 22315 // }, 22316 // "path": "v1/{+parent}/messages", 22317 // "request": { 22318 // "$ref": "CreateMessageRequest" 22319 // }, 22320 // "response": { 22321 // "$ref": "Message" 22322 // }, 22323 // "scopes": [ 22324 // "https://www.googleapis.com/auth/cloud-platform" 22325 // ] 22326 // } 22327 22328} 22329 22330// method id "healthcare.projects.locations.datasets.hl7V2Stores.messages.delete": 22331 22332type ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall struct { 22333 s *Service 22334 name string 22335 urlParams_ gensupport.URLParams 22336 ctx_ context.Context 22337 header_ http.Header 22338} 22339 22340// Delete: Deletes an HL7v2 message. 22341// 22342// - name: The resource name of the HL7v2 message to delete. 22343func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) Delete(name string) *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall { 22344 c := &ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22345 c.name = name 22346 return c 22347} 22348 22349// Fields allows partial responses to be retrieved. See 22350// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22351// for more information. 22352func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall { 22353 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22354 return c 22355} 22356 22357// Context sets the context to be used in this call's Do method. Any 22358// pending HTTP request will be aborted if the provided context is 22359// canceled. 22360func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall { 22361 c.ctx_ = ctx 22362 return c 22363} 22364 22365// Header returns an http.Header that can be modified by the caller to 22366// add HTTP headers to the request. 22367func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall) Header() http.Header { 22368 if c.header_ == nil { 22369 c.header_ = make(http.Header) 22370 } 22371 return c.header_ 22372} 22373 22374func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall) doRequest(alt string) (*http.Response, error) { 22375 reqHeaders := make(http.Header) 22376 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 22377 for k, v := range c.header_ { 22378 reqHeaders[k] = v 22379 } 22380 reqHeaders.Set("User-Agent", c.s.userAgent()) 22381 var body io.Reader = nil 22382 c.urlParams_.Set("alt", alt) 22383 c.urlParams_.Set("prettyPrint", "false") 22384 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 22385 urls += "?" + c.urlParams_.Encode() 22386 req, err := http.NewRequest("DELETE", urls, body) 22387 if err != nil { 22388 return nil, err 22389 } 22390 req.Header = reqHeaders 22391 googleapi.Expand(req.URL, map[string]string{ 22392 "name": c.name, 22393 }) 22394 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22395} 22396 22397// Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.delete" call. 22398// Exactly one of *Empty or error will be non-nil. Any non-2xx status 22399// code is an error. Response headers are in either 22400// *Empty.ServerResponse.Header or (if a response was returned at all) 22401// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 22402// check whether the returned error was because http.StatusNotModified 22403// was returned. 22404func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 22405 gensupport.SetOptions(c.urlParams_, opts...) 22406 res, err := c.doRequest("json") 22407 if res != nil && res.StatusCode == http.StatusNotModified { 22408 if res.Body != nil { 22409 res.Body.Close() 22410 } 22411 return nil, &googleapi.Error{ 22412 Code: res.StatusCode, 22413 Header: res.Header, 22414 } 22415 } 22416 if err != nil { 22417 return nil, err 22418 } 22419 defer googleapi.CloseBody(res) 22420 if err := googleapi.CheckResponse(res); err != nil { 22421 return nil, err 22422 } 22423 ret := &Empty{ 22424 ServerResponse: googleapi.ServerResponse{ 22425 Header: res.Header, 22426 HTTPStatusCode: res.StatusCode, 22427 }, 22428 } 22429 target := &ret 22430 if err := gensupport.DecodeResponse(target, res); err != nil { 22431 return nil, err 22432 } 22433 return ret, nil 22434 // { 22435 // "description": "Deletes an HL7v2 message.", 22436 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}/messages/{messagesId}", 22437 // "httpMethod": "DELETE", 22438 // "id": "healthcare.projects.locations.datasets.hl7V2Stores.messages.delete", 22439 // "parameterOrder": [ 22440 // "name" 22441 // ], 22442 // "parameters": { 22443 // "name": { 22444 // "description": "The resource name of the HL7v2 message to delete.", 22445 // "location": "path", 22446 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+/messages/[^/]+$", 22447 // "required": true, 22448 // "type": "string" 22449 // } 22450 // }, 22451 // "path": "v1/{+name}", 22452 // "response": { 22453 // "$ref": "Empty" 22454 // }, 22455 // "scopes": [ 22456 // "https://www.googleapis.com/auth/cloud-platform" 22457 // ] 22458 // } 22459 22460} 22461 22462// method id "healthcare.projects.locations.datasets.hl7V2Stores.messages.get": 22463 22464type ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall struct { 22465 s *Service 22466 name string 22467 urlParams_ gensupport.URLParams 22468 ifNoneMatch_ string 22469 ctx_ context.Context 22470 header_ http.Header 22471} 22472 22473// Get: Gets an HL7v2 message. 22474// 22475// - name: The resource name of the HL7v2 message to retrieve. 22476func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) Get(name string) *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall { 22477 c := &ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22478 c.name = name 22479 return c 22480} 22481 22482// View sets the optional parameter "view": Specifies which parts of the 22483// Message resource to return in the response. When unspecified, 22484// equivalent to FULL. 22485// 22486// Possible values: 22487// "MESSAGE_VIEW_UNSPECIFIED" - Not specified, equivalent to FULL. 22488// "RAW_ONLY" - Server responses include all the message fields except 22489// parsed_data field, and schematized_data fields. 22490// "PARSED_ONLY" - Server responses include all the message fields 22491// except data field, and schematized_data fields. 22492// "FULL" - Server responses include all the message fields. 22493// "SCHEMATIZED_ONLY" - Server responses include all the message 22494// fields except data and parsed_data fields. 22495// "BASIC" - Server responses include only the name field. 22496func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) View(view string) *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall { 22497 c.urlParams_.Set("view", view) 22498 return c 22499} 22500 22501// Fields allows partial responses to be retrieved. See 22502// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22503// for more information. 22504func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall { 22505 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22506 return c 22507} 22508 22509// IfNoneMatch sets the optional parameter which makes the operation 22510// fail if the object's ETag matches the given value. This is useful for 22511// getting updates only after the object has changed since the last 22512// request. Use googleapi.IsNotModified to check whether the response 22513// error from Do is the result of In-None-Match. 22514func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall { 22515 c.ifNoneMatch_ = entityTag 22516 return c 22517} 22518 22519// Context sets the context to be used in this call's Do method. Any 22520// pending HTTP request will be aborted if the provided context is 22521// canceled. 22522func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall { 22523 c.ctx_ = ctx 22524 return c 22525} 22526 22527// Header returns an http.Header that can be modified by the caller to 22528// add HTTP headers to the request. 22529func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) Header() http.Header { 22530 if c.header_ == nil { 22531 c.header_ = make(http.Header) 22532 } 22533 return c.header_ 22534} 22535 22536func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) doRequest(alt string) (*http.Response, error) { 22537 reqHeaders := make(http.Header) 22538 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 22539 for k, v := range c.header_ { 22540 reqHeaders[k] = v 22541 } 22542 reqHeaders.Set("User-Agent", c.s.userAgent()) 22543 if c.ifNoneMatch_ != "" { 22544 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 22545 } 22546 var body io.Reader = nil 22547 c.urlParams_.Set("alt", alt) 22548 c.urlParams_.Set("prettyPrint", "false") 22549 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 22550 urls += "?" + c.urlParams_.Encode() 22551 req, err := http.NewRequest("GET", urls, body) 22552 if err != nil { 22553 return nil, err 22554 } 22555 req.Header = reqHeaders 22556 googleapi.Expand(req.URL, map[string]string{ 22557 "name": c.name, 22558 }) 22559 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22560} 22561 22562// Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.get" call. 22563// Exactly one of *Message or error will be non-nil. Any non-2xx status 22564// code is an error. Response headers are in either 22565// *Message.ServerResponse.Header or (if a response was returned at all) 22566// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 22567// check whether the returned error was because http.StatusNotModified 22568// was returned. 22569func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) Do(opts ...googleapi.CallOption) (*Message, error) { 22570 gensupport.SetOptions(c.urlParams_, opts...) 22571 res, err := c.doRequest("json") 22572 if res != nil && res.StatusCode == http.StatusNotModified { 22573 if res.Body != nil { 22574 res.Body.Close() 22575 } 22576 return nil, &googleapi.Error{ 22577 Code: res.StatusCode, 22578 Header: res.Header, 22579 } 22580 } 22581 if err != nil { 22582 return nil, err 22583 } 22584 defer googleapi.CloseBody(res) 22585 if err := googleapi.CheckResponse(res); err != nil { 22586 return nil, err 22587 } 22588 ret := &Message{ 22589 ServerResponse: googleapi.ServerResponse{ 22590 Header: res.Header, 22591 HTTPStatusCode: res.StatusCode, 22592 }, 22593 } 22594 target := &ret 22595 if err := gensupport.DecodeResponse(target, res); err != nil { 22596 return nil, err 22597 } 22598 return ret, nil 22599 // { 22600 // "description": "Gets an HL7v2 message.", 22601 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}/messages/{messagesId}", 22602 // "httpMethod": "GET", 22603 // "id": "healthcare.projects.locations.datasets.hl7V2Stores.messages.get", 22604 // "parameterOrder": [ 22605 // "name" 22606 // ], 22607 // "parameters": { 22608 // "name": { 22609 // "description": "The resource name of the HL7v2 message to retrieve.", 22610 // "location": "path", 22611 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+/messages/[^/]+$", 22612 // "required": true, 22613 // "type": "string" 22614 // }, 22615 // "view": { 22616 // "description": "Specifies which parts of the Message resource to return in the response. When unspecified, equivalent to FULL.", 22617 // "enum": [ 22618 // "MESSAGE_VIEW_UNSPECIFIED", 22619 // "RAW_ONLY", 22620 // "PARSED_ONLY", 22621 // "FULL", 22622 // "SCHEMATIZED_ONLY", 22623 // "BASIC" 22624 // ], 22625 // "enumDescriptions": [ 22626 // "Not specified, equivalent to FULL.", 22627 // "Server responses include all the message fields except parsed_data field, and schematized_data fields.", 22628 // "Server responses include all the message fields except data field, and schematized_data fields.", 22629 // "Server responses include all the message fields.", 22630 // "Server responses include all the message fields except data and parsed_data fields.", 22631 // "Server responses include only the name field." 22632 // ], 22633 // "location": "query", 22634 // "type": "string" 22635 // } 22636 // }, 22637 // "path": "v1/{+name}", 22638 // "response": { 22639 // "$ref": "Message" 22640 // }, 22641 // "scopes": [ 22642 // "https://www.googleapis.com/auth/cloud-platform" 22643 // ] 22644 // } 22645 22646} 22647 22648// method id "healthcare.projects.locations.datasets.hl7V2Stores.messages.ingest": 22649 22650type ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall struct { 22651 s *Service 22652 parent string 22653 ingestmessagerequest *IngestMessageRequest 22654 urlParams_ gensupport.URLParams 22655 ctx_ context.Context 22656 header_ http.Header 22657} 22658 22659// Ingest: Parses and stores an HL7v2 message. This method triggers an 22660// asynchronous notification to any Pub/Sub topic configured in 22661// Hl7V2Store.Hl7V2NotificationConfig, if the filtering matches the 22662// message. If an MLLP adapter is configured to listen to a Pub/Sub 22663// topic, the adapter transmits the message when a notification is 22664// received. If the method is successful, it generates a response 22665// containing an HL7v2 acknowledgment (`ACK`) message. If the method 22666// encounters an error, it returns a negative acknowledgment (`NACK`) 22667// message. This behavior is suitable for replying to HL7v2 interface 22668// systems that expect these acknowledgments. 22669// 22670// - parent: The name of the HL7v2 store this message belongs to. 22671func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) Ingest(parent string, ingestmessagerequest *IngestMessageRequest) *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall { 22672 c := &ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22673 c.parent = parent 22674 c.ingestmessagerequest = ingestmessagerequest 22675 return c 22676} 22677 22678// Fields allows partial responses to be retrieved. See 22679// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22680// for more information. 22681func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall { 22682 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22683 return c 22684} 22685 22686// Context sets the context to be used in this call's Do method. Any 22687// pending HTTP request will be aborted if the provided context is 22688// canceled. 22689func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall { 22690 c.ctx_ = ctx 22691 return c 22692} 22693 22694// Header returns an http.Header that can be modified by the caller to 22695// add HTTP headers to the request. 22696func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall) Header() http.Header { 22697 if c.header_ == nil { 22698 c.header_ = make(http.Header) 22699 } 22700 return c.header_ 22701} 22702 22703func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall) doRequest(alt string) (*http.Response, error) { 22704 reqHeaders := make(http.Header) 22705 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 22706 for k, v := range c.header_ { 22707 reqHeaders[k] = v 22708 } 22709 reqHeaders.Set("User-Agent", c.s.userAgent()) 22710 var body io.Reader = nil 22711 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ingestmessagerequest) 22712 if err != nil { 22713 return nil, err 22714 } 22715 reqHeaders.Set("Content-Type", "application/json") 22716 c.urlParams_.Set("alt", alt) 22717 c.urlParams_.Set("prettyPrint", "false") 22718 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/messages:ingest") 22719 urls += "?" + c.urlParams_.Encode() 22720 req, err := http.NewRequest("POST", urls, body) 22721 if err != nil { 22722 return nil, err 22723 } 22724 req.Header = reqHeaders 22725 googleapi.Expand(req.URL, map[string]string{ 22726 "parent": c.parent, 22727 }) 22728 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22729} 22730 22731// Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.ingest" call. 22732// Exactly one of *IngestMessageResponse or error will be non-nil. Any 22733// non-2xx status code is an error. Response headers are in either 22734// *IngestMessageResponse.ServerResponse.Header or (if a response was 22735// returned at all) in error.(*googleapi.Error).Header. Use 22736// googleapi.IsNotModified to check whether the returned error was 22737// because http.StatusNotModified was returned. 22738func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall) Do(opts ...googleapi.CallOption) (*IngestMessageResponse, error) { 22739 gensupport.SetOptions(c.urlParams_, opts...) 22740 res, err := c.doRequest("json") 22741 if res != nil && res.StatusCode == http.StatusNotModified { 22742 if res.Body != nil { 22743 res.Body.Close() 22744 } 22745 return nil, &googleapi.Error{ 22746 Code: res.StatusCode, 22747 Header: res.Header, 22748 } 22749 } 22750 if err != nil { 22751 return nil, err 22752 } 22753 defer googleapi.CloseBody(res) 22754 if err := googleapi.CheckResponse(res); err != nil { 22755 return nil, err 22756 } 22757 ret := &IngestMessageResponse{ 22758 ServerResponse: googleapi.ServerResponse{ 22759 Header: res.Header, 22760 HTTPStatusCode: res.StatusCode, 22761 }, 22762 } 22763 target := &ret 22764 if err := gensupport.DecodeResponse(target, res); err != nil { 22765 return nil, err 22766 } 22767 return ret, nil 22768 // { 22769 // "description": "Parses and stores an HL7v2 message. This method triggers an asynchronous notification to any Pub/Sub topic configured in Hl7V2Store.Hl7V2NotificationConfig, if the filtering matches the message. If an MLLP adapter is configured to listen to a Pub/Sub topic, the adapter transmits the message when a notification is received. If the method is successful, it generates a response containing an HL7v2 acknowledgment (`ACK`) message. If the method encounters an error, it returns a negative acknowledgment (`NACK`) message. This behavior is suitable for replying to HL7v2 interface systems that expect these acknowledgments.", 22770 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}/messages:ingest", 22771 // "httpMethod": "POST", 22772 // "id": "healthcare.projects.locations.datasets.hl7V2Stores.messages.ingest", 22773 // "parameterOrder": [ 22774 // "parent" 22775 // ], 22776 // "parameters": { 22777 // "parent": { 22778 // "description": "The name of the HL7v2 store this message belongs to.", 22779 // "location": "path", 22780 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", 22781 // "required": true, 22782 // "type": "string" 22783 // } 22784 // }, 22785 // "path": "v1/{+parent}/messages:ingest", 22786 // "request": { 22787 // "$ref": "IngestMessageRequest" 22788 // }, 22789 // "response": { 22790 // "$ref": "IngestMessageResponse" 22791 // }, 22792 // "scopes": [ 22793 // "https://www.googleapis.com/auth/cloud-platform" 22794 // ] 22795 // } 22796 22797} 22798 22799// method id "healthcare.projects.locations.datasets.hl7V2Stores.messages.list": 22800 22801type ProjectsLocationsDatasetsHl7V2StoresMessagesListCall struct { 22802 s *Service 22803 parent string 22804 urlParams_ gensupport.URLParams 22805 ifNoneMatch_ string 22806 ctx_ context.Context 22807 header_ http.Header 22808} 22809 22810// List: Lists all the messages in the given HL7v2 store with support 22811// for filtering. Note: HL7v2 messages are indexed asynchronously, so 22812// there might be a slight delay between the time a message is created 22813// and when it can be found through a filter. 22814// 22815// - parent: Name of the HL7v2 store to retrieve messages from. 22816func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) List(parent string) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall { 22817 c := &ProjectsLocationsDatasetsHl7V2StoresMessagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22818 c.parent = parent 22819 return c 22820} 22821 22822// Filter sets the optional parameter "filter": Restricts messages 22823// returned to those matching a filter. The following syntax is 22824// available: * A string field value can be written as text inside 22825// quotation marks, for example "query text". The only valid 22826// relational operation for text fields is equality (`=`), where text is 22827// searched within the field, rather than having the field be equal to 22828// the text. For example, "Comment = great" returns messages with 22829// `great` in the comment field. * A number field value can be written 22830// as an integer, a decimal, or an exponential. The valid relational 22831// operators for number fields are the equality operator (`=`), along 22832// with the less than/greater than operators (`<`, `<=`, `>`, `>=`). 22833// Note that there is no inequality (`!=`) operator. You can prepend the 22834// `NOT` operator to an expression to negate it. * A date field value 22835// must be written in `yyyy-mm-dd` form. Fields with date and time use 22836// the RFC3339 time format. Leading zeros are required for one-digit 22837// months and days. The valid relational operators for date fields are 22838// the equality operator (`=`) , along with the less than/greater than 22839// operators (`<`, `<=`, `>`, `>=`). Note that there is no inequality 22840// (`!=`) operator. You can prepend the `NOT` operator to an expression 22841// to negate it. * Multiple field query expressions can be combined in 22842// one query by adding `AND` or `OR` operators between the expressions. 22843// If a boolean operator appears within a quoted string, it is not 22844// treated as special, it's just another part of the character string to 22845// be matched. You can prepend the `NOT` operator to an expression to 22846// negate it. Fields/functions available for filtering are: * 22847// `message_type`, from the MSH-9.1 field. For example, `NOT 22848// message_type = "ADT". * `send_date` or `sendDate`, the YYYY-MM-DD 22849// date the message was sent in the dataset's time_zone, from the MSH-7 22850// segment. For example, `send_date < "2017-01-02". * `send_time`, the 22851// timestamp when the message was sent, using the RFC3339 time format 22852// for comparisons, from the MSH-7 segment. For example, `send_time < 22853// "2017-01-02T00:00:00-05:00". * `create_time`, the timestamp when the 22854// message was created in the HL7v2 store. Use the RFC3339 time format 22855// for comparisons. For example, `create_time < 22856// "2017-01-02T00:00:00-05:00". * `send_facility`, the care center that 22857// the message came from, from the MSH-4 segment. For example, 22858// `send_facility = "ABC". * `PatientId(value, type)`, which matches if 22859// the message lists a patient having an ID of the given value and type 22860// in the PID-2, PID-3, or PID-4 segments. For example, 22861// `PatientId("123456", "MRN")`. * `labels.x`, a string value of the 22862// label with key `x` as set using the Message.labels map. For example, 22863// `labels."priority"="high". The operator `:*` can be used to assert 22864// the existence of a label. For example, `labels."priority":*`. 22865func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Filter(filter string) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall { 22866 c.urlParams_.Set("filter", filter) 22867 return c 22868} 22869 22870// OrderBy sets the optional parameter "orderBy": Orders messages 22871// returned by the specified order_by clause. Syntax: 22872// https://cloud.google.com/apis/design/design_patterns#sorting_order 22873// Fields available for ordering are: * `send_time` 22874func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) OrderBy(orderBy string) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall { 22875 c.urlParams_.Set("orderBy", orderBy) 22876 return c 22877} 22878 22879// PageSize sets the optional parameter "pageSize": Limit on the number 22880// of messages to return in a single response. If not specified, 100 is 22881// used. May not be larger than 1000. 22882func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall { 22883 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 22884 return c 22885} 22886 22887// PageToken sets the optional parameter "pageToken": The 22888// next_page_token value returned from the previous List request, if 22889// any. 22890func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall { 22891 c.urlParams_.Set("pageToken", pageToken) 22892 return c 22893} 22894 22895// View sets the optional parameter "view": Specifies the parts of the 22896// Message to return in the response. When unspecified, equivalent to 22897// BASIC. Setting this to anything other than BASIC with a `page_size` 22898// larger than the default can generate a large response, which impacts 22899// the performance of this method. 22900// 22901// Possible values: 22902// "MESSAGE_VIEW_UNSPECIFIED" - Not specified, equivalent to FULL. 22903// "RAW_ONLY" - Server responses include all the message fields except 22904// parsed_data field, and schematized_data fields. 22905// "PARSED_ONLY" - Server responses include all the message fields 22906// except data field, and schematized_data fields. 22907// "FULL" - Server responses include all the message fields. 22908// "SCHEMATIZED_ONLY" - Server responses include all the message 22909// fields except data and parsed_data fields. 22910// "BASIC" - Server responses include only the name field. 22911func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) View(view string) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall { 22912 c.urlParams_.Set("view", view) 22913 return c 22914} 22915 22916// Fields allows partial responses to be retrieved. See 22917// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22918// for more information. 22919func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall { 22920 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22921 return c 22922} 22923 22924// IfNoneMatch sets the optional parameter which makes the operation 22925// fail if the object's ETag matches the given value. This is useful for 22926// getting updates only after the object has changed since the last 22927// request. Use googleapi.IsNotModified to check whether the response 22928// error from Do is the result of In-None-Match. 22929func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall { 22930 c.ifNoneMatch_ = entityTag 22931 return c 22932} 22933 22934// Context sets the context to be used in this call's Do method. Any 22935// pending HTTP request will be aborted if the provided context is 22936// canceled. 22937func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall { 22938 c.ctx_ = ctx 22939 return c 22940} 22941 22942// Header returns an http.Header that can be modified by the caller to 22943// add HTTP headers to the request. 22944func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Header() http.Header { 22945 if c.header_ == nil { 22946 c.header_ = make(http.Header) 22947 } 22948 return c.header_ 22949} 22950 22951func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) doRequest(alt string) (*http.Response, error) { 22952 reqHeaders := make(http.Header) 22953 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 22954 for k, v := range c.header_ { 22955 reqHeaders[k] = v 22956 } 22957 reqHeaders.Set("User-Agent", c.s.userAgent()) 22958 if c.ifNoneMatch_ != "" { 22959 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 22960 } 22961 var body io.Reader = nil 22962 c.urlParams_.Set("alt", alt) 22963 c.urlParams_.Set("prettyPrint", "false") 22964 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/messages") 22965 urls += "?" + c.urlParams_.Encode() 22966 req, err := http.NewRequest("GET", urls, body) 22967 if err != nil { 22968 return nil, err 22969 } 22970 req.Header = reqHeaders 22971 googleapi.Expand(req.URL, map[string]string{ 22972 "parent": c.parent, 22973 }) 22974 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22975} 22976 22977// Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.list" call. 22978// Exactly one of *ListMessagesResponse or error will be non-nil. Any 22979// non-2xx status code is an error. Response headers are in either 22980// *ListMessagesResponse.ServerResponse.Header or (if a response was 22981// returned at all) in error.(*googleapi.Error).Header. Use 22982// googleapi.IsNotModified to check whether the returned error was 22983// because http.StatusNotModified was returned. 22984func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Do(opts ...googleapi.CallOption) (*ListMessagesResponse, error) { 22985 gensupport.SetOptions(c.urlParams_, opts...) 22986 res, err := c.doRequest("json") 22987 if res != nil && res.StatusCode == http.StatusNotModified { 22988 if res.Body != nil { 22989 res.Body.Close() 22990 } 22991 return nil, &googleapi.Error{ 22992 Code: res.StatusCode, 22993 Header: res.Header, 22994 } 22995 } 22996 if err != nil { 22997 return nil, err 22998 } 22999 defer googleapi.CloseBody(res) 23000 if err := googleapi.CheckResponse(res); err != nil { 23001 return nil, err 23002 } 23003 ret := &ListMessagesResponse{ 23004 ServerResponse: googleapi.ServerResponse{ 23005 Header: res.Header, 23006 HTTPStatusCode: res.StatusCode, 23007 }, 23008 } 23009 target := &ret 23010 if err := gensupport.DecodeResponse(target, res); err != nil { 23011 return nil, err 23012 } 23013 return ret, nil 23014 // { 23015 // "description": "Lists all the messages in the given HL7v2 store with support for filtering. Note: HL7v2 messages are indexed asynchronously, so there might be a slight delay between the time a message is created and when it can be found through a filter.", 23016 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}/messages", 23017 // "httpMethod": "GET", 23018 // "id": "healthcare.projects.locations.datasets.hl7V2Stores.messages.list", 23019 // "parameterOrder": [ 23020 // "parent" 23021 // ], 23022 // "parameters": { 23023 // "filter": { 23024 // "description": "Restricts messages returned to those matching a filter. The following syntax is available: * A string field value can be written as text inside quotation marks, for example `\"query text\"`. The only valid relational operation for text fields is equality (`=`), where text is searched within the field, rather than having the field be equal to the text. For example, `\"Comment = great\"` returns messages with `great` in the comment field. * A number field value can be written as an integer, a decimal, or an exponential. The valid relational operators for number fields are the equality operator (`=`), along with the less than/greater than operators (`\u003c`, `\u003c=`, `\u003e`, `\u003e=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * A date field value must be written in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format. Leading zeros are required for one-digit months and days. The valid relational operators for date fields are the equality operator (`=`) , along with the less than/greater than operators (`\u003c`, `\u003c=`, `\u003e`, `\u003e=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * Multiple field query expressions can be combined in one query by adding `AND` or `OR` operators between the expressions. If a boolean operator appears within a quoted string, it is not treated as special, it's just another part of the character string to be matched. You can prepend the `NOT` operator to an expression to negate it. Fields/functions available for filtering are: * `message_type`, from the MSH-9.1 field. For example, `NOT message_type = \"ADT\"`. * `send_date` or `sendDate`, the YYYY-MM-DD date the message was sent in the dataset's time_zone, from the MSH-7 segment. For example, `send_date \u003c \"2017-01-02\"`. * `send_time`, the timestamp when the message was sent, using the RFC3339 time format for comparisons, from the MSH-7 segment. For example, `send_time \u003c \"2017-01-02T00:00:00-05:00\"`. * `create_time`, the timestamp when the message was created in the HL7v2 store. Use the RFC3339 time format for comparisons. For example, `create_time \u003c \"2017-01-02T00:00:00-05:00\"`. * `send_facility`, the care center that the message came from, from the MSH-4 segment. For example, `send_facility = \"ABC\"`. * `PatientId(value, type)`, which matches if the message lists a patient having an ID of the given value and type in the PID-2, PID-3, or PID-4 segments. For example, `PatientId(\"123456\", \"MRN\")`. * `labels.x`, a string value of the label with key `x` as set using the Message.labels map. For example, `labels.\"priority\"=\"high\"`. The operator `:*` can be used to assert the existence of a label. For example, `labels.\"priority\":*`.", 23025 // "location": "query", 23026 // "type": "string" 23027 // }, 23028 // "orderBy": { 23029 // "description": "Orders messages returned by the specified order_by clause. Syntax: https://cloud.google.com/apis/design/design_patterns#sorting_order Fields available for ordering are: * `send_time`", 23030 // "location": "query", 23031 // "type": "string" 23032 // }, 23033 // "pageSize": { 23034 // "description": "Limit on the number of messages to return in a single response. If not specified, 100 is used. May not be larger than 1000.", 23035 // "format": "int32", 23036 // "location": "query", 23037 // "type": "integer" 23038 // }, 23039 // "pageToken": { 23040 // "description": "The next_page_token value returned from the previous List request, if any.", 23041 // "location": "query", 23042 // "type": "string" 23043 // }, 23044 // "parent": { 23045 // "description": "Name of the HL7v2 store to retrieve messages from.", 23046 // "location": "path", 23047 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", 23048 // "required": true, 23049 // "type": "string" 23050 // }, 23051 // "view": { 23052 // "description": "Specifies the parts of the Message to return in the response. When unspecified, equivalent to BASIC. Setting this to anything other than BASIC with a `page_size` larger than the default can generate a large response, which impacts the performance of this method.", 23053 // "enum": [ 23054 // "MESSAGE_VIEW_UNSPECIFIED", 23055 // "RAW_ONLY", 23056 // "PARSED_ONLY", 23057 // "FULL", 23058 // "SCHEMATIZED_ONLY", 23059 // "BASIC" 23060 // ], 23061 // "enumDescriptions": [ 23062 // "Not specified, equivalent to FULL.", 23063 // "Server responses include all the message fields except parsed_data field, and schematized_data fields.", 23064 // "Server responses include all the message fields except data field, and schematized_data fields.", 23065 // "Server responses include all the message fields.", 23066 // "Server responses include all the message fields except data and parsed_data fields.", 23067 // "Server responses include only the name field." 23068 // ], 23069 // "location": "query", 23070 // "type": "string" 23071 // } 23072 // }, 23073 // "path": "v1/{+parent}/messages", 23074 // "response": { 23075 // "$ref": "ListMessagesResponse" 23076 // }, 23077 // "scopes": [ 23078 // "https://www.googleapis.com/auth/cloud-platform" 23079 // ] 23080 // } 23081 23082} 23083 23084// Pages invokes f for each page of results. 23085// A non-nil error returned from f will halt the iteration. 23086// The provided context supersedes any context provided to the Context method. 23087func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Pages(ctx context.Context, f func(*ListMessagesResponse) error) error { 23088 c.ctx_ = ctx 23089 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 23090 for { 23091 x, err := c.Do() 23092 if err != nil { 23093 return err 23094 } 23095 if err := f(x); err != nil { 23096 return err 23097 } 23098 if x.NextPageToken == "" { 23099 return nil 23100 } 23101 c.PageToken(x.NextPageToken) 23102 } 23103} 23104 23105// method id "healthcare.projects.locations.datasets.hl7V2Stores.messages.patch": 23106 23107type ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall struct { 23108 s *Service 23109 name string 23110 message *Message 23111 urlParams_ gensupport.URLParams 23112 ctx_ context.Context 23113 header_ http.Header 23114} 23115 23116// Patch: Update the message. The contents of the message in 23117// Message.data and data extracted from the contents such as 23118// Message.create_time cannot be altered. Only the Message.labels field 23119// is allowed to be updated. The labels in the request are merged with 23120// the existing set of labels. Existing labels with the same keys are 23121// updated. 23122// 23123// - name: Resource name of the Message, of the form 23124// `projects/{project_id}/datasets/{dataset_id}/hl7V2Stores/{hl7_v2_sto 23125// re_id}/messages/{message_id}`. Assigned by the server. 23126func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) Patch(name string, message *Message) *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall { 23127 c := &ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23128 c.name = name 23129 c.message = message 23130 return c 23131} 23132 23133// UpdateMask sets the optional parameter "updateMask": The update mask 23134// applies to the resource. For the `FieldMask` definition, see 23135// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask 23136func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall { 23137 c.urlParams_.Set("updateMask", updateMask) 23138 return c 23139} 23140 23141// Fields allows partial responses to be retrieved. See 23142// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23143// for more information. 23144func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall { 23145 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23146 return c 23147} 23148 23149// Context sets the context to be used in this call's Do method. Any 23150// pending HTTP request will be aborted if the provided context is 23151// canceled. 23152func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall { 23153 c.ctx_ = ctx 23154 return c 23155} 23156 23157// Header returns an http.Header that can be modified by the caller to 23158// add HTTP headers to the request. 23159func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) Header() http.Header { 23160 if c.header_ == nil { 23161 c.header_ = make(http.Header) 23162 } 23163 return c.header_ 23164} 23165 23166func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) doRequest(alt string) (*http.Response, error) { 23167 reqHeaders := make(http.Header) 23168 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 23169 for k, v := range c.header_ { 23170 reqHeaders[k] = v 23171 } 23172 reqHeaders.Set("User-Agent", c.s.userAgent()) 23173 var body io.Reader = nil 23174 body, err := googleapi.WithoutDataWrapper.JSONReader(c.message) 23175 if err != nil { 23176 return nil, err 23177 } 23178 reqHeaders.Set("Content-Type", "application/json") 23179 c.urlParams_.Set("alt", alt) 23180 c.urlParams_.Set("prettyPrint", "false") 23181 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 23182 urls += "?" + c.urlParams_.Encode() 23183 req, err := http.NewRequest("PATCH", urls, body) 23184 if err != nil { 23185 return nil, err 23186 } 23187 req.Header = reqHeaders 23188 googleapi.Expand(req.URL, map[string]string{ 23189 "name": c.name, 23190 }) 23191 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23192} 23193 23194// Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.patch" call. 23195// Exactly one of *Message or error will be non-nil. Any non-2xx status 23196// code is an error. Response headers are in either 23197// *Message.ServerResponse.Header or (if a response was returned at all) 23198// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 23199// check whether the returned error was because http.StatusNotModified 23200// was returned. 23201func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) Do(opts ...googleapi.CallOption) (*Message, error) { 23202 gensupport.SetOptions(c.urlParams_, opts...) 23203 res, err := c.doRequest("json") 23204 if res != nil && res.StatusCode == http.StatusNotModified { 23205 if res.Body != nil { 23206 res.Body.Close() 23207 } 23208 return nil, &googleapi.Error{ 23209 Code: res.StatusCode, 23210 Header: res.Header, 23211 } 23212 } 23213 if err != nil { 23214 return nil, err 23215 } 23216 defer googleapi.CloseBody(res) 23217 if err := googleapi.CheckResponse(res); err != nil { 23218 return nil, err 23219 } 23220 ret := &Message{ 23221 ServerResponse: googleapi.ServerResponse{ 23222 Header: res.Header, 23223 HTTPStatusCode: res.StatusCode, 23224 }, 23225 } 23226 target := &ret 23227 if err := gensupport.DecodeResponse(target, res); err != nil { 23228 return nil, err 23229 } 23230 return ret, nil 23231 // { 23232 // "description": "Update the message. The contents of the message in Message.data and data extracted from the contents such as Message.create_time cannot be altered. Only the Message.labels field is allowed to be updated. The labels in the request are merged with the existing set of labels. Existing labels with the same keys are updated.", 23233 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}/messages/{messagesId}", 23234 // "httpMethod": "PATCH", 23235 // "id": "healthcare.projects.locations.datasets.hl7V2Stores.messages.patch", 23236 // "parameterOrder": [ 23237 // "name" 23238 // ], 23239 // "parameters": { 23240 // "name": { 23241 // "description": "Resource name of the Message, of the form `projects/{project_id}/datasets/{dataset_id}/hl7V2Stores/{hl7_v2_store_id}/messages/{message_id}`. Assigned by the server.", 23242 // "location": "path", 23243 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+/messages/[^/]+$", 23244 // "required": true, 23245 // "type": "string" 23246 // }, 23247 // "updateMask": { 23248 // "description": "The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", 23249 // "format": "google-fieldmask", 23250 // "location": "query", 23251 // "type": "string" 23252 // } 23253 // }, 23254 // "path": "v1/{+name}", 23255 // "request": { 23256 // "$ref": "Message" 23257 // }, 23258 // "response": { 23259 // "$ref": "Message" 23260 // }, 23261 // "scopes": [ 23262 // "https://www.googleapis.com/auth/cloud-platform" 23263 // ] 23264 // } 23265 23266} 23267 23268// method id "healthcare.projects.locations.datasets.operations.cancel": 23269 23270type ProjectsLocationsDatasetsOperationsCancelCall struct { 23271 s *Service 23272 name string 23273 canceloperationrequest *CancelOperationRequest 23274 urlParams_ gensupport.URLParams 23275 ctx_ context.Context 23276 header_ http.Header 23277} 23278 23279// Cancel: Starts asynchronous cancellation on a long-running operation. 23280// The server makes a best effort to cancel the operation, but success 23281// is not guaranteed. If the server doesn't support this method, it 23282// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use 23283// Operations.GetOperation or other methods to check whether the 23284// cancellation succeeded or whether the operation completed despite 23285// cancellation. On successful cancellation, the operation is not 23286// deleted; instead, it becomes an operation with an Operation.error 23287// value with a google.rpc.Status.code of 1, corresponding to 23288// `Code.CANCELLED`. 23289// 23290// - name: The name of the operation resource to be cancelled. 23291func (r *ProjectsLocationsDatasetsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsDatasetsOperationsCancelCall { 23292 c := &ProjectsLocationsDatasetsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23293 c.name = name 23294 c.canceloperationrequest = canceloperationrequest 23295 return c 23296} 23297 23298// Fields allows partial responses to be retrieved. See 23299// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23300// for more information. 23301func (c *ProjectsLocationsDatasetsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsCancelCall { 23302 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23303 return c 23304} 23305 23306// Context sets the context to be used in this call's Do method. Any 23307// pending HTTP request will be aborted if the provided context is 23308// canceled. 23309func (c *ProjectsLocationsDatasetsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsCancelCall { 23310 c.ctx_ = ctx 23311 return c 23312} 23313 23314// Header returns an http.Header that can be modified by the caller to 23315// add HTTP headers to the request. 23316func (c *ProjectsLocationsDatasetsOperationsCancelCall) Header() http.Header { 23317 if c.header_ == nil { 23318 c.header_ = make(http.Header) 23319 } 23320 return c.header_ 23321} 23322 23323func (c *ProjectsLocationsDatasetsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { 23324 reqHeaders := make(http.Header) 23325 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 23326 for k, v := range c.header_ { 23327 reqHeaders[k] = v 23328 } 23329 reqHeaders.Set("User-Agent", c.s.userAgent()) 23330 var body io.Reader = nil 23331 body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) 23332 if err != nil { 23333 return nil, err 23334 } 23335 reqHeaders.Set("Content-Type", "application/json") 23336 c.urlParams_.Set("alt", alt) 23337 c.urlParams_.Set("prettyPrint", "false") 23338 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") 23339 urls += "?" + c.urlParams_.Encode() 23340 req, err := http.NewRequest("POST", urls, body) 23341 if err != nil { 23342 return nil, err 23343 } 23344 req.Header = reqHeaders 23345 googleapi.Expand(req.URL, map[string]string{ 23346 "name": c.name, 23347 }) 23348 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23349} 23350 23351// Do executes the "healthcare.projects.locations.datasets.operations.cancel" call. 23352// Exactly one of *Empty or error will be non-nil. Any non-2xx status 23353// code is an error. Response headers are in either 23354// *Empty.ServerResponse.Header or (if a response was returned at all) 23355// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 23356// check whether the returned error was because http.StatusNotModified 23357// was returned. 23358func (c *ProjectsLocationsDatasetsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 23359 gensupport.SetOptions(c.urlParams_, opts...) 23360 res, err := c.doRequest("json") 23361 if res != nil && res.StatusCode == http.StatusNotModified { 23362 if res.Body != nil { 23363 res.Body.Close() 23364 } 23365 return nil, &googleapi.Error{ 23366 Code: res.StatusCode, 23367 Header: res.Header, 23368 } 23369 } 23370 if err != nil { 23371 return nil, err 23372 } 23373 defer googleapi.CloseBody(res) 23374 if err := googleapi.CheckResponse(res); err != nil { 23375 return nil, err 23376 } 23377 ret := &Empty{ 23378 ServerResponse: googleapi.ServerResponse{ 23379 Header: res.Header, 23380 HTTPStatusCode: res.StatusCode, 23381 }, 23382 } 23383 target := &ret 23384 if err := gensupport.DecodeResponse(target, res); err != nil { 23385 return nil, err 23386 } 23387 return ret, nil 23388 // { 23389 // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", 23390 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/operations/{operationsId}:cancel", 23391 // "httpMethod": "POST", 23392 // "id": "healthcare.projects.locations.datasets.operations.cancel", 23393 // "parameterOrder": [ 23394 // "name" 23395 // ], 23396 // "parameters": { 23397 // "name": { 23398 // "description": "The name of the operation resource to be cancelled.", 23399 // "location": "path", 23400 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/operations/[^/]+$", 23401 // "required": true, 23402 // "type": "string" 23403 // } 23404 // }, 23405 // "path": "v1/{+name}:cancel", 23406 // "request": { 23407 // "$ref": "CancelOperationRequest" 23408 // }, 23409 // "response": { 23410 // "$ref": "Empty" 23411 // }, 23412 // "scopes": [ 23413 // "https://www.googleapis.com/auth/cloud-platform" 23414 // ] 23415 // } 23416 23417} 23418 23419// method id "healthcare.projects.locations.datasets.operations.get": 23420 23421type ProjectsLocationsDatasetsOperationsGetCall struct { 23422 s *Service 23423 name string 23424 urlParams_ gensupport.URLParams 23425 ifNoneMatch_ string 23426 ctx_ context.Context 23427 header_ http.Header 23428} 23429 23430// Get: Gets the latest state of a long-running operation. Clients can 23431// use this method to poll the operation result at intervals as 23432// recommended by the API service. 23433// 23434// - name: The name of the operation resource. 23435func (r *ProjectsLocationsDatasetsOperationsService) Get(name string) *ProjectsLocationsDatasetsOperationsGetCall { 23436 c := &ProjectsLocationsDatasetsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23437 c.name = name 23438 return c 23439} 23440 23441// Fields allows partial responses to be retrieved. See 23442// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23443// for more information. 23444func (c *ProjectsLocationsDatasetsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsGetCall { 23445 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23446 return c 23447} 23448 23449// IfNoneMatch sets the optional parameter which makes the operation 23450// fail if the object's ETag matches the given value. This is useful for 23451// getting updates only after the object has changed since the last 23452// request. Use googleapi.IsNotModified to check whether the response 23453// error from Do is the result of In-None-Match. 23454func (c *ProjectsLocationsDatasetsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsOperationsGetCall { 23455 c.ifNoneMatch_ = entityTag 23456 return c 23457} 23458 23459// Context sets the context to be used in this call's Do method. Any 23460// pending HTTP request will be aborted if the provided context is 23461// canceled. 23462func (c *ProjectsLocationsDatasetsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsGetCall { 23463 c.ctx_ = ctx 23464 return c 23465} 23466 23467// Header returns an http.Header that can be modified by the caller to 23468// add HTTP headers to the request. 23469func (c *ProjectsLocationsDatasetsOperationsGetCall) Header() http.Header { 23470 if c.header_ == nil { 23471 c.header_ = make(http.Header) 23472 } 23473 return c.header_ 23474} 23475 23476func (c *ProjectsLocationsDatasetsOperationsGetCall) doRequest(alt string) (*http.Response, error) { 23477 reqHeaders := make(http.Header) 23478 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 23479 for k, v := range c.header_ { 23480 reqHeaders[k] = v 23481 } 23482 reqHeaders.Set("User-Agent", c.s.userAgent()) 23483 if c.ifNoneMatch_ != "" { 23484 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 23485 } 23486 var body io.Reader = nil 23487 c.urlParams_.Set("alt", alt) 23488 c.urlParams_.Set("prettyPrint", "false") 23489 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 23490 urls += "?" + c.urlParams_.Encode() 23491 req, err := http.NewRequest("GET", urls, body) 23492 if err != nil { 23493 return nil, err 23494 } 23495 req.Header = reqHeaders 23496 googleapi.Expand(req.URL, map[string]string{ 23497 "name": c.name, 23498 }) 23499 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23500} 23501 23502// Do executes the "healthcare.projects.locations.datasets.operations.get" call. 23503// Exactly one of *Operation or error will be non-nil. Any non-2xx 23504// status code is an error. Response headers are in either 23505// *Operation.ServerResponse.Header or (if a response was returned at 23506// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 23507// to check whether the returned error was because 23508// http.StatusNotModified was returned. 23509func (c *ProjectsLocationsDatasetsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 23510 gensupport.SetOptions(c.urlParams_, opts...) 23511 res, err := c.doRequest("json") 23512 if res != nil && res.StatusCode == http.StatusNotModified { 23513 if res.Body != nil { 23514 res.Body.Close() 23515 } 23516 return nil, &googleapi.Error{ 23517 Code: res.StatusCode, 23518 Header: res.Header, 23519 } 23520 } 23521 if err != nil { 23522 return nil, err 23523 } 23524 defer googleapi.CloseBody(res) 23525 if err := googleapi.CheckResponse(res); err != nil { 23526 return nil, err 23527 } 23528 ret := &Operation{ 23529 ServerResponse: googleapi.ServerResponse{ 23530 Header: res.Header, 23531 HTTPStatusCode: res.StatusCode, 23532 }, 23533 } 23534 target := &ret 23535 if err := gensupport.DecodeResponse(target, res); err != nil { 23536 return nil, err 23537 } 23538 return ret, nil 23539 // { 23540 // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", 23541 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/operations/{operationsId}", 23542 // "httpMethod": "GET", 23543 // "id": "healthcare.projects.locations.datasets.operations.get", 23544 // "parameterOrder": [ 23545 // "name" 23546 // ], 23547 // "parameters": { 23548 // "name": { 23549 // "description": "The name of the operation resource.", 23550 // "location": "path", 23551 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/operations/[^/]+$", 23552 // "required": true, 23553 // "type": "string" 23554 // } 23555 // }, 23556 // "path": "v1/{+name}", 23557 // "response": { 23558 // "$ref": "Operation" 23559 // }, 23560 // "scopes": [ 23561 // "https://www.googleapis.com/auth/cloud-platform" 23562 // ] 23563 // } 23564 23565} 23566 23567// method id "healthcare.projects.locations.datasets.operations.list": 23568 23569type ProjectsLocationsDatasetsOperationsListCall struct { 23570 s *Service 23571 name string 23572 urlParams_ gensupport.URLParams 23573 ifNoneMatch_ string 23574 ctx_ context.Context 23575 header_ http.Header 23576} 23577 23578// List: Lists operations that match the specified filter in the 23579// request. If the server doesn't support this method, it returns 23580// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to 23581// override the binding to use different resource name schemes, such as 23582// `users/*/operations`. To override the binding, API services can add a 23583// binding such as "/v1/{name=users/*}/operations" to their service 23584// configuration. For backwards compatibility, the default name includes 23585// the operations collection id, however overriding users must ensure 23586// the name binding is the parent resource, without the operations 23587// collection id. 23588// 23589// - name: The name of the operation's parent resource. 23590func (r *ProjectsLocationsDatasetsOperationsService) List(name string) *ProjectsLocationsDatasetsOperationsListCall { 23591 c := &ProjectsLocationsDatasetsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23592 c.name = name 23593 return c 23594} 23595 23596// Filter sets the optional parameter "filter": The standard list 23597// filter. 23598func (c *ProjectsLocationsDatasetsOperationsListCall) Filter(filter string) *ProjectsLocationsDatasetsOperationsListCall { 23599 c.urlParams_.Set("filter", filter) 23600 return c 23601} 23602 23603// PageSize sets the optional parameter "pageSize": The standard list 23604// page size. 23605func (c *ProjectsLocationsDatasetsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsOperationsListCall { 23606 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 23607 return c 23608} 23609 23610// PageToken sets the optional parameter "pageToken": The standard list 23611// page token. 23612func (c *ProjectsLocationsDatasetsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsOperationsListCall { 23613 c.urlParams_.Set("pageToken", pageToken) 23614 return c 23615} 23616 23617// Fields allows partial responses to be retrieved. See 23618// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23619// for more information. 23620func (c *ProjectsLocationsDatasetsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsListCall { 23621 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23622 return c 23623} 23624 23625// IfNoneMatch sets the optional parameter which makes the operation 23626// fail if the object's ETag matches the given value. This is useful for 23627// getting updates only after the object has changed since the last 23628// request. Use googleapi.IsNotModified to check whether the response 23629// error from Do is the result of In-None-Match. 23630func (c *ProjectsLocationsDatasetsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsOperationsListCall { 23631 c.ifNoneMatch_ = entityTag 23632 return c 23633} 23634 23635// Context sets the context to be used in this call's Do method. Any 23636// pending HTTP request will be aborted if the provided context is 23637// canceled. 23638func (c *ProjectsLocationsDatasetsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsListCall { 23639 c.ctx_ = ctx 23640 return c 23641} 23642 23643// Header returns an http.Header that can be modified by the caller to 23644// add HTTP headers to the request. 23645func (c *ProjectsLocationsDatasetsOperationsListCall) Header() http.Header { 23646 if c.header_ == nil { 23647 c.header_ = make(http.Header) 23648 } 23649 return c.header_ 23650} 23651 23652func (c *ProjectsLocationsDatasetsOperationsListCall) doRequest(alt string) (*http.Response, error) { 23653 reqHeaders := make(http.Header) 23654 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 23655 for k, v := range c.header_ { 23656 reqHeaders[k] = v 23657 } 23658 reqHeaders.Set("User-Agent", c.s.userAgent()) 23659 if c.ifNoneMatch_ != "" { 23660 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 23661 } 23662 var body io.Reader = nil 23663 c.urlParams_.Set("alt", alt) 23664 c.urlParams_.Set("prettyPrint", "false") 23665 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") 23666 urls += "?" + c.urlParams_.Encode() 23667 req, err := http.NewRequest("GET", urls, body) 23668 if err != nil { 23669 return nil, err 23670 } 23671 req.Header = reqHeaders 23672 googleapi.Expand(req.URL, map[string]string{ 23673 "name": c.name, 23674 }) 23675 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23676} 23677 23678// Do executes the "healthcare.projects.locations.datasets.operations.list" call. 23679// Exactly one of *ListOperationsResponse or error will be non-nil. Any 23680// non-2xx status code is an error. Response headers are in either 23681// *ListOperationsResponse.ServerResponse.Header or (if a response was 23682// returned at all) in error.(*googleapi.Error).Header. Use 23683// googleapi.IsNotModified to check whether the returned error was 23684// because http.StatusNotModified was returned. 23685func (c *ProjectsLocationsDatasetsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { 23686 gensupport.SetOptions(c.urlParams_, opts...) 23687 res, err := c.doRequest("json") 23688 if res != nil && res.StatusCode == http.StatusNotModified { 23689 if res.Body != nil { 23690 res.Body.Close() 23691 } 23692 return nil, &googleapi.Error{ 23693 Code: res.StatusCode, 23694 Header: res.Header, 23695 } 23696 } 23697 if err != nil { 23698 return nil, err 23699 } 23700 defer googleapi.CloseBody(res) 23701 if err := googleapi.CheckResponse(res); err != nil { 23702 return nil, err 23703 } 23704 ret := &ListOperationsResponse{ 23705 ServerResponse: googleapi.ServerResponse{ 23706 Header: res.Header, 23707 HTTPStatusCode: res.StatusCode, 23708 }, 23709 } 23710 target := &ret 23711 if err := gensupport.DecodeResponse(target, res); err != nil { 23712 return nil, err 23713 } 23714 return ret, nil 23715 // { 23716 // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", 23717 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/operations", 23718 // "httpMethod": "GET", 23719 // "id": "healthcare.projects.locations.datasets.operations.list", 23720 // "parameterOrder": [ 23721 // "name" 23722 // ], 23723 // "parameters": { 23724 // "filter": { 23725 // "description": "The standard list filter.", 23726 // "location": "query", 23727 // "type": "string" 23728 // }, 23729 // "name": { 23730 // "description": "The name of the operation's parent resource.", 23731 // "location": "path", 23732 // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", 23733 // "required": true, 23734 // "type": "string" 23735 // }, 23736 // "pageSize": { 23737 // "description": "The standard list page size.", 23738 // "format": "int32", 23739 // "location": "query", 23740 // "type": "integer" 23741 // }, 23742 // "pageToken": { 23743 // "description": "The standard list page token.", 23744 // "location": "query", 23745 // "type": "string" 23746 // } 23747 // }, 23748 // "path": "v1/{+name}/operations", 23749 // "response": { 23750 // "$ref": "ListOperationsResponse" 23751 // }, 23752 // "scopes": [ 23753 // "https://www.googleapis.com/auth/cloud-platform" 23754 // ] 23755 // } 23756 23757} 23758 23759// Pages invokes f for each page of results. 23760// A non-nil error returned from f will halt the iteration. 23761// The provided context supersedes any context provided to the Context method. 23762func (c *ProjectsLocationsDatasetsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { 23763 c.ctx_ = ctx 23764 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 23765 for { 23766 x, err := c.Do() 23767 if err != nil { 23768 return err 23769 } 23770 if err := f(x); err != nil { 23771 return err 23772 } 23773 if x.NextPageToken == "" { 23774 return nil 23775 } 23776 c.PageToken(x.NextPageToken) 23777 } 23778} 23779