Debian Codegraph @

healthcare/v1/healthcare-gen.go

raw
1 // Copyright 2026 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 // # Library status
12 //
13 // These client libraries are officially supported by Google. However, this
14 // library is considered complete and is in maintenance mode. This means
15 // that we will address critical bugs and security issues but will not add
16 // any new features.
17 //
18 // When possible, we recommend using our newer
19 // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
20 // that are still actively being worked and iterated on.
21 //
22 // # Creating a client
23 //
24 // Usage example:
25 //
26 // import "google.golang.org/api/healthcare/v1"
27 // ...
28 // ctx := context.Background()
29 // healthcareService, err := healthcare.NewService(ctx)
30 //
31 // In this example, Google Application Default Credentials are used for
32 // authentication. For information on how to create and obtain Application
33 // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
34 //
35 // # Other authentication options
36 //
37 // By default, all available scopes (see "Constants") are used to authenticate.
38 // To restrict scopes, use [google.golang.org/api/option.WithScopes]:
39 //
40 // healthcareService, err := healthcare.NewService(ctx, option.WithScopes(healthcare.CloudPlatformScope))
41 //
42 // To use an API key for authentication (note: some APIs do not support API
43 // keys), use [google.golang.org/api/option.WithAPIKey]:
44 //
45 // healthcareService, err := healthcare.NewService(ctx, option.WithAPIKey("AIza..."))
46 //
47 // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
48 // flow, use [google.golang.org/api/option.WithTokenSource]:
49 //
50 // config := &oauth2.Config{...}
51 // // ...
52 // token, err := config.Exchange(ctx, ...)
53 // healthcareService, err := healthcare.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
54 //
55 // See [google.golang.org/api/option.ClientOption] for details on options.
56 package healthcare // import "google.golang.org/api/healthcare/v1"
57
58 import (
59 "bytes"
60 "context"
61 "encoding/json"
62 "errors"
63 "fmt"
64 "io"
65 "log/slog"
66 "net/http"
67 "net/url"
68 "strconv"
69 "strings"
70
71 "github.com/googleapis/gax-go/v2/internallog"
72 googleapi "google.golang.org/api/googleapi"
73 internal "google.golang.org/api/internal"
74 gensupport "google.golang.org/api/internal/gensupport"
75 option "google.golang.org/api/option"
76 internaloption "google.golang.org/api/option/internaloption"
77 htransport "google.golang.org/api/transport/http"
78 )
79
80 // Always reference these packages, just in case the auto-generated code
81 // below doesn't.
82 var _ = bytes.NewBuffer
83 var _ = strconv.Itoa
84 var _ = fmt.Sprintf
85 var _ = json.NewDecoder
86 var _ = io.Copy
87 var _ = url.Parse
88 var _ = gensupport.MarshalJSON
89 var _ = googleapi.Version
90 var _ = errors.New
91 var _ = strings.Replace
92 var _ = context.Canceled
93 var _ = internaloption.WithDefaultEndpoint
94 var _ = internal.Version
95 var _ = internallog.New
96
97 const apiId = "healthcare:v1"
98 const apiName = "healthcare"
99 const apiVersion = "v1"
100 const basePath = "https://healthcare.googleapis.com/"
101 const basePathTemplate = "https://healthcare.UNIVERSE_DOMAIN/"
102 const mtlsBasePath = "https://healthcare.mtls.googleapis.com/"
103
104 // OAuth2 scopes used by this API.
105 const (
106 // Read, write and manage healthcare data
107 CloudHealthcareScope = "https://www.googleapis.com/auth/cloud-healthcare"
108
109 // See, edit, configure, and delete your Google Cloud data and see the email
110 // address for your Google Account.
111 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
112 )
113
114 // NewService creates a new Service.
115 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
116 scopesOption := internaloption.WithDefaultScopes(
117 "https://www.googleapis.com/auth/cloud-healthcare",
118 "https://www.googleapis.com/auth/cloud-platform",
119 )
120 // NOTE: prepend, so we don't override user-specified scopes.
121 opts = append([]option.ClientOption{scopesOption}, opts...)
122 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
123 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
124 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
125 opts = append(opts, internaloption.EnableNewAuthLibrary())
126 client, endpoint, err := htransport.NewClient(ctx, opts...)
127 if err != nil {
128 return nil, err
129 }
130 s := &Service{client: client, BasePath: basePath, logger: internaloption.GetLogger(opts)}
131 s.Projects = NewProjectsService(s)
132 if endpoint != "" {
133 s.BasePath = endpoint
134 }
135 return s, nil
136 }
137
138 // New creates a new Service. It uses the provided http.Client for requests.
139 //
140 // Deprecated: please use NewService instead.
141 // To provide a custom HTTP client, use option.WithHTTPClient.
142 // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
143 func New(client *http.Client) (*Service, error) {
144 if client == nil {
145 return nil, errors.New("client is nil")
146 }
147 return NewService(context.TODO(), option.WithHTTPClient(client))
148 }
149
150 type Service struct {
151 client *http.Client
152 logger *slog.Logger
153 BasePath string // API endpoint base URL
154 UserAgent string // optional additional User-Agent fragment
155
156 Projects *ProjectsService
157 }
158
159 func (s *Service) userAgent() string {
160 if s.UserAgent == "" {
161 return googleapi.UserAgent
162 }
163 return googleapi.UserAgent + " " + s.UserAgent
164 }
165
166 func NewProjectsService(s *Service) *ProjectsService {
167 rs := &ProjectsService{s: s}
168 rs.Locations = NewProjectsLocationsService(s)
169 return rs
170 }
171
172 type ProjectsService struct {
173 s *Service
174
175 Locations *ProjectsLocationsService
176 }
177
178 func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
179 rs := &ProjectsLocationsService{s: s}
180 rs.Datasets = NewProjectsLocationsDatasetsService(s)
181 rs.Services = NewProjectsLocationsServicesService(s)
182 return rs
183 }
184
185 type ProjectsLocationsService struct {
186 s *Service
187
188 Datasets *ProjectsLocationsDatasetsService
189
190 Services *ProjectsLocationsServicesService
191 }
192
193 func NewProjectsLocationsDatasetsService(s *Service) *ProjectsLocationsDatasetsService {
194 rs := &ProjectsLocationsDatasetsService{s: s}
195 rs.ConsentStores = NewProjectsLocationsDatasetsConsentStoresService(s)
196 rs.DataMapperWorkspaces = NewProjectsLocationsDatasetsDataMapperWorkspacesService(s)
197 rs.DicomStores = NewProjectsLocationsDatasetsDicomStoresService(s)
198 rs.FhirStores = NewProjectsLocationsDatasetsFhirStoresService(s)
199 rs.Hl7V2Stores = NewProjectsLocationsDatasetsHl7V2StoresService(s)
200 rs.Operations = NewProjectsLocationsDatasetsOperationsService(s)
201 return rs
202 }
203
204 type ProjectsLocationsDatasetsService struct {
205 s *Service
206
207 ConsentStores *ProjectsLocationsDatasetsConsentStoresService
208
209 DataMapperWorkspaces *ProjectsLocationsDatasetsDataMapperWorkspacesService
210
211 DicomStores *ProjectsLocationsDatasetsDicomStoresService
212
213 FhirStores *ProjectsLocationsDatasetsFhirStoresService
214
215 Hl7V2Stores *ProjectsLocationsDatasetsHl7V2StoresService
216
217 Operations *ProjectsLocationsDatasetsOperationsService
218 }
219
220 func NewProjectsLocationsDatasetsConsentStoresService(s *Service) *ProjectsLocationsDatasetsConsentStoresService {
221 rs := &ProjectsLocationsDatasetsConsentStoresService{s: s}
222 rs.AttributeDefinitions = NewProjectsLocationsDatasetsConsentStoresAttributeDefinitionsService(s)
223 rs.ConsentArtifacts = NewProjectsLocationsDatasetsConsentStoresConsentArtifactsService(s)
224 rs.Consents = NewProjectsLocationsDatasetsConsentStoresConsentsService(s)
225 rs.UserDataMappings = NewProjectsLocationsDatasetsConsentStoresUserDataMappingsService(s)
226 return rs
227 }
228
229 type ProjectsLocationsDatasetsConsentStoresService struct {
230 s *Service
231
232 AttributeDefinitions *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsService
233
234 ConsentArtifacts *ProjectsLocationsDatasetsConsentStoresConsentArtifactsService
235
236 Consents *ProjectsLocationsDatasetsConsentStoresConsentsService
237
238 UserDataMappings *ProjectsLocationsDatasetsConsentStoresUserDataMappingsService
239 }
240
241 func NewProjectsLocationsDatasetsConsentStoresAttributeDefinitionsService(s *Service) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsService {
242 rs := &ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsService{s: s}
243 return rs
244 }
245
246 type ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsService struct {
247 s *Service
248 }
249
250 func NewProjectsLocationsDatasetsConsentStoresConsentArtifactsService(s *Service) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsService {
251 rs := &ProjectsLocationsDatasetsConsentStoresConsentArtifactsService{s: s}
252 return rs
253 }
254
255 type ProjectsLocationsDatasetsConsentStoresConsentArtifactsService struct {
256 s *Service
257 }
258
259 func NewProjectsLocationsDatasetsConsentStoresConsentsService(s *Service) *ProjectsLocationsDatasetsConsentStoresConsentsService {
260 rs := &ProjectsLocationsDatasetsConsentStoresConsentsService{s: s}
261 return rs
262 }
263
264 type ProjectsLocationsDatasetsConsentStoresConsentsService struct {
265 s *Service
266 }
267
268 func NewProjectsLocationsDatasetsConsentStoresUserDataMappingsService(s *Service) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsService {
269 rs := &ProjectsLocationsDatasetsConsentStoresUserDataMappingsService{s: s}
270 return rs
271 }
272
273 type ProjectsLocationsDatasetsConsentStoresUserDataMappingsService struct {
274 s *Service
275 }
276
277 func NewProjectsLocationsDatasetsDataMapperWorkspacesService(s *Service) *ProjectsLocationsDatasetsDataMapperWorkspacesService {
278 rs := &ProjectsLocationsDatasetsDataMapperWorkspacesService{s: s}
279 return rs
280 }
281
282 type ProjectsLocationsDatasetsDataMapperWorkspacesService struct {
283 s *Service
284 }
285
286 func NewProjectsLocationsDatasetsDicomStoresService(s *Service) *ProjectsLocationsDatasetsDicomStoresService {
287 rs := &ProjectsLocationsDatasetsDicomStoresService{s: s}
288 rs.DicomWeb = NewProjectsLocationsDatasetsDicomStoresDicomWebService(s)
289 rs.Studies = NewProjectsLocationsDatasetsDicomStoresStudiesService(s)
290 return rs
291 }
292
293 type ProjectsLocationsDatasetsDicomStoresService struct {
294 s *Service
295
296 DicomWeb *ProjectsLocationsDatasetsDicomStoresDicomWebService
297
298 Studies *ProjectsLocationsDatasetsDicomStoresStudiesService
299 }
300
301 func NewProjectsLocationsDatasetsDicomStoresDicomWebService(s *Service) *ProjectsLocationsDatasetsDicomStoresDicomWebService {
302 rs := &ProjectsLocationsDatasetsDicomStoresDicomWebService{s: s}
303 rs.Studies = NewProjectsLocationsDatasetsDicomStoresDicomWebStudiesService(s)
304 return rs
305 }
306
307 type ProjectsLocationsDatasetsDicomStoresDicomWebService struct {
308 s *Service
309
310 Studies *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesService
311 }
312
313 func NewProjectsLocationsDatasetsDicomStoresDicomWebStudiesService(s *Service) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesService {
314 rs := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesService{s: s}
315 rs.Series = NewProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesService(s)
316 return rs
317 }
318
319 type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesService struct {
320 s *Service
321
322 Series *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesService
323 }
324
325 func NewProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesService(s *Service) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesService {
326 rs := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesService{s: s}
327 rs.Instances = NewProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesService(s)
328 return rs
329 }
330
331 type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesService struct {
332 s *Service
333
334 Instances *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesService
335 }
336
337 func NewProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesService(s *Service) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesService {
338 rs := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesService{s: s}
339 return rs
340 }
341
342 type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesService struct {
343 s *Service
344 }
345
346 func NewProjectsLocationsDatasetsDicomStoresStudiesService(s *Service) *ProjectsLocationsDatasetsDicomStoresStudiesService {
347 rs := &ProjectsLocationsDatasetsDicomStoresStudiesService{s: s}
348 rs.Series = NewProjectsLocationsDatasetsDicomStoresStudiesSeriesService(s)
349 return rs
350 }
351
352 type ProjectsLocationsDatasetsDicomStoresStudiesService struct {
353 s *Service
354
355 Series *ProjectsLocationsDatasetsDicomStoresStudiesSeriesService
356 }
357
358 func NewProjectsLocationsDatasetsDicomStoresStudiesSeriesService(s *Service) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesService {
359 rs := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesService{s: s}
360 rs.Instances = NewProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesService(s)
361 return rs
362 }
363
364 type ProjectsLocationsDatasetsDicomStoresStudiesSeriesService struct {
365 s *Service
366
367 Instances *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesService
368 }
369
370 func NewProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesService(s *Service) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesService {
371 rs := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesService{s: s}
372 rs.Bulkdata = NewProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesBulkdataService(s)
373 rs.Frames = NewProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesService(s)
374 return rs
375 }
376
377 type ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesService struct {
378 s *Service
379
380 Bulkdata *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesBulkdataService
381
382 Frames *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesService
383 }
384
385 func NewProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesBulkdataService(s *Service) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesBulkdataService {
386 rs := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesBulkdataService{s: s}
387 return rs
388 }
389
390 type ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesBulkdataService struct {
391 s *Service
392 }
393
394 func NewProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesService(s *Service) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesService {
395 rs := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesService{s: s}
396 return rs
397 }
398
399 type ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesService struct {
400 s *Service
401 }
402
403 func NewProjectsLocationsDatasetsFhirStoresService(s *Service) *ProjectsLocationsDatasetsFhirStoresService {
404 rs := &ProjectsLocationsDatasetsFhirStoresService{s: s}
405 rs.Fhir = NewProjectsLocationsDatasetsFhirStoresFhirService(s)
406 rs.Operations = NewProjectsLocationsDatasetsFhirStoresOperationsService(s)
407 return rs
408 }
409
410 type ProjectsLocationsDatasetsFhirStoresService struct {
411 s *Service
412
413 Fhir *ProjectsLocationsDatasetsFhirStoresFhirService
414
415 Operations *ProjectsLocationsDatasetsFhirStoresOperationsService
416 }
417
418 func NewProjectsLocationsDatasetsFhirStoresFhirService(s *Service) *ProjectsLocationsDatasetsFhirStoresFhirService {
419 rs := &ProjectsLocationsDatasetsFhirStoresFhirService{s: s}
420 return rs
421 }
422
423 type ProjectsLocationsDatasetsFhirStoresFhirService struct {
424 s *Service
425 }
426
427 func NewProjectsLocationsDatasetsFhirStoresOperationsService(s *Service) *ProjectsLocationsDatasetsFhirStoresOperationsService {
428 rs := &ProjectsLocationsDatasetsFhirStoresOperationsService{s: s}
429 return rs
430 }
431
432 type ProjectsLocationsDatasetsFhirStoresOperationsService struct {
433 s *Service
434 }
435
436 func NewProjectsLocationsDatasetsHl7V2StoresService(s *Service) *ProjectsLocationsDatasetsHl7V2StoresService {
437 rs := &ProjectsLocationsDatasetsHl7V2StoresService{s: s}
438 rs.Messages = NewProjectsLocationsDatasetsHl7V2StoresMessagesService(s)
439 return rs
440 }
441
442 type ProjectsLocationsDatasetsHl7V2StoresService struct {
443 s *Service
444
445 Messages *ProjectsLocationsDatasetsHl7V2StoresMessagesService
446 }
447
448 func NewProjectsLocationsDatasetsHl7V2StoresMessagesService(s *Service) *ProjectsLocationsDatasetsHl7V2StoresMessagesService {
449 rs := &ProjectsLocationsDatasetsHl7V2StoresMessagesService{s: s}
450 return rs
451 }
452
453 type ProjectsLocationsDatasetsHl7V2StoresMessagesService struct {
454 s *Service
455 }
456
457 func NewProjectsLocationsDatasetsOperationsService(s *Service) *ProjectsLocationsDatasetsOperationsService {
458 rs := &ProjectsLocationsDatasetsOperationsService{s: s}
459 return rs
460 }
461
462 type ProjectsLocationsDatasetsOperationsService struct {
463 s *Service
464 }
465
466 func NewProjectsLocationsServicesService(s *Service) *ProjectsLocationsServicesService {
467 rs := &ProjectsLocationsServicesService{s: s}
468 rs.Nlp = NewProjectsLocationsServicesNlpService(s)
469 return rs
470 }
471
472 type ProjectsLocationsServicesService struct {
473 s *Service
474
475 Nlp *ProjectsLocationsServicesNlpService
476 }
477
478 func NewProjectsLocationsServicesNlpService(s *Service) *ProjectsLocationsServicesNlpService {
479 rs := &ProjectsLocationsServicesNlpService{s: s}
480 return rs
481 }
482
483 type ProjectsLocationsServicesNlpService struct {
484 s *Service
485 }
486
487 // AccessDeterminationLogConfig: Configures consent audit log config for FHIR
488 // create, read, update, and delete (CRUD) operations. Cloud audit log for
489 // healthcare API must be enabled
490 // (https://cloud.google.com/logging/docs/audit/configure-data-access#config-console-enable).
491 // The consent-related logs are included as part of `protoPayload.metadata`.
492 type AccessDeterminationLogConfig struct {
493 // LogLevel: Optional. Controls the amount of detail to include as part of the
494 // audit logs.
495 //
496 // Possible values:
497 // "LOG_LEVEL_UNSPECIFIED" - No log level specified. This value is unused.
498 // "DISABLED" - No additional consent-related logging is added to audit logs.
499 // "MINIMUM" - The following information is included: * One of the following
500 // [`consentMode`](https://cloud.google.com/healthcare-api/docs/fhir-consent#aud
501 // it_logs) fields: (`off`|`emptyScope`|`enforced`|`btg`|`bypass`). * The
502 // accessor's request headers * The `log_level` of the
503 // AccessDeterminationLogConfig * The final consent evaluation (`PERMIT`,
504 // `DENY`, or `NO_CONSENT`) * A human-readable summary of the evaluation
505 // "VERBOSE" - Includes `MINIMUM` and, for each resource owner, returns: *
506 // The resource owner's name * Most specific part of the `X-Consent-Scope`
507 // resulting in consensual determination * Timestamp of the applied enforcement
508 // leading to the decision * Enforcement version at the time the applicable
509 // consents were applied * The Consent resource name * The timestamp of the
510 // Consent resource used for enforcement * Policy type (`PATIENT` or `ADMIN`)
511 // Due to the limited space for logging, this mode is the same as `MINIMUM` for
512 // methods that return multiple resources (such as FHIR Search).
513 LogLevel string `json:"logLevel,omitempty"`
514 // ForceSendFields is a list of field names (e.g. "LogLevel") to
515 // unconditionally include in API requests. By default, fields with empty or
516 // default values are omitted from API requests. See
517 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
518 // details.
519 ForceSendFields []string `json:"-"`
520 // NullFields is a list of field names (e.g. "LogLevel") to include in API
521 // requests with the JSON null value. By default, fields with empty values are
522 // omitted from API requests. See
523 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
524 NullFields []string `json:"-"`
525 }
526
527 func (s AccessDeterminationLogConfig) MarshalJSON() ([]byte, error) {
528 type NoMethod AccessDeterminationLogConfig
529 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
530 }
531
532 // ActivateConsentRequest: Activates the latest revision of the specified
533 // Consent by committing a new revision with `state` updated to `ACTIVE`. If
534 // the latest revision of the given Consent is in the `ACTIVE` state, no new
535 // revision is committed. A FAILED_PRECONDITION error occurs if the latest
536 // revision of the given consent is in the `REJECTED` or `REVOKED` state.
537 type ActivateConsentRequest struct {
538 // ConsentArtifact: Required. The resource name of the Consent artifact that
539 // contains documentation of the user's consent, of the form
540 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentS
541 // tores/{consent_store_id}/consentArtifacts/{consent_artifact_id}`. If the
542 // draft Consent had a Consent artifact, this Consent artifact overwrites it.
543 ConsentArtifact string `json:"consentArtifact,omitempty"`
544 // ExpireTime: Timestamp in UTC of when this Consent is considered expired.
545 ExpireTime string `json:"expireTime,omitempty"`
546 // Ttl: The time to live for this Consent from when it is marked as active.
547 Ttl string `json:"ttl,omitempty"`
548 // ForceSendFields is a list of field names (e.g. "ConsentArtifact") to
549 // unconditionally include in API requests. By default, fields with empty or
550 // default values are omitted from API requests. See
551 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
552 // details.
553 ForceSendFields []string `json:"-"`
554 // NullFields is a list of field names (e.g. "ConsentArtifact") to include in
555 // API requests with the JSON null value. By default, fields with empty values
556 // are omitted from API requests. See
557 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
558 NullFields []string `json:"-"`
559 }
560
561 func (s ActivateConsentRequest) MarshalJSON() ([]byte, error) {
562 type NoMethod ActivateConsentRequest
563 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
564 }
565
566 // AdminConsents: List of admin Consent resources to be applied.
567 type AdminConsents struct {
568 // Names: Optional. The versioned names of the admin Consent resource(s), in
569 // the format
570 // `projects/{project_id}/locations/{location}/datasets/{dataset_id}/fhirStores/
571 // {fhir_store_id}/fhir/Consent/{resource_id}/_history/{version_id}`. For FHIR
572 // stores with `disable_resource_versioning=true`, the format is
573 // `projects/{project_id}/locations/{location}/datasets/{dataset_id}/fhirStores/
574 // {fhir_store_id}/fhir/Consent/{resource_id}`.
575 Names []string `json:"names,omitempty"`
576 // ForceSendFields is a list of field names (e.g. "Names") to unconditionally
577 // include in API requests. By default, fields with empty or default values are
578 // omitted from API requests. See
579 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
580 // details.
581 ForceSendFields []string `json:"-"`
582 // NullFields is a list of field names (e.g. "Names") to include in API
583 // requests with the JSON null value. By default, fields with empty values are
584 // omitted from API requests. See
585 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
586 NullFields []string `json:"-"`
587 }
588
589 func (s AdminConsents) MarshalJSON() ([]byte, error) {
590 type NoMethod AdminConsents
591 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
592 }
593
594 // AnalyzeEntitiesRequest: The request to analyze healthcare entities in a
595 // document.
596 type AnalyzeEntitiesRequest struct {
597 // AlternativeOutputFormat: Optional. Alternative output format to be generated
598 // based on the results of analysis.
599 //
600 // Possible values:
601 // "ALTERNATIVE_OUTPUT_FORMAT_UNSPECIFIED" - No alternative output format is
602 // specified.
603 // "FHIR_BUNDLE" - FHIR bundle output.
604 AlternativeOutputFormat string `json:"alternativeOutputFormat,omitempty"`
605 // DocumentContent: document_content is a document to be annotated.
606 DocumentContent string `json:"documentContent,omitempty"`
607 // LicensedVocabularies: A list of licensed vocabularies to use in the request,
608 // in addition to the default unlicensed vocabularies.
609 //
610 // Possible values:
611 // "LICENSED_VOCABULARY_UNSPECIFIED" - No licensed vocabulary specified.
612 // "ICD10CM" - ICD-10-CM vocabulary
613 // "SNOMEDCT_US" - SNOMED CT (US version) vocabulary
614 LicensedVocabularies []string `json:"licensedVocabularies,omitempty"`
615 // ForceSendFields is a list of field names (e.g. "AlternativeOutputFormat") to
616 // unconditionally include in API requests. By default, fields with empty or
617 // default values are omitted from API requests. See
618 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
619 // details.
620 ForceSendFields []string `json:"-"`
621 // NullFields is a list of field names (e.g. "AlternativeOutputFormat") to
622 // include in API requests with the JSON null value. By default, fields with
623 // empty values are omitted from API requests. See
624 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
625 NullFields []string `json:"-"`
626 }
627
628 func (s AnalyzeEntitiesRequest) MarshalJSON() ([]byte, error) {
629 type NoMethod AnalyzeEntitiesRequest
630 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
631 }
632
633 // AnalyzeEntitiesResponse: Includes recognized entity mentions and
634 // relationships between them.
635 type AnalyzeEntitiesResponse struct {
636 // Entities: The union of all the candidate entities that the entity_mentions
637 // in this response could link to. These are UMLS concepts or normalized
638 // mention content.
639 Entities []*Entity `json:"entities,omitempty"`
640 // EntityMentions: The `entity_mentions` field contains all the annotated
641 // medical entities that were mentioned in the provided document.
642 EntityMentions []*EntityMention `json:"entityMentions,omitempty"`
643 // FhirBundle: The FHIR bundle (`R4` (http://hl7.org/fhir/R4/bundle.html)) that
644 // includes all the entities, the entity mentions, and the relationships in
645 // JSON format.
646 FhirBundle string `json:"fhirBundle,omitempty"`
647 // Relationships: relationships contains all the binary relationships that were
648 // identified between entity mentions within the provided document.
649 Relationships []*EntityMentionRelationship `json:"relationships,omitempty"`
650
651 // ServerResponse contains the HTTP response code and headers from the server.
652 googleapi.ServerResponse `json:"-"`
653 // ForceSendFields is a list of field names (e.g. "Entities") to
654 // unconditionally include in API requests. By default, fields with empty or
655 // default values are omitted from API requests. See
656 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
657 // details.
658 ForceSendFields []string `json:"-"`
659 // NullFields is a list of field names (e.g. "Entities") to include in API
660 // requests with the JSON null value. By default, fields with empty values are
661 // omitted from API requests. See
662 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
663 NullFields []string `json:"-"`
664 }
665
666 func (s AnalyzeEntitiesResponse) MarshalJSON() ([]byte, error) {
667 type NoMethod AnalyzeEntitiesResponse
668 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
669 }
670
671 // ApplyAdminConsentsErrorDetail: Contains the error details of the unsupported
672 // admin Consent resources for when the ApplyAdminConsents method fails to
673 // apply one or more Consent resources.
674 type ApplyAdminConsentsErrorDetail struct {
675 // ConsentErrors: The list of Consent resources that are unsupported or cannot
676 // be applied and the error associated with each of them.
677 ConsentErrors []*ConsentErrors `json:"consentErrors,omitempty"`
678 // ExistingOperationId: The currently in progress non-validate-only
679 // ApplyAdminConsents operation ID if exist.
680 ExistingOperationId uint64 `json:"existingOperationId,omitempty,string"`
681 // ForceSendFields is a list of field names (e.g. "ConsentErrors") to
682 // unconditionally include in API requests. By default, fields with empty or
683 // default values are omitted from API requests. See
684 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
685 // details.
686 ForceSendFields []string `json:"-"`
687 // NullFields is a list of field names (e.g. "ConsentErrors") to include in API
688 // requests with the JSON null value. By default, fields with empty values are
689 // omitted from API requests. See
690 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
691 NullFields []string `json:"-"`
692 }
693
694 func (s ApplyAdminConsentsErrorDetail) MarshalJSON() ([]byte, error) {
695 type NoMethod ApplyAdminConsentsErrorDetail
696 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
697 }
698
699 // ApplyAdminConsentsRequest: Request to apply the admin Consent resources for
700 // the specified FHIR store.
701 type ApplyAdminConsentsRequest struct {
702 // NewConsentsList: A new list of admin Consent resources to be applied. Any
703 // existing enforced Consents, which are specified in
704 // `consent_config.enforced_admin_consents` of the FhirStore, that are not part
705 // of this list will be disabled. An empty list is equivalent to clearing or
706 // disabling all Consents enforced on the FHIR store. When a FHIR store has
707 // `disable_resource_versioning=true` and this list contains a Consent resource
708 // that exists in `consent_config.enforced_admin_consents`, the method enforces
709 // any updates to the existing resource since the last enforcement. If the
710 // existing resource hasn't been updated since the last enforcement, the
711 // resource is unaffected. After the method finishes, the resulting consent
712 // enforcement model is determined by the contents of the Consent resource(s)
713 // when the method was called: * When `disable_resource_versioning=true`, the
714 // result is identical to the current resource(s) in the FHIR store. * When
715 // `disable_resource_versioning=false`, the result is based on the historical
716 // version(s) of the Consent resource(s) at the point in time when the method
717 // was called. At most 200 Consents can be specified.
718 NewConsentsList *AdminConsents `json:"newConsentsList,omitempty"`
719 // ValidateOnly: Optional. If true, the method only validates Consent resources
720 // to make sure they are supported. Otherwise, the method applies the aggregate
721 // consent information to update the enforcement model and reindex the FHIR
722 // resources. If all Consent resources can be applied successfully, the
723 // ApplyAdminConsentsResponse is returned containing the following fields: *
724 // `consent_apply_success` to indicate the number of Consent resources applied.
725 // * `affected_resources` to indicate the number of resources that might have
726 // had their consent access changed. If, however, one or more Consent resources
727 // are unsupported or cannot be applied, the method fails and
728 // ApplyAdminConsentsErrorDetail is is returned with details about the
729 // unsupported Consent resources.
730 ValidateOnly bool `json:"validateOnly,omitempty"`
731 // ForceSendFields is a list of field names (e.g. "NewConsentsList") to
732 // unconditionally include in API requests. By default, fields with empty or
733 // default values are omitted from API requests. See
734 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
735 // details.
736 ForceSendFields []string `json:"-"`
737 // NullFields is a list of field names (e.g. "NewConsentsList") to include in
738 // API requests with the JSON null value. By default, fields with empty values
739 // are omitted from API requests. See
740 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
741 NullFields []string `json:"-"`
742 }
743
744 func (s ApplyAdminConsentsRequest) MarshalJSON() ([]byte, error) {
745 type NoMethod ApplyAdminConsentsRequest
746 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
747 }
748
749 // ApplyAdminConsentsResponse: Response when all admin Consent resources in
750 // scope were processed and all affected resources were reindexed successfully.
751 // This structure will be included in the response when the operation finishes
752 // successfully.
753 type ApplyAdminConsentsResponse struct {
754 // AffectedResources: The number of resources (including the Consent resources)
755 // that may have consent access change.
756 AffectedResources int64 `json:"affectedResources,omitempty,string"`
757 // ConsentApplySuccess: If `validate_only=false` in ApplyAdminConsentsRequest,
758 // this counter contains the number of Consent resources that were successfully
759 // applied. Otherwise, it is the number of Consent resources that are
760 // supported.
761 ConsentApplySuccess int64 `json:"consentApplySuccess,omitempty,string"`
762 // FailedResources: The number of resources (including the Consent resources)
763 // that ApplyAdminConsents failed to re-index.
764 FailedResources int64 `json:"failedResources,omitempty,string"`
765 // ForceSendFields is a list of field names (e.g. "AffectedResources") to
766 // unconditionally include in API requests. By default, fields with empty or
767 // default values are omitted from API requests. See
768 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
769 // details.
770 ForceSendFields []string `json:"-"`
771 // NullFields is a list of field names (e.g. "AffectedResources") to include in
772 // API requests with the JSON null value. By default, fields with empty values
773 // are omitted from API requests. See
774 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
775 NullFields []string `json:"-"`
776 }
777
778 func (s ApplyAdminConsentsResponse) MarshalJSON() ([]byte, error) {
779 type NoMethod ApplyAdminConsentsResponse
780 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
781 }
782
783 // ApplyConsentsRequest: Request to apply the Consent resources for the
784 // specified FHIR store.
785 type ApplyConsentsRequest struct {
786 // PatientScope: Optional. Scope down to a list of patients.
787 PatientScope *PatientScope `json:"patientScope,omitempty"`
788 // TimeRange: Optional. Scope down to patients whose most recent consent
789 // changes are in the time range. Can only be used with a versioning store
790 // (i.e. when disable_resource_versioning is set to false).
791 TimeRange *TimeRange `json:"timeRange,omitempty"`
792 // ValidateOnly: Optional. If true, the method only validates Consent resources
793 // to make sure they are supported. When the operation completes,
794 // ApplyConsentsResponse is returned where `consent_apply_success` and
795 // `consent_apply_failure` indicate supported and unsupported (or invalid)
796 // Consent resources, respectively. Otherwise, the method propagates the
797 // aggregate consensual information to the patient's resources. Upon success,
798 // `affected_resources` in the ApplyConsentsResponse indicates the number of
799 // resources that may have consensual access changed.
800 ValidateOnly bool `json:"validateOnly,omitempty"`
801 // ForceSendFields is a list of field names (e.g. "PatientScope") to
802 // unconditionally include in API requests. By default, fields with empty or
803 // default values are omitted from API requests. See
804 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
805 // details.
806 ForceSendFields []string `json:"-"`
807 // NullFields is a list of field names (e.g. "PatientScope") to include in API
808 // requests with the JSON null value. By default, fields with empty values are
809 // omitted from API requests. See
810 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
811 NullFields []string `json:"-"`
812 }
813
814 func (s ApplyConsentsRequest) MarshalJSON() ([]byte, error) {
815 type NoMethod ApplyConsentsRequest
816 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
817 }
818
819 // ApplyConsentsResponse: Response when all Consent resources in scope were
820 // processed and all affected resources were reindexed successfully. This
821 // structure is included in the response when the operation finishes
822 // successfully.
823 type ApplyConsentsResponse struct {
824 // AffectedResources: The number of resources (including the Consent resources)
825 // that may have consensual access change.
826 AffectedResources int64 `json:"affectedResources,omitempty,string"`
827 // ConsentApplyFailure: If `validate_only = false` in ApplyConsentsRequest,
828 // this counter is the number of Consent resources that were failed to apply.
829 // Otherwise, it is the number of Consent resources that are not supported or
830 // invalid.
831 ConsentApplyFailure int64 `json:"consentApplyFailure,omitempty,string"`
832 // ConsentApplySuccess: If `validate_only = false` in ApplyConsentsRequest,
833 // this counter is the number of Consent resources that were successfully
834 // applied. Otherwise, it is the number of Consent resources that are
835 // supported.
836 ConsentApplySuccess int64 `json:"consentApplySuccess,omitempty,string"`
837 // FailedResources: The number of resources (including the Consent resources)
838 // that ApplyConsents failed to re-index.
839 FailedResources int64 `json:"failedResources,omitempty,string"`
840 // ForceSendFields is a list of field names (e.g. "AffectedResources") to
841 // unconditionally include in API requests. By default, fields with empty or
842 // default values are omitted from API requests. See
843 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
844 // details.
845 ForceSendFields []string `json:"-"`
846 // NullFields is a list of field names (e.g. "AffectedResources") to include in
847 // API requests with the JSON null value. By default, fields with empty values
848 // are omitted from API requests. See
849 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
850 NullFields []string `json:"-"`
851 }
852
853 func (s ApplyConsentsResponse) MarshalJSON() ([]byte, error) {
854 type NoMethod ApplyConsentsResponse
855 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
856 }
857
858 // ArchiveUserDataMappingRequest: Archives the specified User data mapping.
859 type ArchiveUserDataMappingRequest struct {
860 }
861
862 // ArchiveUserDataMappingResponse: Archives the specified User data mapping.
863 type ArchiveUserDataMappingResponse struct {
864 // ServerResponse contains the HTTP response code and headers from the server.
865 googleapi.ServerResponse `json:"-"`
866 }
867
868 // Attribute: An attribute value for a Consent or User data mapping. Each
869 // Attribute must have a corresponding AttributeDefinition in the consent store
870 // that defines the default and allowed values.
871 type Attribute struct {
872 // AttributeDefinitionId: Indicates the name of an attribute defined in the
873 // consent store.
874 AttributeDefinitionId string `json:"attributeDefinitionId,omitempty"`
875 // Values: Required. The value of the attribute. Must be an acceptable value as
876 // defined in the consent store. For example, if the consent store defines
877 // "data type" with acceptable values "questionnaire" and "step-count", when
878 // the attribute name is data type, this field must contain one of those
879 // values.
880 Values []string `json:"values,omitempty"`
881 // ForceSendFields is a list of field names (e.g. "AttributeDefinitionId") to
882 // unconditionally include in API requests. By default, fields with empty or
883 // default values are omitted from API requests. See
884 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
885 // details.
886 ForceSendFields []string `json:"-"`
887 // NullFields is a list of field names (e.g. "AttributeDefinitionId") to
888 // include in API requests with the JSON null value. By default, fields with
889 // empty values are omitted from API requests. See
890 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
891 NullFields []string `json:"-"`
892 }
893
894 func (s Attribute) MarshalJSON() ([]byte, error) {
895 type NoMethod Attribute
896 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
897 }
898
899 // AttributeDefinition: A client-defined consent attribute.
900 type AttributeDefinition struct {
901 // AllowedValues: Required. Possible values for the attribute. The number of
902 // allowed values must not exceed 500. An empty list is invalid. The list can
903 // only be expanded after creation.
904 AllowedValues []string `json:"allowedValues,omitempty"`
905 // Category: Required. The category of the attribute. The value of this field
906 // cannot be changed after creation.
907 //
908 // Possible values:
909 // "CATEGORY_UNSPECIFIED" - No category specified. This option is invalid.
910 // "RESOURCE" - Specify this category when this attribute describes the
911 // properties of resources. For example, data anonymity or data type.
912 // "REQUEST" - Specify this category when this attribute describes the
913 // properties of requests. For example, requester's role or requester's
914 // organization.
915 Category string `json:"category,omitempty"`
916 // ConsentDefaultValues: Optional. Default values of the attribute in Consents.
917 // If no default values are specified, it defaults to an empty value.
918 ConsentDefaultValues []string `json:"consentDefaultValues,omitempty"`
919 // DataMappingDefaultValue: Optional. Default value of the attribute in User
920 // data mappings. If no default value is specified, it defaults to an empty
921 // value. This field is only applicable to attributes of the category
922 // `RESOURCE`.
923 DataMappingDefaultValue string `json:"dataMappingDefaultValue,omitempty"`
924 // Description: Optional. A description of the attribute.
925 Description string `json:"description,omitempty"`
926 // Name: Identifier. Resource name of the Attribute definition, of the form
927 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentS
928 // tores/{consent_store_id}/attributeDefinitions/{attribute_definition_id}`.
929 // Cannot be changed after creation.
930 Name string `json:"name,omitempty"`
931
932 // ServerResponse contains the HTTP response code and headers from the server.
933 googleapi.ServerResponse `json:"-"`
934 // ForceSendFields is a list of field names (e.g. "AllowedValues") to
935 // unconditionally include in API requests. By default, fields with empty or
936 // default values are omitted from API requests. See
937 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
938 // details.
939 ForceSendFields []string `json:"-"`
940 // NullFields is a list of field names (e.g. "AllowedValues") to include in API
941 // requests with the JSON null value. By default, fields with empty values are
942 // omitted from API requests. See
943 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
944 NullFields []string `json:"-"`
945 }
946
947 func (s AttributeDefinition) MarshalJSON() ([]byte, error) {
948 type NoMethod AttributeDefinition
949 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
950 }
951
952 // AuditConfig: Specifies the audit configuration for a service. The
953 // configuration determines which permission types are logged, and what
954 // identities, if any, are exempted from logging. An AuditConfig must have one
955 // or more AuditLogConfigs. If there are AuditConfigs for both `allServices`
956 // and a specific service, the union of the two AuditConfigs is used for that
957 // service: the log_types specified in each AuditConfig are enabled, and the
958 // exempted_members in each AuditLogConfig are exempted. Example Policy with
959 // multiple AuditConfigs: { "audit_configs": [ { "service": "allServices",
960 // "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [
961 // "user:[email protected]" ] }, { "log_type": "DATA_WRITE" }, { "log_type":
962 // "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com",
963 // "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type":
964 // "DATA_WRITE", "exempted_members": [ "user:[email protected]" ] } ] } ] } For
965 // sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
966 // logging. It also exempts `[email protected]` from DATA_READ logging, and
967 // `[email protected]` from DATA_WRITE logging.
968 type AuditConfig struct {
969 // AuditLogConfigs: The configuration for logging of each type of permission.
970 AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
971 // Service: Specifies a service that will be enabled for audit logging. For
972 // example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices`
973 // is a special value that covers all services.
974 Service string `json:"service,omitempty"`
975 // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
976 // unconditionally include in API requests. By default, fields with empty or
977 // default values are omitted from API requests. See
978 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
979 // details.
980 ForceSendFields []string `json:"-"`
981 // NullFields is a list of field names (e.g. "AuditLogConfigs") to include in
982 // API requests with the JSON null value. By default, fields with empty values
983 // are omitted from API requests. See
984 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
985 NullFields []string `json:"-"`
986 }
987
988 func (s AuditConfig) MarshalJSON() ([]byte, error) {
989 type NoMethod AuditConfig
990 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
991 }
992
993 // AuditLogConfig: Provides the configuration for logging a type of
994 // permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ",
995 // "exempted_members": [ "user:[email protected]" ] }, { "log_type":
996 // "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while
997 // exempting [email protected] from DATA_READ logging.
998 type AuditLogConfig struct {
999 // ExemptedMembers: Specifies the identities that do not cause logging for this
1000 // type of permission. Follows the same format of Binding.members.
1001 ExemptedMembers []string `json:"exemptedMembers,omitempty"`
1002 // LogType: The log type that this config enables.
1003 //
1004 // Possible values:
1005 // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.
1006 // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy
1007 // "DATA_WRITE" - Data writes. Example: CloudSQL Users create
1008 // "DATA_READ" - Data reads. Example: CloudSQL Users list
1009 LogType string `json:"logType,omitempty"`
1010 // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
1011 // unconditionally include in API requests. By default, fields with empty or
1012 // default values are omitted from API requests. See
1013 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1014 // details.
1015 ForceSendFields []string `json:"-"`
1016 // NullFields is a list of field names (e.g. "ExemptedMembers") to include in
1017 // API requests with the JSON null value. By default, fields with empty values
1018 // are omitted from API requests. See
1019 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1020 NullFields []string `json:"-"`
1021 }
1022
1023 func (s AuditLogConfig) MarshalJSON() ([]byte, error) {
1024 type NoMethod AuditLogConfig
1025 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1026 }
1027
1028 // Binding: Associates `members`, or principals, with a `role`.
1029 type Binding struct {
1030 // Condition: The condition that is associated with this binding. If the
1031 // condition evaluates to `true`, then this binding applies to the current
1032 // request. If the condition evaluates to `false`, then this binding does not
1033 // apply to the current request. However, a different role binding might grant
1034 // the same role to one or more of the principals in this binding. To learn
1035 // which resources support conditions in their IAM policies, see the IAM
1036 // documentation
1037 // (https://cloud.google.com/iam/help/conditions/resource-policies).
1038 Condition *Expr `json:"condition,omitempty"`
1039 // Members: Specifies the principals requesting access for a Google Cloud
1040 // resource. `members` can have the following values: * `allUsers`: A special
1041 // identifier that represents anyone who is on the internet; with or without a
1042 // Google account. * `allAuthenticatedUsers`: A special identifier that
1043 // represents anyone who is authenticated with a Google account or a service
1044 // account. Does not include identities that come from external identity
1045 // providers (IdPs) through identity federation. * `user:{emailid}`: An email
1046 // address that represents a specific Google account. For example,
1047 // `[email protected]` . * `serviceAccount:{emailid}`: An email address that
1048 // represents a Google service account. For example,
1049 // `[email protected]`. *
1050 // `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
1051 // identifier for a Kubernetes service account
1052 // (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
1053 // For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. *
1054 // `group:{emailid}`: An email address that represents a Google group. For
1055 // example, `[email protected]`. * `domain:{domain}`: The G Suite domain
1056 // (primary) that represents all the users of that domain. For example,
1057 // `google.com` or `example.com`. *
1058 // `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub
1059 // ject/{subject_attribute_value}`: A single identity in a workforce identity
1060 // pool. *
1061 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
1062 // group/{group_id}`: All workforce identities in a group. *
1063 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
1064 // attribute.{attribute_name}/{attribute_value}`: All workforce identities with
1065 // a specific attribute value. *
1066 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
1067 // *`: All identities in a workforce identity pool. *
1068 // `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo
1069 // rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single
1070 // identity in a workload identity pool. *
1071 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
1072 // /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool
1073 // group. *
1074 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
1075 // /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}
1076 // `: All identities in a workload identity pool with a certain attribute. *
1077 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
1078 // /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity
1079 // pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus
1080 // unique identifier) representing a user that has been recently deleted. For
1081 // example, `[email protected]?uid=123456789012345678901`. If the user is
1082 // recovered, this value reverts to `user:{emailid}` and the recovered user
1083 // retains the role in the binding. *
1084 // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1085 // unique identifier) representing a service account that has been recently
1086 // deleted. For example,
1087 // `[email protected]?uid=123456789012345678901`. If the
1088 // service account is undeleted, this value reverts to
1089 // `serviceAccount:{emailid}` and the undeleted service account retains the
1090 // role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email
1091 // address (plus unique identifier) representing a Google group that has been
1092 // recently deleted. For example,
1093 // `[email protected]?uid=123456789012345678901`. If the group is recovered,
1094 // this value reverts to `group:{emailid}` and the recovered group retains the
1095 // role in the binding. *
1096 // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool
1097 // _id}/subject/{subject_attribute_value}`: Deleted single identity in a
1098 // workforce identity pool. For example,
1099 // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po
1100 // ol-id/subject/my-subject-attribute-value`.
1101 Members []string `json:"members,omitempty"`
1102 // Role: Role that is assigned to the list of `members`, or principals. For
1103 // example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview
1104 // of the IAM roles and permissions, see the IAM documentation
1105 // (https://cloud.google.com/iam/docs/roles-overview). For a list of the
1106 // available pre-defined roles, see here
1107 // (https://cloud.google.com/iam/docs/understanding-roles).
1108 Role string `json:"role,omitempty"`
1109 // ForceSendFields is a list of field names (e.g. "Condition") to
1110 // unconditionally include in API requests. By default, fields with empty or
1111 // default values are omitted from API requests. See
1112 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1113 // details.
1114 ForceSendFields []string `json:"-"`
1115 // NullFields is a list of field names (e.g. "Condition") to include in API
1116 // requests with the JSON null value. By default, fields with empty values are
1117 // omitted from API requests. See
1118 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1119 NullFields []string `json:"-"`
1120 }
1121
1122 func (s Binding) MarshalJSON() ([]byte, error) {
1123 type NoMethod Binding
1124 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1125 }
1126
1127 // BlobStorageInfo: BlobStorageInfo contains details about the data stored in
1128 // Blob Storage for the referenced resource. Note: Storage class is only valid
1129 // for DICOM and hence will only be populated for DICOM resources.
1130 type BlobStorageInfo struct {
1131 // SizeBytes: Size in bytes of data stored in Blob Storage.
1132 SizeBytes int64 `json:"sizeBytes,omitempty,string"`
1133 // StorageClass: The storage class in which the Blob data is stored.
1134 //
1135 // Possible values:
1136 // "BLOB_STORAGE_CLASS_UNSPECIFIED" - If unspecified in CreateDataset, the
1137 // StorageClass defaults to STANDARD. If unspecified in UpdateDataset and the
1138 // StorageClass is set in the field mask, an InvalidRequest error is thrown.
1139 // "STANDARD" - This stores the Object in Blob Standard Storage:
1140 // https://cloud.google.com/storage/docs/storage-classes#standard
1141 // "NEARLINE" - This stores the Object in Blob Nearline Storage:
1142 // https://cloud.google.com/storage/docs/storage-classes#nearline
1143 // "COLDLINE" - This stores the Object in Blob Coldline Storage:
1144 // https://cloud.google.com/storage/docs/storage-classes#coldline
1145 // "ARCHIVE" - This stores the Object in Blob Archive Storage:
1146 // https://cloud.google.com/storage/docs/storage-classes#archive
1147 StorageClass string `json:"storageClass,omitempty"`
1148 // StorageClassUpdateTime: The time at which the storage class was updated.
1149 // This is used to compute early deletion fees of the resource.
1150 StorageClassUpdateTime string `json:"storageClassUpdateTime,omitempty"`
1151 // ForceSendFields is a list of field names (e.g. "SizeBytes") to
1152 // unconditionally include in API requests. By default, fields with empty or
1153 // default values are omitted from API requests. See
1154 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1155 // details.
1156 ForceSendFields []string `json:"-"`
1157 // NullFields is a list of field names (e.g. "SizeBytes") to include in API
1158 // requests with the JSON null value. By default, fields with empty values are
1159 // omitted from API requests. See
1160 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1161 NullFields []string `json:"-"`
1162 }
1163
1164 func (s BlobStorageInfo) MarshalJSON() ([]byte, error) {
1165 type NoMethod BlobStorageInfo
1166 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1167 }
1168
1169 // BlobStorageSettings: Settings for data stored in Blob storage.
1170 type BlobStorageSettings struct {
1171 // BlobStorageClass: The Storage class in which the Blob data is stored.
1172 //
1173 // Possible values:
1174 // "BLOB_STORAGE_CLASS_UNSPECIFIED" - If unspecified in CreateDataset, the
1175 // StorageClass defaults to STANDARD. If unspecified in UpdateDataset and the
1176 // StorageClass is set in the field mask, an InvalidRequest error is thrown.
1177 // "STANDARD" - This stores the Object in Blob Standard Storage:
1178 // https://cloud.google.com/storage/docs/storage-classes#standard
1179 // "NEARLINE" - This stores the Object in Blob Nearline Storage:
1180 // https://cloud.google.com/storage/docs/storage-classes#nearline
1181 // "COLDLINE" - This stores the Object in Blob Coldline Storage:
1182 // https://cloud.google.com/storage/docs/storage-classes#coldline
1183 // "ARCHIVE" - This stores the Object in Blob Archive Storage:
1184 // https://cloud.google.com/storage/docs/storage-classes#archive
1185 BlobStorageClass string `json:"blobStorageClass,omitempty"`
1186 // ForceSendFields is a list of field names (e.g. "BlobStorageClass") to
1187 // unconditionally include in API requests. By default, fields with empty or
1188 // default values are omitted from API requests. See
1189 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1190 // details.
1191 ForceSendFields []string `json:"-"`
1192 // NullFields is a list of field names (e.g. "BlobStorageClass") to include in
1193 // API requests with the JSON null value. By default, fields with empty values
1194 // are omitted from API requests. See
1195 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1196 NullFields []string `json:"-"`
1197 }
1198
1199 func (s BlobStorageSettings) MarshalJSON() ([]byte, error) {
1200 type NoMethod BlobStorageSettings
1201 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1202 }
1203
1204 // BulkDeleteResourcesRequest: Request to bulk delete FHIR resources.
1205 type BulkDeleteResourcesRequest struct {
1206 // GcsDestination: Optional. The Cloud Storage output destination. The
1207 // Healthcare Service Agent account requires the `roles/storage.objectAdmin`
1208 // role on the Cloud Storage location. The deleted resources outputs are
1209 // organized by FHIR resource types. The server creates one or more objects per
1210 // resource type. Each object contains newline delimited strings in the format
1211 // {resourceType}/{resourceId}.
1212 GcsDestination *GoogleCloudHealthcareV1FhirGcsDestination `json:"gcsDestination,omitempty"`
1213 // Type: Optional. String of comma-delimited FHIR resource types. If provided,
1214 // only resources of the specified resource type(s) will be deleted.
1215 Type string `json:"type,omitempty"`
1216 // Until: Optional. If provided, only resources updated before or atthis time
1217 // are deleted. The time uses the format YYYY-MM-DDThh:mm:ss.sss+zz:zz. For
1218 // example, `2015-02-07T13:28:17.239+02:00` or `2017-01-01T00:00:00Z`. The time
1219 // must be specified to the second and include a time zone.
1220 Until string `json:"until,omitempty"`
1221 // VersionConfig: Optional. Specifies which version of the resources to delete.
1222 //
1223 // Possible values:
1224 // "VERSION_CONFIG_UNSPECIFIED" - Unspecified version config. Defaults to
1225 // ALL.
1226 // "ALL" - Delete the current version and all history versions.
1227 // "CURRENT_ONLY" - Delete the current version only and create a historical
1228 // version of the deleted resource.
1229 // "HISTORY_ONLY" - Delete all history versions only.
1230 VersionConfig string `json:"versionConfig,omitempty"`
1231 // ForceSendFields is a list of field names (e.g. "GcsDestination") to
1232 // unconditionally include in API requests. By default, fields with empty or
1233 // default values are omitted from API requests. See
1234 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1235 // details.
1236 ForceSendFields []string `json:"-"`
1237 // NullFields is a list of field names (e.g. "GcsDestination") to include in
1238 // API requests with the JSON null value. By default, fields with empty values
1239 // are omitted from API requests. See
1240 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1241 NullFields []string `json:"-"`
1242 }
1243
1244 func (s BulkDeleteResourcesRequest) MarshalJSON() ([]byte, error) {
1245 type NoMethod BulkDeleteResourcesRequest
1246 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1247 }
1248
1249 // BulkExportGcsDestination: The configuration for exporting to Cloud Storage
1250 // using the bulk export API.
1251 type BulkExportGcsDestination struct {
1252 // UriPrefix: Optional. URI for a Cloud Storage directory where the server
1253 // writes result files, in the format
1254 // `gs://{bucket-id}/{path/to/destination/dir}`. If there is no trailing slash,
1255 // the service appends one when composing the object path. The user is
1256 // responsible for creating the Cloud Storage bucket referenced in
1257 // `uri_prefix`.
1258 UriPrefix string `json:"uriPrefix,omitempty"`
1259 // ForceSendFields is a list of field names (e.g. "UriPrefix") to
1260 // unconditionally include in API requests. By default, fields with empty or
1261 // default values are omitted from API requests. See
1262 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1263 // details.
1264 ForceSendFields []string `json:"-"`
1265 // NullFields is a list of field names (e.g. "UriPrefix") to include in API
1266 // requests with the JSON null value. By default, fields with empty values are
1267 // omitted from API requests. See
1268 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1269 NullFields []string `json:"-"`
1270 }
1271
1272 func (s BulkExportGcsDestination) MarshalJSON() ([]byte, error) {
1273 type NoMethod BulkExportGcsDestination
1274 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1275 }
1276
1277 // CancelOperationRequest: The request message for Operations.CancelOperation.
1278 type CancelOperationRequest struct {
1279 }
1280
1281 // CharacterMaskConfig: Mask a string by replacing its characters with a fixed
1282 // character.
1283 type CharacterMaskConfig struct {
1284 // MaskingCharacter: Optional. Character to mask the sensitive values. If not
1285 // supplied, defaults to "*".
1286 MaskingCharacter string `json:"maskingCharacter,omitempty"`
1287 // ForceSendFields is a list of field names (e.g. "MaskingCharacter") to
1288 // unconditionally include in API requests. By default, fields with empty or
1289 // default values are omitted from API requests. See
1290 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1291 // details.
1292 ForceSendFields []string `json:"-"`
1293 // NullFields is a list of field names (e.g. "MaskingCharacter") to include in
1294 // API requests with the JSON null value. By default, fields with empty values
1295 // are omitted from API requests. See
1296 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1297 NullFields []string `json:"-"`
1298 }
1299
1300 func (s CharacterMaskConfig) MarshalJSON() ([]byte, error) {
1301 type NoMethod CharacterMaskConfig
1302 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1303 }
1304
1305 // CheckDataAccessRequest: Checks if a particular data_id of a User data
1306 // mapping in the given consent store is consented for a given use.
1307 type CheckDataAccessRequest struct {
1308 // ConsentList: Optional. Specific Consents to evaluate the access request
1309 // against. These Consents must have the same `user_id` as the evaluated User
1310 // data mapping, must exist in the current `consent_store`, and have a `state`
1311 // of either `ACTIVE` or `DRAFT`. A maximum of 100 Consents can be provided
1312 // here. If no selection is specified, the access request is evaluated against
1313 // all `ACTIVE` unexpired Consents with the same `user_id` as the evaluated
1314 // User data mapping.
1315 ConsentList *ConsentList `json:"consentList,omitempty"`
1316 // DataId: Required. The unique identifier of the resource to check access for.
1317 // This identifier must correspond to a User data mapping in the given consent
1318 // store.
1319 DataId string `json:"dataId,omitempty"`
1320 // RequestAttributes: The values of request attributes associated with this
1321 // access request.
1322 RequestAttributes map[string]string `json:"requestAttributes,omitempty"`
1323 // ResponseView: Optional. The view for CheckDataAccessResponse. If
1324 // unspecified, defaults to `BASIC` and returns `consented` as `TRUE` or
1325 // `FALSE`.
1326 //
1327 // Possible values:
1328 // "RESPONSE_VIEW_UNSPECIFIED" - No response view specified. The API will
1329 // default to the BASIC view.
1330 // "BASIC" - Only the `consented` field is populated in
1331 // CheckDataAccessResponse.
1332 // "FULL" - All fields within CheckDataAccessResponse are populated. When set
1333 // to `FULL`, all `ACTIVE` Consents are evaluated even if a matching policy is
1334 // found during evaluation.
1335 ResponseView string `json:"responseView,omitempty"`
1336 // ForceSendFields is a list of field names (e.g. "ConsentList") to
1337 // unconditionally include in API requests. By default, fields with empty or
1338 // default values are omitted from API requests. See
1339 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1340 // details.
1341 ForceSendFields []string `json:"-"`
1342 // NullFields is a list of field names (e.g. "ConsentList") to include in API
1343 // requests with the JSON null value. By default, fields with empty values are
1344 // omitted from API requests. See
1345 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1346 NullFields []string `json:"-"`
1347 }
1348
1349 func (s CheckDataAccessRequest) MarshalJSON() ([]byte, error) {
1350 type NoMethod CheckDataAccessRequest
1351 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1352 }
1353
1354 // CheckDataAccessResponse: Checks if a particular data_id of a User data
1355 // mapping in the given consent store is consented for a given use.
1356 type CheckDataAccessResponse struct {
1357 // ConsentDetails: The resource names of all evaluated Consents mapped to their
1358 // evaluation.
1359 ConsentDetails map[string]ConsentEvaluation `json:"consentDetails,omitempty"`
1360 // Consented: Whether the requested resource is consented for the given use.
1361 Consented bool `json:"consented,omitempty"`
1362
1363 // ServerResponse contains the HTTP response code and headers from the server.
1364 googleapi.ServerResponse `json:"-"`
1365 // ForceSendFields is a list of field names (e.g. "ConsentDetails") to
1366 // unconditionally include in API requests. By default, fields with empty or
1367 // default values are omitted from API requests. See
1368 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1369 // details.
1370 ForceSendFields []string `json:"-"`
1371 // NullFields is a list of field names (e.g. "ConsentDetails") to include in
1372 // API requests with the JSON null value. By default, fields with empty values
1373 // are omitted from API requests. See
1374 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1375 NullFields []string `json:"-"`
1376 }
1377
1378 func (s CheckDataAccessResponse) MarshalJSON() ([]byte, error) {
1379 type NoMethod CheckDataAccessResponse
1380 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1381 }
1382
1383 // Consent: Represents a user's consent.
1384 type Consent struct {
1385 // ConsentArtifact: Required. The resource name of the Consent artifact that
1386 // contains proof of the end user's consent, of the form
1387 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentS
1388 // tores/{consent_store_id}/consentArtifacts/{consent_artifact_id}`.
1389 ConsentArtifact string `json:"consentArtifact,omitempty"`
1390 // ExpireTime: Timestamp in UTC of when this Consent is considered expired.
1391 ExpireTime string `json:"expireTime,omitempty"`
1392 // Metadata: Optional. User-supplied key-value pairs used to organize Consent
1393 // resources. Metadata keys must: - be between 1 and 63 characters long - have
1394 // a UTF-8 encoding of maximum 128 bytes - begin with a letter - consist of up
1395 // to 63 characters including lowercase letters, numeric characters,
1396 // underscores, and dashes Metadata values must be: - be between 1 and 63
1397 // characters long - have a UTF-8 encoding of maximum 128 bytes - consist of up
1398 // to 63 characters including lowercase letters, numeric characters,
1399 // underscores, and dashes No more than 64 metadata entries can be associated
1400 // with a given consent.
1401 Metadata map[string]string `json:"metadata,omitempty"`
1402 // Name: Identifier. Resource name of the Consent, of the form
1403 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentS
1404 // tores/{consent_store_id}/consents/{consent_id}`. Cannot be changed after
1405 // creation.
1406 Name string `json:"name,omitempty"`
1407 // Policies: Optional. Represents a user's consent in terms of the resources
1408 // that can be accessed and under what conditions.
1409 Policies []*GoogleCloudHealthcareV1ConsentPolicy `json:"policies,omitempty"`
1410 // RevisionCreateTime: Output only. The timestamp that the revision was
1411 // created.
1412 RevisionCreateTime string `json:"revisionCreateTime,omitempty"`
1413 // RevisionId: Output only. The revision ID of the Consent. The format is an
1414 // 8-character hexadecimal string. Refer to a specific revision of a Consent by
1415 // appending `@{revision_id}` to the Consent's resource name.
1416 RevisionId string `json:"revisionId,omitempty"`
1417 // State: Required. Indicates the current state of this Consent.
1418 //
1419 // Possible values:
1420 // "STATE_UNSPECIFIED" - No state specified. Treated as ACTIVE only at the
1421 // time of resource creation.
1422 // "ACTIVE" - The Consent is active and is considered when evaluating a
1423 // user's consent on resources.
1424 // "ARCHIVED" - The archived state is currently not being used.
1425 // "REVOKED" - A revoked Consent is not considered when evaluating a user's
1426 // consent on resources.
1427 // "DRAFT" - A draft Consent is not considered when evaluating a user's
1428 // consent on resources unless explicitly specified.
1429 // "REJECTED" - When a draft Consent is rejected by a user, it is set to a
1430 // rejected state. A rejected Consent is not considered when evaluating a
1431 // user's consent on resources.
1432 State string `json:"state,omitempty"`
1433 // Ttl: Input only. The time to live for this Consent from when it is created.
1434 Ttl string `json:"ttl,omitempty"`
1435 // UserId: Required. User's UUID provided by the client.
1436 UserId string `json:"userId,omitempty"`
1437
1438 // ServerResponse contains the HTTP response code and headers from the server.
1439 googleapi.ServerResponse `json:"-"`
1440 // ForceSendFields is a list of field names (e.g. "ConsentArtifact") to
1441 // unconditionally include in API requests. By default, fields with empty or
1442 // default values are omitted from API requests. See
1443 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1444 // details.
1445 ForceSendFields []string `json:"-"`
1446 // NullFields is a list of field names (e.g. "ConsentArtifact") to include in
1447 // API requests with the JSON null value. By default, fields with empty values
1448 // are omitted from API requests. See
1449 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1450 NullFields []string `json:"-"`
1451 }
1452
1453 func (s Consent) MarshalJSON() ([]byte, error) {
1454 type NoMethod Consent
1455 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1456 }
1457
1458 // ConsentAccessorScope: The accessor scope that describes who can access, for
1459 // what purpose, in which environment.
1460 type ConsentAccessorScope struct {
1461 // Actor: An individual, group, or access role that identifies the accessor or
1462 // a characteristic of the accessor. This can be a resource ID (such as
1463 // `{resourceType}/{id}`) or an external URI. This value must be present.
1464 Actor string `json:"actor,omitempty"`
1465 // Environment: An abstract identifier that describes the environment or
1466 // conditions under which the accessor is acting. If it's not specified, it
1467 // applies to all environments.
1468 Environment string `json:"environment,omitempty"`
1469 // Purpose: The intent of data use. If it's not specified, it applies to all
1470 // purposes.
1471 Purpose string `json:"purpose,omitempty"`
1472 // ForceSendFields is a list of field names (e.g. "Actor") to unconditionally
1473 // include in API requests. By default, fields with empty or default values are
1474 // omitted from API requests. See
1475 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1476 // details.
1477 ForceSendFields []string `json:"-"`
1478 // NullFields is a list of field names (e.g. "Actor") to include in API
1479 // requests with the JSON null value. By default, fields with empty values are
1480 // omitted from API requests. See
1481 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1482 NullFields []string `json:"-"`
1483 }
1484
1485 func (s ConsentAccessorScope) MarshalJSON() ([]byte, error) {
1486 type NoMethod ConsentAccessorScope
1487 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1488 }
1489
1490 // ConsentArtifact: Documentation of a user's consent.
1491 type ConsentArtifact struct {
1492 // ConsentContentScreenshots: Optional. Screenshots, PDFs, or other binary
1493 // information documenting the user's consent.
1494 ConsentContentScreenshots []*Image `json:"consentContentScreenshots,omitempty"`
1495 // ConsentContentVersion: Optional. An string indicating the version of the
1496 // consent information shown to the user.
1497 ConsentContentVersion string `json:"consentContentVersion,omitempty"`
1498 // GuardianSignature: Optional. A signature from a guardian.
1499 GuardianSignature *Signature `json:"guardianSignature,omitempty"`
1500 // Metadata: Optional. Metadata associated with the Consent artifact. For
1501 // example, the consent locale or user agent version.
1502 Metadata map[string]string `json:"metadata,omitempty"`
1503 // Name: Identifier. Resource name of the Consent artifact, of the form
1504 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentS
1505 // tores/{consent_store_id}/consentArtifacts/{consent_artifact_id}`. Cannot be
1506 // changed after creation.
1507 Name string `json:"name,omitempty"`
1508 // UserId: Required. User's UUID provided by the client.
1509 UserId string `json:"userId,omitempty"`
1510 // UserSignature: Optional. User's signature.
1511 UserSignature *Signature `json:"userSignature,omitempty"`
1512 // WitnessSignature: Optional. A signature from a witness.
1513 WitnessSignature *Signature `json:"witnessSignature,omitempty"`
1514
1515 // ServerResponse contains the HTTP response code and headers from the server.
1516 googleapi.ServerResponse `json:"-"`
1517 // ForceSendFields is a list of field names (e.g. "ConsentContentScreenshots")
1518 // to unconditionally include in API requests. By default, fields with empty or
1519 // default values are omitted from API requests. See
1520 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1521 // details.
1522 ForceSendFields []string `json:"-"`
1523 // NullFields is a list of field names (e.g. "ConsentContentScreenshots") to
1524 // include in API requests with the JSON null value. By default, fields with
1525 // empty values are omitted from API requests. See
1526 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1527 NullFields []string `json:"-"`
1528 }
1529
1530 func (s ConsentArtifact) MarshalJSON() ([]byte, error) {
1531 type NoMethod ConsentArtifact
1532 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1533 }
1534
1535 // ConsentConfig: Configures whether to enforce consent for the FHIR store and
1536 // which consent enforcement version is being used.
1537 type ConsentConfig struct {
1538 // AccessDeterminationLogConfig: Optional. Specifies how the server logs the
1539 // consent-aware requests. If not specified, the
1540 // `AccessDeterminationLogConfig.LogLevel.MINIMUM` option is used.
1541 AccessDeterminationLogConfig *AccessDeterminationLogConfig `json:"accessDeterminationLogConfig,omitempty"`
1542 // AccessEnforced: Optional. The default value is false. If set to true, when
1543 // accessing FHIR resources, the consent headers will be verified against
1544 // consents given by patients. See the ConsentEnforcementVersion for the
1545 // supported consent headers.
1546 AccessEnforced bool `json:"accessEnforced,omitempty"`
1547 // ConsentHeaderHandling: Optional. Different options to configure the
1548 // behaviour of the server when handling the `X-Consent-Scope` header.
1549 ConsentHeaderHandling *ConsentHeaderHandling `json:"consentHeaderHandling,omitempty"`
1550 // EnforcedAdminConsents: Output only. The versioned names of the enforced
1551 // admin Consent resource(s), in the format
1552 // `projects/{project_id}/locations/{location}/datasets/{dataset_id}/fhirStores/
1553 // {fhir_store_id}/fhir/Consent/{resource_id}/_history/{version_id}`. For FHIR
1554 // stores with `disable_resource_versioning=true`, the format is
1555 // `projects/{project_id}/locations/{location}/datasets/{dataset_id}/fhirStores/
1556 // {fhir_store_id}/fhir/Consent/{resource_id}`. This field can only be updated
1557 // using ApplyAdminConsents.
1558 EnforcedAdminConsents []string `json:"enforcedAdminConsents,omitempty"`
1559 // Version: Required. Specifies which consent enforcement version is being used
1560 // for this FHIR store. This field can only be set once by either
1561 // CreateFhirStore or UpdateFhirStore. After that, you must call ApplyConsents
1562 // to change the version.
1563 //
1564 // Possible values:
1565 // "CONSENT_ENFORCEMENT_VERSION_UNSPECIFIED" - Users must specify an
1566 // enforcement version or an error is returned.
1567 // "V1" - Enforcement version 1. See the [FHIR Consent resources in the Cloud
1568 // Healthcare API](https://cloud.google.com/healthcare-api/docs/fhir-consent)
1569 // guide for more details.
1570 Version string `json:"version,omitempty"`
1571 // ForceSendFields is a list of field names (e.g.
1572 // "AccessDeterminationLogConfig") to unconditionally include in API requests.
1573 // By default, fields with empty or default values are omitted from API
1574 // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields
1575 // for more details.
1576 ForceSendFields []string `json:"-"`
1577 // NullFields is a list of field names (e.g. "AccessDeterminationLogConfig") to
1578 // include in API requests with the JSON null value. By default, fields with
1579 // empty values are omitted from API requests. See
1580 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1581 NullFields []string `json:"-"`
1582 }
1583
1584 func (s ConsentConfig) MarshalJSON() ([]byte, error) {
1585 type NoMethod ConsentConfig
1586 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1587 }
1588
1589 // ConsentErrors: The Consent resource name and error.
1590 type ConsentErrors struct {
1591 // Error: The error code and message.
1592 Error *Status `json:"error,omitempty"`
1593 // Name: The versioned name of the admin Consent resource, in the format
1594 // `projects/{project_id}/locations/{location}/datasets/{dataset_id}/fhirStores/
1595 // {fhir_store_id}/fhir/Consent/{resource_id}/_history/{version_id}`. For FHIR
1596 // stores with `disable_resource_versioning=true`, the format is
1597 // `projects/{project_id}/locations/{location}/datasets/{dataset_id}/fhirStores/
1598 // {fhir_store_id}/fhir/Consent/{resource_id}`.
1599 Name string `json:"name,omitempty"`
1600 // ForceSendFields is a list of field names (e.g. "Error") to unconditionally
1601 // include in API requests. By default, fields with empty or default values are
1602 // omitted from API requests. See
1603 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1604 // details.
1605 ForceSendFields []string `json:"-"`
1606 // NullFields is a list of field names (e.g. "Error") to include in API
1607 // requests with the JSON null value. By default, fields with empty values are
1608 // omitted from API requests. See
1609 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1610 NullFields []string `json:"-"`
1611 }
1612
1613 func (s ConsentErrors) MarshalJSON() ([]byte, error) {
1614 type NoMethod ConsentErrors
1615 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1616 }
1617
1618 // ConsentEvaluation: The detailed evaluation of a particular Consent.
1619 type ConsentEvaluation struct {
1620 // EvaluationResult: The evaluation result.
1621 //
1622 // Possible values:
1623 // "EVALUATION_RESULT_UNSPECIFIED" - No evaluation result specified. This
1624 // option is invalid.
1625 // "NOT_APPLICABLE" - The Consent is not applicable to the requested access
1626 // determination. For example, the Consent does not apply to the user for which
1627 // the access determination is requested, or it has a `state` of `REVOKED`, or
1628 // it has expired.
1629 // "NO_MATCHING_POLICY" - The Consent does not have a policy that matches the
1630 // `resource_attributes` of the evaluated resource.
1631 // "NO_SATISFIED_POLICY" - The Consent has at least one policy that matches
1632 // the `resource_attributes` of the evaluated resource, but no
1633 // `authorization_rule` was satisfied.
1634 // "HAS_SATISFIED_POLICY" - The Consent has at least one policy that matches
1635 // the `resource_attributes` of the evaluated resource, and at least one
1636 // `authorization_rule` was satisfied.
1637 EvaluationResult string `json:"evaluationResult,omitempty"`
1638 // ForceSendFields is a list of field names (e.g. "EvaluationResult") to
1639 // unconditionally include in API requests. By default, fields with empty or
1640 // default values are omitted from API requests. See
1641 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1642 // details.
1643 ForceSendFields []string `json:"-"`
1644 // NullFields is a list of field names (e.g. "EvaluationResult") to include in
1645 // API requests with the JSON null value. By default, fields with empty values
1646 // are omitted from API requests. See
1647 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1648 NullFields []string `json:"-"`
1649 }
1650
1651 func (s ConsentEvaluation) MarshalJSON() ([]byte, error) {
1652 type NoMethod ConsentEvaluation
1653 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1654 }
1655
1656 // ConsentHeaderHandling: How the server handles the consent header.
1657 type ConsentHeaderHandling struct {
1658 // Profile: Optional. Specifies the default server behavior when the header is
1659 // empty. If not specified, the `ScopeProfile.PERMIT_EMPTY_SCOPE` option is
1660 // used.
1661 //
1662 // Possible values:
1663 // "SCOPE_PROFILE_UNSPECIFIED" - If not specified, the default value
1664 // `PERMIT_EMPTY_SCOPE` is used.
1665 // "PERMIT_EMPTY_SCOPE" - When no consent scopes are provided (for example,
1666 // if there's an empty or missing header), then consent check is disabled,
1667 // similar to when `access_enforced` is `false`. You can use audit logs to
1668 // differentiate these two cases by looking at the value of
1669 // `protopayload.metadata.consentMode`. If consents scopes are present, they
1670 // must be valid and within the allowed limits, otherwise the request will be
1671 // rejected with a `4xx` code.
1672 // "REQUIRED_ON_READ" - The consent header must be non-empty when performing
1673 // read and search operations, otherwise the request is rejected with a `4xx`
1674 // code. Additionally, invalid consent scopes or scopes exceeding the allowed
1675 // limits are rejected.
1676 Profile string `json:"profile,omitempty"`
1677 // ForceSendFields is a list of field names (e.g. "Profile") to unconditionally
1678 // include in API requests. By default, fields with empty or default values are
1679 // omitted from API requests. See
1680 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1681 // details.
1682 ForceSendFields []string `json:"-"`
1683 // NullFields is a list of field names (e.g. "Profile") to include in API
1684 // requests with the JSON null value. By default, fields with empty values are
1685 // omitted from API requests. See
1686 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1687 NullFields []string `json:"-"`
1688 }
1689
1690 func (s ConsentHeaderHandling) MarshalJSON() ([]byte, error) {
1691 type NoMethod ConsentHeaderHandling
1692 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1693 }
1694
1695 // ConsentList: List of resource names of Consent resources.
1696 type ConsentList struct {
1697 // Consents: The resource names of the Consents to evaluate against, of the
1698 // form
1699 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentS
1700 // tores/{consent_store_id}/consents/{consent_id}`.
1701 Consents []string `json:"consents,omitempty"`
1702 // ForceSendFields is a list of field names (e.g. "Consents") to
1703 // unconditionally include in API requests. By default, fields with empty or
1704 // default values are omitted from API requests. See
1705 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1706 // details.
1707 ForceSendFields []string `json:"-"`
1708 // NullFields is a list of field names (e.g. "Consents") to include in API
1709 // requests with the JSON null value. By default, fields with empty values are
1710 // omitted from API requests. See
1711 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1712 NullFields []string `json:"-"`
1713 }
1714
1715 func (s ConsentList) MarshalJSON() ([]byte, error) {
1716 type NoMethod ConsentList
1717 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1718 }
1719
1720 // ConsentStore: Represents a consent store.
1721 type ConsentStore struct {
1722 // DefaultConsentTtl: Optional. Default time to live for Consents created in
1723 // this store. Must be at least 24 hours. Updating this field will not affect
1724 // the expiration time of existing consents.
1725 DefaultConsentTtl string `json:"defaultConsentTtl,omitempty"`
1726 // EnableConsentCreateOnUpdate: Optional. If `true`, UpdateConsent creates the
1727 // Consent if it does not already exist. If unspecified, defaults to `false`.
1728 EnableConsentCreateOnUpdate bool `json:"enableConsentCreateOnUpdate,omitempty"`
1729 // Labels: Optional. User-supplied key-value pairs used to organize consent
1730 // stores. Label keys must be between 1 and 63 characters long, have a UTF-8
1731 // encoding of maximum 128 bytes, and must conform to the following PCRE
1732 // regular expression: \p{Ll}\p{Lo}{0,62}. Label values must be between 1 and
1733 // 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must
1734 // conform to the following PCRE regular expression:
1735 // [\p{Ll}\p{Lo}\p{N}_-]{0,63}. No more than 64 labels can be associated with a
1736 // given store. For more information:
1737 // https://cloud.google.com/healthcare/docs/how-tos/labeling-resources
1738 Labels map[string]string `json:"labels,omitempty"`
1739 // Name: Identifier. Resource name of the consent store, of the form
1740 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentS
1741 // tores/{consent_store_id}`. Cannot be changed after creation.
1742 Name string `json:"name,omitempty"`
1743
1744 // ServerResponse contains the HTTP response code and headers from the server.
1745 googleapi.ServerResponse `json:"-"`
1746 // ForceSendFields is a list of field names (e.g. "DefaultConsentTtl") to
1747 // unconditionally include in API requests. By default, fields with empty or
1748 // default values are omitted from API requests. See
1749 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1750 // details.
1751 ForceSendFields []string `json:"-"`
1752 // NullFields is a list of field names (e.g. "DefaultConsentTtl") to include in
1753 // API requests with the JSON null value. By default, fields with empty values
1754 // are omitted from API requests. See
1755 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1756 NullFields []string `json:"-"`
1757 }
1758
1759 func (s ConsentStore) MarshalJSON() ([]byte, error) {
1760 type NoMethod ConsentStore
1761 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1762 }
1763
1764 // CreateMessageRequest: Creates a new message.
1765 type CreateMessageRequest struct {
1766 // Message: Required. HL7v2 message.
1767 Message *Message `json:"message,omitempty"`
1768 // ForceSendFields is a list of field names (e.g. "Message") to unconditionally
1769 // include in API requests. By default, fields with empty or default values are
1770 // omitted from API requests. See
1771 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1772 // details.
1773 ForceSendFields []string `json:"-"`
1774 // NullFields is a list of field names (e.g. "Message") to include in API
1775 // requests with the JSON null value. By default, fields with empty values are
1776 // omitted from API requests. See
1777 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1778 NullFields []string `json:"-"`
1779 }
1780
1781 func (s CreateMessageRequest) MarshalJSON() ([]byte, error) {
1782 type NoMethod CreateMessageRequest
1783 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1784 }
1785
1786 // CryptoHashConfig: Pseudonymization method that generates surrogates via
1787 // cryptographic hashing. Uses SHA-256. Outputs a base64-encoded representation
1788 // of the hashed output (for example,
1789 // `L7k0BHmF1ha5U3NfGykjro4xWi1MPVQPjhMAZbSV9mM=`).
1790 type CryptoHashConfig struct {
1791 // CryptoKey: An AES 128/192/256 bit key. Causes the hash to be computed based
1792 // on this key. A default key is generated for each Deidentify operation and is
1793 // used when neither `crypto_key` nor `kms_wrapped` is specified. Must not be
1794 // set if `kms_wrapped` is set.
1795 CryptoKey string `json:"cryptoKey,omitempty"`
1796 // KmsWrapped: KMS wrapped key. Must not be set if `crypto_key` is set.
1797 KmsWrapped *KmsWrappedCryptoKey `json:"kmsWrapped,omitempty"`
1798 // ForceSendFields is a list of field names (e.g. "CryptoKey") to
1799 // unconditionally include in API requests. By default, fields with empty or
1800 // default values are omitted from API requests. See
1801 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1802 // details.
1803 ForceSendFields []string `json:"-"`
1804 // NullFields is a list of field names (e.g. "CryptoKey") to include in API
1805 // requests with the JSON null value. By default, fields with empty values are
1806 // omitted from API requests. See
1807 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1808 NullFields []string `json:"-"`
1809 }
1810
1811 func (s CryptoHashConfig) MarshalJSON() ([]byte, error) {
1812 type NoMethod CryptoHashConfig
1813 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1814 }
1815
1816 // Dataset: A message representing a health dataset. A health dataset
1817 // represents a collection of healthcare data pertaining to one or more
1818 // patients. This may include multiple modalities of healthcare data, such as
1819 // electronic medical records or medical imaging data.
1820 type Dataset struct {
1821 // EncryptionSpec: Optional. Customer-managed encryption key spec for a
1822 // Dataset. If set, this Dataset and all of its sub-resources will be secured
1823 // by this key. If empty, the Dataset is secured by the default Google
1824 // encryption key.
1825 EncryptionSpec *EncryptionSpec `json:"encryptionSpec,omitempty"`
1826 // Name: Identifier. Resource name of the dataset, of the form
1827 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.
1828 Name string `json:"name,omitempty"`
1829 // SatisfiesPzi: Output only. Whether the dataset satisfies zone isolation.
1830 SatisfiesPzi bool `json:"satisfiesPzi,omitempty"`
1831 // SatisfiesPzs: Output only. Whether the dataset satisfies zone separation.
1832 SatisfiesPzs bool `json:"satisfiesPzs,omitempty"`
1833 // TimeZone: Optional. The default timezone used by this dataset. Must be a
1834 // either a valid IANA time zone name such as "America/New_York" or empty,
1835 // which defaults to UTC. This is used for parsing times in resources, such as
1836 // HL7 messages, where no explicit timezone is specified.
1837 TimeZone string `json:"timeZone,omitempty"`
1838
1839 // ServerResponse contains the HTTP response code and headers from the server.
1840 googleapi.ServerResponse `json:"-"`
1841 // ForceSendFields is a list of field names (e.g. "EncryptionSpec") to
1842 // unconditionally include in API requests. By default, fields with empty or
1843 // default values are omitted from API requests. See
1844 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1845 // details.
1846 ForceSendFields []string `json:"-"`
1847 // NullFields is a list of field names (e.g. "EncryptionSpec") to include in
1848 // API requests with the JSON null value. By default, fields with empty values
1849 // are omitted from API requests. See
1850 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1851 NullFields []string `json:"-"`
1852 }
1853
1854 func (s Dataset) MarshalJSON() ([]byte, error) {
1855 type NoMethod Dataset
1856 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1857 }
1858
1859 // DateShiftConfig: Shift a date forward or backward in time by a random amount
1860 // which is consistent for a given patient and crypto key combination.
1861 type DateShiftConfig struct {
1862 // CryptoKey: An AES 128/192/256 bit key. The date shift is computed based on
1863 // this key and the patient ID. If the patient ID is empty for a DICOM
1864 // resource, the date shift is computed based on this key and the study
1865 // instance UID. If `crypto_key` is not set, then `kms_wrapped` is used to
1866 // calculate the date shift. If neither is set, a default key is generated for
1867 // each de-identify operation. Must not be set if `kms_wrapped` is set.
1868 CryptoKey string `json:"cryptoKey,omitempty"`
1869 // KmsWrapped: KMS wrapped key. If `kms_wrapped` is not set, then `crypto_key`
1870 // is used to calculate the date shift. If neither is set, a default key is
1871 // generated for each de-identify operation. Must not be set if `crypto_key` is
1872 // set.
1873 KmsWrapped *KmsWrappedCryptoKey `json:"kmsWrapped,omitempty"`
1874 // ForceSendFields is a list of field names (e.g. "CryptoKey") to
1875 // unconditionally include in API requests. By default, fields with empty or
1876 // default values are omitted from API requests. See
1877 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1878 // details.
1879 ForceSendFields []string `json:"-"`
1880 // NullFields is a list of field names (e.g. "CryptoKey") to include in API
1881 // requests with the JSON null value. By default, fields with empty values are
1882 // omitted from API requests. See
1883 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1884 NullFields []string `json:"-"`
1885 }
1886
1887 func (s DateShiftConfig) MarshalJSON() ([]byte, error) {
1888 type NoMethod DateShiftConfig
1889 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1890 }
1891
1892 // DeidentifiedStoreDestination: Contains configuration for streaming
1893 // de-identified FHIR export.
1894 type DeidentifiedStoreDestination struct {
1895 // Config: Optional. The configuration to use when de-identifying resources
1896 // that are added to this store.
1897 Config *DeidentifyConfig `json:"config,omitempty"`
1898 // Store: Optional. The full resource name of a Cloud Healthcare FHIR store,
1899 // for example,
1900 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStor
1901 // es/{fhir_store_id}`.
1902 Store string `json:"store,omitempty"`
1903 // ForceSendFields is a list of field names (e.g. "Config") to unconditionally
1904 // include in API requests. By default, fields with empty or default values are
1905 // omitted from API requests. See
1906 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1907 // details.
1908 ForceSendFields []string `json:"-"`
1909 // NullFields is a list of field names (e.g. "Config") to include in API
1910 // requests with the JSON null value. By default, fields with empty values are
1911 // omitted from API requests. See
1912 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1913 NullFields []string `json:"-"`
1914 }
1915
1916 func (s DeidentifiedStoreDestination) MarshalJSON() ([]byte, error) {
1917 type NoMethod DeidentifiedStoreDestination
1918 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1919 }
1920
1921 // DeidentifyConfig: Configures de-id options specific to different types of
1922 // content. Each submessage customizes the handling of an
1923 // https://tools.ietf.org/html/rfc6838 media type or subtype. Configs are
1924 // applied in a nested manner at runtime.
1925 type DeidentifyConfig struct {
1926 // Dicom: Optional. Configures de-id of application/DICOM content.
1927 Dicom *DicomConfig `json:"dicom,omitempty"`
1928 // Fhir: Optional. Configures de-id of application/FHIR content.
1929 Fhir *FhirConfig `json:"fhir,omitempty"`
1930 // Image: Optional. Configures de-identification of image pixels wherever they
1931 // are found in the source_dataset.
1932 Image *ImageConfig `json:"image,omitempty"`
1933 // Text: Optional. Configures de-identification of text wherever it is found in
1934 // the source_dataset.
1935 Text *TextConfig `json:"text,omitempty"`
1936 // UseRegionalDataProcessing: Optional. Ensures in-flight data remains in the
1937 // region of origin during de-identification. The default value is false. Using
1938 // this option results in a significant reduction of throughput, and is not
1939 // compatible with `LOCATION` or `ORGANIZATION_NAME` infoTypes. `LOCATION` must
1940 // be excluded within TextConfig, and must also be excluded within ImageConfig
1941 // if image redaction is required.
1942 UseRegionalDataProcessing bool `json:"useRegionalDataProcessing,omitempty"`
1943 // ForceSendFields is a list of field names (e.g. "Dicom") to unconditionally
1944 // include in API requests. By default, fields with empty or default values are
1945 // omitted from API requests. See
1946 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1947 // details.
1948 ForceSendFields []string `json:"-"`
1949 // NullFields is a list of field names (e.g. "Dicom") to include in API
1950 // requests with the JSON null value. By default, fields with empty values are
1951 // omitted from API requests. See
1952 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1953 NullFields []string `json:"-"`
1954 }
1955
1956 func (s DeidentifyConfig) MarshalJSON() ([]byte, error) {
1957 type NoMethod DeidentifyConfig
1958 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1959 }
1960
1961 // DeidentifyDatasetRequest: Redacts identifying information from the specified
1962 // dataset.
1963 type DeidentifyDatasetRequest struct {
1964 // Config: Deidentify configuration. Only one of `config` and `gcs_config_uri`
1965 // can be specified.
1966 Config *DeidentifyConfig `json:"config,omitempty"`
1967 // DestinationDataset: Required. The name of the dataset resource to create and
1968 // write the redacted data to. * The destination dataset must not exist. * The
1969 // destination dataset must be in the same location as the source dataset.
1970 // De-identifying data across multiple locations is not supported.
1971 DestinationDataset string `json:"destinationDataset,omitempty"`
1972 // GcsConfigUri: Cloud Storage location to read the JSON
1973 // cloud.healthcare.deidentify.DeidentifyConfig from, overriding the default
1974 // config. Must be of the form `gs://{bucket_id}/path/to/object`. The Cloud
1975 // Storage location must grant the Cloud IAM role `roles/storage.objectViewer`
1976 // to the project's Cloud Healthcare Service Agent service account. Only one of
1977 // `config` and `gcs_config_uri` can be specified.
1978 GcsConfigUri string `json:"gcsConfigUri,omitempty"`
1979 // ForceSendFields is a list of field names (e.g. "Config") to unconditionally
1980 // include in API requests. By default, fields with empty or default values are
1981 // omitted from API requests. See
1982 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1983 // details.
1984 ForceSendFields []string `json:"-"`
1985 // NullFields is a list of field names (e.g. "Config") to include in API
1986 // requests with the JSON null value. By default, fields with empty values are
1987 // omitted from API requests. See
1988 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1989 NullFields []string `json:"-"`
1990 }
1991
1992 func (s DeidentifyDatasetRequest) MarshalJSON() ([]byte, error) {
1993 type NoMethod DeidentifyDatasetRequest
1994 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1995 }
1996
1997 // DeidentifyDicomStoreRequest: Creates a new DICOM store with sensitive
1998 // information de-identified.
1999 type DeidentifyDicomStoreRequest struct {
2000 // Config: Deidentify configuration. Only one of `config` and `gcs_config_uri`
2001 // can be specified.
2002 Config *DeidentifyConfig `json:"config,omitempty"`
2003 // DestinationStore: Required. The name of the DICOM store to write the
2004 // redacted data to. For example,
2005 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomSto
2006 // res/{dicom_store_id}`. * The destination dataset and DICOM store must exist.
2007 // * The source dataset and destination dataset must both reside in the same
2008 // location. De-identifying data across multiple locations is not supported. *
2009 // The caller must have the healthcare.dicomStores.dicomWebWrite permission to
2010 // write to the destination DICOM store.
2011 DestinationStore string `json:"destinationStore,omitempty"`
2012 // FilterConfig: Filter configuration.
2013 FilterConfig *DicomFilterConfig `json:"filterConfig,omitempty"`
2014 // GcsConfigUri: Cloud Storage location to read the JSON
2015 // cloud.healthcare.deidentify.DeidentifyConfig from, overriding the default
2016 // config. Must be of the form `gs://{bucket_id}/path/to/object`. The Cloud
2017 // Storage location must grant the Cloud IAM role `roles/storage.objectViewer`
2018 // to the project's Cloud Healthcare Service Agent service account. Only one of
2019 // `config` and `gcs_config_uri` can be specified.
2020 GcsConfigUri string `json:"gcsConfigUri,omitempty"`
2021 // ForceSendFields is a list of field names (e.g. "Config") to unconditionally
2022 // include in API requests. By default, fields with empty or default values are
2023 // omitted from API requests. See
2024 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2025 // details.
2026 ForceSendFields []string `json:"-"`
2027 // NullFields is a list of field names (e.g. "Config") to include in API
2028 // requests with the JSON null value. By default, fields with empty values are
2029 // omitted from API requests. See
2030 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2031 NullFields []string `json:"-"`
2032 }
2033
2034 func (s DeidentifyDicomStoreRequest) MarshalJSON() ([]byte, error) {
2035 type NoMethod DeidentifyDicomStoreRequest
2036 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2037 }
2038
2039 // DeidentifyFhirStoreRequest: Creates a new FHIR store with sensitive
2040 // information de-identified.
2041 type DeidentifyFhirStoreRequest struct {
2042 // Config: Deidentify configuration. Only one of `config` and `gcs_config_uri`
2043 // can be specified.
2044 Config *DeidentifyConfig `json:"config,omitempty"`
2045 // DestinationStore: Required. The name of the FHIR store to write the redacted
2046 // data to. For example,
2047 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStor
2048 // es/{fhir_store_id}`. * The destination dataset and FHIR store must exist. *
2049 // The source dataset and destination dataset must both reside in the same
2050 // location. De-identifying data across multiple locations is not supported. *
2051 // The caller must have the healthcare.fhirResources.update permission to write
2052 // to the destination FHIR store.
2053 DestinationStore string `json:"destinationStore,omitempty"`
2054 // GcsConfigUri: Cloud Storage location to read the JSON
2055 // cloud.healthcare.deidentify.DeidentifyConfig from, overriding the default
2056 // config. Must be of the form `gs://{bucket_id}/path/to/object`. The Cloud
2057 // Storage location must grant the Cloud IAM role `roles/storage.objectViewer`
2058 // to the project's Cloud Healthcare Service Agent service account. Only one of
2059 // `config` and `gcs_config_uri` can be specified.
2060 GcsConfigUri string `json:"gcsConfigUri,omitempty"`
2061 // ResourceFilter: A filter specifying the resources to include in the output.
2062 // If not specified, all resources are included in the output.
2063 ResourceFilter *FhirFilter `json:"resourceFilter,omitempty"`
2064 // SkipModifiedResources: If true, skips resources that are created or modified
2065 // after the de-identify operation is created.
2066 SkipModifiedResources bool `json:"skipModifiedResources,omitempty"`
2067 // ForceSendFields is a list of field names (e.g. "Config") to unconditionally
2068 // include in API requests. By default, fields with empty or default values are
2069 // omitted from API requests. See
2070 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2071 // details.
2072 ForceSendFields []string `json:"-"`
2073 // NullFields is a list of field names (e.g. "Config") to include in API
2074 // requests with the JSON null value. By default, fields with empty values are
2075 // omitted from API requests. See
2076 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2077 NullFields []string `json:"-"`
2078 }
2079
2080 func (s DeidentifyFhirStoreRequest) MarshalJSON() ([]byte, error) {
2081 type NoMethod DeidentifyFhirStoreRequest
2082 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2083 }
2084
2085 // DeidentifySummary: Contains a summary of the Deidentify operation.
2086 type DeidentifySummary struct {
2087 }
2088
2089 // DicomConfig: Specifies the parameters needed for de-identification of DICOM
2090 // stores.
2091 type DicomConfig struct {
2092 // FilterProfile: Tag filtering profile that determines which tags to
2093 // keep/remove.
2094 //
2095 // Possible values:
2096 // "TAG_FILTER_PROFILE_UNSPECIFIED" - No tag filtration profile provided.
2097 // Same as KEEP_ALL_PROFILE.
2098 // "MINIMAL_KEEP_LIST_PROFILE" - Keep only tags required to produce valid
2099 // DICOM.
2100 // "ATTRIBUTE_CONFIDENTIALITY_BASIC_PROFILE" - Remove tags based on DICOM
2101 // Standard's Attribute Confidentiality Basic Profile (DICOM Standard Edition
2102 // 2018e)
2103 // https://dicom.nema.org/medical/dicom/2018e/output/chtml/part15/chapter_E.html.
2104 // "KEEP_ALL_PROFILE" - Keep all tags.
2105 // "DEIDENTIFY_TAG_CONTENTS" - Inspects within tag contents and replaces
2106 // sensitive text. The process can be configured using the TextConfig. Applies
2107 // to all tags with the following Value Representation names: AE, LO, LT, PN,
2108 // SH, ST, UC, UT, DA, DT, AS
2109 FilterProfile string `json:"filterProfile,omitempty"`
2110 // KeepList: List of tags to keep. Remove all other tags.
2111 KeepList *TagFilterList `json:"keepList,omitempty"`
2112 // RemoveList: List of tags to remove. Keep all other tags.
2113 RemoveList *TagFilterList `json:"removeList,omitempty"`
2114 // SkipIdRedaction: Optional. If true, skip replacing StudyInstanceUID,
2115 // SeriesInstanceUID, SOPInstanceUID, and MediaStorageSOPInstanceUID and leave
2116 // them untouched. The Cloud Healthcare API regenerates these UIDs by default
2117 // based on the DICOM Standard's reasoning: "Whilst these UIDs cannot be mapped
2118 // directly to an individual out of context, given access to the original
2119 // images, or to a database of the original images containing the UIDs, it
2120 // would be possible to recover the individual's identity."
2121 // https://dicom.nema.org/medical/dicom/current/output/chtml/part15/sect_E.3.9.html
2122 SkipIdRedaction bool `json:"skipIdRedaction,omitempty"`
2123 // ForceSendFields is a list of field names (e.g. "FilterProfile") to
2124 // unconditionally include in API requests. By default, fields with empty or
2125 // default values are omitted from API requests. See
2126 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2127 // details.
2128 ForceSendFields []string `json:"-"`
2129 // NullFields is a list of field names (e.g. "FilterProfile") to include in API
2130 // requests with the JSON null value. By default, fields with empty values are
2131 // omitted from API requests. See
2132 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2133 NullFields []string `json:"-"`
2134 }
2135
2136 func (s DicomConfig) MarshalJSON() ([]byte, error) {
2137 type NoMethod DicomConfig
2138 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2139 }
2140
2141 // DicomFilterConfig: Specifies the filter configuration for DICOM resources.
2142 type DicomFilterConfig struct {
2143 // ResourcePathsGcsUri: The Cloud Storage location of the filter configuration
2144 // file. The `gcs_uri` must be in the format `gs://bucket/path/to/object`. The
2145 // filter configuration file must contain a list of resource paths separated by
2146 // newline characters (\n or \r\n). Each resource path must be in the format
2147 // "/studies/{studyUID}[/series/{seriesUID}[/instances/{instanceUID}]]" The
2148 // Cloud Healthcare API service account must have the
2149 // `roles/storage.objectViewer` Cloud IAM role for this Cloud Storage location.
2150 ResourcePathsGcsUri string `json:"resourcePathsGcsUri,omitempty"`
2151 // ForceSendFields is a list of field names (e.g. "ResourcePathsGcsUri") to
2152 // unconditionally include in API requests. By default, fields with empty or
2153 // default values are omitted from API requests. See
2154 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2155 // details.
2156 ForceSendFields []string `json:"-"`
2157 // NullFields is a list of field names (e.g. "ResourcePathsGcsUri") to include
2158 // in API requests with the JSON null value. By default, fields with empty
2159 // values are omitted from API requests. See
2160 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2161 NullFields []string `json:"-"`
2162 }
2163
2164 func (s DicomFilterConfig) MarshalJSON() ([]byte, error) {
2165 type NoMethod DicomFilterConfig
2166 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2167 }
2168
2169 // DicomNotificationConfig: Contains the configuration for DICOM notifications.
2170 type DicomNotificationConfig struct {
2171 // PubsubTopic: Required. The Pub/Sub (https://cloud.google.com/pubsub/docs/)
2172 // topic that notifications of changes are published on. Supplied by the
2173 // client. The notification is a `PubsubMessage` with the following fields: *
2174 // `PubsubMessage.Data` contains the resource name. * `PubsubMessage.MessageId`
2175 // is the ID of this notification. It is guaranteed to be unique within the
2176 // topic. * `PubsubMessage.PublishTime` is the time when the message was
2177 // published. * `PubsubMessage.Attributes` contains the following attributes: *
2178 // `action`: The name of the endpoint that generated the notification. Possible
2179 // values are `StoreInstances`, `SetBlobSettings`, `ImportDicomData`, etc. *
2180 // `lastUpdatedTime`: The latest timestamp when the DICOM instance was updated.
2181 // * `storeName`: The resource name of the DICOM store, of the form
2182 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomSto
2183 // res/{dicom_store_id}`. * `studyInstanceUID`: The study UID of the DICOM
2184 // instance that was changed. * `seriesInstanceUID`: The series UID of the
2185 // DICOM instance that was changed. * `sopInstanceUID`: The instance UID of the
2186 // DICOM instance that was changed. * `versionId`: The version ID of the DICOM
2187 // instance that was changed. * `modality`: The modality tag of the DICOM
2188 // instance that was changed. * `previousStorageClass`: The storage class where
2189 // the DICOM instance was previously stored if the storage class was changed. *
2190 // `storageClass`: The storage class where the DICOM instance is currently
2191 // stored. Note that notifications are only sent if the topic is non-empty.
2192 // Topic names (https://cloud.google.com/pubsub/docs/overview#names) must be
2193 // scoped to a project. The Cloud Healthcare API service account,
2194 // [email protected], must have the
2195 // `pubsub.topics.publish` permission (which is typically included in
2196 // `roles/pubsub.publisher` role) on the given Pub/Sub topic. Not having
2197 // adequate permissions causes the calls that send notifications to fail
2198 // (https://cloud.google.com/healthcare-api/docs/permissions-healthcare-api-gcp-products#dicom_fhir_and_hl7v2_store_cloud_pubsub_permissions).
2199 // If a notification can't be published to Pub/Sub, errors are logged to Cloud
2200 // Logging. For more information, see Viewing error logs in Cloud Logging
2201 // (https://cloud.google.com/healthcare-api/docs/how-tos/logging).
2202 PubsubTopic string `json:"pubsubTopic,omitempty"`
2203 // ForceSendFields is a list of field names (e.g. "PubsubTopic") to
2204 // unconditionally include in API requests. By default, fields with empty or
2205 // default values are omitted from API requests. See
2206 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2207 // details.
2208 ForceSendFields []string `json:"-"`
2209 // NullFields is a list of field names (e.g. "PubsubTopic") to include in API
2210 // requests with the JSON null value. By default, fields with empty values are
2211 // omitted from API requests. See
2212 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2213 NullFields []string `json:"-"`
2214 }
2215
2216 func (s DicomNotificationConfig) MarshalJSON() ([]byte, error) {
2217 type NoMethod DicomNotificationConfig
2218 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2219 }
2220
2221 // DicomStore: Represents a DICOM store.
2222 type DicomStore struct {
2223 // Labels: User-supplied key-value pairs used to organize DICOM stores. Label
2224 // keys must be between 1 and 63 characters long, have a UTF-8 encoding of
2225 // maximum 128 bytes, and must conform to the following PCRE regular
2226 // expression: \p{Ll}\p{Lo}{0,62} Label values are optional, must be between 1
2227 // and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must
2228 // conform to the following PCRE regular expression:
2229 // [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64 labels can be associated with a
2230 // given store.
2231 Labels map[string]string `json:"labels,omitempty"`
2232 // Name: Identifier. Resource name of the DICOM store, of the form
2233 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomSto
2234 // res/{dicom_store_id}`.
2235 Name string `json:"name,omitempty"`
2236 // NotificationConfig: Optional. Notification destination for new DICOM
2237 // instances. Supplied by the client.
2238 NotificationConfig *NotificationConfig `json:"notificationConfig,omitempty"`
2239 // NotificationConfigs: Optional. Specifies where and whether to send
2240 // notifications upon changes to a DICOM store.
2241 NotificationConfigs []*DicomNotificationConfig `json:"notificationConfigs,omitempty"`
2242 // StreamConfigs: Optional. A list of streaming configs used to configure the
2243 // destination of streaming exports for every DICOM instance insertion in this
2244 // DICOM store. After a new config is added to `stream_configs`, DICOM instance
2245 // insertions are streamed to the new destination. When a config is removed
2246 // from `stream_configs`, the server stops streaming to that destination. Each
2247 // config must contain a unique destination.
2248 StreamConfigs []*GoogleCloudHealthcareV1DicomStreamConfig `json:"streamConfigs,omitempty"`
2249
2250 // ServerResponse contains the HTTP response code and headers from the server.
2251 googleapi.ServerResponse `json:"-"`
2252 // ForceSendFields is a list of field names (e.g. "Labels") to unconditionally
2253 // include in API requests. By default, fields with empty or default values are
2254 // omitted from API requests. See
2255 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2256 // details.
2257 ForceSendFields []string `json:"-"`
2258 // NullFields is a list of field names (e.g. "Labels") to include in API
2259 // requests with the JSON null value. By default, fields with empty values are
2260 // omitted from API requests. See
2261 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2262 NullFields []string `json:"-"`
2263 }
2264
2265 func (s DicomStore) MarshalJSON() ([]byte, error) {
2266 type NoMethod DicomStore
2267 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2268 }
2269
2270 // DicomStoreMetrics: DicomStoreMetrics contains metrics describing a DICOM
2271 // store.
2272 type DicomStoreMetrics struct {
2273 // BlobStorageSizeBytes: Total blob storage bytes for all instances in the
2274 // store.
2275 BlobStorageSizeBytes int64 `json:"blobStorageSizeBytes,omitempty,string"`
2276 // InstanceCount: Number of instances in the store.
2277 InstanceCount int64 `json:"instanceCount,omitempty,string"`
2278 // Name: Resource name of the DICOM store, of the form
2279 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomSto
2280 // res/{dicom_store_id}`.
2281 Name string `json:"name,omitempty"`
2282 // SeriesCount: Number of series in the store.
2283 SeriesCount int64 `json:"seriesCount,omitempty,string"`
2284 // StructuredStorageSizeBytes: Total structured storage bytes for all instances
2285 // in the store.
2286 StructuredStorageSizeBytes int64 `json:"structuredStorageSizeBytes,omitempty,string"`
2287 // StudyCount: Number of studies in the store.
2288 StudyCount int64 `json:"studyCount,omitempty,string"`
2289
2290 // ServerResponse contains the HTTP response code and headers from the server.
2291 googleapi.ServerResponse `json:"-"`
2292 // ForceSendFields is a list of field names (e.g. "BlobStorageSizeBytes") to
2293 // unconditionally include in API requests. By default, fields with empty or
2294 // default values are omitted from API requests. See
2295 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2296 // details.
2297 ForceSendFields []string `json:"-"`
2298 // NullFields is a list of field names (e.g. "BlobStorageSizeBytes") to include
2299 // in API requests with the JSON null value. By default, fields with empty
2300 // values are omitted from API requests. See
2301 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2302 NullFields []string `json:"-"`
2303 }
2304
2305 func (s DicomStoreMetrics) MarshalJSON() ([]byte, error) {
2306 type NoMethod DicomStoreMetrics
2307 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2308 }
2309
2310 // Empty: A generic empty message that you can re-use to avoid defining
2311 // duplicated empty messages in your APIs. A typical example is to use it as
2312 // the request or the response type of an API method. For instance: service Foo
2313 // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
2314 type Empty struct {
2315 // ServerResponse contains the HTTP response code and headers from the server.
2316 googleapi.ServerResponse `json:"-"`
2317 }
2318
2319 // EncryptionSpec: Represents a customer-managed encryption key spec that can
2320 // be applied to a resource.
2321 type EncryptionSpec struct {
2322 // KmsKeyName: Required. The resource name of customer-managed encryption key
2323 // that is used to secure a resource and its sub-resources. Only the key in the
2324 // same location as this Dataset is allowed to be used for encryption. Format
2325 // is:
2326 // `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{key}`
2327 KmsKeyName string `json:"kmsKeyName,omitempty"`
2328 // ForceSendFields is a list of field names (e.g. "KmsKeyName") to
2329 // unconditionally include in API requests. By default, fields with empty or
2330 // default values are omitted from API requests. See
2331 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2332 // details.
2333 ForceSendFields []string `json:"-"`
2334 // NullFields is a list of field names (e.g. "KmsKeyName") to include in API
2335 // requests with the JSON null value. By default, fields with empty values are
2336 // omitted from API requests. See
2337 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2338 NullFields []string `json:"-"`
2339 }
2340
2341 func (s EncryptionSpec) MarshalJSON() ([]byte, error) {
2342 type NoMethod EncryptionSpec
2343 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2344 }
2345
2346 // Entity: The candidate entities that an entity mention could link to.
2347 type Entity struct {
2348 // EntityId: entity_id is a first class field entity_id uniquely identifies
2349 // this concept and its meta-vocabulary. For example, "UMLS/C0000970".
2350 EntityId string `json:"entityId,omitempty"`
2351 // PreferredTerm: preferred_term is the preferred term for this concept. For
2352 // example, "Acetaminophen". For ad hoc entities formed by normalization, this
2353 // is the most popular unnormalized string.
2354 PreferredTerm string `json:"preferredTerm,omitempty"`
2355 // VocabularyCodes: Vocabulary codes are first-class fields and differentiated
2356 // from the concept unique identifier (entity_id). vocabulary_codes contains
2357 // the representation of this concept in particular vocabularies, such as
2358 // ICD-10, SNOMED-CT and RxNORM. These are prefixed by the name of the
2359 // vocabulary, followed by the unique code within that vocabulary. For example,
2360 // "RXNORM/A10334543".
2361 VocabularyCodes []string `json:"vocabularyCodes,omitempty"`
2362 // ForceSendFields is a list of field names (e.g. "EntityId") to
2363 // unconditionally include in API requests. By default, fields with empty or
2364 // default values are omitted from API requests. See
2365 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2366 // details.
2367 ForceSendFields []string `json:"-"`
2368 // NullFields is a list of field names (e.g. "EntityId") to include in API
2369 // requests with the JSON null value. By default, fields with empty values are
2370 // omitted from API requests. See
2371 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2372 NullFields []string `json:"-"`
2373 }
2374
2375 func (s Entity) MarshalJSON() ([]byte, error) {
2376 type NoMethod Entity
2377 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2378 }
2379
2380 // EntityMention: An entity mention in the document.
2381 type EntityMention struct {
2382 // CertaintyAssessment: The certainty assessment of the entity mention. Its
2383 // value is one of: LIKELY, SOMEWHAT_LIKELY, UNCERTAIN, SOMEWHAT_UNLIKELY,
2384 // UNLIKELY, CONDITIONAL
2385 CertaintyAssessment *Feature `json:"certaintyAssessment,omitempty"`
2386 // Confidence: The model's confidence in this entity mention annotation. A
2387 // number between 0 and 1.
2388 Confidence float64 `json:"confidence,omitempty"`
2389 // LinkedEntities: linked_entities are candidate ontological concepts that this
2390 // entity mention may refer to. They are sorted by decreasing confidence.
2391 LinkedEntities []*LinkedEntity `json:"linkedEntities,omitempty"`
2392 // MentionId: mention_id uniquely identifies each entity mention in a single
2393 // response.
2394 MentionId string `json:"mentionId,omitempty"`
2395 // Subject: The subject this entity mention relates to. Its value is one of:
2396 // PATIENT, FAMILY_MEMBER, OTHER
2397 Subject *Feature `json:"subject,omitempty"`
2398 // TemporalAssessment: How this entity mention relates to the subject
2399 // temporally. Its value is one of: CURRENT, CLINICAL_HISTORY, FAMILY_HISTORY,
2400 // UPCOMING, ALLERGY
2401 TemporalAssessment *Feature `json:"temporalAssessment,omitempty"`
2402 // Text: text is the location of the entity mention in the document.
2403 Text *TextSpan `json:"text,omitempty"`
2404 // Type: The semantic type of the entity: UNKNOWN_ENTITY_TYPE, ALONE,
2405 // ANATOMICAL_STRUCTURE, ASSISTED_LIVING, BF_RESULT, BM_RESULT, BM_UNIT,
2406 // BM_VALUE, BODY_FUNCTION, BODY_MEASUREMENT, COMPLIANT, DOESNOT_FOLLOWUP,
2407 // FAMILY, FOLLOWSUP, LABORATORY_DATA, LAB_RESULT, LAB_UNIT, LAB_VALUE,
2408 // MEDICAL_DEVICE, MEDICINE, MED_DOSE, MED_DURATION, MED_FORM, MED_FREQUENCY,
2409 // MED_ROUTE, MED_STATUS, MED_STRENGTH, MED_TOTALDOSE, MED_UNIT, NON_COMPLIANT,
2410 // OTHER_LIVINGSTATUS, PROBLEM, PROCEDURE, PROCEDURE_RESULT, PROC_METHOD,
2411 // REASON_FOR_NONCOMPLIANCE, SEVERITY, SUBSTANCE_ABUSE, UNCLEAR_FOLLOWUP.
2412 Type string `json:"type,omitempty"`
2413 // ForceSendFields is a list of field names (e.g. "CertaintyAssessment") to
2414 // unconditionally include in API requests. By default, fields with empty or
2415 // default values are omitted from API requests. See
2416 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2417 // details.
2418 ForceSendFields []string `json:"-"`
2419 // NullFields is a list of field names (e.g. "CertaintyAssessment") to include
2420 // in API requests with the JSON null value. By default, fields with empty
2421 // values are omitted from API requests. See
2422 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2423 NullFields []string `json:"-"`
2424 }
2425
2426 func (s EntityMention) MarshalJSON() ([]byte, error) {
2427 type NoMethod EntityMention
2428 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2429 }
2430
2431 func (s *EntityMention) UnmarshalJSON(data []byte) error {
2432 type NoMethod EntityMention
2433 var s1 struct {
2434 Confidence gensupport.JSONFloat64 `json:"confidence"`
2435 *NoMethod
2436 }
2437 s1.NoMethod = (*NoMethod)(s)
2438 if err := json.Unmarshal(data, &s1); err != nil {
2439 return err
2440 }
2441 s.Confidence = float64(s1.Confidence)
2442 return nil
2443 }
2444
2445 // EntityMentionRelationship: Defines directed relationship from one entity
2446 // mention to another.
2447 type EntityMentionRelationship struct {
2448 // Confidence: The model's confidence in this annotation. A number between 0
2449 // and 1.
2450 Confidence float64 `json:"confidence,omitempty"`
2451 // ObjectId: object_id is the id of the object entity mention.
2452 ObjectId string `json:"objectId,omitempty"`
2453 // SubjectId: subject_id is the id of the subject entity mention.
2454 SubjectId string `json:"subjectId,omitempty"`
2455 // ForceSendFields is a list of field names (e.g. "Confidence") to
2456 // unconditionally include in API requests. By default, fields with empty or
2457 // default values are omitted from API requests. See
2458 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2459 // details.
2460 ForceSendFields []string `json:"-"`
2461 // NullFields is a list of field names (e.g. "Confidence") to include in API
2462 // requests with the JSON null value. By default, fields with empty values are
2463 // omitted from API requests. See
2464 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2465 NullFields []string `json:"-"`
2466 }
2467
2468 func (s EntityMentionRelationship) MarshalJSON() ([]byte, error) {
2469 type NoMethod EntityMentionRelationship
2470 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2471 }
2472
2473 func (s *EntityMentionRelationship) UnmarshalJSON(data []byte) error {
2474 type NoMethod EntityMentionRelationship
2475 var s1 struct {
2476 Confidence gensupport.JSONFloat64 `json:"confidence"`
2477 *NoMethod
2478 }
2479 s1.NoMethod = (*NoMethod)(s)
2480 if err := json.Unmarshal(data, &s1); err != nil {
2481 return err
2482 }
2483 s.Confidence = float64(s1.Confidence)
2484 return nil
2485 }
2486
2487 // EvaluateUserConsentsRequest: Evaluate a user's Consents for all matching
2488 // User data mappings. Note: User data mappings are indexed asynchronously,
2489 // causing slight delays between the time mappings are created or updated and
2490 // when they are included in EvaluateUserConsents results.
2491 type EvaluateUserConsentsRequest struct {
2492 // ConsentList: Optional. Specific Consents to evaluate the access request
2493 // against. These Consents must have the same `user_id` as the User data
2494 // mappings being evalauted, must exist in the current `consent_store`, and
2495 // must have a `state` of either `ACTIVE` or `DRAFT`. A maximum of 100 Consents
2496 // can be provided here. If unspecified, all `ACTIVE` unexpired Consents in the
2497 // current `consent_store` will be evaluated.
2498 ConsentList *ConsentList `json:"consentList,omitempty"`
2499 // PageSize: Optional. Limit on the number of User data mappings to return in a
2500 // single response. If not specified, 100 is used. May not be larger than 1000.
2501 PageSize int64 `json:"pageSize,omitempty"`
2502 // PageToken: Optional. Token to retrieve the next page of results, or empty to
2503 // get the first page.
2504 PageToken string `json:"pageToken,omitempty"`
2505 // RequestAttributes: Required. The values of request attributes associated
2506 // with this access request.
2507 RequestAttributes map[string]string `json:"requestAttributes,omitempty"`
2508 // ResourceAttributes: Optional. The values of resource attributes associated
2509 // with the resources being requested. If no values are specified, then all
2510 // resources are queried.
2511 ResourceAttributes map[string]string `json:"resourceAttributes,omitempty"`
2512 // ResponseView: Optional. The view for EvaluateUserConsentsResponse. If
2513 // unspecified, defaults to `BASIC` and returns `consented` as `TRUE` or
2514 // `FALSE`.
2515 //
2516 // Possible values:
2517 // "RESPONSE_VIEW_UNSPECIFIED" - No response view specified. The API will
2518 // default to the BASIC view.
2519 // "BASIC" - Only the `data_id` and `consented` fields are populated in the
2520 // response.
2521 // "FULL" - All fields within the response are populated. When set to `FULL`,
2522 // all `ACTIVE` Consents are evaluated even if a matching policy is found
2523 // during evaluation.
2524 ResponseView string `json:"responseView,omitempty"`
2525 // UserId: Required. User ID to evaluate consents for.
2526 UserId string `json:"userId,omitempty"`
2527 // ForceSendFields is a list of field names (e.g. "ConsentList") to
2528 // unconditionally include in API requests. By default, fields with empty or
2529 // default values are omitted from API requests. See
2530 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2531 // details.
2532 ForceSendFields []string `json:"-"`
2533 // NullFields is a list of field names (e.g. "ConsentList") to include in API
2534 // requests with the JSON null value. By default, fields with empty values are
2535 // omitted from API requests. See
2536 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2537 NullFields []string `json:"-"`
2538 }
2539
2540 func (s EvaluateUserConsentsRequest) MarshalJSON() ([]byte, error) {
2541 type NoMethod EvaluateUserConsentsRequest
2542 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2543 }
2544
2545 type EvaluateUserConsentsResponse struct {
2546 // NextPageToken: Token to retrieve the next page of results, or empty if there
2547 // are no more results in the list. This token is valid for 72 hours after it
2548 // is created.
2549 NextPageToken string `json:"nextPageToken,omitempty"`
2550 // Results: The consent evaluation result for each `data_id`.
2551 Results []*Result `json:"results,omitempty"`
2552
2553 // ServerResponse contains the HTTP response code and headers from the server.
2554 googleapi.ServerResponse `json:"-"`
2555 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
2556 // unconditionally include in API requests. By default, fields with empty or
2557 // default values are omitted from API requests. See
2558 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2559 // details.
2560 ForceSendFields []string `json:"-"`
2561 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
2562 // requests with the JSON null value. By default, fields with empty values are
2563 // omitted from API requests. See
2564 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2565 NullFields []string `json:"-"`
2566 }
2567
2568 func (s EvaluateUserConsentsResponse) MarshalJSON() ([]byte, error) {
2569 type NoMethod EvaluateUserConsentsResponse
2570 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2571 }
2572
2573 // ExplainDataAccessConsentInfo: The enforcing consent's metadata.
2574 type ExplainDataAccessConsentInfo struct {
2575 // CascadeOrigins: The compartment base resources that matched a cascading
2576 // policy. Each resource has the following format:
2577 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStor
2578 // es/{fhir_store_id}/fhir/{resource_type}/{resource_id}`
2579 CascadeOrigins []string `json:"cascadeOrigins,omitempty"`
2580 // ConsentResource: The resource name of this consent resource, in the format:
2581 // `projects/{project_id}/locations/{location}/datasets/{dataset_id}/fhirStores/
2582 // {fhir_store_id}/fhir/Consent/{resource_id}`.
2583 ConsentResource string `json:"consentResource,omitempty"`
2584 // EnforcementTime: Last enforcement timestamp of this consent resource.
2585 EnforcementTime string `json:"enforcementTime,omitempty"`
2586 // MatchingAccessorScopes: A list of all the matching accessor scopes of this
2587 // consent policy that enforced ExplainDataAccessConsentScope.accessor_scope.
2588 MatchingAccessorScopes []*ConsentAccessorScope `json:"matchingAccessorScopes,omitempty"`
2589 // PatientConsentOwner: The patient owning the consent (only applicable for
2590 // patient consents), in the format:
2591 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStor
2592 // es/{fhir_store_id}/fhir/Patient/{patient_id}`
2593 PatientConsentOwner string `json:"patientConsentOwner,omitempty"`
2594 // Type: The policy type of consent resource (e.g. PATIENT, ADMIN).
2595 //
2596 // Possible values:
2597 // "CONSENT_POLICY_TYPE_UNSPECIFIED" - Unspecified policy type.
2598 // "CONSENT_POLICY_TYPE_PATIENT" - Consent represent a patient consent.
2599 // "CONSENT_POLICY_TYPE_ADMIN" - Consent represent an admin consent.
2600 Type string `json:"type,omitempty"`
2601 // Variants: The consent's variant combinations. A single consent may have
2602 // multiple variants.
2603 //
2604 // Possible values:
2605 // "CONSENT_VARIANT_UNSPECIFIED" - Consent variant unspecified.
2606 // "CONSENT_VARIANT_STANDARD" - Consent is a standard patient or admin
2607 // consent.
2608 // "CONSENT_VARIANT_CASCADE" - Consent is a cascading consent.
2609 Variants []string `json:"variants,omitempty"`
2610 // ForceSendFields is a list of field names (e.g. "CascadeOrigins") to
2611 // unconditionally include in API requests. By default, fields with empty or
2612 // default values are omitted from API requests. See
2613 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2614 // details.
2615 ForceSendFields []string `json:"-"`
2616 // NullFields is a list of field names (e.g. "CascadeOrigins") to include in
2617 // API requests with the JSON null value. By default, fields with empty values
2618 // are omitted from API requests. See
2619 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2620 NullFields []string `json:"-"`
2621 }
2622
2623 func (s ExplainDataAccessConsentInfo) MarshalJSON() ([]byte, error) {
2624 type NoMethod ExplainDataAccessConsentInfo
2625 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2626 }
2627
2628 // ExplainDataAccessConsentScope: A single consent scope that provides info on
2629 // who has access to the requested resource scope for a particular purpose and
2630 // environment, enforced by which consent.
2631 type ExplainDataAccessConsentScope struct {
2632 // AccessorScope: The accessor scope that describes who can access, for what
2633 // purpose, and in which environment.
2634 AccessorScope *ConsentAccessorScope `json:"accessorScope,omitempty"`
2635 // Decision: Whether the current consent scope is permitted or denied access on
2636 // the requested resource.
2637 //
2638 // Possible values:
2639 // "CONSENT_DECISION_TYPE_UNSPECIFIED" - Unspecified consent decision type.
2640 // "CONSENT_DECISION_TYPE_PERMIT" - Consent permitted access.
2641 // "CONSENT_DECISION_TYPE_DENY" - Consent denied access.
2642 Decision string `json:"decision,omitempty"`
2643 // EnforcingConsents: Metadata of the consent resources that enforce the
2644 // consent scope's access.
2645 EnforcingConsents []*ExplainDataAccessConsentInfo `json:"enforcingConsents,omitempty"`
2646 // Exceptions: Other consent scopes that created exceptions within this scope.
2647 Exceptions []*ExplainDataAccessConsentScope `json:"exceptions,omitempty"`
2648 // ForceSendFields is a list of field names (e.g. "AccessorScope") to
2649 // unconditionally include in API requests. By default, fields with empty or
2650 // default values are omitted from API requests. See
2651 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2652 // details.
2653 ForceSendFields []string `json:"-"`
2654 // NullFields is a list of field names (e.g. "AccessorScope") to include in API
2655 // requests with the JSON null value. By default, fields with empty values are
2656 // omitted from API requests. See
2657 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2658 NullFields []string `json:"-"`
2659 }
2660
2661 func (s ExplainDataAccessConsentScope) MarshalJSON() ([]byte, error) {
2662 type NoMethod ExplainDataAccessConsentScope
2663 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2664 }
2665
2666 // ExplainDataAccessResponse: List of consent scopes that are applicable to the
2667 // explained access on a given resource.
2668 type ExplainDataAccessResponse struct {
2669 // ConsentScopes: List of applicable consent scopes. Sorted in order of actor
2670 // such that scopes belonging to the same actor will be adjacent to each other
2671 // in the list.
2672 ConsentScopes []*ExplainDataAccessConsentScope `json:"consentScopes,omitempty"`
2673 // Warning: Warnings associated with this response. It inform user with
2674 // exceeded scope limit errors.
2675 Warning string `json:"warning,omitempty"`
2676
2677 // ServerResponse contains the HTTP response code and headers from the server.
2678 googleapi.ServerResponse `json:"-"`
2679 // ForceSendFields is a list of field names (e.g. "ConsentScopes") to
2680 // unconditionally include in API requests. By default, fields with empty or
2681 // default values are omitted from API requests. See
2682 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2683 // details.
2684 ForceSendFields []string `json:"-"`
2685 // NullFields is a list of field names (e.g. "ConsentScopes") to include in API
2686 // requests with the JSON null value. By default, fields with empty values are
2687 // omitted from API requests. See
2688 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2689 NullFields []string `json:"-"`
2690 }
2691
2692 func (s ExplainDataAccessResponse) MarshalJSON() ([]byte, error) {
2693 type NoMethod ExplainDataAccessResponse
2694 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2695 }
2696
2697 // ExportDicomDataRequest: Exports data from the specified DICOM store. If a
2698 // given resource, such as a DICOM object with the same SOPInstance UID,
2699 // already exists in the output, it is overwritten with the version in the
2700 // source dataset. Exported DICOM data persists when the DICOM store from which
2701 // it was exported is deleted.
2702 type ExportDicomDataRequest struct {
2703 // BigqueryDestination: The BigQuery output destination. You can only export to
2704 // a BigQuery dataset that's in the same project as the DICOM store you're
2705 // exporting from. The Cloud Healthcare Service Agent requires two IAM roles on
2706 // the BigQuery location: `roles/bigquery.dataEditor` and
2707 // `roles/bigquery.jobUser`.
2708 BigqueryDestination *GoogleCloudHealthcareV1DicomBigQueryDestination `json:"bigqueryDestination,omitempty"`
2709 // GcsDestination: The Cloud Storage output destination. The Cloud Healthcare
2710 // Service Agent requires the `roles/storage.objectAdmin` Cloud IAM roles on
2711 // the Cloud Storage location.
2712 GcsDestination *GoogleCloudHealthcareV1DicomGcsDestination `json:"gcsDestination,omitempty"`
2713 // ForceSendFields is a list of field names (e.g. "BigqueryDestination") to
2714 // unconditionally include in API requests. By default, fields with empty or
2715 // default values are omitted from API requests. See
2716 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2717 // details.
2718 ForceSendFields []string `json:"-"`
2719 // NullFields is a list of field names (e.g. "BigqueryDestination") to include
2720 // in API requests with the JSON null value. By default, fields with empty
2721 // values are omitted from API requests. See
2722 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2723 NullFields []string `json:"-"`
2724 }
2725
2726 func (s ExportDicomDataRequest) MarshalJSON() ([]byte, error) {
2727 type NoMethod ExportDicomDataRequest
2728 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2729 }
2730
2731 // ExportDicomDataResponse: Returns additional information in regards to a
2732 // completed DICOM store export.
2733 type ExportDicomDataResponse struct {
2734 }
2735
2736 // ExportMessagesRequest: Request to schedule an export.
2737 type ExportMessagesRequest struct {
2738 // EndTime: The end of the range in `send_time` (MSH.7,
2739 // https://www.hl7.org/documentcenter/public_temp_2E58C1F9-1C23-BA17-0C6126475344DA9D/wg/conf/HL7MSH.htm)
2740 // to process. If not specified, the time when the export is scheduled is used.
2741 // This value has to come after the `start_time` defined below. Only messages
2742 // whose `send_time` lies in the range `start_time` (inclusive) to `end_time`
2743 // (exclusive) are exported.
2744 EndTime string `json:"endTime,omitempty"`
2745 // Filter: Restricts messages exported to those matching a filter, only
2746 // applicable to PubsubDestination and GcsDestination. The following syntax is
2747 // available: * A string field value can be written as text inside quotation
2748 // marks, for example "query text". The only valid relational operation for
2749 // text fields is equality (`=`), where text is searched within the field,
2750 // rather than having the field be equal to the text. For example, "Comment =
2751 // great" returns messages with `great` in the comment field. * A number field
2752 // value can be written as an integer, a decimal, or an exponential. The valid
2753 // relational operators for number fields are the equality operator (`=`),
2754 // along with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note
2755 // that there is no inequality (`!=`) operator. You can prepend the `NOT`
2756 // operator to an expression to negate it. * A date field value must be written
2757 // in the `yyyy-mm-dd` format. Fields with date and time use the RFC3339 time
2758 // format. Leading zeros are required for one-digit months and days. The valid
2759 // relational operators for date fields are the equality operator (`=`) , along
2760 // with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that
2761 // there is no inequality (`!=`) operator. You can prepend the `NOT` operator
2762 // to an expression to negate it. * Multiple field query expressions can be
2763 // combined in one query by adding `AND` or `OR` operators between the
2764 // expressions. If a boolean operator appears within a quoted string, it is not
2765 // treated as special, and is just another part of the character string to be
2766 // matched. You can prepend the `NOT` operator to an expression to negate it.
2767 // The following fields and functions are available for filtering: *
2768 // `message_type`, from the MSH-9.1 field. For example, `NOT message_type =
2769 // "ADT". * `send_date` or `sendDate`, the `yyyy-mm-dd` date the message was
2770 // sent in the dataset's time_zone, from the MSH-7 segment. For example,
2771 // `send_date < "2017-01-02". * `send_time`, the timestamp when the message
2772 // was sent, using the RFC3339 time format for comparisons, from the MSH-7
2773 // segment. For example, `send_time < "2017-01-02T00:00:00-05:00". *
2774 // `create_time`, the timestamp when the message was created in the HL7v2
2775 // store. Use the RFC3339 time format for comparisons. For example,
2776 // `create_time < "2017-01-02T00:00:00-05:00". * `send_facility`, the care
2777 // center that the message came from, from the MSH-4 segment. For example,
2778 // `send_facility = "ABC". Note: The filter will be applied to every message
2779 // in the HL7v2 store whose `send_time` lies in the range defined by the
2780 // `start_time` and the `end_time`. Even if the filter only matches a small set
2781 // of messages, the export operation can still take a long time to finish when
2782 // a lot of messages are between the specified `start_time` and `end_time`
2783 // range.
2784 Filter string `json:"filter,omitempty"`
2785 // GcsDestination: Export to a Cloud Storage destination.
2786 GcsDestination *GcsDestination `json:"gcsDestination,omitempty"`
2787 // PubsubDestination: Export messages to a Pub/Sub topic.
2788 PubsubDestination *PubsubDestination `json:"pubsubDestination,omitempty"`
2789 // StartTime: The start of the range in `send_time` (MSH.7,
2790 // https://www.hl7.org/documentcenter/public_temp_2E58C1F9-1C23-BA17-0C6126475344DA9D/wg/conf/HL7MSH.htm)
2791 // to process. If not specified, the UNIX epoch (1970-01-01T00:00:00Z) is used.
2792 // This value has to come before the `end_time` defined below. Only messages
2793 // whose `send_time` lies in the range `start_time` (inclusive) to `end_time`
2794 // (exclusive) are exported.
2795 StartTime string `json:"startTime,omitempty"`
2796 // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally
2797 // include in API requests. By default, fields with empty or default values are
2798 // omitted from API requests. See
2799 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2800 // details.
2801 ForceSendFields []string `json:"-"`
2802 // NullFields is a list of field names (e.g. "EndTime") to include in API
2803 // requests with the JSON null value. By default, fields with empty values are
2804 // omitted from API requests. See
2805 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2806 NullFields []string `json:"-"`
2807 }
2808
2809 func (s ExportMessagesRequest) MarshalJSON() ([]byte, error) {
2810 type NoMethod ExportMessagesRequest
2811 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2812 }
2813
2814 // ExportMessagesResponse: Final response for the export operation. This
2815 // structure is included in the response to describe the detailed outcome.
2816 type ExportMessagesResponse struct {
2817 }
2818
2819 // ExportResourcesRequest: Request to export resources.
2820 type ExportResourcesRequest struct {
2821 // Since: If provided, only resources updated after this time are exported. The
2822 // time uses the format YYYY-MM-DDThh:mm:ss.sss+zz:zz. For example,
2823 // `2015-02-07T13:28:17.239+02:00` or `2017-01-01T00:00:00Z`. The time must be
2824 // specified to the second and include a time zone.
2825 Since string `json:"_since,omitempty"`
2826 // Type: String of comma-delimited FHIR resource types. If provided, only
2827 // resources of the specified resource type(s) are exported.
2828 Type string `json:"_type,omitempty"`
2829 // BigqueryDestination: The BigQuery output destination. The Cloud Healthcare
2830 // Service Agent requires two IAM roles on the BigQuery location:
2831 // `roles/bigquery.dataEditor` and `roles/bigquery.jobUser`. The output is one
2832 // BigQuery table per resource type. Unlike when setting `BigQueryDestination`
2833 // for `StreamConfig`, `ExportResources` does not create BigQuery views.
2834 BigqueryDestination *GoogleCloudHealthcareV1FhirBigQueryDestination `json:"bigqueryDestination,omitempty"`
2835 // GcsDestination: The Cloud Storage output destination. The Healthcare Service
2836 // Agent account requires the `roles/storage.objectAdmin` role on the Cloud
2837 // Storage location. The exported outputs are organized by FHIR resource types.
2838 // The server creates one object per resource type. Each object contains
2839 // newline delimited JSON, and each line is a FHIR resource.
2840 GcsDestination *GoogleCloudHealthcareV1FhirGcsDestination `json:"gcsDestination,omitempty"`
2841 // ForceSendFields is a list of field names (e.g. "Since") to unconditionally
2842 // include in API requests. By default, fields with empty or default values are
2843 // omitted from API requests. See
2844 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2845 // details.
2846 ForceSendFields []string `json:"-"`
2847 // NullFields is a list of field names (e.g. "Since") to include in API
2848 // requests with the JSON null value. By default, fields with empty values are
2849 // omitted from API requests. See
2850 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2851 NullFields []string `json:"-"`
2852 }
2853
2854 func (s ExportResourcesRequest) MarshalJSON() ([]byte, error) {
2855 type NoMethod ExportResourcesRequest
2856 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2857 }
2858
2859 // ExportResourcesResponse: Response when all resources export successfully.
2860 // This structure is included in the response to describe the detailed outcome
2861 // after the operation finishes successfully.
2862 type ExportResourcesResponse struct {
2863 }
2864
2865 // Expr: Represents a textual expression in the Common Expression Language
2866 // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics
2867 // of CEL are documented at https://github.com/google/cel-spec. Example
2868 // (Comparison): title: "Summary size limit" description: "Determines if a
2869 // summary is less than 100 chars" expression: "document.summary.size() < 100"
2870 // Example (Equality): title: "Requestor is owner" description: "Determines if
2871 // requestor is the document owner" expression: "document.owner ==
2872 // request.auth.claims.email" Example (Logic): title: "Public documents"
2873 // description: "Determine whether the document should be publicly visible"
2874 // expression: "document.type != 'private' && document.type != 'internal'"
2875 // Example (Data Manipulation): title: "Notification string" description:
2876 // "Create a notification string with a timestamp." expression: "'New message
2877 // received at ' + string(document.create_time)" The exact variables and
2878 // functions that may be referenced within an expression are determined by the
2879 // service that evaluates it. See the service documentation for additional
2880 // information.
2881 type Expr struct {
2882 // Description: Optional. Description of the expression. This is a longer text
2883 // which describes the expression, e.g. when hovered over it in a UI.
2884 Description string `json:"description,omitempty"`
2885 // Expression: Textual representation of an expression in Common Expression
2886 // Language syntax.
2887 Expression string `json:"expression,omitempty"`
2888 // Location: Optional. String indicating the location of the expression for
2889 // error reporting, e.g. a file name and a position in the file.
2890 Location string `json:"location,omitempty"`
2891 // Title: Optional. Title for the expression, i.e. a short string describing
2892 // its purpose. This can be used e.g. in UIs which allow to enter the
2893 // expression.
2894 Title string `json:"title,omitempty"`
2895 // ForceSendFields is a list of field names (e.g. "Description") to
2896 // unconditionally include in API requests. By default, fields with empty or
2897 // default values are omitted from API requests. See
2898 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2899 // details.
2900 ForceSendFields []string `json:"-"`
2901 // NullFields is a list of field names (e.g. "Description") to include in API
2902 // requests with the JSON null value. By default, fields with empty values are
2903 // omitted from API requests. See
2904 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2905 NullFields []string `json:"-"`
2906 }
2907
2908 func (s Expr) MarshalJSON() ([]byte, error) {
2909 type NoMethod Expr
2910 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2911 }
2912
2913 // Feature: A feature of an entity mention.
2914 type Feature struct {
2915 // Confidence: The model's confidence in this feature annotation. A number
2916 // between 0 and 1.
2917 Confidence float64 `json:"confidence,omitempty"`
2918 // Value: The value of this feature annotation. Its range depends on the type
2919 // of the feature.
2920 Value string `json:"value,omitempty"`
2921 // ForceSendFields is a list of field names (e.g. "Confidence") to
2922 // unconditionally include in API requests. By default, fields with empty or
2923 // default values are omitted from API requests. See
2924 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2925 // details.
2926 ForceSendFields []string `json:"-"`
2927 // NullFields is a list of field names (e.g. "Confidence") to include in API
2928 // requests with the JSON null value. By default, fields with empty values are
2929 // omitted from API requests. See
2930 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2931 NullFields []string `json:"-"`
2932 }
2933
2934 func (s Feature) MarshalJSON() ([]byte, error) {
2935 type NoMethod Feature
2936 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2937 }
2938
2939 func (s *Feature) UnmarshalJSON(data []byte) error {
2940 type NoMethod Feature
2941 var s1 struct {
2942 Confidence gensupport.JSONFloat64 `json:"confidence"`
2943 *NoMethod
2944 }
2945 s1.NoMethod = (*NoMethod)(s)
2946 if err := json.Unmarshal(data, &s1); err != nil {
2947 return err
2948 }
2949 s.Confidence = float64(s1.Confidence)
2950 return nil
2951 }
2952
2953 // FhirConfig: Specifies how to handle de-identification of a FHIR store.
2954 type FhirConfig struct {
2955 // DefaultKeepExtensions: Optional. The behaviour for handling FHIR extensions
2956 // that aren't otherwise specified for de-identification. If true, all
2957 // extensions are preserved during de-identification by default. If false or
2958 // unspecified, all extensions are removed during de-identification by default.
2959 DefaultKeepExtensions bool `json:"defaultKeepExtensions,omitempty"`
2960 // FieldMetadataList: Optional. Specifies FHIR paths to match and how to
2961 // transform them. Any field that is not matched by a FieldMetadata is passed
2962 // through to the output dataset unmodified. All extensions will be processed
2963 // according to `default_keep_extensions`.
2964 FieldMetadataList []*FieldMetadata `json:"fieldMetadataList,omitempty"`
2965 // ForceSendFields is a list of field names (e.g. "DefaultKeepExtensions") to
2966 // unconditionally include in API requests. By default, fields with empty or
2967 // default values are omitted from API requests. See
2968 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2969 // details.
2970 ForceSendFields []string `json:"-"`
2971 // NullFields is a list of field names (e.g. "DefaultKeepExtensions") to
2972 // include in API requests with the JSON null value. By default, fields with
2973 // empty values are omitted from API requests. See
2974 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2975 NullFields []string `json:"-"`
2976 }
2977
2978 func (s FhirConfig) MarshalJSON() ([]byte, error) {
2979 type NoMethod FhirConfig
2980 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2981 }
2982
2983 // FhirFilter: Filter configuration.
2984 type FhirFilter struct {
2985 // Resources: List of resources to include in the output. If this list is empty
2986 // or not specified, all resources are included in the output.
2987 Resources *Resources `json:"resources,omitempty"`
2988 // ForceSendFields is a list of field names (e.g. "Resources") to
2989 // unconditionally include in API requests. By default, fields with empty or
2990 // default values are omitted from API requests. See
2991 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2992 // details.
2993 ForceSendFields []string `json:"-"`
2994 // NullFields is a list of field names (e.g. "Resources") to include in API
2995 // requests with the JSON null value. By default, fields with empty values are
2996 // omitted from API requests. See
2997 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2998 NullFields []string `json:"-"`
2999 }
3000
3001 func (s FhirFilter) MarshalJSON() ([]byte, error) {
3002 type NoMethod FhirFilter
3003 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3004 }
3005
3006 // FhirNotificationConfig: Contains the configuration for FHIR notifications.
3007 type FhirNotificationConfig struct {
3008 // PubsubTopic: Optional. The Pub/Sub (https://cloud.google.com/pubsub/docs/)
3009 // topic that notifications of changes are published on. Supplied by the
3010 // client. The notification is a `PubsubMessage` with the following fields: *
3011 // `PubsubMessage.Data` contains the resource name. * `PubsubMessage.MessageId`
3012 // is the ID of this notification. It is guaranteed to be unique within the
3013 // topic. * `PubsubMessage.PublishTime` is the time when the message was
3014 // published. Note that notifications are only sent if the topic is non-empty.
3015 // Topic names (https://cloud.google.com/pubsub/docs/overview#names) must be
3016 // scoped to a project. The Cloud Healthcare API service account,
3017 // [email protected], must have publisher
3018 // permissions on the given Pub/Sub topic. Not having adequate permissions
3019 // causes the calls that send notifications to fail
3020 // (https://cloud.google.com/healthcare-api/docs/permissions-healthcare-api-gcp-products#dicom_fhir_and_hl7v2_store_cloud_pubsub_permissions).
3021 // If a notification can't be published to Pub/Sub, errors are logged to Cloud
3022 // Logging. For more information, see Viewing error logs in Cloud Logging
3023 // (https://cloud.google.com/healthcare-api/docs/how-tos/logging).
3024 PubsubTopic string `json:"pubsubTopic,omitempty"`
3025 // SendFullResource: Optional. Whether to send full FHIR resource to this
3026 // Pub/Sub topic. The default value is false.
3027 SendFullResource bool `json:"sendFullResource,omitempty"`
3028 // SendPreviousResourceOnDelete: Optional. Whether to send full FHIR resource
3029 // to this Pub/Sub topic for deleting FHIR resource. The default value is
3030 // false. Note that setting this to true does not guarantee that all previous
3031 // resources will be sent in the format of full FHIR resource. When a resource
3032 // change is too large or during heavy traffic, only the resource name will be
3033 // sent. Clients should always check the "payloadType" label from a Pub/Sub
3034 // message to determine whether it needs to fetch the full previous resource as
3035 // a separate operation.
3036 SendPreviousResourceOnDelete bool `json:"sendPreviousResourceOnDelete,omitempty"`
3037 // ForceSendFields is a list of field names (e.g. "PubsubTopic") to
3038 // unconditionally include in API requests. By default, fields with empty or
3039 // default values are omitted from API requests. See
3040 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3041 // details.
3042 ForceSendFields []string `json:"-"`
3043 // NullFields is a list of field names (e.g. "PubsubTopic") to include in API
3044 // requests with the JSON null value. By default, fields with empty values are
3045 // omitted from API requests. See
3046 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3047 NullFields []string `json:"-"`
3048 }
3049
3050 func (s FhirNotificationConfig) MarshalJSON() ([]byte, error) {
3051 type NoMethod FhirNotificationConfig
3052 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3053 }
3054
3055 // FhirStore: Represents a FHIR store.
3056 type FhirStore struct {
3057 // BulkExportGcsDestination: Optional. FHIR bulk export exports resources to
3058 // the specified Cloud Storage destination. A Cloud Storage destination is a
3059 // URI for a Cloud Storage directory where result files will be written. Only
3060 // used in the spec-defined bulk $export methods. The Cloud Healthcare Service
3061 // Agent requires the `roles/storage.objectAdmin` Cloud IAM role on the
3062 // destination.
3063 BulkExportGcsDestination *BulkExportGcsDestination `json:"bulkExportGcsDestination,omitempty"`
3064 // ComplexDataTypeReferenceParsing: Optional. Enable parsing of references
3065 // within complex FHIR data types such as Extensions. If this value is set to
3066 // ENABLED, then features like referential integrity and Bundle reference
3067 // rewriting apply to all references. If this flag has not been specified the
3068 // behavior of the FHIR store will not change, references in complex data types
3069 // will not be parsed. New stores will have this value set to ENABLED after a
3070 // notification period. Warning: turning on this flag causes processing
3071 // existing resources to fail if they contain references to non-existent
3072 // resources. Cannot be disabled in R5.
3073 //
3074 // Possible values:
3075 // "COMPLEX_DATA_TYPE_REFERENCE_PARSING_UNSPECIFIED" - No parsing behavior
3076 // specified. This is the same as DISABLED for backwards compatibility.
3077 // "DISABLED" - References in complex data types are ignored.
3078 // "ENABLED" - References in complex data types are parsed.
3079 ComplexDataTypeReferenceParsing string `json:"complexDataTypeReferenceParsing,omitempty"`
3080 // ConsentConfig: Optional. Specifies whether this store has consent
3081 // enforcement. Not available for DSTU2 FHIR version due to absence of Consent
3082 // resources. Not supported for R5 FHIR version.
3083 ConsentConfig *ConsentConfig `json:"consentConfig,omitempty"`
3084 // DefaultSearchHandlingStrict: Optional. If true, overrides the default search
3085 // behavior for this FHIR store to `handling=strict` which returns an error for
3086 // unrecognized search parameters. If false, uses the FHIR specification
3087 // default `handling=lenient` which ignores unrecognized search parameters. The
3088 // handling can always be changed from the default on an individual API call by
3089 // setting the HTTP header `Prefer: handling=strict` or `Prefer:
3090 // handling=lenient`. Defaults to false.
3091 DefaultSearchHandlingStrict bool `json:"defaultSearchHandlingStrict,omitempty"`
3092 // DisableReferentialIntegrity: Immutable. Whether to disable referential
3093 // integrity in this FHIR store. This field is immutable after FHIR store
3094 // creation. The default value is false, meaning that the API enforces
3095 // referential integrity and fails the requests that result in inconsistent
3096 // state in the FHIR store. When this field is set to true, the API skips
3097 // referential integrity checks. Consequently, operations that rely on
3098 // references, such as GetPatientEverything, do not return all the results if
3099 // broken references exist.
3100 DisableReferentialIntegrity bool `json:"disableReferentialIntegrity,omitempty"`
3101 // DisableResourceVersioning: Immutable. Whether to disable resource versioning
3102 // for this FHIR store. This field can not be changed after the creation of
3103 // FHIR store. If set to false, all write operations cause historical versions
3104 // to be recorded automatically. The historical versions can be fetched through
3105 // the history APIs, but cannot be updated. If set to true, no historical
3106 // versions are kept. The server sends errors for attempts to read the
3107 // historical versions. Defaults to false.
3108 DisableResourceVersioning bool `json:"disableResourceVersioning,omitempty"`
3109 // EnableUpdateCreate: Optional. Whether this FHIR store has the updateCreate
3110 // capability
3111 // (https://www.hl7.org/fhir/capabilitystatement-definitions.html#CapabilityStatement.rest.resource.updateCreate).
3112 // This determines if the client can use an Update operation to create a new
3113 // resource with a client-specified ID. If false, all IDs are server-assigned
3114 // through the Create operation and attempts to update a non-existent resource
3115 // return errors. It is strongly advised not to include or encode any sensitive
3116 // data such as patient identifiers in client-specified resource IDs. Those IDs
3117 // are part of the FHIR resource path recorded in Cloud audit logs and Pub/Sub
3118 // notifications. Those IDs can also be contained in reference fields within
3119 // other resources. Defaults to false.
3120 EnableUpdateCreate bool `json:"enableUpdateCreate,omitempty"`
3121 // Labels: User-supplied key-value pairs used to organize FHIR stores. Label
3122 // keys must be between 1 and 63 characters long, have a UTF-8 encoding of
3123 // maximum 128 bytes, and must conform to the following PCRE regular
3124 // expression: \p{Ll}\p{Lo}{0,62} Label values are optional, must be between 1
3125 // and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must
3126 // conform to the following PCRE regular expression:
3127 // [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64 labels can be associated with a
3128 // given store.
3129 Labels map[string]string `json:"labels,omitempty"`
3130 // Name: Output only. Identifier. Resource name of the FHIR store, of the form
3131 // `projects/{project_id}/locations/{location}/datasets/{dataset_id}/fhirStores/
3132 // {fhir_store_id}`.
3133 Name string `json:"name,omitempty"`
3134 // NotificationConfig: Deprecated. Use `notification_configs` instead. If
3135 // non-empty, publish all resource modifications of this FHIR store to this
3136 // destination. The Pub/Sub message attributes contain a map with a string
3137 // describing the action that has triggered the notification. For example,
3138 // "action":"CreateResource". Not supported in R5. Use `notification_configs`
3139 // instead.
3140 NotificationConfig *NotificationConfig `json:"notificationConfig,omitempty"`
3141 // NotificationConfigs: Optional. Specifies where and whether to send
3142 // notifications upon changes to a FHIR store.
3143 NotificationConfigs []*FhirNotificationConfig `json:"notificationConfigs,omitempty"`
3144 // StreamConfigs: Optional. A list of streaming configs that configure the
3145 // destinations of streaming export for every resource mutation in this FHIR
3146 // store. Each store is allowed to have up to 10 streaming configs. After a new
3147 // config is added, the next resource mutation is streamed to the new location
3148 // in addition to the existing ones. When a location is removed from the list,
3149 // the server stops streaming to that location. Before adding a new config, you
3150 // must add the required `bigquery.dataEditor`
3151 // (https://cloud.google.com/bigquery/docs/access-control#bigquery.dataEditor)
3152 // role to your project's **Cloud Healthcare Service Agent** service account
3153 // (https://cloud.google.com/iam/docs/service-accounts). Some lag (typically on
3154 // the order of dozens of seconds) is expected before the results show up in
3155 // the streaming destination.
3156 StreamConfigs []*StreamConfig `json:"streamConfigs,omitempty"`
3157 // ValidationConfig: Optional. Configuration for how to validate incoming FHIR
3158 // resources against configured profiles.
3159 ValidationConfig *ValidationConfig `json:"validationConfig,omitempty"`
3160 // Version: Required. Immutable. The FHIR specification version that this FHIR
3161 // store supports natively. This field is immutable after store creation.
3162 // Requests are rejected if they contain FHIR resources of a different version.
3163 // Version is required for every FHIR store.
3164 //
3165 // Possible values:
3166 // "VERSION_UNSPECIFIED" - Users must specify a version on store creation or
3167 // an error is returned.
3168 // "DSTU2" - Draft Standard for Trial Use, [Release
3169 // 2](https://www.hl7.org/fhir/DSTU2)
3170 // "STU3" - Standard for Trial Use, [Release
3171 // 3](https://www.hl7.org/fhir/STU3)
3172 // "R4" - [Release 4](https://www.hl7.org/fhir/R4)
3173 // "R5" - [Release 5](https://www.hl7.org/fhir/R5)
3174 Version string `json:"version,omitempty"`
3175
3176 // ServerResponse contains the HTTP response code and headers from the server.
3177 googleapi.ServerResponse `json:"-"`
3178 // ForceSendFields is a list of field names (e.g. "BulkExportGcsDestination")
3179 // to unconditionally include in API requests. By default, fields with empty or
3180 // default values are omitted from API requests. See
3181 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3182 // details.
3183 ForceSendFields []string `json:"-"`
3184 // NullFields is a list of field names (e.g. "BulkExportGcsDestination") to
3185 // include in API requests with the JSON null value. By default, fields with
3186 // empty values are omitted from API requests. See
3187 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3188 NullFields []string `json:"-"`
3189 }
3190
3191 func (s FhirStore) MarshalJSON() ([]byte, error) {
3192 type NoMethod FhirStore
3193 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3194 }
3195
3196 // FhirStoreMetric: Count of resources and total storage size by type for a
3197 // given FHIR store.
3198 type FhirStoreMetric struct {
3199 // Count: The total count of FHIR resources in the store of this resource type.
3200 Count int64 `json:"count,omitempty,string"`
3201 // ResourceType: The FHIR resource type this metric applies to.
3202 ResourceType string `json:"resourceType,omitempty"`
3203 // StructuredStorageSizeBytes: The total amount of structured storage used by
3204 // FHIR resources of this resource type in the store.
3205 StructuredStorageSizeBytes int64 `json:"structuredStorageSizeBytes,omitempty,string"`
3206 // VersionedStorageSizeBytes: The total amount of versioned storage used by
3207 // versioned FHIR resources of this resource type in the store.
3208 VersionedStorageSizeBytes int64 `json:"versionedStorageSizeBytes,omitempty,string"`
3209 // ForceSendFields is a list of field names (e.g. "Count") to unconditionally
3210 // include in API requests. By default, fields with empty or default values are
3211 // omitted from API requests. See
3212 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3213 // details.
3214 ForceSendFields []string `json:"-"`
3215 // NullFields is a list of field names (e.g. "Count") to include in API
3216 // requests with the JSON null value. By default, fields with empty values are
3217 // omitted from API requests. See
3218 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3219 NullFields []string `json:"-"`
3220 }
3221
3222 func (s FhirStoreMetric) MarshalJSON() ([]byte, error) {
3223 type NoMethod FhirStoreMetric
3224 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3225 }
3226
3227 // FhirStoreMetrics: List of metrics for a given FHIR store.
3228 type FhirStoreMetrics struct {
3229 // Metrics: List of FhirStoreMetric by resource type.
3230 Metrics []*FhirStoreMetric `json:"metrics,omitempty"`
3231 // Name: The resource name of the FHIR store to get metrics for, in the format
3232 // `projects/{project_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}`.
3233 Name string `json:"name,omitempty"`
3234
3235 // ServerResponse contains the HTTP response code and headers from the server.
3236 googleapi.ServerResponse `json:"-"`
3237 // ForceSendFields is a list of field names (e.g. "Metrics") to unconditionally
3238 // include in API requests. By default, fields with empty or default values are
3239 // omitted from API requests. See
3240 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3241 // details.
3242 ForceSendFields []string `json:"-"`
3243 // NullFields is a list of field names (e.g. "Metrics") to include in API
3244 // requests with the JSON null value. By default, fields with empty values are
3245 // omitted from API requests. See
3246 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3247 NullFields []string `json:"-"`
3248 }
3249
3250 func (s FhirStoreMetrics) MarshalJSON() ([]byte, error) {
3251 type NoMethod FhirStoreMetrics
3252 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3253 }
3254
3255 // Field: A (sub) field of a type.
3256 type Field struct {
3257 // MaxOccurs: The maximum number of times this field can be repeated. 0 or -1
3258 // means unbounded.
3259 MaxOccurs int64 `json:"maxOccurs,omitempty"`
3260 // MinOccurs: The minimum number of times this field must be present/repeated.
3261 MinOccurs int64 `json:"minOccurs,omitempty"`
3262 // Name: The name of the field. For example, "PID-1" or just "1".
3263 Name string `json:"name,omitempty"`
3264 // Table: The HL7v2 table this field refers to. For example, PID-15 (Patient's
3265 // Primary Language) usually refers to table "0296".
3266 Table string `json:"table,omitempty"`
3267 // Type: The type of this field. A Type with this name must be defined in an
3268 // Hl7TypesConfig.
3269 Type string `json:"type,omitempty"`
3270 // ForceSendFields is a list of field names (e.g. "MaxOccurs") to
3271 // unconditionally include in API requests. By default, fields with empty or
3272 // default values are omitted from API requests. See
3273 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3274 // details.
3275 ForceSendFields []string `json:"-"`
3276 // NullFields is a list of field names (e.g. "MaxOccurs") to include in API
3277 // requests with the JSON null value. By default, fields with empty values are
3278 // omitted from API requests. See
3279 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3280 NullFields []string `json:"-"`
3281 }
3282
3283 func (s Field) MarshalJSON() ([]byte, error) {
3284 type NoMethod Field
3285 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3286 }
3287
3288 // FieldMetadata: Specifies FHIR paths to match, and how to handle
3289 // de-identification of matching fields.
3290 type FieldMetadata struct {
3291 // Action: Optional. Deidentify action for one field.
3292 //
3293 // Possible values:
3294 // "ACTION_UNSPECIFIED" - No action specified. Defaults to DO_NOT_TRANSFORM.
3295 // "TRANSFORM" - Transform the entire field.
3296 // "INSPECT_AND_TRANSFORM" - Inspect and transform any found PHI.
3297 // "DO_NOT_TRANSFORM" - Do not transform.
3298 Action string `json:"action,omitempty"`
3299 // Paths: Optional. List of paths to FHIR fields to be redacted. Each path is a
3300 // period-separated list where each component is either a field name or FHIR
3301 // type name, for example: Patient, HumanName. For "choice" types (those
3302 // defined in the FHIR spec with the form: field[x]) we use two separate
3303 // components. For example, "deceasedAge.unit" is matched by
3304 // "Deceased.Age.unit". Supported types are: AdministrativeGenderCode,
3305 // Base64Binary, Boolean, Code, Date, DateTime, Decimal, HumanName, Id,
3306 // Instant, Integer, LanguageCode, Markdown, Oid, PositiveInt, String,
3307 // UnsignedInt, Uri, Uuid, Xhtml.
3308 Paths []string `json:"paths,omitempty"`
3309 // ForceSendFields is a list of field names (e.g. "Action") to unconditionally
3310 // include in API requests. By default, fields with empty or default values are
3311 // omitted from API requests. See
3312 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3313 // details.
3314 ForceSendFields []string `json:"-"`
3315 // NullFields is a list of field names (e.g. "Action") to include in API
3316 // requests with the JSON null value. By default, fields with empty values are
3317 // omitted from API requests. See
3318 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3319 NullFields []string `json:"-"`
3320 }
3321
3322 func (s FieldMetadata) MarshalJSON() ([]byte, error) {
3323 type NoMethod FieldMetadata
3324 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3325 }
3326
3327 // GcsDestination: The Cloud Storage output destination. The Cloud Healthcare
3328 // Service Agent requires the `roles/storage.objectAdmin` Cloud IAM roles on
3329 // the Cloud Storage location.
3330 type GcsDestination struct {
3331 // ContentStructure: The format of the exported HL7v2 message files.
3332 //
3333 // Possible values:
3334 // "CONTENT_STRUCTURE_UNSPECIFIED" - If the content structure is not
3335 // specified, the default value `MESSAGE_JSON` will be used.
3336 // "MESSAGE_JSON" - Messages are printed using the JSON format returned from
3337 // the `GetMessage` API. Messages are delimited with newlines.
3338 ContentStructure string `json:"contentStructure,omitempty"`
3339 // MessageView: Specifies the parts of the Message resource to include in the
3340 // export. If not specified, FULL is used.
3341 //
3342 // Possible values:
3343 // "MESSAGE_VIEW_UNSPECIFIED" - Not specified, equivalent to FULL.
3344 // "RAW_ONLY" - Server responses include all the message fields except
3345 // parsed_data field, and schematized_data fields.
3346 // "PARSED_ONLY" - Server responses include all the message fields except
3347 // data field, and schematized_data fields.
3348 // "FULL" - Server responses include all the message fields.
3349 // "SCHEMATIZED_ONLY" - Server responses include all the message fields
3350 // except data and parsed_data fields.
3351 // "BASIC" - Server responses include only the name field.
3352 MessageView string `json:"messageView,omitempty"`
3353 // UriPrefix: URI of an existing Cloud Storage directory where the server
3354 // writes result files, in the format
3355 // `gs://{bucket-id}/{path/to/destination/dir}`. If there is no trailing slash,
3356 // the service appends one when composing the object path.
3357 UriPrefix string `json:"uriPrefix,omitempty"`
3358 // ForceSendFields is a list of field names (e.g. "ContentStructure") to
3359 // unconditionally include in API requests. By default, fields with empty or
3360 // default values are omitted from API requests. See
3361 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3362 // details.
3363 ForceSendFields []string `json:"-"`
3364 // NullFields is a list of field names (e.g. "ContentStructure") to include in
3365 // API requests with the JSON null value. By default, fields with empty values
3366 // are omitted from API requests. See
3367 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3368 NullFields []string `json:"-"`
3369 }
3370
3371 func (s GcsDestination) MarshalJSON() ([]byte, error) {
3372 type NoMethod GcsDestination
3373 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3374 }
3375
3376 // GcsSource: Specifies the configuration for importing data from Cloud
3377 // Storage.
3378 type GcsSource struct {
3379 // Uri: Points to a Cloud Storage URI containing file(s) to import. The URI
3380 // must be in the following format: `gs://{bucket_id}/{object_id}`. The URI can
3381 // include wildcards in `object_id` and thus identify multiple files. Supported
3382 // wildcards: * `*` to match 0 or more non-separator characters * `**` to match
3383 // 0 or more characters (including separators). Must be used at the end of a
3384 // path and with no other wildcards in the path. Can also be used with a file
3385 // extension (such as .ndjson), which imports all files with the extension in
3386 // the specified directory and its sub-directories. For example,
3387 // `gs://my-bucket/my-directory/**.ndjson` imports all files with `.ndjson`
3388 // extensions in `my-directory/` and its sub-directories. * `?` to match 1
3389 // character Files matching the wildcard are expected to contain content only,
3390 // no metadata.
3391 Uri string `json:"uri,omitempty"`
3392 // ForceSendFields is a list of field names (e.g. "Uri") to unconditionally
3393 // include in API requests. By default, fields with empty or default values are
3394 // omitted from API requests. See
3395 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3396 // details.
3397 ForceSendFields []string `json:"-"`
3398 // NullFields is a list of field names (e.g. "Uri") to include in API requests
3399 // with the JSON null value. By default, fields with empty values are omitted
3400 // from API requests. See
3401 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3402 NullFields []string `json:"-"`
3403 }
3404
3405 func (s GcsSource) MarshalJSON() ([]byte, error) {
3406 type NoMethod GcsSource
3407 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3408 }
3409
3410 // GoogleCloudHealthcareV1ConsentGcsDestination: The Cloud Storage location for
3411 // export.
3412 type GoogleCloudHealthcareV1ConsentGcsDestination struct {
3413 // UriPrefix: URI for a Cloud Storage directory where the server writes result
3414 // files, in the format `gs://{bucket-id}/{path/to/destination/dir}`. If there
3415 // is no trailing slash, the service appends one when composing the object
3416 // path. The user is responsible for creating the Cloud Storage bucket and
3417 // directory referenced in `uri_prefix`.
3418 UriPrefix string `json:"uriPrefix,omitempty"`
3419 // ForceSendFields is a list of field names (e.g. "UriPrefix") to
3420 // unconditionally include in API requests. By default, fields with empty or
3421 // default values are omitted from API requests. See
3422 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3423 // details.
3424 ForceSendFields []string `json:"-"`
3425 // NullFields is a list of field names (e.g. "UriPrefix") to include in API
3426 // requests with the JSON null value. By default, fields with empty values are
3427 // omitted from API requests. See
3428 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3429 NullFields []string `json:"-"`
3430 }
3431
3432 func (s GoogleCloudHealthcareV1ConsentGcsDestination) MarshalJSON() ([]byte, error) {
3433 type NoMethod GoogleCloudHealthcareV1ConsentGcsDestination
3434 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3435 }
3436
3437 // GoogleCloudHealthcareV1ConsentPolicy: Represents a user's consent in terms
3438 // of the resources that can be accessed and under what conditions.
3439 type GoogleCloudHealthcareV1ConsentPolicy struct {
3440 // AuthorizationRule: Required. The request conditions to meet to grant access.
3441 // In addition to any supported comparison operators, authorization rules may
3442 // have `IN` operator as well as at most 10 logical operators that are limited
3443 // to `AND` (`&&`), `OR` (`||`).
3444 AuthorizationRule *Expr `json:"authorizationRule,omitempty"`
3445 // ResourceAttributes: The resources that this policy applies to. A resource is
3446 // a match if it matches all the attributes listed here. If empty, this policy
3447 // applies to all User data mappings for the given user.
3448 ResourceAttributes []*Attribute `json:"resourceAttributes,omitempty"`
3449 // ForceSendFields is a list of field names (e.g. "AuthorizationRule") to
3450 // unconditionally include in API requests. By default, fields with empty or
3451 // default values are omitted from API requests. See
3452 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3453 // details.
3454 ForceSendFields []string `json:"-"`
3455 // NullFields is a list of field names (e.g. "AuthorizationRule") to include in
3456 // API requests with the JSON null value. By default, fields with empty values
3457 // are omitted from API requests. See
3458 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3459 NullFields []string `json:"-"`
3460 }
3461
3462 func (s GoogleCloudHealthcareV1ConsentPolicy) MarshalJSON() ([]byte, error) {
3463 type NoMethod GoogleCloudHealthcareV1ConsentPolicy
3464 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3465 }
3466
3467 // GoogleCloudHealthcareV1DeidentifyDeidentifyDicomStoreSummary: Contains a
3468 // summary of the DeidentifyDicomStore operation.
3469 type GoogleCloudHealthcareV1DeidentifyDeidentifyDicomStoreSummary struct {
3470 }
3471
3472 // GoogleCloudHealthcareV1DeidentifyDeidentifyFhirStoreSummary: Contains a
3473 // summary of the DeidentifyFhirStore operation.
3474 type GoogleCloudHealthcareV1DeidentifyDeidentifyFhirStoreSummary struct {
3475 }
3476
3477 // GoogleCloudHealthcareV1DicomBigQueryDestination: The BigQuery table where
3478 // the server writes the output.
3479 type GoogleCloudHealthcareV1DicomBigQueryDestination struct {
3480 // Force: Optional. Use `write_disposition` instead. If `write_disposition` is
3481 // specified, this parameter is ignored. force=false is equivalent to
3482 // write_disposition=WRITE_EMPTY and force=true is equivalent to
3483 // write_disposition=WRITE_TRUNCATE.
3484 Force bool `json:"force,omitempty"`
3485 // IncludeSourceStore: Optional. If true, the source store name will be
3486 // included as a column in the BigQuery schema.
3487 IncludeSourceStore bool `json:"includeSourceStore,omitempty"`
3488 // SchemaFlattened: Optional. Setting this field will use flattened DICOM
3489 // instances schema for the BigQuery table. The flattened schema will have one
3490 // column for each DICOM tag.
3491 SchemaFlattened *SchemaFlattened `json:"schemaFlattened,omitempty"`
3492 // SchemaJson: Optional. Setting this field will store all the DICOM tags as a
3493 // JSON type in a single column.
3494 SchemaJson *SchemaJSON `json:"schemaJson,omitempty"`
3495 // TableUri: Optional. BigQuery URI to a table, up to 2000 characters long, in
3496 // the format `bq://projectId.bqDatasetId.tableId`
3497 TableUri string `json:"tableUri,omitempty"`
3498 // WriteDisposition: Optional. Determines whether the existing table in the
3499 // destination is to be overwritten or appended to. If a write_disposition is
3500 // specified, the `force` parameter is ignored.
3501 //
3502 // Possible values:
3503 // "WRITE_DISPOSITION_UNSPECIFIED" - Default behavior is the same as
3504 // WRITE_EMPTY.
3505 // "WRITE_EMPTY" - Only export data if the destination table is empty.
3506 // "WRITE_TRUNCATE" - Erase all existing data in the destination table before
3507 // writing the instances.
3508 // "WRITE_APPEND" - Append data to the destination table.
3509 WriteDisposition string `json:"writeDisposition,omitempty"`
3510 // ForceSendFields is a list of field names (e.g. "Force") to unconditionally
3511 // include in API requests. By default, fields with empty or default values are
3512 // omitted from API requests. See
3513 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3514 // details.
3515 ForceSendFields []string `json:"-"`
3516 // NullFields is a list of field names (e.g. "Force") to include in API
3517 // requests with the JSON null value. By default, fields with empty values are
3518 // omitted from API requests. See
3519 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3520 NullFields []string `json:"-"`
3521 }
3522
3523 func (s GoogleCloudHealthcareV1DicomBigQueryDestination) MarshalJSON() ([]byte, error) {
3524 type NoMethod GoogleCloudHealthcareV1DicomBigQueryDestination
3525 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3526 }
3527
3528 // GoogleCloudHealthcareV1DicomGcsDestination: The Cloud Storage location where
3529 // the server writes the output and the export configuration.
3530 type GoogleCloudHealthcareV1DicomGcsDestination struct {
3531 // MimeType: MIME types supported by DICOM spec. Each file is written in the
3532 // following format:
3533 // `.../{study_id}/{series_id}/{instance_id}[/{frame_number}].{extension}` The
3534 // frame_number component exists only for multi-frame instances. Supported MIME
3535 // types are consistent with supported formats in DICOMweb:
3536 // https://cloud.google.com/healthcare/docs/dicom#retrieve_transaction.
3537 // Specifically, the following are supported: - application/dicom;
3538 // transfer-syntax=1.2.840.10008.1.2 (DICOM Implicit VR Little Endian) -
3539 // application/dicom; transfer-syntax=1.2.840.10008.1.2.1 (DICOM Explicit VR
3540 // Little Endian) - application/dicom; transfer-syntax=1.2.840.10008.1.2.1.99
3541 // (DICOM Deflated Explicit VR Little Endian) - application/dicom;
3542 // transfer-syntax=1.2.840.10008.1.2.4.50 (DICOM with embedded JPEG Baseline) -
3543 // application/dicom; transfer-syntax=1.2.840.10008.1.2.4.51 (DICOM with
3544 // embedded JPEG Extended) - application/dicom;
3545 // transfer-syntax=1.2.840.10008.1.2.4.57 (DICOM with embedded JPEG Lossless) -
3546 // application/dicom; transfer-syntax=1.2.840.10008.1.2.4.70 (DICOM with
3547 // embedded JPEG Lossless First-Order Prediction) - application/dicom;
3548 // transfer-syntax=1.2.840.10008.1.2.4.80 (DICOM with embedded JPEG-LS
3549 // Lossless) - application/dicom; transfer-syntax=1.2.840.10008.1.2.4.81 (DICOM
3550 // with embedded JPEG-LS Lossy (Near-Lossless)) - application/dicom;
3551 // transfer-syntax=1.2.840.10008.1.2.4.90 (DICOM with embedded JPEG 2000
3552 // Lossless Only) - application/dicom; transfer-syntax=1.2.840.10008.1.2.4.91
3553 // (DICOM with embedded JPEG 2000) - application/dicom;
3554 // transfer-syntax=1.2.840.10008.1.2.4.110 (DICOM with embedded JPEG XL
3555 // Lossless) - application/dicom; transfer-syntax=1.2.840.10008.1.2.4.111
3556 // (DICOM with embedded JPEG XL JPEG Recompression) - application/dicom;
3557 // transfer-syntax=1.2.840.10008.1.2.4.112 (DICOM with embedded JPEG XL) -
3558 // application/dicom; transfer-syntax=1.2.840.10008.1.2.4.201 (DICOM with
3559 // embedded High-Throughput JPEG 2000 Lossless) - application/dicom;
3560 // transfer-syntax=1.2.840.10008.1.2.4.202 (DICOM with embedded High-Throughput
3561 // JPEG 2000 with RPCL Options Lossless) - application/dicom;
3562 // transfer-syntax=1.2.840.10008.1.2.4.203 (DICOM with embedded High-Throughput
3563 // JPEG 2000) - application/dicom; transfer-syntax=1.2.840.10008.1.2.5 (DICOM
3564 // with embedded RLE Lossless) - application/dicom;
3565 // transfer-syntax=1.2.840.10008.1.2.8.1 (DICOM with embedded Deflated Image
3566 // Frame Compression) - application/dicom; transfer-syntax=* (DICOM with no
3567 // transcoding) - application/octet-stream; transfer-syntax=1.2.840.10008.1.2.1
3568 // (raw uncompressed PixelData) - application/octet-stream; transfer-syntax=*
3569 // (raw PixelData in whatever format it was uploaded in) - image/jpeg;
3570 // transfer-syntax=1.2.840.10008.1.2.4.50 (Consumer JPEG) - image/png The
3571 // following extensions are used for output files: - application/dicom -> .dcm
3572 // - image/jpeg -> .jpg - image/png -> .png - application/octet-stream -> no
3573 // extension If unspecified, the instances are exported in the original DICOM
3574 // format they were uploaded in.
3575 MimeType string `json:"mimeType,omitempty"`
3576 // UriPrefix: The Cloud Storage destination to export to. URI for a Cloud
3577 // Storage directory where the server writes the result files, in the format
3578 // `gs://{bucket-id}/{path/to/destination/dir}`). If there is no trailing
3579 // slash, the service appends one when composing the object path. The user is
3580 // responsible for creating the Cloud Storage bucket referenced in
3581 // `uri_prefix`.
3582 UriPrefix string `json:"uriPrefix,omitempty"`
3583 // ForceSendFields is a list of field names (e.g. "MimeType") to
3584 // unconditionally include in API requests. By default, fields with empty or
3585 // default values are omitted from API requests. See
3586 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3587 // details.
3588 ForceSendFields []string `json:"-"`
3589 // NullFields is a list of field names (e.g. "MimeType") to include in API
3590 // requests with the JSON null value. By default, fields with empty values are
3591 // omitted from API requests. See
3592 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3593 NullFields []string `json:"-"`
3594 }
3595
3596 func (s GoogleCloudHealthcareV1DicomGcsDestination) MarshalJSON() ([]byte, error) {
3597 type NoMethod GoogleCloudHealthcareV1DicomGcsDestination
3598 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3599 }
3600
3601 // GoogleCloudHealthcareV1DicomGcsSource: Specifies the configuration for
3602 // importing data from Cloud Storage.
3603 type GoogleCloudHealthcareV1DicomGcsSource struct {
3604 // Uri: Points to a Cloud Storage URI containing file(s) with content only. The
3605 // URI must be in the following format: `gs://{bucket_id}/{object_id}`. The URI
3606 // can include wildcards in `object_id` and thus identify multiple files.
3607 // Supported wildcards: * '*' to match 0 or more non-separator characters *
3608 // '**' to match 0 or more characters (including separators). Must be used at
3609 // the end of a path and with no other wildcards in the path. Can also be used
3610 // with a file extension (such as .dcm), which imports all files with the
3611 // extension in the specified directory and its sub-directories. For example,
3612 // `gs://my-bucket/my-directory/**.dcm` imports all files with .dcm extensions
3613 // in `my-directory/` and its sub-directories. * '?' to match 1 character. All
3614 // other URI formats are invalid. Files matching the wildcard are expected to
3615 // contain content only, no metadata.
3616 Uri string `json:"uri,omitempty"`
3617 // ForceSendFields is a list of field names (e.g. "Uri") to unconditionally
3618 // include in API requests. By default, fields with empty or default values are
3619 // omitted from API requests. See
3620 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3621 // details.
3622 ForceSendFields []string `json:"-"`
3623 // NullFields is a list of field names (e.g. "Uri") to include in API requests
3624 // with the JSON null value. By default, fields with empty values are omitted
3625 // from API requests. See
3626 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3627 NullFields []string `json:"-"`
3628 }
3629
3630 func (s GoogleCloudHealthcareV1DicomGcsSource) MarshalJSON() ([]byte, error) {
3631 type NoMethod GoogleCloudHealthcareV1DicomGcsSource
3632 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3633 }
3634
3635 // GoogleCloudHealthcareV1DicomStreamConfig: StreamConfig specifies
3636 // configuration for a streaming DICOM export.
3637 type GoogleCloudHealthcareV1DicomStreamConfig struct {
3638 // BigqueryDestination: Results are appended to this table. The server creates
3639 // a new table in the given BigQuery dataset if the specified table does not
3640 // exist. To enable the Cloud Healthcare API to write to your BigQuery table,
3641 // you must give the Cloud Healthcare API service account the
3642 // bigquery.dataEditor role. The service account is:
3643 // `service-{PROJECT_NUMBER}@gcp-sa-healthcare.iam.gserviceaccount.com`. The
3644 // PROJECT_NUMBER identifies the project that the DICOM store resides in. To
3645 // get the project number, go to the Cloud Console Dashboard. It is recommended
3646 // to not have a custom schema in the destination table which could conflict
3647 // with the schema created by the Cloud Healthcare API. Instance deletions are
3648 // not applied to the destination table. The destination's table schema will be
3649 // automatically updated in case a new instance's data is incompatible with the
3650 // current schema. The schema should not be updated manually as this can cause
3651 // incompatibilies that cannot be resolved automatically. One resolution in
3652 // this case is to delete the incompatible table and let the server recreate
3653 // one, though the newly created table only contains data after the table
3654 // recreation. BigQuery imposes a 1 MB limit on streaming insert row size,
3655 // therefore any instance that generates more than 1 MB of BigQuery data will
3656 // not be streamed. If an instance cannot be streamed to BigQuery, errors will
3657 // be logged to Cloud Logging (see Viewing error logs in Cloud Logging
3658 // (https://cloud.google.com/healthcare/docs/how-tos/logging)).
3659 BigqueryDestination *GoogleCloudHealthcareV1DicomBigQueryDestination `json:"bigqueryDestination,omitempty"`
3660 // ForceSendFields is a list of field names (e.g. "BigqueryDestination") to
3661 // unconditionally include in API requests. By default, fields with empty or
3662 // default values are omitted from API requests. See
3663 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3664 // details.
3665 ForceSendFields []string `json:"-"`
3666 // NullFields is a list of field names (e.g. "BigqueryDestination") to include
3667 // in API requests with the JSON null value. By default, fields with empty
3668 // values are omitted from API requests. See
3669 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3670 NullFields []string `json:"-"`
3671 }
3672
3673 func (s GoogleCloudHealthcareV1DicomStreamConfig) MarshalJSON() ([]byte, error) {
3674 type NoMethod GoogleCloudHealthcareV1DicomStreamConfig
3675 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3676 }
3677
3678 // GoogleCloudHealthcareV1FhirBigQueryDestination: The configuration for
3679 // exporting to BigQuery.
3680 type GoogleCloudHealthcareV1FhirBigQueryDestination struct {
3681 // DatasetUri: Optional. BigQuery URI to an existing dataset, up to 2000
3682 // characters long, in the format `bq://projectId.bqDatasetId`.
3683 DatasetUri string `json:"datasetUri,omitempty"`
3684 // Force: Optional. The default value is false. If this flag is `TRUE`, all
3685 // tables are deleted from the dataset before the new exported tables are
3686 // written. If the flag is not set and the destination dataset contains tables,
3687 // the export call returns an error. If `write_disposition` is specified, this
3688 // parameter is ignored. force=false is equivalent to
3689 // write_disposition=WRITE_EMPTY and force=true is equivalent to
3690 // write_disposition=WRITE_TRUNCATE.
3691 Force bool `json:"force,omitempty"`
3692 // SchemaConfig: Optional. The configuration for the exported BigQuery schema.
3693 SchemaConfig *SchemaConfig `json:"schemaConfig,omitempty"`
3694 // WriteDisposition: Optional. Determines if existing data in the destination
3695 // dataset is overwritten, appended to, or not written if the tables contain
3696 // data. If a write_disposition is specified, the `force` parameter is ignored.
3697 //
3698 // Possible values:
3699 // "WRITE_DISPOSITION_UNSPECIFIED" - Default behavior is the same as
3700 // WRITE_EMPTY.
3701 // "WRITE_EMPTY" - Only export data if the destination tables are empty.
3702 // "WRITE_TRUNCATE" - Erase all existing data in the destination tables
3703 // before writing the FHIR resources.
3704 // "WRITE_APPEND" - Append data to the destination tables.
3705 WriteDisposition string `json:"writeDisposition,omitempty"`
3706 // ForceSendFields is a list of field names (e.g. "DatasetUri") to
3707 // unconditionally include in API requests. By default, fields with empty or
3708 // default values are omitted from API requests. See
3709 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3710 // details.
3711 ForceSendFields []string `json:"-"`
3712 // NullFields is a list of field names (e.g. "DatasetUri") to include in API
3713 // requests with the JSON null value. By default, fields with empty values are
3714 // omitted from API requests. See
3715 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3716 NullFields []string `json:"-"`
3717 }
3718
3719 func (s GoogleCloudHealthcareV1FhirBigQueryDestination) MarshalJSON() ([]byte, error) {
3720 type NoMethod GoogleCloudHealthcareV1FhirBigQueryDestination
3721 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3722 }
3723
3724 // GoogleCloudHealthcareV1FhirGcsDestination: The configuration for exporting
3725 // to Cloud Storage.
3726 type GoogleCloudHealthcareV1FhirGcsDestination struct {
3727 // UriPrefix: URI for a Cloud Storage directory where result files should be
3728 // written, in the format of `gs://{bucket-id}/{path/to/destination/dir}`. If
3729 // there is no trailing slash, the service appends one when composing the
3730 // object path. The user is responsible for creating the Cloud Storage bucket
3731 // referenced in `uri_prefix`.
3732 UriPrefix string `json:"uriPrefix,omitempty"`
3733 // ForceSendFields is a list of field names (e.g. "UriPrefix") to
3734 // unconditionally include in API requests. By default, fields with empty or
3735 // default values are omitted from API requests. See
3736 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3737 // details.
3738 ForceSendFields []string `json:"-"`
3739 // NullFields is a list of field names (e.g. "UriPrefix") to include in API
3740 // requests with the JSON null value. By default, fields with empty values are
3741 // omitted from API requests. See
3742 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3743 NullFields []string `json:"-"`
3744 }
3745
3746 func (s GoogleCloudHealthcareV1FhirGcsDestination) MarshalJSON() ([]byte, error) {
3747 type NoMethod GoogleCloudHealthcareV1FhirGcsDestination
3748 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3749 }
3750
3751 // GoogleCloudHealthcareV1FhirGcsSource: Specifies the configuration for
3752 // importing data from Cloud Storage.
3753 type GoogleCloudHealthcareV1FhirGcsSource struct {
3754 // Uri: Points to a Cloud Storage URI containing file(s) to import. The URI
3755 // must be in the following format: `gs://{bucket_id}/{object_id}`. The URI can
3756 // include wildcards in `object_id` and thus identify multiple files. Supported
3757 // wildcards: * `*` to match 0 or more non-separator characters * `**` to match
3758 // 0 or more characters (including separators). Must be used at the end of a
3759 // path and with no other wildcards in the path. Can also be used with a file
3760 // extension (such as .ndjson), which imports all files with the extension in
3761 // the specified directory and its sub-directories. For example,
3762 // `gs://my-bucket/my-directory/**.ndjson` imports all files with `.ndjson`
3763 // extensions in `my-directory/` and its sub-directories. * `?` to match 1
3764 // character Files matching the wildcard are expected to contain content only,
3765 // no metadata.
3766 Uri string `json:"uri,omitempty"`
3767 // ForceSendFields is a list of field names (e.g. "Uri") to unconditionally
3768 // include in API requests. By default, fields with empty or default values are
3769 // omitted from API requests. See
3770 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3771 // details.
3772 ForceSendFields []string `json:"-"`
3773 // NullFields is a list of field names (e.g. "Uri") to include in API requests
3774 // with the JSON null value. By default, fields with empty values are omitted
3775 // from API requests. See
3776 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3777 NullFields []string `json:"-"`
3778 }
3779
3780 func (s GoogleCloudHealthcareV1FhirGcsSource) MarshalJSON() ([]byte, error) {
3781 type NoMethod GoogleCloudHealthcareV1FhirGcsSource
3782 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3783 }
3784
3785 // GroupOrSegment: Construct representing a logical group or a segment.
3786 type GroupOrSegment struct {
3787 Group *SchemaGroup `json:"group,omitempty"`
3788 Segment *SchemaSegment `json:"segment,omitempty"`
3789 // ForceSendFields is a list of field names (e.g. "Group") to unconditionally
3790 // include in API requests. By default, fields with empty or default values are
3791 // omitted from API requests. See
3792 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3793 // details.
3794 ForceSendFields []string `json:"-"`
3795 // NullFields is a list of field names (e.g. "Group") to include in API
3796 // requests with the JSON null value. By default, fields with empty values are
3797 // omitted from API requests. See
3798 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3799 NullFields []string `json:"-"`
3800 }
3801
3802 func (s GroupOrSegment) MarshalJSON() ([]byte, error) {
3803 type NoMethod GroupOrSegment
3804 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3805 }
3806
3807 // Hl7SchemaConfig: Root config message for HL7v2 schema. This contains a
3808 // schema structure of groups and segments, and filters that determine which
3809 // messages to apply the schema structure to.
3810 type Hl7SchemaConfig struct {
3811 // MessageSchemaConfigs: Map from each HL7v2 message type and trigger event
3812 // pair, such as ADT_A04, to its schema configuration root group.
3813 MessageSchemaConfigs map[string]SchemaGroup `json:"messageSchemaConfigs,omitempty"`
3814 // Version: Each VersionSource is tested and only if they all match is the
3815 // schema used for the message.
3816 Version []*VersionSource `json:"version,omitempty"`
3817 // ForceSendFields is a list of field names (e.g. "MessageSchemaConfigs") to
3818 // unconditionally include in API requests. By default, fields with empty or
3819 // default values are omitted from API requests. See
3820 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3821 // details.
3822 ForceSendFields []string `json:"-"`
3823 // NullFields is a list of field names (e.g. "MessageSchemaConfigs") to include
3824 // in API requests with the JSON null value. By default, fields with empty
3825 // values are omitted from API requests. See
3826 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3827 NullFields []string `json:"-"`
3828 }
3829
3830 func (s Hl7SchemaConfig) MarshalJSON() ([]byte, error) {
3831 type NoMethod Hl7SchemaConfig
3832 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3833 }
3834
3835 // Hl7TypesConfig: Root config for HL7v2 datatype definitions for a specific
3836 // HL7v2 version.
3837 type Hl7TypesConfig struct {
3838 // Type: The HL7v2 type definitions.
3839 Type []*Type `json:"type,omitempty"`
3840 // Version: The version selectors that this config applies to. A message must
3841 // match ALL version sources to apply.
3842 Version []*VersionSource `json:"version,omitempty"`
3843 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally
3844 // include in API requests. By default, fields with empty or default values are
3845 // omitted from API requests. See
3846 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3847 // details.
3848 ForceSendFields []string `json:"-"`
3849 // NullFields is a list of field names (e.g. "Type") to include in API requests
3850 // with the JSON null value. By default, fields with empty values are omitted
3851 // from API requests. See
3852 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3853 NullFields []string `json:"-"`
3854 }
3855
3856 func (s Hl7TypesConfig) MarshalJSON() ([]byte, error) {
3857 type NoMethod Hl7TypesConfig
3858 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3859 }
3860
3861 // Hl7V2NotificationConfig: Specifies where and whether to send notifications
3862 // upon changes to a data store.
3863 type Hl7V2NotificationConfig struct {
3864 // Filter: Optional. Restricts notifications sent for messages matching a
3865 // filter. If this is empty, all messages are matched. The following syntax is
3866 // available: * A string field value can be written as text inside quotation
3867 // marks, for example "query text". The only valid relational operation for
3868 // text fields is equality (`=`), where text is searched within the field,
3869 // rather than having the field be equal to the text. For example, "Comment =
3870 // great" returns messages with `great` in the comment field. * A number field
3871 // value can be written as an integer, a decimal, or an exponential. The valid
3872 // relational operators for number fields are the equality operator (`=`),
3873 // along with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note
3874 // that there is no inequality (`!=`) operator. You can prepend the `NOT`
3875 // operator to an expression to negate it. * A date field value must be written
3876 // in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format.
3877 // Leading zeros are required for one-digit months and days. The valid
3878 // relational operators for date fields are the equality operator (`=`) , along
3879 // with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that
3880 // there is no inequality (`!=`) operator. You can prepend the `NOT` operator
3881 // to an expression to negate it. * Multiple field query expressions can be
3882 // combined in one query by adding `AND` or `OR` operators between the
3883 // expressions. If a boolean operator appears within a quoted string, it is not
3884 // treated as special, it's just another part of the character string to be
3885 // matched. You can prepend the `NOT` operator to an expression to negate it.
3886 // The following fields and functions are available for filtering: *
3887 // `message_type`, from the MSH-9.1 field. For example, `NOT message_type =
3888 // "ADT". * `send_date` or `sendDate`, the YYYY-MM-DD date the message was
3889 // sent in the dataset's time_zone, from the MSH-7 segment. For example,
3890 // `send_date < "2017-01-02". * `send_time`, the timestamp when the message
3891 // was sent, using the RFC3339 time format for comparisons, from the MSH-7
3892 // segment. For example, `send_time < "2017-01-02T00:00:00-05:00". *
3893 // `create_time`, the timestamp when the message was created in the HL7v2
3894 // store. Use the RFC3339 time format for comparisons. For example,
3895 // `create_time < "2017-01-02T00:00:00-05:00". * `send_facility`, the care
3896 // center that the message came from, from the MSH-4 segment. For example,
3897 // `send_facility = "ABC". * `PatientId(value, type)`, which matches if the
3898 // message lists a patient having an ID of the given value and type in the
3899 // PID-2, PID-3, or PID-4 segments. For example, `PatientId("123456", "MRN")`.
3900 // * `labels.x`, a string value of the label with key `x` as set using the
3901 // Message.labels map. For example, `labels."priority"="high". The operator
3902 // `:*` can be used to assert the existence of a label. For example,
3903 // `labels."priority":*`.
3904 Filter string `json:"filter,omitempty"`
3905 // PubsubTopic: The Pub/Sub (https://cloud.google.com/pubsub/docs/) topic that
3906 // notifications of changes are published on. Supplied by the client. The
3907 // notification is a `PubsubMessage` with the following fields: *
3908 // `PubsubMessage.Data` contains the resource name. * `PubsubMessage.MessageId`
3909 // is the ID of this notification. It's guaranteed to be unique within the
3910 // topic. * `PubsubMessage.PublishTime` is the time when the message was
3911 // published. Note that notifications are only sent if the topic is non-empty.
3912 // Topic names (https://cloud.google.com/pubsub/docs/overview#names) must be
3913 // scoped to a project. The Cloud Healthcare API service account,
3914 // [email protected], must have
3915 // publisher permissions on the given Pub/Sub topic. Not having adequate
3916 // permissions causes the calls that send notifications to fail. If a
3917 // notification cannot be published to Pub/Sub, errors are logged to Cloud
3918 // Logging. For more information, see Viewing error logs in Cloud Logging
3919 // (https://cloud.google.com/healthcare/docs/how-tos/logging)).
3920 PubsubTopic string `json:"pubsubTopic,omitempty"`
3921 // ForceSendFields is a list of field names (e.g. "Filter") to unconditionally
3922 // include in API requests. By default, fields with empty or default values are
3923 // omitted from API requests. See
3924 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3925 // details.
3926 ForceSendFields []string `json:"-"`
3927 // NullFields is a list of field names (e.g. "Filter") to include in API
3928 // requests with the JSON null value. By default, fields with empty values are
3929 // omitted from API requests. See
3930 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3931 NullFields []string `json:"-"`
3932 }
3933
3934 func (s Hl7V2NotificationConfig) MarshalJSON() ([]byte, error) {
3935 type NoMethod Hl7V2NotificationConfig
3936 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3937 }
3938
3939 // Hl7V2Store: Represents an HL7v2 store.
3940 type Hl7V2Store struct {
3941 // Labels: User-supplied key-value pairs used to organize HL7v2 stores. Label
3942 // keys must be between 1 and 63 characters long, have a UTF-8 encoding of
3943 // maximum 128 bytes, and must conform to the following PCRE regular
3944 // expression: \p{Ll}\p{Lo}{0,62} Label values are optional, must be between 1
3945 // and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must
3946 // conform to the following PCRE regular expression:
3947 // [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64 labels can be associated with a
3948 // given store.
3949 Labels map[string]string `json:"labels,omitempty"`
3950 // Name: Identifier. Resource name of the HL7v2 store, of the form
3951 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Sto
3952 // res/{hl7v2_store_id}`.
3953 Name string `json:"name,omitempty"`
3954 // NotificationConfigs: Optional. A list of notification configs. Each
3955 // configuration uses a filter to determine whether to publish a message (both
3956 // Ingest & Create) on the corresponding notification destination. Only the
3957 // message name is sent as part of the notification. Supplied by the client.
3958 NotificationConfigs []*Hl7V2NotificationConfig `json:"notificationConfigs,omitempty"`
3959 // ParserConfig: Optional. The configuration for the parser. It determines how
3960 // the server parses the messages.
3961 ParserConfig *ParserConfig `json:"parserConfig,omitempty"`
3962 // RejectDuplicateMessage: Optional. Determines whether to reject duplicate
3963 // messages. A duplicate message is a message with the same raw bytes as a
3964 // message that has already been ingested/created in this HL7v2 store. The
3965 // default value is false, meaning that the store accepts the duplicate
3966 // messages and it also returns the same ACK message in the
3967 // IngestMessageResponse as has been returned previously. Note that only one
3968 // resource is created in the store. When this field is set to true,
3969 // CreateMessage/IngestMessage requests with a duplicate message will be
3970 // rejected by the store, and IngestMessageErrorDetail returns a NACK message
3971 // upon rejection.
3972 RejectDuplicateMessage bool `json:"rejectDuplicateMessage,omitempty"`
3973
3974 // ServerResponse contains the HTTP response code and headers from the server.
3975 googleapi.ServerResponse `json:"-"`
3976 // ForceSendFields is a list of field names (e.g. "Labels") to unconditionally
3977 // include in API requests. By default, fields with empty or default values are
3978 // omitted from API requests. See
3979 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3980 // details.
3981 ForceSendFields []string `json:"-"`
3982 // NullFields is a list of field names (e.g. "Labels") to include in API
3983 // requests with the JSON null value. By default, fields with empty values are
3984 // omitted from API requests. See
3985 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3986 NullFields []string `json:"-"`
3987 }
3988
3989 func (s Hl7V2Store) MarshalJSON() ([]byte, error) {
3990 type NoMethod Hl7V2Store
3991 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3992 }
3993
3994 // Hl7V2StoreMetric: Count of messages and total storage size by type for a
3995 // given HL7 store.
3996 type Hl7V2StoreMetric struct {
3997 // Count: The total count of HL7v2 messages in the store for the given message
3998 // type.
3999 Count int64 `json:"count,omitempty,string"`
4000 // MessageType: The Hl7v2 message type this metric applies to, such as `ADT` or
4001 // `ORU`.
4002 MessageType string `json:"messageType,omitempty"`
4003 // StructuredStorageSizeBytes: The total amount of structured storage used by
4004 // HL7v2 messages of this message type in the store.
4005 StructuredStorageSizeBytes int64 `json:"structuredStorageSizeBytes,omitempty,string"`
4006 // ForceSendFields is a list of field names (e.g. "Count") to unconditionally
4007 // include in API requests. By default, fields with empty or default values are
4008 // omitted from API requests. See
4009 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4010 // details.
4011 ForceSendFields []string `json:"-"`
4012 // NullFields is a list of field names (e.g. "Count") to include in API
4013 // requests with the JSON null value. By default, fields with empty values are
4014 // omitted from API requests. See
4015 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4016 NullFields []string `json:"-"`
4017 }
4018
4019 func (s Hl7V2StoreMetric) MarshalJSON() ([]byte, error) {
4020 type NoMethod Hl7V2StoreMetric
4021 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4022 }
4023
4024 // Hl7V2StoreMetrics: List of metrics for a given HL7v2 store.
4025 type Hl7V2StoreMetrics struct {
4026 // Metrics: List of HL7v2 store metrics by message type.
4027 Metrics []*Hl7V2StoreMetric `json:"metrics,omitempty"`
4028 // Name: The resource name of the HL7v2 store to get metrics for, in the format
4029 // `projects/{project_id}/datasets/{dataset_id}/hl7V2Stores/{hl7v2_store_id}`.
4030 Name string `json:"name,omitempty"`
4031
4032 // ServerResponse contains the HTTP response code and headers from the server.
4033 googleapi.ServerResponse `json:"-"`
4034 // ForceSendFields is a list of field names (e.g. "Metrics") to unconditionally
4035 // include in API requests. By default, fields with empty or default values are
4036 // omitted from API requests. See
4037 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4038 // details.
4039 ForceSendFields []string `json:"-"`
4040 // NullFields is a list of field names (e.g. "Metrics") to include in API
4041 // requests with the JSON null value. By default, fields with empty values are
4042 // omitted from API requests. See
4043 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4044 NullFields []string `json:"-"`
4045 }
4046
4047 func (s Hl7V2StoreMetrics) MarshalJSON() ([]byte, error) {
4048 type NoMethod Hl7V2StoreMetrics
4049 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4050 }
4051
4052 // HttpBody: Message that represents an arbitrary HTTP body. It should only be
4053 // used for payload formats that can't be represented as JSON, such as raw
4054 // binary or an HTML page. This message can be used both in streaming and
4055 // non-streaming API methods in the request as well as the response. It can be
4056 // used as a top-level request field, which is convenient if one wants to
4057 // extract parameters from either the URL or HTTP template into the request
4058 // fields and also want access to the raw HTTP body. Example: message
4059 // GetResourceRequest { // A unique request id. string request_id = 1; // The
4060 // raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; }
4061 // service ResourceService { rpc GetResource(GetResourceRequest) returns
4062 // (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns
4063 // (google.protobuf.Empty); } Example with streaming methods: service
4064 // CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream
4065 // google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns
4066 // (stream google.api.HttpBody); } Use of this type only changes how the
4067 // request and response bodies are handled, all other features will continue to
4068 // work unchanged.
4069 type HttpBody struct {
4070 // ContentType: The HTTP Content-Type header value specifying the content type
4071 // of the body.
4072 ContentType string `json:"contentType,omitempty"`
4073 // Data: The HTTP request/response body as raw binary.
4074 Data string `json:"data,omitempty"`
4075 // Extensions: Application specific response metadata. Must be set in the first
4076 // response for streaming APIs.
4077 Extensions []googleapi.RawMessage `json:"extensions,omitempty"`
4078
4079 // ServerResponse contains the HTTP response code and headers from the server.
4080 googleapi.ServerResponse `json:"-"`
4081 // ForceSendFields is a list of field names (e.g. "ContentType") to
4082 // unconditionally include in API requests. By default, fields with empty or
4083 // default values are omitted from API requests. See
4084 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4085 // details.
4086 ForceSendFields []string `json:"-"`
4087 // NullFields is a list of field names (e.g. "ContentType") to include in API
4088 // requests with the JSON null value. By default, fields with empty values are
4089 // omitted from API requests. See
4090 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4091 NullFields []string `json:"-"`
4092 }
4093
4094 func (s HttpBody) MarshalJSON() ([]byte, error) {
4095 type NoMethod HttpBody
4096 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4097 }
4098
4099 // Image: Raw bytes representing consent artifact content.
4100 type Image struct {
4101 // GcsUri: Input only. Points to a Cloud Storage URI containing the consent
4102 // artifact content. The URI must be in the following format:
4103 // `gs://{bucket_id}/{object_id}`. The Cloud Healthcare API service account
4104 // must have the `roles/storage.objectViewer` Cloud IAM role for this Cloud
4105 // Storage location. The consent artifact content at this URI is copied to a
4106 // Cloud Storage location managed by the Cloud Healthcare API. Responses to
4107 // fetching requests return the consent artifact content in raw_bytes.
4108 GcsUri string `json:"gcsUri,omitempty"`
4109 // RawBytes: Consent artifact content represented as a stream of bytes. This
4110 // field is populated when returned in GetConsentArtifact response, but not
4111 // included in CreateConsentArtifact and ListConsentArtifact response.
4112 RawBytes string `json:"rawBytes,omitempty"`
4113 // ForceSendFields is a list of field names (e.g. "GcsUri") to unconditionally
4114 // include in API requests. By default, fields with empty or default values are
4115 // omitted from API requests. See
4116 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4117 // details.
4118 ForceSendFields []string `json:"-"`
4119 // NullFields is a list of field names (e.g. "GcsUri") to include in API
4120 // requests with the JSON null value. By default, fields with empty values are
4121 // omitted from API requests. See
4122 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4123 NullFields []string `json:"-"`
4124 }
4125
4126 func (s Image) MarshalJSON() ([]byte, error) {
4127 type NoMethod Image
4128 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4129 }
4130
4131 // ImageConfig: Specifies how to handle de-identification of image pixels.
4132 type ImageConfig struct {
4133 // TextRedactionMode: Optional. Determines how to redact text from image.
4134 //
4135 // Possible values:
4136 // "TEXT_REDACTION_MODE_UNSPECIFIED" - No text redaction specified. Same as
4137 // REDACT_NO_TEXT.
4138 // "REDACT_ALL_TEXT" - Redact all text.
4139 // "REDACT_SENSITIVE_TEXT" - Redact sensitive text. Uses the set of [Default
4140 // DICOM
4141 // InfoTypes](https://cloud.google.com/healthcare-api/docs/how-tos/dicom-deident
4142 // ify#default_dicom_infotypes).
4143 // "REDACT_NO_TEXT" - Do not redact text.
4144 TextRedactionMode string `json:"textRedactionMode,omitempty"`
4145 // ForceSendFields is a list of field names (e.g. "TextRedactionMode") to
4146 // unconditionally include in API requests. By default, fields with empty or
4147 // default values are omitted from API requests. See
4148 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4149 // details.
4150 ForceSendFields []string `json:"-"`
4151 // NullFields is a list of field names (e.g. "TextRedactionMode") to include in
4152 // API requests with the JSON null value. By default, fields with empty values
4153 // are omitted from API requests. See
4154 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4155 NullFields []string `json:"-"`
4156 }
4157
4158 func (s ImageConfig) MarshalJSON() ([]byte, error) {
4159 type NoMethod ImageConfig
4160 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4161 }
4162
4163 // ImportDicomDataRequest: Imports data into the specified DICOM store. Returns
4164 // an error if any of the files to import are not DICOM files. This API accepts
4165 // duplicate DICOM instances by ignoring the newly-pushed instance. It does not
4166 // overwrite.
4167 type ImportDicomDataRequest struct {
4168 // BlobStorageSettings: Optional. The blob storage settings for the data
4169 // imported by this operation.
4170 BlobStorageSettings *BlobStorageSettings `json:"blobStorageSettings,omitempty"`
4171 // GcsSource: Cloud Storage source data location and import configuration. The
4172 // Cloud Healthcare Service Agent requires the `roles/storage.objectViewer`
4173 // Cloud IAM roles on the Cloud Storage location.
4174 GcsSource *GoogleCloudHealthcareV1DicomGcsSource `json:"gcsSource,omitempty"`
4175 // ForceSendFields is a list of field names (e.g. "BlobStorageSettings") to
4176 // unconditionally include in API requests. By default, fields with empty or
4177 // default values are omitted from API requests. See
4178 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4179 // details.
4180 ForceSendFields []string `json:"-"`
4181 // NullFields is a list of field names (e.g. "BlobStorageSettings") to include
4182 // in API requests with the JSON null value. By default, fields with empty
4183 // values are omitted from API requests. See
4184 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4185 NullFields []string `json:"-"`
4186 }
4187
4188 func (s ImportDicomDataRequest) MarshalJSON() ([]byte, error) {
4189 type NoMethod ImportDicomDataRequest
4190 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4191 }
4192
4193 // ImportDicomDataResponse: Returns additional information in regards to a
4194 // completed DICOM store import.
4195 type ImportDicomDataResponse struct {
4196 }
4197
4198 // ImportMessagesRequest: Request to import messages.
4199 type ImportMessagesRequest struct {
4200 // GcsSource: Cloud Storage source data location and import configuration. The
4201 // Cloud Healthcare Service Agent requires the `roles/storage.objectViewer`
4202 // Cloud IAM roles on the Cloud Storage location.
4203 GcsSource *GcsSource `json:"gcsSource,omitempty"`
4204 // ForceSendFields is a list of field names (e.g. "GcsSource") to
4205 // unconditionally include in API requests. By default, fields with empty or
4206 // default values are omitted from API requests. See
4207 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4208 // details.
4209 ForceSendFields []string `json:"-"`
4210 // NullFields is a list of field names (e.g. "GcsSource") to include in API
4211 // requests with the JSON null value. By default, fields with empty values are
4212 // omitted from API requests. See
4213 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4214 NullFields []string `json:"-"`
4215 }
4216
4217 func (s ImportMessagesRequest) MarshalJSON() ([]byte, error) {
4218 type NoMethod ImportMessagesRequest
4219 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4220 }
4221
4222 // ImportMessagesResponse: Final response of importing messages. This structure
4223 // is included in the response to describe the detailed outcome. It is only
4224 // included when the operation finishes successfully.
4225 type ImportMessagesResponse struct {
4226 }
4227
4228 // ImportResourcesRequest: Request to import resources.
4229 type ImportResourcesRequest struct {
4230 // ContentStructure: The content structure in the source location. If not
4231 // specified, the server treats the input source files as BUNDLE.
4232 //
4233 // Possible values:
4234 // "CONTENT_STRUCTURE_UNSPECIFIED" - If the content structure is not
4235 // specified, the default value `BUNDLE` is used.
4236 // "BUNDLE" - The source file contains one or more lines of newline-delimited
4237 // JSON (ndjson). Each line is a bundle that contains one or more resources.
4238 // "RESOURCE" - The source file contains one or more lines of
4239 // newline-delimited JSON (ndjson). Each line is a single resource.
4240 // "BUNDLE_PRETTY" - The entire file is one JSON bundle. The JSON can span
4241 // multiple lines.
4242 // "RESOURCE_PRETTY" - The entire file is one JSON resource. The JSON can
4243 // span multiple lines.
4244 ContentStructure string `json:"contentStructure,omitempty"`
4245 // GcsSource: Cloud Storage source data location and import configuration. The
4246 // Healthcare Service Agent account requires the `roles/storage.objectAdmin`
4247 // role on the Cloud Storage location. Each Cloud Storage object should be a
4248 // text file that contains the format specified in ContentStructure.
4249 GcsSource *GoogleCloudHealthcareV1FhirGcsSource `json:"gcsSource,omitempty"`
4250 // ForceSendFields is a list of field names (e.g. "ContentStructure") to
4251 // unconditionally include in API requests. By default, fields with empty or
4252 // default values are omitted from API requests. See
4253 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4254 // details.
4255 ForceSendFields []string `json:"-"`
4256 // NullFields is a list of field names (e.g. "ContentStructure") to include in
4257 // API requests with the JSON null value. By default, fields with empty values
4258 // are omitted from API requests. See
4259 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4260 NullFields []string `json:"-"`
4261 }
4262
4263 func (s ImportResourcesRequest) MarshalJSON() ([]byte, error) {
4264 type NoMethod ImportResourcesRequest
4265 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4266 }
4267
4268 // ImportResourcesResponse: Final response of importing resources. This
4269 // structure is included in the response to describe the detailed outcome after
4270 // the operation finishes successfully.
4271 type ImportResourcesResponse struct {
4272 }
4273
4274 // InfoTypeTransformation: A transformation to apply to text that is identified
4275 // as a specific info_type.
4276 type InfoTypeTransformation struct {
4277 // CharacterMaskConfig: Config for character mask.
4278 CharacterMaskConfig *CharacterMaskConfig `json:"characterMaskConfig,omitempty"`
4279 // CryptoHashConfig: Config for crypto hash.
4280 CryptoHashConfig *CryptoHashConfig `json:"cryptoHashConfig,omitempty"`
4281 // DateShiftConfig: Config for date shift.
4282 DateShiftConfig *DateShiftConfig `json:"dateShiftConfig,omitempty"`
4283 // InfoTypes: Optional. InfoTypes to apply this transformation to. If this is
4284 // not specified, the transformation applies to any info_type.
4285 InfoTypes []string `json:"infoTypes,omitempty"`
4286 // RedactConfig: Config for text redaction.
4287 RedactConfig *RedactConfig `json:"redactConfig,omitempty"`
4288 // ReplaceWithInfoTypeConfig: Config for replace with InfoType.
4289 ReplaceWithInfoTypeConfig *ReplaceWithInfoTypeConfig `json:"replaceWithInfoTypeConfig,omitempty"`
4290 // ForceSendFields is a list of field names (e.g. "CharacterMaskConfig") to
4291 // unconditionally include in API requests. By default, fields with empty or
4292 // default values are omitted from API requests. See
4293 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4294 // details.
4295 ForceSendFields []string `json:"-"`
4296 // NullFields is a list of field names (e.g. "CharacterMaskConfig") to include
4297 // in API requests with the JSON null value. By default, fields with empty
4298 // values are omitted from API requests. See
4299 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4300 NullFields []string `json:"-"`
4301 }
4302
4303 func (s InfoTypeTransformation) MarshalJSON() ([]byte, error) {
4304 type NoMethod InfoTypeTransformation
4305 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4306 }
4307
4308 // IngestMessageRequest: Ingests a message into the specified HL7v2 store.
4309 type IngestMessageRequest struct {
4310 // Message: Required. HL7v2 message to ingest.
4311 Message *Message `json:"message,omitempty"`
4312 // ForceSendFields is a list of field names (e.g. "Message") to unconditionally
4313 // include in API requests. By default, fields with empty or default values are
4314 // omitted from API requests. See
4315 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4316 // details.
4317 ForceSendFields []string `json:"-"`
4318 // NullFields is a list of field names (e.g. "Message") to include in API
4319 // requests with the JSON null value. By default, fields with empty values are
4320 // omitted from API requests. See
4321 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4322 NullFields []string `json:"-"`
4323 }
4324
4325 func (s IngestMessageRequest) MarshalJSON() ([]byte, error) {
4326 type NoMethod IngestMessageRequest
4327 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4328 }
4329
4330 // IngestMessageResponse: Acknowledges that a message has been ingested into
4331 // the specified HL7v2 store.
4332 type IngestMessageResponse struct {
4333 // Hl7Ack: HL7v2 ACK message.
4334 Hl7Ack string `json:"hl7Ack,omitempty"`
4335 // Message: Created message resource.
4336 Message *Message `json:"message,omitempty"`
4337
4338 // ServerResponse contains the HTTP response code and headers from the server.
4339 googleapi.ServerResponse `json:"-"`
4340 // ForceSendFields is a list of field names (e.g. "Hl7Ack") to unconditionally
4341 // include in API requests. By default, fields with empty or default values are
4342 // omitted from API requests. See
4343 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4344 // details.
4345 ForceSendFields []string `json:"-"`
4346 // NullFields is a list of field names (e.g. "Hl7Ack") to include in API
4347 // requests with the JSON null value. By default, fields with empty values are
4348 // omitted from API requests. See
4349 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4350 NullFields []string `json:"-"`
4351 }
4352
4353 func (s IngestMessageResponse) MarshalJSON() ([]byte, error) {
4354 type NoMethod IngestMessageResponse
4355 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4356 }
4357
4358 // KmsWrappedCryptoKey: Include to use an existing data crypto key wrapped by
4359 // KMS. The wrapped key must be a 128-, 192-, or 256-bit key. The key must
4360 // grant the Cloud IAM permission `cloudkms.cryptoKeyVersions.useToDecrypt` to
4361 // the project's Cloud Healthcare Service Agent service account. For more
4362 // information, see [Creating a wrapped key]
4363 // (https://cloud.google.com/dlp/docs/create-wrapped-key).
4364 type KmsWrappedCryptoKey struct {
4365 // CryptoKey: Required. The resource name of the KMS CryptoKey to use for
4366 // unwrapping. For example,
4367 // `projects/{project_id}/locations/{location_id}/keyRings/{keyring}/cryptoKeys/
4368 // {key}`.
4369 CryptoKey string `json:"cryptoKey,omitempty"`
4370 // WrappedKey: Required. The wrapped data crypto key.
4371 WrappedKey string `json:"wrappedKey,omitempty"`
4372 // ForceSendFields is a list of field names (e.g. "CryptoKey") to
4373 // unconditionally include in API requests. By default, fields with empty or
4374 // default values are omitted from API requests. See
4375 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4376 // details.
4377 ForceSendFields []string `json:"-"`
4378 // NullFields is a list of field names (e.g. "CryptoKey") to include in API
4379 // requests with the JSON null value. By default, fields with empty values are
4380 // omitted from API requests. See
4381 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4382 NullFields []string `json:"-"`
4383 }
4384
4385 func (s KmsWrappedCryptoKey) MarshalJSON() ([]byte, error) {
4386 type NoMethod KmsWrappedCryptoKey
4387 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4388 }
4389
4390 // LinkedEntity: EntityMentions can be linked to multiple entities using a
4391 // LinkedEntity message lets us add other fields, e.g. confidence.
4392 type LinkedEntity struct {
4393 // EntityId: entity_id is a concept unique identifier. These are prefixed by a
4394 // string that identifies the entity coding system, followed by the unique
4395 // identifier within that system. For example, "UMLS/C0000970". This also
4396 // supports ad hoc entities, which are formed by normalizing entity mention
4397 // content.
4398 EntityId string `json:"entityId,omitempty"`
4399 // ForceSendFields is a list of field names (e.g. "EntityId") to
4400 // unconditionally include in API requests. By default, fields with empty or
4401 // default values are omitted from API requests. See
4402 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4403 // details.
4404 ForceSendFields []string `json:"-"`
4405 // NullFields is a list of field names (e.g. "EntityId") to include in API
4406 // requests with the JSON null value. By default, fields with empty values are
4407 // omitted from API requests. See
4408 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4409 NullFields []string `json:"-"`
4410 }
4411
4412 func (s LinkedEntity) MarshalJSON() ([]byte, error) {
4413 type NoMethod LinkedEntity
4414 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4415 }
4416
4417 type ListAttributeDefinitionsResponse struct {
4418 // AttributeDefinitions: The returned Attribute definitions. The maximum number
4419 // of attributes returned is determined by the value of page_size in the
4420 // ListAttributeDefinitionsRequest.
4421 AttributeDefinitions []*AttributeDefinition `json:"attributeDefinitions,omitempty"`
4422 // NextPageToken: Token to retrieve the next page of results, or empty if there
4423 // are no more results in the list.
4424 NextPageToken string `json:"nextPageToken,omitempty"`
4425
4426 // ServerResponse contains the HTTP response code and headers from the server.
4427 googleapi.ServerResponse `json:"-"`
4428 // ForceSendFields is a list of field names (e.g. "AttributeDefinitions") to
4429 // unconditionally include in API requests. By default, fields with empty or
4430 // default values are omitted from API requests. See
4431 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4432 // details.
4433 ForceSendFields []string `json:"-"`
4434 // NullFields is a list of field names (e.g. "AttributeDefinitions") to include
4435 // in API requests with the JSON null value. By default, fields with empty
4436 // values are omitted from API requests. See
4437 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4438 NullFields []string `json:"-"`
4439 }
4440
4441 func (s ListAttributeDefinitionsResponse) MarshalJSON() ([]byte, error) {
4442 type NoMethod ListAttributeDefinitionsResponse
4443 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4444 }
4445
4446 type ListConsentArtifactsResponse struct {
4447 // ConsentArtifacts: The returned Consent artifacts. The maximum number of
4448 // artifacts returned is determined by the value of page_size in the
4449 // ListConsentArtifactsRequest.
4450 ConsentArtifacts []*ConsentArtifact `json:"consentArtifacts,omitempty"`
4451 // NextPageToken: Token to retrieve the next page of results, or empty if there
4452 // are no more results in the list.
4453 NextPageToken string `json:"nextPageToken,omitempty"`
4454
4455 // ServerResponse contains the HTTP response code and headers from the server.
4456 googleapi.ServerResponse `json:"-"`
4457 // ForceSendFields is a list of field names (e.g. "ConsentArtifacts") to
4458 // unconditionally include in API requests. By default, fields with empty or
4459 // default values are omitted from API requests. See
4460 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4461 // details.
4462 ForceSendFields []string `json:"-"`
4463 // NullFields is a list of field names (e.g. "ConsentArtifacts") to include in
4464 // API requests with the JSON null value. By default, fields with empty values
4465 // are omitted from API requests. See
4466 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4467 NullFields []string `json:"-"`
4468 }
4469
4470 func (s ListConsentArtifactsResponse) MarshalJSON() ([]byte, error) {
4471 type NoMethod ListConsentArtifactsResponse
4472 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4473 }
4474
4475 type ListConsentRevisionsResponse struct {
4476 // Consents: The returned Consent revisions. The maximum number of revisions
4477 // returned is determined by the value of `page_size` in the
4478 // ListConsentRevisionsRequest.
4479 Consents []*Consent `json:"consents,omitempty"`
4480 // NextPageToken: Token to retrieve the next page of results, or empty if there
4481 // are no more results in the list.
4482 NextPageToken string `json:"nextPageToken,omitempty"`
4483
4484 // ServerResponse contains the HTTP response code and headers from the server.
4485 googleapi.ServerResponse `json:"-"`
4486 // ForceSendFields is a list of field names (e.g. "Consents") to
4487 // unconditionally include in API requests. By default, fields with empty or
4488 // default values are omitted from API requests. See
4489 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4490 // details.
4491 ForceSendFields []string `json:"-"`
4492 // NullFields is a list of field names (e.g. "Consents") to include in API
4493 // requests with the JSON null value. By default, fields with empty values are
4494 // omitted from API requests. See
4495 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4496 NullFields []string `json:"-"`
4497 }
4498
4499 func (s ListConsentRevisionsResponse) MarshalJSON() ([]byte, error) {
4500 type NoMethod ListConsentRevisionsResponse
4501 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4502 }
4503
4504 type ListConsentStoresResponse struct {
4505 // ConsentStores: The returned consent stores. The maximum number of stores
4506 // returned is determined by the value of page_size in the
4507 // ListConsentStoresRequest.
4508 ConsentStores []*ConsentStore `json:"consentStores,omitempty"`
4509 // NextPageToken: Token to retrieve the next page of results, or empty if there
4510 // are no more results in the list.
4511 NextPageToken string `json:"nextPageToken,omitempty"`
4512
4513 // ServerResponse contains the HTTP response code and headers from the server.
4514 googleapi.ServerResponse `json:"-"`
4515 // ForceSendFields is a list of field names (e.g. "ConsentStores") to
4516 // unconditionally include in API requests. By default, fields with empty or
4517 // default values are omitted from API requests. See
4518 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4519 // details.
4520 ForceSendFields []string `json:"-"`
4521 // NullFields is a list of field names (e.g. "ConsentStores") to include in API
4522 // requests with the JSON null value. By default, fields with empty values are
4523 // omitted from API requests. See
4524 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4525 NullFields []string `json:"-"`
4526 }
4527
4528 func (s ListConsentStoresResponse) MarshalJSON() ([]byte, error) {
4529 type NoMethod ListConsentStoresResponse
4530 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4531 }
4532
4533 type ListConsentsResponse struct {
4534 // Consents: The returned Consents. The maximum number of Consents returned is
4535 // determined by the value of page_size in the ListConsentsRequest.
4536 Consents []*Consent `json:"consents,omitempty"`
4537 // NextPageToken: Token to retrieve the next page of results, or empty if there
4538 // are no more results in the list.
4539 NextPageToken string `json:"nextPageToken,omitempty"`
4540
4541 // ServerResponse contains the HTTP response code and headers from the server.
4542 googleapi.ServerResponse `json:"-"`
4543 // ForceSendFields is a list of field names (e.g. "Consents") to
4544 // unconditionally include in API requests. By default, fields with empty or
4545 // default values are omitted from API requests. See
4546 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4547 // details.
4548 ForceSendFields []string `json:"-"`
4549 // NullFields is a list of field names (e.g. "Consents") to include in API
4550 // requests with the JSON null value. By default, fields with empty values are
4551 // omitted from API requests. See
4552 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4553 NullFields []string `json:"-"`
4554 }
4555
4556 func (s ListConsentsResponse) MarshalJSON() ([]byte, error) {
4557 type NoMethod ListConsentsResponse
4558 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4559 }
4560
4561 // ListDatasetsResponse: Lists the available datasets.
4562 type ListDatasetsResponse struct {
4563 // Datasets: The first page of datasets.
4564 Datasets []*Dataset `json:"datasets,omitempty"`
4565 // NextPageToken: Token to retrieve the next page of results, or empty if there
4566 // are no more results in the list.
4567 NextPageToken string `json:"nextPageToken,omitempty"`
4568
4569 // ServerResponse contains the HTTP response code and headers from the server.
4570 googleapi.ServerResponse `json:"-"`
4571 // ForceSendFields is a list of field names (e.g. "Datasets") to
4572 // unconditionally include in API requests. By default, fields with empty or
4573 // default values are omitted from API requests. See
4574 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4575 // details.
4576 ForceSendFields []string `json:"-"`
4577 // NullFields is a list of field names (e.g. "Datasets") to include in API
4578 // requests with the JSON null value. By default, fields with empty values are
4579 // omitted from API requests. See
4580 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4581 NullFields []string `json:"-"`
4582 }
4583
4584 func (s ListDatasetsResponse) MarshalJSON() ([]byte, error) {
4585 type NoMethod ListDatasetsResponse
4586 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4587 }
4588
4589 // ListDicomStoresResponse: Lists the DICOM stores in the given dataset.
4590 type ListDicomStoresResponse struct {
4591 // DicomStores: The returned DICOM stores. Won't be more DICOM stores than the
4592 // value of page_size in the request.
4593 DicomStores []*DicomStore `json:"dicomStores,omitempty"`
4594 // NextPageToken: Token to retrieve the next page of results or empty if there
4595 // are no more results in the list.
4596 NextPageToken string `json:"nextPageToken,omitempty"`
4597
4598 // ServerResponse contains the HTTP response code and headers from the server.
4599 googleapi.ServerResponse `json:"-"`
4600 // ForceSendFields is a list of field names (e.g. "DicomStores") to
4601 // unconditionally include in API requests. By default, fields with empty or
4602 // default values are omitted from API requests. See
4603 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4604 // details.
4605 ForceSendFields []string `json:"-"`
4606 // NullFields is a list of field names (e.g. "DicomStores") to include in API
4607 // requests with the JSON null value. By default, fields with empty values are
4608 // omitted from API requests. See
4609 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4610 NullFields []string `json:"-"`
4611 }
4612
4613 func (s ListDicomStoresResponse) MarshalJSON() ([]byte, error) {
4614 type NoMethod ListDicomStoresResponse
4615 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4616 }
4617
4618 // ListFhirStoresResponse: Lists the FHIR stores in the given dataset.
4619 type ListFhirStoresResponse struct {
4620 // FhirStores: The returned FHIR stores. Won't be more FHIR stores than the
4621 // value of page_size in the request.
4622 FhirStores []*FhirStore `json:"fhirStores,omitempty"`
4623 // NextPageToken: Token to retrieve the next page of results or empty if there
4624 // are no more results in the list.
4625 NextPageToken string `json:"nextPageToken,omitempty"`
4626
4627 // ServerResponse contains the HTTP response code and headers from the server.
4628 googleapi.ServerResponse `json:"-"`
4629 // ForceSendFields is a list of field names (e.g. "FhirStores") to
4630 // unconditionally include in API requests. By default, fields with empty or
4631 // default values are omitted from API requests. See
4632 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4633 // details.
4634 ForceSendFields []string `json:"-"`
4635 // NullFields is a list of field names (e.g. "FhirStores") to include in API
4636 // requests with the JSON null value. By default, fields with empty values are
4637 // omitted from API requests. See
4638 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4639 NullFields []string `json:"-"`
4640 }
4641
4642 func (s ListFhirStoresResponse) MarshalJSON() ([]byte, error) {
4643 type NoMethod ListFhirStoresResponse
4644 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4645 }
4646
4647 // ListHl7V2StoresResponse: Lists the HL7v2 stores in the given dataset.
4648 type ListHl7V2StoresResponse struct {
4649 // Hl7V2Stores: The returned HL7v2 stores. Won't be more HL7v2 stores than the
4650 // value of page_size in the request.
4651 Hl7V2Stores []*Hl7V2Store `json:"hl7V2Stores,omitempty"`
4652 // NextPageToken: Token to retrieve the next page of results or empty if there
4653 // are no more results in the list.
4654 NextPageToken string `json:"nextPageToken,omitempty"`
4655
4656 // ServerResponse contains the HTTP response code and headers from the server.
4657 googleapi.ServerResponse `json:"-"`
4658 // ForceSendFields is a list of field names (e.g. "Hl7V2Stores") to
4659 // unconditionally include in API requests. By default, fields with empty or
4660 // default values are omitted from API requests. See
4661 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4662 // details.
4663 ForceSendFields []string `json:"-"`
4664 // NullFields is a list of field names (e.g. "Hl7V2Stores") to include in API
4665 // requests with the JSON null value. By default, fields with empty values are
4666 // omitted from API requests. See
4667 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4668 NullFields []string `json:"-"`
4669 }
4670
4671 func (s ListHl7V2StoresResponse) MarshalJSON() ([]byte, error) {
4672 type NoMethod ListHl7V2StoresResponse
4673 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4674 }
4675
4676 // ListLocationsResponse: The response message for Locations.ListLocations.
4677 type ListLocationsResponse struct {
4678 // Locations: A list of locations that matches the specified filter in the
4679 // request.
4680 Locations []*Location `json:"locations,omitempty"`
4681 // NextPageToken: The standard List next-page token.
4682 NextPageToken string `json:"nextPageToken,omitempty"`
4683
4684 // ServerResponse contains the HTTP response code and headers from the server.
4685 googleapi.ServerResponse `json:"-"`
4686 // ForceSendFields is a list of field names (e.g. "Locations") to
4687 // unconditionally include in API requests. By default, fields with empty or
4688 // default values are omitted from API requests. See
4689 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4690 // details.
4691 ForceSendFields []string `json:"-"`
4692 // NullFields is a list of field names (e.g. "Locations") to include in API
4693 // requests with the JSON null value. By default, fields with empty values are
4694 // omitted from API requests. See
4695 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4696 NullFields []string `json:"-"`
4697 }
4698
4699 func (s ListLocationsResponse) MarshalJSON() ([]byte, error) {
4700 type NoMethod ListLocationsResponse
4701 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4702 }
4703
4704 // ListMessagesResponse: Lists the messages in the specified HL7v2 store.
4705 type ListMessagesResponse struct {
4706 // Hl7V2Messages: The returned Messages. Won't be more Messages than the value
4707 // of page_size in the request. See view for populated fields.
4708 Hl7V2Messages []*Message `json:"hl7V2Messages,omitempty"`
4709 // NextPageToken: Token to retrieve the next page of results or empty if there
4710 // are no more results in the list.
4711 NextPageToken string `json:"nextPageToken,omitempty"`
4712
4713 // ServerResponse contains the HTTP response code and headers from the server.
4714 googleapi.ServerResponse `json:"-"`
4715 // ForceSendFields is a list of field names (e.g. "Hl7V2Messages") to
4716 // unconditionally include in API requests. By default, fields with empty or
4717 // default values are omitted from API requests. See
4718 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4719 // details.
4720 ForceSendFields []string `json:"-"`
4721 // NullFields is a list of field names (e.g. "Hl7V2Messages") to include in API
4722 // requests with the JSON null value. By default, fields with empty values are
4723 // omitted from API requests. See
4724 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4725 NullFields []string `json:"-"`
4726 }
4727
4728 func (s ListMessagesResponse) MarshalJSON() ([]byte, error) {
4729 type NoMethod ListMessagesResponse
4730 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4731 }
4732
4733 // ListOperationsResponse: The response message for Operations.ListOperations.
4734 type ListOperationsResponse struct {
4735 // NextPageToken: The standard List next-page token.
4736 NextPageToken string `json:"nextPageToken,omitempty"`
4737 // Operations: A list of operations that matches the specified filter in the
4738 // request.
4739 Operations []*Operation `json:"operations,omitempty"`
4740 // Unreachable: Unordered list. Unreachable resources. Populated when the
4741 // request sets `ListOperationsRequest.return_partial_success` and reads across
4742 // collections. For example, when attempting to list all resources across all
4743 // supported locations.
4744 Unreachable []string `json:"unreachable,omitempty"`
4745
4746 // ServerResponse contains the HTTP response code and headers from the server.
4747 googleapi.ServerResponse `json:"-"`
4748 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
4749 // unconditionally include in API requests. By default, fields with empty or
4750 // default values are omitted from API requests. See
4751 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4752 // details.
4753 ForceSendFields []string `json:"-"`
4754 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
4755 // requests with the JSON null value. By default, fields with empty values are
4756 // omitted from API requests. See
4757 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4758 NullFields []string `json:"-"`
4759 }
4760
4761 func (s ListOperationsResponse) MarshalJSON() ([]byte, error) {
4762 type NoMethod ListOperationsResponse
4763 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4764 }
4765
4766 type ListUserDataMappingsResponse struct {
4767 // NextPageToken: Token to retrieve the next page of results, or empty if there
4768 // are no more results in the list.
4769 NextPageToken string `json:"nextPageToken,omitempty"`
4770 // UserDataMappings: The returned User data mappings. The maximum number of
4771 // User data mappings returned is determined by the value of page_size in the
4772 // ListUserDataMappingsRequest.
4773 UserDataMappings []*UserDataMapping `json:"userDataMappings,omitempty"`
4774
4775 // ServerResponse contains the HTTP response code and headers from the server.
4776 googleapi.ServerResponse `json:"-"`
4777 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
4778 // unconditionally include in API requests. By default, fields with empty or
4779 // default values are omitted from API requests. See
4780 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4781 // details.
4782 ForceSendFields []string `json:"-"`
4783 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
4784 // requests with the JSON null value. By default, fields with empty values are
4785 // omitted from API requests. See
4786 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4787 NullFields []string `json:"-"`
4788 }
4789
4790 func (s ListUserDataMappingsResponse) MarshalJSON() ([]byte, error) {
4791 type NoMethod ListUserDataMappingsResponse
4792 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4793 }
4794
4795 // Location: A resource that represents a Google Cloud location.
4796 type Location struct {
4797 // DisplayName: The friendly name for this location, typically a nearby city
4798 // name. For example, "Tokyo".
4799 DisplayName string `json:"displayName,omitempty"`
4800 // Labels: Cross-service attributes for the location. For example
4801 // {"cloud.googleapis.com/region": "us-east1"}
4802 Labels map[string]string `json:"labels,omitempty"`
4803 // LocationId: The canonical id for this location. For example: "us-east1".
4804 LocationId string `json:"locationId,omitempty"`
4805 // Metadata: Service-specific metadata. For example the available capacity at
4806 // the given location.
4807 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
4808 // Name: Resource name for the location, which may vary between
4809 // implementations. For example:
4810 // "projects/example-project/locations/us-east1"
4811 Name string `json:"name,omitempty"`
4812
4813 // ServerResponse contains the HTTP response code and headers from the server.
4814 googleapi.ServerResponse `json:"-"`
4815 // ForceSendFields is a list of field names (e.g. "DisplayName") to
4816 // unconditionally include in API requests. By default, fields with empty or
4817 // default values are omitted from API requests. See
4818 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4819 // details.
4820 ForceSendFields []string `json:"-"`
4821 // NullFields is a list of field names (e.g. "DisplayName") to include in API
4822 // requests with the JSON null value. By default, fields with empty values are
4823 // omitted from API requests. See
4824 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4825 NullFields []string `json:"-"`
4826 }
4827
4828 func (s Location) MarshalJSON() ([]byte, error) {
4829 type NoMethod Location
4830 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4831 }
4832
4833 // Message: A complete HL7v2 message. See [Introduction to HL7 Standards]
4834 // (https://www.hl7.org/implement/standards/index.cfm?ref=common) for details
4835 // on the standard.
4836 type Message struct {
4837 // CreateTime: Output only. The datetime when the message was created. Set by
4838 // the server.
4839 CreateTime string `json:"createTime,omitempty"`
4840 // Data: Required. Raw message bytes.
4841 Data string `json:"data,omitempty"`
4842 // Labels: User-supplied key-value pairs used to organize HL7v2 stores. Label
4843 // keys must be between 1 and 63 characters long, have a UTF-8 encoding of
4844 // maximum 128 bytes, and must conform to the following PCRE regular
4845 // expression: \p{Ll}\p{Lo}{0,62} Label values are optional, must be between 1
4846 // and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must
4847 // conform to the following PCRE regular expression:
4848 // [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64 labels can be associated with a
4849 // given store.
4850 Labels map[string]string `json:"labels,omitempty"`
4851 // MessageType: Output only. The message type for this message. MSH-9.1.
4852 MessageType string `json:"messageType,omitempty"`
4853 // Name: Output only. Resource name of the Message, of the form
4854 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Sto
4855 // res/{hl7_v2_store_id}/messages/{message_id}`.
4856 Name string `json:"name,omitempty"`
4857 // ParsedData: Output only. The parsed version of the raw message data.
4858 ParsedData *ParsedData `json:"parsedData,omitempty"`
4859 // PatientIds: Output only. All patient IDs listed in the PID-2, PID-3, and
4860 // PID-4 segments of this message.
4861 PatientIds []*PatientId `json:"patientIds,omitempty"`
4862 // SchematizedData: Output only. The parsed version of the raw message data
4863 // schematized according to this store's schemas and type definitions.
4864 SchematizedData *SchematizedData `json:"schematizedData,omitempty"`
4865 // SendFacility: Output only. The hospital that this message came from. MSH-4.
4866 SendFacility string `json:"sendFacility,omitempty"`
4867 // SendTime: Output only. The datetime the sending application sent this
4868 // message. MSH-7.
4869 SendTime string `json:"sendTime,omitempty"`
4870
4871 // ServerResponse contains the HTTP response code and headers from the server.
4872 googleapi.ServerResponse `json:"-"`
4873 // ForceSendFields is a list of field names (e.g. "CreateTime") to
4874 // unconditionally include in API requests. By default, fields with empty or
4875 // default values are omitted from API requests. See
4876 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4877 // details.
4878 ForceSendFields []string `json:"-"`
4879 // NullFields is a list of field names (e.g. "CreateTime") to include in API
4880 // requests with the JSON null value. By default, fields with empty values are
4881 // omitted from API requests. See
4882 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4883 NullFields []string `json:"-"`
4884 }
4885
4886 func (s Message) MarshalJSON() ([]byte, error) {
4887 type NoMethod Message
4888 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4889 }
4890
4891 // NotificationConfig: Specifies where to send notifications upon changes to a
4892 // data store.
4893 type NotificationConfig struct {
4894 // PubsubTopic: The Pub/Sub (https://cloud.google.com/pubsub/docs/) topic that
4895 // notifications of changes are published on. Supplied by the client.
4896 // PubsubMessage.Data contains the resource name. PubsubMessage.MessageId is
4897 // the ID of this message. It is guaranteed to be unique within the topic.
4898 // PubsubMessage.PublishTime is the time at which the message was published.
4899 // Notifications are only sent if the topic is non-empty. Topic names
4900 // (https://cloud.google.com/pubsub/docs/overview#names) must be scoped to a
4901 // project. Cloud Healthcare API service account must have publisher
4902 // permissions on the given Pub/Sub topic. Not having adequate permissions
4903 // causes the calls that send notifications to fail. If a notification can't be
4904 // published to Pub/Sub, errors are logged to Cloud Logging (see Viewing error
4905 // logs in Cloud Logging
4906 // (https://cloud.google.com/healthcare/docs/how-tos/logging)). If the number
4907 // of errors exceeds a certain rate, some aren't submitted. Note that not all
4908 // operations trigger notifications, see Configuring Pub/Sub notifications
4909 // (https://cloud.google.com/healthcare/docs/how-tos/pubsub) for specific
4910 // details.
4911 PubsubTopic string `json:"pubsubTopic,omitempty"`
4912 // SendForBulkImport: Indicates whether or not to send Pub/Sub notifications on
4913 // bulk import. Only supported for DICOM imports.
4914 SendForBulkImport bool `json:"sendForBulkImport,omitempty"`
4915 // ForceSendFields is a list of field names (e.g. "PubsubTopic") to
4916 // unconditionally include in API requests. By default, fields with empty or
4917 // default values are omitted from API requests. See
4918 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4919 // details.
4920 ForceSendFields []string `json:"-"`
4921 // NullFields is a list of field names (e.g. "PubsubTopic") to include in API
4922 // requests with the JSON null value. By default, fields with empty values are
4923 // omitted from API requests. See
4924 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4925 NullFields []string `json:"-"`
4926 }
4927
4928 func (s NotificationConfig) MarshalJSON() ([]byte, error) {
4929 type NoMethod NotificationConfig
4930 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4931 }
4932
4933 // Operation: This resource represents a long-running operation that is the
4934 // result of a network API call.
4935 type Operation struct {
4936 // Done: If the value is `false`, it means the operation is still in progress.
4937 // If `true`, the operation is completed, and either `error` or `response` is
4938 // available.
4939 Done bool `json:"done,omitempty"`
4940 // Error: The error result of the operation in case of failure or cancellation.
4941 Error *Status `json:"error,omitempty"`
4942 // Metadata: Service-specific metadata associated with the operation. It
4943 // typically contains progress information and common metadata such as create
4944 // time. Some services might not provide such metadata. Any method that returns
4945 // a long-running operation should document the metadata type, if any.
4946 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
4947 // Name: The server-assigned name, which is only unique within the same service
4948 // that originally returns it. If you use the default HTTP mapping, the `name`
4949 // should be a resource name ending with `operations/{unique_id}`.
4950 Name string `json:"name,omitempty"`
4951 // Response: The normal, successful response of the operation. If the original
4952 // method returns no data on success, such as `Delete`, the response is
4953 // `google.protobuf.Empty`. If the original method is standard
4954 // `Get`/`Create`/`Update`, the response should be the resource. For other
4955 // methods, the response should have the type `XxxResponse`, where `Xxx` is the
4956 // original method name. For example, if the original method name is
4957 // `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
4958 Response googleapi.RawMessage `json:"response,omitempty"`
4959
4960 // ServerResponse contains the HTTP response code and headers from the server.
4961 googleapi.ServerResponse `json:"-"`
4962 // ForceSendFields is a list of field names (e.g. "Done") to unconditionally
4963 // include in API requests. By default, fields with empty or default values are
4964 // omitted from API requests. See
4965 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4966 // details.
4967 ForceSendFields []string `json:"-"`
4968 // NullFields is a list of field names (e.g. "Done") to include in API requests
4969 // with the JSON null value. By default, fields with empty values are omitted
4970 // from API requests. See
4971 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4972 NullFields []string `json:"-"`
4973 }
4974
4975 func (s Operation) MarshalJSON() ([]byte, error) {
4976 type NoMethod Operation
4977 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4978 }
4979
4980 // OperationMetadata: OperationMetadata provides information about the
4981 // operation execution. Returned in the long-running operation's metadata
4982 // field.
4983 type OperationMetadata struct {
4984 // ApiMethodName: The name of the API method that initiated the operation.
4985 ApiMethodName string `json:"apiMethodName,omitempty"`
4986 // CancelRequested: Specifies if cancellation was requested for the operation.
4987 CancelRequested bool `json:"cancelRequested,omitempty"`
4988 Counter *ProgressCounter `json:"counter,omitempty"`
4989 // CreateTime: The time at which the operation was created by the API.
4990 CreateTime string `json:"createTime,omitempty"`
4991 // EndTime: The time at which execution was completed.
4992 EndTime string `json:"endTime,omitempty"`
4993 // LogsUrl: A link to audit and error logs in the log viewer. Error logs are
4994 // generated only by some operations, listed at Viewing error logs in Cloud
4995 // Logging (https://cloud.google.com/healthcare/docs/how-tos/logging).
4996 LogsUrl string `json:"logsUrl,omitempty"`
4997 // ForceSendFields is a list of field names (e.g. "ApiMethodName") to
4998 // unconditionally include in API requests. By default, fields with empty or
4999 // default values are omitted from API requests. See
5000 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5001 // details.
5002 ForceSendFields []string `json:"-"`
5003 // NullFields is a list of field names (e.g. "ApiMethodName") to include in API
5004 // requests with the JSON null value. By default, fields with empty values are
5005 // omitted from API requests. See
5006 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5007 NullFields []string `json:"-"`
5008 }
5009
5010 func (s OperationMetadata) MarshalJSON() ([]byte, error) {
5011 type NoMethod OperationMetadata
5012 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5013 }
5014
5015 // ParsedData: The content of a HL7v2 message in a structured format.
5016 type ParsedData struct {
5017 Segments []*Segment `json:"segments,omitempty"`
5018 // ForceSendFields is a list of field names (e.g. "Segments") to
5019 // unconditionally include in API requests. By default, fields with empty or
5020 // default values are omitted from API requests. See
5021 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5022 // details.
5023 ForceSendFields []string `json:"-"`
5024 // NullFields is a list of field names (e.g. "Segments") to include in API
5025 // requests with the JSON null value. By default, fields with empty values are
5026 // omitted from API requests. See
5027 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5028 NullFields []string `json:"-"`
5029 }
5030
5031 func (s ParsedData) MarshalJSON() ([]byte, error) {
5032 type NoMethod ParsedData
5033 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5034 }
5035
5036 // ParserConfig: The configuration for the parser. It determines how the server
5037 // parses the messages.
5038 type ParserConfig struct {
5039 // AllowNullHeader: Optional. Determines whether messages with no header are
5040 // allowed.
5041 AllowNullHeader bool `json:"allowNullHeader,omitempty"`
5042 // Schema: Optional. Schemas used to parse messages in this store, if
5043 // schematized parsing is desired.
5044 Schema *SchemaPackage `json:"schema,omitempty"`
5045 // SegmentTerminator: Optional. Byte(s) to use as the segment terminator. If
5046 // this is unset, '\r' is used as segment terminator, matching the HL7 version
5047 // 2 specification.
5048 SegmentTerminator string `json:"segmentTerminator,omitempty"`
5049 // Version: Immutable. Determines the version of both the default parser to be
5050 // used when `schema` is not given, as well as the schematized parser used when
5051 // `schema` is specified. This field is immutable after HL7v2 store creation.
5052 //
5053 // Possible values:
5054 // "PARSER_VERSION_UNSPECIFIED" - Unspecified parser version, equivalent to
5055 // V1.
5056 // "V1" - The `parsed_data` includes every given non-empty message field
5057 // except the Field Separator (MSH-1) field. As a result, the parsed MSH
5058 // segment starts with the MSH-2 field and the field numbers are off-by-one
5059 // with respect to the HL7 standard.
5060 // "V2" - The `parsed_data` includes every given non-empty message field.
5061 // "V3" - This version is the same as V2, with the following change. The
5062 // `parsed_data` contains unescaped escaped field separators, component
5063 // separators, sub-component separators, repetition separators, escape
5064 // characters, and truncation characters. If `schema` is specified, the
5065 // schematized parser uses improved parsing heuristics compared to previous
5066 // versions.
5067 Version string `json:"version,omitempty"`
5068 // ForceSendFields is a list of field names (e.g. "AllowNullHeader") to
5069 // unconditionally include in API requests. By default, fields with empty or
5070 // default values are omitted from API requests. See
5071 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5072 // details.
5073 ForceSendFields []string `json:"-"`
5074 // NullFields is a list of field names (e.g. "AllowNullHeader") to include in
5075 // API requests with the JSON null value. By default, fields with empty values
5076 // are omitted from API requests. See
5077 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5078 NullFields []string `json:"-"`
5079 }
5080
5081 func (s ParserConfig) MarshalJSON() ([]byte, error) {
5082 type NoMethod ParserConfig
5083 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5084 }
5085
5086 // PatientId: A patient identifier and associated type.
5087 type PatientId struct {
5088 // Type: ID type. For example, MRN or NHS.
5089 Type string `json:"type,omitempty"`
5090 // Value: The patient's unique identifier.
5091 Value string `json:"value,omitempty"`
5092 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally
5093 // include in API requests. By default, fields with empty or default values are
5094 // omitted from API requests. See
5095 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5096 // details.
5097 ForceSendFields []string `json:"-"`
5098 // NullFields is a list of field names (e.g. "Type") to include in API requests
5099 // with the JSON null value. By default, fields with empty values are omitted
5100 // from API requests. See
5101 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5102 NullFields []string `json:"-"`
5103 }
5104
5105 func (s PatientId) MarshalJSON() ([]byte, error) {
5106 type NoMethod PatientId
5107 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5108 }
5109
5110 // PatientScope: Apply consents given by a list of patients.
5111 type PatientScope struct {
5112 // PatientIds: Optional. The list of patient IDs whose Consent resources will
5113 // be enforced. At most 10,000 patients can be specified. An empty list is
5114 // equivalent to all patients (meaning the entire FHIR store).
5115 PatientIds []string `json:"patientIds,omitempty"`
5116 // ForceSendFields is a list of field names (e.g. "PatientIds") to
5117 // unconditionally include in API requests. By default, fields with empty or
5118 // default values are omitted from API requests. See
5119 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5120 // details.
5121 ForceSendFields []string `json:"-"`
5122 // NullFields is a list of field names (e.g. "PatientIds") to include in API
5123 // requests with the JSON null value. By default, fields with empty values are
5124 // omitted from API requests. See
5125 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5126 NullFields []string `json:"-"`
5127 }
5128
5129 func (s PatientScope) MarshalJSON() ([]byte, error) {
5130 type NoMethod PatientScope
5131 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5132 }
5133
5134 // Policy: An Identity and Access Management (IAM) policy, which specifies
5135 // access controls for Google Cloud resources. A `Policy` is a collection of
5136 // `bindings`. A `binding` binds one or more `members`, or principals, to a
5137 // single `role`. Principals can be user accounts, service accounts, Google
5138 // groups, and domains (such as G Suite). A `role` is a named list of
5139 // permissions; each `role` can be an IAM predefined role or a user-created
5140 // custom role. For some types of Google Cloud resources, a `binding` can also
5141 // specify a `condition`, which is a logical expression that allows access to a
5142 // resource only if the expression evaluates to `true`. A condition can add
5143 // constraints based on attributes of the request, the resource, or both. To
5144 // learn which resources support conditions in their IAM policies, see the IAM
5145 // documentation
5146 // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON
5147 // example:** ``` { "bindings": [ { "role":
5148 // "roles/resourcemanager.organizationAdmin", "members": [
5149 // "user:[email protected]", "group:[email protected]", "domain:google.com",
5150 // "serviceAccount:[email protected]" ] }, { "role":
5151 // "roles/resourcemanager.organizationViewer", "members": [
5152 // "user:[email protected]" ], "condition": { "title": "expirable access",
5153 // "description": "Does not grant access after Sep 2020", "expression":
5154 // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag":
5155 // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: -
5156 // members: - user:[email protected] - group:[email protected] -
5157 // domain:google.com - serviceAccount:[email protected]
5158 // role: roles/resourcemanager.organizationAdmin - members: -
5159 // user:[email protected] role: roles/resourcemanager.organizationViewer
5160 // condition: title: expirable access description: Does not grant access after
5161 // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
5162 // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features,
5163 // see the IAM documentation (https://cloud.google.com/iam/docs/).
5164 type Policy struct {
5165 // AuditConfigs: Specifies cloud audit logging configuration for this policy.
5166 AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
5167 // Bindings: Associates a list of `members`, or principals, with a `role`.
5168 // Optionally, may specify a `condition` that determines how and when the
5169 // `bindings` are applied. Each of the `bindings` must contain at least one
5170 // principal. The `bindings` in a `Policy` can refer to up to 1,500 principals;
5171 // up to 250 of these principals can be Google groups. Each occurrence of a
5172 // principal counts towards these limits. For example, if the `bindings` grant
5173 // 50 different roles to `user:[email protected]`, and not to any other
5174 // principal, then you can add another 1,450 principals to the `bindings` in
5175 // the `Policy`.
5176 Bindings []*Binding `json:"bindings,omitempty"`
5177 // Etag: `etag` is used for optimistic concurrency control as a way to help
5178 // prevent simultaneous updates of a policy from overwriting each other. It is
5179 // strongly suggested that systems make use of the `etag` in the
5180 // read-modify-write cycle to perform policy updates in order to avoid race
5181 // conditions: An `etag` is returned in the response to `getIamPolicy`, and
5182 // systems are expected to put that etag in the request to `setIamPolicy` to
5183 // ensure that their change will be applied to the same version of the policy.
5184 // **Important:** If you use IAM Conditions, you must include the `etag` field
5185 // whenever you call `setIamPolicy`. If you omit this field, then IAM allows
5186 // you to overwrite a version `3` policy with a version `1` policy, and all of
5187 // the conditions in the version `3` policy are lost.
5188 Etag string `json:"etag,omitempty"`
5189 // Version: Specifies the format of the policy. Valid values are `0`, `1`, and
5190 // `3`. Requests that specify an invalid value are rejected. Any operation that
5191 // affects conditional role bindings must specify version `3`. This requirement
5192 // applies to the following operations: * Getting a policy that includes a
5193 // conditional role binding * Adding a conditional role binding to a policy *
5194 // Changing a conditional role binding in a policy * Removing any role binding,
5195 // with or without a condition, from a policy that includes conditions
5196 // **Important:** If you use IAM Conditions, you must include the `etag` field
5197 // whenever you call `setIamPolicy`. If you omit this field, then IAM allows
5198 // you to overwrite a version `3` policy with a version `1` policy, and all of
5199 // the conditions in the version `3` policy are lost. If a policy does not
5200 // include any conditions, operations on that policy may specify any valid
5201 // version or leave the field unset. To learn which resources support
5202 // conditions in their IAM policies, see the IAM documentation
5203 // (https://cloud.google.com/iam/help/conditions/resource-policies).
5204 Version int64 `json:"version,omitempty"`
5205
5206 // ServerResponse contains the HTTP response code and headers from the server.
5207 googleapi.ServerResponse `json:"-"`
5208 // ForceSendFields is a list of field names (e.g. "AuditConfigs") to
5209 // unconditionally include in API requests. By default, fields with empty or
5210 // default values are omitted from API requests. See
5211 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5212 // details.
5213 ForceSendFields []string `json:"-"`
5214 // NullFields is a list of field names (e.g. "AuditConfigs") to include in API
5215 // requests with the JSON null value. By default, fields with empty values are
5216 // omitted from API requests. See
5217 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5218 NullFields []string `json:"-"`
5219 }
5220
5221 func (s Policy) MarshalJSON() ([]byte, error) {
5222 type NoMethod Policy
5223 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5224 }
5225
5226 // ProgressCounter: ProgressCounter provides counters to describe an
5227 // operation's progress.
5228 type ProgressCounter struct {
5229 // Failure: The number of units that failed in the operation.
5230 Failure int64 `json:"failure,omitempty,string"`
5231 // Pending: The number of units that are pending in the operation.
5232 Pending int64 `json:"pending,omitempty,string"`
5233 // SecondaryFailure: The number of secondary units that failed in the
5234 // operation.
5235 SecondaryFailure int64 `json:"secondaryFailure,omitempty,string"`
5236 // SecondarySuccess: The number of secondary units that succeeded in the
5237 // operation.
5238 SecondarySuccess int64 `json:"secondarySuccess,omitempty,string"`
5239 // Success: The number of units that succeeded in the operation.
5240 Success int64 `json:"success,omitempty,string"`
5241 // ForceSendFields is a list of field names (e.g. "Failure") to unconditionally
5242 // include in API requests. By default, fields with empty or default values are
5243 // omitted from API requests. See
5244 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5245 // details.
5246 ForceSendFields []string `json:"-"`
5247 // NullFields is a list of field names (e.g. "Failure") to include in API
5248 // requests with the JSON null value. By default, fields with empty values are
5249 // omitted from API requests. See
5250 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5251 NullFields []string `json:"-"`
5252 }
5253
5254 func (s ProgressCounter) MarshalJSON() ([]byte, error) {
5255 type NoMethod ProgressCounter
5256 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5257 }
5258
5259 // PubsubDestination: The Pub/Sub output destination. The Cloud Healthcare
5260 // Service Agent requires the `roles/pubsub.publisher` Cloud IAM role on the
5261 // Pub/Sub topic.
5262 type PubsubDestination struct {
5263 // PubsubTopic: The Pub/Sub (https://cloud.google.com/pubsub/docs/) topic that
5264 // Pub/Sub messages are published on. Supplied by the client. The
5265 // `PubsubMessage` contains the following fields: * `PubsubMessage.Data`
5266 // contains the resource name. * `PubsubMessage.MessageId` is the ID of this
5267 // notification. It is guaranteed to be unique within the topic. *
5268 // `PubsubMessage.PublishTime` is the time when the message was published.
5269 // Topic names (https://cloud.google.com/pubsub/docs/overview#names) must be
5270 // scoped to a project. The Cloud Healthcare API service account,
5271 // [email protected], must have
5272 // publisher permissions on the given Pub/Sub topic. Not having adequate
5273 // permissions causes the calls that send notifications to fail.
5274 PubsubTopic string `json:"pubsubTopic,omitempty"`
5275 // ForceSendFields is a list of field names (e.g. "PubsubTopic") to
5276 // unconditionally include in API requests. By default, fields with empty or
5277 // default values are omitted from API requests. See
5278 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5279 // details.
5280 ForceSendFields []string `json:"-"`
5281 // NullFields is a list of field names (e.g. "PubsubTopic") to include in API
5282 // requests with the JSON null value. By default, fields with empty values are
5283 // omitted from API requests. See
5284 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5285 NullFields []string `json:"-"`
5286 }
5287
5288 func (s PubsubDestination) MarshalJSON() ([]byte, error) {
5289 type NoMethod PubsubDestination
5290 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5291 }
5292
5293 // QueryAccessibleDataRequest: Queries all data_ids that are consented for a
5294 // given use in the given consent store and writes them to a specified
5295 // destination. The returned Operation includes a progress counter for the
5296 // number of User data mappings processed. Errors are logged to Cloud Logging
5297 // (see [Viewing error logs in Cloud Logging]
5298 // (https://cloud.google.com/healthcare/docs/how-tos/logging) and
5299 // [QueryAccessibleData] for a sample log entry).
5300 type QueryAccessibleDataRequest struct {
5301 // GcsDestination: The Cloud Storage destination. The Cloud Healthcare API
5302 // service account must have the `roles/storage.objectAdmin` Cloud IAM role for
5303 // this Cloud Storage location.
5304 GcsDestination *GoogleCloudHealthcareV1ConsentGcsDestination `json:"gcsDestination,omitempty"`
5305 // RequestAttributes: The values of request attributes associated with this
5306 // access request.
5307 RequestAttributes map[string]string `json:"requestAttributes,omitempty"`
5308 // ResourceAttributes: Optional. The values of resource attributes associated
5309 // with the type of resources being requested. If no values are specified, then
5310 // all resource types are included in the output.
5311 ResourceAttributes map[string]string `json:"resourceAttributes,omitempty"`
5312 // ForceSendFields is a list of field names (e.g. "GcsDestination") to
5313 // unconditionally include in API requests. By default, fields with empty or
5314 // default values are omitted from API requests. See
5315 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5316 // details.
5317 ForceSendFields []string `json:"-"`
5318 // NullFields is a list of field names (e.g. "GcsDestination") to include in
5319 // API requests with the JSON null value. By default, fields with empty values
5320 // are omitted from API requests. See
5321 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5322 NullFields []string `json:"-"`
5323 }
5324
5325 func (s QueryAccessibleDataRequest) MarshalJSON() ([]byte, error) {
5326 type NoMethod QueryAccessibleDataRequest
5327 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5328 }
5329
5330 // QueryAccessibleDataResponse: Response for successful QueryAccessibleData
5331 // operations. This structure is included in the response upon operation
5332 // completion.
5333 type QueryAccessibleDataResponse struct {
5334 // GcsUris: List of files, each of which contains a list of data_id(s) that are
5335 // consented for a specified use in the request.
5336 GcsUris []string `json:"gcsUris,omitempty"`
5337 // ForceSendFields is a list of field names (e.g. "GcsUris") to unconditionally
5338 // include in API requests. By default, fields with empty or default values are
5339 // omitted from API requests. See
5340 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5341 // details.
5342 ForceSendFields []string `json:"-"`
5343 // NullFields is a list of field names (e.g. "GcsUris") to include in API
5344 // requests with the JSON null value. By default, fields with empty values are
5345 // omitted from API requests. See
5346 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5347 NullFields []string `json:"-"`
5348 }
5349
5350 func (s QueryAccessibleDataResponse) MarshalJSON() ([]byte, error) {
5351 type NoMethod QueryAccessibleDataResponse
5352 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5353 }
5354
5355 // RedactConfig: Define how to redact sensitive values. Default behaviour is
5356 // erase. For example, "My name is Jane." becomes "My name is ."
5357 type RedactConfig struct {
5358 }
5359
5360 // RejectConsentRequest: Rejects the latest revision of the specified Consent
5361 // by committing a new revision with `state` updated to `REJECTED`. If the
5362 // latest revision of the given Consent is in the `REJECTED` state, no new
5363 // revision is committed.
5364 type RejectConsentRequest struct {
5365 // ConsentArtifact: Optional. The resource name of the Consent artifact that
5366 // contains documentation of the user's rejection of the draft Consent, of the
5367 // form
5368 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentS
5369 // tores/{consent_store_id}/consentArtifacts/{consent_artifact_id}`. If the
5370 // draft Consent had a Consent artifact, this Consent artifact overwrites it.
5371 ConsentArtifact string `json:"consentArtifact,omitempty"`
5372 // ForceSendFields is a list of field names (e.g. "ConsentArtifact") to
5373 // unconditionally include in API requests. By default, fields with empty or
5374 // default values are omitted from API requests. See
5375 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5376 // details.
5377 ForceSendFields []string `json:"-"`
5378 // NullFields is a list of field names (e.g. "ConsentArtifact") to include in
5379 // API requests with the JSON null value. By default, fields with empty values
5380 // are omitted from API requests. See
5381 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5382 NullFields []string `json:"-"`
5383 }
5384
5385 func (s RejectConsentRequest) MarshalJSON() ([]byte, error) {
5386 type NoMethod RejectConsentRequest
5387 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5388 }
5389
5390 // ReplaceWithInfoTypeConfig: When using the INSPECT_AND_TRANSFORM action, each
5391 // match is replaced with the name of the info_type. For example, "My name is
5392 // Jane" becomes "My name is [PERSON_NAME]." The TRANSFORM action is equivalent
5393 // to redacting.
5394 type ReplaceWithInfoTypeConfig struct {
5395 }
5396
5397 // Resources: A list of FHIR resources.
5398 type Resources struct {
5399 // Resources: List of resources IDs. For example, "Patient/1234".
5400 Resources []string `json:"resources,omitempty"`
5401 // ForceSendFields is a list of field names (e.g. "Resources") to
5402 // unconditionally include in API requests. By default, fields with empty or
5403 // default values are omitted from API requests. See
5404 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5405 // details.
5406 ForceSendFields []string `json:"-"`
5407 // NullFields is a list of field names (e.g. "Resources") to include in API
5408 // requests with the JSON null value. By default, fields with empty values are
5409 // omitted from API requests. See
5410 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5411 NullFields []string `json:"-"`
5412 }
5413
5414 func (s Resources) MarshalJSON() ([]byte, error) {
5415 type NoMethod Resources
5416 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5417 }
5418
5419 // Result: The consent evaluation result for a single `data_id`.
5420 type Result struct {
5421 // ConsentDetails: The resource names of all evaluated Consents mapped to their
5422 // evaluation.
5423 ConsentDetails map[string]ConsentEvaluation `json:"consentDetails,omitempty"`
5424 // Consented: Whether the resource is consented for the given use.
5425 Consented bool `json:"consented,omitempty"`
5426 // DataId: The unique identifier of the evaluated resource.
5427 DataId string `json:"dataId,omitempty"`
5428 // ForceSendFields is a list of field names (e.g. "ConsentDetails") to
5429 // unconditionally include in API requests. By default, fields with empty or
5430 // default values are omitted from API requests. See
5431 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5432 // details.
5433 ForceSendFields []string `json:"-"`
5434 // NullFields is a list of field names (e.g. "ConsentDetails") to include in
5435 // API requests with the JSON null value. By default, fields with empty values
5436 // are omitted from API requests. See
5437 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5438 NullFields []string `json:"-"`
5439 }
5440
5441 func (s Result) MarshalJSON() ([]byte, error) {
5442 type NoMethod Result
5443 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5444 }
5445
5446 // RevokeConsentRequest: Revokes the latest revision of the specified Consent
5447 // by committing a new revision with `state` updated to `REVOKED`. If the
5448 // latest revision of the given Consent is in the `REVOKED` state, no new
5449 // revision is committed.
5450 type RevokeConsentRequest struct {
5451 // ConsentArtifact: Optional. The resource name of the Consent artifact that
5452 // contains proof of the user's revocation of the Consent, of the form
5453 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentS
5454 // tores/{consent_store_id}/consentArtifacts/{consent_artifact_id}`.
5455 ConsentArtifact string `json:"consentArtifact,omitempty"`
5456 // ForceSendFields is a list of field names (e.g. "ConsentArtifact") to
5457 // unconditionally include in API requests. By default, fields with empty or
5458 // default values are omitted from API requests. See
5459 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5460 // details.
5461 ForceSendFields []string `json:"-"`
5462 // NullFields is a list of field names (e.g. "ConsentArtifact") to include in
5463 // API requests with the JSON null value. By default, fields with empty values
5464 // are omitted from API requests. See
5465 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5466 NullFields []string `json:"-"`
5467 }
5468
5469 func (s RevokeConsentRequest) MarshalJSON() ([]byte, error) {
5470 type NoMethod RevokeConsentRequest
5471 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5472 }
5473
5474 type RollbackFhirResourceFilteringFields struct {
5475 // MetadataFilter: Optional. A filter expression that matches data in the
5476 // `Resource.meta` element. Supports all filters in AIP-160
5477 // (https://google.aip.dev/160) except the "has" (`:`) operator. Supports the
5478 // following custom functions: * `tag("") = "" for tag filtering. *
5479 // `extension_value_ts("") = ` for filtering extensions with a timestamp, where
5480 // `` is a Unix timestamp. Supports the `>`, `<`, `<=`, `>=`, and `!=`
5481 // comparison operators.
5482 MetadataFilter string `json:"metadataFilter,omitempty"`
5483 // OperationIds: Optional. A list of operation IDs to roll back.
5484 OperationIds googleapi.Uint64s `json:"operationIds,omitempty"`
5485 // ForceSendFields is a list of field names (e.g. "MetadataFilter") to
5486 // unconditionally include in API requests. By default, fields with empty or
5487 // default values are omitted from API requests. See
5488 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5489 // details.
5490 ForceSendFields []string `json:"-"`
5491 // NullFields is a list of field names (e.g. "MetadataFilter") to include in
5492 // API requests with the JSON null value. By default, fields with empty values
5493 // are omitted from API requests. See
5494 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5495 NullFields []string `json:"-"`
5496 }
5497
5498 func (s RollbackFhirResourceFilteringFields) MarshalJSON() ([]byte, error) {
5499 type NoMethod RollbackFhirResourceFilteringFields
5500 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5501 }
5502
5503 type RollbackFhirResourcesRequest struct {
5504 // ChangeType: Optional. CREATE/UPDATE/DELETE/ALL for reverting all txns of a
5505 // certain type.
5506 //
5507 // Possible values:
5508 // "CHANGE_TYPE_UNSPECIFIED" - When unspecified, revert all transactions
5509 // "ALL" - All transactions
5510 // "CREATE" - Revert only CREATE transactions
5511 // "UPDATE" - Revert only Update transactions
5512 // "DELETE" - Revert only Delete transactions
5513 ChangeType string `json:"changeType,omitempty"`
5514 // ExcludeRollbacks: Optional. Specifies whether to exclude earlier rollbacks.
5515 ExcludeRollbacks bool `json:"excludeRollbacks,omitempty"`
5516 // FilteringFields: Optional. Parameters for filtering resources
5517 FilteringFields *RollbackFhirResourceFilteringFields `json:"filteringFields,omitempty"`
5518 // Force: Optional. When enabled, changes will be reverted without explicit
5519 // confirmation
5520 Force bool `json:"force,omitempty"`
5521 // InputGcsObject: Optional. Cloud Storage object containing list of
5522 // {resourceType}/{resourceId} lines, identifying resources to be reverted
5523 InputGcsObject string `json:"inputGcsObject,omitempty"`
5524 // ResultGcsBucket: Required. Bucket to deposit result
5525 ResultGcsBucket string `json:"resultGcsBucket,omitempty"`
5526 // RollbackTime: Required. Time point to rollback to.
5527 RollbackTime string `json:"rollbackTime,omitempty"`
5528 // Type: Optional. If specified, revert only resources of these types
5529 Type []string `json:"type,omitempty"`
5530 // ForceSendFields is a list of field names (e.g. "ChangeType") to
5531 // unconditionally include in API requests. By default, fields with empty or
5532 // default values are omitted from API requests. See
5533 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5534 // details.
5535 ForceSendFields []string `json:"-"`
5536 // NullFields is a list of field names (e.g. "ChangeType") to include in API
5537 // requests with the JSON null value. By default, fields with empty values are
5538 // omitted from API requests. See
5539 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5540 NullFields []string `json:"-"`
5541 }
5542
5543 func (s RollbackFhirResourcesRequest) MarshalJSON() ([]byte, error) {
5544 type NoMethod RollbackFhirResourcesRequest
5545 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5546 }
5547
5548 // RollbackFhirResourcesResponse: Final response of rollback FIHR resources
5549 // request.
5550 type RollbackFhirResourcesResponse struct {
5551 // FhirStore: The name of the FHIR store to rollback, in the format of
5552 // "projects/{project_id}/locations/{location_id}/datasets/{dataset_id}
5553 // /fhirStores/{fhir_store_id}".
5554 FhirStore string `json:"fhirStore,omitempty"`
5555 // ForceSendFields is a list of field names (e.g. "FhirStore") to
5556 // unconditionally include in API requests. By default, fields with empty or
5557 // default values are omitted from API requests. See
5558 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5559 // details.
5560 ForceSendFields []string `json:"-"`
5561 // NullFields is a list of field names (e.g. "FhirStore") to include in API
5562 // requests with the JSON null value. By default, fields with empty values are
5563 // omitted from API requests. See
5564 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5565 NullFields []string `json:"-"`
5566 }
5567
5568 func (s RollbackFhirResourcesResponse) MarshalJSON() ([]byte, error) {
5569 type NoMethod RollbackFhirResourcesResponse
5570 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5571 }
5572
5573 // RollbackHL7MessagesFilteringFields: Filtering fields for an HL7v2 rollback.
5574 // Currently only supports a list of operation ids to roll back.
5575 type RollbackHL7MessagesFilteringFields struct {
5576 // OperationIds: Optional. A list of operation IDs to roll back.
5577 OperationIds googleapi.Uint64s `json:"operationIds,omitempty"`
5578 // ForceSendFields is a list of field names (e.g. "OperationIds") to
5579 // unconditionally include in API requests. By default, fields with empty or
5580 // default values are omitted from API requests. See
5581 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5582 // details.
5583 ForceSendFields []string `json:"-"`
5584 // NullFields is a list of field names (e.g. "OperationIds") to include in API
5585 // requests with the JSON null value. By default, fields with empty values are
5586 // omitted from API requests. See
5587 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5588 NullFields []string `json:"-"`
5589 }
5590
5591 func (s RollbackHL7MessagesFilteringFields) MarshalJSON() ([]byte, error) {
5592 type NoMethod RollbackHL7MessagesFilteringFields
5593 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5594 }
5595
5596 // RollbackHl7V2MessagesRequest: Point in time recovery rollback request.
5597 type RollbackHl7V2MessagesRequest struct {
5598 // ChangeType: Optional. CREATE/UPDATE/DELETE/ALL for reverting all txns of a
5599 // certain type.
5600 //
5601 // Possible values:
5602 // "CHANGE_TYPE_UNSPECIFIED" - When unspecified, revert all transactions
5603 // "ALL" - All transactions
5604 // "CREATE" - Revert only CREATE transactions
5605 // "UPDATE" - Revert only Update transactions
5606 // "DELETE" - Revert only Delete transactions
5607 ChangeType string `json:"changeType,omitempty"`
5608 // ExcludeRollbacks: Optional. Specifies whether to exclude earlier rollbacks.
5609 ExcludeRollbacks bool `json:"excludeRollbacks,omitempty"`
5610 // FilteringFields: Optional. Parameters for filtering.
5611 FilteringFields *RollbackHL7MessagesFilteringFields `json:"filteringFields,omitempty"`
5612 // Force: Optional. When enabled, changes will be reverted without explicit
5613 // confirmation.
5614 Force bool `json:"force,omitempty"`
5615 // InputGcsObject: Optional. Cloud storage object containing list of
5616 // {resourceId} lines, identifying resources to be reverted
5617 InputGcsObject string `json:"inputGcsObject,omitempty"`
5618 // ResultGcsBucket: Required. Bucket to deposit result
5619 ResultGcsBucket string `json:"resultGcsBucket,omitempty"`
5620 // RollbackTime: Required. Times point to rollback to.
5621 RollbackTime string `json:"rollbackTime,omitempty"`
5622 // ForceSendFields is a list of field names (e.g. "ChangeType") to
5623 // unconditionally include in API requests. By default, fields with empty or
5624 // default values are omitted from API requests. See
5625 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5626 // details.
5627 ForceSendFields []string `json:"-"`
5628 // NullFields is a list of field names (e.g. "ChangeType") to include in API
5629 // requests with the JSON null value. By default, fields with empty values are
5630 // omitted from API requests. See
5631 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5632 NullFields []string `json:"-"`
5633 }
5634
5635 func (s RollbackHl7V2MessagesRequest) MarshalJSON() ([]byte, error) {
5636 type NoMethod RollbackHl7V2MessagesRequest
5637 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5638 }
5639
5640 // RollbackHl7V2MessagesResponse: Final response of rollback HL7v2 messages
5641 // request.
5642 type RollbackHl7V2MessagesResponse struct {
5643 // Hl7v2Store: The name of the HL7v2 store to rollback, in the format of
5644 // "projects/{project_id}/locations/{location_id}/datasets/{dataset_id}
5645 // /hl7v2Stores/{hl7v2_store_id}".
5646 Hl7v2Store string `json:"hl7v2Store,omitempty"`
5647 // ForceSendFields is a list of field names (e.g. "Hl7v2Store") to
5648 // unconditionally include in API requests. By default, fields with empty or
5649 // default values are omitted from API requests. See
5650 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5651 // details.
5652 ForceSendFields []string `json:"-"`
5653 // NullFields is a list of field names (e.g. "Hl7v2Store") to include in API
5654 // requests with the JSON null value. By default, fields with empty values are
5655 // omitted from API requests. See
5656 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5657 NullFields []string `json:"-"`
5658 }
5659
5660 func (s RollbackHl7V2MessagesResponse) MarshalJSON() ([]byte, error) {
5661 type NoMethod RollbackHl7V2MessagesResponse
5662 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5663 }
5664
5665 // SchemaConfig: Configuration for the FHIR BigQuery schema. Determines how the
5666 // server generates the schema.
5667 type SchemaConfig struct {
5668 // LastUpdatedPartitionConfig: The configuration for exported BigQuery tables
5669 // to be partitioned by FHIR resource's last updated time column.
5670 LastUpdatedPartitionConfig *TimePartitioning `json:"lastUpdatedPartitionConfig,omitempty"`
5671 // RecursiveStructureDepth: The depth for all recursive structures in the
5672 // output analytics schema. For example, `concept` in the CodeSystem resource
5673 // is a recursive structure; when the depth is 2, the CodeSystem table will
5674 // have a column called `concept.concept` but not `concept.concept.concept`. If
5675 // not specified or set to 0, the server will use the default value 2. The
5676 // maximum depth allowed is 5.
5677 RecursiveStructureDepth int64 `json:"recursiveStructureDepth,omitempty,string"`
5678 // SchemaType: Specifies the output schema type. Schema type is required.
5679 //
5680 // Possible values:
5681 // "SCHEMA_TYPE_UNSPECIFIED" - No schema type specified. This type is
5682 // unsupported.
5683 // "ANALYTICS" - Analytics schema defined by the FHIR community. See
5684 // https://github.com/FHIR/sql-on-fhir/blob/master/sql-on-fhir.md. BigQuery
5685 // only allows a maximum of 10,000 columns per table. Due to this limitation,
5686 // the server will not generate schemas for fields of type `Resource`, which
5687 // can hold any resource type. The affected fields are
5688 // `Parameters.parameter.resource`, `Bundle.entry.resource`, and
5689 // `Bundle.entry.response.outcome`. Analytics schema does not gracefully handle
5690 // extensions with one or more occurrences, anaytics schema also does not
5691 // handle contained resource. Additionally, extensions with a URL ending in
5692 // "/{existing_resource_field_name}" may cause undefined behavior.
5693 // "ANALYTICS_V2" - Analytics V2, similar to schema defined by the FHIR
5694 // community, with added support for extensions with one or more occurrences
5695 // and contained resources in stringified JSON. Extensions with a URL ending in
5696 // "/{existing_resource_field_name}" will cause conflict and prevent the
5697 // resource from being sent to BigQuery. Analytics V2 uses more space in the
5698 // destination table than Analytics V1. It is generally recommended to use
5699 // Analytics V2 over Analytics.
5700 SchemaType string `json:"schemaType,omitempty"`
5701 // ForceSendFields is a list of field names (e.g. "LastUpdatedPartitionConfig")
5702 // to unconditionally include in API requests. By default, fields with empty or
5703 // default values are omitted from API requests. See
5704 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5705 // details.
5706 ForceSendFields []string `json:"-"`
5707 // NullFields is a list of field names (e.g. "LastUpdatedPartitionConfig") to
5708 // include in API requests with the JSON null value. By default, fields with
5709 // empty values are omitted from API requests. See
5710 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5711 NullFields []string `json:"-"`
5712 }
5713
5714 func (s SchemaConfig) MarshalJSON() ([]byte, error) {
5715 type NoMethod SchemaConfig
5716 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5717 }
5718
5719 // SchemaFlattened: Using this field will flatten the DICOM instances into a
5720 // BigQuery table. The table will have one column for each DICOM tag. The
5721 // column name will be the DICOM tag's textual representation.
5722 type SchemaFlattened struct {
5723 }
5724
5725 // SchemaGroup: An HL7v2 logical group construct.
5726 type SchemaGroup struct {
5727 // Choice: True indicates that this is a choice group, meaning that only one of
5728 // its segments can exist in a given message.
5729 Choice bool `json:"choice,omitempty"`
5730 // MaxOccurs: The maximum number of times this group can be repeated. 0 or -1
5731 // means unbounded.
5732 MaxOccurs int64 `json:"maxOccurs,omitempty"`
5733 // Members: Nested groups and/or segments.
5734 Members []*GroupOrSegment `json:"members,omitempty"`
5735 // MinOccurs: The minimum number of times this group must be present/repeated.
5736 MinOccurs int64 `json:"minOccurs,omitempty"`
5737 // Name: The name of this group. For example, "ORDER_DETAIL".
5738 Name string `json:"name,omitempty"`
5739 // ForceSendFields is a list of field names (e.g. "Choice") to unconditionally
5740 // include in API requests. By default, fields with empty or default values are
5741 // omitted from API requests. See
5742 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5743 // details.
5744 ForceSendFields []string `json:"-"`
5745 // NullFields is a list of field names (e.g. "Choice") to include in API
5746 // requests with the JSON null value. By default, fields with empty values are
5747 // omitted from API requests. See
5748 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5749 NullFields []string `json:"-"`
5750 }
5751
5752 func (s SchemaGroup) MarshalJSON() ([]byte, error) {
5753 type NoMethod SchemaGroup
5754 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5755 }
5756
5757 // SchemaJSON: Using this field will set the schema such that all DICOM tags
5758 // will be included in the BigQuery table as a single JSON type column. The
5759 // BigQuery table schema will include the following columns: *
5760 // `StudyInstanceUID` (Type: STRING): DICOM Tag 0020000D. * `SeriesInstanceUID`
5761 // (Type: STRING): DICOM Tag 0020000E. * `SOPInstanceUID` (Type: STRING): DICOM
5762 // Tag 00080018. * `SourceDicomStore` (Type: STRING): The name of the source
5763 // DICOM store. This field is only included if the `include_source_store`
5764 // option is set to true. * `Metadata` (Type: JSON): All DICOM tags for the
5765 // instance, stored in a single JSON object. * `StructuredStorageSize` (Type:
5766 // INTEGER): Size of the structured storage in bytes. * `DroppedTags` (Type:
5767 // STRING, Repeated: Yes): List of tags that were dropped during the
5768 // conversion. * `StorageClass` (Type: STRING): The storage class of the
5769 // instance. * `LastUpdated` (Type: TIMESTAMP): Timestamp of the last update to
5770 // the instance. * `BlobStorageSize` (Type: INTEGER): Size of the blob storage
5771 // in bytes. * `Type` (Type: STRING): Indicates the type of operation (e.g.,
5772 // INSERT, DELETE).
5773 type SchemaJSON struct {
5774 }
5775
5776 // SchemaPackage: A schema package contains a set of schemas and type
5777 // definitions.
5778 type SchemaPackage struct {
5779 // IgnoreMinOccurs: Optional. Flag to ignore all min_occurs restrictions in the
5780 // schema. This means that incoming messages can omit any group, segment,
5781 // field, component, or subcomponent.
5782 IgnoreMinOccurs bool `json:"ignoreMinOccurs,omitempty"`
5783 // Schemas: Optional. Schema configs that are layered based on their
5784 // VersionSources that match the incoming message. Schema configs present in
5785 // higher indices override those in lower indices with the same message type
5786 // and trigger event if their VersionSources all match an incoming message.
5787 Schemas []*Hl7SchemaConfig `json:"schemas,omitempty"`
5788 // SchematizedParsingType: Optional. Determines how messages that fail to parse
5789 // are handled.
5790 //
5791 // Possible values:
5792 // "SCHEMATIZED_PARSING_TYPE_UNSPECIFIED" - Unspecified schematized parsing
5793 // type, equivalent to `SOFT_FAIL`.
5794 // "SOFT_FAIL" - Messages that fail to parse are still stored and ACKed but a
5795 // parser error is stored in place of the schematized data.
5796 // "HARD_FAIL" - Messages that fail to parse are rejected from
5797 // ingestion/insertion and return an error code.
5798 SchematizedParsingType string `json:"schematizedParsingType,omitempty"`
5799 // Types: Optional. Schema type definitions that are layered based on their
5800 // VersionSources that match the incoming message. Type definitions present in
5801 // higher indices override those in lower indices with the same type name if
5802 // their VersionSources all match an incoming message.
5803 Types []*Hl7TypesConfig `json:"types,omitempty"`
5804 // UnexpectedSegmentHandling: Optional. Determines how unexpected segments
5805 // (segments not matched to the schema) are handled.
5806 //
5807 // Possible values:
5808 // "UNEXPECTED_SEGMENT_HANDLING_MODE_UNSPECIFIED" - Unspecified handling
5809 // mode, equivalent to FAIL.
5810 // "FAIL" - Unexpected segments fail to parse and return an error.
5811 // "SKIP" - Unexpected segments do not fail, but are omitted from the output.
5812 // "PARSE" - Unexpected segments do not fail, but are parsed in place and
5813 // added to the current group. If a segment has a type definition, it is used,
5814 // otherwise it is parsed as VARIES.
5815 UnexpectedSegmentHandling string `json:"unexpectedSegmentHandling,omitempty"`
5816 // ForceSendFields is a list of field names (e.g. "IgnoreMinOccurs") to
5817 // unconditionally include in API requests. By default, fields with empty or
5818 // default values are omitted from API requests. See
5819 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5820 // details.
5821 ForceSendFields []string `json:"-"`
5822 // NullFields is a list of field names (e.g. "IgnoreMinOccurs") to include in
5823 // API requests with the JSON null value. By default, fields with empty values
5824 // are omitted from API requests. See
5825 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5826 NullFields []string `json:"-"`
5827 }
5828
5829 func (s SchemaPackage) MarshalJSON() ([]byte, error) {
5830 type NoMethod SchemaPackage
5831 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5832 }
5833
5834 // SchemaSegment: An HL7v2 Segment.
5835 type SchemaSegment struct {
5836 // MaxOccurs: The maximum number of times this segment can be present in this
5837 // group. 0 or -1 means unbounded.
5838 MaxOccurs int64 `json:"maxOccurs,omitempty"`
5839 // MinOccurs: The minimum number of times this segment can be present in this
5840 // group.
5841 MinOccurs int64 `json:"minOccurs,omitempty"`
5842 // Type: The Segment type. For example, "PID".
5843 Type string `json:"type,omitempty"`
5844 // ForceSendFields is a list of field names (e.g. "MaxOccurs") to
5845 // unconditionally include in API requests. By default, fields with empty or
5846 // default values are omitted from API requests. See
5847 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5848 // details.
5849 ForceSendFields []string `json:"-"`
5850 // NullFields is a list of field names (e.g. "MaxOccurs") to include in API
5851 // requests with the JSON null value. By default, fields with empty values are
5852 // omitted from API requests. See
5853 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5854 NullFields []string `json:"-"`
5855 }
5856
5857 func (s SchemaSegment) MarshalJSON() ([]byte, error) {
5858 type NoMethod SchemaSegment
5859 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5860 }
5861
5862 // SchematizedData: The content of an HL7v2 message in a structured format as
5863 // specified by a schema.
5864 type SchematizedData struct {
5865 // Data: JSON output of the parser.
5866 Data string `json:"data,omitempty"`
5867 // Error: The error output of the parser.
5868 Error string `json:"error,omitempty"`
5869 // ForceSendFields is a list of field names (e.g. "Data") to unconditionally
5870 // include in API requests. By default, fields with empty or default values are
5871 // omitted from API requests. See
5872 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5873 // details.
5874 ForceSendFields []string `json:"-"`
5875 // NullFields is a list of field names (e.g. "Data") to include in API requests
5876 // with the JSON null value. By default, fields with empty values are omitted
5877 // from API requests. See
5878 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5879 NullFields []string `json:"-"`
5880 }
5881
5882 func (s SchematizedData) MarshalJSON() ([]byte, error) {
5883 type NoMethod SchematizedData
5884 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5885 }
5886
5887 // Segment: A segment in a structured format.
5888 type Segment struct {
5889 // Fields: A mapping from the positional location to the value. The key string
5890 // uses zero-based indexes separated by dots to identify Fields, components and
5891 // sub-components. A bracket notation is also used to identify different
5892 // instances of a repeated field. Regex for key: (\d+)(\[\d+\])?(.\d+)?(.\d+)?
5893 // Examples of (key, value) pairs: * (0.1, "hemoglobin") denotes that the first
5894 // component of Field 0 has the value "hemoglobin". * (1.1.2, "CBC") denotes
5895 // that the second sub-component of the first component of Field 1 has the
5896 // value "CBC". * (1[0].1, "HbA1c") denotes that the first component of the
5897 // first Instance of Field 1, which is repeated, has the value "HbA1c".
5898 Fields map[string]string `json:"fields,omitempty"`
5899 // SegmentId: A string that indicates the type of segment. For example, EVN or
5900 // PID.
5901 SegmentId string `json:"segmentId,omitempty"`
5902 // SetId: Set ID for segments that can be in a set. This can be empty if it's
5903 // missing or isn't applicable.
5904 SetId string `json:"setId,omitempty"`
5905 // ForceSendFields is a list of field names (e.g. "Fields") to unconditionally
5906 // include in API requests. By default, fields with empty or default values are
5907 // omitted from API requests. See
5908 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5909 // details.
5910 ForceSendFields []string `json:"-"`
5911 // NullFields is a list of field names (e.g. "Fields") to include in API
5912 // requests with the JSON null value. By default, fields with empty values are
5913 // omitted from API requests. See
5914 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5915 NullFields []string `json:"-"`
5916 }
5917
5918 func (s Segment) MarshalJSON() ([]byte, error) {
5919 type NoMethod Segment
5920 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5921 }
5922
5923 // SeriesMetrics: SeriesMetrics contains metrics describing a DICOM series.
5924 type SeriesMetrics struct {
5925 // BlobStorageSizeBytes: Total blob storage bytes for all instances in the
5926 // series.
5927 BlobStorageSizeBytes int64 `json:"blobStorageSizeBytes,omitempty,string"`
5928 // InstanceCount: Number of instances in the series.
5929 InstanceCount int64 `json:"instanceCount,omitempty,string"`
5930 // Series: The series resource path. For example,
5931 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomSto
5932 // res/{dicom_store_id}/dicomWeb/studies/{study_uid}/series/{series_uid}`.
5933 Series string `json:"series,omitempty"`
5934 // StructuredStorageSizeBytes: Total structured storage bytes for all instances
5935 // in the series.
5936 StructuredStorageSizeBytes int64 `json:"structuredStorageSizeBytes,omitempty,string"`
5937
5938 // ServerResponse contains the HTTP response code and headers from the server.
5939 googleapi.ServerResponse `json:"-"`
5940 // ForceSendFields is a list of field names (e.g. "BlobStorageSizeBytes") to
5941 // unconditionally include in API requests. By default, fields with empty or
5942 // default values are omitted from API requests. See
5943 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5944 // details.
5945 ForceSendFields []string `json:"-"`
5946 // NullFields is a list of field names (e.g. "BlobStorageSizeBytes") to include
5947 // in API requests with the JSON null value. By default, fields with empty
5948 // values are omitted from API requests. See
5949 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5950 NullFields []string `json:"-"`
5951 }
5952
5953 func (s SeriesMetrics) MarshalJSON() ([]byte, error) {
5954 type NoMethod SeriesMetrics
5955 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5956 }
5957
5958 // SetBlobStorageSettingsRequest: Request message for `SetBlobStorageSettings`
5959 // method.
5960 type SetBlobStorageSettingsRequest struct {
5961 // BlobStorageSettings: The blob storage settings to update for the specified
5962 // resources. Only fields listed in `update_mask` are applied.
5963 BlobStorageSettings *BlobStorageSettings `json:"blobStorageSettings,omitempty"`
5964 // FilterConfig: Optional. A filter configuration. If `filter_config` is
5965 // specified, set the value of `resource` to the resource name of a DICOM store
5966 // in the format
5967 // `projects/{projectID}/locations/{locationID}/datasets/{datasetID}/dicomStores
5968 // /{dicomStoreID}`.
5969 FilterConfig *DicomFilterConfig `json:"filterConfig,omitempty"`
5970 // ForceSendFields is a list of field names (e.g. "BlobStorageSettings") to
5971 // unconditionally include in API requests. By default, fields with empty or
5972 // default values are omitted from API requests. See
5973 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5974 // details.
5975 ForceSendFields []string `json:"-"`
5976 // NullFields is a list of field names (e.g. "BlobStorageSettings") to include
5977 // in API requests with the JSON null value. By default, fields with empty
5978 // values are omitted from API requests. See
5979 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5980 NullFields []string `json:"-"`
5981 }
5982
5983 func (s SetBlobStorageSettingsRequest) MarshalJSON() ([]byte, error) {
5984 type NoMethod SetBlobStorageSettingsRequest
5985 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5986 }
5987
5988 // SetBlobStorageSettingsResponse: Returns additional info in regards to a
5989 // completed set blob storage settings API.
5990 type SetBlobStorageSettingsResponse struct {
5991 }
5992
5993 // SetIamPolicyRequest: Request message for `SetIamPolicy` method.
5994 type SetIamPolicyRequest struct {
5995 // Policy: REQUIRED: The complete policy to be applied to the `resource`. The
5996 // size of the policy is limited to a few 10s of KB. An empty policy is a valid
5997 // policy but certain Google Cloud services (such as Projects) might reject
5998 // them.
5999 Policy *Policy `json:"policy,omitempty"`
6000 // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the policy to
6001 // modify. Only the fields in the mask will be modified. If no mask is
6002 // provided, the following default mask is used: `paths: "bindings, etag"
6003 UpdateMask string `json:"updateMask,omitempty"`
6004 // ForceSendFields is a list of field names (e.g. "Policy") to unconditionally
6005 // include in API requests. By default, fields with empty or default values are
6006 // omitted from API requests. See
6007 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6008 // details.
6009 ForceSendFields []string `json:"-"`
6010 // NullFields is a list of field names (e.g. "Policy") to include in API
6011 // requests with the JSON null value. By default, fields with empty values are
6012 // omitted from API requests. See
6013 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6014 NullFields []string `json:"-"`
6015 }
6016
6017 func (s SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
6018 type NoMethod SetIamPolicyRequest
6019 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6020 }
6021
6022 // Signature: User signature.
6023 type Signature struct {
6024 // Image: Optional. An image of the user's signature.
6025 Image *Image `json:"image,omitempty"`
6026 // Metadata: Optional. Metadata associated with the user's signature. For
6027 // example, the user's name or the user's title.
6028 Metadata map[string]string `json:"metadata,omitempty"`
6029 // SignatureTime: Optional. Timestamp of the signature.
6030 SignatureTime string `json:"signatureTime,omitempty"`
6031 // UserId: Required. User's UUID provided by the client.
6032 UserId string `json:"userId,omitempty"`
6033 // ForceSendFields is a list of field names (e.g. "Image") to unconditionally
6034 // include in API requests. By default, fields with empty or default values are
6035 // omitted from API requests. See
6036 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6037 // details.
6038 ForceSendFields []string `json:"-"`
6039 // NullFields is a list of field names (e.g. "Image") to include in API
6040 // requests with the JSON null value. By default, fields with empty values are
6041 // omitted from API requests. See
6042 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6043 NullFields []string `json:"-"`
6044 }
6045
6046 func (s Signature) MarshalJSON() ([]byte, error) {
6047 type NoMethod Signature
6048 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6049 }
6050
6051 // Status: The `Status` type defines a logical error model that is suitable for
6052 // different programming environments, including REST APIs and RPC APIs. It is
6053 // used by gRPC (https://github.com/grpc). Each `Status` message contains three
6054 // pieces of data: error code, error message, and error details. You can find
6055 // out more about this error model and how to work with it in the API Design
6056 // Guide (https://cloud.google.com/apis/design/errors).
6057 type Status struct {
6058 // Code: The status code, which should be an enum value of google.rpc.Code.
6059 Code int64 `json:"code,omitempty"`
6060 // Details: A list of messages that carry the error details. There is a common
6061 // set of message types for APIs to use.
6062 Details []googleapi.RawMessage `json:"details,omitempty"`
6063 // Message: A developer-facing error message, which should be in English. Any
6064 // user-facing error message should be localized and sent in the
6065 // google.rpc.Status.details field, or localized by the client.
6066 Message string `json:"message,omitempty"`
6067 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
6068 // include in API requests. By default, fields with empty or default values are
6069 // omitted from API requests. See
6070 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6071 // details.
6072 ForceSendFields []string `json:"-"`
6073 // NullFields is a list of field names (e.g. "Code") to include in API requests
6074 // with the JSON null value. By default, fields with empty values are omitted
6075 // from API requests. See
6076 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6077 NullFields []string `json:"-"`
6078 }
6079
6080 func (s Status) MarshalJSON() ([]byte, error) {
6081 type NoMethod Status
6082 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6083 }
6084
6085 // StorageInfo: StorageInfo encapsulates all the storage info of a resource.
6086 type StorageInfo struct {
6087 // BlobStorageInfo: Info about the data stored in blob storage for the
6088 // resource.
6089 BlobStorageInfo *BlobStorageInfo `json:"blobStorageInfo,omitempty"`
6090 // ReferencedResource: The resource whose storage info is returned. For
6091 // example:
6092 // `projects/{projectID}/locations/{locationID}/datasets/{datasetID}/dicomStores
6093 // /{dicomStoreID}/dicomWeb/studies/{studyUID}/series/{seriesUID}/instances/{ins
6094 // tanceUID}`
6095 ReferencedResource string `json:"referencedResource,omitempty"`
6096 // StructuredStorageInfo: Info about the data stored in structured storage for
6097 // the resource.
6098 StructuredStorageInfo *StructuredStorageInfo `json:"structuredStorageInfo,omitempty"`
6099
6100 // ServerResponse contains the HTTP response code and headers from the server.
6101 googleapi.ServerResponse `json:"-"`
6102 // ForceSendFields is a list of field names (e.g. "BlobStorageInfo") to
6103 // unconditionally include in API requests. By default, fields with empty or
6104 // default values are omitted from API requests. See
6105 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6106 // details.
6107 ForceSendFields []string `json:"-"`
6108 // NullFields is a list of field names (e.g. "BlobStorageInfo") to include in
6109 // API requests with the JSON null value. By default, fields with empty values
6110 // are omitted from API requests. See
6111 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6112 NullFields []string `json:"-"`
6113 }
6114
6115 func (s StorageInfo) MarshalJSON() ([]byte, error) {
6116 type NoMethod StorageInfo
6117 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6118 }
6119
6120 // StreamConfig: Contains configuration for streaming FHIR export.
6121 type StreamConfig struct {
6122 // BigqueryDestination: Optional. The destination BigQuery structure that
6123 // contains both the dataset location and corresponding schema config. The
6124 // output is organized in one table per resource type. The server reuses the
6125 // existing tables (if any) that are named after the resource types. For
6126 // example, "Patient", "Observation". When there is no existing table for a
6127 // given resource type, the server attempts to create one. When a table schema
6128 // doesn't align with the schema config, either because of existing
6129 // incompatible schema or out of band incompatible modification, the server
6130 // does not stream in new data. BigQuery imposes a 1 MB limit on streaming
6131 // insert row size, therefore any resource mutation that generates more than 1
6132 // MB of BigQuery data is not streamed. One resolution in this case is to
6133 // delete the incompatible table and let the server recreate one, though the
6134 // newly created table only contains data after the table recreation. Results
6135 // are written to BigQuery tables according to the parameters in
6136 // BigQueryDestination.WriteDisposition. Different versions of the same
6137 // resource are distinguishable by the meta.versionId and meta.lastUpdated
6138 // columns. The operation (CREATE/UPDATE/DELETE) that results in the new
6139 // version is recorded in the meta.tag. The tables contain all historical
6140 // resource versions since streaming was enabled. For query convenience, the
6141 // server also creates one view per table of the same name containing only the
6142 // current resource version. The streamed data in the BigQuery dataset is not
6143 // guaranteed to be completely unique. The combination of the id and
6144 // meta.versionId columns should ideally identify a single unique row. But in
6145 // rare cases, duplicates may exist. At query time, users may use the SQL
6146 // select statement to keep only one of the duplicate rows given an id and
6147 // meta.versionId pair. Alternatively, the server created view mentioned above
6148 // also filters out duplicates. If a resource mutation cannot be streamed to
6149 // BigQuery, errors are logged to Cloud Logging. For more information, see
6150 // Viewing error logs in Cloud Logging
6151 // (https://cloud.google.com/healthcare/docs/how-tos/logging)).
6152 BigqueryDestination *GoogleCloudHealthcareV1FhirBigQueryDestination `json:"bigqueryDestination,omitempty"`
6153 // DeidentifiedStoreDestination: The destination FHIR store for de-identified
6154 // resources. After this field is added, all subsequent creates/updates/patches
6155 // to the source store will be de-identified using the provided configuration
6156 // and applied to the destination store. Resources deleted from the source
6157 // store will be deleted from the destination store. Importing resources to the
6158 // source store will not trigger the streaming. If the source store already
6159 // contains resources when this option is enabled, those resources will not be
6160 // copied to the destination store unless they are subsequently updated. This
6161 // may result in invalid references in the destination store. Before adding
6162 // this config, you must grant the healthcare.fhirResources.update permission
6163 // on the destination store to your project's **Cloud Healthcare Service
6164 // Agent** service account
6165 // (https://cloud.google.com/healthcare/docs/how-tos/permissions-healthcare-api-gcp-products#the_cloud_healthcare_service_agent).
6166 // The destination store must set enable_update_create to true. The destination
6167 // store must have disable_referential_integrity set to true. If a resource
6168 // cannot be de-identified, errors will be logged to Cloud Logging (see Viewing
6169 // error logs in Cloud Logging
6170 // (https://cloud.google.com/healthcare/docs/how-tos/logging)). Not supported
6171 // for R5 stores.
6172 DeidentifiedStoreDestination *DeidentifiedStoreDestination `json:"deidentifiedStoreDestination,omitempty"`
6173 // ResourceTypes: Optional. Supply a FHIR resource type (such as "Patient" or
6174 // "Observation"). See https://www.hl7.org/fhir/valueset-resource-types.html
6175 // for a list of all FHIR resource types. The server treats an empty list as an
6176 // intent to stream all the supported resource types in this FHIR store.
6177 ResourceTypes []string `json:"resourceTypes,omitempty"`
6178 // ForceSendFields is a list of field names (e.g. "BigqueryDestination") to
6179 // unconditionally include in API requests. By default, fields with empty or
6180 // default values are omitted from API requests. See
6181 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6182 // details.
6183 ForceSendFields []string `json:"-"`
6184 // NullFields is a list of field names (e.g. "BigqueryDestination") to include
6185 // in API requests with the JSON null value. By default, fields with empty
6186 // values are omitted from API requests. See
6187 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6188 NullFields []string `json:"-"`
6189 }
6190
6191 func (s StreamConfig) MarshalJSON() ([]byte, error) {
6192 type NoMethod StreamConfig
6193 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6194 }
6195
6196 // StructuredStorageInfo: StructuredStorageInfo contains details about the data
6197 // stored in Structured Storage for the referenced resource.
6198 type StructuredStorageInfo struct {
6199 // SizeBytes: Size in bytes of data stored in structured storage.
6200 SizeBytes int64 `json:"sizeBytes,omitempty,string"`
6201 // ForceSendFields is a list of field names (e.g. "SizeBytes") to
6202 // unconditionally include in API requests. By default, fields with empty or
6203 // default values are omitted from API requests. See
6204 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6205 // details.
6206 ForceSendFields []string `json:"-"`
6207 // NullFields is a list of field names (e.g. "SizeBytes") to include in API
6208 // requests with the JSON null value. By default, fields with empty values are
6209 // omitted from API requests. See
6210 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6211 NullFields []string `json:"-"`
6212 }
6213
6214 func (s StructuredStorageInfo) MarshalJSON() ([]byte, error) {
6215 type NoMethod StructuredStorageInfo
6216 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6217 }
6218
6219 // StudyMetrics: StudyMetrics contains metrics describing a DICOM study.
6220 type StudyMetrics struct {
6221 // BlobStorageSizeBytes: Total blob storage bytes for all instances in the
6222 // study.
6223 BlobStorageSizeBytes int64 `json:"blobStorageSizeBytes,omitempty,string"`
6224 // InstanceCount: Number of instances in the study.
6225 InstanceCount int64 `json:"instanceCount,omitempty,string"`
6226 // SeriesCount: Number of series in the study.
6227 SeriesCount int64 `json:"seriesCount,omitempty,string"`
6228 // StructuredStorageSizeBytes: Total structured storage bytes for all instances
6229 // in the study.
6230 StructuredStorageSizeBytes int64 `json:"structuredStorageSizeBytes,omitempty,string"`
6231 // Study: The study resource path. For example,
6232 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomSto
6233 // res/{dicom_store_id}/dicomWeb/studies/{study_uid}`.
6234 Study string `json:"study,omitempty"`
6235
6236 // ServerResponse contains the HTTP response code and headers from the server.
6237 googleapi.ServerResponse `json:"-"`
6238 // ForceSendFields is a list of field names (e.g. "BlobStorageSizeBytes") to
6239 // unconditionally include in API requests. By default, fields with empty or
6240 // default values are omitted from API requests. See
6241 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6242 // details.
6243 ForceSendFields []string `json:"-"`
6244 // NullFields is a list of field names (e.g. "BlobStorageSizeBytes") to include
6245 // in API requests with the JSON null value. By default, fields with empty
6246 // values are omitted from API requests. See
6247 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6248 NullFields []string `json:"-"`
6249 }
6250
6251 func (s StudyMetrics) MarshalJSON() ([]byte, error) {
6252 type NoMethod StudyMetrics
6253 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6254 }
6255
6256 // TagFilterList: List of tags to be filtered.
6257 type TagFilterList struct {
6258 // Tags: Optional. Tags to be filtered. Tags must be DICOM Data Elements, File
6259 // Meta Elements, or Directory Structuring Elements, as defined at:
6260 // https://dicom.nema.org/medical/dicom/current/output/html/part06.html#table_6-1,.
6261 // They may be provided by "Keyword" or "Tag". For example "PatientID",
6262 // "00100010".
6263 Tags []string `json:"tags,omitempty"`
6264 // ForceSendFields is a list of field names (e.g. "Tags") to unconditionally
6265 // include in API requests. By default, fields with empty or default values are
6266 // omitted from API requests. See
6267 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6268 // details.
6269 ForceSendFields []string `json:"-"`
6270 // NullFields is a list of field names (e.g. "Tags") to include in API requests
6271 // with the JSON null value. By default, fields with empty values are omitted
6272 // from API requests. See
6273 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6274 NullFields []string `json:"-"`
6275 }
6276
6277 func (s TagFilterList) MarshalJSON() ([]byte, error) {
6278 type NoMethod TagFilterList
6279 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6280 }
6281
6282 // TestIamPermissionsRequest: Request message for `TestIamPermissions` method.
6283 type TestIamPermissionsRequest struct {
6284 // Permissions: The set of permissions to check for the `resource`. Permissions
6285 // with wildcards (such as `*` or `storage.*`) are not allowed. For more
6286 // information see IAM Overview
6287 // (https://cloud.google.com/iam/docs/overview#permissions).
6288 Permissions []string `json:"permissions,omitempty"`
6289 // ForceSendFields is a list of field names (e.g. "Permissions") to
6290 // unconditionally include in API requests. By default, fields with empty or
6291 // default values are omitted from API requests. See
6292 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6293 // details.
6294 ForceSendFields []string `json:"-"`
6295 // NullFields is a list of field names (e.g. "Permissions") to include in API
6296 // requests with the JSON null value. By default, fields with empty values are
6297 // omitted from API requests. See
6298 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6299 NullFields []string `json:"-"`
6300 }
6301
6302 func (s TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
6303 type NoMethod TestIamPermissionsRequest
6304 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6305 }
6306
6307 // TestIamPermissionsResponse: Response message for `TestIamPermissions`
6308 // method.
6309 type TestIamPermissionsResponse struct {
6310 // Permissions: A subset of `TestPermissionsRequest.permissions` that the
6311 // caller is allowed.
6312 Permissions []string `json:"permissions,omitempty"`
6313
6314 // ServerResponse contains the HTTP response code and headers from the server.
6315 googleapi.ServerResponse `json:"-"`
6316 // ForceSendFields is a list of field names (e.g. "Permissions") to
6317 // unconditionally include in API requests. By default, fields with empty or
6318 // default values are omitted from API requests. See
6319 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6320 // details.
6321 ForceSendFields []string `json:"-"`
6322 // NullFields is a list of field names (e.g. "Permissions") to include in API
6323 // requests with the JSON null value. By default, fields with empty values are
6324 // omitted from API requests. See
6325 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6326 NullFields []string `json:"-"`
6327 }
6328
6329 func (s TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
6330 type NoMethod TestIamPermissionsResponse
6331 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6332 }
6333
6334 type TextConfig struct {
6335 // AdditionalTransformations: Optional. Transformations to apply to the
6336 // detected data, overridden by `exclude_info_types`.
6337 AdditionalTransformations []*InfoTypeTransformation `json:"additionalTransformations,omitempty"`
6338 // ExcludeInfoTypes: Optional. InfoTypes to skip transforming, overriding
6339 // `additional_transformations`.
6340 ExcludeInfoTypes []string `json:"excludeInfoTypes,omitempty"`
6341 // Transformations: Optional. The transformations to apply to the detected
6342 // data. Deprecated. Use `additional_transformations` instead.
6343 Transformations []*InfoTypeTransformation `json:"transformations,omitempty"`
6344 // ForceSendFields is a list of field names (e.g. "AdditionalTransformations")
6345 // to unconditionally include in API requests. By default, fields with empty or
6346 // default values are omitted from API requests. See
6347 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6348 // details.
6349 ForceSendFields []string `json:"-"`
6350 // NullFields is a list of field names (e.g. "AdditionalTransformations") to
6351 // include in API requests with the JSON null value. By default, fields with
6352 // empty values are omitted from API requests. See
6353 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6354 NullFields []string `json:"-"`
6355 }
6356
6357 func (s TextConfig) MarshalJSON() ([]byte, error) {
6358 type NoMethod TextConfig
6359 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6360 }
6361
6362 // TextSpan: A span of text in the provided document.
6363 type TextSpan struct {
6364 // BeginOffset: The unicode codepoint index of the beginning of this span.
6365 BeginOffset int64 `json:"beginOffset,omitempty"`
6366 // Content: The original text contained in this span.
6367 Content string `json:"content,omitempty"`
6368 // ForceSendFields is a list of field names (e.g. "BeginOffset") to
6369 // unconditionally include in API requests. By default, fields with empty or
6370 // default values are omitted from API requests. See
6371 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6372 // details.
6373 ForceSendFields []string `json:"-"`
6374 // NullFields is a list of field names (e.g. "BeginOffset") to include in API
6375 // requests with the JSON null value. By default, fields with empty values are
6376 // omitted from API requests. See
6377 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6378 NullFields []string `json:"-"`
6379 }
6380
6381 func (s TextSpan) MarshalJSON() ([]byte, error) {
6382 type NoMethod TextSpan
6383 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6384 }
6385
6386 // TimePartitioning: Configuration for FHIR BigQuery time-partitioned tables.
6387 type TimePartitioning struct {
6388 // ExpirationMs: Number of milliseconds for which to keep the storage for a
6389 // partition.
6390 ExpirationMs int64 `json:"expirationMs,omitempty,string"`
6391 // Type: Type of partitioning.
6392 //
6393 // Possible values:
6394 // "PARTITION_TYPE_UNSPECIFIED" - Default unknown time.
6395 // "HOUR" - Data partitioned by hour.
6396 // "DAY" - Data partitioned by day.
6397 // "MONTH" - Data partitioned by month.
6398 // "YEAR" - Data partitioned by year.
6399 Type string `json:"type,omitempty"`
6400 // ForceSendFields is a list of field names (e.g. "ExpirationMs") to
6401 // unconditionally include in API requests. By default, fields with empty or
6402 // default values are omitted from API requests. See
6403 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6404 // details.
6405 ForceSendFields []string `json:"-"`
6406 // NullFields is a list of field names (e.g. "ExpirationMs") to include in API
6407 // requests with the JSON null value. By default, fields with empty values are
6408 // omitted from API requests. See
6409 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6410 NullFields []string `json:"-"`
6411 }
6412
6413 func (s TimePartitioning) MarshalJSON() ([]byte, error) {
6414 type NoMethod TimePartitioning
6415 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6416 }
6417
6418 // TimeRange: Apply consents given by patients whose most recent consent
6419 // changes are in the time range. Note that after identifying these patients,
6420 // the server applies all Consent resources given by those patients, not just
6421 // the Consent resources within the timestamp in the range.
6422 type TimeRange struct {
6423 // End: Optional. The latest consent change time, in format
6424 // YYYY-MM-DDThh:mm:ss.sss+zz:zz If not specified, the system uses the time
6425 // when ApplyConsents was called.
6426 End string `json:"end,omitempty"`
6427 // Start: Optional. The earliest consent change time, in format
6428 // YYYY-MM-DDThh:mm:ss.sss+zz:zz If not specified, the system uses the FHIR
6429 // store creation time.
6430 Start string `json:"start,omitempty"`
6431 // ForceSendFields is a list of field names (e.g. "End") to unconditionally
6432 // include in API requests. By default, fields with empty or default values are
6433 // omitted from API requests. See
6434 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6435 // details.
6436 ForceSendFields []string `json:"-"`
6437 // NullFields is a list of field names (e.g. "End") to include in API requests
6438 // with the JSON null value. By default, fields with empty values are omitted
6439 // from API requests. See
6440 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6441 NullFields []string `json:"-"`
6442 }
6443
6444 func (s TimeRange) MarshalJSON() ([]byte, error) {
6445 type NoMethod TimeRange
6446 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6447 }
6448
6449 // Type: A type definition for some HL7v2 type (incl. Segments and Datatypes).
6450 type Type struct {
6451 // Fields: The (sub) fields this type has (if not primitive).
6452 Fields []*Field `json:"fields,omitempty"`
6453 // Name: The name of this type. This would be the segment or datatype name. For
6454 // example, "PID" or "XPN".
6455 Name string `json:"name,omitempty"`
6456 // Primitive: If this is a primitive type then this field is the type of the
6457 // primitive For example, STRING. Leave unspecified for composite types.
6458 //
6459 // Possible values:
6460 // "PRIMITIVE_UNSPECIFIED" - Not a primitive.
6461 // "STRING" - String primitive.
6462 // "VARIES" - Element that can have unschematized children.
6463 // "UNESCAPED_STRING" - Like STRING, but all delimiters below this element
6464 // are ignored.
6465 Primitive string `json:"primitive,omitempty"`
6466 // ForceSendFields is a list of field names (e.g. "Fields") to unconditionally
6467 // include in API requests. By default, fields with empty or default values are
6468 // omitted from API requests. See
6469 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6470 // details.
6471 ForceSendFields []string `json:"-"`
6472 // NullFields is a list of field names (e.g. "Fields") to include in API
6473 // requests with the JSON null value. By default, fields with empty values are
6474 // omitted from API requests. See
6475 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6476 NullFields []string `json:"-"`
6477 }
6478
6479 func (s Type) MarshalJSON() ([]byte, error) {
6480 type NoMethod Type
6481 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6482 }
6483
6484 // UserDataMapping: Maps a resource to the associated user and Attributes.
6485 type UserDataMapping struct {
6486 // ArchiveTime: Output only. Indicates the time when this mapping was archived.
6487 ArchiveTime string `json:"archiveTime,omitempty"`
6488 // Archived: Output only. Indicates whether this mapping is archived.
6489 Archived bool `json:"archived,omitempty"`
6490 // DataId: Required. A unique identifier for the mapped resource.
6491 DataId string `json:"dataId,omitempty"`
6492 // Name: Resource name of the User data mapping, of the form
6493 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentS
6494 // tores/{consent_store_id}/userDataMappings/{user_data_mapping_id}`.
6495 Name string `json:"name,omitempty"`
6496 // ResourceAttributes: Attributes of the resource. Only explicitly set
6497 // attributes are displayed here. Attribute definitions with defaults set
6498 // implicitly apply to these User data mappings. Attributes listed here must be
6499 // single valued, that is, exactly one value is specified for the field
6500 // "values" in each Attribute.
6501 ResourceAttributes []*Attribute `json:"resourceAttributes,omitempty"`
6502 // UserId: Required. User's UUID provided by the client.
6503 UserId string `json:"userId,omitempty"`
6504
6505 // ServerResponse contains the HTTP response code and headers from the server.
6506 googleapi.ServerResponse `json:"-"`
6507 // ForceSendFields is a list of field names (e.g. "ArchiveTime") to
6508 // unconditionally include in API requests. By default, fields with empty or
6509 // default values are omitted from API requests. See
6510 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6511 // details.
6512 ForceSendFields []string `json:"-"`
6513 // NullFields is a list of field names (e.g. "ArchiveTime") to include in API
6514 // requests with the JSON null value. By default, fields with empty values are
6515 // omitted from API requests. See
6516 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6517 NullFields []string `json:"-"`
6518 }
6519
6520 func (s UserDataMapping) MarshalJSON() ([]byte, error) {
6521 type NoMethod UserDataMapping
6522 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6523 }
6524
6525 // ValidationConfig: Contains the configuration for FHIR profiles and
6526 // validation.
6527 type ValidationConfig struct {
6528 // DisableFhirpathValidation: Optional. Whether to disable FHIRPath validation
6529 // for incoming resources. The default value is false. Set this to true to
6530 // disable checking incoming resources for conformance against FHIRPath
6531 // requirement defined in the FHIR specification. This property only affects
6532 // resource types that do not have profiles configured for them, any rules in
6533 // enabled implementation guides will still be enforced.
6534 DisableFhirpathValidation bool `json:"disableFhirpathValidation,omitempty"`
6535 // DisableProfileValidation: Optional. Whether to disable profile validation
6536 // for this FHIR store. The default value is false. Set this to true to disable
6537 // checking incoming resources for conformance against structure definitions in
6538 // this FHIR store.
6539 DisableProfileValidation bool `json:"disableProfileValidation,omitempty"`
6540 // DisableReferenceTypeValidation: Optional. Whether to disable reference type
6541 // validation for incoming resources. The default value is false. Set this to
6542 // true to disable checking incoming resources for conformance against
6543 // reference type requirement defined in the FHIR specification. This property
6544 // only affects resource types that do not have profiles configured for them,
6545 // any rules in enabled implementation guides will still be enforced.
6546 DisableReferenceTypeValidation bool `json:"disableReferenceTypeValidation,omitempty"`
6547 // DisableRequiredFieldValidation: Optional. Whether to disable required fields
6548 // validation for incoming resources. The default value is false. Set this to
6549 // true to disable checking incoming resources for conformance against required
6550 // fields requirement defined in the FHIR specification. This property only
6551 // affects resource types that do not have profiles configured for them, any
6552 // rules in enabled implementation guides will still be enforced.
6553 DisableRequiredFieldValidation bool `json:"disableRequiredFieldValidation,omitempty"`
6554 // EnableFhirpathProfileValidation: Optional. Whether to enable FHIRPath
6555 // validation for incoming resource types that have profiles configured for
6556 // them in the `enabled_implementation_guides` list. Set this to true to enable
6557 // checking incoming resources for conformance against FHIRPath requirements
6558 // defined in the configured profiles.
6559 EnableFhirpathProfileValidation bool `json:"enableFhirpathProfileValidation,omitempty"`
6560 // EnabledImplementationGuides: Optional. A list of implementation guide URLs
6561 // in this FHIR store that are used to configure the profiles to use for
6562 // validation. For example, to use the US Core profiles for validation, set
6563 // `enabled_implementation_guides` to
6564 // `["http://hl7.org/fhir/us/core/ImplementationGuide/ig"]`. If
6565 // `enabled_implementation_guides` is empty or omitted, then incoming resources
6566 // are only required to conform to the base FHIR profiles. Otherwise, a
6567 // resource must conform to at least one profile listed in the `global`
6568 // property of one of the enabled ImplementationGuides. The Cloud Healthcare
6569 // API does not currently enforce all of the rules in a StructureDefinition.
6570 // The following rules are supported: - min/max - minValue/maxValue - maxLength
6571 // - type - fixed[x] - pattern[x] on simple types - slicing, when using "value"
6572 // as the discriminator type - FHIRPath constraints (only when
6573 // `enable_fhirpath_profile_validation` is true) When a URL cannot be resolved
6574 // (for example, in a type assertion), the server does not return an error.
6575 EnabledImplementationGuides []string `json:"enabledImplementationGuides,omitempty"`
6576 // ForceSendFields is a list of field names (e.g. "DisableFhirpathValidation")
6577 // to unconditionally include in API requests. By default, fields with empty or
6578 // default values are omitted from API requests. See
6579 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6580 // details.
6581 ForceSendFields []string `json:"-"`
6582 // NullFields is a list of field names (e.g. "DisableFhirpathValidation") to
6583 // include in API requests with the JSON null value. By default, fields with
6584 // empty values are omitted from API requests. See
6585 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6586 NullFields []string `json:"-"`
6587 }
6588
6589 func (s ValidationConfig) MarshalJSON() ([]byte, error) {
6590 type NoMethod ValidationConfig
6591 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6592 }
6593
6594 // VersionSource: Describes a selector for extracting and matching an MSH field
6595 // to a value.
6596 type VersionSource struct {
6597 // MshField: The field to extract from the MSH segment. For example, "3.1" or
6598 // "18[1].1".
6599 MshField string `json:"mshField,omitempty"`
6600 // Value: The value to match with the field. For example, "My Application Name"
6601 // or "2.3".
6602 Value string `json:"value,omitempty"`
6603 // ForceSendFields is a list of field names (e.g. "MshField") to
6604 // unconditionally include in API requests. By default, fields with empty or
6605 // default values are omitted from API requests. See
6606 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6607 // details.
6608 ForceSendFields []string `json:"-"`
6609 // NullFields is a list of field names (e.g. "MshField") to include in API
6610 // requests with the JSON null value. By default, fields with empty values are
6611 // omitted from API requests. See
6612 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6613 NullFields []string `json:"-"`
6614 }
6615
6616 func (s VersionSource) MarshalJSON() ([]byte, error) {
6617 type NoMethod VersionSource
6618 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6619 }
6620
6621 type ProjectsLocationsGetCall struct {
6622 s *Service
6623 name string
6624 urlParams_ gensupport.URLParams
6625 ifNoneMatch_ string
6626 ctx_ context.Context
6627 header_ http.Header
6628 }
6629
6630 // Get: Gets information about a location.
6631 //
6632 // - name: Resource name for the location.
6633 func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
6634 c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6635 c.name = name
6636 return c
6637 }
6638
6639 // Fields allows partial responses to be retrieved. See
6640 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6641 // details.
6642 func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
6643 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6644 return c
6645 }
6646
6647 // IfNoneMatch sets an optional parameter which makes the operation fail if the
6648 // object's ETag matches the given value. This is useful for getting updates
6649 // only after the object has changed since the last request.
6650 func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
6651 c.ifNoneMatch_ = entityTag
6652 return c
6653 }
6654
6655 // Context sets the context to be used in this call's Do method.
6656 func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
6657 c.ctx_ = ctx
6658 return c
6659 }
6660
6661 // Header returns a http.Header that can be modified by the caller to add
6662 // headers to the request.
6663 func (c *ProjectsLocationsGetCall) Header() http.Header {
6664 if c.header_ == nil {
6665 c.header_ = make(http.Header)
6666 }
6667 return c.header_
6668 }
6669
6670 func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
6671 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6672 if c.ifNoneMatch_ != "" {
6673 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6674 }
6675 c.urlParams_.Set("alt", alt)
6676 c.urlParams_.Set("prettyPrint", "false")
6677 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6678 urls += "?" + c.urlParams_.Encode()
6679 req, err := http.NewRequest("GET", urls, nil)
6680 if err != nil {
6681 return nil, err
6682 }
6683 req.Header = reqHeaders
6684 googleapi.Expand(req.URL, map[string]string{
6685 "name": c.name,
6686 })
6687 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.get", "request", internallog.HTTPRequest(req, nil))
6688 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6689 }
6690
6691 // Do executes the "healthcare.projects.locations.get" call.
6692 // Any non-2xx status code is an error. Response headers are in either
6693 // *Location.ServerResponse.Header or (if a response was returned at all) in
6694 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
6695 // whether the returned error was because http.StatusNotModified was returned.
6696 func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
6697 gensupport.SetOptions(c.urlParams_, opts...)
6698 res, err := c.doRequest("json")
6699 if res != nil && res.StatusCode == http.StatusNotModified {
6700 if res.Body != nil {
6701 res.Body.Close()
6702 }
6703 return nil, gensupport.WrapError(&googleapi.Error{
6704 Code: res.StatusCode,
6705 Header: res.Header,
6706 })
6707 }
6708 if err != nil {
6709 return nil, err
6710 }
6711 defer googleapi.CloseBody(res)
6712 if err := googleapi.CheckResponse(res); err != nil {
6713 return nil, gensupport.WrapError(err)
6714 }
6715 ret := &Location{
6716 ServerResponse: googleapi.ServerResponse{
6717 Header: res.Header,
6718 HTTPStatusCode: res.StatusCode,
6719 },
6720 }
6721 target := &ret
6722 b, err := gensupport.DecodeResponseBytes(target, res)
6723 if err != nil {
6724 return nil, err
6725 }
6726 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.get", "response", internallog.HTTPResponse(res, b))
6727 return ret, nil
6728 }
6729
6730 type ProjectsLocationsListCall struct {
6731 s *Service
6732 name string
6733 urlParams_ gensupport.URLParams
6734 ifNoneMatch_ string
6735 ctx_ context.Context
6736 header_ http.Header
6737 }
6738
6739 // List: Lists information about the supported locations for this service. This
6740 // method lists locations based on the resource scope provided in the
6741 // [ListLocationsRequest.name] field: * **Global locations**: If `name` is
6742 // empty, the method lists the public locations available to all projects. *
6743 // **Project-specific locations**: If `name` follows the format
6744 // `projects/{project}`, the method lists locations visible to that specific
6745 // project. This includes public, private, or other project-specific locations
6746 // enabled for the project. For gRPC and client library implementations, the
6747 // resource name is passed as the `name` field. For direct service calls, the
6748 // resource name is incorporated into the request path based on the specific
6749 // service implementation and version.
6750 //
6751 // - name: The resource that owns the locations collection, if applicable.
6752 func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
6753 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6754 c.name = name
6755 return c
6756 }
6757
6758 // ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do not
6759 // use this field. It is unsupported and is ignored unless explicitly
6760 // documented otherwise. This is primarily for internal usage.
6761 func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall {
6762 c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...))
6763 return c
6764 }
6765
6766 // Filter sets the optional parameter "filter": A filter to narrow down results
6767 // to a preferred subset. The filtering language accepts strings like
6768 // "displayName=tokyo", and is documented in more detail in AIP-160
6769 // (https://google.aip.dev/160).
6770 func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
6771 c.urlParams_.Set("filter", filter)
6772 return c
6773 }
6774
6775 // PageSize sets the optional parameter "pageSize": The maximum number of
6776 // results to return. If not set, the service selects a default.
6777 func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
6778 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6779 return c
6780 }
6781
6782 // PageToken sets the optional parameter "pageToken": A page token received
6783 // from the `next_page_token` field in the response. Send that page token to
6784 // receive the subsequent page.
6785 func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
6786 c.urlParams_.Set("pageToken", pageToken)
6787 return c
6788 }
6789
6790 // Fields allows partial responses to be retrieved. See
6791 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6792 // details.
6793 func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
6794 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6795 return c
6796 }
6797
6798 // IfNoneMatch sets an optional parameter which makes the operation fail if the
6799 // object's ETag matches the given value. This is useful for getting updates
6800 // only after the object has changed since the last request.
6801 func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
6802 c.ifNoneMatch_ = entityTag
6803 return c
6804 }
6805
6806 // Context sets the context to be used in this call's Do method.
6807 func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
6808 c.ctx_ = ctx
6809 return c
6810 }
6811
6812 // Header returns a http.Header that can be modified by the caller to add
6813 // headers to the request.
6814 func (c *ProjectsLocationsListCall) Header() http.Header {
6815 if c.header_ == nil {
6816 c.header_ = make(http.Header)
6817 }
6818 return c.header_
6819 }
6820
6821 func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
6822 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6823 if c.ifNoneMatch_ != "" {
6824 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6825 }
6826 c.urlParams_.Set("alt", alt)
6827 c.urlParams_.Set("prettyPrint", "false")
6828 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations")
6829 urls += "?" + c.urlParams_.Encode()
6830 req, err := http.NewRequest("GET", urls, nil)
6831 if err != nil {
6832 return nil, err
6833 }
6834 req.Header = reqHeaders
6835 googleapi.Expand(req.URL, map[string]string{
6836 "name": c.name,
6837 })
6838 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.list", "request", internallog.HTTPRequest(req, nil))
6839 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6840 }
6841
6842 // Do executes the "healthcare.projects.locations.list" call.
6843 // Any non-2xx status code is an error. Response headers are in either
6844 // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
6845 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6846 // check whether the returned error was because http.StatusNotModified was
6847 // returned.
6848 func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
6849 gensupport.SetOptions(c.urlParams_, opts...)
6850 res, err := c.doRequest("json")
6851 if res != nil && res.StatusCode == http.StatusNotModified {
6852 if res.Body != nil {
6853 res.Body.Close()
6854 }
6855 return nil, gensupport.WrapError(&googleapi.Error{
6856 Code: res.StatusCode,
6857 Header: res.Header,
6858 })
6859 }
6860 if err != nil {
6861 return nil, err
6862 }
6863 defer googleapi.CloseBody(res)
6864 if err := googleapi.CheckResponse(res); err != nil {
6865 return nil, gensupport.WrapError(err)
6866 }
6867 ret := &ListLocationsResponse{
6868 ServerResponse: googleapi.ServerResponse{
6869 Header: res.Header,
6870 HTTPStatusCode: res.StatusCode,
6871 },
6872 }
6873 target := &ret
6874 b, err := gensupport.DecodeResponseBytes(target, res)
6875 if err != nil {
6876 return nil, err
6877 }
6878 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.list", "response", internallog.HTTPResponse(res, b))
6879 return ret, nil
6880 }
6881
6882 // Pages invokes f for each page of results.
6883 // A non-nil error returned from f will halt the iteration.
6884 // The provided context supersedes any context provided to the Context method.
6885 func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
6886 c.ctx_ = ctx
6887 defer c.PageToken(c.urlParams_.Get("pageToken"))
6888 for {
6889 x, err := c.Do()
6890 if err != nil {
6891 return err
6892 }
6893 if err := f(x); err != nil {
6894 return err
6895 }
6896 if x.NextPageToken == "" {
6897 return nil
6898 }
6899 c.PageToken(x.NextPageToken)
6900 }
6901 }
6902
6903 type ProjectsLocationsDatasetsCreateCall struct {
6904 s *Service
6905 parent string
6906 dataset *Dataset
6907 urlParams_ gensupport.URLParams
6908 ctx_ context.Context
6909 header_ http.Header
6910 }
6911
6912 // Create: Creates a new health dataset. Results are returned through the
6913 // Operation interface which returns either an `Operation.response` which
6914 // contains a Dataset or `Operation.error`. The metadata field type is
6915 // OperationMetadata.
6916 //
6917 // - parent: The name of the project where the server creates the dataset. For
6918 // example, `projects/{project_id}/locations/{location_id}`.
6919 func (r *ProjectsLocationsDatasetsService) Create(parent string, dataset *Dataset) *ProjectsLocationsDatasetsCreateCall {
6920 c := &ProjectsLocationsDatasetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6921 c.parent = parent
6922 c.dataset = dataset
6923 return c
6924 }
6925
6926 // DatasetId sets the optional parameter "datasetId": Required. The ID of the
6927 // dataset that is being created. The string must match the following regex:
6928 // `[\p{L}\p{N}_\-\.]{1,256}`.
6929 func (c *ProjectsLocationsDatasetsCreateCall) DatasetId(datasetId string) *ProjectsLocationsDatasetsCreateCall {
6930 c.urlParams_.Set("datasetId", datasetId)
6931 return c
6932 }
6933
6934 // Fields allows partial responses to be retrieved. See
6935 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6936 // details.
6937 func (c *ProjectsLocationsDatasetsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsCreateCall {
6938 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6939 return c
6940 }
6941
6942 // Context sets the context to be used in this call's Do method.
6943 func (c *ProjectsLocationsDatasetsCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsCreateCall {
6944 c.ctx_ = ctx
6945 return c
6946 }
6947
6948 // Header returns a http.Header that can be modified by the caller to add
6949 // headers to the request.
6950 func (c *ProjectsLocationsDatasetsCreateCall) Header() http.Header {
6951 if c.header_ == nil {
6952 c.header_ = make(http.Header)
6953 }
6954 return c.header_
6955 }
6956
6957 func (c *ProjectsLocationsDatasetsCreateCall) doRequest(alt string) (*http.Response, error) {
6958 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6959 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.dataset)
6960 if err != nil {
6961 return nil, err
6962 }
6963 c.urlParams_.Set("alt", alt)
6964 c.urlParams_.Set("prettyPrint", "false")
6965 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datasets")
6966 urls += "?" + c.urlParams_.Encode()
6967 req, err := http.NewRequest("POST", urls, body)
6968 if err != nil {
6969 return nil, err
6970 }
6971 req.Header = reqHeaders
6972 googleapi.Expand(req.URL, map[string]string{
6973 "parent": c.parent,
6974 })
6975 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.create", "request", internallog.HTTPRequest(req, body.Bytes()))
6976 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6977 }
6978
6979 // Do executes the "healthcare.projects.locations.datasets.create" call.
6980 // Any non-2xx status code is an error. Response headers are in either
6981 // *Operation.ServerResponse.Header or (if a response was returned at all) in
6982 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
6983 // whether the returned error was because http.StatusNotModified was returned.
6984 func (c *ProjectsLocationsDatasetsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6985 gensupport.SetOptions(c.urlParams_, opts...)
6986 res, err := c.doRequest("json")
6987 if res != nil && res.StatusCode == http.StatusNotModified {
6988 if res.Body != nil {
6989 res.Body.Close()
6990 }
6991 return nil, gensupport.WrapError(&googleapi.Error{
6992 Code: res.StatusCode,
6993 Header: res.Header,
6994 })
6995 }
6996 if err != nil {
6997 return nil, err
6998 }
6999 defer googleapi.CloseBody(res)
7000 if err := googleapi.CheckResponse(res); err != nil {
7001 return nil, gensupport.WrapError(err)
7002 }
7003 ret := &Operation{
7004 ServerResponse: googleapi.ServerResponse{
7005 Header: res.Header,
7006 HTTPStatusCode: res.StatusCode,
7007 },
7008 }
7009 target := &ret
7010 b, err := gensupport.DecodeResponseBytes(target, res)
7011 if err != nil {
7012 return nil, err
7013 }
7014 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.create", "response", internallog.HTTPResponse(res, b))
7015 return ret, nil
7016 }
7017
7018 type ProjectsLocationsDatasetsDeidentifyCall struct {
7019 s *Service
7020 sourceDataset string
7021 deidentifydatasetrequest *DeidentifyDatasetRequest
7022 urlParams_ gensupport.URLParams
7023 ctx_ context.Context
7024 header_ http.Header
7025 }
7026
7027 // Deidentify: Creates a new dataset containing de-identified data from the
7028 // source dataset. The metadata field type is OperationMetadata. If the request
7029 // is successful, the response field type is DeidentifySummary. If errors
7030 // occur, error is set. The LRO result may still be successful if
7031 // de-identification fails for some DICOM instances. The new de-identified
7032 // dataset will not contain these failed resources. Failed resource totals are
7033 // tracked in Operation.metadata. Error details are also logged to Cloud
7034 // Logging. For more information, see Viewing error logs in Cloud Logging
7035 // (https://cloud.google.com/healthcare/docs/how-tos/logging).
7036 //
7037 // - sourceDataset: Source dataset resource name. For example,
7038 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`. R5
7039 // FHIR stores are not supported and will be skipped.
7040 func (r *ProjectsLocationsDatasetsService) Deidentify(sourceDataset string, deidentifydatasetrequest *DeidentifyDatasetRequest) *ProjectsLocationsDatasetsDeidentifyCall {
7041 c := &ProjectsLocationsDatasetsDeidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7042 c.sourceDataset = sourceDataset
7043 c.deidentifydatasetrequest = deidentifydatasetrequest
7044 return c
7045 }
7046
7047 // Fields allows partial responses to be retrieved. See
7048 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7049 // details.
7050 func (c *ProjectsLocationsDatasetsDeidentifyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDeidentifyCall {
7051 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7052 return c
7053 }
7054
7055 // Context sets the context to be used in this call's Do method.
7056 func (c *ProjectsLocationsDatasetsDeidentifyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDeidentifyCall {
7057 c.ctx_ = ctx
7058 return c
7059 }
7060
7061 // Header returns a http.Header that can be modified by the caller to add
7062 // headers to the request.
7063 func (c *ProjectsLocationsDatasetsDeidentifyCall) Header() http.Header {
7064 if c.header_ == nil {
7065 c.header_ = make(http.Header)
7066 }
7067 return c.header_
7068 }
7069
7070 func (c *ProjectsLocationsDatasetsDeidentifyCall) doRequest(alt string) (*http.Response, error) {
7071 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7072 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.deidentifydatasetrequest)
7073 if err != nil {
7074 return nil, err
7075 }
7076 c.urlParams_.Set("alt", alt)
7077 c.urlParams_.Set("prettyPrint", "false")
7078 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+sourceDataset}:deidentify")
7079 urls += "?" + c.urlParams_.Encode()
7080 req, err := http.NewRequest("POST", urls, body)
7081 if err != nil {
7082 return nil, err
7083 }
7084 req.Header = reqHeaders
7085 googleapi.Expand(req.URL, map[string]string{
7086 "sourceDataset": c.sourceDataset,
7087 })
7088 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.deidentify", "request", internallog.HTTPRequest(req, body.Bytes()))
7089 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7090 }
7091
7092 // Do executes the "healthcare.projects.locations.datasets.deidentify" call.
7093 // Any non-2xx status code is an error. Response headers are in either
7094 // *Operation.ServerResponse.Header or (if a response was returned at all) in
7095 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7096 // whether the returned error was because http.StatusNotModified was returned.
7097 func (c *ProjectsLocationsDatasetsDeidentifyCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7098 gensupport.SetOptions(c.urlParams_, opts...)
7099 res, err := c.doRequest("json")
7100 if res != nil && res.StatusCode == http.StatusNotModified {
7101 if res.Body != nil {
7102 res.Body.Close()
7103 }
7104 return nil, gensupport.WrapError(&googleapi.Error{
7105 Code: res.StatusCode,
7106 Header: res.Header,
7107 })
7108 }
7109 if err != nil {
7110 return nil, err
7111 }
7112 defer googleapi.CloseBody(res)
7113 if err := googleapi.CheckResponse(res); err != nil {
7114 return nil, gensupport.WrapError(err)
7115 }
7116 ret := &Operation{
7117 ServerResponse: googleapi.ServerResponse{
7118 Header: res.Header,
7119 HTTPStatusCode: res.StatusCode,
7120 },
7121 }
7122 target := &ret
7123 b, err := gensupport.DecodeResponseBytes(target, res)
7124 if err != nil {
7125 return nil, err
7126 }
7127 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.deidentify", "response", internallog.HTTPResponse(res, b))
7128 return ret, nil
7129 }
7130
7131 type ProjectsLocationsDatasetsDeleteCall struct {
7132 s *Service
7133 name string
7134 urlParams_ gensupport.URLParams
7135 ctx_ context.Context
7136 header_ http.Header
7137 }
7138
7139 // Delete: Deletes the specified health dataset and all data contained in the
7140 // dataset. Deleting a dataset does not affect the sources from which the
7141 // dataset was imported (if any).
7142 //
7143 // - name: The name of the dataset to delete. For example,
7144 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.
7145 func (r *ProjectsLocationsDatasetsService) Delete(name string) *ProjectsLocationsDatasetsDeleteCall {
7146 c := &ProjectsLocationsDatasetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7147 c.name = name
7148 return c
7149 }
7150
7151 // Fields allows partial responses to be retrieved. See
7152 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7153 // details.
7154 func (c *ProjectsLocationsDatasetsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDeleteCall {
7155 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7156 return c
7157 }
7158
7159 // Context sets the context to be used in this call's Do method.
7160 func (c *ProjectsLocationsDatasetsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDeleteCall {
7161 c.ctx_ = ctx
7162 return c
7163 }
7164
7165 // Header returns a http.Header that can be modified by the caller to add
7166 // headers to the request.
7167 func (c *ProjectsLocationsDatasetsDeleteCall) Header() http.Header {
7168 if c.header_ == nil {
7169 c.header_ = make(http.Header)
7170 }
7171 return c.header_
7172 }
7173
7174 func (c *ProjectsLocationsDatasetsDeleteCall) doRequest(alt string) (*http.Response, error) {
7175 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7176 c.urlParams_.Set("alt", alt)
7177 c.urlParams_.Set("prettyPrint", "false")
7178 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7179 urls += "?" + c.urlParams_.Encode()
7180 req, err := http.NewRequest("DELETE", urls, nil)
7181 if err != nil {
7182 return nil, err
7183 }
7184 req.Header = reqHeaders
7185 googleapi.Expand(req.URL, map[string]string{
7186 "name": c.name,
7187 })
7188 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.delete", "request", internallog.HTTPRequest(req, nil))
7189 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7190 }
7191
7192 // Do executes the "healthcare.projects.locations.datasets.delete" call.
7193 // Any non-2xx status code is an error. Response headers are in either
7194 // *Empty.ServerResponse.Header or (if a response was returned at all) in
7195 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7196 // whether the returned error was because http.StatusNotModified was returned.
7197 func (c *ProjectsLocationsDatasetsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
7198 gensupport.SetOptions(c.urlParams_, opts...)
7199 res, err := c.doRequest("json")
7200 if res != nil && res.StatusCode == http.StatusNotModified {
7201 if res.Body != nil {
7202 res.Body.Close()
7203 }
7204 return nil, gensupport.WrapError(&googleapi.Error{
7205 Code: res.StatusCode,
7206 Header: res.Header,
7207 })
7208 }
7209 if err != nil {
7210 return nil, err
7211 }
7212 defer googleapi.CloseBody(res)
7213 if err := googleapi.CheckResponse(res); err != nil {
7214 return nil, gensupport.WrapError(err)
7215 }
7216 ret := &Empty{
7217 ServerResponse: googleapi.ServerResponse{
7218 Header: res.Header,
7219 HTTPStatusCode: res.StatusCode,
7220 },
7221 }
7222 target := &ret
7223 b, err := gensupport.DecodeResponseBytes(target, res)
7224 if err != nil {
7225 return nil, err
7226 }
7227 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.delete", "response", internallog.HTTPResponse(res, b))
7228 return ret, nil
7229 }
7230
7231 type ProjectsLocationsDatasetsGetCall struct {
7232 s *Service
7233 name string
7234 urlParams_ gensupport.URLParams
7235 ifNoneMatch_ string
7236 ctx_ context.Context
7237 header_ http.Header
7238 }
7239
7240 // Get: Gets any metadata associated with a dataset.
7241 //
7242 // - name: The name of the dataset to read. For example,
7243 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.
7244 func (r *ProjectsLocationsDatasetsService) Get(name string) *ProjectsLocationsDatasetsGetCall {
7245 c := &ProjectsLocationsDatasetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7246 c.name = name
7247 return c
7248 }
7249
7250 // Fields allows partial responses to be retrieved. See
7251 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7252 // details.
7253 func (c *ProjectsLocationsDatasetsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsGetCall {
7254 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7255 return c
7256 }
7257
7258 // IfNoneMatch sets an optional parameter which makes the operation fail if the
7259 // object's ETag matches the given value. This is useful for getting updates
7260 // only after the object has changed since the last request.
7261 func (c *ProjectsLocationsDatasetsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsGetCall {
7262 c.ifNoneMatch_ = entityTag
7263 return c
7264 }
7265
7266 // Context sets the context to be used in this call's Do method.
7267 func (c *ProjectsLocationsDatasetsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsGetCall {
7268 c.ctx_ = ctx
7269 return c
7270 }
7271
7272 // Header returns a http.Header that can be modified by the caller to add
7273 // headers to the request.
7274 func (c *ProjectsLocationsDatasetsGetCall) Header() http.Header {
7275 if c.header_ == nil {
7276 c.header_ = make(http.Header)
7277 }
7278 return c.header_
7279 }
7280
7281 func (c *ProjectsLocationsDatasetsGetCall) doRequest(alt string) (*http.Response, error) {
7282 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7283 if c.ifNoneMatch_ != "" {
7284 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7285 }
7286 c.urlParams_.Set("alt", alt)
7287 c.urlParams_.Set("prettyPrint", "false")
7288 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7289 urls += "?" + c.urlParams_.Encode()
7290 req, err := http.NewRequest("GET", urls, nil)
7291 if err != nil {
7292 return nil, err
7293 }
7294 req.Header = reqHeaders
7295 googleapi.Expand(req.URL, map[string]string{
7296 "name": c.name,
7297 })
7298 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.get", "request", internallog.HTTPRequest(req, nil))
7299 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7300 }
7301
7302 // Do executes the "healthcare.projects.locations.datasets.get" call.
7303 // Any non-2xx status code is an error. Response headers are in either
7304 // *Dataset.ServerResponse.Header or (if a response was returned at all) in
7305 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7306 // whether the returned error was because http.StatusNotModified was returned.
7307 func (c *ProjectsLocationsDatasetsGetCall) Do(opts ...googleapi.CallOption) (*Dataset, error) {
7308 gensupport.SetOptions(c.urlParams_, opts...)
7309 res, err := c.doRequest("json")
7310 if res != nil && res.StatusCode == http.StatusNotModified {
7311 if res.Body != nil {
7312 res.Body.Close()
7313 }
7314 return nil, gensupport.WrapError(&googleapi.Error{
7315 Code: res.StatusCode,
7316 Header: res.Header,
7317 })
7318 }
7319 if err != nil {
7320 return nil, err
7321 }
7322 defer googleapi.CloseBody(res)
7323 if err := googleapi.CheckResponse(res); err != nil {
7324 return nil, gensupport.WrapError(err)
7325 }
7326 ret := &Dataset{
7327 ServerResponse: googleapi.ServerResponse{
7328 Header: res.Header,
7329 HTTPStatusCode: res.StatusCode,
7330 },
7331 }
7332 target := &ret
7333 b, err := gensupport.DecodeResponseBytes(target, res)
7334 if err != nil {
7335 return nil, err
7336 }
7337 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.get", "response", internallog.HTTPResponse(res, b))
7338 return ret, nil
7339 }
7340
7341 type ProjectsLocationsDatasetsGetIamPolicyCall struct {
7342 s *Service
7343 resource string
7344 urlParams_ gensupport.URLParams
7345 ifNoneMatch_ string
7346 ctx_ context.Context
7347 header_ http.Header
7348 }
7349
7350 // GetIamPolicy: Gets the access control policy for a resource. Returns an
7351 // empty policy if the resource exists and does not have a policy set.
7352 //
7353 // - resource: REQUIRED: The resource for which the policy is being requested.
7354 // See Resource names (https://cloud.google.com/apis/design/resource_names)
7355 // for the appropriate value for this field.
7356 func (r *ProjectsLocationsDatasetsService) GetIamPolicy(resource string) *ProjectsLocationsDatasetsGetIamPolicyCall {
7357 c := &ProjectsLocationsDatasetsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7358 c.resource = resource
7359 return c
7360 }
7361
7362 // OptionsRequestedPolicyVersion sets the optional parameter
7363 // "options.requestedPolicyVersion": The maximum policy version that will be
7364 // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
7365 // an invalid value will be rejected. Requests for policies with any
7366 // conditional role bindings must specify version 3. Policies with no
7367 // conditional role bindings may specify any valid value or leave the field
7368 // unset. The policy in the response might use the policy version that you
7369 // specified, or it might use a lower policy version. For example, if you
7370 // specify version 3, but the policy has no conditional role bindings, the
7371 // response uses version 1. To learn which resources support conditions in
7372 // their IAM policies, see the IAM documentation
7373 // (https://cloud.google.com/iam/help/conditions/resource-policies).
7374 func (c *ProjectsLocationsDatasetsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDatasetsGetIamPolicyCall {
7375 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
7376 return c
7377 }
7378
7379 // Fields allows partial responses to be retrieved. See
7380 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7381 // details.
7382 func (c *ProjectsLocationsDatasetsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsGetIamPolicyCall {
7383 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7384 return c
7385 }
7386
7387 // IfNoneMatch sets an optional parameter which makes the operation fail if the
7388 // object's ETag matches the given value. This is useful for getting updates
7389 // only after the object has changed since the last request.
7390 func (c *ProjectsLocationsDatasetsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsGetIamPolicyCall {
7391 c.ifNoneMatch_ = entityTag
7392 return c
7393 }
7394
7395 // Context sets the context to be used in this call's Do method.
7396 func (c *ProjectsLocationsDatasetsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsGetIamPolicyCall {
7397 c.ctx_ = ctx
7398 return c
7399 }
7400
7401 // Header returns a http.Header that can be modified by the caller to add
7402 // headers to the request.
7403 func (c *ProjectsLocationsDatasetsGetIamPolicyCall) Header() http.Header {
7404 if c.header_ == nil {
7405 c.header_ = make(http.Header)
7406 }
7407 return c.header_
7408 }
7409
7410 func (c *ProjectsLocationsDatasetsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
7411 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7412 if c.ifNoneMatch_ != "" {
7413 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7414 }
7415 c.urlParams_.Set("alt", alt)
7416 c.urlParams_.Set("prettyPrint", "false")
7417 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
7418 urls += "?" + c.urlParams_.Encode()
7419 req, err := http.NewRequest("GET", urls, nil)
7420 if err != nil {
7421 return nil, err
7422 }
7423 req.Header = reqHeaders
7424 googleapi.Expand(req.URL, map[string]string{
7425 "resource": c.resource,
7426 })
7427 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.getIamPolicy", "request", internallog.HTTPRequest(req, nil))
7428 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7429 }
7430
7431 // Do executes the "healthcare.projects.locations.datasets.getIamPolicy" call.
7432 // Any non-2xx status code is an error. Response headers are in either
7433 // *Policy.ServerResponse.Header or (if a response was returned at all) in
7434 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7435 // whether the returned error was because http.StatusNotModified was returned.
7436 func (c *ProjectsLocationsDatasetsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
7437 gensupport.SetOptions(c.urlParams_, opts...)
7438 res, err := c.doRequest("json")
7439 if res != nil && res.StatusCode == http.StatusNotModified {
7440 if res.Body != nil {
7441 res.Body.Close()
7442 }
7443 return nil, gensupport.WrapError(&googleapi.Error{
7444 Code: res.StatusCode,
7445 Header: res.Header,
7446 })
7447 }
7448 if err != nil {
7449 return nil, err
7450 }
7451 defer googleapi.CloseBody(res)
7452 if err := googleapi.CheckResponse(res); err != nil {
7453 return nil, gensupport.WrapError(err)
7454 }
7455 ret := &Policy{
7456 ServerResponse: googleapi.ServerResponse{
7457 Header: res.Header,
7458 HTTPStatusCode: res.StatusCode,
7459 },
7460 }
7461 target := &ret
7462 b, err := gensupport.DecodeResponseBytes(target, res)
7463 if err != nil {
7464 return nil, err
7465 }
7466 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.getIamPolicy", "response", internallog.HTTPResponse(res, b))
7467 return ret, nil
7468 }
7469
7470 type ProjectsLocationsDatasetsListCall struct {
7471 s *Service
7472 parent string
7473 urlParams_ gensupport.URLParams
7474 ifNoneMatch_ string
7475 ctx_ context.Context
7476 header_ http.Header
7477 }
7478
7479 // List: Lists the health datasets in the current project.
7480 //
7481 // - parent: The name of the project whose datasets should be listed. For
7482 // example, `projects/{project_id}/locations/{location_id}`.
7483 func (r *ProjectsLocationsDatasetsService) List(parent string) *ProjectsLocationsDatasetsListCall {
7484 c := &ProjectsLocationsDatasetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7485 c.parent = parent
7486 return c
7487 }
7488
7489 // PageSize sets the optional parameter "pageSize": The maximum number of items
7490 // to return. If not specified, 100 is used. May not be larger than 1000.
7491 func (c *ProjectsLocationsDatasetsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsListCall {
7492 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7493 return c
7494 }
7495
7496 // PageToken sets the optional parameter "pageToken": The next_page_token value
7497 // returned from a previous List request, if any.
7498 func (c *ProjectsLocationsDatasetsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsListCall {
7499 c.urlParams_.Set("pageToken", pageToken)
7500 return c
7501 }
7502
7503 // Fields allows partial responses to be retrieved. See
7504 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7505 // details.
7506 func (c *ProjectsLocationsDatasetsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsListCall {
7507 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7508 return c
7509 }
7510
7511 // IfNoneMatch sets an optional parameter which makes the operation fail if the
7512 // object's ETag matches the given value. This is useful for getting updates
7513 // only after the object has changed since the last request.
7514 func (c *ProjectsLocationsDatasetsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsListCall {
7515 c.ifNoneMatch_ = entityTag
7516 return c
7517 }
7518
7519 // Context sets the context to be used in this call's Do method.
7520 func (c *ProjectsLocationsDatasetsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsListCall {
7521 c.ctx_ = ctx
7522 return c
7523 }
7524
7525 // Header returns a http.Header that can be modified by the caller to add
7526 // headers to the request.
7527 func (c *ProjectsLocationsDatasetsListCall) Header() http.Header {
7528 if c.header_ == nil {
7529 c.header_ = make(http.Header)
7530 }
7531 return c.header_
7532 }
7533
7534 func (c *ProjectsLocationsDatasetsListCall) doRequest(alt string) (*http.Response, error) {
7535 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7536 if c.ifNoneMatch_ != "" {
7537 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7538 }
7539 c.urlParams_.Set("alt", alt)
7540 c.urlParams_.Set("prettyPrint", "false")
7541 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datasets")
7542 urls += "?" + c.urlParams_.Encode()
7543 req, err := http.NewRequest("GET", urls, nil)
7544 if err != nil {
7545 return nil, err
7546 }
7547 req.Header = reqHeaders
7548 googleapi.Expand(req.URL, map[string]string{
7549 "parent": c.parent,
7550 })
7551 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.list", "request", internallog.HTTPRequest(req, nil))
7552 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7553 }
7554
7555 // Do executes the "healthcare.projects.locations.datasets.list" call.
7556 // Any non-2xx status code is an error. Response headers are in either
7557 // *ListDatasetsResponse.ServerResponse.Header or (if a response was returned
7558 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7559 // check whether the returned error was because http.StatusNotModified was
7560 // returned.
7561 func (c *ProjectsLocationsDatasetsListCall) Do(opts ...googleapi.CallOption) (*ListDatasetsResponse, error) {
7562 gensupport.SetOptions(c.urlParams_, opts...)
7563 res, err := c.doRequest("json")
7564 if res != nil && res.StatusCode == http.StatusNotModified {
7565 if res.Body != nil {
7566 res.Body.Close()
7567 }
7568 return nil, gensupport.WrapError(&googleapi.Error{
7569 Code: res.StatusCode,
7570 Header: res.Header,
7571 })
7572 }
7573 if err != nil {
7574 return nil, err
7575 }
7576 defer googleapi.CloseBody(res)
7577 if err := googleapi.CheckResponse(res); err != nil {
7578 return nil, gensupport.WrapError(err)
7579 }
7580 ret := &ListDatasetsResponse{
7581 ServerResponse: googleapi.ServerResponse{
7582 Header: res.Header,
7583 HTTPStatusCode: res.StatusCode,
7584 },
7585 }
7586 target := &ret
7587 b, err := gensupport.DecodeResponseBytes(target, res)
7588 if err != nil {
7589 return nil, err
7590 }
7591 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.list", "response", internallog.HTTPResponse(res, b))
7592 return ret, nil
7593 }
7594
7595 // Pages invokes f for each page of results.
7596 // A non-nil error returned from f will halt the iteration.
7597 // The provided context supersedes any context provided to the Context method.
7598 func (c *ProjectsLocationsDatasetsListCall) Pages(ctx context.Context, f func(*ListDatasetsResponse) error) error {
7599 c.ctx_ = ctx
7600 defer c.PageToken(c.urlParams_.Get("pageToken"))
7601 for {
7602 x, err := c.Do()
7603 if err != nil {
7604 return err
7605 }
7606 if err := f(x); err != nil {
7607 return err
7608 }
7609 if x.NextPageToken == "" {
7610 return nil
7611 }
7612 c.PageToken(x.NextPageToken)
7613 }
7614 }
7615
7616 type ProjectsLocationsDatasetsPatchCall struct {
7617 s *Service
7618 name string
7619 dataset *Dataset
7620 urlParams_ gensupport.URLParams
7621 ctx_ context.Context
7622 header_ http.Header
7623 }
7624
7625 // Patch: Updates dataset metadata.
7626 //
7627 // - name: Identifier. Resource name of the dataset, of the form
7628 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.
7629 func (r *ProjectsLocationsDatasetsService) Patch(name string, dataset *Dataset) *ProjectsLocationsDatasetsPatchCall {
7630 c := &ProjectsLocationsDatasetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7631 c.name = name
7632 c.dataset = dataset
7633 return c
7634 }
7635
7636 // UpdateMask sets the optional parameter "updateMask": Required. The update
7637 // mask applies to the resource. For the `FieldMask` definition, see
7638 // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
7639 func (c *ProjectsLocationsDatasetsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsPatchCall {
7640 c.urlParams_.Set("updateMask", updateMask)
7641 return c
7642 }
7643
7644 // Fields allows partial responses to be retrieved. See
7645 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7646 // details.
7647 func (c *ProjectsLocationsDatasetsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsPatchCall {
7648 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7649 return c
7650 }
7651
7652 // Context sets the context to be used in this call's Do method.
7653 func (c *ProjectsLocationsDatasetsPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsPatchCall {
7654 c.ctx_ = ctx
7655 return c
7656 }
7657
7658 // Header returns a http.Header that can be modified by the caller to add
7659 // headers to the request.
7660 func (c *ProjectsLocationsDatasetsPatchCall) Header() http.Header {
7661 if c.header_ == nil {
7662 c.header_ = make(http.Header)
7663 }
7664 return c.header_
7665 }
7666
7667 func (c *ProjectsLocationsDatasetsPatchCall) doRequest(alt string) (*http.Response, error) {
7668 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7669 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.dataset)
7670 if err != nil {
7671 return nil, err
7672 }
7673 c.urlParams_.Set("alt", alt)
7674 c.urlParams_.Set("prettyPrint", "false")
7675 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7676 urls += "?" + c.urlParams_.Encode()
7677 req, err := http.NewRequest("PATCH", urls, body)
7678 if err != nil {
7679 return nil, err
7680 }
7681 req.Header = reqHeaders
7682 googleapi.Expand(req.URL, map[string]string{
7683 "name": c.name,
7684 })
7685 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
7686 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7687 }
7688
7689 // Do executes the "healthcare.projects.locations.datasets.patch" call.
7690 // Any non-2xx status code is an error. Response headers are in either
7691 // *Dataset.ServerResponse.Header or (if a response was returned at all) in
7692 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7693 // whether the returned error was because http.StatusNotModified was returned.
7694 func (c *ProjectsLocationsDatasetsPatchCall) Do(opts ...googleapi.CallOption) (*Dataset, error) {
7695 gensupport.SetOptions(c.urlParams_, opts...)
7696 res, err := c.doRequest("json")
7697 if res != nil && res.StatusCode == http.StatusNotModified {
7698 if res.Body != nil {
7699 res.Body.Close()
7700 }
7701 return nil, gensupport.WrapError(&googleapi.Error{
7702 Code: res.StatusCode,
7703 Header: res.Header,
7704 })
7705 }
7706 if err != nil {
7707 return nil, err
7708 }
7709 defer googleapi.CloseBody(res)
7710 if err := googleapi.CheckResponse(res); err != nil {
7711 return nil, gensupport.WrapError(err)
7712 }
7713 ret := &Dataset{
7714 ServerResponse: googleapi.ServerResponse{
7715 Header: res.Header,
7716 HTTPStatusCode: res.StatusCode,
7717 },
7718 }
7719 target := &ret
7720 b, err := gensupport.DecodeResponseBytes(target, res)
7721 if err != nil {
7722 return nil, err
7723 }
7724 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.patch", "response", internallog.HTTPResponse(res, b))
7725 return ret, nil
7726 }
7727
7728 type ProjectsLocationsDatasetsSetIamPolicyCall struct {
7729 s *Service
7730 resource string
7731 setiampolicyrequest *SetIamPolicyRequest
7732 urlParams_ gensupport.URLParams
7733 ctx_ context.Context
7734 header_ http.Header
7735 }
7736
7737 // SetIamPolicy: Sets the access control policy on the specified resource.
7738 // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
7739 // and `PERMISSION_DENIED` errors.
7740 //
7741 // - resource: REQUIRED: The resource for which the policy is being specified.
7742 // See Resource names (https://cloud.google.com/apis/design/resource_names)
7743 // for the appropriate value for this field.
7744 func (r *ProjectsLocationsDatasetsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsSetIamPolicyCall {
7745 c := &ProjectsLocationsDatasetsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7746 c.resource = resource
7747 c.setiampolicyrequest = setiampolicyrequest
7748 return c
7749 }
7750
7751 // Fields allows partial responses to be retrieved. See
7752 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7753 // details.
7754 func (c *ProjectsLocationsDatasetsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSetIamPolicyCall {
7755 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7756 return c
7757 }
7758
7759 // Context sets the context to be used in this call's Do method.
7760 func (c *ProjectsLocationsDatasetsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSetIamPolicyCall {
7761 c.ctx_ = ctx
7762 return c
7763 }
7764
7765 // Header returns a http.Header that can be modified by the caller to add
7766 // headers to the request.
7767 func (c *ProjectsLocationsDatasetsSetIamPolicyCall) Header() http.Header {
7768 if c.header_ == nil {
7769 c.header_ = make(http.Header)
7770 }
7771 return c.header_
7772 }
7773
7774 func (c *ProjectsLocationsDatasetsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
7775 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7776 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest)
7777 if err != nil {
7778 return nil, err
7779 }
7780 c.urlParams_.Set("alt", alt)
7781 c.urlParams_.Set("prettyPrint", "false")
7782 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
7783 urls += "?" + c.urlParams_.Encode()
7784 req, err := http.NewRequest("POST", urls, body)
7785 if err != nil {
7786 return nil, err
7787 }
7788 req.Header = reqHeaders
7789 googleapi.Expand(req.URL, map[string]string{
7790 "resource": c.resource,
7791 })
7792 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes()))
7793 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7794 }
7795
7796 // Do executes the "healthcare.projects.locations.datasets.setIamPolicy" call.
7797 // Any non-2xx status code is an error. Response headers are in either
7798 // *Policy.ServerResponse.Header or (if a response was returned at all) in
7799 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7800 // whether the returned error was because http.StatusNotModified was returned.
7801 func (c *ProjectsLocationsDatasetsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
7802 gensupport.SetOptions(c.urlParams_, opts...)
7803 res, err := c.doRequest("json")
7804 if res != nil && res.StatusCode == http.StatusNotModified {
7805 if res.Body != nil {
7806 res.Body.Close()
7807 }
7808 return nil, gensupport.WrapError(&googleapi.Error{
7809 Code: res.StatusCode,
7810 Header: res.Header,
7811 })
7812 }
7813 if err != nil {
7814 return nil, err
7815 }
7816 defer googleapi.CloseBody(res)
7817 if err := googleapi.CheckResponse(res); err != nil {
7818 return nil, gensupport.WrapError(err)
7819 }
7820 ret := &Policy{
7821 ServerResponse: googleapi.ServerResponse{
7822 Header: res.Header,
7823 HTTPStatusCode: res.StatusCode,
7824 },
7825 }
7826 target := &ret
7827 b, err := gensupport.DecodeResponseBytes(target, res)
7828 if err != nil {
7829 return nil, err
7830 }
7831 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.setIamPolicy", "response", internallog.HTTPResponse(res, b))
7832 return ret, nil
7833 }
7834
7835 type ProjectsLocationsDatasetsTestIamPermissionsCall struct {
7836 s *Service
7837 resource string
7838 testiampermissionsrequest *TestIamPermissionsRequest
7839 urlParams_ gensupport.URLParams
7840 ctx_ context.Context
7841 header_ http.Header
7842 }
7843
7844 // TestIamPermissions: Returns permissions that a caller has on the specified
7845 // resource. If the resource does not exist, this will return an empty set of
7846 // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
7847 // used for building permission-aware UIs and command-line tools, not for
7848 // authorization checking. This operation may "fail open" without warning.
7849 //
7850 // - resource: REQUIRED: The resource for which the policy detail is being
7851 // requested. See Resource names
7852 // (https://cloud.google.com/apis/design/resource_names) for the appropriate
7853 // value for this field.
7854 func (r *ProjectsLocationsDatasetsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsTestIamPermissionsCall {
7855 c := &ProjectsLocationsDatasetsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7856 c.resource = resource
7857 c.testiampermissionsrequest = testiampermissionsrequest
7858 return c
7859 }
7860
7861 // Fields allows partial responses to be retrieved. See
7862 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7863 // details.
7864 func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsTestIamPermissionsCall {
7865 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7866 return c
7867 }
7868
7869 // Context sets the context to be used in this call's Do method.
7870 func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsTestIamPermissionsCall {
7871 c.ctx_ = ctx
7872 return c
7873 }
7874
7875 // Header returns a http.Header that can be modified by the caller to add
7876 // headers to the request.
7877 func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) Header() http.Header {
7878 if c.header_ == nil {
7879 c.header_ = make(http.Header)
7880 }
7881 return c.header_
7882 }
7883
7884 func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
7885 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7886 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest)
7887 if err != nil {
7888 return nil, err
7889 }
7890 c.urlParams_.Set("alt", alt)
7891 c.urlParams_.Set("prettyPrint", "false")
7892 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
7893 urls += "?" + c.urlParams_.Encode()
7894 req, err := http.NewRequest("POST", urls, body)
7895 if err != nil {
7896 return nil, err
7897 }
7898 req.Header = reqHeaders
7899 googleapi.Expand(req.URL, map[string]string{
7900 "resource": c.resource,
7901 })
7902 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes()))
7903 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7904 }
7905
7906 // Do executes the "healthcare.projects.locations.datasets.testIamPermissions" call.
7907 // Any non-2xx status code is an error. Response headers are in either
7908 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
7909 // returned at all) in error.(*googleapi.Error).Header. Use
7910 // googleapi.IsNotModified to check whether the returned error was because
7911 // http.StatusNotModified was returned.
7912 func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
7913 gensupport.SetOptions(c.urlParams_, opts...)
7914 res, err := c.doRequest("json")
7915 if res != nil && res.StatusCode == http.StatusNotModified {
7916 if res.Body != nil {
7917 res.Body.Close()
7918 }
7919 return nil, gensupport.WrapError(&googleapi.Error{
7920 Code: res.StatusCode,
7921 Header: res.Header,
7922 })
7923 }
7924 if err != nil {
7925 return nil, err
7926 }
7927 defer googleapi.CloseBody(res)
7928 if err := googleapi.CheckResponse(res); err != nil {
7929 return nil, gensupport.WrapError(err)
7930 }
7931 ret := &TestIamPermissionsResponse{
7932 ServerResponse: googleapi.ServerResponse{
7933 Header: res.Header,
7934 HTTPStatusCode: res.StatusCode,
7935 },
7936 }
7937 target := &ret
7938 b, err := gensupport.DecodeResponseBytes(target, res)
7939 if err != nil {
7940 return nil, err
7941 }
7942 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.testIamPermissions", "response", internallog.HTTPResponse(res, b))
7943 return ret, nil
7944 }
7945
7946 type ProjectsLocationsDatasetsConsentStoresCheckDataAccessCall struct {
7947 s *Service
7948 consentStore string
7949 checkdataaccessrequest *CheckDataAccessRequest
7950 urlParams_ gensupport.URLParams
7951 ctx_ context.Context
7952 header_ http.Header
7953 }
7954
7955 // CheckDataAccess: Checks if a particular data_id of a User data mapping in
7956 // the specified consent store is consented for the specified use.
7957 //
7958 // - consentStore: Name of the consent store where the requested data_id is
7959 // stored, of the form
7960 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consen
7961 // tStores/{consent_store_id}`.
7962 func (r *ProjectsLocationsDatasetsConsentStoresService) CheckDataAccess(consentStore string, checkdataaccessrequest *CheckDataAccessRequest) *ProjectsLocationsDatasetsConsentStoresCheckDataAccessCall {
7963 c := &ProjectsLocationsDatasetsConsentStoresCheckDataAccessCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7964 c.consentStore = consentStore
7965 c.checkdataaccessrequest = checkdataaccessrequest
7966 return c
7967 }
7968
7969 // Fields allows partial responses to be retrieved. See
7970 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7971 // details.
7972 func (c *ProjectsLocationsDatasetsConsentStoresCheckDataAccessCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresCheckDataAccessCall {
7973 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7974 return c
7975 }
7976
7977 // Context sets the context to be used in this call's Do method.
7978 func (c *ProjectsLocationsDatasetsConsentStoresCheckDataAccessCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresCheckDataAccessCall {
7979 c.ctx_ = ctx
7980 return c
7981 }
7982
7983 // Header returns a http.Header that can be modified by the caller to add
7984 // headers to the request.
7985 func (c *ProjectsLocationsDatasetsConsentStoresCheckDataAccessCall) Header() http.Header {
7986 if c.header_ == nil {
7987 c.header_ = make(http.Header)
7988 }
7989 return c.header_
7990 }
7991
7992 func (c *ProjectsLocationsDatasetsConsentStoresCheckDataAccessCall) doRequest(alt string) (*http.Response, error) {
7993 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7994 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.checkdataaccessrequest)
7995 if err != nil {
7996 return nil, err
7997 }
7998 c.urlParams_.Set("alt", alt)
7999 c.urlParams_.Set("prettyPrint", "false")
8000 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+consentStore}:checkDataAccess")
8001 urls += "?" + c.urlParams_.Encode()
8002 req, err := http.NewRequest("POST", urls, body)
8003 if err != nil {
8004 return nil, err
8005 }
8006 req.Header = reqHeaders
8007 googleapi.Expand(req.URL, map[string]string{
8008 "consentStore": c.consentStore,
8009 })
8010 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.checkDataAccess", "request", internallog.HTTPRequest(req, body.Bytes()))
8011 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8012 }
8013
8014 // Do executes the "healthcare.projects.locations.datasets.consentStores.checkDataAccess" call.
8015 // Any non-2xx status code is an error. Response headers are in either
8016 // *CheckDataAccessResponse.ServerResponse.Header or (if a response was
8017 // returned at all) in error.(*googleapi.Error).Header. Use
8018 // googleapi.IsNotModified to check whether the returned error was because
8019 // http.StatusNotModified was returned.
8020 func (c *ProjectsLocationsDatasetsConsentStoresCheckDataAccessCall) Do(opts ...googleapi.CallOption) (*CheckDataAccessResponse, error) {
8021 gensupport.SetOptions(c.urlParams_, opts...)
8022 res, err := c.doRequest("json")
8023 if res != nil && res.StatusCode == http.StatusNotModified {
8024 if res.Body != nil {
8025 res.Body.Close()
8026 }
8027 return nil, gensupport.WrapError(&googleapi.Error{
8028 Code: res.StatusCode,
8029 Header: res.Header,
8030 })
8031 }
8032 if err != nil {
8033 return nil, err
8034 }
8035 defer googleapi.CloseBody(res)
8036 if err := googleapi.CheckResponse(res); err != nil {
8037 return nil, gensupport.WrapError(err)
8038 }
8039 ret := &CheckDataAccessResponse{
8040 ServerResponse: googleapi.ServerResponse{
8041 Header: res.Header,
8042 HTTPStatusCode: res.StatusCode,
8043 },
8044 }
8045 target := &ret
8046 b, err := gensupport.DecodeResponseBytes(target, res)
8047 if err != nil {
8048 return nil, err
8049 }
8050 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.checkDataAccess", "response", internallog.HTTPResponse(res, b))
8051 return ret, nil
8052 }
8053
8054 type ProjectsLocationsDatasetsConsentStoresCreateCall struct {
8055 s *Service
8056 parent string
8057 consentstore *ConsentStore
8058 urlParams_ gensupport.URLParams
8059 ctx_ context.Context
8060 header_ http.Header
8061 }
8062
8063 // Create: Creates a new consent store in the parent dataset. Attempting to
8064 // create a consent store with the same ID as an existing store fails with an
8065 // ALREADY_EXISTS error.
8066 //
8067 // - parent: The name of the dataset this consent store belongs to.
8068 func (r *ProjectsLocationsDatasetsConsentStoresService) Create(parent string, consentstore *ConsentStore) *ProjectsLocationsDatasetsConsentStoresCreateCall {
8069 c := &ProjectsLocationsDatasetsConsentStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8070 c.parent = parent
8071 c.consentstore = consentstore
8072 return c
8073 }
8074
8075 // ConsentStoreId sets the optional parameter "consentStoreId": Required. The
8076 // ID of the consent store to create. The string must match the following
8077 // regex: `[\p{L}\p{N}_\-\.]{1,256}`. Cannot be changed after creation.
8078 func (c *ProjectsLocationsDatasetsConsentStoresCreateCall) ConsentStoreId(consentStoreId string) *ProjectsLocationsDatasetsConsentStoresCreateCall {
8079 c.urlParams_.Set("consentStoreId", consentStoreId)
8080 return c
8081 }
8082
8083 // Fields allows partial responses to be retrieved. See
8084 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8085 // details.
8086 func (c *ProjectsLocationsDatasetsConsentStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresCreateCall {
8087 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8088 return c
8089 }
8090
8091 // Context sets the context to be used in this call's Do method.
8092 func (c *ProjectsLocationsDatasetsConsentStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresCreateCall {
8093 c.ctx_ = ctx
8094 return c
8095 }
8096
8097 // Header returns a http.Header that can be modified by the caller to add
8098 // headers to the request.
8099 func (c *ProjectsLocationsDatasetsConsentStoresCreateCall) Header() http.Header {
8100 if c.header_ == nil {
8101 c.header_ = make(http.Header)
8102 }
8103 return c.header_
8104 }
8105
8106 func (c *ProjectsLocationsDatasetsConsentStoresCreateCall) doRequest(alt string) (*http.Response, error) {
8107 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8108 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.consentstore)
8109 if err != nil {
8110 return nil, err
8111 }
8112 c.urlParams_.Set("alt", alt)
8113 c.urlParams_.Set("prettyPrint", "false")
8114 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/consentStores")
8115 urls += "?" + c.urlParams_.Encode()
8116 req, err := http.NewRequest("POST", urls, body)
8117 if err != nil {
8118 return nil, err
8119 }
8120 req.Header = reqHeaders
8121 googleapi.Expand(req.URL, map[string]string{
8122 "parent": c.parent,
8123 })
8124 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.create", "request", internallog.HTTPRequest(req, body.Bytes()))
8125 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8126 }
8127
8128 // Do executes the "healthcare.projects.locations.datasets.consentStores.create" call.
8129 // Any non-2xx status code is an error. Response headers are in either
8130 // *ConsentStore.ServerResponse.Header or (if a response was returned at all)
8131 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8132 // whether the returned error was because http.StatusNotModified was returned.
8133 func (c *ProjectsLocationsDatasetsConsentStoresCreateCall) Do(opts ...googleapi.CallOption) (*ConsentStore, error) {
8134 gensupport.SetOptions(c.urlParams_, opts...)
8135 res, err := c.doRequest("json")
8136 if res != nil && res.StatusCode == http.StatusNotModified {
8137 if res.Body != nil {
8138 res.Body.Close()
8139 }
8140 return nil, gensupport.WrapError(&googleapi.Error{
8141 Code: res.StatusCode,
8142 Header: res.Header,
8143 })
8144 }
8145 if err != nil {
8146 return nil, err
8147 }
8148 defer googleapi.CloseBody(res)
8149 if err := googleapi.CheckResponse(res); err != nil {
8150 return nil, gensupport.WrapError(err)
8151 }
8152 ret := &ConsentStore{
8153 ServerResponse: googleapi.ServerResponse{
8154 Header: res.Header,
8155 HTTPStatusCode: res.StatusCode,
8156 },
8157 }
8158 target := &ret
8159 b, err := gensupport.DecodeResponseBytes(target, res)
8160 if err != nil {
8161 return nil, err
8162 }
8163 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.create", "response", internallog.HTTPResponse(res, b))
8164 return ret, nil
8165 }
8166
8167 type ProjectsLocationsDatasetsConsentStoresDeleteCall struct {
8168 s *Service
8169 name string
8170 urlParams_ gensupport.URLParams
8171 ctx_ context.Context
8172 header_ http.Header
8173 }
8174
8175 // Delete: Deletes the specified consent store and removes all the consent
8176 // store's data.
8177 //
8178 // - name: The resource name of the consent store to delete.
8179 func (r *ProjectsLocationsDatasetsConsentStoresService) Delete(name string) *ProjectsLocationsDatasetsConsentStoresDeleteCall {
8180 c := &ProjectsLocationsDatasetsConsentStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8181 c.name = name
8182 return c
8183 }
8184
8185 // Fields allows partial responses to be retrieved. See
8186 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8187 // details.
8188 func (c *ProjectsLocationsDatasetsConsentStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresDeleteCall {
8189 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8190 return c
8191 }
8192
8193 // Context sets the context to be used in this call's Do method.
8194 func (c *ProjectsLocationsDatasetsConsentStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresDeleteCall {
8195 c.ctx_ = ctx
8196 return c
8197 }
8198
8199 // Header returns a http.Header that can be modified by the caller to add
8200 // headers to the request.
8201 func (c *ProjectsLocationsDatasetsConsentStoresDeleteCall) Header() http.Header {
8202 if c.header_ == nil {
8203 c.header_ = make(http.Header)
8204 }
8205 return c.header_
8206 }
8207
8208 func (c *ProjectsLocationsDatasetsConsentStoresDeleteCall) doRequest(alt string) (*http.Response, error) {
8209 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8210 c.urlParams_.Set("alt", alt)
8211 c.urlParams_.Set("prettyPrint", "false")
8212 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8213 urls += "?" + c.urlParams_.Encode()
8214 req, err := http.NewRequest("DELETE", urls, nil)
8215 if err != nil {
8216 return nil, err
8217 }
8218 req.Header = reqHeaders
8219 googleapi.Expand(req.URL, map[string]string{
8220 "name": c.name,
8221 })
8222 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.delete", "request", internallog.HTTPRequest(req, nil))
8223 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8224 }
8225
8226 // Do executes the "healthcare.projects.locations.datasets.consentStores.delete" call.
8227 // Any non-2xx status code is an error. Response headers are in either
8228 // *Empty.ServerResponse.Header or (if a response was returned at all) in
8229 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8230 // whether the returned error was because http.StatusNotModified was returned.
8231 func (c *ProjectsLocationsDatasetsConsentStoresDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
8232 gensupport.SetOptions(c.urlParams_, opts...)
8233 res, err := c.doRequest("json")
8234 if res != nil && res.StatusCode == http.StatusNotModified {
8235 if res.Body != nil {
8236 res.Body.Close()
8237 }
8238 return nil, gensupport.WrapError(&googleapi.Error{
8239 Code: res.StatusCode,
8240 Header: res.Header,
8241 })
8242 }
8243 if err != nil {
8244 return nil, err
8245 }
8246 defer googleapi.CloseBody(res)
8247 if err := googleapi.CheckResponse(res); err != nil {
8248 return nil, gensupport.WrapError(err)
8249 }
8250 ret := &Empty{
8251 ServerResponse: googleapi.ServerResponse{
8252 Header: res.Header,
8253 HTTPStatusCode: res.StatusCode,
8254 },
8255 }
8256 target := &ret
8257 b, err := gensupport.DecodeResponseBytes(target, res)
8258 if err != nil {
8259 return nil, err
8260 }
8261 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.delete", "response", internallog.HTTPResponse(res, b))
8262 return ret, nil
8263 }
8264
8265 type ProjectsLocationsDatasetsConsentStoresEvaluateUserConsentsCall struct {
8266 s *Service
8267 consentStore string
8268 evaluateuserconsentsrequest *EvaluateUserConsentsRequest
8269 urlParams_ gensupport.URLParams
8270 ctx_ context.Context
8271 header_ http.Header
8272 }
8273
8274 // EvaluateUserConsents: Evaluates the user's Consents for all matching User
8275 // data mappings. Note: User data mappings are indexed asynchronously, which
8276 // can cause a slight delay between the time mappings are created or updated
8277 // and when they are included in EvaluateUserConsents results.
8278 //
8279 // - consentStore: Name of the consent store to retrieve User data mappings
8280 // from.
8281 func (r *ProjectsLocationsDatasetsConsentStoresService) EvaluateUserConsents(consentStore string, evaluateuserconsentsrequest *EvaluateUserConsentsRequest) *ProjectsLocationsDatasetsConsentStoresEvaluateUserConsentsCall {
8282 c := &ProjectsLocationsDatasetsConsentStoresEvaluateUserConsentsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8283 c.consentStore = consentStore
8284 c.evaluateuserconsentsrequest = evaluateuserconsentsrequest
8285 return c
8286 }
8287
8288 // Fields allows partial responses to be retrieved. See
8289 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8290 // details.
8291 func (c *ProjectsLocationsDatasetsConsentStoresEvaluateUserConsentsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresEvaluateUserConsentsCall {
8292 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8293 return c
8294 }
8295
8296 // Context sets the context to be used in this call's Do method.
8297 func (c *ProjectsLocationsDatasetsConsentStoresEvaluateUserConsentsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresEvaluateUserConsentsCall {
8298 c.ctx_ = ctx
8299 return c
8300 }
8301
8302 // Header returns a http.Header that can be modified by the caller to add
8303 // headers to the request.
8304 func (c *ProjectsLocationsDatasetsConsentStoresEvaluateUserConsentsCall) Header() http.Header {
8305 if c.header_ == nil {
8306 c.header_ = make(http.Header)
8307 }
8308 return c.header_
8309 }
8310
8311 func (c *ProjectsLocationsDatasetsConsentStoresEvaluateUserConsentsCall) doRequest(alt string) (*http.Response, error) {
8312 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8313 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.evaluateuserconsentsrequest)
8314 if err != nil {
8315 return nil, err
8316 }
8317 c.urlParams_.Set("alt", alt)
8318 c.urlParams_.Set("prettyPrint", "false")
8319 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+consentStore}:evaluateUserConsents")
8320 urls += "?" + c.urlParams_.Encode()
8321 req, err := http.NewRequest("POST", urls, body)
8322 if err != nil {
8323 return nil, err
8324 }
8325 req.Header = reqHeaders
8326 googleapi.Expand(req.URL, map[string]string{
8327 "consentStore": c.consentStore,
8328 })
8329 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.evaluateUserConsents", "request", internallog.HTTPRequest(req, body.Bytes()))
8330 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8331 }
8332
8333 // Do executes the "healthcare.projects.locations.datasets.consentStores.evaluateUserConsents" call.
8334 // Any non-2xx status code is an error. Response headers are in either
8335 // *EvaluateUserConsentsResponse.ServerResponse.Header or (if a response was
8336 // returned at all) in error.(*googleapi.Error).Header. Use
8337 // googleapi.IsNotModified to check whether the returned error was because
8338 // http.StatusNotModified was returned.
8339 func (c *ProjectsLocationsDatasetsConsentStoresEvaluateUserConsentsCall) Do(opts ...googleapi.CallOption) (*EvaluateUserConsentsResponse, error) {
8340 gensupport.SetOptions(c.urlParams_, opts...)
8341 res, err := c.doRequest("json")
8342 if res != nil && res.StatusCode == http.StatusNotModified {
8343 if res.Body != nil {
8344 res.Body.Close()
8345 }
8346 return nil, gensupport.WrapError(&googleapi.Error{
8347 Code: res.StatusCode,
8348 Header: res.Header,
8349 })
8350 }
8351 if err != nil {
8352 return nil, err
8353 }
8354 defer googleapi.CloseBody(res)
8355 if err := googleapi.CheckResponse(res); err != nil {
8356 return nil, gensupport.WrapError(err)
8357 }
8358 ret := &EvaluateUserConsentsResponse{
8359 ServerResponse: googleapi.ServerResponse{
8360 Header: res.Header,
8361 HTTPStatusCode: res.StatusCode,
8362 },
8363 }
8364 target := &ret
8365 b, err := gensupport.DecodeResponseBytes(target, res)
8366 if err != nil {
8367 return nil, err
8368 }
8369 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.evaluateUserConsents", "response", internallog.HTTPResponse(res, b))
8370 return ret, nil
8371 }
8372
8373 // Pages invokes f for each page of results.
8374 // A non-nil error returned from f will halt the iteration.
8375 // The provided context supersedes any context provided to the Context method.
8376 func (c *ProjectsLocationsDatasetsConsentStoresEvaluateUserConsentsCall) Pages(ctx context.Context, f func(*EvaluateUserConsentsResponse) error) error {
8377 c.ctx_ = ctx
8378 defer func(pt string) { c.evaluateuserconsentsrequest.PageToken = pt }(c.evaluateuserconsentsrequest.PageToken)
8379 for {
8380 x, err := c.Do()
8381 if err != nil {
8382 return err
8383 }
8384 if err := f(x); err != nil {
8385 return err
8386 }
8387 if x.NextPageToken == "" {
8388 return nil
8389 }
8390 c.evaluateuserconsentsrequest.PageToken = x.NextPageToken
8391 }
8392 }
8393
8394 type ProjectsLocationsDatasetsConsentStoresGetCall struct {
8395 s *Service
8396 name string
8397 urlParams_ gensupport.URLParams
8398 ifNoneMatch_ string
8399 ctx_ context.Context
8400 header_ http.Header
8401 }
8402
8403 // Get: Gets the specified consent store.
8404 //
8405 // - name: The resource name of the consent store to get.
8406 func (r *ProjectsLocationsDatasetsConsentStoresService) Get(name string) *ProjectsLocationsDatasetsConsentStoresGetCall {
8407 c := &ProjectsLocationsDatasetsConsentStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8408 c.name = name
8409 return c
8410 }
8411
8412 // Fields allows partial responses to be retrieved. See
8413 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8414 // details.
8415 func (c *ProjectsLocationsDatasetsConsentStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresGetCall {
8416 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8417 return c
8418 }
8419
8420 // IfNoneMatch sets an optional parameter which makes the operation fail if the
8421 // object's ETag matches the given value. This is useful for getting updates
8422 // only after the object has changed since the last request.
8423 func (c *ProjectsLocationsDatasetsConsentStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsConsentStoresGetCall {
8424 c.ifNoneMatch_ = entityTag
8425 return c
8426 }
8427
8428 // Context sets the context to be used in this call's Do method.
8429 func (c *ProjectsLocationsDatasetsConsentStoresGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresGetCall {
8430 c.ctx_ = ctx
8431 return c
8432 }
8433
8434 // Header returns a http.Header that can be modified by the caller to add
8435 // headers to the request.
8436 func (c *ProjectsLocationsDatasetsConsentStoresGetCall) Header() http.Header {
8437 if c.header_ == nil {
8438 c.header_ = make(http.Header)
8439 }
8440 return c.header_
8441 }
8442
8443 func (c *ProjectsLocationsDatasetsConsentStoresGetCall) doRequest(alt string) (*http.Response, error) {
8444 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8445 if c.ifNoneMatch_ != "" {
8446 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8447 }
8448 c.urlParams_.Set("alt", alt)
8449 c.urlParams_.Set("prettyPrint", "false")
8450 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8451 urls += "?" + c.urlParams_.Encode()
8452 req, err := http.NewRequest("GET", urls, nil)
8453 if err != nil {
8454 return nil, err
8455 }
8456 req.Header = reqHeaders
8457 googleapi.Expand(req.URL, map[string]string{
8458 "name": c.name,
8459 })
8460 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.get", "request", internallog.HTTPRequest(req, nil))
8461 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8462 }
8463
8464 // Do executes the "healthcare.projects.locations.datasets.consentStores.get" call.
8465 // Any non-2xx status code is an error. Response headers are in either
8466 // *ConsentStore.ServerResponse.Header or (if a response was returned at all)
8467 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8468 // whether the returned error was because http.StatusNotModified was returned.
8469 func (c *ProjectsLocationsDatasetsConsentStoresGetCall) Do(opts ...googleapi.CallOption) (*ConsentStore, error) {
8470 gensupport.SetOptions(c.urlParams_, opts...)
8471 res, err := c.doRequest("json")
8472 if res != nil && res.StatusCode == http.StatusNotModified {
8473 if res.Body != nil {
8474 res.Body.Close()
8475 }
8476 return nil, gensupport.WrapError(&googleapi.Error{
8477 Code: res.StatusCode,
8478 Header: res.Header,
8479 })
8480 }
8481 if err != nil {
8482 return nil, err
8483 }
8484 defer googleapi.CloseBody(res)
8485 if err := googleapi.CheckResponse(res); err != nil {
8486 return nil, gensupport.WrapError(err)
8487 }
8488 ret := &ConsentStore{
8489 ServerResponse: googleapi.ServerResponse{
8490 Header: res.Header,
8491 HTTPStatusCode: res.StatusCode,
8492 },
8493 }
8494 target := &ret
8495 b, err := gensupport.DecodeResponseBytes(target, res)
8496 if err != nil {
8497 return nil, err
8498 }
8499 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.get", "response", internallog.HTTPResponse(res, b))
8500 return ret, nil
8501 }
8502
8503 type ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall struct {
8504 s *Service
8505 resource string
8506 urlParams_ gensupport.URLParams
8507 ifNoneMatch_ string
8508 ctx_ context.Context
8509 header_ http.Header
8510 }
8511
8512 // GetIamPolicy: Gets the access control policy for a resource. Returns an
8513 // empty policy if the resource exists and does not have a policy set.
8514 //
8515 // - resource: REQUIRED: The resource for which the policy is being requested.
8516 // See Resource names (https://cloud.google.com/apis/design/resource_names)
8517 // for the appropriate value for this field.
8518 func (r *ProjectsLocationsDatasetsConsentStoresService) GetIamPolicy(resource string) *ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall {
8519 c := &ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8520 c.resource = resource
8521 return c
8522 }
8523
8524 // OptionsRequestedPolicyVersion sets the optional parameter
8525 // "options.requestedPolicyVersion": The maximum policy version that will be
8526 // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
8527 // an invalid value will be rejected. Requests for policies with any
8528 // conditional role bindings must specify version 3. Policies with no
8529 // conditional role bindings may specify any valid value or leave the field
8530 // unset. The policy in the response might use the policy version that you
8531 // specified, or it might use a lower policy version. For example, if you
8532 // specify version 3, but the policy has no conditional role bindings, the
8533 // response uses version 1. To learn which resources support conditions in
8534 // their IAM policies, see the IAM documentation
8535 // (https://cloud.google.com/iam/help/conditions/resource-policies).
8536 func (c *ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall {
8537 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
8538 return c
8539 }
8540
8541 // Fields allows partial responses to be retrieved. See
8542 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8543 // details.
8544 func (c *ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall {
8545 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8546 return c
8547 }
8548
8549 // IfNoneMatch sets an optional parameter which makes the operation fail if the
8550 // object's ETag matches the given value. This is useful for getting updates
8551 // only after the object has changed since the last request.
8552 func (c *ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall {
8553 c.ifNoneMatch_ = entityTag
8554 return c
8555 }
8556
8557 // Context sets the context to be used in this call's Do method.
8558 func (c *ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall {
8559 c.ctx_ = ctx
8560 return c
8561 }
8562
8563 // Header returns a http.Header that can be modified by the caller to add
8564 // headers to the request.
8565 func (c *ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall) Header() http.Header {
8566 if c.header_ == nil {
8567 c.header_ = make(http.Header)
8568 }
8569 return c.header_
8570 }
8571
8572 func (c *ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
8573 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8574 if c.ifNoneMatch_ != "" {
8575 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8576 }
8577 c.urlParams_.Set("alt", alt)
8578 c.urlParams_.Set("prettyPrint", "false")
8579 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
8580 urls += "?" + c.urlParams_.Encode()
8581 req, err := http.NewRequest("GET", urls, nil)
8582 if err != nil {
8583 return nil, err
8584 }
8585 req.Header = reqHeaders
8586 googleapi.Expand(req.URL, map[string]string{
8587 "resource": c.resource,
8588 })
8589 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.getIamPolicy", "request", internallog.HTTPRequest(req, nil))
8590 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8591 }
8592
8593 // Do executes the "healthcare.projects.locations.datasets.consentStores.getIamPolicy" call.
8594 // Any non-2xx status code is an error. Response headers are in either
8595 // *Policy.ServerResponse.Header or (if a response was returned at all) in
8596 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8597 // whether the returned error was because http.StatusNotModified was returned.
8598 func (c *ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
8599 gensupport.SetOptions(c.urlParams_, opts...)
8600 res, err := c.doRequest("json")
8601 if res != nil && res.StatusCode == http.StatusNotModified {
8602 if res.Body != nil {
8603 res.Body.Close()
8604 }
8605 return nil, gensupport.WrapError(&googleapi.Error{
8606 Code: res.StatusCode,
8607 Header: res.Header,
8608 })
8609 }
8610 if err != nil {
8611 return nil, err
8612 }
8613 defer googleapi.CloseBody(res)
8614 if err := googleapi.CheckResponse(res); err != nil {
8615 return nil, gensupport.WrapError(err)
8616 }
8617 ret := &Policy{
8618 ServerResponse: googleapi.ServerResponse{
8619 Header: res.Header,
8620 HTTPStatusCode: res.StatusCode,
8621 },
8622 }
8623 target := &ret
8624 b, err := gensupport.DecodeResponseBytes(target, res)
8625 if err != nil {
8626 return nil, err
8627 }
8628 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.getIamPolicy", "response", internallog.HTTPResponse(res, b))
8629 return ret, nil
8630 }
8631
8632 type ProjectsLocationsDatasetsConsentStoresListCall struct {
8633 s *Service
8634 parent string
8635 urlParams_ gensupport.URLParams
8636 ifNoneMatch_ string
8637 ctx_ context.Context
8638 header_ http.Header
8639 }
8640
8641 // List: Lists the consent stores in the specified dataset.
8642 //
8643 // - parent: Name of the dataset.
8644 func (r *ProjectsLocationsDatasetsConsentStoresService) List(parent string) *ProjectsLocationsDatasetsConsentStoresListCall {
8645 c := &ProjectsLocationsDatasetsConsentStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8646 c.parent = parent
8647 return c
8648 }
8649
8650 // Filter sets the optional parameter "filter": Restricts the stores returned
8651 // to those matching a filter. Only filtering on labels is supported. For
8652 // example, `filter=labels.key=value`.
8653 func (c *ProjectsLocationsDatasetsConsentStoresListCall) Filter(filter string) *ProjectsLocationsDatasetsConsentStoresListCall {
8654 c.urlParams_.Set("filter", filter)
8655 return c
8656 }
8657
8658 // PageSize sets the optional parameter "pageSize": Limit on the number of
8659 // consent stores to return in a single response. If not specified, 100 is
8660 // used. May not be larger than 1000.
8661 func (c *ProjectsLocationsDatasetsConsentStoresListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsConsentStoresListCall {
8662 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8663 return c
8664 }
8665
8666 // PageToken sets the optional parameter "pageToken": Token to retrieve the
8667 // next page of results, or empty to get the first page.
8668 func (c *ProjectsLocationsDatasetsConsentStoresListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsConsentStoresListCall {
8669 c.urlParams_.Set("pageToken", pageToken)
8670 return c
8671 }
8672
8673 // Fields allows partial responses to be retrieved. See
8674 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8675 // details.
8676 func (c *ProjectsLocationsDatasetsConsentStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresListCall {
8677 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8678 return c
8679 }
8680
8681 // IfNoneMatch sets an optional parameter which makes the operation fail if the
8682 // object's ETag matches the given value. This is useful for getting updates
8683 // only after the object has changed since the last request.
8684 func (c *ProjectsLocationsDatasetsConsentStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsConsentStoresListCall {
8685 c.ifNoneMatch_ = entityTag
8686 return c
8687 }
8688
8689 // Context sets the context to be used in this call's Do method.
8690 func (c *ProjectsLocationsDatasetsConsentStoresListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresListCall {
8691 c.ctx_ = ctx
8692 return c
8693 }
8694
8695 // Header returns a http.Header that can be modified by the caller to add
8696 // headers to the request.
8697 func (c *ProjectsLocationsDatasetsConsentStoresListCall) Header() http.Header {
8698 if c.header_ == nil {
8699 c.header_ = make(http.Header)
8700 }
8701 return c.header_
8702 }
8703
8704 func (c *ProjectsLocationsDatasetsConsentStoresListCall) doRequest(alt string) (*http.Response, error) {
8705 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8706 if c.ifNoneMatch_ != "" {
8707 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8708 }
8709 c.urlParams_.Set("alt", alt)
8710 c.urlParams_.Set("prettyPrint", "false")
8711 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/consentStores")
8712 urls += "?" + c.urlParams_.Encode()
8713 req, err := http.NewRequest("GET", urls, nil)
8714 if err != nil {
8715 return nil, err
8716 }
8717 req.Header = reqHeaders
8718 googleapi.Expand(req.URL, map[string]string{
8719 "parent": c.parent,
8720 })
8721 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.list", "request", internallog.HTTPRequest(req, nil))
8722 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8723 }
8724
8725 // Do executes the "healthcare.projects.locations.datasets.consentStores.list" call.
8726 // Any non-2xx status code is an error. Response headers are in either
8727 // *ListConsentStoresResponse.ServerResponse.Header or (if a response was
8728 // returned at all) in error.(*googleapi.Error).Header. Use
8729 // googleapi.IsNotModified to check whether the returned error was because
8730 // http.StatusNotModified was returned.
8731 func (c *ProjectsLocationsDatasetsConsentStoresListCall) Do(opts ...googleapi.CallOption) (*ListConsentStoresResponse, error) {
8732 gensupport.SetOptions(c.urlParams_, opts...)
8733 res, err := c.doRequest("json")
8734 if res != nil && res.StatusCode == http.StatusNotModified {
8735 if res.Body != nil {
8736 res.Body.Close()
8737 }
8738 return nil, gensupport.WrapError(&googleapi.Error{
8739 Code: res.StatusCode,
8740 Header: res.Header,
8741 })
8742 }
8743 if err != nil {
8744 return nil, err
8745 }
8746 defer googleapi.CloseBody(res)
8747 if err := googleapi.CheckResponse(res); err != nil {
8748 return nil, gensupport.WrapError(err)
8749 }
8750 ret := &ListConsentStoresResponse{
8751 ServerResponse: googleapi.ServerResponse{
8752 Header: res.Header,
8753 HTTPStatusCode: res.StatusCode,
8754 },
8755 }
8756 target := &ret
8757 b, err := gensupport.DecodeResponseBytes(target, res)
8758 if err != nil {
8759 return nil, err
8760 }
8761 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.list", "response", internallog.HTTPResponse(res, b))
8762 return ret, nil
8763 }
8764
8765 // Pages invokes f for each page of results.
8766 // A non-nil error returned from f will halt the iteration.
8767 // The provided context supersedes any context provided to the Context method.
8768 func (c *ProjectsLocationsDatasetsConsentStoresListCall) Pages(ctx context.Context, f func(*ListConsentStoresResponse) error) error {
8769 c.ctx_ = ctx
8770 defer c.PageToken(c.urlParams_.Get("pageToken"))
8771 for {
8772 x, err := c.Do()
8773 if err != nil {
8774 return err
8775 }
8776 if err := f(x); err != nil {
8777 return err
8778 }
8779 if x.NextPageToken == "" {
8780 return nil
8781 }
8782 c.PageToken(x.NextPageToken)
8783 }
8784 }
8785
8786 type ProjectsLocationsDatasetsConsentStoresPatchCall struct {
8787 s *Service
8788 name string
8789 consentstore *ConsentStore
8790 urlParams_ gensupport.URLParams
8791 ctx_ context.Context
8792 header_ http.Header
8793 }
8794
8795 // Patch: Updates the specified consent store.
8796 //
8797 // - name: Identifier. Resource name of the consent store, of the form
8798 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consen
8799 // tStores/{consent_store_id}`. Cannot be changed after creation.
8800 func (r *ProjectsLocationsDatasetsConsentStoresService) Patch(name string, consentstore *ConsentStore) *ProjectsLocationsDatasetsConsentStoresPatchCall {
8801 c := &ProjectsLocationsDatasetsConsentStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8802 c.name = name
8803 c.consentstore = consentstore
8804 return c
8805 }
8806
8807 // UpdateMask sets the optional parameter "updateMask": Required. The update
8808 // mask that applies to the resource. For the `FieldMask` definition, see
8809 // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
8810 // Only the `labels`, `default_consent_ttl`, and
8811 // `enable_consent_create_on_update` fields are allowed to be updated.
8812 func (c *ProjectsLocationsDatasetsConsentStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsConsentStoresPatchCall {
8813 c.urlParams_.Set("updateMask", updateMask)
8814 return c
8815 }
8816
8817 // Fields allows partial responses to be retrieved. See
8818 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8819 // details.
8820 func (c *ProjectsLocationsDatasetsConsentStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresPatchCall {
8821 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8822 return c
8823 }
8824
8825 // Context sets the context to be used in this call's Do method.
8826 func (c *ProjectsLocationsDatasetsConsentStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresPatchCall {
8827 c.ctx_ = ctx
8828 return c
8829 }
8830
8831 // Header returns a http.Header that can be modified by the caller to add
8832 // headers to the request.
8833 func (c *ProjectsLocationsDatasetsConsentStoresPatchCall) Header() http.Header {
8834 if c.header_ == nil {
8835 c.header_ = make(http.Header)
8836 }
8837 return c.header_
8838 }
8839
8840 func (c *ProjectsLocationsDatasetsConsentStoresPatchCall) doRequest(alt string) (*http.Response, error) {
8841 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8842 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.consentstore)
8843 if err != nil {
8844 return nil, err
8845 }
8846 c.urlParams_.Set("alt", alt)
8847 c.urlParams_.Set("prettyPrint", "false")
8848 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8849 urls += "?" + c.urlParams_.Encode()
8850 req, err := http.NewRequest("PATCH", urls, body)
8851 if err != nil {
8852 return nil, err
8853 }
8854 req.Header = reqHeaders
8855 googleapi.Expand(req.URL, map[string]string{
8856 "name": c.name,
8857 })
8858 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
8859 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8860 }
8861
8862 // Do executes the "healthcare.projects.locations.datasets.consentStores.patch" call.
8863 // Any non-2xx status code is an error. Response headers are in either
8864 // *ConsentStore.ServerResponse.Header or (if a response was returned at all)
8865 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8866 // whether the returned error was because http.StatusNotModified was returned.
8867 func (c *ProjectsLocationsDatasetsConsentStoresPatchCall) Do(opts ...googleapi.CallOption) (*ConsentStore, error) {
8868 gensupport.SetOptions(c.urlParams_, opts...)
8869 res, err := c.doRequest("json")
8870 if res != nil && res.StatusCode == http.StatusNotModified {
8871 if res.Body != nil {
8872 res.Body.Close()
8873 }
8874 return nil, gensupport.WrapError(&googleapi.Error{
8875 Code: res.StatusCode,
8876 Header: res.Header,
8877 })
8878 }
8879 if err != nil {
8880 return nil, err
8881 }
8882 defer googleapi.CloseBody(res)
8883 if err := googleapi.CheckResponse(res); err != nil {
8884 return nil, gensupport.WrapError(err)
8885 }
8886 ret := &ConsentStore{
8887 ServerResponse: googleapi.ServerResponse{
8888 Header: res.Header,
8889 HTTPStatusCode: res.StatusCode,
8890 },
8891 }
8892 target := &ret
8893 b, err := gensupport.DecodeResponseBytes(target, res)
8894 if err != nil {
8895 return nil, err
8896 }
8897 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.patch", "response", internallog.HTTPResponse(res, b))
8898 return ret, nil
8899 }
8900
8901 type ProjectsLocationsDatasetsConsentStoresQueryAccessibleDataCall struct {
8902 s *Service
8903 consentStore string
8904 queryaccessibledatarequest *QueryAccessibleDataRequest
8905 urlParams_ gensupport.URLParams
8906 ctx_ context.Context
8907 header_ http.Header
8908 }
8909
8910 // QueryAccessibleData: Queries all data_ids that are consented for a specified
8911 // use in the given consent store and writes them to a specified destination.
8912 // The returned Operation includes a progress counter for the number of User
8913 // data mappings processed. If the request is successful, a detailed response
8914 // is returned of type QueryAccessibleDataResponse, contained in the response
8915 // field when the operation finishes. The metadata field type is
8916 // OperationMetadata. Errors are logged to Cloud Logging (see Viewing error
8917 // logs in Cloud Logging
8918 // (https://cloud.google.com/healthcare/docs/how-tos/logging)). For example,
8919 // the following sample log entry shows a `failed to evaluate consent policy`
8920 // error that occurred during a QueryAccessibleData call to consent store
8921 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentS
8922 // tores/{consent_store_id}`. ```json jsonPayload: { @type:
8923 // "type.googleapis.com/google.cloud.healthcare.logging.QueryAccessibleDataLogEn
8924 // try" error: { code: 9 message: "failed to evaluate consent policy" }
8925 // resourceName:
8926 // "projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentS
8927 // tores/{consent_store_id}/consents/{consent_id}" } logName:
8928 // "projects/{project_id}/logs/healthcare.googleapis.com%2Fquery_accessible_data
8929 // " operation: { id:
8930 // "projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/operatio
8931 // ns/{operation_id}" producer: "healthcare.googleapis.com/QueryAccessibleData"
8932 // } receiveTimestamp: "TIMESTAMP" resource: { labels: { consent_store_id:
8933 // "{consent_store_id}" dataset_id: "{dataset_id}" location: "{location_id}"
8934 // project_id: "{project_id}" } type: "healthcare_consent_store" } severity:
8935 // "ERROR" timestamp: "TIMESTAMP" ```
8936 //
8937 // - consentStore: Name of the consent store to retrieve User data mappings
8938 // from.
8939 func (r *ProjectsLocationsDatasetsConsentStoresService) QueryAccessibleData(consentStore string, queryaccessibledatarequest *QueryAccessibleDataRequest) *ProjectsLocationsDatasetsConsentStoresQueryAccessibleDataCall {
8940 c := &ProjectsLocationsDatasetsConsentStoresQueryAccessibleDataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8941 c.consentStore = consentStore
8942 c.queryaccessibledatarequest = queryaccessibledatarequest
8943 return c
8944 }
8945
8946 // Fields allows partial responses to be retrieved. See
8947 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8948 // details.
8949 func (c *ProjectsLocationsDatasetsConsentStoresQueryAccessibleDataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresQueryAccessibleDataCall {
8950 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8951 return c
8952 }
8953
8954 // Context sets the context to be used in this call's Do method.
8955 func (c *ProjectsLocationsDatasetsConsentStoresQueryAccessibleDataCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresQueryAccessibleDataCall {
8956 c.ctx_ = ctx
8957 return c
8958 }
8959
8960 // Header returns a http.Header that can be modified by the caller to add
8961 // headers to the request.
8962 func (c *ProjectsLocationsDatasetsConsentStoresQueryAccessibleDataCall) Header() http.Header {
8963 if c.header_ == nil {
8964 c.header_ = make(http.Header)
8965 }
8966 return c.header_
8967 }
8968
8969 func (c *ProjectsLocationsDatasetsConsentStoresQueryAccessibleDataCall) doRequest(alt string) (*http.Response, error) {
8970 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8971 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.queryaccessibledatarequest)
8972 if err != nil {
8973 return nil, err
8974 }
8975 c.urlParams_.Set("alt", alt)
8976 c.urlParams_.Set("prettyPrint", "false")
8977 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+consentStore}:queryAccessibleData")
8978 urls += "?" + c.urlParams_.Encode()
8979 req, err := http.NewRequest("POST", urls, body)
8980 if err != nil {
8981 return nil, err
8982 }
8983 req.Header = reqHeaders
8984 googleapi.Expand(req.URL, map[string]string{
8985 "consentStore": c.consentStore,
8986 })
8987 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.queryAccessibleData", "request", internallog.HTTPRequest(req, body.Bytes()))
8988 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8989 }
8990
8991 // Do executes the "healthcare.projects.locations.datasets.consentStores.queryAccessibleData" call.
8992 // Any non-2xx status code is an error. Response headers are in either
8993 // *Operation.ServerResponse.Header or (if a response was returned at all) in
8994 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8995 // whether the returned error was because http.StatusNotModified was returned.
8996 func (c *ProjectsLocationsDatasetsConsentStoresQueryAccessibleDataCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8997 gensupport.SetOptions(c.urlParams_, opts...)
8998 res, err := c.doRequest("json")
8999 if res != nil && res.StatusCode == http.StatusNotModified {
9000 if res.Body != nil {
9001 res.Body.Close()
9002 }
9003 return nil, gensupport.WrapError(&googleapi.Error{
9004 Code: res.StatusCode,
9005 Header: res.Header,
9006 })
9007 }
9008 if err != nil {
9009 return nil, err
9010 }
9011 defer googleapi.CloseBody(res)
9012 if err := googleapi.CheckResponse(res); err != nil {
9013 return nil, gensupport.WrapError(err)
9014 }
9015 ret := &Operation{
9016 ServerResponse: googleapi.ServerResponse{
9017 Header: res.Header,
9018 HTTPStatusCode: res.StatusCode,
9019 },
9020 }
9021 target := &ret
9022 b, err := gensupport.DecodeResponseBytes(target, res)
9023 if err != nil {
9024 return nil, err
9025 }
9026 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.queryAccessibleData", "response", internallog.HTTPResponse(res, b))
9027 return ret, nil
9028 }
9029
9030 type ProjectsLocationsDatasetsConsentStoresSetIamPolicyCall struct {
9031 s *Service
9032 resource string
9033 setiampolicyrequest *SetIamPolicyRequest
9034 urlParams_ gensupport.URLParams
9035 ctx_ context.Context
9036 header_ http.Header
9037 }
9038
9039 // SetIamPolicy: Sets the access control policy on the specified resource.
9040 // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
9041 // and `PERMISSION_DENIED` errors.
9042 //
9043 // - resource: REQUIRED: The resource for which the policy is being specified.
9044 // See Resource names (https://cloud.google.com/apis/design/resource_names)
9045 // for the appropriate value for this field.
9046 func (r *ProjectsLocationsDatasetsConsentStoresService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsConsentStoresSetIamPolicyCall {
9047 c := &ProjectsLocationsDatasetsConsentStoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9048 c.resource = resource
9049 c.setiampolicyrequest = setiampolicyrequest
9050 return c
9051 }
9052
9053 // Fields allows partial responses to be retrieved. See
9054 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9055 // details.
9056 func (c *ProjectsLocationsDatasetsConsentStoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresSetIamPolicyCall {
9057 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9058 return c
9059 }
9060
9061 // Context sets the context to be used in this call's Do method.
9062 func (c *ProjectsLocationsDatasetsConsentStoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresSetIamPolicyCall {
9063 c.ctx_ = ctx
9064 return c
9065 }
9066
9067 // Header returns a http.Header that can be modified by the caller to add
9068 // headers to the request.
9069 func (c *ProjectsLocationsDatasetsConsentStoresSetIamPolicyCall) Header() http.Header {
9070 if c.header_ == nil {
9071 c.header_ = make(http.Header)
9072 }
9073 return c.header_
9074 }
9075
9076 func (c *ProjectsLocationsDatasetsConsentStoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
9077 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9078 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest)
9079 if err != nil {
9080 return nil, err
9081 }
9082 c.urlParams_.Set("alt", alt)
9083 c.urlParams_.Set("prettyPrint", "false")
9084 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
9085 urls += "?" + c.urlParams_.Encode()
9086 req, err := http.NewRequest("POST", urls, body)
9087 if err != nil {
9088 return nil, err
9089 }
9090 req.Header = reqHeaders
9091 googleapi.Expand(req.URL, map[string]string{
9092 "resource": c.resource,
9093 })
9094 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes()))
9095 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9096 }
9097
9098 // Do executes the "healthcare.projects.locations.datasets.consentStores.setIamPolicy" call.
9099 // Any non-2xx status code is an error. Response headers are in either
9100 // *Policy.ServerResponse.Header or (if a response was returned at all) in
9101 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9102 // whether the returned error was because http.StatusNotModified was returned.
9103 func (c *ProjectsLocationsDatasetsConsentStoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
9104 gensupport.SetOptions(c.urlParams_, opts...)
9105 res, err := c.doRequest("json")
9106 if res != nil && res.StatusCode == http.StatusNotModified {
9107 if res.Body != nil {
9108 res.Body.Close()
9109 }
9110 return nil, gensupport.WrapError(&googleapi.Error{
9111 Code: res.StatusCode,
9112 Header: res.Header,
9113 })
9114 }
9115 if err != nil {
9116 return nil, err
9117 }
9118 defer googleapi.CloseBody(res)
9119 if err := googleapi.CheckResponse(res); err != nil {
9120 return nil, gensupport.WrapError(err)
9121 }
9122 ret := &Policy{
9123 ServerResponse: googleapi.ServerResponse{
9124 Header: res.Header,
9125 HTTPStatusCode: res.StatusCode,
9126 },
9127 }
9128 target := &ret
9129 b, err := gensupport.DecodeResponseBytes(target, res)
9130 if err != nil {
9131 return nil, err
9132 }
9133 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.setIamPolicy", "response", internallog.HTTPResponse(res, b))
9134 return ret, nil
9135 }
9136
9137 type ProjectsLocationsDatasetsConsentStoresTestIamPermissionsCall struct {
9138 s *Service
9139 resource string
9140 testiampermissionsrequest *TestIamPermissionsRequest
9141 urlParams_ gensupport.URLParams
9142 ctx_ context.Context
9143 header_ http.Header
9144 }
9145
9146 // TestIamPermissions: Returns permissions that a caller has on the specified
9147 // resource. If the resource does not exist, this will return an empty set of
9148 // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
9149 // used for building permission-aware UIs and command-line tools, not for
9150 // authorization checking. This operation may "fail open" without warning.
9151 //
9152 // - resource: REQUIRED: The resource for which the policy detail is being
9153 // requested. See Resource names
9154 // (https://cloud.google.com/apis/design/resource_names) for the appropriate
9155 // value for this field.
9156 func (r *ProjectsLocationsDatasetsConsentStoresService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsConsentStoresTestIamPermissionsCall {
9157 c := &ProjectsLocationsDatasetsConsentStoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9158 c.resource = resource
9159 c.testiampermissionsrequest = testiampermissionsrequest
9160 return c
9161 }
9162
9163 // Fields allows partial responses to be retrieved. See
9164 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9165 // details.
9166 func (c *ProjectsLocationsDatasetsConsentStoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresTestIamPermissionsCall {
9167 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9168 return c
9169 }
9170
9171 // Context sets the context to be used in this call's Do method.
9172 func (c *ProjectsLocationsDatasetsConsentStoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresTestIamPermissionsCall {
9173 c.ctx_ = ctx
9174 return c
9175 }
9176
9177 // Header returns a http.Header that can be modified by the caller to add
9178 // headers to the request.
9179 func (c *ProjectsLocationsDatasetsConsentStoresTestIamPermissionsCall) Header() http.Header {
9180 if c.header_ == nil {
9181 c.header_ = make(http.Header)
9182 }
9183 return c.header_
9184 }
9185
9186 func (c *ProjectsLocationsDatasetsConsentStoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
9187 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9188 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest)
9189 if err != nil {
9190 return nil, err
9191 }
9192 c.urlParams_.Set("alt", alt)
9193 c.urlParams_.Set("prettyPrint", "false")
9194 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
9195 urls += "?" + c.urlParams_.Encode()
9196 req, err := http.NewRequest("POST", urls, body)
9197 if err != nil {
9198 return nil, err
9199 }
9200 req.Header = reqHeaders
9201 googleapi.Expand(req.URL, map[string]string{
9202 "resource": c.resource,
9203 })
9204 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes()))
9205 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9206 }
9207
9208 // Do executes the "healthcare.projects.locations.datasets.consentStores.testIamPermissions" call.
9209 // Any non-2xx status code is an error. Response headers are in either
9210 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
9211 // returned at all) in error.(*googleapi.Error).Header. Use
9212 // googleapi.IsNotModified to check whether the returned error was because
9213 // http.StatusNotModified was returned.
9214 func (c *ProjectsLocationsDatasetsConsentStoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
9215 gensupport.SetOptions(c.urlParams_, opts...)
9216 res, err := c.doRequest("json")
9217 if res != nil && res.StatusCode == http.StatusNotModified {
9218 if res.Body != nil {
9219 res.Body.Close()
9220 }
9221 return nil, gensupport.WrapError(&googleapi.Error{
9222 Code: res.StatusCode,
9223 Header: res.Header,
9224 })
9225 }
9226 if err != nil {
9227 return nil, err
9228 }
9229 defer googleapi.CloseBody(res)
9230 if err := googleapi.CheckResponse(res); err != nil {
9231 return nil, gensupport.WrapError(err)
9232 }
9233 ret := &TestIamPermissionsResponse{
9234 ServerResponse: googleapi.ServerResponse{
9235 Header: res.Header,
9236 HTTPStatusCode: res.StatusCode,
9237 },
9238 }
9239 target := &ret
9240 b, err := gensupport.DecodeResponseBytes(target, res)
9241 if err != nil {
9242 return nil, err
9243 }
9244 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.testIamPermissions", "response", internallog.HTTPResponse(res, b))
9245 return ret, nil
9246 }
9247
9248 type ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsCreateCall struct {
9249 s *Service
9250 parent string
9251 attributedefinition *AttributeDefinition
9252 urlParams_ gensupport.URLParams
9253 ctx_ context.Context
9254 header_ http.Header
9255 }
9256
9257 // Create: Creates a new Attribute definition in the parent consent store.
9258 //
9259 // - parent: The name of the consent store that this Attribute definition
9260 // belongs to.
9261 func (r *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsService) Create(parent string, attributedefinition *AttributeDefinition) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsCreateCall {
9262 c := &ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9263 c.parent = parent
9264 c.attributedefinition = attributedefinition
9265 return c
9266 }
9267
9268 // AttributeDefinitionId sets the optional parameter "attributeDefinitionId":
9269 // Required. The ID of the Attribute definition to create. The string must
9270 // match the following regex: `_a-zA-Z{0,255}` and must not be a reserved
9271 // keyword within the Common Expression Language as listed on
9272 // https://github.com/google/cel-spec/blob/master/doc/langdef.md.
9273 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsCreateCall) AttributeDefinitionId(attributeDefinitionId string) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsCreateCall {
9274 c.urlParams_.Set("attributeDefinitionId", attributeDefinitionId)
9275 return c
9276 }
9277
9278 // Fields allows partial responses to be retrieved. See
9279 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9280 // details.
9281 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsCreateCall {
9282 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9283 return c
9284 }
9285
9286 // Context sets the context to be used in this call's Do method.
9287 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsCreateCall {
9288 c.ctx_ = ctx
9289 return c
9290 }
9291
9292 // Header returns a http.Header that can be modified by the caller to add
9293 // headers to the request.
9294 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsCreateCall) Header() http.Header {
9295 if c.header_ == nil {
9296 c.header_ = make(http.Header)
9297 }
9298 return c.header_
9299 }
9300
9301 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsCreateCall) doRequest(alt string) (*http.Response, error) {
9302 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9303 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.attributedefinition)
9304 if err != nil {
9305 return nil, err
9306 }
9307 c.urlParams_.Set("alt", alt)
9308 c.urlParams_.Set("prettyPrint", "false")
9309 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/attributeDefinitions")
9310 urls += "?" + c.urlParams_.Encode()
9311 req, err := http.NewRequest("POST", urls, body)
9312 if err != nil {
9313 return nil, err
9314 }
9315 req.Header = reqHeaders
9316 googleapi.Expand(req.URL, map[string]string{
9317 "parent": c.parent,
9318 })
9319 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.create", "request", internallog.HTTPRequest(req, body.Bytes()))
9320 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9321 }
9322
9323 // Do executes the "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.create" call.
9324 // Any non-2xx status code is an error. Response headers are in either
9325 // *AttributeDefinition.ServerResponse.Header or (if a response was returned at
9326 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
9327 // check whether the returned error was because http.StatusNotModified was
9328 // returned.
9329 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsCreateCall) Do(opts ...googleapi.CallOption) (*AttributeDefinition, error) {
9330 gensupport.SetOptions(c.urlParams_, opts...)
9331 res, err := c.doRequest("json")
9332 if res != nil && res.StatusCode == http.StatusNotModified {
9333 if res.Body != nil {
9334 res.Body.Close()
9335 }
9336 return nil, gensupport.WrapError(&googleapi.Error{
9337 Code: res.StatusCode,
9338 Header: res.Header,
9339 })
9340 }
9341 if err != nil {
9342 return nil, err
9343 }
9344 defer googleapi.CloseBody(res)
9345 if err := googleapi.CheckResponse(res); err != nil {
9346 return nil, gensupport.WrapError(err)
9347 }
9348 ret := &AttributeDefinition{
9349 ServerResponse: googleapi.ServerResponse{
9350 Header: res.Header,
9351 HTTPStatusCode: res.StatusCode,
9352 },
9353 }
9354 target := &ret
9355 b, err := gensupport.DecodeResponseBytes(target, res)
9356 if err != nil {
9357 return nil, err
9358 }
9359 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.create", "response", internallog.HTTPResponse(res, b))
9360 return ret, nil
9361 }
9362
9363 type ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsDeleteCall struct {
9364 s *Service
9365 name string
9366 urlParams_ gensupport.URLParams
9367 ctx_ context.Context
9368 header_ http.Header
9369 }
9370
9371 // Delete: Deletes the specified Attribute definition. Fails if the Attribute
9372 // definition is referenced by any User data mapping, or the latest revision of
9373 // any Consent.
9374 //
9375 // - name: The resource name of the Attribute definition to delete. To preserve
9376 // referential integrity, Attribute definitions referenced by a User data
9377 // mapping or the latest revision of a Consent cannot be deleted.
9378 func (r *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsService) Delete(name string) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsDeleteCall {
9379 c := &ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9380 c.name = name
9381 return c
9382 }
9383
9384 // Fields allows partial responses to be retrieved. See
9385 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9386 // details.
9387 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsDeleteCall {
9388 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9389 return c
9390 }
9391
9392 // Context sets the context to be used in this call's Do method.
9393 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsDeleteCall {
9394 c.ctx_ = ctx
9395 return c
9396 }
9397
9398 // Header returns a http.Header that can be modified by the caller to add
9399 // headers to the request.
9400 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsDeleteCall) Header() http.Header {
9401 if c.header_ == nil {
9402 c.header_ = make(http.Header)
9403 }
9404 return c.header_
9405 }
9406
9407 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsDeleteCall) doRequest(alt string) (*http.Response, error) {
9408 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9409 c.urlParams_.Set("alt", alt)
9410 c.urlParams_.Set("prettyPrint", "false")
9411 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
9412 urls += "?" + c.urlParams_.Encode()
9413 req, err := http.NewRequest("DELETE", urls, nil)
9414 if err != nil {
9415 return nil, err
9416 }
9417 req.Header = reqHeaders
9418 googleapi.Expand(req.URL, map[string]string{
9419 "name": c.name,
9420 })
9421 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.delete", "request", internallog.HTTPRequest(req, nil))
9422 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9423 }
9424
9425 // Do executes the "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.delete" call.
9426 // Any non-2xx status code is an error. Response headers are in either
9427 // *Empty.ServerResponse.Header or (if a response was returned at all) in
9428 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9429 // whether the returned error was because http.StatusNotModified was returned.
9430 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
9431 gensupport.SetOptions(c.urlParams_, opts...)
9432 res, err := c.doRequest("json")
9433 if res != nil && res.StatusCode == http.StatusNotModified {
9434 if res.Body != nil {
9435 res.Body.Close()
9436 }
9437 return nil, gensupport.WrapError(&googleapi.Error{
9438 Code: res.StatusCode,
9439 Header: res.Header,
9440 })
9441 }
9442 if err != nil {
9443 return nil, err
9444 }
9445 defer googleapi.CloseBody(res)
9446 if err := googleapi.CheckResponse(res); err != nil {
9447 return nil, gensupport.WrapError(err)
9448 }
9449 ret := &Empty{
9450 ServerResponse: googleapi.ServerResponse{
9451 Header: res.Header,
9452 HTTPStatusCode: res.StatusCode,
9453 },
9454 }
9455 target := &ret
9456 b, err := gensupport.DecodeResponseBytes(target, res)
9457 if err != nil {
9458 return nil, err
9459 }
9460 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.delete", "response", internallog.HTTPResponse(res, b))
9461 return ret, nil
9462 }
9463
9464 type ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsGetCall struct {
9465 s *Service
9466 name string
9467 urlParams_ gensupport.URLParams
9468 ifNoneMatch_ string
9469 ctx_ context.Context
9470 header_ http.Header
9471 }
9472
9473 // Get: Gets the specified Attribute definition.
9474 //
9475 // - name: The resource name of the Attribute definition to get.
9476 func (r *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsService) Get(name string) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsGetCall {
9477 c := &ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9478 c.name = name
9479 return c
9480 }
9481
9482 // Fields allows partial responses to be retrieved. See
9483 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9484 // details.
9485 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsGetCall {
9486 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9487 return c
9488 }
9489
9490 // IfNoneMatch sets an optional parameter which makes the operation fail if the
9491 // object's ETag matches the given value. This is useful for getting updates
9492 // only after the object has changed since the last request.
9493 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsGetCall {
9494 c.ifNoneMatch_ = entityTag
9495 return c
9496 }
9497
9498 // Context sets the context to be used in this call's Do method.
9499 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsGetCall {
9500 c.ctx_ = ctx
9501 return c
9502 }
9503
9504 // Header returns a http.Header that can be modified by the caller to add
9505 // headers to the request.
9506 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsGetCall) Header() http.Header {
9507 if c.header_ == nil {
9508 c.header_ = make(http.Header)
9509 }
9510 return c.header_
9511 }
9512
9513 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsGetCall) doRequest(alt string) (*http.Response, error) {
9514 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9515 if c.ifNoneMatch_ != "" {
9516 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9517 }
9518 c.urlParams_.Set("alt", alt)
9519 c.urlParams_.Set("prettyPrint", "false")
9520 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
9521 urls += "?" + c.urlParams_.Encode()
9522 req, err := http.NewRequest("GET", urls, nil)
9523 if err != nil {
9524 return nil, err
9525 }
9526 req.Header = reqHeaders
9527 googleapi.Expand(req.URL, map[string]string{
9528 "name": c.name,
9529 })
9530 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.get", "request", internallog.HTTPRequest(req, nil))
9531 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9532 }
9533
9534 // Do executes the "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.get" call.
9535 // Any non-2xx status code is an error. Response headers are in either
9536 // *AttributeDefinition.ServerResponse.Header or (if a response was returned at
9537 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
9538 // check whether the returned error was because http.StatusNotModified was
9539 // returned.
9540 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsGetCall) Do(opts ...googleapi.CallOption) (*AttributeDefinition, error) {
9541 gensupport.SetOptions(c.urlParams_, opts...)
9542 res, err := c.doRequest("json")
9543 if res != nil && res.StatusCode == http.StatusNotModified {
9544 if res.Body != nil {
9545 res.Body.Close()
9546 }
9547 return nil, gensupport.WrapError(&googleapi.Error{
9548 Code: res.StatusCode,
9549 Header: res.Header,
9550 })
9551 }
9552 if err != nil {
9553 return nil, err
9554 }
9555 defer googleapi.CloseBody(res)
9556 if err := googleapi.CheckResponse(res); err != nil {
9557 return nil, gensupport.WrapError(err)
9558 }
9559 ret := &AttributeDefinition{
9560 ServerResponse: googleapi.ServerResponse{
9561 Header: res.Header,
9562 HTTPStatusCode: res.StatusCode,
9563 },
9564 }
9565 target := &ret
9566 b, err := gensupport.DecodeResponseBytes(target, res)
9567 if err != nil {
9568 return nil, err
9569 }
9570 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.get", "response", internallog.HTTPResponse(res, b))
9571 return ret, nil
9572 }
9573
9574 type ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall struct {
9575 s *Service
9576 parent string
9577 urlParams_ gensupport.URLParams
9578 ifNoneMatch_ string
9579 ctx_ context.Context
9580 header_ http.Header
9581 }
9582
9583 // List: Lists the Attribute definitions in the specified consent store.
9584 //
9585 // - parent: Name of the consent store to retrieve Attribute definitions from.
9586 func (r *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsService) List(parent string) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall {
9587 c := &ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9588 c.parent = parent
9589 return c
9590 }
9591
9592 // Filter sets the optional parameter "filter": Restricts the attributes
9593 // returned to those matching a filter. The only field available for filtering
9594 // is `category`. For example, `filter=category=\"REQUEST\".
9595 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall) Filter(filter string) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall {
9596 c.urlParams_.Set("filter", filter)
9597 return c
9598 }
9599
9600 // PageSize sets the optional parameter "pageSize": Limit on the number of
9601 // Attribute definitions to return in a single response. If not specified, 100
9602 // is used. May not be larger than 1000.
9603 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall {
9604 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9605 return c
9606 }
9607
9608 // PageToken sets the optional parameter "pageToken": Token to retrieve the
9609 // next page of results or empty to get the first page.
9610 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall {
9611 c.urlParams_.Set("pageToken", pageToken)
9612 return c
9613 }
9614
9615 // Fields allows partial responses to be retrieved. See
9616 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9617 // details.
9618 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall {
9619 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9620 return c
9621 }
9622
9623 // IfNoneMatch sets an optional parameter which makes the operation fail if the
9624 // object's ETag matches the given value. This is useful for getting updates
9625 // only after the object has changed since the last request.
9626 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall {
9627 c.ifNoneMatch_ = entityTag
9628 return c
9629 }
9630
9631 // Context sets the context to be used in this call's Do method.
9632 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall {
9633 c.ctx_ = ctx
9634 return c
9635 }
9636
9637 // Header returns a http.Header that can be modified by the caller to add
9638 // headers to the request.
9639 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall) Header() http.Header {
9640 if c.header_ == nil {
9641 c.header_ = make(http.Header)
9642 }
9643 return c.header_
9644 }
9645
9646 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall) doRequest(alt string) (*http.Response, error) {
9647 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9648 if c.ifNoneMatch_ != "" {
9649 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9650 }
9651 c.urlParams_.Set("alt", alt)
9652 c.urlParams_.Set("prettyPrint", "false")
9653 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/attributeDefinitions")
9654 urls += "?" + c.urlParams_.Encode()
9655 req, err := http.NewRequest("GET", urls, nil)
9656 if err != nil {
9657 return nil, err
9658 }
9659 req.Header = reqHeaders
9660 googleapi.Expand(req.URL, map[string]string{
9661 "parent": c.parent,
9662 })
9663 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.list", "request", internallog.HTTPRequest(req, nil))
9664 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9665 }
9666
9667 // Do executes the "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.list" call.
9668 // Any non-2xx status code is an error. Response headers are in either
9669 // *ListAttributeDefinitionsResponse.ServerResponse.Header or (if a response
9670 // was returned at all) in error.(*googleapi.Error).Header. Use
9671 // googleapi.IsNotModified to check whether the returned error was because
9672 // http.StatusNotModified was returned.
9673 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall) Do(opts ...googleapi.CallOption) (*ListAttributeDefinitionsResponse, error) {
9674 gensupport.SetOptions(c.urlParams_, opts...)
9675 res, err := c.doRequest("json")
9676 if res != nil && res.StatusCode == http.StatusNotModified {
9677 if res.Body != nil {
9678 res.Body.Close()
9679 }
9680 return nil, gensupport.WrapError(&googleapi.Error{
9681 Code: res.StatusCode,
9682 Header: res.Header,
9683 })
9684 }
9685 if err != nil {
9686 return nil, err
9687 }
9688 defer googleapi.CloseBody(res)
9689 if err := googleapi.CheckResponse(res); err != nil {
9690 return nil, gensupport.WrapError(err)
9691 }
9692 ret := &ListAttributeDefinitionsResponse{
9693 ServerResponse: googleapi.ServerResponse{
9694 Header: res.Header,
9695 HTTPStatusCode: res.StatusCode,
9696 },
9697 }
9698 target := &ret
9699 b, err := gensupport.DecodeResponseBytes(target, res)
9700 if err != nil {
9701 return nil, err
9702 }
9703 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.list", "response", internallog.HTTPResponse(res, b))
9704 return ret, nil
9705 }
9706
9707 // Pages invokes f for each page of results.
9708 // A non-nil error returned from f will halt the iteration.
9709 // The provided context supersedes any context provided to the Context method.
9710 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall) Pages(ctx context.Context, f func(*ListAttributeDefinitionsResponse) error) error {
9711 c.ctx_ = ctx
9712 defer c.PageToken(c.urlParams_.Get("pageToken"))
9713 for {
9714 x, err := c.Do()
9715 if err != nil {
9716 return err
9717 }
9718 if err := f(x); err != nil {
9719 return err
9720 }
9721 if x.NextPageToken == "" {
9722 return nil
9723 }
9724 c.PageToken(x.NextPageToken)
9725 }
9726 }
9727
9728 type ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsPatchCall struct {
9729 s *Service
9730 name string
9731 attributedefinition *AttributeDefinition
9732 urlParams_ gensupport.URLParams
9733 ctx_ context.Context
9734 header_ http.Header
9735 }
9736
9737 // Patch: Updates the specified Attribute definition.
9738 //
9739 // - name: Identifier. Resource name of the Attribute definition, of the form
9740 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consen
9741 // tStores/{consent_store_id}/attributeDefinitions/{attribute_definition_id}`.
9742 // Cannot be changed after creation.
9743 func (r *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsService) Patch(name string, attributedefinition *AttributeDefinition) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsPatchCall {
9744 c := &ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9745 c.name = name
9746 c.attributedefinition = attributedefinition
9747 return c
9748 }
9749
9750 // UpdateMask sets the optional parameter "updateMask": Required. The update
9751 // mask that applies to the resource. For the `FieldMask` definition, see
9752 // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
9753 // Only the `description`, `allowed_values`, `consent_default_values` and
9754 // `data_mapping_default_value` fields can be updated. The updated
9755 // `allowed_values` must contain all values from the previous `allowed_values`.
9756 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsPatchCall {
9757 c.urlParams_.Set("updateMask", updateMask)
9758 return c
9759 }
9760
9761 // Fields allows partial responses to be retrieved. See
9762 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9763 // details.
9764 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsPatchCall {
9765 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9766 return c
9767 }
9768
9769 // Context sets the context to be used in this call's Do method.
9770 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsPatchCall {
9771 c.ctx_ = ctx
9772 return c
9773 }
9774
9775 // Header returns a http.Header that can be modified by the caller to add
9776 // headers to the request.
9777 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsPatchCall) Header() http.Header {
9778 if c.header_ == nil {
9779 c.header_ = make(http.Header)
9780 }
9781 return c.header_
9782 }
9783
9784 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsPatchCall) doRequest(alt string) (*http.Response, error) {
9785 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9786 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.attributedefinition)
9787 if err != nil {
9788 return nil, err
9789 }
9790 c.urlParams_.Set("alt", alt)
9791 c.urlParams_.Set("prettyPrint", "false")
9792 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
9793 urls += "?" + c.urlParams_.Encode()
9794 req, err := http.NewRequest("PATCH", urls, body)
9795 if err != nil {
9796 return nil, err
9797 }
9798 req.Header = reqHeaders
9799 googleapi.Expand(req.URL, map[string]string{
9800 "name": c.name,
9801 })
9802 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
9803 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9804 }
9805
9806 // Do executes the "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.patch" call.
9807 // Any non-2xx status code is an error. Response headers are in either
9808 // *AttributeDefinition.ServerResponse.Header or (if a response was returned at
9809 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
9810 // check whether the returned error was because http.StatusNotModified was
9811 // returned.
9812 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsPatchCall) Do(opts ...googleapi.CallOption) (*AttributeDefinition, error) {
9813 gensupport.SetOptions(c.urlParams_, opts...)
9814 res, err := c.doRequest("json")
9815 if res != nil && res.StatusCode == http.StatusNotModified {
9816 if res.Body != nil {
9817 res.Body.Close()
9818 }
9819 return nil, gensupport.WrapError(&googleapi.Error{
9820 Code: res.StatusCode,
9821 Header: res.Header,
9822 })
9823 }
9824 if err != nil {
9825 return nil, err
9826 }
9827 defer googleapi.CloseBody(res)
9828 if err := googleapi.CheckResponse(res); err != nil {
9829 return nil, gensupport.WrapError(err)
9830 }
9831 ret := &AttributeDefinition{
9832 ServerResponse: googleapi.ServerResponse{
9833 Header: res.Header,
9834 HTTPStatusCode: res.StatusCode,
9835 },
9836 }
9837 target := &ret
9838 b, err := gensupport.DecodeResponseBytes(target, res)
9839 if err != nil {
9840 return nil, err
9841 }
9842 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.patch", "response", internallog.HTTPResponse(res, b))
9843 return ret, nil
9844 }
9845
9846 type ProjectsLocationsDatasetsConsentStoresConsentArtifactsCreateCall struct {
9847 s *Service
9848 parent string
9849 consentartifact *ConsentArtifact
9850 urlParams_ gensupport.URLParams
9851 ctx_ context.Context
9852 header_ http.Header
9853 }
9854
9855 // Create: Creates a new Consent artifact in the parent consent store.
9856 //
9857 // - parent: The name of the consent store this Consent artifact belongs to.
9858 func (r *ProjectsLocationsDatasetsConsentStoresConsentArtifactsService) Create(parent string, consentartifact *ConsentArtifact) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsCreateCall {
9859 c := &ProjectsLocationsDatasetsConsentStoresConsentArtifactsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9860 c.parent = parent
9861 c.consentartifact = consentartifact
9862 return c
9863 }
9864
9865 // Fields allows partial responses to be retrieved. See
9866 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9867 // details.
9868 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsCreateCall {
9869 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9870 return c
9871 }
9872
9873 // Context sets the context to be used in this call's Do method.
9874 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsCreateCall {
9875 c.ctx_ = ctx
9876 return c
9877 }
9878
9879 // Header returns a http.Header that can be modified by the caller to add
9880 // headers to the request.
9881 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsCreateCall) Header() http.Header {
9882 if c.header_ == nil {
9883 c.header_ = make(http.Header)
9884 }
9885 return c.header_
9886 }
9887
9888 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsCreateCall) doRequest(alt string) (*http.Response, error) {
9889 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9890 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.consentartifact)
9891 if err != nil {
9892 return nil, err
9893 }
9894 c.urlParams_.Set("alt", alt)
9895 c.urlParams_.Set("prettyPrint", "false")
9896 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/consentArtifacts")
9897 urls += "?" + c.urlParams_.Encode()
9898 req, err := http.NewRequest("POST", urls, body)
9899 if err != nil {
9900 return nil, err
9901 }
9902 req.Header = reqHeaders
9903 googleapi.Expand(req.URL, map[string]string{
9904 "parent": c.parent,
9905 })
9906 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consentArtifacts.create", "request", internallog.HTTPRequest(req, body.Bytes()))
9907 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9908 }
9909
9910 // Do executes the "healthcare.projects.locations.datasets.consentStores.consentArtifacts.create" call.
9911 // Any non-2xx status code is an error. Response headers are in either
9912 // *ConsentArtifact.ServerResponse.Header or (if a response was returned at
9913 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
9914 // check whether the returned error was because http.StatusNotModified was
9915 // returned.
9916 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsCreateCall) Do(opts ...googleapi.CallOption) (*ConsentArtifact, error) {
9917 gensupport.SetOptions(c.urlParams_, opts...)
9918 res, err := c.doRequest("json")
9919 if res != nil && res.StatusCode == http.StatusNotModified {
9920 if res.Body != nil {
9921 res.Body.Close()
9922 }
9923 return nil, gensupport.WrapError(&googleapi.Error{
9924 Code: res.StatusCode,
9925 Header: res.Header,
9926 })
9927 }
9928 if err != nil {
9929 return nil, err
9930 }
9931 defer googleapi.CloseBody(res)
9932 if err := googleapi.CheckResponse(res); err != nil {
9933 return nil, gensupport.WrapError(err)
9934 }
9935 ret := &ConsentArtifact{
9936 ServerResponse: googleapi.ServerResponse{
9937 Header: res.Header,
9938 HTTPStatusCode: res.StatusCode,
9939 },
9940 }
9941 target := &ret
9942 b, err := gensupport.DecodeResponseBytes(target, res)
9943 if err != nil {
9944 return nil, err
9945 }
9946 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consentArtifacts.create", "response", internallog.HTTPResponse(res, b))
9947 return ret, nil
9948 }
9949
9950 type ProjectsLocationsDatasetsConsentStoresConsentArtifactsDeleteCall struct {
9951 s *Service
9952 name string
9953 urlParams_ gensupport.URLParams
9954 ctx_ context.Context
9955 header_ http.Header
9956 }
9957
9958 // Delete: Deletes the specified Consent artifact. Fails if the artifact is
9959 // referenced by the latest revision of any Consent.
9960 //
9961 // - name: The resource name of the Consent artifact to delete. To preserve
9962 // referential integrity, Consent artifacts referenced by the latest revision
9963 // of a Consent cannot be deleted.
9964 func (r *ProjectsLocationsDatasetsConsentStoresConsentArtifactsService) Delete(name string) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsDeleteCall {
9965 c := &ProjectsLocationsDatasetsConsentStoresConsentArtifactsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9966 c.name = name
9967 return c
9968 }
9969
9970 // Fields allows partial responses to be retrieved. See
9971 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9972 // details.
9973 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsDeleteCall {
9974 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9975 return c
9976 }
9977
9978 // Context sets the context to be used in this call's Do method.
9979 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsDeleteCall {
9980 c.ctx_ = ctx
9981 return c
9982 }
9983
9984 // Header returns a http.Header that can be modified by the caller to add
9985 // headers to the request.
9986 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsDeleteCall) Header() http.Header {
9987 if c.header_ == nil {
9988 c.header_ = make(http.Header)
9989 }
9990 return c.header_
9991 }
9992
9993 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsDeleteCall) doRequest(alt string) (*http.Response, error) {
9994 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9995 c.urlParams_.Set("alt", alt)
9996 c.urlParams_.Set("prettyPrint", "false")
9997 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
9998 urls += "?" + c.urlParams_.Encode()
9999 req, err := http.NewRequest("DELETE", urls, nil)
10000 if err != nil {
10001 return nil, err
10002 }
10003 req.Header = reqHeaders
10004 googleapi.Expand(req.URL, map[string]string{
10005 "name": c.name,
10006 })
10007 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consentArtifacts.delete", "request", internallog.HTTPRequest(req, nil))
10008 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10009 }
10010
10011 // Do executes the "healthcare.projects.locations.datasets.consentStores.consentArtifacts.delete" call.
10012 // Any non-2xx status code is an error. Response headers are in either
10013 // *Empty.ServerResponse.Header or (if a response was returned at all) in
10014 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10015 // whether the returned error was because http.StatusNotModified was returned.
10016 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
10017 gensupport.SetOptions(c.urlParams_, opts...)
10018 res, err := c.doRequest("json")
10019 if res != nil && res.StatusCode == http.StatusNotModified {
10020 if res.Body != nil {
10021 res.Body.Close()
10022 }
10023 return nil, gensupport.WrapError(&googleapi.Error{
10024 Code: res.StatusCode,
10025 Header: res.Header,
10026 })
10027 }
10028 if err != nil {
10029 return nil, err
10030 }
10031 defer googleapi.CloseBody(res)
10032 if err := googleapi.CheckResponse(res); err != nil {
10033 return nil, gensupport.WrapError(err)
10034 }
10035 ret := &Empty{
10036 ServerResponse: googleapi.ServerResponse{
10037 Header: res.Header,
10038 HTTPStatusCode: res.StatusCode,
10039 },
10040 }
10041 target := &ret
10042 b, err := gensupport.DecodeResponseBytes(target, res)
10043 if err != nil {
10044 return nil, err
10045 }
10046 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consentArtifacts.delete", "response", internallog.HTTPResponse(res, b))
10047 return ret, nil
10048 }
10049
10050 type ProjectsLocationsDatasetsConsentStoresConsentArtifactsGetCall struct {
10051 s *Service
10052 name string
10053 urlParams_ gensupport.URLParams
10054 ifNoneMatch_ string
10055 ctx_ context.Context
10056 header_ http.Header
10057 }
10058
10059 // Get: Gets the specified Consent artifact.
10060 //
10061 // - name: The resource name of the Consent artifact to retrieve.
10062 func (r *ProjectsLocationsDatasetsConsentStoresConsentArtifactsService) Get(name string) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsGetCall {
10063 c := &ProjectsLocationsDatasetsConsentStoresConsentArtifactsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10064 c.name = name
10065 return c
10066 }
10067
10068 // Fields allows partial responses to be retrieved. See
10069 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10070 // details.
10071 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsGetCall {
10072 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10073 return c
10074 }
10075
10076 // IfNoneMatch sets an optional parameter which makes the operation fail if the
10077 // object's ETag matches the given value. This is useful for getting updates
10078 // only after the object has changed since the last request.
10079 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsGetCall {
10080 c.ifNoneMatch_ = entityTag
10081 return c
10082 }
10083
10084 // Context sets the context to be used in this call's Do method.
10085 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsGetCall {
10086 c.ctx_ = ctx
10087 return c
10088 }
10089
10090 // Header returns a http.Header that can be modified by the caller to add
10091 // headers to the request.
10092 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsGetCall) Header() http.Header {
10093 if c.header_ == nil {
10094 c.header_ = make(http.Header)
10095 }
10096 return c.header_
10097 }
10098
10099 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsGetCall) doRequest(alt string) (*http.Response, error) {
10100 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10101 if c.ifNoneMatch_ != "" {
10102 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10103 }
10104 c.urlParams_.Set("alt", alt)
10105 c.urlParams_.Set("prettyPrint", "false")
10106 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
10107 urls += "?" + c.urlParams_.Encode()
10108 req, err := http.NewRequest("GET", urls, nil)
10109 if err != nil {
10110 return nil, err
10111 }
10112 req.Header = reqHeaders
10113 googleapi.Expand(req.URL, map[string]string{
10114 "name": c.name,
10115 })
10116 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consentArtifacts.get", "request", internallog.HTTPRequest(req, nil))
10117 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10118 }
10119
10120 // Do executes the "healthcare.projects.locations.datasets.consentStores.consentArtifacts.get" call.
10121 // Any non-2xx status code is an error. Response headers are in either
10122 // *ConsentArtifact.ServerResponse.Header or (if a response was returned at
10123 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10124 // check whether the returned error was because http.StatusNotModified was
10125 // returned.
10126 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsGetCall) Do(opts ...googleapi.CallOption) (*ConsentArtifact, error) {
10127 gensupport.SetOptions(c.urlParams_, opts...)
10128 res, err := c.doRequest("json")
10129 if res != nil && res.StatusCode == http.StatusNotModified {
10130 if res.Body != nil {
10131 res.Body.Close()
10132 }
10133 return nil, gensupport.WrapError(&googleapi.Error{
10134 Code: res.StatusCode,
10135 Header: res.Header,
10136 })
10137 }
10138 if err != nil {
10139 return nil, err
10140 }
10141 defer googleapi.CloseBody(res)
10142 if err := googleapi.CheckResponse(res); err != nil {
10143 return nil, gensupport.WrapError(err)
10144 }
10145 ret := &ConsentArtifact{
10146 ServerResponse: googleapi.ServerResponse{
10147 Header: res.Header,
10148 HTTPStatusCode: res.StatusCode,
10149 },
10150 }
10151 target := &ret
10152 b, err := gensupport.DecodeResponseBytes(target, res)
10153 if err != nil {
10154 return nil, err
10155 }
10156 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consentArtifacts.get", "response", internallog.HTTPResponse(res, b))
10157 return ret, nil
10158 }
10159
10160 type ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall struct {
10161 s *Service
10162 parent string
10163 urlParams_ gensupport.URLParams
10164 ifNoneMatch_ string
10165 ctx_ context.Context
10166 header_ http.Header
10167 }
10168
10169 // List: Lists the Consent artifacts in the specified consent store.
10170 //
10171 // - parent: Name of the consent store to retrieve consent artifacts from.
10172 func (r *ProjectsLocationsDatasetsConsentStoresConsentArtifactsService) List(parent string) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall {
10173 c := &ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10174 c.parent = parent
10175 return c
10176 }
10177
10178 // Filter sets the optional parameter "filter": Restricts the artifacts
10179 // returned to those matching a filter. The following syntax is available: * A
10180 // string field value can be written as text inside quotation marks, for
10181 // example "query text". The only valid relational operation for text fields
10182 // is equality (`=`), where text is searched within the field, rather than
10183 // having the field be equal to the text. For example, "Comment = great"
10184 // returns messages with `great` in the comment field. * A number field value
10185 // can be written as an integer, a decimal, or an exponential. The valid
10186 // relational operators for number fields are the equality operator (`=`),
10187 // along with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note
10188 // that there is no inequality (`!=`) operator. You can prepend the `NOT`
10189 // operator to an expression to negate it. * A date field value must be written
10190 // in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format.
10191 // Leading zeros are required for one-digit months and days. The valid
10192 // relational operators for date fields are the equality operator (`=`) , along
10193 // with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that
10194 // there is no inequality (`!=`) operator. You can prepend the `NOT` operator
10195 // to an expression to negate it. * Multiple field query expressions can be
10196 // combined in one query by adding `AND` or `OR` operators between the
10197 // expressions. If a boolean operator appears within a quoted string, it is not
10198 // treated as special, it's just another part of the character string to be
10199 // matched. You can prepend the `NOT` operator to an expression to negate it.
10200 // The fields available for filtering are: - user_id. For example,
10201 // `filter=user_id=\"user123\". - consent_content_version - metadata. For
10202 // example, `filter=Metadata(\"testkey\")=\"value\" or
10203 // `filter=HasMetadata(\"testkey\")`.
10204 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall) Filter(filter string) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall {
10205 c.urlParams_.Set("filter", filter)
10206 return c
10207 }
10208
10209 // PageSize sets the optional parameter "pageSize": Limit on the number of
10210 // consent artifacts to return in a single response. If not specified, 100 is
10211 // used. May not be larger than 1000.
10212 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall {
10213 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
10214 return c
10215 }
10216
10217 // PageToken sets the optional parameter "pageToken": The next_page_token value
10218 // returned from the previous List request, if any.
10219 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall {
10220 c.urlParams_.Set("pageToken", pageToken)
10221 return c
10222 }
10223
10224 // Fields allows partial responses to be retrieved. See
10225 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10226 // details.
10227 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall {
10228 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10229 return c
10230 }
10231
10232 // IfNoneMatch sets an optional parameter which makes the operation fail if the
10233 // object's ETag matches the given value. This is useful for getting updates
10234 // only after the object has changed since the last request.
10235 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall {
10236 c.ifNoneMatch_ = entityTag
10237 return c
10238 }
10239
10240 // Context sets the context to be used in this call's Do method.
10241 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall {
10242 c.ctx_ = ctx
10243 return c
10244 }
10245
10246 // Header returns a http.Header that can be modified by the caller to add
10247 // headers to the request.
10248 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall) Header() http.Header {
10249 if c.header_ == nil {
10250 c.header_ = make(http.Header)
10251 }
10252 return c.header_
10253 }
10254
10255 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall) doRequest(alt string) (*http.Response, error) {
10256 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10257 if c.ifNoneMatch_ != "" {
10258 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10259 }
10260 c.urlParams_.Set("alt", alt)
10261 c.urlParams_.Set("prettyPrint", "false")
10262 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/consentArtifacts")
10263 urls += "?" + c.urlParams_.Encode()
10264 req, err := http.NewRequest("GET", urls, nil)
10265 if err != nil {
10266 return nil, err
10267 }
10268 req.Header = reqHeaders
10269 googleapi.Expand(req.URL, map[string]string{
10270 "parent": c.parent,
10271 })
10272 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consentArtifacts.list", "request", internallog.HTTPRequest(req, nil))
10273 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10274 }
10275
10276 // Do executes the "healthcare.projects.locations.datasets.consentStores.consentArtifacts.list" call.
10277 // Any non-2xx status code is an error. Response headers are in either
10278 // *ListConsentArtifactsResponse.ServerResponse.Header or (if a response was
10279 // returned at all) in error.(*googleapi.Error).Header. Use
10280 // googleapi.IsNotModified to check whether the returned error was because
10281 // http.StatusNotModified was returned.
10282 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall) Do(opts ...googleapi.CallOption) (*ListConsentArtifactsResponse, error) {
10283 gensupport.SetOptions(c.urlParams_, opts...)
10284 res, err := c.doRequest("json")
10285 if res != nil && res.StatusCode == http.StatusNotModified {
10286 if res.Body != nil {
10287 res.Body.Close()
10288 }
10289 return nil, gensupport.WrapError(&googleapi.Error{
10290 Code: res.StatusCode,
10291 Header: res.Header,
10292 })
10293 }
10294 if err != nil {
10295 return nil, err
10296 }
10297 defer googleapi.CloseBody(res)
10298 if err := googleapi.CheckResponse(res); err != nil {
10299 return nil, gensupport.WrapError(err)
10300 }
10301 ret := &ListConsentArtifactsResponse{
10302 ServerResponse: googleapi.ServerResponse{
10303 Header: res.Header,
10304 HTTPStatusCode: res.StatusCode,
10305 },
10306 }
10307 target := &ret
10308 b, err := gensupport.DecodeResponseBytes(target, res)
10309 if err != nil {
10310 return nil, err
10311 }
10312 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consentArtifacts.list", "response", internallog.HTTPResponse(res, b))
10313 return ret, nil
10314 }
10315
10316 // Pages invokes f for each page of results.
10317 // A non-nil error returned from f will halt the iteration.
10318 // The provided context supersedes any context provided to the Context method.
10319 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall) Pages(ctx context.Context, f func(*ListConsentArtifactsResponse) error) error {
10320 c.ctx_ = ctx
10321 defer c.PageToken(c.urlParams_.Get("pageToken"))
10322 for {
10323 x, err := c.Do()
10324 if err != nil {
10325 return err
10326 }
10327 if err := f(x); err != nil {
10328 return err
10329 }
10330 if x.NextPageToken == "" {
10331 return nil
10332 }
10333 c.PageToken(x.NextPageToken)
10334 }
10335 }
10336
10337 type ProjectsLocationsDatasetsConsentStoresConsentsActivateCall struct {
10338 s *Service
10339 name string
10340 activateconsentrequest *ActivateConsentRequest
10341 urlParams_ gensupport.URLParams
10342 ctx_ context.Context
10343 header_ http.Header
10344 }
10345
10346 // Activate: Activates the latest revision of the specified Consent by
10347 // committing a new revision with `state` updated to `ACTIVE`. If the latest
10348 // revision of the specified Consent is in the `ACTIVE` state, no new revision
10349 // is committed. A FAILED_PRECONDITION error occurs if the latest revision of
10350 // the specified Consent is in the `REJECTED` or `REVOKED` state.
10351 //
10352 // - name: The resource name of the Consent to activate, of the form
10353 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consen
10354 // tStores/{consent_store_id}/consents/{consent_id}`. An INVALID_ARGUMENT
10355 // error occurs if `revision_id` is specified in the name.
10356 func (r *ProjectsLocationsDatasetsConsentStoresConsentsService) Activate(name string, activateconsentrequest *ActivateConsentRequest) *ProjectsLocationsDatasetsConsentStoresConsentsActivateCall {
10357 c := &ProjectsLocationsDatasetsConsentStoresConsentsActivateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10358 c.name = name
10359 c.activateconsentrequest = activateconsentrequest
10360 return c
10361 }
10362
10363 // Fields allows partial responses to be retrieved. See
10364 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10365 // details.
10366 func (c *ProjectsLocationsDatasetsConsentStoresConsentsActivateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentsActivateCall {
10367 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10368 return c
10369 }
10370
10371 // Context sets the context to be used in this call's Do method.
10372 func (c *ProjectsLocationsDatasetsConsentStoresConsentsActivateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentsActivateCall {
10373 c.ctx_ = ctx
10374 return c
10375 }
10376
10377 // Header returns a http.Header that can be modified by the caller to add
10378 // headers to the request.
10379 func (c *ProjectsLocationsDatasetsConsentStoresConsentsActivateCall) Header() http.Header {
10380 if c.header_ == nil {
10381 c.header_ = make(http.Header)
10382 }
10383 return c.header_
10384 }
10385
10386 func (c *ProjectsLocationsDatasetsConsentStoresConsentsActivateCall) doRequest(alt string) (*http.Response, error) {
10387 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10388 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.activateconsentrequest)
10389 if err != nil {
10390 return nil, err
10391 }
10392 c.urlParams_.Set("alt", alt)
10393 c.urlParams_.Set("prettyPrint", "false")
10394 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:activate")
10395 urls += "?" + c.urlParams_.Encode()
10396 req, err := http.NewRequest("POST", urls, body)
10397 if err != nil {
10398 return nil, err
10399 }
10400 req.Header = reqHeaders
10401 googleapi.Expand(req.URL, map[string]string{
10402 "name": c.name,
10403 })
10404 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.activate", "request", internallog.HTTPRequest(req, body.Bytes()))
10405 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10406 }
10407
10408 // Do executes the "healthcare.projects.locations.datasets.consentStores.consents.activate" call.
10409 // Any non-2xx status code is an error. Response headers are in either
10410 // *Consent.ServerResponse.Header or (if a response was returned at all) in
10411 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10412 // whether the returned error was because http.StatusNotModified was returned.
10413 func (c *ProjectsLocationsDatasetsConsentStoresConsentsActivateCall) Do(opts ...googleapi.CallOption) (*Consent, error) {
10414 gensupport.SetOptions(c.urlParams_, opts...)
10415 res, err := c.doRequest("json")
10416 if res != nil && res.StatusCode == http.StatusNotModified {
10417 if res.Body != nil {
10418 res.Body.Close()
10419 }
10420 return nil, gensupport.WrapError(&googleapi.Error{
10421 Code: res.StatusCode,
10422 Header: res.Header,
10423 })
10424 }
10425 if err != nil {
10426 return nil, err
10427 }
10428 defer googleapi.CloseBody(res)
10429 if err := googleapi.CheckResponse(res); err != nil {
10430 return nil, gensupport.WrapError(err)
10431 }
10432 ret := &Consent{
10433 ServerResponse: googleapi.ServerResponse{
10434 Header: res.Header,
10435 HTTPStatusCode: res.StatusCode,
10436 },
10437 }
10438 target := &ret
10439 b, err := gensupport.DecodeResponseBytes(target, res)
10440 if err != nil {
10441 return nil, err
10442 }
10443 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.activate", "response", internallog.HTTPResponse(res, b))
10444 return ret, nil
10445 }
10446
10447 type ProjectsLocationsDatasetsConsentStoresConsentsCreateCall struct {
10448 s *Service
10449 parent string
10450 consent *Consent
10451 urlParams_ gensupport.URLParams
10452 ctx_ context.Context
10453 header_ http.Header
10454 }
10455
10456 // Create: Creates a new Consent in the parent consent store.
10457 //
10458 // - parent: Name of the consent store.
10459 func (r *ProjectsLocationsDatasetsConsentStoresConsentsService) Create(parent string, consent *Consent) *ProjectsLocationsDatasetsConsentStoresConsentsCreateCall {
10460 c := &ProjectsLocationsDatasetsConsentStoresConsentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10461 c.parent = parent
10462 c.consent = consent
10463 return c
10464 }
10465
10466 // Fields allows partial responses to be retrieved. See
10467 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10468 // details.
10469 func (c *ProjectsLocationsDatasetsConsentStoresConsentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentsCreateCall {
10470 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10471 return c
10472 }
10473
10474 // Context sets the context to be used in this call's Do method.
10475 func (c *ProjectsLocationsDatasetsConsentStoresConsentsCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentsCreateCall {
10476 c.ctx_ = ctx
10477 return c
10478 }
10479
10480 // Header returns a http.Header that can be modified by the caller to add
10481 // headers to the request.
10482 func (c *ProjectsLocationsDatasetsConsentStoresConsentsCreateCall) Header() http.Header {
10483 if c.header_ == nil {
10484 c.header_ = make(http.Header)
10485 }
10486 return c.header_
10487 }
10488
10489 func (c *ProjectsLocationsDatasetsConsentStoresConsentsCreateCall) doRequest(alt string) (*http.Response, error) {
10490 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10491 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.consent)
10492 if err != nil {
10493 return nil, err
10494 }
10495 c.urlParams_.Set("alt", alt)
10496 c.urlParams_.Set("prettyPrint", "false")
10497 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/consents")
10498 urls += "?" + c.urlParams_.Encode()
10499 req, err := http.NewRequest("POST", urls, body)
10500 if err != nil {
10501 return nil, err
10502 }
10503 req.Header = reqHeaders
10504 googleapi.Expand(req.URL, map[string]string{
10505 "parent": c.parent,
10506 })
10507 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.create", "request", internallog.HTTPRequest(req, body.Bytes()))
10508 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10509 }
10510
10511 // Do executes the "healthcare.projects.locations.datasets.consentStores.consents.create" call.
10512 // Any non-2xx status code is an error. Response headers are in either
10513 // *Consent.ServerResponse.Header or (if a response was returned at all) in
10514 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10515 // whether the returned error was because http.StatusNotModified was returned.
10516 func (c *ProjectsLocationsDatasetsConsentStoresConsentsCreateCall) Do(opts ...googleapi.CallOption) (*Consent, error) {
10517 gensupport.SetOptions(c.urlParams_, opts...)
10518 res, err := c.doRequest("json")
10519 if res != nil && res.StatusCode == http.StatusNotModified {
10520 if res.Body != nil {
10521 res.Body.Close()
10522 }
10523 return nil, gensupport.WrapError(&googleapi.Error{
10524 Code: res.StatusCode,
10525 Header: res.Header,
10526 })
10527 }
10528 if err != nil {
10529 return nil, err
10530 }
10531 defer googleapi.CloseBody(res)
10532 if err := googleapi.CheckResponse(res); err != nil {
10533 return nil, gensupport.WrapError(err)
10534 }
10535 ret := &Consent{
10536 ServerResponse: googleapi.ServerResponse{
10537 Header: res.Header,
10538 HTTPStatusCode: res.StatusCode,
10539 },
10540 }
10541 target := &ret
10542 b, err := gensupport.DecodeResponseBytes(target, res)
10543 if err != nil {
10544 return nil, err
10545 }
10546 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.create", "response", internallog.HTTPResponse(res, b))
10547 return ret, nil
10548 }
10549
10550 type ProjectsLocationsDatasetsConsentStoresConsentsDeleteCall struct {
10551 s *Service
10552 name string
10553 urlParams_ gensupport.URLParams
10554 ctx_ context.Context
10555 header_ http.Header
10556 }
10557
10558 // Delete: Deletes the Consent and its revisions. To keep a record of the
10559 // Consent but mark it inactive, see [RevokeConsent]. To delete a revision of a
10560 // Consent, see [DeleteConsentRevision]. This operation does not delete the
10561 // related Consent artifact.
10562 //
10563 // - name: The resource name of the Consent to delete, of the form
10564 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consen
10565 // tStores/{consent_store_id}/consents/{consent_id}`. An INVALID_ARGUMENT
10566 // error occurs if `revision_id` is specified in the name.
10567 func (r *ProjectsLocationsDatasetsConsentStoresConsentsService) Delete(name string) *ProjectsLocationsDatasetsConsentStoresConsentsDeleteCall {
10568 c := &ProjectsLocationsDatasetsConsentStoresConsentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10569 c.name = name
10570 return c
10571 }
10572
10573 // Fields allows partial responses to be retrieved. See
10574 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10575 // details.
10576 func (c *ProjectsLocationsDatasetsConsentStoresConsentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentsDeleteCall {
10577 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10578 return c
10579 }
10580
10581 // Context sets the context to be used in this call's Do method.
10582 func (c *ProjectsLocationsDatasetsConsentStoresConsentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentsDeleteCall {
10583 c.ctx_ = ctx
10584 return c
10585 }
10586
10587 // Header returns a http.Header that can be modified by the caller to add
10588 // headers to the request.
10589 func (c *ProjectsLocationsDatasetsConsentStoresConsentsDeleteCall) Header() http.Header {
10590 if c.header_ == nil {
10591 c.header_ = make(http.Header)
10592 }
10593 return c.header_
10594 }
10595
10596 func (c *ProjectsLocationsDatasetsConsentStoresConsentsDeleteCall) doRequest(alt string) (*http.Response, error) {
10597 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10598 c.urlParams_.Set("alt", alt)
10599 c.urlParams_.Set("prettyPrint", "false")
10600 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
10601 urls += "?" + c.urlParams_.Encode()
10602 req, err := http.NewRequest("DELETE", urls, nil)
10603 if err != nil {
10604 return nil, err
10605 }
10606 req.Header = reqHeaders
10607 googleapi.Expand(req.URL, map[string]string{
10608 "name": c.name,
10609 })
10610 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.delete", "request", internallog.HTTPRequest(req, nil))
10611 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10612 }
10613
10614 // Do executes the "healthcare.projects.locations.datasets.consentStores.consents.delete" call.
10615 // Any non-2xx status code is an error. Response headers are in either
10616 // *Empty.ServerResponse.Header or (if a response was returned at all) in
10617 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10618 // whether the returned error was because http.StatusNotModified was returned.
10619 func (c *ProjectsLocationsDatasetsConsentStoresConsentsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
10620 gensupport.SetOptions(c.urlParams_, opts...)
10621 res, err := c.doRequest("json")
10622 if res != nil && res.StatusCode == http.StatusNotModified {
10623 if res.Body != nil {
10624 res.Body.Close()
10625 }
10626 return nil, gensupport.WrapError(&googleapi.Error{
10627 Code: res.StatusCode,
10628 Header: res.Header,
10629 })
10630 }
10631 if err != nil {
10632 return nil, err
10633 }
10634 defer googleapi.CloseBody(res)
10635 if err := googleapi.CheckResponse(res); err != nil {
10636 return nil, gensupport.WrapError(err)
10637 }
10638 ret := &Empty{
10639 ServerResponse: googleapi.ServerResponse{
10640 Header: res.Header,
10641 HTTPStatusCode: res.StatusCode,
10642 },
10643 }
10644 target := &ret
10645 b, err := gensupport.DecodeResponseBytes(target, res)
10646 if err != nil {
10647 return nil, err
10648 }
10649 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.delete", "response", internallog.HTTPResponse(res, b))
10650 return ret, nil
10651 }
10652
10653 type ProjectsLocationsDatasetsConsentStoresConsentsDeleteRevisionCall struct {
10654 s *Service
10655 name string
10656 urlParams_ gensupport.URLParams
10657 ctx_ context.Context
10658 header_ http.Header
10659 }
10660
10661 // DeleteRevision: Deletes the specified revision of a Consent. An
10662 // INVALID_ARGUMENT error occurs if the specified revision is the latest
10663 // revision.
10664 //
10665 // - name: The resource name of the Consent revision to delete, of the form
10666 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consen
10667 // tStores/{consent_store_id}/consents/{consent_id}@{revision_id}`. An
10668 // INVALID_ARGUMENT error occurs if `revision_id` is not specified in the
10669 // name.
10670 func (r *ProjectsLocationsDatasetsConsentStoresConsentsService) DeleteRevision(name string) *ProjectsLocationsDatasetsConsentStoresConsentsDeleteRevisionCall {
10671 c := &ProjectsLocationsDatasetsConsentStoresConsentsDeleteRevisionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10672 c.name = name
10673 return c
10674 }
10675
10676 // Fields allows partial responses to be retrieved. See
10677 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10678 // details.
10679 func (c *ProjectsLocationsDatasetsConsentStoresConsentsDeleteRevisionCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentsDeleteRevisionCall {
10680 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10681 return c
10682 }
10683
10684 // Context sets the context to be used in this call's Do method.
10685 func (c *ProjectsLocationsDatasetsConsentStoresConsentsDeleteRevisionCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentsDeleteRevisionCall {
10686 c.ctx_ = ctx
10687 return c
10688 }
10689
10690 // Header returns a http.Header that can be modified by the caller to add
10691 // headers to the request.
10692 func (c *ProjectsLocationsDatasetsConsentStoresConsentsDeleteRevisionCall) Header() http.Header {
10693 if c.header_ == nil {
10694 c.header_ = make(http.Header)
10695 }
10696 return c.header_
10697 }
10698
10699 func (c *ProjectsLocationsDatasetsConsentStoresConsentsDeleteRevisionCall) doRequest(alt string) (*http.Response, error) {
10700 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10701 c.urlParams_.Set("alt", alt)
10702 c.urlParams_.Set("prettyPrint", "false")
10703 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:deleteRevision")
10704 urls += "?" + c.urlParams_.Encode()
10705 req, err := http.NewRequest("DELETE", urls, nil)
10706 if err != nil {
10707 return nil, err
10708 }
10709 req.Header = reqHeaders
10710 googleapi.Expand(req.URL, map[string]string{
10711 "name": c.name,
10712 })
10713 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.deleteRevision", "request", internallog.HTTPRequest(req, nil))
10714 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10715 }
10716
10717 // Do executes the "healthcare.projects.locations.datasets.consentStores.consents.deleteRevision" call.
10718 // Any non-2xx status code is an error. Response headers are in either
10719 // *Empty.ServerResponse.Header or (if a response was returned at all) in
10720 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10721 // whether the returned error was because http.StatusNotModified was returned.
10722 func (c *ProjectsLocationsDatasetsConsentStoresConsentsDeleteRevisionCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
10723 gensupport.SetOptions(c.urlParams_, opts...)
10724 res, err := c.doRequest("json")
10725 if res != nil && res.StatusCode == http.StatusNotModified {
10726 if res.Body != nil {
10727 res.Body.Close()
10728 }
10729 return nil, gensupport.WrapError(&googleapi.Error{
10730 Code: res.StatusCode,
10731 Header: res.Header,
10732 })
10733 }
10734 if err != nil {
10735 return nil, err
10736 }
10737 defer googleapi.CloseBody(res)
10738 if err := googleapi.CheckResponse(res); err != nil {
10739 return nil, gensupport.WrapError(err)
10740 }
10741 ret := &Empty{
10742 ServerResponse: googleapi.ServerResponse{
10743 Header: res.Header,
10744 HTTPStatusCode: res.StatusCode,
10745 },
10746 }
10747 target := &ret
10748 b, err := gensupport.DecodeResponseBytes(target, res)
10749 if err != nil {
10750 return nil, err
10751 }
10752 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.deleteRevision", "response", internallog.HTTPResponse(res, b))
10753 return ret, nil
10754 }
10755
10756 type ProjectsLocationsDatasetsConsentStoresConsentsGetCall struct {
10757 s *Service
10758 name string
10759 urlParams_ gensupport.URLParams
10760 ifNoneMatch_ string
10761 ctx_ context.Context
10762 header_ http.Header
10763 }
10764
10765 // Get: Gets the specified revision of a Consent, or the latest revision if
10766 // `revision_id` is not specified in the resource name.
10767 //
10768 // - name: The resource name of the Consent to retrieve, of the form
10769 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consen
10770 // tStores/{consent_store_id}/consents/{consent_id}`. In order to retrieve a
10771 // previous revision of the Consent, also provide the revision ID:
10772 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consen
10773 // tStores/{consent_store_id}/consents/{consent_id}@{revision_id}`.
10774 func (r *ProjectsLocationsDatasetsConsentStoresConsentsService) Get(name string) *ProjectsLocationsDatasetsConsentStoresConsentsGetCall {
10775 c := &ProjectsLocationsDatasetsConsentStoresConsentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10776 c.name = name
10777 return c
10778 }
10779
10780 // Fields allows partial responses to be retrieved. See
10781 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10782 // details.
10783 func (c *ProjectsLocationsDatasetsConsentStoresConsentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentsGetCall {
10784 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10785 return c
10786 }
10787
10788 // IfNoneMatch sets an optional parameter which makes the operation fail if the
10789 // object's ETag matches the given value. This is useful for getting updates
10790 // only after the object has changed since the last request.
10791 func (c *ProjectsLocationsDatasetsConsentStoresConsentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsConsentStoresConsentsGetCall {
10792 c.ifNoneMatch_ = entityTag
10793 return c
10794 }
10795
10796 // Context sets the context to be used in this call's Do method.
10797 func (c *ProjectsLocationsDatasetsConsentStoresConsentsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentsGetCall {
10798 c.ctx_ = ctx
10799 return c
10800 }
10801
10802 // Header returns a http.Header that can be modified by the caller to add
10803 // headers to the request.
10804 func (c *ProjectsLocationsDatasetsConsentStoresConsentsGetCall) Header() http.Header {
10805 if c.header_ == nil {
10806 c.header_ = make(http.Header)
10807 }
10808 return c.header_
10809 }
10810
10811 func (c *ProjectsLocationsDatasetsConsentStoresConsentsGetCall) doRequest(alt string) (*http.Response, error) {
10812 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10813 if c.ifNoneMatch_ != "" {
10814 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10815 }
10816 c.urlParams_.Set("alt", alt)
10817 c.urlParams_.Set("prettyPrint", "false")
10818 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
10819 urls += "?" + c.urlParams_.Encode()
10820 req, err := http.NewRequest("GET", urls, nil)
10821 if err != nil {
10822 return nil, err
10823 }
10824 req.Header = reqHeaders
10825 googleapi.Expand(req.URL, map[string]string{
10826 "name": c.name,
10827 })
10828 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.get", "request", internallog.HTTPRequest(req, nil))
10829 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10830 }
10831
10832 // Do executes the "healthcare.projects.locations.datasets.consentStores.consents.get" call.
10833 // Any non-2xx status code is an error. Response headers are in either
10834 // *Consent.ServerResponse.Header or (if a response was returned at all) in
10835 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10836 // whether the returned error was because http.StatusNotModified was returned.
10837 func (c *ProjectsLocationsDatasetsConsentStoresConsentsGetCall) Do(opts ...googleapi.CallOption) (*Consent, error) {
10838 gensupport.SetOptions(c.urlParams_, opts...)
10839 res, err := c.doRequest("json")
10840 if res != nil && res.StatusCode == http.StatusNotModified {
10841 if res.Body != nil {
10842 res.Body.Close()
10843 }
10844 return nil, gensupport.WrapError(&googleapi.Error{
10845 Code: res.StatusCode,
10846 Header: res.Header,
10847 })
10848 }
10849 if err != nil {
10850 return nil, err
10851 }
10852 defer googleapi.CloseBody(res)
10853 if err := googleapi.CheckResponse(res); err != nil {
10854 return nil, gensupport.WrapError(err)
10855 }
10856 ret := &Consent{
10857 ServerResponse: googleapi.ServerResponse{
10858 Header: res.Header,
10859 HTTPStatusCode: res.StatusCode,
10860 },
10861 }
10862 target := &ret
10863 b, err := gensupport.DecodeResponseBytes(target, res)
10864 if err != nil {
10865 return nil, err
10866 }
10867 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.get", "response", internallog.HTTPResponse(res, b))
10868 return ret, nil
10869 }
10870
10871 type ProjectsLocationsDatasetsConsentStoresConsentsListCall struct {
10872 s *Service
10873 parent string
10874 urlParams_ gensupport.URLParams
10875 ifNoneMatch_ string
10876 ctx_ context.Context
10877 header_ http.Header
10878 }
10879
10880 // List: Lists the Consent in the given consent store, returning each Consent's
10881 // latest revision.
10882 //
10883 // - parent: Name of the consent store to retrieve Consents from.
10884 func (r *ProjectsLocationsDatasetsConsentStoresConsentsService) List(parent string) *ProjectsLocationsDatasetsConsentStoresConsentsListCall {
10885 c := &ProjectsLocationsDatasetsConsentStoresConsentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10886 c.parent = parent
10887 return c
10888 }
10889
10890 // Filter sets the optional parameter "filter": Restricts the Consents returned
10891 // to those matching a filter. The following syntax is available: * A string
10892 // field value can be written as text inside quotation marks, for example
10893 // "query text". The only valid relational operation for text fields is
10894 // equality (`=`), where text is searched within the field, rather than having
10895 // the field be equal to the text. For example, "Comment = great" returns
10896 // messages with `great` in the comment field. * A number field value can be
10897 // written as an integer, a decimal, or an exponential. The valid relational
10898 // operators for number fields are the equality operator (`=`), along with the
10899 // less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that there is
10900 // no inequality (`!=`) operator. You can prepend the `NOT` operator to an
10901 // expression to negate it. * A date field value must be written in
10902 // `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format.
10903 // Leading zeros are required for one-digit months and days. The valid
10904 // relational operators for date fields are the equality operator (`=`) , along
10905 // with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that
10906 // there is no inequality (`!=`) operator. You can prepend the `NOT` operator
10907 // to an expression to negate it. * Multiple field query expressions can be
10908 // combined in one query by adding `AND` or `OR` operators between the
10909 // expressions. If a boolean operator appears within a quoted string, it is not
10910 // treated as special, it's just another part of the character string to be
10911 // matched. You can prepend the `NOT` operator to an expression to negate it.
10912 // The fields available for filtering are: - user_id. For example,
10913 // `filter='user_id="user123"'`. - consent_artifact - state -
10914 // revision_create_time - metadata. For example,
10915 // `filter=Metadata(\"testkey\")=\"value\" or
10916 // `filter=HasMetadata(\"testkey\")`.
10917 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListCall) Filter(filter string) *ProjectsLocationsDatasetsConsentStoresConsentsListCall {
10918 c.urlParams_.Set("filter", filter)
10919 return c
10920 }
10921
10922 // PageSize sets the optional parameter "pageSize": Limit on the number of
10923 // Consents to return in a single response. If not specified, 100 is used. May
10924 // not be larger than 1000.
10925 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsConsentStoresConsentsListCall {
10926 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
10927 return c
10928 }
10929
10930 // PageToken sets the optional parameter "pageToken": The next_page_token value
10931 // returned from the previous List request, if any.
10932 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsConsentStoresConsentsListCall {
10933 c.urlParams_.Set("pageToken", pageToken)
10934 return c
10935 }
10936
10937 // Fields allows partial responses to be retrieved. See
10938 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10939 // details.
10940 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentsListCall {
10941 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10942 return c
10943 }
10944
10945 // IfNoneMatch sets an optional parameter which makes the operation fail if the
10946 // object's ETag matches the given value. This is useful for getting updates
10947 // only after the object has changed since the last request.
10948 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsConsentStoresConsentsListCall {
10949 c.ifNoneMatch_ = entityTag
10950 return c
10951 }
10952
10953 // Context sets the context to be used in this call's Do method.
10954 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentsListCall {
10955 c.ctx_ = ctx
10956 return c
10957 }
10958
10959 // Header returns a http.Header that can be modified by the caller to add
10960 // headers to the request.
10961 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListCall) Header() http.Header {
10962 if c.header_ == nil {
10963 c.header_ = make(http.Header)
10964 }
10965 return c.header_
10966 }
10967
10968 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListCall) doRequest(alt string) (*http.Response, error) {
10969 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10970 if c.ifNoneMatch_ != "" {
10971 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10972 }
10973 c.urlParams_.Set("alt", alt)
10974 c.urlParams_.Set("prettyPrint", "false")
10975 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/consents")
10976 urls += "?" + c.urlParams_.Encode()
10977 req, err := http.NewRequest("GET", urls, nil)
10978 if err != nil {
10979 return nil, err
10980 }
10981 req.Header = reqHeaders
10982 googleapi.Expand(req.URL, map[string]string{
10983 "parent": c.parent,
10984 })
10985 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.list", "request", internallog.HTTPRequest(req, nil))
10986 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10987 }
10988
10989 // Do executes the "healthcare.projects.locations.datasets.consentStores.consents.list" call.
10990 // Any non-2xx status code is an error. Response headers are in either
10991 // *ListConsentsResponse.ServerResponse.Header or (if a response was returned
10992 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10993 // check whether the returned error was because http.StatusNotModified was
10994 // returned.
10995 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListCall) Do(opts ...googleapi.CallOption) (*ListConsentsResponse, error) {
10996 gensupport.SetOptions(c.urlParams_, opts...)
10997 res, err := c.doRequest("json")
10998 if res != nil && res.StatusCode == http.StatusNotModified {
10999 if res.Body != nil {
11000 res.Body.Close()
11001 }
11002 return nil, gensupport.WrapError(&googleapi.Error{
11003 Code: res.StatusCode,
11004 Header: res.Header,
11005 })
11006 }
11007 if err != nil {
11008 return nil, err
11009 }
11010 defer googleapi.CloseBody(res)
11011 if err := googleapi.CheckResponse(res); err != nil {
11012 return nil, gensupport.WrapError(err)
11013 }
11014 ret := &ListConsentsResponse{
11015 ServerResponse: googleapi.ServerResponse{
11016 Header: res.Header,
11017 HTTPStatusCode: res.StatusCode,
11018 },
11019 }
11020 target := &ret
11021 b, err := gensupport.DecodeResponseBytes(target, res)
11022 if err != nil {
11023 return nil, err
11024 }
11025 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.list", "response", internallog.HTTPResponse(res, b))
11026 return ret, nil
11027 }
11028
11029 // Pages invokes f for each page of results.
11030 // A non-nil error returned from f will halt the iteration.
11031 // The provided context supersedes any context provided to the Context method.
11032 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListCall) Pages(ctx context.Context, f func(*ListConsentsResponse) error) error {
11033 c.ctx_ = ctx
11034 defer c.PageToken(c.urlParams_.Get("pageToken"))
11035 for {
11036 x, err := c.Do()
11037 if err != nil {
11038 return err
11039 }
11040 if err := f(x); err != nil {
11041 return err
11042 }
11043 if x.NextPageToken == "" {
11044 return nil
11045 }
11046 c.PageToken(x.NextPageToken)
11047 }
11048 }
11049
11050 type ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall struct {
11051 s *Service
11052 name string
11053 urlParams_ gensupport.URLParams
11054 ifNoneMatch_ string
11055 ctx_ context.Context
11056 header_ http.Header
11057 }
11058
11059 // ListRevisions: Lists the revisions of the specified Consent in reverse
11060 // chronological order.
11061 //
11062 // - name: The resource name of the Consent to retrieve revisions for.
11063 func (r *ProjectsLocationsDatasetsConsentStoresConsentsService) ListRevisions(name string) *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall {
11064 c := &ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11065 c.name = name
11066 return c
11067 }
11068
11069 // Filter sets the optional parameter "filter": Restricts the revisions
11070 // returned to those matching a filter. The following syntax is available: * A
11071 // string field value can be written as text inside quotation marks, for
11072 // example "query text". The only valid relational operation for text fields
11073 // is equality (`=`), where text is searched within the field, rather than
11074 // having the field be equal to the text. For example, "Comment = great"
11075 // returns messages with `great` in the comment field. * A number field value
11076 // can be written as an integer, a decimal, or an exponential. The valid
11077 // relational operators for number fields are the equality operator (`=`),
11078 // along with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note
11079 // that there is no inequality (`!=`) operator. You can prepend the `NOT`
11080 // operator to an expression to negate it. * A date field value must be written
11081 // in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format.
11082 // Leading zeros are required for one-digit months and days. The valid
11083 // relational operators for date fields are the equality operator (`=`) , along
11084 // with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that
11085 // there is no inequality (`!=`) operator. You can prepend the `NOT` operator
11086 // to an expression to negate it. * Multiple field query expressions can be
11087 // combined in one query by adding `AND` or `OR` operators between the
11088 // expressions. If a boolean operator appears within a quoted string, it is not
11089 // treated as special, it's just another part of the character string to be
11090 // matched. You can prepend the `NOT` operator to an expression to negate it.
11091 // Fields available for filtering are: - user_id. For example,
11092 // `filter='user_id="user123"'`. - consent_artifact - state -
11093 // revision_create_time - metadata. For example,
11094 // `filter=Metadata(\"testkey\")=\"value\" or
11095 // `filter=HasMetadata(\"testkey\")`.
11096 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall) Filter(filter string) *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall {
11097 c.urlParams_.Set("filter", filter)
11098 return c
11099 }
11100
11101 // PageSize sets the optional parameter "pageSize": Limit on the number of
11102 // revisions to return in a single response. If not specified, 100 is used. May
11103 // not be larger than 1000.
11104 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall {
11105 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
11106 return c
11107 }
11108
11109 // PageToken sets the optional parameter "pageToken": Token to retrieve the
11110 // next page of results or empty if there are no more results in the list.
11111 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall) PageToken(pageToken string) *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall {
11112 c.urlParams_.Set("pageToken", pageToken)
11113 return c
11114 }
11115
11116 // Fields allows partial responses to be retrieved. See
11117 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11118 // details.
11119 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall {
11120 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11121 return c
11122 }
11123
11124 // IfNoneMatch sets an optional parameter which makes the operation fail if the
11125 // object's ETag matches the given value. This is useful for getting updates
11126 // only after the object has changed since the last request.
11127 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall {
11128 c.ifNoneMatch_ = entityTag
11129 return c
11130 }
11131
11132 // Context sets the context to be used in this call's Do method.
11133 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall {
11134 c.ctx_ = ctx
11135 return c
11136 }
11137
11138 // Header returns a http.Header that can be modified by the caller to add
11139 // headers to the request.
11140 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall) Header() http.Header {
11141 if c.header_ == nil {
11142 c.header_ = make(http.Header)
11143 }
11144 return c.header_
11145 }
11146
11147 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall) doRequest(alt string) (*http.Response, error) {
11148 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11149 if c.ifNoneMatch_ != "" {
11150 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11151 }
11152 c.urlParams_.Set("alt", alt)
11153 c.urlParams_.Set("prettyPrint", "false")
11154 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:listRevisions")
11155 urls += "?" + c.urlParams_.Encode()
11156 req, err := http.NewRequest("GET", urls, nil)
11157 if err != nil {
11158 return nil, err
11159 }
11160 req.Header = reqHeaders
11161 googleapi.Expand(req.URL, map[string]string{
11162 "name": c.name,
11163 })
11164 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.listRevisions", "request", internallog.HTTPRequest(req, nil))
11165 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11166 }
11167
11168 // Do executes the "healthcare.projects.locations.datasets.consentStores.consents.listRevisions" call.
11169 // Any non-2xx status code is an error. Response headers are in either
11170 // *ListConsentRevisionsResponse.ServerResponse.Header or (if a response was
11171 // returned at all) in error.(*googleapi.Error).Header. Use
11172 // googleapi.IsNotModified to check whether the returned error was because
11173 // http.StatusNotModified was returned.
11174 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall) Do(opts ...googleapi.CallOption) (*ListConsentRevisionsResponse, error) {
11175 gensupport.SetOptions(c.urlParams_, opts...)
11176 res, err := c.doRequest("json")
11177 if res != nil && res.StatusCode == http.StatusNotModified {
11178 if res.Body != nil {
11179 res.Body.Close()
11180 }
11181 return nil, gensupport.WrapError(&googleapi.Error{
11182 Code: res.StatusCode,
11183 Header: res.Header,
11184 })
11185 }
11186 if err != nil {
11187 return nil, err
11188 }
11189 defer googleapi.CloseBody(res)
11190 if err := googleapi.CheckResponse(res); err != nil {
11191 return nil, gensupport.WrapError(err)
11192 }
11193 ret := &ListConsentRevisionsResponse{
11194 ServerResponse: googleapi.ServerResponse{
11195 Header: res.Header,
11196 HTTPStatusCode: res.StatusCode,
11197 },
11198 }
11199 target := &ret
11200 b, err := gensupport.DecodeResponseBytes(target, res)
11201 if err != nil {
11202 return nil, err
11203 }
11204 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.listRevisions", "response", internallog.HTTPResponse(res, b))
11205 return ret, nil
11206 }
11207
11208 // Pages invokes f for each page of results.
11209 // A non-nil error returned from f will halt the iteration.
11210 // The provided context supersedes any context provided to the Context method.
11211 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall) Pages(ctx context.Context, f func(*ListConsentRevisionsResponse) error) error {
11212 c.ctx_ = ctx
11213 defer c.PageToken(c.urlParams_.Get("pageToken"))
11214 for {
11215 x, err := c.Do()
11216 if err != nil {
11217 return err
11218 }
11219 if err := f(x); err != nil {
11220 return err
11221 }
11222 if x.NextPageToken == "" {
11223 return nil
11224 }
11225 c.PageToken(x.NextPageToken)
11226 }
11227 }
11228
11229 type ProjectsLocationsDatasetsConsentStoresConsentsPatchCall struct {
11230 s *Service
11231 name string
11232 consent *Consent
11233 urlParams_ gensupport.URLParams
11234 ctx_ context.Context
11235 header_ http.Header
11236 }
11237
11238 // Patch: Updates the latest revision of the specified Consent by committing a
11239 // new revision with the changes. A FAILED_PRECONDITION error occurs if the
11240 // latest revision of the specified Consent is in the `REJECTED` or `REVOKED`
11241 // state.
11242 //
11243 // - name: Identifier. Resource name of the Consent, of the form
11244 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consen
11245 // tStores/{consent_store_id}/consents/{consent_id}`. Cannot be changed after
11246 // creation.
11247 func (r *ProjectsLocationsDatasetsConsentStoresConsentsService) Patch(name string, consent *Consent) *ProjectsLocationsDatasetsConsentStoresConsentsPatchCall {
11248 c := &ProjectsLocationsDatasetsConsentStoresConsentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11249 c.name = name
11250 c.consent = consent
11251 return c
11252 }
11253
11254 // UpdateMask sets the optional parameter "updateMask": Required. The update
11255 // mask to apply to the resource. For the `FieldMask` definition, see
11256 // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
11257 // Only the `user_id`, `policies`, `consent_artifact`, and `metadata` fields
11258 // can be updated.
11259 func (c *ProjectsLocationsDatasetsConsentStoresConsentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsConsentStoresConsentsPatchCall {
11260 c.urlParams_.Set("updateMask", updateMask)
11261 return c
11262 }
11263
11264 // Fields allows partial responses to be retrieved. See
11265 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11266 // details.
11267 func (c *ProjectsLocationsDatasetsConsentStoresConsentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentsPatchCall {
11268 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11269 return c
11270 }
11271
11272 // Context sets the context to be used in this call's Do method.
11273 func (c *ProjectsLocationsDatasetsConsentStoresConsentsPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentsPatchCall {
11274 c.ctx_ = ctx
11275 return c
11276 }
11277
11278 // Header returns a http.Header that can be modified by the caller to add
11279 // headers to the request.
11280 func (c *ProjectsLocationsDatasetsConsentStoresConsentsPatchCall) Header() http.Header {
11281 if c.header_ == nil {
11282 c.header_ = make(http.Header)
11283 }
11284 return c.header_
11285 }
11286
11287 func (c *ProjectsLocationsDatasetsConsentStoresConsentsPatchCall) doRequest(alt string) (*http.Response, error) {
11288 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11289 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.consent)
11290 if err != nil {
11291 return nil, err
11292 }
11293 c.urlParams_.Set("alt", alt)
11294 c.urlParams_.Set("prettyPrint", "false")
11295 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
11296 urls += "?" + c.urlParams_.Encode()
11297 req, err := http.NewRequest("PATCH", urls, body)
11298 if err != nil {
11299 return nil, err
11300 }
11301 req.Header = reqHeaders
11302 googleapi.Expand(req.URL, map[string]string{
11303 "name": c.name,
11304 })
11305 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
11306 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11307 }
11308
11309 // Do executes the "healthcare.projects.locations.datasets.consentStores.consents.patch" call.
11310 // Any non-2xx status code is an error. Response headers are in either
11311 // *Consent.ServerResponse.Header or (if a response was returned at all) in
11312 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11313 // whether the returned error was because http.StatusNotModified was returned.
11314 func (c *ProjectsLocationsDatasetsConsentStoresConsentsPatchCall) Do(opts ...googleapi.CallOption) (*Consent, error) {
11315 gensupport.SetOptions(c.urlParams_, opts...)
11316 res, err := c.doRequest("json")
11317 if res != nil && res.StatusCode == http.StatusNotModified {
11318 if res.Body != nil {
11319 res.Body.Close()
11320 }
11321 return nil, gensupport.WrapError(&googleapi.Error{
11322 Code: res.StatusCode,
11323 Header: res.Header,
11324 })
11325 }
11326 if err != nil {
11327 return nil, err
11328 }
11329 defer googleapi.CloseBody(res)
11330 if err := googleapi.CheckResponse(res); err != nil {
11331 return nil, gensupport.WrapError(err)
11332 }
11333 ret := &Consent{
11334 ServerResponse: googleapi.ServerResponse{
11335 Header: res.Header,
11336 HTTPStatusCode: res.StatusCode,
11337 },
11338 }
11339 target := &ret
11340 b, err := gensupport.DecodeResponseBytes(target, res)
11341 if err != nil {
11342 return nil, err
11343 }
11344 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.patch", "response", internallog.HTTPResponse(res, b))
11345 return ret, nil
11346 }
11347
11348 type ProjectsLocationsDatasetsConsentStoresConsentsRejectCall struct {
11349 s *Service
11350 name string
11351 rejectconsentrequest *RejectConsentRequest
11352 urlParams_ gensupport.URLParams
11353 ctx_ context.Context
11354 header_ http.Header
11355 }
11356
11357 // Reject: Rejects the latest revision of the specified Consent by committing a
11358 // new revision with `state` updated to `REJECTED`. If the latest revision of
11359 // the specified Consent is in the `REJECTED` state, no new revision is
11360 // committed. A FAILED_PRECONDITION error occurs if the latest revision of the
11361 // specified Consent is in the `ACTIVE` or `REVOKED` state.
11362 //
11363 // - name: The resource name of the Consent to reject, of the form
11364 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consen
11365 // tStores/{consent_store_id}/consents/{consent_id}`. An INVALID_ARGUMENT
11366 // error occurs if `revision_id` is specified in the name.
11367 func (r *ProjectsLocationsDatasetsConsentStoresConsentsService) Reject(name string, rejectconsentrequest *RejectConsentRequest) *ProjectsLocationsDatasetsConsentStoresConsentsRejectCall {
11368 c := &ProjectsLocationsDatasetsConsentStoresConsentsRejectCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11369 c.name = name
11370 c.rejectconsentrequest = rejectconsentrequest
11371 return c
11372 }
11373
11374 // Fields allows partial responses to be retrieved. See
11375 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11376 // details.
11377 func (c *ProjectsLocationsDatasetsConsentStoresConsentsRejectCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentsRejectCall {
11378 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11379 return c
11380 }
11381
11382 // Context sets the context to be used in this call's Do method.
11383 func (c *ProjectsLocationsDatasetsConsentStoresConsentsRejectCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentsRejectCall {
11384 c.ctx_ = ctx
11385 return c
11386 }
11387
11388 // Header returns a http.Header that can be modified by the caller to add
11389 // headers to the request.
11390 func (c *ProjectsLocationsDatasetsConsentStoresConsentsRejectCall) Header() http.Header {
11391 if c.header_ == nil {
11392 c.header_ = make(http.Header)
11393 }
11394 return c.header_
11395 }
11396
11397 func (c *ProjectsLocationsDatasetsConsentStoresConsentsRejectCall) doRequest(alt string) (*http.Response, error) {
11398 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11399 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.rejectconsentrequest)
11400 if err != nil {
11401 return nil, err
11402 }
11403 c.urlParams_.Set("alt", alt)
11404 c.urlParams_.Set("prettyPrint", "false")
11405 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:reject")
11406 urls += "?" + c.urlParams_.Encode()
11407 req, err := http.NewRequest("POST", urls, body)
11408 if err != nil {
11409 return nil, err
11410 }
11411 req.Header = reqHeaders
11412 googleapi.Expand(req.URL, map[string]string{
11413 "name": c.name,
11414 })
11415 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.reject", "request", internallog.HTTPRequest(req, body.Bytes()))
11416 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11417 }
11418
11419 // Do executes the "healthcare.projects.locations.datasets.consentStores.consents.reject" call.
11420 // Any non-2xx status code is an error. Response headers are in either
11421 // *Consent.ServerResponse.Header or (if a response was returned at all) in
11422 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11423 // whether the returned error was because http.StatusNotModified was returned.
11424 func (c *ProjectsLocationsDatasetsConsentStoresConsentsRejectCall) Do(opts ...googleapi.CallOption) (*Consent, error) {
11425 gensupport.SetOptions(c.urlParams_, opts...)
11426 res, err := c.doRequest("json")
11427 if res != nil && res.StatusCode == http.StatusNotModified {
11428 if res.Body != nil {
11429 res.Body.Close()
11430 }
11431 return nil, gensupport.WrapError(&googleapi.Error{
11432 Code: res.StatusCode,
11433 Header: res.Header,
11434 })
11435 }
11436 if err != nil {
11437 return nil, err
11438 }
11439 defer googleapi.CloseBody(res)
11440 if err := googleapi.CheckResponse(res); err != nil {
11441 return nil, gensupport.WrapError(err)
11442 }
11443 ret := &Consent{
11444 ServerResponse: googleapi.ServerResponse{
11445 Header: res.Header,
11446 HTTPStatusCode: res.StatusCode,
11447 },
11448 }
11449 target := &ret
11450 b, err := gensupport.DecodeResponseBytes(target, res)
11451 if err != nil {
11452 return nil, err
11453 }
11454 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.reject", "response", internallog.HTTPResponse(res, b))
11455 return ret, nil
11456 }
11457
11458 type ProjectsLocationsDatasetsConsentStoresConsentsRevokeCall struct {
11459 s *Service
11460 name string
11461 revokeconsentrequest *RevokeConsentRequest
11462 urlParams_ gensupport.URLParams
11463 ctx_ context.Context
11464 header_ http.Header
11465 }
11466
11467 // Revoke: Revokes the latest revision of the specified Consent by committing a
11468 // new revision with `state` updated to `REVOKED`. If the latest revision of
11469 // the specified Consent is in the `REVOKED` state, no new revision is
11470 // committed. A FAILED_PRECONDITION error occurs if the latest revision of the
11471 // given consent is in `DRAFT` or `REJECTED` state.
11472 //
11473 // - name: The resource name of the Consent to revoke, of the form
11474 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consen
11475 // tStores/{consent_store_id}/consents/{consent_id}`. An INVALID_ARGUMENT
11476 // error occurs if `revision_id` is specified in the name.
11477 func (r *ProjectsLocationsDatasetsConsentStoresConsentsService) Revoke(name string, revokeconsentrequest *RevokeConsentRequest) *ProjectsLocationsDatasetsConsentStoresConsentsRevokeCall {
11478 c := &ProjectsLocationsDatasetsConsentStoresConsentsRevokeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11479 c.name = name
11480 c.revokeconsentrequest = revokeconsentrequest
11481 return c
11482 }
11483
11484 // Fields allows partial responses to be retrieved. See
11485 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11486 // details.
11487 func (c *ProjectsLocationsDatasetsConsentStoresConsentsRevokeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentsRevokeCall {
11488 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11489 return c
11490 }
11491
11492 // Context sets the context to be used in this call's Do method.
11493 func (c *ProjectsLocationsDatasetsConsentStoresConsentsRevokeCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentsRevokeCall {
11494 c.ctx_ = ctx
11495 return c
11496 }
11497
11498 // Header returns a http.Header that can be modified by the caller to add
11499 // headers to the request.
11500 func (c *ProjectsLocationsDatasetsConsentStoresConsentsRevokeCall) Header() http.Header {
11501 if c.header_ == nil {
11502 c.header_ = make(http.Header)
11503 }
11504 return c.header_
11505 }
11506
11507 func (c *ProjectsLocationsDatasetsConsentStoresConsentsRevokeCall) doRequest(alt string) (*http.Response, error) {
11508 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11509 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.revokeconsentrequest)
11510 if err != nil {
11511 return nil, err
11512 }
11513 c.urlParams_.Set("alt", alt)
11514 c.urlParams_.Set("prettyPrint", "false")
11515 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:revoke")
11516 urls += "?" + c.urlParams_.Encode()
11517 req, err := http.NewRequest("POST", urls, body)
11518 if err != nil {
11519 return nil, err
11520 }
11521 req.Header = reqHeaders
11522 googleapi.Expand(req.URL, map[string]string{
11523 "name": c.name,
11524 })
11525 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.revoke", "request", internallog.HTTPRequest(req, body.Bytes()))
11526 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11527 }
11528
11529 // Do executes the "healthcare.projects.locations.datasets.consentStores.consents.revoke" call.
11530 // Any non-2xx status code is an error. Response headers are in either
11531 // *Consent.ServerResponse.Header or (if a response was returned at all) in
11532 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11533 // whether the returned error was because http.StatusNotModified was returned.
11534 func (c *ProjectsLocationsDatasetsConsentStoresConsentsRevokeCall) Do(opts ...googleapi.CallOption) (*Consent, error) {
11535 gensupport.SetOptions(c.urlParams_, opts...)
11536 res, err := c.doRequest("json")
11537 if res != nil && res.StatusCode == http.StatusNotModified {
11538 if res.Body != nil {
11539 res.Body.Close()
11540 }
11541 return nil, gensupport.WrapError(&googleapi.Error{
11542 Code: res.StatusCode,
11543 Header: res.Header,
11544 })
11545 }
11546 if err != nil {
11547 return nil, err
11548 }
11549 defer googleapi.CloseBody(res)
11550 if err := googleapi.CheckResponse(res); err != nil {
11551 return nil, gensupport.WrapError(err)
11552 }
11553 ret := &Consent{
11554 ServerResponse: googleapi.ServerResponse{
11555 Header: res.Header,
11556 HTTPStatusCode: res.StatusCode,
11557 },
11558 }
11559 target := &ret
11560 b, err := gensupport.DecodeResponseBytes(target, res)
11561 if err != nil {
11562 return nil, err
11563 }
11564 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.revoke", "response", internallog.HTTPResponse(res, b))
11565 return ret, nil
11566 }
11567
11568 type ProjectsLocationsDatasetsConsentStoresUserDataMappingsArchiveCall struct {
11569 s *Service
11570 name string
11571 archiveuserdatamappingrequest *ArchiveUserDataMappingRequest
11572 urlParams_ gensupport.URLParams
11573 ctx_ context.Context
11574 header_ http.Header
11575 }
11576
11577 // Archive: Archives the specified User data mapping.
11578 //
11579 // - name: The resource name of the User data mapping to archive.
11580 func (r *ProjectsLocationsDatasetsConsentStoresUserDataMappingsService) Archive(name string, archiveuserdatamappingrequest *ArchiveUserDataMappingRequest) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsArchiveCall {
11581 c := &ProjectsLocationsDatasetsConsentStoresUserDataMappingsArchiveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11582 c.name = name
11583 c.archiveuserdatamappingrequest = archiveuserdatamappingrequest
11584 return c
11585 }
11586
11587 // Fields allows partial responses to be retrieved. See
11588 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11589 // details.
11590 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsArchiveCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsArchiveCall {
11591 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11592 return c
11593 }
11594
11595 // Context sets the context to be used in this call's Do method.
11596 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsArchiveCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsArchiveCall {
11597 c.ctx_ = ctx
11598 return c
11599 }
11600
11601 // Header returns a http.Header that can be modified by the caller to add
11602 // headers to the request.
11603 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsArchiveCall) Header() http.Header {
11604 if c.header_ == nil {
11605 c.header_ = make(http.Header)
11606 }
11607 return c.header_
11608 }
11609
11610 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsArchiveCall) doRequest(alt string) (*http.Response, error) {
11611 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11612 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.archiveuserdatamappingrequest)
11613 if err != nil {
11614 return nil, err
11615 }
11616 c.urlParams_.Set("alt", alt)
11617 c.urlParams_.Set("prettyPrint", "false")
11618 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:archive")
11619 urls += "?" + c.urlParams_.Encode()
11620 req, err := http.NewRequest("POST", urls, body)
11621 if err != nil {
11622 return nil, err
11623 }
11624 req.Header = reqHeaders
11625 googleapi.Expand(req.URL, map[string]string{
11626 "name": c.name,
11627 })
11628 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.userDataMappings.archive", "request", internallog.HTTPRequest(req, body.Bytes()))
11629 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11630 }
11631
11632 // Do executes the "healthcare.projects.locations.datasets.consentStores.userDataMappings.archive" call.
11633 // Any non-2xx status code is an error. Response headers are in either
11634 // *ArchiveUserDataMappingResponse.ServerResponse.Header or (if a response was
11635 // returned at all) in error.(*googleapi.Error).Header. Use
11636 // googleapi.IsNotModified to check whether the returned error was because
11637 // http.StatusNotModified was returned.
11638 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsArchiveCall) Do(opts ...googleapi.CallOption) (*ArchiveUserDataMappingResponse, error) {
11639 gensupport.SetOptions(c.urlParams_, opts...)
11640 res, err := c.doRequest("json")
11641 if res != nil && res.StatusCode == http.StatusNotModified {
11642 if res.Body != nil {
11643 res.Body.Close()
11644 }
11645 return nil, gensupport.WrapError(&googleapi.Error{
11646 Code: res.StatusCode,
11647 Header: res.Header,
11648 })
11649 }
11650 if err != nil {
11651 return nil, err
11652 }
11653 defer googleapi.CloseBody(res)
11654 if err := googleapi.CheckResponse(res); err != nil {
11655 return nil, gensupport.WrapError(err)
11656 }
11657 ret := &ArchiveUserDataMappingResponse{
11658 ServerResponse: googleapi.ServerResponse{
11659 Header: res.Header,
11660 HTTPStatusCode: res.StatusCode,
11661 },
11662 }
11663 target := &ret
11664 b, err := gensupport.DecodeResponseBytes(target, res)
11665 if err != nil {
11666 return nil, err
11667 }
11668 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.userDataMappings.archive", "response", internallog.HTTPResponse(res, b))
11669 return ret, nil
11670 }
11671
11672 type ProjectsLocationsDatasetsConsentStoresUserDataMappingsCreateCall struct {
11673 s *Service
11674 parent string
11675 userdatamapping *UserDataMapping
11676 urlParams_ gensupport.URLParams
11677 ctx_ context.Context
11678 header_ http.Header
11679 }
11680
11681 // Create: Creates a new User data mapping in the parent consent store.
11682 //
11683 // - parent: Name of the consent store.
11684 func (r *ProjectsLocationsDatasetsConsentStoresUserDataMappingsService) Create(parent string, userdatamapping *UserDataMapping) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsCreateCall {
11685 c := &ProjectsLocationsDatasetsConsentStoresUserDataMappingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11686 c.parent = parent
11687 c.userdatamapping = userdatamapping
11688 return c
11689 }
11690
11691 // Fields allows partial responses to be retrieved. See
11692 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11693 // details.
11694 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsCreateCall {
11695 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11696 return c
11697 }
11698
11699 // Context sets the context to be used in this call's Do method.
11700 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsCreateCall {
11701 c.ctx_ = ctx
11702 return c
11703 }
11704
11705 // Header returns a http.Header that can be modified by the caller to add
11706 // headers to the request.
11707 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsCreateCall) Header() http.Header {
11708 if c.header_ == nil {
11709 c.header_ = make(http.Header)
11710 }
11711 return c.header_
11712 }
11713
11714 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsCreateCall) doRequest(alt string) (*http.Response, error) {
11715 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11716 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.userdatamapping)
11717 if err != nil {
11718 return nil, err
11719 }
11720 c.urlParams_.Set("alt", alt)
11721 c.urlParams_.Set("prettyPrint", "false")
11722 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/userDataMappings")
11723 urls += "?" + c.urlParams_.Encode()
11724 req, err := http.NewRequest("POST", urls, body)
11725 if err != nil {
11726 return nil, err
11727 }
11728 req.Header = reqHeaders
11729 googleapi.Expand(req.URL, map[string]string{
11730 "parent": c.parent,
11731 })
11732 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.userDataMappings.create", "request", internallog.HTTPRequest(req, body.Bytes()))
11733 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11734 }
11735
11736 // Do executes the "healthcare.projects.locations.datasets.consentStores.userDataMappings.create" call.
11737 // Any non-2xx status code is an error. Response headers are in either
11738 // *UserDataMapping.ServerResponse.Header or (if a response was returned at
11739 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11740 // check whether the returned error was because http.StatusNotModified was
11741 // returned.
11742 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsCreateCall) Do(opts ...googleapi.CallOption) (*UserDataMapping, error) {
11743 gensupport.SetOptions(c.urlParams_, opts...)
11744 res, err := c.doRequest("json")
11745 if res != nil && res.StatusCode == http.StatusNotModified {
11746 if res.Body != nil {
11747 res.Body.Close()
11748 }
11749 return nil, gensupport.WrapError(&googleapi.Error{
11750 Code: res.StatusCode,
11751 Header: res.Header,
11752 })
11753 }
11754 if err != nil {
11755 return nil, err
11756 }
11757 defer googleapi.CloseBody(res)
11758 if err := googleapi.CheckResponse(res); err != nil {
11759 return nil, gensupport.WrapError(err)
11760 }
11761 ret := &UserDataMapping{
11762 ServerResponse: googleapi.ServerResponse{
11763 Header: res.Header,
11764 HTTPStatusCode: res.StatusCode,
11765 },
11766 }
11767 target := &ret
11768 b, err := gensupport.DecodeResponseBytes(target, res)
11769 if err != nil {
11770 return nil, err
11771 }
11772 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.userDataMappings.create", "response", internallog.HTTPResponse(res, b))
11773 return ret, nil
11774 }
11775
11776 type ProjectsLocationsDatasetsConsentStoresUserDataMappingsDeleteCall struct {
11777 s *Service
11778 name string
11779 urlParams_ gensupport.URLParams
11780 ctx_ context.Context
11781 header_ http.Header
11782 }
11783
11784 // Delete: Deletes the specified User data mapping.
11785 //
11786 // - name: The resource name of the User data mapping to delete.
11787 func (r *ProjectsLocationsDatasetsConsentStoresUserDataMappingsService) Delete(name string) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsDeleteCall {
11788 c := &ProjectsLocationsDatasetsConsentStoresUserDataMappingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11789 c.name = name
11790 return c
11791 }
11792
11793 // Fields allows partial responses to be retrieved. See
11794 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11795 // details.
11796 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsDeleteCall {
11797 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11798 return c
11799 }
11800
11801 // Context sets the context to be used in this call's Do method.
11802 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsDeleteCall {
11803 c.ctx_ = ctx
11804 return c
11805 }
11806
11807 // Header returns a http.Header that can be modified by the caller to add
11808 // headers to the request.
11809 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsDeleteCall) Header() http.Header {
11810 if c.header_ == nil {
11811 c.header_ = make(http.Header)
11812 }
11813 return c.header_
11814 }
11815
11816 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsDeleteCall) doRequest(alt string) (*http.Response, error) {
11817 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11818 c.urlParams_.Set("alt", alt)
11819 c.urlParams_.Set("prettyPrint", "false")
11820 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
11821 urls += "?" + c.urlParams_.Encode()
11822 req, err := http.NewRequest("DELETE", urls, nil)
11823 if err != nil {
11824 return nil, err
11825 }
11826 req.Header = reqHeaders
11827 googleapi.Expand(req.URL, map[string]string{
11828 "name": c.name,
11829 })
11830 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.userDataMappings.delete", "request", internallog.HTTPRequest(req, nil))
11831 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11832 }
11833
11834 // Do executes the "healthcare.projects.locations.datasets.consentStores.userDataMappings.delete" call.
11835 // Any non-2xx status code is an error. Response headers are in either
11836 // *Empty.ServerResponse.Header or (if a response was returned at all) in
11837 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11838 // whether the returned error was because http.StatusNotModified was returned.
11839 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
11840 gensupport.SetOptions(c.urlParams_, opts...)
11841 res, err := c.doRequest("json")
11842 if res != nil && res.StatusCode == http.StatusNotModified {
11843 if res.Body != nil {
11844 res.Body.Close()
11845 }
11846 return nil, gensupport.WrapError(&googleapi.Error{
11847 Code: res.StatusCode,
11848 Header: res.Header,
11849 })
11850 }
11851 if err != nil {
11852 return nil, err
11853 }
11854 defer googleapi.CloseBody(res)
11855 if err := googleapi.CheckResponse(res); err != nil {
11856 return nil, gensupport.WrapError(err)
11857 }
11858 ret := &Empty{
11859 ServerResponse: googleapi.ServerResponse{
11860 Header: res.Header,
11861 HTTPStatusCode: res.StatusCode,
11862 },
11863 }
11864 target := &ret
11865 b, err := gensupport.DecodeResponseBytes(target, res)
11866 if err != nil {
11867 return nil, err
11868 }
11869 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.userDataMappings.delete", "response", internallog.HTTPResponse(res, b))
11870 return ret, nil
11871 }
11872
11873 type ProjectsLocationsDatasetsConsentStoresUserDataMappingsGetCall struct {
11874 s *Service
11875 name string
11876 urlParams_ gensupport.URLParams
11877 ifNoneMatch_ string
11878 ctx_ context.Context
11879 header_ http.Header
11880 }
11881
11882 // Get: Gets the specified User data mapping.
11883 //
11884 // - name: The resource name of the User data mapping to retrieve.
11885 func (r *ProjectsLocationsDatasetsConsentStoresUserDataMappingsService) Get(name string) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsGetCall {
11886 c := &ProjectsLocationsDatasetsConsentStoresUserDataMappingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11887 c.name = name
11888 return c
11889 }
11890
11891 // Fields allows partial responses to be retrieved. See
11892 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11893 // details.
11894 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsGetCall {
11895 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11896 return c
11897 }
11898
11899 // IfNoneMatch sets an optional parameter which makes the operation fail if the
11900 // object's ETag matches the given value. This is useful for getting updates
11901 // only after the object has changed since the last request.
11902 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsGetCall {
11903 c.ifNoneMatch_ = entityTag
11904 return c
11905 }
11906
11907 // Context sets the context to be used in this call's Do method.
11908 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsGetCall {
11909 c.ctx_ = ctx
11910 return c
11911 }
11912
11913 // Header returns a http.Header that can be modified by the caller to add
11914 // headers to the request.
11915 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsGetCall) Header() http.Header {
11916 if c.header_ == nil {
11917 c.header_ = make(http.Header)
11918 }
11919 return c.header_
11920 }
11921
11922 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsGetCall) doRequest(alt string) (*http.Response, error) {
11923 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11924 if c.ifNoneMatch_ != "" {
11925 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11926 }
11927 c.urlParams_.Set("alt", alt)
11928 c.urlParams_.Set("prettyPrint", "false")
11929 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
11930 urls += "?" + c.urlParams_.Encode()
11931 req, err := http.NewRequest("GET", urls, nil)
11932 if err != nil {
11933 return nil, err
11934 }
11935 req.Header = reqHeaders
11936 googleapi.Expand(req.URL, map[string]string{
11937 "name": c.name,
11938 })
11939 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.userDataMappings.get", "request", internallog.HTTPRequest(req, nil))
11940 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11941 }
11942
11943 // Do executes the "healthcare.projects.locations.datasets.consentStores.userDataMappings.get" call.
11944 // Any non-2xx status code is an error. Response headers are in either
11945 // *UserDataMapping.ServerResponse.Header or (if a response was returned at
11946 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11947 // check whether the returned error was because http.StatusNotModified was
11948 // returned.
11949 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsGetCall) Do(opts ...googleapi.CallOption) (*UserDataMapping, error) {
11950 gensupport.SetOptions(c.urlParams_, opts...)
11951 res, err := c.doRequest("json")
11952 if res != nil && res.StatusCode == http.StatusNotModified {
11953 if res.Body != nil {
11954 res.Body.Close()
11955 }
11956 return nil, gensupport.WrapError(&googleapi.Error{
11957 Code: res.StatusCode,
11958 Header: res.Header,
11959 })
11960 }
11961 if err != nil {
11962 return nil, err
11963 }
11964 defer googleapi.CloseBody(res)
11965 if err := googleapi.CheckResponse(res); err != nil {
11966 return nil, gensupport.WrapError(err)
11967 }
11968 ret := &UserDataMapping{
11969 ServerResponse: googleapi.ServerResponse{
11970 Header: res.Header,
11971 HTTPStatusCode: res.StatusCode,
11972 },
11973 }
11974 target := &ret
11975 b, err := gensupport.DecodeResponseBytes(target, res)
11976 if err != nil {
11977 return nil, err
11978 }
11979 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.userDataMappings.get", "response", internallog.HTTPResponse(res, b))
11980 return ret, nil
11981 }
11982
11983 type ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall struct {
11984 s *Service
11985 parent string
11986 urlParams_ gensupport.URLParams
11987 ifNoneMatch_ string
11988 ctx_ context.Context
11989 header_ http.Header
11990 }
11991
11992 // List: Lists the User data mappings in the specified consent store.
11993 //
11994 // - parent: Name of the consent store to retrieve User data mappings from.
11995 func (r *ProjectsLocationsDatasetsConsentStoresUserDataMappingsService) List(parent string) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall {
11996 c := &ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11997 c.parent = parent
11998 return c
11999 }
12000
12001 // Filter sets the optional parameter "filter": Restricts the User data
12002 // mappings returned to those matching a filter. The following syntax is
12003 // available: * A string field value can be written as text inside quotation
12004 // marks, for example "query text". The only valid relational operation for
12005 // text fields is equality (`=`), where text is searched within the field,
12006 // rather than having the field be equal to the text. For example, "Comment =
12007 // great" returns messages with `great` in the comment field. * A number field
12008 // value can be written as an integer, a decimal, or an exponential. The valid
12009 // relational operators for number fields are the equality operator (`=`),
12010 // along with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note
12011 // that there is no inequality (`!=`) operator. You can prepend the `NOT`
12012 // operator to an expression to negate it. * A date field value must be written
12013 // in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format.
12014 // Leading zeros are required for one-digit months and days. The valid
12015 // relational operators for date fields are the equality operator (`=`) , along
12016 // with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that
12017 // there is no inequality (`!=`) operator. You can prepend the `NOT` operator
12018 // to an expression to negate it. * Multiple field query expressions can be
12019 // combined in one query by adding `AND` or `OR` operators between the
12020 // expressions. If a boolean operator appears within a quoted string, it is not
12021 // treated as special, it's just another part of the character string to be
12022 // matched. You can prepend the `NOT` operator to an expression to negate it.
12023 // The fields available for filtering are: - data_id - user_id. For example,
12024 // `filter=user_id=\"user123\". - archived - archive_time
12025 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall) Filter(filter string) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall {
12026 c.urlParams_.Set("filter", filter)
12027 return c
12028 }
12029
12030 // PageSize sets the optional parameter "pageSize": Limit on the number of User
12031 // data mappings to return in a single response. If not specified, 100 is used.
12032 // May not be larger than 1000.
12033 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall {
12034 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
12035 return c
12036 }
12037
12038 // PageToken sets the optional parameter "pageToken": Token to retrieve the
12039 // next page of results, or empty to get the first page.
12040 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall {
12041 c.urlParams_.Set("pageToken", pageToken)
12042 return c
12043 }
12044
12045 // Fields allows partial responses to be retrieved. See
12046 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12047 // details.
12048 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall {
12049 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12050 return c
12051 }
12052
12053 // IfNoneMatch sets an optional parameter which makes the operation fail if the
12054 // object's ETag matches the given value. This is useful for getting updates
12055 // only after the object has changed since the last request.
12056 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall {
12057 c.ifNoneMatch_ = entityTag
12058 return c
12059 }
12060
12061 // Context sets the context to be used in this call's Do method.
12062 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall {
12063 c.ctx_ = ctx
12064 return c
12065 }
12066
12067 // Header returns a http.Header that can be modified by the caller to add
12068 // headers to the request.
12069 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall) Header() http.Header {
12070 if c.header_ == nil {
12071 c.header_ = make(http.Header)
12072 }
12073 return c.header_
12074 }
12075
12076 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall) doRequest(alt string) (*http.Response, error) {
12077 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12078 if c.ifNoneMatch_ != "" {
12079 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12080 }
12081 c.urlParams_.Set("alt", alt)
12082 c.urlParams_.Set("prettyPrint", "false")
12083 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/userDataMappings")
12084 urls += "?" + c.urlParams_.Encode()
12085 req, err := http.NewRequest("GET", urls, nil)
12086 if err != nil {
12087 return nil, err
12088 }
12089 req.Header = reqHeaders
12090 googleapi.Expand(req.URL, map[string]string{
12091 "parent": c.parent,
12092 })
12093 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.userDataMappings.list", "request", internallog.HTTPRequest(req, nil))
12094 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12095 }
12096
12097 // Do executes the "healthcare.projects.locations.datasets.consentStores.userDataMappings.list" call.
12098 // Any non-2xx status code is an error. Response headers are in either
12099 // *ListUserDataMappingsResponse.ServerResponse.Header or (if a response was
12100 // returned at all) in error.(*googleapi.Error).Header. Use
12101 // googleapi.IsNotModified to check whether the returned error was because
12102 // http.StatusNotModified was returned.
12103 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall) Do(opts ...googleapi.CallOption) (*ListUserDataMappingsResponse, error) {
12104 gensupport.SetOptions(c.urlParams_, opts...)
12105 res, err := c.doRequest("json")
12106 if res != nil && res.StatusCode == http.StatusNotModified {
12107 if res.Body != nil {
12108 res.Body.Close()
12109 }
12110 return nil, gensupport.WrapError(&googleapi.Error{
12111 Code: res.StatusCode,
12112 Header: res.Header,
12113 })
12114 }
12115 if err != nil {
12116 return nil, err
12117 }
12118 defer googleapi.CloseBody(res)
12119 if err := googleapi.CheckResponse(res); err != nil {
12120 return nil, gensupport.WrapError(err)
12121 }
12122 ret := &ListUserDataMappingsResponse{
12123 ServerResponse: googleapi.ServerResponse{
12124 Header: res.Header,
12125 HTTPStatusCode: res.StatusCode,
12126 },
12127 }
12128 target := &ret
12129 b, err := gensupport.DecodeResponseBytes(target, res)
12130 if err != nil {
12131 return nil, err
12132 }
12133 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.userDataMappings.list", "response", internallog.HTTPResponse(res, b))
12134 return ret, nil
12135 }
12136
12137 // Pages invokes f for each page of results.
12138 // A non-nil error returned from f will halt the iteration.
12139 // The provided context supersedes any context provided to the Context method.
12140 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall) Pages(ctx context.Context, f func(*ListUserDataMappingsResponse) error) error {
12141 c.ctx_ = ctx
12142 defer c.PageToken(c.urlParams_.Get("pageToken"))
12143 for {
12144 x, err := c.Do()
12145 if err != nil {
12146 return err
12147 }
12148 if err := f(x); err != nil {
12149 return err
12150 }
12151 if x.NextPageToken == "" {
12152 return nil
12153 }
12154 c.PageToken(x.NextPageToken)
12155 }
12156 }
12157
12158 type ProjectsLocationsDatasetsConsentStoresUserDataMappingsPatchCall struct {
12159 s *Service
12160 name string
12161 userdatamapping *UserDataMapping
12162 urlParams_ gensupport.URLParams
12163 ctx_ context.Context
12164 header_ http.Header
12165 }
12166
12167 // Patch: Updates the specified User data mapping.
12168 //
12169 // - name: Resource name of the User data mapping, of the form
12170 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consen
12171 // tStores/{consent_store_id}/userDataMappings/{user_data_mapping_id}`.
12172 func (r *ProjectsLocationsDatasetsConsentStoresUserDataMappingsService) Patch(name string, userdatamapping *UserDataMapping) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsPatchCall {
12173 c := &ProjectsLocationsDatasetsConsentStoresUserDataMappingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12174 c.name = name
12175 c.userdatamapping = userdatamapping
12176 return c
12177 }
12178
12179 // UpdateMask sets the optional parameter "updateMask": Required. The update
12180 // mask that applies to the resource. For the `FieldMask` definition, see
12181 // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
12182 // Only the `data_id`, `user_id` and `resource_attributes` fields can be
12183 // updated.
12184 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsPatchCall {
12185 c.urlParams_.Set("updateMask", updateMask)
12186 return c
12187 }
12188
12189 // Fields allows partial responses to be retrieved. See
12190 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12191 // details.
12192 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsPatchCall {
12193 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12194 return c
12195 }
12196
12197 // Context sets the context to be used in this call's Do method.
12198 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsPatchCall {
12199 c.ctx_ = ctx
12200 return c
12201 }
12202
12203 // Header returns a http.Header that can be modified by the caller to add
12204 // headers to the request.
12205 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsPatchCall) Header() http.Header {
12206 if c.header_ == nil {
12207 c.header_ = make(http.Header)
12208 }
12209 return c.header_
12210 }
12211
12212 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsPatchCall) doRequest(alt string) (*http.Response, error) {
12213 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12214 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.userdatamapping)
12215 if err != nil {
12216 return nil, err
12217 }
12218 c.urlParams_.Set("alt", alt)
12219 c.urlParams_.Set("prettyPrint", "false")
12220 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
12221 urls += "?" + c.urlParams_.Encode()
12222 req, err := http.NewRequest("PATCH", urls, body)
12223 if err != nil {
12224 return nil, err
12225 }
12226 req.Header = reqHeaders
12227 googleapi.Expand(req.URL, map[string]string{
12228 "name": c.name,
12229 })
12230 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.userDataMappings.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
12231 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12232 }
12233
12234 // Do executes the "healthcare.projects.locations.datasets.consentStores.userDataMappings.patch" call.
12235 // Any non-2xx status code is an error. Response headers are in either
12236 // *UserDataMapping.ServerResponse.Header or (if a response was returned at
12237 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
12238 // check whether the returned error was because http.StatusNotModified was
12239 // returned.
12240 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsPatchCall) Do(opts ...googleapi.CallOption) (*UserDataMapping, error) {
12241 gensupport.SetOptions(c.urlParams_, opts...)
12242 res, err := c.doRequest("json")
12243 if res != nil && res.StatusCode == http.StatusNotModified {
12244 if res.Body != nil {
12245 res.Body.Close()
12246 }
12247 return nil, gensupport.WrapError(&googleapi.Error{
12248 Code: res.StatusCode,
12249 Header: res.Header,
12250 })
12251 }
12252 if err != nil {
12253 return nil, err
12254 }
12255 defer googleapi.CloseBody(res)
12256 if err := googleapi.CheckResponse(res); err != nil {
12257 return nil, gensupport.WrapError(err)
12258 }
12259 ret := &UserDataMapping{
12260 ServerResponse: googleapi.ServerResponse{
12261 Header: res.Header,
12262 HTTPStatusCode: res.StatusCode,
12263 },
12264 }
12265 target := &ret
12266 b, err := gensupport.DecodeResponseBytes(target, res)
12267 if err != nil {
12268 return nil, err
12269 }
12270 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.userDataMappings.patch", "response", internallog.HTTPResponse(res, b))
12271 return ret, nil
12272 }
12273
12274 type ProjectsLocationsDatasetsDataMapperWorkspacesGetIamPolicyCall struct {
12275 s *Service
12276 resource string
12277 urlParams_ gensupport.URLParams
12278 ifNoneMatch_ string
12279 ctx_ context.Context
12280 header_ http.Header
12281 }
12282
12283 // GetIamPolicy: Gets the access control policy for a resource. Returns an
12284 // empty policy if the resource exists and does not have a policy set.
12285 //
12286 // - resource: REQUIRED: The resource for which the policy is being requested.
12287 // See Resource names (https://cloud.google.com/apis/design/resource_names)
12288 // for the appropriate value for this field.
12289 func (r *ProjectsLocationsDatasetsDataMapperWorkspacesService) GetIamPolicy(resource string) *ProjectsLocationsDatasetsDataMapperWorkspacesGetIamPolicyCall {
12290 c := &ProjectsLocationsDatasetsDataMapperWorkspacesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12291 c.resource = resource
12292 return c
12293 }
12294
12295 // OptionsRequestedPolicyVersion sets the optional parameter
12296 // "options.requestedPolicyVersion": The maximum policy version that will be
12297 // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
12298 // an invalid value will be rejected. Requests for policies with any
12299 // conditional role bindings must specify version 3. Policies with no
12300 // conditional role bindings may specify any valid value or leave the field
12301 // unset. The policy in the response might use the policy version that you
12302 // specified, or it might use a lower policy version. For example, if you
12303 // specify version 3, but the policy has no conditional role bindings, the
12304 // response uses version 1. To learn which resources support conditions in
12305 // their IAM policies, see the IAM documentation
12306 // (https://cloud.google.com/iam/help/conditions/resource-policies).
12307 func (c *ProjectsLocationsDatasetsDataMapperWorkspacesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDatasetsDataMapperWorkspacesGetIamPolicyCall {
12308 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
12309 return c
12310 }
12311
12312 // Fields allows partial responses to be retrieved. See
12313 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12314 // details.
12315 func (c *ProjectsLocationsDatasetsDataMapperWorkspacesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataMapperWorkspacesGetIamPolicyCall {
12316 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12317 return c
12318 }
12319
12320 // IfNoneMatch sets an optional parameter which makes the operation fail if the
12321 // object's ETag matches the given value. This is useful for getting updates
12322 // only after the object has changed since the last request.
12323 func (c *ProjectsLocationsDatasetsDataMapperWorkspacesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDataMapperWorkspacesGetIamPolicyCall {
12324 c.ifNoneMatch_ = entityTag
12325 return c
12326 }
12327
12328 // Context sets the context to be used in this call's Do method.
12329 func (c *ProjectsLocationsDatasetsDataMapperWorkspacesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataMapperWorkspacesGetIamPolicyCall {
12330 c.ctx_ = ctx
12331 return c
12332 }
12333
12334 // Header returns a http.Header that can be modified by the caller to add
12335 // headers to the request.
12336 func (c *ProjectsLocationsDatasetsDataMapperWorkspacesGetIamPolicyCall) Header() http.Header {
12337 if c.header_ == nil {
12338 c.header_ = make(http.Header)
12339 }
12340 return c.header_
12341 }
12342
12343 func (c *ProjectsLocationsDatasetsDataMapperWorkspacesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
12344 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12345 if c.ifNoneMatch_ != "" {
12346 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12347 }
12348 c.urlParams_.Set("alt", alt)
12349 c.urlParams_.Set("prettyPrint", "false")
12350 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
12351 urls += "?" + c.urlParams_.Encode()
12352 req, err := http.NewRequest("GET", urls, nil)
12353 if err != nil {
12354 return nil, err
12355 }
12356 req.Header = reqHeaders
12357 googleapi.Expand(req.URL, map[string]string{
12358 "resource": c.resource,
12359 })
12360 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dataMapperWorkspaces.getIamPolicy", "request", internallog.HTTPRequest(req, nil))
12361 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12362 }
12363
12364 // Do executes the "healthcare.projects.locations.datasets.dataMapperWorkspaces.getIamPolicy" call.
12365 // Any non-2xx status code is an error. Response headers are in either
12366 // *Policy.ServerResponse.Header or (if a response was returned at all) in
12367 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12368 // whether the returned error was because http.StatusNotModified was returned.
12369 func (c *ProjectsLocationsDatasetsDataMapperWorkspacesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
12370 gensupport.SetOptions(c.urlParams_, opts...)
12371 res, err := c.doRequest("json")
12372 if res != nil && res.StatusCode == http.StatusNotModified {
12373 if res.Body != nil {
12374 res.Body.Close()
12375 }
12376 return nil, gensupport.WrapError(&googleapi.Error{
12377 Code: res.StatusCode,
12378 Header: res.Header,
12379 })
12380 }
12381 if err != nil {
12382 return nil, err
12383 }
12384 defer googleapi.CloseBody(res)
12385 if err := googleapi.CheckResponse(res); err != nil {
12386 return nil, gensupport.WrapError(err)
12387 }
12388 ret := &Policy{
12389 ServerResponse: googleapi.ServerResponse{
12390 Header: res.Header,
12391 HTTPStatusCode: res.StatusCode,
12392 },
12393 }
12394 target := &ret
12395 b, err := gensupport.DecodeResponseBytes(target, res)
12396 if err != nil {
12397 return nil, err
12398 }
12399 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dataMapperWorkspaces.getIamPolicy", "response", internallog.HTTPResponse(res, b))
12400 return ret, nil
12401 }
12402
12403 type ProjectsLocationsDatasetsDataMapperWorkspacesSetIamPolicyCall struct {
12404 s *Service
12405 resource string
12406 setiampolicyrequest *SetIamPolicyRequest
12407 urlParams_ gensupport.URLParams
12408 ctx_ context.Context
12409 header_ http.Header
12410 }
12411
12412 // SetIamPolicy: Sets the access control policy on the specified resource.
12413 // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
12414 // and `PERMISSION_DENIED` errors.
12415 //
12416 // - resource: REQUIRED: The resource for which the policy is being specified.
12417 // See Resource names (https://cloud.google.com/apis/design/resource_names)
12418 // for the appropriate value for this field.
12419 func (r *ProjectsLocationsDatasetsDataMapperWorkspacesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsDataMapperWorkspacesSetIamPolicyCall {
12420 c := &ProjectsLocationsDatasetsDataMapperWorkspacesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12421 c.resource = resource
12422 c.setiampolicyrequest = setiampolicyrequest
12423 return c
12424 }
12425
12426 // Fields allows partial responses to be retrieved. See
12427 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12428 // details.
12429 func (c *ProjectsLocationsDatasetsDataMapperWorkspacesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataMapperWorkspacesSetIamPolicyCall {
12430 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12431 return c
12432 }
12433
12434 // Context sets the context to be used in this call's Do method.
12435 func (c *ProjectsLocationsDatasetsDataMapperWorkspacesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataMapperWorkspacesSetIamPolicyCall {
12436 c.ctx_ = ctx
12437 return c
12438 }
12439
12440 // Header returns a http.Header that can be modified by the caller to add
12441 // headers to the request.
12442 func (c *ProjectsLocationsDatasetsDataMapperWorkspacesSetIamPolicyCall) Header() http.Header {
12443 if c.header_ == nil {
12444 c.header_ = make(http.Header)
12445 }
12446 return c.header_
12447 }
12448
12449 func (c *ProjectsLocationsDatasetsDataMapperWorkspacesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
12450 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12451 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest)
12452 if err != nil {
12453 return nil, err
12454 }
12455 c.urlParams_.Set("alt", alt)
12456 c.urlParams_.Set("prettyPrint", "false")
12457 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
12458 urls += "?" + c.urlParams_.Encode()
12459 req, err := http.NewRequest("POST", urls, body)
12460 if err != nil {
12461 return nil, err
12462 }
12463 req.Header = reqHeaders
12464 googleapi.Expand(req.URL, map[string]string{
12465 "resource": c.resource,
12466 })
12467 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dataMapperWorkspaces.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes()))
12468 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12469 }
12470
12471 // Do executes the "healthcare.projects.locations.datasets.dataMapperWorkspaces.setIamPolicy" call.
12472 // Any non-2xx status code is an error. Response headers are in either
12473 // *Policy.ServerResponse.Header or (if a response was returned at all) in
12474 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12475 // whether the returned error was because http.StatusNotModified was returned.
12476 func (c *ProjectsLocationsDatasetsDataMapperWorkspacesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
12477 gensupport.SetOptions(c.urlParams_, opts...)
12478 res, err := c.doRequest("json")
12479 if res != nil && res.StatusCode == http.StatusNotModified {
12480 if res.Body != nil {
12481 res.Body.Close()
12482 }
12483 return nil, gensupport.WrapError(&googleapi.Error{
12484 Code: res.StatusCode,
12485 Header: res.Header,
12486 })
12487 }
12488 if err != nil {
12489 return nil, err
12490 }
12491 defer googleapi.CloseBody(res)
12492 if err := googleapi.CheckResponse(res); err != nil {
12493 return nil, gensupport.WrapError(err)
12494 }
12495 ret := &Policy{
12496 ServerResponse: googleapi.ServerResponse{
12497 Header: res.Header,
12498 HTTPStatusCode: res.StatusCode,
12499 },
12500 }
12501 target := &ret
12502 b, err := gensupport.DecodeResponseBytes(target, res)
12503 if err != nil {
12504 return nil, err
12505 }
12506 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dataMapperWorkspaces.setIamPolicy", "response", internallog.HTTPResponse(res, b))
12507 return ret, nil
12508 }
12509
12510 type ProjectsLocationsDatasetsDataMapperWorkspacesTestIamPermissionsCall struct {
12511 s *Service
12512 resource string
12513 testiampermissionsrequest *TestIamPermissionsRequest
12514 urlParams_ gensupport.URLParams
12515 ctx_ context.Context
12516 header_ http.Header
12517 }
12518
12519 // TestIamPermissions: Returns permissions that a caller has on the specified
12520 // resource. If the resource does not exist, this will return an empty set of
12521 // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
12522 // used for building permission-aware UIs and command-line tools, not for
12523 // authorization checking. This operation may "fail open" without warning.
12524 //
12525 // - resource: REQUIRED: The resource for which the policy detail is being
12526 // requested. See Resource names
12527 // (https://cloud.google.com/apis/design/resource_names) for the appropriate
12528 // value for this field.
12529 func (r *ProjectsLocationsDatasetsDataMapperWorkspacesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsDataMapperWorkspacesTestIamPermissionsCall {
12530 c := &ProjectsLocationsDatasetsDataMapperWorkspacesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12531 c.resource = resource
12532 c.testiampermissionsrequest = testiampermissionsrequest
12533 return c
12534 }
12535
12536 // Fields allows partial responses to be retrieved. See
12537 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12538 // details.
12539 func (c *ProjectsLocationsDatasetsDataMapperWorkspacesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataMapperWorkspacesTestIamPermissionsCall {
12540 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12541 return c
12542 }
12543
12544 // Context sets the context to be used in this call's Do method.
12545 func (c *ProjectsLocationsDatasetsDataMapperWorkspacesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataMapperWorkspacesTestIamPermissionsCall {
12546 c.ctx_ = ctx
12547 return c
12548 }
12549
12550 // Header returns a http.Header that can be modified by the caller to add
12551 // headers to the request.
12552 func (c *ProjectsLocationsDatasetsDataMapperWorkspacesTestIamPermissionsCall) Header() http.Header {
12553 if c.header_ == nil {
12554 c.header_ = make(http.Header)
12555 }
12556 return c.header_
12557 }
12558
12559 func (c *ProjectsLocationsDatasetsDataMapperWorkspacesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
12560 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12561 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest)
12562 if err != nil {
12563 return nil, err
12564 }
12565 c.urlParams_.Set("alt", alt)
12566 c.urlParams_.Set("prettyPrint", "false")
12567 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
12568 urls += "?" + c.urlParams_.Encode()
12569 req, err := http.NewRequest("POST", urls, body)
12570 if err != nil {
12571 return nil, err
12572 }
12573 req.Header = reqHeaders
12574 googleapi.Expand(req.URL, map[string]string{
12575 "resource": c.resource,
12576 })
12577 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dataMapperWorkspaces.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes()))
12578 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12579 }
12580
12581 // Do executes the "healthcare.projects.locations.datasets.dataMapperWorkspaces.testIamPermissions" call.
12582 // Any non-2xx status code is an error. Response headers are in either
12583 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
12584 // returned at all) in error.(*googleapi.Error).Header. Use
12585 // googleapi.IsNotModified to check whether the returned error was because
12586 // http.StatusNotModified was returned.
12587 func (c *ProjectsLocationsDatasetsDataMapperWorkspacesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
12588 gensupport.SetOptions(c.urlParams_, opts...)
12589 res, err := c.doRequest("json")
12590 if res != nil && res.StatusCode == http.StatusNotModified {
12591 if res.Body != nil {
12592 res.Body.Close()
12593 }
12594 return nil, gensupport.WrapError(&googleapi.Error{
12595 Code: res.StatusCode,
12596 Header: res.Header,
12597 })
12598 }
12599 if err != nil {
12600 return nil, err
12601 }
12602 defer googleapi.CloseBody(res)
12603 if err := googleapi.CheckResponse(res); err != nil {
12604 return nil, gensupport.WrapError(err)
12605 }
12606 ret := &TestIamPermissionsResponse{
12607 ServerResponse: googleapi.ServerResponse{
12608 Header: res.Header,
12609 HTTPStatusCode: res.StatusCode,
12610 },
12611 }
12612 target := &ret
12613 b, err := gensupport.DecodeResponseBytes(target, res)
12614 if err != nil {
12615 return nil, err
12616 }
12617 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dataMapperWorkspaces.testIamPermissions", "response", internallog.HTTPResponse(res, b))
12618 return ret, nil
12619 }
12620
12621 type ProjectsLocationsDatasetsDicomStoresCreateCall struct {
12622 s *Service
12623 parent string
12624 dicomstore *DicomStore
12625 urlParams_ gensupport.URLParams
12626 ctx_ context.Context
12627 header_ http.Header
12628 }
12629
12630 // Create: Creates a new DICOM store within the parent dataset.
12631 //
12632 // - parent: The name of the dataset this DICOM store belongs to.
12633 func (r *ProjectsLocationsDatasetsDicomStoresService) Create(parent string, dicomstore *DicomStore) *ProjectsLocationsDatasetsDicomStoresCreateCall {
12634 c := &ProjectsLocationsDatasetsDicomStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12635 c.parent = parent
12636 c.dicomstore = dicomstore
12637 return c
12638 }
12639
12640 // DicomStoreId sets the optional parameter "dicomStoreId": Required. The ID of
12641 // the DICOM store that is being created. Any string value up to 256 characters
12642 // in length.
12643 func (c *ProjectsLocationsDatasetsDicomStoresCreateCall) DicomStoreId(dicomStoreId string) *ProjectsLocationsDatasetsDicomStoresCreateCall {
12644 c.urlParams_.Set("dicomStoreId", dicomStoreId)
12645 return c
12646 }
12647
12648 // Fields allows partial responses to be retrieved. See
12649 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12650 // details.
12651 func (c *ProjectsLocationsDatasetsDicomStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresCreateCall {
12652 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12653 return c
12654 }
12655
12656 // Context sets the context to be used in this call's Do method.
12657 func (c *ProjectsLocationsDatasetsDicomStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresCreateCall {
12658 c.ctx_ = ctx
12659 return c
12660 }
12661
12662 // Header returns a http.Header that can be modified by the caller to add
12663 // headers to the request.
12664 func (c *ProjectsLocationsDatasetsDicomStoresCreateCall) Header() http.Header {
12665 if c.header_ == nil {
12666 c.header_ = make(http.Header)
12667 }
12668 return c.header_
12669 }
12670
12671 func (c *ProjectsLocationsDatasetsDicomStoresCreateCall) doRequest(alt string) (*http.Response, error) {
12672 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12673 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.dicomstore)
12674 if err != nil {
12675 return nil, err
12676 }
12677 c.urlParams_.Set("alt", alt)
12678 c.urlParams_.Set("prettyPrint", "false")
12679 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomStores")
12680 urls += "?" + c.urlParams_.Encode()
12681 req, err := http.NewRequest("POST", urls, body)
12682 if err != nil {
12683 return nil, err
12684 }
12685 req.Header = reqHeaders
12686 googleapi.Expand(req.URL, map[string]string{
12687 "parent": c.parent,
12688 })
12689 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.create", "request", internallog.HTTPRequest(req, body.Bytes()))
12690 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12691 }
12692
12693 // Do executes the "healthcare.projects.locations.datasets.dicomStores.create" call.
12694 // Any non-2xx status code is an error. Response headers are in either
12695 // *DicomStore.ServerResponse.Header or (if a response was returned at all) in
12696 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12697 // whether the returned error was because http.StatusNotModified was returned.
12698 func (c *ProjectsLocationsDatasetsDicomStoresCreateCall) Do(opts ...googleapi.CallOption) (*DicomStore, error) {
12699 gensupport.SetOptions(c.urlParams_, opts...)
12700 res, err := c.doRequest("json")
12701 if res != nil && res.StatusCode == http.StatusNotModified {
12702 if res.Body != nil {
12703 res.Body.Close()
12704 }
12705 return nil, gensupport.WrapError(&googleapi.Error{
12706 Code: res.StatusCode,
12707 Header: res.Header,
12708 })
12709 }
12710 if err != nil {
12711 return nil, err
12712 }
12713 defer googleapi.CloseBody(res)
12714 if err := googleapi.CheckResponse(res); err != nil {
12715 return nil, gensupport.WrapError(err)
12716 }
12717 ret := &DicomStore{
12718 ServerResponse: googleapi.ServerResponse{
12719 Header: res.Header,
12720 HTTPStatusCode: res.StatusCode,
12721 },
12722 }
12723 target := &ret
12724 b, err := gensupport.DecodeResponseBytes(target, res)
12725 if err != nil {
12726 return nil, err
12727 }
12728 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.create", "response", internallog.HTTPResponse(res, b))
12729 return ret, nil
12730 }
12731
12732 type ProjectsLocationsDatasetsDicomStoresDeidentifyCall struct {
12733 s *Service
12734 sourceStore string
12735 deidentifydicomstorerequest *DeidentifyDicomStoreRequest
12736 urlParams_ gensupport.URLParams
12737 ctx_ context.Context
12738 header_ http.Header
12739 }
12740
12741 // Deidentify: De-identifies data from the source store and writes it to the
12742 // destination store. The metadata field type is OperationMetadata. If the
12743 // request is successful, the response field type is
12744 // DeidentifyDicomStoreSummary. If errors occur, error is set. The LRO result
12745 // may still be successful if de-identification fails for some DICOM instances.
12746 // The output DICOM store will not contain these failed resources. Failed
12747 // resource totals are tracked in Operation.metadata. Error details are also
12748 // logged to Cloud Logging (see Viewing error logs in Cloud Logging
12749 // (https://cloud.google.com/healthcare/docs/how-tos/logging)).
12750 //
12751 // - sourceStore: Source DICOM store resource name. For example,
12752 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
12753 // tores/{dicom_store_id}`.
12754 func (r *ProjectsLocationsDatasetsDicomStoresService) Deidentify(sourceStore string, deidentifydicomstorerequest *DeidentifyDicomStoreRequest) *ProjectsLocationsDatasetsDicomStoresDeidentifyCall {
12755 c := &ProjectsLocationsDatasetsDicomStoresDeidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12756 c.sourceStore = sourceStore
12757 c.deidentifydicomstorerequest = deidentifydicomstorerequest
12758 return c
12759 }
12760
12761 // Fields allows partial responses to be retrieved. See
12762 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12763 // details.
12764 func (c *ProjectsLocationsDatasetsDicomStoresDeidentifyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDeidentifyCall {
12765 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12766 return c
12767 }
12768
12769 // Context sets the context to be used in this call's Do method.
12770 func (c *ProjectsLocationsDatasetsDicomStoresDeidentifyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDeidentifyCall {
12771 c.ctx_ = ctx
12772 return c
12773 }
12774
12775 // Header returns a http.Header that can be modified by the caller to add
12776 // headers to the request.
12777 func (c *ProjectsLocationsDatasetsDicomStoresDeidentifyCall) Header() http.Header {
12778 if c.header_ == nil {
12779 c.header_ = make(http.Header)
12780 }
12781 return c.header_
12782 }
12783
12784 func (c *ProjectsLocationsDatasetsDicomStoresDeidentifyCall) doRequest(alt string) (*http.Response, error) {
12785 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12786 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.deidentifydicomstorerequest)
12787 if err != nil {
12788 return nil, err
12789 }
12790 c.urlParams_.Set("alt", alt)
12791 c.urlParams_.Set("prettyPrint", "false")
12792 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+sourceStore}:deidentify")
12793 urls += "?" + c.urlParams_.Encode()
12794 req, err := http.NewRequest("POST", urls, body)
12795 if err != nil {
12796 return nil, err
12797 }
12798 req.Header = reqHeaders
12799 googleapi.Expand(req.URL, map[string]string{
12800 "sourceStore": c.sourceStore,
12801 })
12802 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.deidentify", "request", internallog.HTTPRequest(req, body.Bytes()))
12803 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12804 }
12805
12806 // Do executes the "healthcare.projects.locations.datasets.dicomStores.deidentify" call.
12807 // Any non-2xx status code is an error. Response headers are in either
12808 // *Operation.ServerResponse.Header or (if a response was returned at all) in
12809 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12810 // whether the returned error was because http.StatusNotModified was returned.
12811 func (c *ProjectsLocationsDatasetsDicomStoresDeidentifyCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12812 gensupport.SetOptions(c.urlParams_, opts...)
12813 res, err := c.doRequest("json")
12814 if res != nil && res.StatusCode == http.StatusNotModified {
12815 if res.Body != nil {
12816 res.Body.Close()
12817 }
12818 return nil, gensupport.WrapError(&googleapi.Error{
12819 Code: res.StatusCode,
12820 Header: res.Header,
12821 })
12822 }
12823 if err != nil {
12824 return nil, err
12825 }
12826 defer googleapi.CloseBody(res)
12827 if err := googleapi.CheckResponse(res); err != nil {
12828 return nil, gensupport.WrapError(err)
12829 }
12830 ret := &Operation{
12831 ServerResponse: googleapi.ServerResponse{
12832 Header: res.Header,
12833 HTTPStatusCode: res.StatusCode,
12834 },
12835 }
12836 target := &ret
12837 b, err := gensupport.DecodeResponseBytes(target, res)
12838 if err != nil {
12839 return nil, err
12840 }
12841 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.deidentify", "response", internallog.HTTPResponse(res, b))
12842 return ret, nil
12843 }
12844
12845 type ProjectsLocationsDatasetsDicomStoresDeleteCall struct {
12846 s *Service
12847 name string
12848 urlParams_ gensupport.URLParams
12849 ctx_ context.Context
12850 header_ http.Header
12851 }
12852
12853 // Delete: Deletes the specified DICOM store and removes all images that are
12854 // contained within it.
12855 //
12856 // - name: The resource name of the DICOM store to delete.
12857 func (r *ProjectsLocationsDatasetsDicomStoresService) Delete(name string) *ProjectsLocationsDatasetsDicomStoresDeleteCall {
12858 c := &ProjectsLocationsDatasetsDicomStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12859 c.name = name
12860 return c
12861 }
12862
12863 // Fields allows partial responses to be retrieved. See
12864 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12865 // details.
12866 func (c *ProjectsLocationsDatasetsDicomStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDeleteCall {
12867 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12868 return c
12869 }
12870
12871 // Context sets the context to be used in this call's Do method.
12872 func (c *ProjectsLocationsDatasetsDicomStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDeleteCall {
12873 c.ctx_ = ctx
12874 return c
12875 }
12876
12877 // Header returns a http.Header that can be modified by the caller to add
12878 // headers to the request.
12879 func (c *ProjectsLocationsDatasetsDicomStoresDeleteCall) Header() http.Header {
12880 if c.header_ == nil {
12881 c.header_ = make(http.Header)
12882 }
12883 return c.header_
12884 }
12885
12886 func (c *ProjectsLocationsDatasetsDicomStoresDeleteCall) doRequest(alt string) (*http.Response, error) {
12887 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12888 c.urlParams_.Set("alt", alt)
12889 c.urlParams_.Set("prettyPrint", "false")
12890 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
12891 urls += "?" + c.urlParams_.Encode()
12892 req, err := http.NewRequest("DELETE", urls, nil)
12893 if err != nil {
12894 return nil, err
12895 }
12896 req.Header = reqHeaders
12897 googleapi.Expand(req.URL, map[string]string{
12898 "name": c.name,
12899 })
12900 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.delete", "request", internallog.HTTPRequest(req, nil))
12901 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12902 }
12903
12904 // Do executes the "healthcare.projects.locations.datasets.dicomStores.delete" call.
12905 // Any non-2xx status code is an error. Response headers are in either
12906 // *Empty.ServerResponse.Header or (if a response was returned at all) in
12907 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12908 // whether the returned error was because http.StatusNotModified was returned.
12909 func (c *ProjectsLocationsDatasetsDicomStoresDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
12910 gensupport.SetOptions(c.urlParams_, opts...)
12911 res, err := c.doRequest("json")
12912 if res != nil && res.StatusCode == http.StatusNotModified {
12913 if res.Body != nil {
12914 res.Body.Close()
12915 }
12916 return nil, gensupport.WrapError(&googleapi.Error{
12917 Code: res.StatusCode,
12918 Header: res.Header,
12919 })
12920 }
12921 if err != nil {
12922 return nil, err
12923 }
12924 defer googleapi.CloseBody(res)
12925 if err := googleapi.CheckResponse(res); err != nil {
12926 return nil, gensupport.WrapError(err)
12927 }
12928 ret := &Empty{
12929 ServerResponse: googleapi.ServerResponse{
12930 Header: res.Header,
12931 HTTPStatusCode: res.StatusCode,
12932 },
12933 }
12934 target := &ret
12935 b, err := gensupport.DecodeResponseBytes(target, res)
12936 if err != nil {
12937 return nil, err
12938 }
12939 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.delete", "response", internallog.HTTPResponse(res, b))
12940 return ret, nil
12941 }
12942
12943 type ProjectsLocationsDatasetsDicomStoresExportCall struct {
12944 s *Service
12945 name string
12946 exportdicomdatarequest *ExportDicomDataRequest
12947 urlParams_ gensupport.URLParams
12948 ctx_ context.Context
12949 header_ http.Header
12950 }
12951
12952 // Export: Exports data to the specified destination by copying it from the
12953 // DICOM store. Errors are also logged to Cloud Logging. For more information,
12954 // see Viewing error logs in Cloud Logging
12955 // (https://cloud.google.com/healthcare/docs/how-tos/logging). The metadata
12956 // field type is OperationMetadata.
12957 //
12958 // - name: The DICOM store resource name from which to export the data. For
12959 // example,
12960 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
12961 // tores/{dicom_store_id}`.
12962 func (r *ProjectsLocationsDatasetsDicomStoresService) Export(name string, exportdicomdatarequest *ExportDicomDataRequest) *ProjectsLocationsDatasetsDicomStoresExportCall {
12963 c := &ProjectsLocationsDatasetsDicomStoresExportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12964 c.name = name
12965 c.exportdicomdatarequest = exportdicomdatarequest
12966 return c
12967 }
12968
12969 // Fields allows partial responses to be retrieved. See
12970 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12971 // details.
12972 func (c *ProjectsLocationsDatasetsDicomStoresExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresExportCall {
12973 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12974 return c
12975 }
12976
12977 // Context sets the context to be used in this call's Do method.
12978 func (c *ProjectsLocationsDatasetsDicomStoresExportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresExportCall {
12979 c.ctx_ = ctx
12980 return c
12981 }
12982
12983 // Header returns a http.Header that can be modified by the caller to add
12984 // headers to the request.
12985 func (c *ProjectsLocationsDatasetsDicomStoresExportCall) Header() http.Header {
12986 if c.header_ == nil {
12987 c.header_ = make(http.Header)
12988 }
12989 return c.header_
12990 }
12991
12992 func (c *ProjectsLocationsDatasetsDicomStoresExportCall) doRequest(alt string) (*http.Response, error) {
12993 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12994 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.exportdicomdatarequest)
12995 if err != nil {
12996 return nil, err
12997 }
12998 c.urlParams_.Set("alt", alt)
12999 c.urlParams_.Set("prettyPrint", "false")
13000 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:export")
13001 urls += "?" + c.urlParams_.Encode()
13002 req, err := http.NewRequest("POST", urls, body)
13003 if err != nil {
13004 return nil, err
13005 }
13006 req.Header = reqHeaders
13007 googleapi.Expand(req.URL, map[string]string{
13008 "name": c.name,
13009 })
13010 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.export", "request", internallog.HTTPRequest(req, body.Bytes()))
13011 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13012 }
13013
13014 // Do executes the "healthcare.projects.locations.datasets.dicomStores.export" call.
13015 // Any non-2xx status code is an error. Response headers are in either
13016 // *Operation.ServerResponse.Header or (if a response was returned at all) in
13017 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13018 // whether the returned error was because http.StatusNotModified was returned.
13019 func (c *ProjectsLocationsDatasetsDicomStoresExportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
13020 gensupport.SetOptions(c.urlParams_, opts...)
13021 res, err := c.doRequest("json")
13022 if res != nil && res.StatusCode == http.StatusNotModified {
13023 if res.Body != nil {
13024 res.Body.Close()
13025 }
13026 return nil, gensupport.WrapError(&googleapi.Error{
13027 Code: res.StatusCode,
13028 Header: res.Header,
13029 })
13030 }
13031 if err != nil {
13032 return nil, err
13033 }
13034 defer googleapi.CloseBody(res)
13035 if err := googleapi.CheckResponse(res); err != nil {
13036 return nil, gensupport.WrapError(err)
13037 }
13038 ret := &Operation{
13039 ServerResponse: googleapi.ServerResponse{
13040 Header: res.Header,
13041 HTTPStatusCode: res.StatusCode,
13042 },
13043 }
13044 target := &ret
13045 b, err := gensupport.DecodeResponseBytes(target, res)
13046 if err != nil {
13047 return nil, err
13048 }
13049 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.export", "response", internallog.HTTPResponse(res, b))
13050 return ret, nil
13051 }
13052
13053 type ProjectsLocationsDatasetsDicomStoresGetCall struct {
13054 s *Service
13055 name string
13056 urlParams_ gensupport.URLParams
13057 ifNoneMatch_ string
13058 ctx_ context.Context
13059 header_ http.Header
13060 }
13061
13062 // Get: Gets the specified DICOM store.
13063 //
13064 // - name: The resource name of the DICOM store to get.
13065 func (r *ProjectsLocationsDatasetsDicomStoresService) Get(name string) *ProjectsLocationsDatasetsDicomStoresGetCall {
13066 c := &ProjectsLocationsDatasetsDicomStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13067 c.name = name
13068 return c
13069 }
13070
13071 // Fields allows partial responses to be retrieved. See
13072 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13073 // details.
13074 func (c *ProjectsLocationsDatasetsDicomStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresGetCall {
13075 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13076 return c
13077 }
13078
13079 // IfNoneMatch sets an optional parameter which makes the operation fail if the
13080 // object's ETag matches the given value. This is useful for getting updates
13081 // only after the object has changed since the last request.
13082 func (c *ProjectsLocationsDatasetsDicomStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresGetCall {
13083 c.ifNoneMatch_ = entityTag
13084 return c
13085 }
13086
13087 // Context sets the context to be used in this call's Do method.
13088 func (c *ProjectsLocationsDatasetsDicomStoresGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresGetCall {
13089 c.ctx_ = ctx
13090 return c
13091 }
13092
13093 // Header returns a http.Header that can be modified by the caller to add
13094 // headers to the request.
13095 func (c *ProjectsLocationsDatasetsDicomStoresGetCall) Header() http.Header {
13096 if c.header_ == nil {
13097 c.header_ = make(http.Header)
13098 }
13099 return c.header_
13100 }
13101
13102 func (c *ProjectsLocationsDatasetsDicomStoresGetCall) doRequest(alt string) (*http.Response, error) {
13103 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13104 if c.ifNoneMatch_ != "" {
13105 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13106 }
13107 c.urlParams_.Set("alt", alt)
13108 c.urlParams_.Set("prettyPrint", "false")
13109 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
13110 urls += "?" + c.urlParams_.Encode()
13111 req, err := http.NewRequest("GET", urls, nil)
13112 if err != nil {
13113 return nil, err
13114 }
13115 req.Header = reqHeaders
13116 googleapi.Expand(req.URL, map[string]string{
13117 "name": c.name,
13118 })
13119 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.get", "request", internallog.HTTPRequest(req, nil))
13120 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13121 }
13122
13123 // Do executes the "healthcare.projects.locations.datasets.dicomStores.get" call.
13124 // Any non-2xx status code is an error. Response headers are in either
13125 // *DicomStore.ServerResponse.Header or (if a response was returned at all) in
13126 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13127 // whether the returned error was because http.StatusNotModified was returned.
13128 func (c *ProjectsLocationsDatasetsDicomStoresGetCall) Do(opts ...googleapi.CallOption) (*DicomStore, error) {
13129 gensupport.SetOptions(c.urlParams_, opts...)
13130 res, err := c.doRequest("json")
13131 if res != nil && res.StatusCode == http.StatusNotModified {
13132 if res.Body != nil {
13133 res.Body.Close()
13134 }
13135 return nil, gensupport.WrapError(&googleapi.Error{
13136 Code: res.StatusCode,
13137 Header: res.Header,
13138 })
13139 }
13140 if err != nil {
13141 return nil, err
13142 }
13143 defer googleapi.CloseBody(res)
13144 if err := googleapi.CheckResponse(res); err != nil {
13145 return nil, gensupport.WrapError(err)
13146 }
13147 ret := &DicomStore{
13148 ServerResponse: googleapi.ServerResponse{
13149 Header: res.Header,
13150 HTTPStatusCode: res.StatusCode,
13151 },
13152 }
13153 target := &ret
13154 b, err := gensupport.DecodeResponseBytes(target, res)
13155 if err != nil {
13156 return nil, err
13157 }
13158 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.get", "response", internallog.HTTPResponse(res, b))
13159 return ret, nil
13160 }
13161
13162 type ProjectsLocationsDatasetsDicomStoresGetDICOMStoreMetricsCall struct {
13163 s *Service
13164 name string
13165 urlParams_ gensupport.URLParams
13166 ifNoneMatch_ string
13167 ctx_ context.Context
13168 header_ http.Header
13169 }
13170
13171 // GetDICOMStoreMetrics: Gets metrics associated with the DICOM store.
13172 //
13173 // - name: The resource name of the DICOM store to get metrics for.
13174 func (r *ProjectsLocationsDatasetsDicomStoresService) GetDICOMStoreMetrics(name string) *ProjectsLocationsDatasetsDicomStoresGetDICOMStoreMetricsCall {
13175 c := &ProjectsLocationsDatasetsDicomStoresGetDICOMStoreMetricsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13176 c.name = name
13177 return c
13178 }
13179
13180 // Fields allows partial responses to be retrieved. See
13181 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13182 // details.
13183 func (c *ProjectsLocationsDatasetsDicomStoresGetDICOMStoreMetricsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresGetDICOMStoreMetricsCall {
13184 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13185 return c
13186 }
13187
13188 // IfNoneMatch sets an optional parameter which makes the operation fail if the
13189 // object's ETag matches the given value. This is useful for getting updates
13190 // only after the object has changed since the last request.
13191 func (c *ProjectsLocationsDatasetsDicomStoresGetDICOMStoreMetricsCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresGetDICOMStoreMetricsCall {
13192 c.ifNoneMatch_ = entityTag
13193 return c
13194 }
13195
13196 // Context sets the context to be used in this call's Do method.
13197 func (c *ProjectsLocationsDatasetsDicomStoresGetDICOMStoreMetricsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresGetDICOMStoreMetricsCall {
13198 c.ctx_ = ctx
13199 return c
13200 }
13201
13202 // Header returns a http.Header that can be modified by the caller to add
13203 // headers to the request.
13204 func (c *ProjectsLocationsDatasetsDicomStoresGetDICOMStoreMetricsCall) Header() http.Header {
13205 if c.header_ == nil {
13206 c.header_ = make(http.Header)
13207 }
13208 return c.header_
13209 }
13210
13211 func (c *ProjectsLocationsDatasetsDicomStoresGetDICOMStoreMetricsCall) doRequest(alt string) (*http.Response, error) {
13212 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13213 if c.ifNoneMatch_ != "" {
13214 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13215 }
13216 c.urlParams_.Set("alt", alt)
13217 c.urlParams_.Set("prettyPrint", "false")
13218 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:getDICOMStoreMetrics")
13219 urls += "?" + c.urlParams_.Encode()
13220 req, err := http.NewRequest("GET", urls, nil)
13221 if err != nil {
13222 return nil, err
13223 }
13224 req.Header = reqHeaders
13225 googleapi.Expand(req.URL, map[string]string{
13226 "name": c.name,
13227 })
13228 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.getDICOMStoreMetrics", "request", internallog.HTTPRequest(req, nil))
13229 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13230 }
13231
13232 // Do executes the "healthcare.projects.locations.datasets.dicomStores.getDICOMStoreMetrics" call.
13233 // Any non-2xx status code is an error. Response headers are in either
13234 // *DicomStoreMetrics.ServerResponse.Header or (if a response was returned at
13235 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
13236 // check whether the returned error was because http.StatusNotModified was
13237 // returned.
13238 func (c *ProjectsLocationsDatasetsDicomStoresGetDICOMStoreMetricsCall) Do(opts ...googleapi.CallOption) (*DicomStoreMetrics, error) {
13239 gensupport.SetOptions(c.urlParams_, opts...)
13240 res, err := c.doRequest("json")
13241 if res != nil && res.StatusCode == http.StatusNotModified {
13242 if res.Body != nil {
13243 res.Body.Close()
13244 }
13245 return nil, gensupport.WrapError(&googleapi.Error{
13246 Code: res.StatusCode,
13247 Header: res.Header,
13248 })
13249 }
13250 if err != nil {
13251 return nil, err
13252 }
13253 defer googleapi.CloseBody(res)
13254 if err := googleapi.CheckResponse(res); err != nil {
13255 return nil, gensupport.WrapError(err)
13256 }
13257 ret := &DicomStoreMetrics{
13258 ServerResponse: googleapi.ServerResponse{
13259 Header: res.Header,
13260 HTTPStatusCode: res.StatusCode,
13261 },
13262 }
13263 target := &ret
13264 b, err := gensupport.DecodeResponseBytes(target, res)
13265 if err != nil {
13266 return nil, err
13267 }
13268 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.getDICOMStoreMetrics", "response", internallog.HTTPResponse(res, b))
13269 return ret, nil
13270 }
13271
13272 type ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall struct {
13273 s *Service
13274 resource string
13275 urlParams_ gensupport.URLParams
13276 ifNoneMatch_ string
13277 ctx_ context.Context
13278 header_ http.Header
13279 }
13280
13281 // GetIamPolicy: Gets the access control policy for a resource. Returns an
13282 // empty policy if the resource exists and does not have a policy set.
13283 //
13284 // - resource: REQUIRED: The resource for which the policy is being requested.
13285 // See Resource names (https://cloud.google.com/apis/design/resource_names)
13286 // for the appropriate value for this field.
13287 func (r *ProjectsLocationsDatasetsDicomStoresService) GetIamPolicy(resource string) *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall {
13288 c := &ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13289 c.resource = resource
13290 return c
13291 }
13292
13293 // OptionsRequestedPolicyVersion sets the optional parameter
13294 // "options.requestedPolicyVersion": The maximum policy version that will be
13295 // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
13296 // an invalid value will be rejected. Requests for policies with any
13297 // conditional role bindings must specify version 3. Policies with no
13298 // conditional role bindings may specify any valid value or leave the field
13299 // unset. The policy in the response might use the policy version that you
13300 // specified, or it might use a lower policy version. For example, if you
13301 // specify version 3, but the policy has no conditional role bindings, the
13302 // response uses version 1. To learn which resources support conditions in
13303 // their IAM policies, see the IAM documentation
13304 // (https://cloud.google.com/iam/help/conditions/resource-policies).
13305 func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall {
13306 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
13307 return c
13308 }
13309
13310 // Fields allows partial responses to be retrieved. See
13311 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13312 // details.
13313 func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall {
13314 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13315 return c
13316 }
13317
13318 // IfNoneMatch sets an optional parameter which makes the operation fail if the
13319 // object's ETag matches the given value. This is useful for getting updates
13320 // only after the object has changed since the last request.
13321 func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall {
13322 c.ifNoneMatch_ = entityTag
13323 return c
13324 }
13325
13326 // Context sets the context to be used in this call's Do method.
13327 func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall {
13328 c.ctx_ = ctx
13329 return c
13330 }
13331
13332 // Header returns a http.Header that can be modified by the caller to add
13333 // headers to the request.
13334 func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) Header() http.Header {
13335 if c.header_ == nil {
13336 c.header_ = make(http.Header)
13337 }
13338 return c.header_
13339 }
13340
13341 func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
13342 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13343 if c.ifNoneMatch_ != "" {
13344 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13345 }
13346 c.urlParams_.Set("alt", alt)
13347 c.urlParams_.Set("prettyPrint", "false")
13348 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
13349 urls += "?" + c.urlParams_.Encode()
13350 req, err := http.NewRequest("GET", urls, nil)
13351 if err != nil {
13352 return nil, err
13353 }
13354 req.Header = reqHeaders
13355 googleapi.Expand(req.URL, map[string]string{
13356 "resource": c.resource,
13357 })
13358 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.getIamPolicy", "request", internallog.HTTPRequest(req, nil))
13359 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13360 }
13361
13362 // Do executes the "healthcare.projects.locations.datasets.dicomStores.getIamPolicy" call.
13363 // Any non-2xx status code is an error. Response headers are in either
13364 // *Policy.ServerResponse.Header or (if a response was returned at all) in
13365 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13366 // whether the returned error was because http.StatusNotModified was returned.
13367 func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
13368 gensupport.SetOptions(c.urlParams_, opts...)
13369 res, err := c.doRequest("json")
13370 if res != nil && res.StatusCode == http.StatusNotModified {
13371 if res.Body != nil {
13372 res.Body.Close()
13373 }
13374 return nil, gensupport.WrapError(&googleapi.Error{
13375 Code: res.StatusCode,
13376 Header: res.Header,
13377 })
13378 }
13379 if err != nil {
13380 return nil, err
13381 }
13382 defer googleapi.CloseBody(res)
13383 if err := googleapi.CheckResponse(res); err != nil {
13384 return nil, gensupport.WrapError(err)
13385 }
13386 ret := &Policy{
13387 ServerResponse: googleapi.ServerResponse{
13388 Header: res.Header,
13389 HTTPStatusCode: res.StatusCode,
13390 },
13391 }
13392 target := &ret
13393 b, err := gensupport.DecodeResponseBytes(target, res)
13394 if err != nil {
13395 return nil, err
13396 }
13397 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.getIamPolicy", "response", internallog.HTTPResponse(res, b))
13398 return ret, nil
13399 }
13400
13401 type ProjectsLocationsDatasetsDicomStoresImportCall struct {
13402 s *Service
13403 name string
13404 importdicomdatarequest *ImportDicomDataRequest
13405 urlParams_ gensupport.URLParams
13406 ctx_ context.Context
13407 header_ http.Header
13408 }
13409
13410 // Import: Imports data into the DICOM store by copying it from the specified
13411 // source. Errors are logged to Cloud Logging. For more information, see
13412 // Viewing error logs in Cloud Logging
13413 // (https://cloud.google.com/healthcare/docs/how-tos/logging). The metadata
13414 // field type is OperationMetadata.
13415 //
13416 // - name: The name of the DICOM store resource into which the data is
13417 // imported. For example,
13418 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
13419 // tores/{dicom_store_id}`.
13420 func (r *ProjectsLocationsDatasetsDicomStoresService) Import(name string, importdicomdatarequest *ImportDicomDataRequest) *ProjectsLocationsDatasetsDicomStoresImportCall {
13421 c := &ProjectsLocationsDatasetsDicomStoresImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13422 c.name = name
13423 c.importdicomdatarequest = importdicomdatarequest
13424 return c
13425 }
13426
13427 // Fields allows partial responses to be retrieved. See
13428 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13429 // details.
13430 func (c *ProjectsLocationsDatasetsDicomStoresImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresImportCall {
13431 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13432 return c
13433 }
13434
13435 // Context sets the context to be used in this call's Do method.
13436 func (c *ProjectsLocationsDatasetsDicomStoresImportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresImportCall {
13437 c.ctx_ = ctx
13438 return c
13439 }
13440
13441 // Header returns a http.Header that can be modified by the caller to add
13442 // headers to the request.
13443 func (c *ProjectsLocationsDatasetsDicomStoresImportCall) Header() http.Header {
13444 if c.header_ == nil {
13445 c.header_ = make(http.Header)
13446 }
13447 return c.header_
13448 }
13449
13450 func (c *ProjectsLocationsDatasetsDicomStoresImportCall) doRequest(alt string) (*http.Response, error) {
13451 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13452 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.importdicomdatarequest)
13453 if err != nil {
13454 return nil, err
13455 }
13456 c.urlParams_.Set("alt", alt)
13457 c.urlParams_.Set("prettyPrint", "false")
13458 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:import")
13459 urls += "?" + c.urlParams_.Encode()
13460 req, err := http.NewRequest("POST", urls, body)
13461 if err != nil {
13462 return nil, err
13463 }
13464 req.Header = reqHeaders
13465 googleapi.Expand(req.URL, map[string]string{
13466 "name": c.name,
13467 })
13468 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.import", "request", internallog.HTTPRequest(req, body.Bytes()))
13469 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13470 }
13471
13472 // Do executes the "healthcare.projects.locations.datasets.dicomStores.import" call.
13473 // Any non-2xx status code is an error. Response headers are in either
13474 // *Operation.ServerResponse.Header or (if a response was returned at all) in
13475 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13476 // whether the returned error was because http.StatusNotModified was returned.
13477 func (c *ProjectsLocationsDatasetsDicomStoresImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
13478 gensupport.SetOptions(c.urlParams_, opts...)
13479 res, err := c.doRequest("json")
13480 if res != nil && res.StatusCode == http.StatusNotModified {
13481 if res.Body != nil {
13482 res.Body.Close()
13483 }
13484 return nil, gensupport.WrapError(&googleapi.Error{
13485 Code: res.StatusCode,
13486 Header: res.Header,
13487 })
13488 }
13489 if err != nil {
13490 return nil, err
13491 }
13492 defer googleapi.CloseBody(res)
13493 if err := googleapi.CheckResponse(res); err != nil {
13494 return nil, gensupport.WrapError(err)
13495 }
13496 ret := &Operation{
13497 ServerResponse: googleapi.ServerResponse{
13498 Header: res.Header,
13499 HTTPStatusCode: res.StatusCode,
13500 },
13501 }
13502 target := &ret
13503 b, err := gensupport.DecodeResponseBytes(target, res)
13504 if err != nil {
13505 return nil, err
13506 }
13507 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.import", "response", internallog.HTTPResponse(res, b))
13508 return ret, nil
13509 }
13510
13511 type ProjectsLocationsDatasetsDicomStoresListCall struct {
13512 s *Service
13513 parent string
13514 urlParams_ gensupport.URLParams
13515 ifNoneMatch_ string
13516 ctx_ context.Context
13517 header_ http.Header
13518 }
13519
13520 // List: Lists the DICOM stores in the given dataset.
13521 //
13522 // - parent: Name of the dataset.
13523 func (r *ProjectsLocationsDatasetsDicomStoresService) List(parent string) *ProjectsLocationsDatasetsDicomStoresListCall {
13524 c := &ProjectsLocationsDatasetsDicomStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13525 c.parent = parent
13526 return c
13527 }
13528
13529 // Filter sets the optional parameter "filter": Restricts stores returned to
13530 // those matching a filter. The following syntax is available: * A string field
13531 // value can be written as text inside quotation marks, for example "query
13532 // text". The only valid relational operation for text fields is equality
13533 // (`=`), where text is searched within the field, rather than having the field
13534 // be equal to the text. For example, "Comment = great" returns messages with
13535 // `great` in the comment field. * A number field value can be written as an
13536 // integer, a decimal, or an exponential. The valid relational operators for
13537 // number fields are the equality operator (`=`), along with the less
13538 // than/greater than operators (`<`, `<=`, `>`, `>=`). Note that there is no
13539 // inequality (`!=`) operator. You can prepend the `NOT` operator to an
13540 // expression to negate it. * A date field value must be written in
13541 // `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format.
13542 // Leading zeros are required for one-digit months and days. The valid
13543 // relational operators for date fields are the equality operator (`=`) , along
13544 // with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that
13545 // there is no inequality (`!=`) operator. You can prepend the `NOT` operator
13546 // to an expression to negate it. * Multiple field query expressions can be
13547 // combined in one query by adding `AND` or `OR` operators between the
13548 // expressions. If a boolean operator appears within a quoted string, it is not
13549 // treated as special, it's just another part of the character string to be
13550 // matched. You can prepend the `NOT` operator to an expression to negate it.
13551 // Only filtering on labels is supported. For example, `labels.key=value`.
13552 func (c *ProjectsLocationsDatasetsDicomStoresListCall) Filter(filter string) *ProjectsLocationsDatasetsDicomStoresListCall {
13553 c.urlParams_.Set("filter", filter)
13554 return c
13555 }
13556
13557 // PageSize sets the optional parameter "pageSize": Limit on the number of
13558 // DICOM stores to return in a single response. If not specified, 100 is used.
13559 // May not be larger than 1000.
13560 func (c *ProjectsLocationsDatasetsDicomStoresListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsDicomStoresListCall {
13561 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
13562 return c
13563 }
13564
13565 // PageToken sets the optional parameter "pageToken": The next_page_token value
13566 // returned from the previous List request, if any.
13567 func (c *ProjectsLocationsDatasetsDicomStoresListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsDicomStoresListCall {
13568 c.urlParams_.Set("pageToken", pageToken)
13569 return c
13570 }
13571
13572 // Fields allows partial responses to be retrieved. See
13573 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13574 // details.
13575 func (c *ProjectsLocationsDatasetsDicomStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresListCall {
13576 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13577 return c
13578 }
13579
13580 // IfNoneMatch sets an optional parameter which makes the operation fail if the
13581 // object's ETag matches the given value. This is useful for getting updates
13582 // only after the object has changed since the last request.
13583 func (c *ProjectsLocationsDatasetsDicomStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresListCall {
13584 c.ifNoneMatch_ = entityTag
13585 return c
13586 }
13587
13588 // Context sets the context to be used in this call's Do method.
13589 func (c *ProjectsLocationsDatasetsDicomStoresListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresListCall {
13590 c.ctx_ = ctx
13591 return c
13592 }
13593
13594 // Header returns a http.Header that can be modified by the caller to add
13595 // headers to the request.
13596 func (c *ProjectsLocationsDatasetsDicomStoresListCall) Header() http.Header {
13597 if c.header_ == nil {
13598 c.header_ = make(http.Header)
13599 }
13600 return c.header_
13601 }
13602
13603 func (c *ProjectsLocationsDatasetsDicomStoresListCall) doRequest(alt string) (*http.Response, error) {
13604 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13605 if c.ifNoneMatch_ != "" {
13606 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13607 }
13608 c.urlParams_.Set("alt", alt)
13609 c.urlParams_.Set("prettyPrint", "false")
13610 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomStores")
13611 urls += "?" + c.urlParams_.Encode()
13612 req, err := http.NewRequest("GET", urls, nil)
13613 if err != nil {
13614 return nil, err
13615 }
13616 req.Header = reqHeaders
13617 googleapi.Expand(req.URL, map[string]string{
13618 "parent": c.parent,
13619 })
13620 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.list", "request", internallog.HTTPRequest(req, nil))
13621 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13622 }
13623
13624 // Do executes the "healthcare.projects.locations.datasets.dicomStores.list" call.
13625 // Any non-2xx status code is an error. Response headers are in either
13626 // *ListDicomStoresResponse.ServerResponse.Header or (if a response was
13627 // returned at all) in error.(*googleapi.Error).Header. Use
13628 // googleapi.IsNotModified to check whether the returned error was because
13629 // http.StatusNotModified was returned.
13630 func (c *ProjectsLocationsDatasetsDicomStoresListCall) Do(opts ...googleapi.CallOption) (*ListDicomStoresResponse, error) {
13631 gensupport.SetOptions(c.urlParams_, opts...)
13632 res, err := c.doRequest("json")
13633 if res != nil && res.StatusCode == http.StatusNotModified {
13634 if res.Body != nil {
13635 res.Body.Close()
13636 }
13637 return nil, gensupport.WrapError(&googleapi.Error{
13638 Code: res.StatusCode,
13639 Header: res.Header,
13640 })
13641 }
13642 if err != nil {
13643 return nil, err
13644 }
13645 defer googleapi.CloseBody(res)
13646 if err := googleapi.CheckResponse(res); err != nil {
13647 return nil, gensupport.WrapError(err)
13648 }
13649 ret := &ListDicomStoresResponse{
13650 ServerResponse: googleapi.ServerResponse{
13651 Header: res.Header,
13652 HTTPStatusCode: res.StatusCode,
13653 },
13654 }
13655 target := &ret
13656 b, err := gensupport.DecodeResponseBytes(target, res)
13657 if err != nil {
13658 return nil, err
13659 }
13660 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.list", "response", internallog.HTTPResponse(res, b))
13661 return ret, nil
13662 }
13663
13664 // Pages invokes f for each page of results.
13665 // A non-nil error returned from f will halt the iteration.
13666 // The provided context supersedes any context provided to the Context method.
13667 func (c *ProjectsLocationsDatasetsDicomStoresListCall) Pages(ctx context.Context, f func(*ListDicomStoresResponse) error) error {
13668 c.ctx_ = ctx
13669 defer c.PageToken(c.urlParams_.Get("pageToken"))
13670 for {
13671 x, err := c.Do()
13672 if err != nil {
13673 return err
13674 }
13675 if err := f(x); err != nil {
13676 return err
13677 }
13678 if x.NextPageToken == "" {
13679 return nil
13680 }
13681 c.PageToken(x.NextPageToken)
13682 }
13683 }
13684
13685 type ProjectsLocationsDatasetsDicomStoresPatchCall struct {
13686 s *Service
13687 name string
13688 dicomstore *DicomStore
13689 urlParams_ gensupport.URLParams
13690 ctx_ context.Context
13691 header_ http.Header
13692 }
13693
13694 // Patch: Updates the specified DICOM store.
13695 //
13696 // - name: Identifier. Resource name of the DICOM store, of the form
13697 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
13698 // tores/{dicom_store_id}`.
13699 func (r *ProjectsLocationsDatasetsDicomStoresService) Patch(name string, dicomstore *DicomStore) *ProjectsLocationsDatasetsDicomStoresPatchCall {
13700 c := &ProjectsLocationsDatasetsDicomStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13701 c.name = name
13702 c.dicomstore = dicomstore
13703 return c
13704 }
13705
13706 // UpdateMask sets the optional parameter "updateMask": Required. The update
13707 // mask applies to the resource. For the `FieldMask` definition, see
13708 // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
13709 func (c *ProjectsLocationsDatasetsDicomStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsDicomStoresPatchCall {
13710 c.urlParams_.Set("updateMask", updateMask)
13711 return c
13712 }
13713
13714 // Fields allows partial responses to be retrieved. See
13715 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13716 // details.
13717 func (c *ProjectsLocationsDatasetsDicomStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresPatchCall {
13718 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13719 return c
13720 }
13721
13722 // Context sets the context to be used in this call's Do method.
13723 func (c *ProjectsLocationsDatasetsDicomStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresPatchCall {
13724 c.ctx_ = ctx
13725 return c
13726 }
13727
13728 // Header returns a http.Header that can be modified by the caller to add
13729 // headers to the request.
13730 func (c *ProjectsLocationsDatasetsDicomStoresPatchCall) Header() http.Header {
13731 if c.header_ == nil {
13732 c.header_ = make(http.Header)
13733 }
13734 return c.header_
13735 }
13736
13737 func (c *ProjectsLocationsDatasetsDicomStoresPatchCall) doRequest(alt string) (*http.Response, error) {
13738 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13739 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.dicomstore)
13740 if err != nil {
13741 return nil, err
13742 }
13743 c.urlParams_.Set("alt", alt)
13744 c.urlParams_.Set("prettyPrint", "false")
13745 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
13746 urls += "?" + c.urlParams_.Encode()
13747 req, err := http.NewRequest("PATCH", urls, body)
13748 if err != nil {
13749 return nil, err
13750 }
13751 req.Header = reqHeaders
13752 googleapi.Expand(req.URL, map[string]string{
13753 "name": c.name,
13754 })
13755 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
13756 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13757 }
13758
13759 // Do executes the "healthcare.projects.locations.datasets.dicomStores.patch" call.
13760 // Any non-2xx status code is an error. Response headers are in either
13761 // *DicomStore.ServerResponse.Header or (if a response was returned at all) in
13762 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13763 // whether the returned error was because http.StatusNotModified was returned.
13764 func (c *ProjectsLocationsDatasetsDicomStoresPatchCall) Do(opts ...googleapi.CallOption) (*DicomStore, error) {
13765 gensupport.SetOptions(c.urlParams_, opts...)
13766 res, err := c.doRequest("json")
13767 if res != nil && res.StatusCode == http.StatusNotModified {
13768 if res.Body != nil {
13769 res.Body.Close()
13770 }
13771 return nil, gensupport.WrapError(&googleapi.Error{
13772 Code: res.StatusCode,
13773 Header: res.Header,
13774 })
13775 }
13776 if err != nil {
13777 return nil, err
13778 }
13779 defer googleapi.CloseBody(res)
13780 if err := googleapi.CheckResponse(res); err != nil {
13781 return nil, gensupport.WrapError(err)
13782 }
13783 ret := &DicomStore{
13784 ServerResponse: googleapi.ServerResponse{
13785 Header: res.Header,
13786 HTTPStatusCode: res.StatusCode,
13787 },
13788 }
13789 target := &ret
13790 b, err := gensupport.DecodeResponseBytes(target, res)
13791 if err != nil {
13792 return nil, err
13793 }
13794 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.patch", "response", internallog.HTTPResponse(res, b))
13795 return ret, nil
13796 }
13797
13798 type ProjectsLocationsDatasetsDicomStoresSearchForInstancesCall struct {
13799 s *Service
13800 parent string
13801 dicomWebPath string
13802 urlParams_ gensupport.URLParams
13803 ifNoneMatch_ string
13804 ctx_ context.Context
13805 header_ http.Header
13806 }
13807
13808 // SearchForInstances: SearchForInstances returns a list of matching instances.
13809 // See [Search Transaction]
13810 // (https://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.6).
13811 // For details on the implementation of SearchForInstances, see Search
13812 // transaction
13813 // (https://cloud.google.com/healthcare/docs/dicom#search_transaction) in the
13814 // Cloud Healthcare API conformance statement. For samples that show how to
13815 // call SearchForInstances, see Search for DICOM data
13816 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#search-dicom).
13817 //
13818 // - dicomWebPath: The path of the SearchForInstancesRequest DICOMweb request.
13819 // For example, `instances`,
13820 // `studies/{study_uid}/series/{series_uid}/instances`, or
13821 // `studies/{study_uid}/instances`.
13822 // - parent: The name of the DICOM store that is being accessed. For example,
13823 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
13824 // tores/{dicom_store_id}`.
13825 func (r *ProjectsLocationsDatasetsDicomStoresService) SearchForInstances(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresSearchForInstancesCall {
13826 c := &ProjectsLocationsDatasetsDicomStoresSearchForInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13827 c.parent = parent
13828 c.dicomWebPath = dicomWebPath
13829 return c
13830 }
13831
13832 // Fields allows partial responses to be retrieved. See
13833 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13834 // details.
13835 func (c *ProjectsLocationsDatasetsDicomStoresSearchForInstancesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresSearchForInstancesCall {
13836 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13837 return c
13838 }
13839
13840 // IfNoneMatch sets an optional parameter which makes the operation fail if the
13841 // object's ETag matches the given value. This is useful for getting updates
13842 // only after the object has changed since the last request.
13843 func (c *ProjectsLocationsDatasetsDicomStoresSearchForInstancesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresSearchForInstancesCall {
13844 c.ifNoneMatch_ = entityTag
13845 return c
13846 }
13847
13848 // Context sets the context to be used in this call's Do method.
13849 func (c *ProjectsLocationsDatasetsDicomStoresSearchForInstancesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresSearchForInstancesCall {
13850 c.ctx_ = ctx
13851 return c
13852 }
13853
13854 // Header returns a http.Header that can be modified by the caller to add
13855 // headers to the request.
13856 func (c *ProjectsLocationsDatasetsDicomStoresSearchForInstancesCall) Header() http.Header {
13857 if c.header_ == nil {
13858 c.header_ = make(http.Header)
13859 }
13860 return c.header_
13861 }
13862
13863 func (c *ProjectsLocationsDatasetsDicomStoresSearchForInstancesCall) doRequest(alt string) (*http.Response, error) {
13864 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13865 if c.ifNoneMatch_ != "" {
13866 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13867 }
13868 c.urlParams_.Set("alt", alt)
13869 c.urlParams_.Set("prettyPrint", "false")
13870 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}")
13871 urls += "?" + c.urlParams_.Encode()
13872 req, err := http.NewRequest("GET", urls, nil)
13873 if err != nil {
13874 return nil, err
13875 }
13876 req.Header = reqHeaders
13877 googleapi.Expand(req.URL, map[string]string{
13878 "parent": c.parent,
13879 "dicomWebPath": c.dicomWebPath,
13880 })
13881 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.searchForInstances", "request", internallog.HTTPRequest(req, nil))
13882 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13883 }
13884
13885 // Do executes the "healthcare.projects.locations.datasets.dicomStores.searchForInstances" call.
13886 func (c *ProjectsLocationsDatasetsDicomStoresSearchForInstancesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
13887 gensupport.SetOptions(c.urlParams_, opts...)
13888 return c.doRequest("")
13889 }
13890
13891 type ProjectsLocationsDatasetsDicomStoresSearchForSeriesCall struct {
13892 s *Service
13893 parent string
13894 dicomWebPath string
13895 urlParams_ gensupport.URLParams
13896 ifNoneMatch_ string
13897 ctx_ context.Context
13898 header_ http.Header
13899 }
13900
13901 // SearchForSeries: SearchForSeries returns a list of matching series. See
13902 // [Search Transaction]
13903 // (https://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.6).
13904 // For details on the implementation of SearchForSeries, see Search transaction
13905 // (https://cloud.google.com/healthcare/docs/dicom#search_transaction) in the
13906 // Cloud Healthcare API conformance statement. For samples that show how to
13907 // call SearchForSeries, see Search for DICOM data
13908 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#search-dicom).
13909 //
13910 // - dicomWebPath: The path of the SearchForSeries DICOMweb request. For
13911 // example, `series` or `studies/{study_uid}/series`.
13912 // - parent: The name of the DICOM store that is being accessed. For example,
13913 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
13914 // tores/{dicom_store_id}`.
13915 func (r *ProjectsLocationsDatasetsDicomStoresService) SearchForSeries(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresSearchForSeriesCall {
13916 c := &ProjectsLocationsDatasetsDicomStoresSearchForSeriesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13917 c.parent = parent
13918 c.dicomWebPath = dicomWebPath
13919 return c
13920 }
13921
13922 // Fields allows partial responses to be retrieved. See
13923 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13924 // details.
13925 func (c *ProjectsLocationsDatasetsDicomStoresSearchForSeriesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresSearchForSeriesCall {
13926 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13927 return c
13928 }
13929
13930 // IfNoneMatch sets an optional parameter which makes the operation fail if the
13931 // object's ETag matches the given value. This is useful for getting updates
13932 // only after the object has changed since the last request.
13933 func (c *ProjectsLocationsDatasetsDicomStoresSearchForSeriesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresSearchForSeriesCall {
13934 c.ifNoneMatch_ = entityTag
13935 return c
13936 }
13937
13938 // Context sets the context to be used in this call's Do method.
13939 func (c *ProjectsLocationsDatasetsDicomStoresSearchForSeriesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresSearchForSeriesCall {
13940 c.ctx_ = ctx
13941 return c
13942 }
13943
13944 // Header returns a http.Header that can be modified by the caller to add
13945 // headers to the request.
13946 func (c *ProjectsLocationsDatasetsDicomStoresSearchForSeriesCall) Header() http.Header {
13947 if c.header_ == nil {
13948 c.header_ = make(http.Header)
13949 }
13950 return c.header_
13951 }
13952
13953 func (c *ProjectsLocationsDatasetsDicomStoresSearchForSeriesCall) doRequest(alt string) (*http.Response, error) {
13954 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13955 if c.ifNoneMatch_ != "" {
13956 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13957 }
13958 c.urlParams_.Set("alt", alt)
13959 c.urlParams_.Set("prettyPrint", "false")
13960 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}")
13961 urls += "?" + c.urlParams_.Encode()
13962 req, err := http.NewRequest("GET", urls, nil)
13963 if err != nil {
13964 return nil, err
13965 }
13966 req.Header = reqHeaders
13967 googleapi.Expand(req.URL, map[string]string{
13968 "parent": c.parent,
13969 "dicomWebPath": c.dicomWebPath,
13970 })
13971 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.searchForSeries", "request", internallog.HTTPRequest(req, nil))
13972 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13973 }
13974
13975 // Do executes the "healthcare.projects.locations.datasets.dicomStores.searchForSeries" call.
13976 func (c *ProjectsLocationsDatasetsDicomStoresSearchForSeriesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
13977 gensupport.SetOptions(c.urlParams_, opts...)
13978 return c.doRequest("")
13979 }
13980
13981 type ProjectsLocationsDatasetsDicomStoresSearchForStudiesCall struct {
13982 s *Service
13983 parent string
13984 dicomWebPath string
13985 urlParams_ gensupport.URLParams
13986 ifNoneMatch_ string
13987 ctx_ context.Context
13988 header_ http.Header
13989 }
13990
13991 // SearchForStudies: SearchForStudies returns a list of matching studies. See
13992 // [Search Transaction]
13993 // (https://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.6).
13994 // For details on the implementation of SearchForStudies, see Search
13995 // transaction
13996 // (https://cloud.google.com/healthcare/docs/dicom#search_transaction) in the
13997 // Cloud Healthcare API conformance statement. For samples that show how to
13998 // call SearchForStudies, see Search for DICOM data
13999 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#search-dicom).
14000 //
14001 // - dicomWebPath: The path of the SearchForStudies DICOMweb request. For
14002 // example, `studies`.
14003 // - parent: The name of the DICOM store that is being accessed. For example,
14004 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
14005 // tores/{dicom_store_id}`.
14006 func (r *ProjectsLocationsDatasetsDicomStoresService) SearchForStudies(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresSearchForStudiesCall {
14007 c := &ProjectsLocationsDatasetsDicomStoresSearchForStudiesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14008 c.parent = parent
14009 c.dicomWebPath = dicomWebPath
14010 return c
14011 }
14012
14013 // Fields allows partial responses to be retrieved. See
14014 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14015 // details.
14016 func (c *ProjectsLocationsDatasetsDicomStoresSearchForStudiesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresSearchForStudiesCall {
14017 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14018 return c
14019 }
14020
14021 // IfNoneMatch sets an optional parameter which makes the operation fail if the
14022 // object's ETag matches the given value. This is useful for getting updates
14023 // only after the object has changed since the last request.
14024 func (c *ProjectsLocationsDatasetsDicomStoresSearchForStudiesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresSearchForStudiesCall {
14025 c.ifNoneMatch_ = entityTag
14026 return c
14027 }
14028
14029 // Context sets the context to be used in this call's Do method.
14030 func (c *ProjectsLocationsDatasetsDicomStoresSearchForStudiesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresSearchForStudiesCall {
14031 c.ctx_ = ctx
14032 return c
14033 }
14034
14035 // Header returns a http.Header that can be modified by the caller to add
14036 // headers to the request.
14037 func (c *ProjectsLocationsDatasetsDicomStoresSearchForStudiesCall) Header() http.Header {
14038 if c.header_ == nil {
14039 c.header_ = make(http.Header)
14040 }
14041 return c.header_
14042 }
14043
14044 func (c *ProjectsLocationsDatasetsDicomStoresSearchForStudiesCall) doRequest(alt string) (*http.Response, error) {
14045 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14046 if c.ifNoneMatch_ != "" {
14047 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14048 }
14049 c.urlParams_.Set("alt", alt)
14050 c.urlParams_.Set("prettyPrint", "false")
14051 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}")
14052 urls += "?" + c.urlParams_.Encode()
14053 req, err := http.NewRequest("GET", urls, nil)
14054 if err != nil {
14055 return nil, err
14056 }
14057 req.Header = reqHeaders
14058 googleapi.Expand(req.URL, map[string]string{
14059 "parent": c.parent,
14060 "dicomWebPath": c.dicomWebPath,
14061 })
14062 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.searchForStudies", "request", internallog.HTTPRequest(req, nil))
14063 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14064 }
14065
14066 // Do executes the "healthcare.projects.locations.datasets.dicomStores.searchForStudies" call.
14067 func (c *ProjectsLocationsDatasetsDicomStoresSearchForStudiesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
14068 gensupport.SetOptions(c.urlParams_, opts...)
14069 return c.doRequest("")
14070 }
14071
14072 type ProjectsLocationsDatasetsDicomStoresSetBlobStorageSettingsCall struct {
14073 s *Service
14074 resource string
14075 setblobstoragesettingsrequest *SetBlobStorageSettingsRequest
14076 urlParams_ gensupport.URLParams
14077 ctx_ context.Context
14078 header_ http.Header
14079 }
14080
14081 // SetBlobStorageSettings: SetBlobStorageSettings sets the blob storage
14082 // settings of the specified resources.
14083 //
14084 // - resource: The path of the resource to update the blob storage settings in
14085 // the format of
14086 // `projects/{projectID}/locations/{locationID}/datasets/{datasetID}/dicomStor
14087 // es/{dicomStoreID}/dicomWeb/studies/{studyUID}`,
14088 // `projects/{projectID}/locations/{locationID}/datasets/{datasetID}/dicomStor
14089 // es/{dicomStoreID}/dicomWeb/studies/{studyUID}/series/{seriesUID}/`, or
14090 // `projects/{projectID}/locations/{locationID}/datasets/{datasetID}/dicomStor
14091 // es/{dicomStoreID}/dicomWeb/studies/{studyUID}/series/{seriesUID}/instances/
14092 // {instanceUID}`. If `filter_config` is specified, set the value of
14093 // `resource` to the resource name of a DICOM store in the format
14094 // `projects/{projectID}/locations/{locationID}/datasets/{datasetID}/dicomStor
14095 // es/{dicomStoreID}`.
14096 func (r *ProjectsLocationsDatasetsDicomStoresService) SetBlobStorageSettings(resource string, setblobstoragesettingsrequest *SetBlobStorageSettingsRequest) *ProjectsLocationsDatasetsDicomStoresSetBlobStorageSettingsCall {
14097 c := &ProjectsLocationsDatasetsDicomStoresSetBlobStorageSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14098 c.resource = resource
14099 c.setblobstoragesettingsrequest = setblobstoragesettingsrequest
14100 return c
14101 }
14102
14103 // Fields allows partial responses to be retrieved. See
14104 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14105 // details.
14106 func (c *ProjectsLocationsDatasetsDicomStoresSetBlobStorageSettingsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresSetBlobStorageSettingsCall {
14107 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14108 return c
14109 }
14110
14111 // Context sets the context to be used in this call's Do method.
14112 func (c *ProjectsLocationsDatasetsDicomStoresSetBlobStorageSettingsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresSetBlobStorageSettingsCall {
14113 c.ctx_ = ctx
14114 return c
14115 }
14116
14117 // Header returns a http.Header that can be modified by the caller to add
14118 // headers to the request.
14119 func (c *ProjectsLocationsDatasetsDicomStoresSetBlobStorageSettingsCall) Header() http.Header {
14120 if c.header_ == nil {
14121 c.header_ = make(http.Header)
14122 }
14123 return c.header_
14124 }
14125
14126 func (c *ProjectsLocationsDatasetsDicomStoresSetBlobStorageSettingsCall) doRequest(alt string) (*http.Response, error) {
14127 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14128 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setblobstoragesettingsrequest)
14129 if err != nil {
14130 return nil, err
14131 }
14132 c.urlParams_.Set("alt", alt)
14133 c.urlParams_.Set("prettyPrint", "false")
14134 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setBlobStorageSettings")
14135 urls += "?" + c.urlParams_.Encode()
14136 req, err := http.NewRequest("POST", urls, body)
14137 if err != nil {
14138 return nil, err
14139 }
14140 req.Header = reqHeaders
14141 googleapi.Expand(req.URL, map[string]string{
14142 "resource": c.resource,
14143 })
14144 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.setBlobStorageSettings", "request", internallog.HTTPRequest(req, body.Bytes()))
14145 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14146 }
14147
14148 // Do executes the "healthcare.projects.locations.datasets.dicomStores.setBlobStorageSettings" call.
14149 // Any non-2xx status code is an error. Response headers are in either
14150 // *Operation.ServerResponse.Header or (if a response was returned at all) in
14151 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14152 // whether the returned error was because http.StatusNotModified was returned.
14153 func (c *ProjectsLocationsDatasetsDicomStoresSetBlobStorageSettingsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
14154 gensupport.SetOptions(c.urlParams_, opts...)
14155 res, err := c.doRequest("json")
14156 if res != nil && res.StatusCode == http.StatusNotModified {
14157 if res.Body != nil {
14158 res.Body.Close()
14159 }
14160 return nil, gensupport.WrapError(&googleapi.Error{
14161 Code: res.StatusCode,
14162 Header: res.Header,
14163 })
14164 }
14165 if err != nil {
14166 return nil, err
14167 }
14168 defer googleapi.CloseBody(res)
14169 if err := googleapi.CheckResponse(res); err != nil {
14170 return nil, gensupport.WrapError(err)
14171 }
14172 ret := &Operation{
14173 ServerResponse: googleapi.ServerResponse{
14174 Header: res.Header,
14175 HTTPStatusCode: res.StatusCode,
14176 },
14177 }
14178 target := &ret
14179 b, err := gensupport.DecodeResponseBytes(target, res)
14180 if err != nil {
14181 return nil, err
14182 }
14183 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.setBlobStorageSettings", "response", internallog.HTTPResponse(res, b))
14184 return ret, nil
14185 }
14186
14187 type ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall struct {
14188 s *Service
14189 resource string
14190 setiampolicyrequest *SetIamPolicyRequest
14191 urlParams_ gensupport.URLParams
14192 ctx_ context.Context
14193 header_ http.Header
14194 }
14195
14196 // SetIamPolicy: Sets the access control policy on the specified resource.
14197 // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
14198 // and `PERMISSION_DENIED` errors.
14199 //
14200 // - resource: REQUIRED: The resource for which the policy is being specified.
14201 // See Resource names (https://cloud.google.com/apis/design/resource_names)
14202 // for the appropriate value for this field.
14203 func (r *ProjectsLocationsDatasetsDicomStoresService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall {
14204 c := &ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14205 c.resource = resource
14206 c.setiampolicyrequest = setiampolicyrequest
14207 return c
14208 }
14209
14210 // Fields allows partial responses to be retrieved. See
14211 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14212 // details.
14213 func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall {
14214 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14215 return c
14216 }
14217
14218 // Context sets the context to be used in this call's Do method.
14219 func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall {
14220 c.ctx_ = ctx
14221 return c
14222 }
14223
14224 // Header returns a http.Header that can be modified by the caller to add
14225 // headers to the request.
14226 func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) Header() http.Header {
14227 if c.header_ == nil {
14228 c.header_ = make(http.Header)
14229 }
14230 return c.header_
14231 }
14232
14233 func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
14234 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14235 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest)
14236 if err != nil {
14237 return nil, err
14238 }
14239 c.urlParams_.Set("alt", alt)
14240 c.urlParams_.Set("prettyPrint", "false")
14241 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
14242 urls += "?" + c.urlParams_.Encode()
14243 req, err := http.NewRequest("POST", urls, body)
14244 if err != nil {
14245 return nil, err
14246 }
14247 req.Header = reqHeaders
14248 googleapi.Expand(req.URL, map[string]string{
14249 "resource": c.resource,
14250 })
14251 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes()))
14252 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14253 }
14254
14255 // Do executes the "healthcare.projects.locations.datasets.dicomStores.setIamPolicy" call.
14256 // Any non-2xx status code is an error. Response headers are in either
14257 // *Policy.ServerResponse.Header or (if a response was returned at all) in
14258 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14259 // whether the returned error was because http.StatusNotModified was returned.
14260 func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
14261 gensupport.SetOptions(c.urlParams_, opts...)
14262 res, err := c.doRequest("json")
14263 if res != nil && res.StatusCode == http.StatusNotModified {
14264 if res.Body != nil {
14265 res.Body.Close()
14266 }
14267 return nil, gensupport.WrapError(&googleapi.Error{
14268 Code: res.StatusCode,
14269 Header: res.Header,
14270 })
14271 }
14272 if err != nil {
14273 return nil, err
14274 }
14275 defer googleapi.CloseBody(res)
14276 if err := googleapi.CheckResponse(res); err != nil {
14277 return nil, gensupport.WrapError(err)
14278 }
14279 ret := &Policy{
14280 ServerResponse: googleapi.ServerResponse{
14281 Header: res.Header,
14282 HTTPStatusCode: res.StatusCode,
14283 },
14284 }
14285 target := &ret
14286 b, err := gensupport.DecodeResponseBytes(target, res)
14287 if err != nil {
14288 return nil, err
14289 }
14290 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.setIamPolicy", "response", internallog.HTTPResponse(res, b))
14291 return ret, nil
14292 }
14293
14294 type ProjectsLocationsDatasetsDicomStoresStoreInstancesCall struct {
14295 s *Service
14296 parent string
14297 dicomWebPath string
14298 body_ io.Reader
14299 urlParams_ gensupport.URLParams
14300 ctx_ context.Context
14301 header_ http.Header
14302 }
14303
14304 // StoreInstances: StoreInstances stores DICOM instances associated with study
14305 // instance unique identifiers (SUID). See [Store Transaction]
14306 // (https://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.5).
14307 // For details on the implementation of StoreInstances, see Store transaction
14308 // (https://cloud.google.com/healthcare/docs/dicom#store_transaction) in the
14309 // Cloud Healthcare API conformance statement. For samples that show how to
14310 // call StoreInstances, see Store DICOM data
14311 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#store-dicom).
14312 //
14313 // - dicomWebPath: The path of the StoreInstances DICOMweb request. For
14314 // example, `studies/[{study_uid}]`. Note that the `study_uid` is optional.
14315 // - parent: The name of the DICOM store that is being accessed. For example,
14316 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
14317 // tores/{dicom_store_id}`.
14318 func (r *ProjectsLocationsDatasetsDicomStoresService) StoreInstances(parent string, dicomWebPath string, body_ io.Reader) *ProjectsLocationsDatasetsDicomStoresStoreInstancesCall {
14319 c := &ProjectsLocationsDatasetsDicomStoresStoreInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14320 c.parent = parent
14321 c.dicomWebPath = dicomWebPath
14322 c.body_ = body_
14323 return c
14324 }
14325
14326 // Fields allows partial responses to be retrieved. See
14327 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14328 // details.
14329 func (c *ProjectsLocationsDatasetsDicomStoresStoreInstancesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStoreInstancesCall {
14330 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14331 return c
14332 }
14333
14334 // Context sets the context to be used in this call's Do method.
14335 func (c *ProjectsLocationsDatasetsDicomStoresStoreInstancesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStoreInstancesCall {
14336 c.ctx_ = ctx
14337 return c
14338 }
14339
14340 // Header returns a http.Header that can be modified by the caller to add
14341 // headers to the request.
14342 func (c *ProjectsLocationsDatasetsDicomStoresStoreInstancesCall) Header() http.Header {
14343 if c.header_ == nil {
14344 c.header_ = make(http.Header)
14345 }
14346 return c.header_
14347 }
14348
14349 func (c *ProjectsLocationsDatasetsDicomStoresStoreInstancesCall) doRequest(alt string) (*http.Response, error) {
14350 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14351 body := bytes.NewBuffer(nil)
14352 _, err := body.ReadFrom(c.body_)
14353 if err != nil {
14354 return nil, err
14355 }
14356 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}")
14357 urls += "?" + c.urlParams_.Encode()
14358 req, err := http.NewRequest("POST", urls, body)
14359 if err != nil {
14360 return nil, err
14361 }
14362 req.Header = reqHeaders
14363 googleapi.Expand(req.URL, map[string]string{
14364 "parent": c.parent,
14365 "dicomWebPath": c.dicomWebPath,
14366 })
14367 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.storeInstances", "request", internallog.HTTPRequest(req, body.Bytes()))
14368 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14369 }
14370
14371 // Do executes the "healthcare.projects.locations.datasets.dicomStores.storeInstances" call.
14372 func (c *ProjectsLocationsDatasetsDicomStoresStoreInstancesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
14373 gensupport.SetOptions(c.urlParams_, opts...)
14374 return c.doRequest("")
14375 }
14376
14377 type ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall struct {
14378 s *Service
14379 resource string
14380 testiampermissionsrequest *TestIamPermissionsRequest
14381 urlParams_ gensupport.URLParams
14382 ctx_ context.Context
14383 header_ http.Header
14384 }
14385
14386 // TestIamPermissions: Returns permissions that a caller has on the specified
14387 // resource. If the resource does not exist, this will return an empty set of
14388 // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
14389 // used for building permission-aware UIs and command-line tools, not for
14390 // authorization checking. This operation may "fail open" without warning.
14391 //
14392 // - resource: REQUIRED: The resource for which the policy detail is being
14393 // requested. See Resource names
14394 // (https://cloud.google.com/apis/design/resource_names) for the appropriate
14395 // value for this field.
14396 func (r *ProjectsLocationsDatasetsDicomStoresService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall {
14397 c := &ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14398 c.resource = resource
14399 c.testiampermissionsrequest = testiampermissionsrequest
14400 return c
14401 }
14402
14403 // Fields allows partial responses to be retrieved. See
14404 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14405 // details.
14406 func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall {
14407 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14408 return c
14409 }
14410
14411 // Context sets the context to be used in this call's Do method.
14412 func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall {
14413 c.ctx_ = ctx
14414 return c
14415 }
14416
14417 // Header returns a http.Header that can be modified by the caller to add
14418 // headers to the request.
14419 func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) Header() http.Header {
14420 if c.header_ == nil {
14421 c.header_ = make(http.Header)
14422 }
14423 return c.header_
14424 }
14425
14426 func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
14427 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14428 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest)
14429 if err != nil {
14430 return nil, err
14431 }
14432 c.urlParams_.Set("alt", alt)
14433 c.urlParams_.Set("prettyPrint", "false")
14434 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
14435 urls += "?" + c.urlParams_.Encode()
14436 req, err := http.NewRequest("POST", urls, body)
14437 if err != nil {
14438 return nil, err
14439 }
14440 req.Header = reqHeaders
14441 googleapi.Expand(req.URL, map[string]string{
14442 "resource": c.resource,
14443 })
14444 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes()))
14445 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14446 }
14447
14448 // Do executes the "healthcare.projects.locations.datasets.dicomStores.testIamPermissions" call.
14449 // Any non-2xx status code is an error. Response headers are in either
14450 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
14451 // returned at all) in error.(*googleapi.Error).Header. Use
14452 // googleapi.IsNotModified to check whether the returned error was because
14453 // http.StatusNotModified was returned.
14454 func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
14455 gensupport.SetOptions(c.urlParams_, opts...)
14456 res, err := c.doRequest("json")
14457 if res != nil && res.StatusCode == http.StatusNotModified {
14458 if res.Body != nil {
14459 res.Body.Close()
14460 }
14461 return nil, gensupport.WrapError(&googleapi.Error{
14462 Code: res.StatusCode,
14463 Header: res.Header,
14464 })
14465 }
14466 if err != nil {
14467 return nil, err
14468 }
14469 defer googleapi.CloseBody(res)
14470 if err := googleapi.CheckResponse(res); err != nil {
14471 return nil, gensupport.WrapError(err)
14472 }
14473 ret := &TestIamPermissionsResponse{
14474 ServerResponse: googleapi.ServerResponse{
14475 Header: res.Header,
14476 HTTPStatusCode: res.StatusCode,
14477 },
14478 }
14479 target := &ret
14480 b, err := gensupport.DecodeResponseBytes(target, res)
14481 if err != nil {
14482 return nil, err
14483 }
14484 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.testIamPermissions", "response", internallog.HTTPResponse(res, b))
14485 return ret, nil
14486 }
14487
14488 type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesGetStudyMetricsCall struct {
14489 s *Service
14490 study string
14491 urlParams_ gensupport.URLParams
14492 ifNoneMatch_ string
14493 ctx_ context.Context
14494 header_ http.Header
14495 }
14496
14497 // GetStudyMetrics: GetStudyMetrics returns metrics for a study.
14498 //
14499 // - study: The study resource path. For example,
14500 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
14501 // tores/{dicom_store_id}/dicomWeb/studies/{study_uid}`.
14502 func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesService) GetStudyMetrics(study string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesGetStudyMetricsCall {
14503 c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesGetStudyMetricsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14504 c.study = study
14505 return c
14506 }
14507
14508 // Fields allows partial responses to be retrieved. See
14509 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14510 // details.
14511 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesGetStudyMetricsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesGetStudyMetricsCall {
14512 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14513 return c
14514 }
14515
14516 // IfNoneMatch sets an optional parameter which makes the operation fail if the
14517 // object's ETag matches the given value. This is useful for getting updates
14518 // only after the object has changed since the last request.
14519 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesGetStudyMetricsCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesGetStudyMetricsCall {
14520 c.ifNoneMatch_ = entityTag
14521 return c
14522 }
14523
14524 // Context sets the context to be used in this call's Do method.
14525 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesGetStudyMetricsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesGetStudyMetricsCall {
14526 c.ctx_ = ctx
14527 return c
14528 }
14529
14530 // Header returns a http.Header that can be modified by the caller to add
14531 // headers to the request.
14532 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesGetStudyMetricsCall) Header() http.Header {
14533 if c.header_ == nil {
14534 c.header_ = make(http.Header)
14535 }
14536 return c.header_
14537 }
14538
14539 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesGetStudyMetricsCall) doRequest(alt string) (*http.Response, error) {
14540 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14541 if c.ifNoneMatch_ != "" {
14542 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14543 }
14544 c.urlParams_.Set("alt", alt)
14545 c.urlParams_.Set("prettyPrint", "false")
14546 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+study}:getStudyMetrics")
14547 urls += "?" + c.urlParams_.Encode()
14548 req, err := http.NewRequest("GET", urls, nil)
14549 if err != nil {
14550 return nil, err
14551 }
14552 req.Header = reqHeaders
14553 googleapi.Expand(req.URL, map[string]string{
14554 "study": c.study,
14555 })
14556 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.getStudyMetrics", "request", internallog.HTTPRequest(req, nil))
14557 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14558 }
14559
14560 // Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.getStudyMetrics" call.
14561 // Any non-2xx status code is an error. Response headers are in either
14562 // *StudyMetrics.ServerResponse.Header or (if a response was returned at all)
14563 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14564 // whether the returned error was because http.StatusNotModified was returned.
14565 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesGetStudyMetricsCall) Do(opts ...googleapi.CallOption) (*StudyMetrics, error) {
14566 gensupport.SetOptions(c.urlParams_, opts...)
14567 res, err := c.doRequest("json")
14568 if res != nil && res.StatusCode == http.StatusNotModified {
14569 if res.Body != nil {
14570 res.Body.Close()
14571 }
14572 return nil, gensupport.WrapError(&googleapi.Error{
14573 Code: res.StatusCode,
14574 Header: res.Header,
14575 })
14576 }
14577 if err != nil {
14578 return nil, err
14579 }
14580 defer googleapi.CloseBody(res)
14581 if err := googleapi.CheckResponse(res); err != nil {
14582 return nil, gensupport.WrapError(err)
14583 }
14584 ret := &StudyMetrics{
14585 ServerResponse: googleapi.ServerResponse{
14586 Header: res.Header,
14587 HTTPStatusCode: res.StatusCode,
14588 },
14589 }
14590 target := &ret
14591 b, err := gensupport.DecodeResponseBytes(target, res)
14592 if err != nil {
14593 return nil, err
14594 }
14595 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.getStudyMetrics", "response", internallog.HTTPResponse(res, b))
14596 return ret, nil
14597 }
14598
14599 type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSetBlobStorageSettingsCall struct {
14600 s *Service
14601 resource string
14602 setblobstoragesettingsrequest *SetBlobStorageSettingsRequest
14603 urlParams_ gensupport.URLParams
14604 ctx_ context.Context
14605 header_ http.Header
14606 }
14607
14608 // SetBlobStorageSettings: SetBlobStorageSettings sets the blob storage
14609 // settings of the specified resources.
14610 //
14611 // - resource: The path of the resource to update the blob storage settings in
14612 // the format of
14613 // `projects/{projectID}/locations/{locationID}/datasets/{datasetID}/dicomStor
14614 // es/{dicomStoreID}/dicomWeb/studies/{studyUID}`,
14615 // `projects/{projectID}/locations/{locationID}/datasets/{datasetID}/dicomStor
14616 // es/{dicomStoreID}/dicomWeb/studies/{studyUID}/series/{seriesUID}/`, or
14617 // `projects/{projectID}/locations/{locationID}/datasets/{datasetID}/dicomStor
14618 // es/{dicomStoreID}/dicomWeb/studies/{studyUID}/series/{seriesUID}/instances/
14619 // {instanceUID}`. If `filter_config` is specified, set the value of
14620 // `resource` to the resource name of a DICOM store in the format
14621 // `projects/{projectID}/locations/{locationID}/datasets/{datasetID}/dicomStor
14622 // es/{dicomStoreID}`.
14623 func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesService) SetBlobStorageSettings(resource string, setblobstoragesettingsrequest *SetBlobStorageSettingsRequest) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSetBlobStorageSettingsCall {
14624 c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSetBlobStorageSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14625 c.resource = resource
14626 c.setblobstoragesettingsrequest = setblobstoragesettingsrequest
14627 return c
14628 }
14629
14630 // Fields allows partial responses to be retrieved. See
14631 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14632 // details.
14633 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSetBlobStorageSettingsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSetBlobStorageSettingsCall {
14634 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14635 return c
14636 }
14637
14638 // Context sets the context to be used in this call's Do method.
14639 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSetBlobStorageSettingsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSetBlobStorageSettingsCall {
14640 c.ctx_ = ctx
14641 return c
14642 }
14643
14644 // Header returns a http.Header that can be modified by the caller to add
14645 // headers to the request.
14646 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSetBlobStorageSettingsCall) Header() http.Header {
14647 if c.header_ == nil {
14648 c.header_ = make(http.Header)
14649 }
14650 return c.header_
14651 }
14652
14653 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSetBlobStorageSettingsCall) doRequest(alt string) (*http.Response, error) {
14654 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14655 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setblobstoragesettingsrequest)
14656 if err != nil {
14657 return nil, err
14658 }
14659 c.urlParams_.Set("alt", alt)
14660 c.urlParams_.Set("prettyPrint", "false")
14661 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setBlobStorageSettings")
14662 urls += "?" + c.urlParams_.Encode()
14663 req, err := http.NewRequest("POST", urls, body)
14664 if err != nil {
14665 return nil, err
14666 }
14667 req.Header = reqHeaders
14668 googleapi.Expand(req.URL, map[string]string{
14669 "resource": c.resource,
14670 })
14671 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.setBlobStorageSettings", "request", internallog.HTTPRequest(req, body.Bytes()))
14672 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14673 }
14674
14675 // Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.setBlobStorageSettings" call.
14676 // Any non-2xx status code is an error. Response headers are in either
14677 // *Operation.ServerResponse.Header or (if a response was returned at all) in
14678 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14679 // whether the returned error was because http.StatusNotModified was returned.
14680 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSetBlobStorageSettingsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
14681 gensupport.SetOptions(c.urlParams_, opts...)
14682 res, err := c.doRequest("json")
14683 if res != nil && res.StatusCode == http.StatusNotModified {
14684 if res.Body != nil {
14685 res.Body.Close()
14686 }
14687 return nil, gensupport.WrapError(&googleapi.Error{
14688 Code: res.StatusCode,
14689 Header: res.Header,
14690 })
14691 }
14692 if err != nil {
14693 return nil, err
14694 }
14695 defer googleapi.CloseBody(res)
14696 if err := googleapi.CheckResponse(res); err != nil {
14697 return nil, gensupport.WrapError(err)
14698 }
14699 ret := &Operation{
14700 ServerResponse: googleapi.ServerResponse{
14701 Header: res.Header,
14702 HTTPStatusCode: res.StatusCode,
14703 },
14704 }
14705 target := &ret
14706 b, err := gensupport.DecodeResponseBytes(target, res)
14707 if err != nil {
14708 return nil, err
14709 }
14710 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.setBlobStorageSettings", "response", internallog.HTTPResponse(res, b))
14711 return ret, nil
14712 }
14713
14714 type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesGetSeriesMetricsCall struct {
14715 s *Service
14716 series string
14717 urlParams_ gensupport.URLParams
14718 ifNoneMatch_ string
14719 ctx_ context.Context
14720 header_ http.Header
14721 }
14722
14723 // GetSeriesMetrics: GetSeriesMetrics returns metrics for a series.
14724 //
14725 // - series: The series resource path. For example,
14726 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
14727 // tores/{dicom_store_id}/dicomWeb/studies/{study_uid}/series/{series_uid}`.
14728 func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesService) GetSeriesMetrics(series string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesGetSeriesMetricsCall {
14729 c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesGetSeriesMetricsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14730 c.series = series
14731 return c
14732 }
14733
14734 // Fields allows partial responses to be retrieved. See
14735 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14736 // details.
14737 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesGetSeriesMetricsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesGetSeriesMetricsCall {
14738 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14739 return c
14740 }
14741
14742 // IfNoneMatch sets an optional parameter which makes the operation fail if the
14743 // object's ETag matches the given value. This is useful for getting updates
14744 // only after the object has changed since the last request.
14745 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesGetSeriesMetricsCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesGetSeriesMetricsCall {
14746 c.ifNoneMatch_ = entityTag
14747 return c
14748 }
14749
14750 // Context sets the context to be used in this call's Do method.
14751 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesGetSeriesMetricsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesGetSeriesMetricsCall {
14752 c.ctx_ = ctx
14753 return c
14754 }
14755
14756 // Header returns a http.Header that can be modified by the caller to add
14757 // headers to the request.
14758 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesGetSeriesMetricsCall) Header() http.Header {
14759 if c.header_ == nil {
14760 c.header_ = make(http.Header)
14761 }
14762 return c.header_
14763 }
14764
14765 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesGetSeriesMetricsCall) doRequest(alt string) (*http.Response, error) {
14766 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14767 if c.ifNoneMatch_ != "" {
14768 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14769 }
14770 c.urlParams_.Set("alt", alt)
14771 c.urlParams_.Set("prettyPrint", "false")
14772 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+series}:getSeriesMetrics")
14773 urls += "?" + c.urlParams_.Encode()
14774 req, err := http.NewRequest("GET", urls, nil)
14775 if err != nil {
14776 return nil, err
14777 }
14778 req.Header = reqHeaders
14779 googleapi.Expand(req.URL, map[string]string{
14780 "series": c.series,
14781 })
14782 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.getSeriesMetrics", "request", internallog.HTTPRequest(req, nil))
14783 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14784 }
14785
14786 // Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.getSeriesMetrics" call.
14787 // Any non-2xx status code is an error. Response headers are in either
14788 // *SeriesMetrics.ServerResponse.Header or (if a response was returned at all)
14789 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14790 // whether the returned error was because http.StatusNotModified was returned.
14791 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesGetSeriesMetricsCall) Do(opts ...googleapi.CallOption) (*SeriesMetrics, error) {
14792 gensupport.SetOptions(c.urlParams_, opts...)
14793 res, err := c.doRequest("json")
14794 if res != nil && res.StatusCode == http.StatusNotModified {
14795 if res.Body != nil {
14796 res.Body.Close()
14797 }
14798 return nil, gensupport.WrapError(&googleapi.Error{
14799 Code: res.StatusCode,
14800 Header: res.Header,
14801 })
14802 }
14803 if err != nil {
14804 return nil, err
14805 }
14806 defer googleapi.CloseBody(res)
14807 if err := googleapi.CheckResponse(res); err != nil {
14808 return nil, gensupport.WrapError(err)
14809 }
14810 ret := &SeriesMetrics{
14811 ServerResponse: googleapi.ServerResponse{
14812 Header: res.Header,
14813 HTTPStatusCode: res.StatusCode,
14814 },
14815 }
14816 target := &ret
14817 b, err := gensupport.DecodeResponseBytes(target, res)
14818 if err != nil {
14819 return nil, err
14820 }
14821 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.getSeriesMetrics", "response", internallog.HTTPResponse(res, b))
14822 return ret, nil
14823 }
14824
14825 type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesGetStorageInfoCall struct {
14826 s *Service
14827 resource string
14828 urlParams_ gensupport.URLParams
14829 ifNoneMatch_ string
14830 ctx_ context.Context
14831 header_ http.Header
14832 }
14833
14834 // GetStorageInfo: GetStorageInfo returns the storage info of the specified
14835 // resource.
14836 //
14837 // - resource: The path of the instance to return storage info for, in the
14838 // form:
14839 // `projects/{projectID}/locations/{locationID}/datasets/{datasetID}/dicomStor
14840 // es/{dicomStoreID}/dicomWeb/studies/{studyUID}/series/{seriesUID}/instances/
14841 // {instanceUID}`.
14842 func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesService) GetStorageInfo(resource string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesGetStorageInfoCall {
14843 c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesGetStorageInfoCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14844 c.resource = resource
14845 return c
14846 }
14847
14848 // Fields allows partial responses to be retrieved. See
14849 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14850 // details.
14851 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesGetStorageInfoCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesGetStorageInfoCall {
14852 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14853 return c
14854 }
14855
14856 // IfNoneMatch sets an optional parameter which makes the operation fail if the
14857 // object's ETag matches the given value. This is useful for getting updates
14858 // only after the object has changed since the last request.
14859 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesGetStorageInfoCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesGetStorageInfoCall {
14860 c.ifNoneMatch_ = entityTag
14861 return c
14862 }
14863
14864 // Context sets the context to be used in this call's Do method.
14865 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesGetStorageInfoCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesGetStorageInfoCall {
14866 c.ctx_ = ctx
14867 return c
14868 }
14869
14870 // Header returns a http.Header that can be modified by the caller to add
14871 // headers to the request.
14872 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesGetStorageInfoCall) Header() http.Header {
14873 if c.header_ == nil {
14874 c.header_ = make(http.Header)
14875 }
14876 return c.header_
14877 }
14878
14879 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesGetStorageInfoCall) doRequest(alt string) (*http.Response, error) {
14880 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14881 if c.ifNoneMatch_ != "" {
14882 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14883 }
14884 c.urlParams_.Set("alt", alt)
14885 c.urlParams_.Set("prettyPrint", "false")
14886 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getStorageInfo")
14887 urls += "?" + c.urlParams_.Encode()
14888 req, err := http.NewRequest("GET", urls, nil)
14889 if err != nil {
14890 return nil, err
14891 }
14892 req.Header = reqHeaders
14893 googleapi.Expand(req.URL, map[string]string{
14894 "resource": c.resource,
14895 })
14896 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.getStorageInfo", "request", internallog.HTTPRequest(req, nil))
14897 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14898 }
14899
14900 // Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.getStorageInfo" call.
14901 // Any non-2xx status code is an error. Response headers are in either
14902 // *StorageInfo.ServerResponse.Header or (if a response was returned at all) in
14903 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14904 // whether the returned error was because http.StatusNotModified was returned.
14905 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesGetStorageInfoCall) Do(opts ...googleapi.CallOption) (*StorageInfo, error) {
14906 gensupport.SetOptions(c.urlParams_, opts...)
14907 res, err := c.doRequest("json")
14908 if res != nil && res.StatusCode == http.StatusNotModified {
14909 if res.Body != nil {
14910 res.Body.Close()
14911 }
14912 return nil, gensupport.WrapError(&googleapi.Error{
14913 Code: res.StatusCode,
14914 Header: res.Header,
14915 })
14916 }
14917 if err != nil {
14918 return nil, err
14919 }
14920 defer googleapi.CloseBody(res)
14921 if err := googleapi.CheckResponse(res); err != nil {
14922 return nil, gensupport.WrapError(err)
14923 }
14924 ret := &StorageInfo{
14925 ServerResponse: googleapi.ServerResponse{
14926 Header: res.Header,
14927 HTTPStatusCode: res.StatusCode,
14928 },
14929 }
14930 target := &ret
14931 b, err := gensupport.DecodeResponseBytes(target, res)
14932 if err != nil {
14933 return nil, err
14934 }
14935 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.getStorageInfo", "response", internallog.HTTPResponse(res, b))
14936 return ret, nil
14937 }
14938
14939 type ProjectsLocationsDatasetsDicomStoresStudiesDeleteCall struct {
14940 s *Service
14941 parent string
14942 dicomWebPath string
14943 urlParams_ gensupport.URLParams
14944 ctx_ context.Context
14945 header_ http.Header
14946 }
14947
14948 // Delete: DeleteStudy deletes all instances within the given study. Delete
14949 // requests are equivalent to the GET requests specified in the Retrieve
14950 // transaction. The method returns an Operation which will be marked successful
14951 // when the deletion is complete. Warning: Instances cannot be inserted into a
14952 // study that is being deleted by an operation until the operation completes.
14953 // For samples that show how to call DeleteStudy, see Delete a study, series,
14954 // or instance
14955 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#delete-dicom).
14956 //
14957 // - dicomWebPath: The path of the DeleteStudy request. For example,
14958 // `studies/{study_uid}`.
14959 // - parent: .
14960 func (r *ProjectsLocationsDatasetsDicomStoresStudiesService) Delete(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesDeleteCall {
14961 c := &ProjectsLocationsDatasetsDicomStoresStudiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14962 c.parent = parent
14963 c.dicomWebPath = dicomWebPath
14964 return c
14965 }
14966
14967 // Fields allows partial responses to be retrieved. See
14968 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14969 // details.
14970 func (c *ProjectsLocationsDatasetsDicomStoresStudiesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesDeleteCall {
14971 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14972 return c
14973 }
14974
14975 // Context sets the context to be used in this call's Do method.
14976 func (c *ProjectsLocationsDatasetsDicomStoresStudiesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesDeleteCall {
14977 c.ctx_ = ctx
14978 return c
14979 }
14980
14981 // Header returns a http.Header that can be modified by the caller to add
14982 // headers to the request.
14983 func (c *ProjectsLocationsDatasetsDicomStoresStudiesDeleteCall) Header() http.Header {
14984 if c.header_ == nil {
14985 c.header_ = make(http.Header)
14986 }
14987 return c.header_
14988 }
14989
14990 func (c *ProjectsLocationsDatasetsDicomStoresStudiesDeleteCall) doRequest(alt string) (*http.Response, error) {
14991 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14992 c.urlParams_.Set("alt", alt)
14993 c.urlParams_.Set("prettyPrint", "false")
14994 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}")
14995 urls += "?" + c.urlParams_.Encode()
14996 req, err := http.NewRequest("DELETE", urls, nil)
14997 if err != nil {
14998 return nil, err
14999 }
15000 req.Header = reqHeaders
15001 googleapi.Expand(req.URL, map[string]string{
15002 "parent": c.parent,
15003 "dicomWebPath": c.dicomWebPath,
15004 })
15005 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.studies.delete", "request", internallog.HTTPRequest(req, nil))
15006 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15007 }
15008
15009 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.delete" call.
15010 // Any non-2xx status code is an error. Response headers are in either
15011 // *Operation.ServerResponse.Header or (if a response was returned at all) in
15012 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15013 // whether the returned error was because http.StatusNotModified was returned.
15014 func (c *ProjectsLocationsDatasetsDicomStoresStudiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
15015 gensupport.SetOptions(c.urlParams_, opts...)
15016 res, err := c.doRequest("json")
15017 if res != nil && res.StatusCode == http.StatusNotModified {
15018 if res.Body != nil {
15019 res.Body.Close()
15020 }
15021 return nil, gensupport.WrapError(&googleapi.Error{
15022 Code: res.StatusCode,
15023 Header: res.Header,
15024 })
15025 }
15026 if err != nil {
15027 return nil, err
15028 }
15029 defer googleapi.CloseBody(res)
15030 if err := googleapi.CheckResponse(res); err != nil {
15031 return nil, gensupport.WrapError(err)
15032 }
15033 ret := &Operation{
15034 ServerResponse: googleapi.ServerResponse{
15035 Header: res.Header,
15036 HTTPStatusCode: res.StatusCode,
15037 },
15038 }
15039 target := &ret
15040 b, err := gensupport.DecodeResponseBytes(target, res)
15041 if err != nil {
15042 return nil, err
15043 }
15044 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.studies.delete", "response", internallog.HTTPResponse(res, b))
15045 return ret, nil
15046 }
15047
15048 type ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall struct {
15049 s *Service
15050 parent string
15051 dicomWebPath string
15052 urlParams_ gensupport.URLParams
15053 ifNoneMatch_ string
15054 ctx_ context.Context
15055 header_ http.Header
15056 }
15057
15058 // RetrieveMetadata: RetrieveStudyMetadata returns instance associated with the
15059 // given study presented as metadata. See [RetrieveTransaction]
15060 // (https://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4).
15061 // For details on the implementation of RetrieveStudyMetadata, see Metadata
15062 // resources
15063 // (https://cloud.google.com/healthcare/docs/dicom#metadata_resources) in the
15064 // Cloud Healthcare API conformance statement. For samples that show how to
15065 // call RetrieveStudyMetadata, see Retrieve metadata
15066 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieve-metadata).
15067 //
15068 // - dicomWebPath: The path of the RetrieveStudyMetadata DICOMweb request. For
15069 // example, `studies/{study_uid}/metadata`.
15070 // - parent: The name of the DICOM store that is being accessed. For example,
15071 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
15072 // tores/{dicom_store_id}`.
15073 func (r *ProjectsLocationsDatasetsDicomStoresStudiesService) RetrieveMetadata(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall {
15074 c := &ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15075 c.parent = parent
15076 c.dicomWebPath = dicomWebPath
15077 return c
15078 }
15079
15080 // Fields allows partial responses to be retrieved. See
15081 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15082 // details.
15083 func (c *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall {
15084 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15085 return c
15086 }
15087
15088 // IfNoneMatch sets an optional parameter which makes the operation fail if the
15089 // object's ETag matches the given value. This is useful for getting updates
15090 // only after the object has changed since the last request.
15091 func (c *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall {
15092 c.ifNoneMatch_ = entityTag
15093 return c
15094 }
15095
15096 // Context sets the context to be used in this call's Do method.
15097 func (c *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall {
15098 c.ctx_ = ctx
15099 return c
15100 }
15101
15102 // Header returns a http.Header that can be modified by the caller to add
15103 // headers to the request.
15104 func (c *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall) Header() http.Header {
15105 if c.header_ == nil {
15106 c.header_ = make(http.Header)
15107 }
15108 return c.header_
15109 }
15110
15111 func (c *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall) doRequest(alt string) (*http.Response, error) {
15112 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15113 if c.ifNoneMatch_ != "" {
15114 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15115 }
15116 c.urlParams_.Set("alt", alt)
15117 c.urlParams_.Set("prettyPrint", "false")
15118 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}")
15119 urls += "?" + c.urlParams_.Encode()
15120 req, err := http.NewRequest("GET", urls, nil)
15121 if err != nil {
15122 return nil, err
15123 }
15124 req.Header = reqHeaders
15125 googleapi.Expand(req.URL, map[string]string{
15126 "parent": c.parent,
15127 "dicomWebPath": c.dicomWebPath,
15128 })
15129 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.studies.retrieveMetadata", "request", internallog.HTTPRequest(req, nil))
15130 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15131 }
15132
15133 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.retrieveMetadata" call.
15134 func (c *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
15135 gensupport.SetOptions(c.urlParams_, opts...)
15136 return c.doRequest("")
15137 }
15138
15139 type ProjectsLocationsDatasetsDicomStoresStudiesRetrieveStudyCall struct {
15140 s *Service
15141 parent string
15142 dicomWebPath string
15143 urlParams_ gensupport.URLParams
15144 ifNoneMatch_ string
15145 ctx_ context.Context
15146 header_ http.Header
15147 }
15148
15149 // RetrieveStudy: RetrieveStudy returns all instances within the given study.
15150 // See [RetrieveTransaction]
15151 // (https://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4).
15152 // For details on the implementation of RetrieveStudy, see DICOM
15153 // study/series/instances
15154 // (https://cloud.google.com/healthcare/docs/dicom#dicom_studyseriesinstances)
15155 // in the Cloud Healthcare API conformance statement. For samples that show how
15156 // to call RetrieveStudy, see Retrieve DICOM data
15157 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieve-dicom).
15158 //
15159 // - dicomWebPath: The path of the RetrieveStudy DICOMweb request. For example,
15160 // `studies/{study_uid}`.
15161 // - parent: The name of the DICOM store that is being accessed. For example,
15162 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
15163 // tores/{dicom_store_id}`.
15164 func (r *ProjectsLocationsDatasetsDicomStoresStudiesService) RetrieveStudy(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveStudyCall {
15165 c := &ProjectsLocationsDatasetsDicomStoresStudiesRetrieveStudyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15166 c.parent = parent
15167 c.dicomWebPath = dicomWebPath
15168 return c
15169 }
15170
15171 // Fields allows partial responses to be retrieved. See
15172 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15173 // details.
15174 func (c *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveStudyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveStudyCall {
15175 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15176 return c
15177 }
15178
15179 // IfNoneMatch sets an optional parameter which makes the operation fail if the
15180 // object's ETag matches the given value. This is useful for getting updates
15181 // only after the object has changed since the last request.
15182 func (c *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveStudyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveStudyCall {
15183 c.ifNoneMatch_ = entityTag
15184 return c
15185 }
15186
15187 // Context sets the context to be used in this call's Do method.
15188 func (c *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveStudyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveStudyCall {
15189 c.ctx_ = ctx
15190 return c
15191 }
15192
15193 // Header returns a http.Header that can be modified by the caller to add
15194 // headers to the request.
15195 func (c *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveStudyCall) Header() http.Header {
15196 if c.header_ == nil {
15197 c.header_ = make(http.Header)
15198 }
15199 return c.header_
15200 }
15201
15202 func (c *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveStudyCall) doRequest(alt string) (*http.Response, error) {
15203 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15204 if c.ifNoneMatch_ != "" {
15205 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15206 }
15207 c.urlParams_.Set("alt", alt)
15208 c.urlParams_.Set("prettyPrint", "false")
15209 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}")
15210 urls += "?" + c.urlParams_.Encode()
15211 req, err := http.NewRequest("GET", urls, nil)
15212 if err != nil {
15213 return nil, err
15214 }
15215 req.Header = reqHeaders
15216 googleapi.Expand(req.URL, map[string]string{
15217 "parent": c.parent,
15218 "dicomWebPath": c.dicomWebPath,
15219 })
15220 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.studies.retrieveStudy", "request", internallog.HTTPRequest(req, nil))
15221 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15222 }
15223
15224 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.retrieveStudy" call.
15225 func (c *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveStudyCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
15226 gensupport.SetOptions(c.urlParams_, opts...)
15227 return c.doRequest("")
15228 }
15229
15230 type ProjectsLocationsDatasetsDicomStoresStudiesSearchForInstancesCall struct {
15231 s *Service
15232 parent string
15233 dicomWebPath string
15234 urlParams_ gensupport.URLParams
15235 ifNoneMatch_ string
15236 ctx_ context.Context
15237 header_ http.Header
15238 }
15239
15240 // SearchForInstances: SearchForInstances returns a list of matching instances.
15241 // See [Search Transaction]
15242 // (https://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.6).
15243 // For details on the implementation of SearchForInstances, see Search
15244 // transaction
15245 // (https://cloud.google.com/healthcare/docs/dicom#search_transaction) in the
15246 // Cloud Healthcare API conformance statement. For samples that show how to
15247 // call SearchForInstances, see Search for DICOM data
15248 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#search-dicom).
15249 //
15250 // - dicomWebPath: The path of the SearchForInstancesRequest DICOMweb request.
15251 // For example, `instances`,
15252 // `studies/{study_uid}/series/{series_uid}/instances`, or
15253 // `studies/{study_uid}/instances`.
15254 // - parent: The name of the DICOM store that is being accessed. For example,
15255 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
15256 // tores/{dicom_store_id}`.
15257 func (r *ProjectsLocationsDatasetsDicomStoresStudiesService) SearchForInstances(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSearchForInstancesCall {
15258 c := &ProjectsLocationsDatasetsDicomStoresStudiesSearchForInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15259 c.parent = parent
15260 c.dicomWebPath = dicomWebPath
15261 return c
15262 }
15263
15264 // Fields allows partial responses to be retrieved. See
15265 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15266 // details.
15267 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSearchForInstancesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSearchForInstancesCall {
15268 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15269 return c
15270 }
15271
15272 // IfNoneMatch sets an optional parameter which makes the operation fail if the
15273 // object's ETag matches the given value. This is useful for getting updates
15274 // only after the object has changed since the last request.
15275 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSearchForInstancesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesSearchForInstancesCall {
15276 c.ifNoneMatch_ = entityTag
15277 return c
15278 }
15279
15280 // Context sets the context to be used in this call's Do method.
15281 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSearchForInstancesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSearchForInstancesCall {
15282 c.ctx_ = ctx
15283 return c
15284 }
15285
15286 // Header returns a http.Header that can be modified by the caller to add
15287 // headers to the request.
15288 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSearchForInstancesCall) Header() http.Header {
15289 if c.header_ == nil {
15290 c.header_ = make(http.Header)
15291 }
15292 return c.header_
15293 }
15294
15295 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSearchForInstancesCall) doRequest(alt string) (*http.Response, error) {
15296 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15297 if c.ifNoneMatch_ != "" {
15298 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15299 }
15300 c.urlParams_.Set("alt", alt)
15301 c.urlParams_.Set("prettyPrint", "false")
15302 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}")
15303 urls += "?" + c.urlParams_.Encode()
15304 req, err := http.NewRequest("GET", urls, nil)
15305 if err != nil {
15306 return nil, err
15307 }
15308 req.Header = reqHeaders
15309 googleapi.Expand(req.URL, map[string]string{
15310 "parent": c.parent,
15311 "dicomWebPath": c.dicomWebPath,
15312 })
15313 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.studies.searchForInstances", "request", internallog.HTTPRequest(req, nil))
15314 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15315 }
15316
15317 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.searchForInstances" call.
15318 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSearchForInstancesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
15319 gensupport.SetOptions(c.urlParams_, opts...)
15320 return c.doRequest("")
15321 }
15322
15323 type ProjectsLocationsDatasetsDicomStoresStudiesSearchForSeriesCall struct {
15324 s *Service
15325 parent string
15326 dicomWebPath string
15327 urlParams_ gensupport.URLParams
15328 ifNoneMatch_ string
15329 ctx_ context.Context
15330 header_ http.Header
15331 }
15332
15333 // SearchForSeries: SearchForSeries returns a list of matching series. See
15334 // [Search Transaction]
15335 // (https://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.6).
15336 // For details on the implementation of SearchForSeries, see Search transaction
15337 // (https://cloud.google.com/healthcare/docs/dicom#search_transaction) in the
15338 // Cloud Healthcare API conformance statement. For samples that show how to
15339 // call SearchForSeries, see Search for DICOM data
15340 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#search-dicom).
15341 //
15342 // - dicomWebPath: The path of the SearchForSeries DICOMweb request. For
15343 // example, `series` or `studies/{study_uid}/series`.
15344 // - parent: The name of the DICOM store that is being accessed. For example,
15345 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
15346 // tores/{dicom_store_id}`.
15347 func (r *ProjectsLocationsDatasetsDicomStoresStudiesService) SearchForSeries(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSearchForSeriesCall {
15348 c := &ProjectsLocationsDatasetsDicomStoresStudiesSearchForSeriesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15349 c.parent = parent
15350 c.dicomWebPath = dicomWebPath
15351 return c
15352 }
15353
15354 // Fields allows partial responses to be retrieved. See
15355 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15356 // details.
15357 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSearchForSeriesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSearchForSeriesCall {
15358 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15359 return c
15360 }
15361
15362 // IfNoneMatch sets an optional parameter which makes the operation fail if the
15363 // object's ETag matches the given value. This is useful for getting updates
15364 // only after the object has changed since the last request.
15365 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSearchForSeriesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesSearchForSeriesCall {
15366 c.ifNoneMatch_ = entityTag
15367 return c
15368 }
15369
15370 // Context sets the context to be used in this call's Do method.
15371 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSearchForSeriesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSearchForSeriesCall {
15372 c.ctx_ = ctx
15373 return c
15374 }
15375
15376 // Header returns a http.Header that can be modified by the caller to add
15377 // headers to the request.
15378 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSearchForSeriesCall) Header() http.Header {
15379 if c.header_ == nil {
15380 c.header_ = make(http.Header)
15381 }
15382 return c.header_
15383 }
15384
15385 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSearchForSeriesCall) doRequest(alt string) (*http.Response, error) {
15386 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15387 if c.ifNoneMatch_ != "" {
15388 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15389 }
15390 c.urlParams_.Set("alt", alt)
15391 c.urlParams_.Set("prettyPrint", "false")
15392 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}")
15393 urls += "?" + c.urlParams_.Encode()
15394 req, err := http.NewRequest("GET", urls, nil)
15395 if err != nil {
15396 return nil, err
15397 }
15398 req.Header = reqHeaders
15399 googleapi.Expand(req.URL, map[string]string{
15400 "parent": c.parent,
15401 "dicomWebPath": c.dicomWebPath,
15402 })
15403 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.studies.searchForSeries", "request", internallog.HTTPRequest(req, nil))
15404 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15405 }
15406
15407 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.searchForSeries" call.
15408 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSearchForSeriesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
15409 gensupport.SetOptions(c.urlParams_, opts...)
15410 return c.doRequest("")
15411 }
15412
15413 type ProjectsLocationsDatasetsDicomStoresStudiesStoreInstancesCall struct {
15414 s *Service
15415 parent string
15416 dicomWebPath string
15417 body_ io.Reader
15418 urlParams_ gensupport.URLParams
15419 ctx_ context.Context
15420 header_ http.Header
15421 }
15422
15423 // StoreInstances: StoreInstances stores DICOM instances associated with study
15424 // instance unique identifiers (SUID). See [Store Transaction]
15425 // (https://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.5).
15426 // For details on the implementation of StoreInstances, see Store transaction
15427 // (https://cloud.google.com/healthcare/docs/dicom#store_transaction) in the
15428 // Cloud Healthcare API conformance statement. For samples that show how to
15429 // call StoreInstances, see Store DICOM data
15430 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#store-dicom).
15431 //
15432 // - dicomWebPath: The path of the StoreInstances DICOMweb request. For
15433 // example, `studies/[{study_uid}]`. Note that the `study_uid` is optional.
15434 // - parent: The name of the DICOM store that is being accessed. For example,
15435 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
15436 // tores/{dicom_store_id}`.
15437 func (r *ProjectsLocationsDatasetsDicomStoresStudiesService) StoreInstances(parent string, dicomWebPath string, body_ io.Reader) *ProjectsLocationsDatasetsDicomStoresStudiesStoreInstancesCall {
15438 c := &ProjectsLocationsDatasetsDicomStoresStudiesStoreInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15439 c.parent = parent
15440 c.dicomWebPath = dicomWebPath
15441 c.body_ = body_
15442 return c
15443 }
15444
15445 // Fields allows partial responses to be retrieved. See
15446 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15447 // details.
15448 func (c *ProjectsLocationsDatasetsDicomStoresStudiesStoreInstancesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesStoreInstancesCall {
15449 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15450 return c
15451 }
15452
15453 // Context sets the context to be used in this call's Do method.
15454 func (c *ProjectsLocationsDatasetsDicomStoresStudiesStoreInstancesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesStoreInstancesCall {
15455 c.ctx_ = ctx
15456 return c
15457 }
15458
15459 // Header returns a http.Header that can be modified by the caller to add
15460 // headers to the request.
15461 func (c *ProjectsLocationsDatasetsDicomStoresStudiesStoreInstancesCall) Header() http.Header {
15462 if c.header_ == nil {
15463 c.header_ = make(http.Header)
15464 }
15465 return c.header_
15466 }
15467
15468 func (c *ProjectsLocationsDatasetsDicomStoresStudiesStoreInstancesCall) doRequest(alt string) (*http.Response, error) {
15469 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15470 body := bytes.NewBuffer(nil)
15471 _, err := body.ReadFrom(c.body_)
15472 if err != nil {
15473 return nil, err
15474 }
15475 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}")
15476 urls += "?" + c.urlParams_.Encode()
15477 req, err := http.NewRequest("POST", urls, body)
15478 if err != nil {
15479 return nil, err
15480 }
15481 req.Header = reqHeaders
15482 googleapi.Expand(req.URL, map[string]string{
15483 "parent": c.parent,
15484 "dicomWebPath": c.dicomWebPath,
15485 })
15486 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.studies.storeInstances", "request", internallog.HTTPRequest(req, body.Bytes()))
15487 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15488 }
15489
15490 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.storeInstances" call.
15491 func (c *ProjectsLocationsDatasetsDicomStoresStudiesStoreInstancesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
15492 gensupport.SetOptions(c.urlParams_, opts...)
15493 return c.doRequest("")
15494 }
15495
15496 type ProjectsLocationsDatasetsDicomStoresStudiesSeriesDeleteCall struct {
15497 s *Service
15498 parent string
15499 dicomWebPath string
15500 urlParams_ gensupport.URLParams
15501 ctx_ context.Context
15502 header_ http.Header
15503 }
15504
15505 // Delete: DeleteSeries deletes all instances within the given study and
15506 // series. Delete requests are equivalent to the GET requests specified in the
15507 // Retrieve transaction. The method returns an Operation which will be marked
15508 // successful when the deletion is complete. Warning: Instances cannot be
15509 // inserted into a series that is being deleted by an operation until the
15510 // operation completes. For samples that show how to call DeleteSeries, see
15511 // Delete a study, series, or instance
15512 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#delete-dicom).
15513 //
15514 // - dicomWebPath: The path of the DeleteSeries request. For example,
15515 // `studies/{study_uid}/series/{series_uid}`.
15516 // - parent: The name of the DICOM store that is being accessed. For example,
15517 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
15518 // tores/{dicom_store_id}`.
15519 func (r *ProjectsLocationsDatasetsDicomStoresStudiesSeriesService) Delete(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesDeleteCall {
15520 c := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15521 c.parent = parent
15522 c.dicomWebPath = dicomWebPath
15523 return c
15524 }
15525
15526 // Fields allows partial responses to be retrieved. See
15527 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15528 // details.
15529 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesDeleteCall {
15530 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15531 return c
15532 }
15533
15534 // Context sets the context to be used in this call's Do method.
15535 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesDeleteCall {
15536 c.ctx_ = ctx
15537 return c
15538 }
15539
15540 // Header returns a http.Header that can be modified by the caller to add
15541 // headers to the request.
15542 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesDeleteCall) Header() http.Header {
15543 if c.header_ == nil {
15544 c.header_ = make(http.Header)
15545 }
15546 return c.header_
15547 }
15548
15549 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesDeleteCall) doRequest(alt string) (*http.Response, error) {
15550 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15551 c.urlParams_.Set("alt", alt)
15552 c.urlParams_.Set("prettyPrint", "false")
15553 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}")
15554 urls += "?" + c.urlParams_.Encode()
15555 req, err := http.NewRequest("DELETE", urls, nil)
15556 if err != nil {
15557 return nil, err
15558 }
15559 req.Header = reqHeaders
15560 googleapi.Expand(req.URL, map[string]string{
15561 "parent": c.parent,
15562 "dicomWebPath": c.dicomWebPath,
15563 })
15564 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.studies.series.delete", "request", internallog.HTTPRequest(req, nil))
15565 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15566 }
15567
15568 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.series.delete" call.
15569 // Any non-2xx status code is an error. Response headers are in either
15570 // *Operation.ServerResponse.Header or (if a response was returned at all) in
15571 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15572 // whether the returned error was because http.StatusNotModified was returned.
15573 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
15574 gensupport.SetOptions(c.urlParams_, opts...)
15575 res, err := c.doRequest("json")
15576 if res != nil && res.StatusCode == http.StatusNotModified {
15577 if res.Body != nil {
15578 res.Body.Close()
15579 }
15580 return nil, gensupport.WrapError(&googleapi.Error{
15581 Code: res.StatusCode,
15582 Header: res.Header,
15583 })
15584 }
15585 if err != nil {
15586 return nil, err
15587 }
15588 defer googleapi.CloseBody(res)
15589 if err := googleapi.CheckResponse(res); err != nil {
15590 return nil, gensupport.WrapError(err)
15591 }
15592 ret := &Operation{
15593 ServerResponse: googleapi.ServerResponse{
15594 Header: res.Header,
15595 HTTPStatusCode: res.StatusCode,
15596 },
15597 }
15598 target := &ret
15599 b, err := gensupport.DecodeResponseBytes(target, res)
15600 if err != nil {
15601 return nil, err
15602 }
15603 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.studies.series.delete", "response", internallog.HTTPResponse(res, b))
15604 return ret, nil
15605 }
15606
15607 type ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall struct {
15608 s *Service
15609 parent string
15610 dicomWebPath string
15611 urlParams_ gensupport.URLParams
15612 ifNoneMatch_ string
15613 ctx_ context.Context
15614 header_ http.Header
15615 }
15616
15617 // RetrieveMetadata: RetrieveSeriesMetadata returns instance associated with
15618 // the given study and series, presented as metadata. See [RetrieveTransaction]
15619 // (https://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4).
15620 // For details on the implementation of RetrieveSeriesMetadata, see Metadata
15621 // resources
15622 // (https://cloud.google.com/healthcare/docs/dicom#metadata_resources) in the
15623 // Cloud Healthcare API conformance statement. For samples that show how to
15624 // call RetrieveSeriesMetadata, see Retrieve metadata
15625 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieve-metadata).
15626 //
15627 // - dicomWebPath: The path of the RetrieveSeriesMetadata DICOMweb request. For
15628 // example, `studies/{study_uid}/series/{series_uid}/metadata`.
15629 // - parent: The name of the DICOM store that is being accessed. For example,
15630 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
15631 // tores/{dicom_store_id}`.
15632 func (r *ProjectsLocationsDatasetsDicomStoresStudiesSeriesService) RetrieveMetadata(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall {
15633 c := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15634 c.parent = parent
15635 c.dicomWebPath = dicomWebPath
15636 return c
15637 }
15638
15639 // Fields allows partial responses to be retrieved. See
15640 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15641 // details.
15642 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall {
15643 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15644 return c
15645 }
15646
15647 // IfNoneMatch sets an optional parameter which makes the operation fail if the
15648 // object's ETag matches the given value. This is useful for getting updates
15649 // only after the object has changed since the last request.
15650 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall {
15651 c.ifNoneMatch_ = entityTag
15652 return c
15653 }
15654
15655 // Context sets the context to be used in this call's Do method.
15656 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall {
15657 c.ctx_ = ctx
15658 return c
15659 }
15660
15661 // Header returns a http.Header that can be modified by the caller to add
15662 // headers to the request.
15663 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall) Header() http.Header {
15664 if c.header_ == nil {
15665 c.header_ = make(http.Header)
15666 }
15667 return c.header_
15668 }
15669
15670 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall) doRequest(alt string) (*http.Response, error) {
15671 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15672 if c.ifNoneMatch_ != "" {
15673 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15674 }
15675 c.urlParams_.Set("alt", alt)
15676 c.urlParams_.Set("prettyPrint", "false")
15677 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}")
15678 urls += "?" + c.urlParams_.Encode()
15679 req, err := http.NewRequest("GET", urls, nil)
15680 if err != nil {
15681 return nil, err
15682 }
15683 req.Header = reqHeaders
15684 googleapi.Expand(req.URL, map[string]string{
15685 "parent": c.parent,
15686 "dicomWebPath": c.dicomWebPath,
15687 })
15688 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.studies.series.retrieveMetadata", "request", internallog.HTTPRequest(req, nil))
15689 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15690 }
15691
15692 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.series.retrieveMetadata" call.
15693 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
15694 gensupport.SetOptions(c.urlParams_, opts...)
15695 return c.doRequest("")
15696 }
15697
15698 type ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveSeriesCall struct {
15699 s *Service
15700 parent string
15701 dicomWebPath string
15702 urlParams_ gensupport.URLParams
15703 ifNoneMatch_ string
15704 ctx_ context.Context
15705 header_ http.Header
15706 }
15707
15708 // RetrieveSeries: RetrieveSeries returns all instances within the given study
15709 // and series. See [RetrieveTransaction]
15710 // (https://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4).
15711 // For details on the implementation of RetrieveSeries, see DICOM
15712 // study/series/instances
15713 // (https://cloud.google.com/healthcare/docs/dicom#dicom_studyseriesinstances)
15714 // in the Cloud Healthcare API conformance statement. For samples that show how
15715 // to call RetrieveSeries, see Retrieve DICOM data
15716 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieve-dicom).
15717 //
15718 // - dicomWebPath: The path of the RetrieveSeries DICOMweb request. For
15719 // example, `studies/{study_uid}/series/{series_uid}`.
15720 // - parent: The name of the DICOM store that is being accessed. For example,
15721 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
15722 // tores/{dicom_store_id}`.
15723 func (r *ProjectsLocationsDatasetsDicomStoresStudiesSeriesService) RetrieveSeries(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveSeriesCall {
15724 c := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveSeriesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15725 c.parent = parent
15726 c.dicomWebPath = dicomWebPath
15727 return c
15728 }
15729
15730 // Fields allows partial responses to be retrieved. See
15731 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15732 // details.
15733 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveSeriesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveSeriesCall {
15734 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15735 return c
15736 }
15737
15738 // IfNoneMatch sets an optional parameter which makes the operation fail if the
15739 // object's ETag matches the given value. This is useful for getting updates
15740 // only after the object has changed since the last request.
15741 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveSeriesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveSeriesCall {
15742 c.ifNoneMatch_ = entityTag
15743 return c
15744 }
15745
15746 // Context sets the context to be used in this call's Do method.
15747 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveSeriesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveSeriesCall {
15748 c.ctx_ = ctx
15749 return c
15750 }
15751
15752 // Header returns a http.Header that can be modified by the caller to add
15753 // headers to the request.
15754 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveSeriesCall) Header() http.Header {
15755 if c.header_ == nil {
15756 c.header_ = make(http.Header)
15757 }
15758 return c.header_
15759 }
15760
15761 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveSeriesCall) doRequest(alt string) (*http.Response, error) {
15762 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15763 if c.ifNoneMatch_ != "" {
15764 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15765 }
15766 c.urlParams_.Set("alt", alt)
15767 c.urlParams_.Set("prettyPrint", "false")
15768 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}")
15769 urls += "?" + c.urlParams_.Encode()
15770 req, err := http.NewRequest("GET", urls, nil)
15771 if err != nil {
15772 return nil, err
15773 }
15774 req.Header = reqHeaders
15775 googleapi.Expand(req.URL, map[string]string{
15776 "parent": c.parent,
15777 "dicomWebPath": c.dicomWebPath,
15778 })
15779 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.studies.series.retrieveSeries", "request", internallog.HTTPRequest(req, nil))
15780 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15781 }
15782
15783 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.series.retrieveSeries" call.
15784 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveSeriesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
15785 gensupport.SetOptions(c.urlParams_, opts...)
15786 return c.doRequest("")
15787 }
15788
15789 type ProjectsLocationsDatasetsDicomStoresStudiesSeriesSearchForInstancesCall struct {
15790 s *Service
15791 parent string
15792 dicomWebPath string
15793 urlParams_ gensupport.URLParams
15794 ifNoneMatch_ string
15795 ctx_ context.Context
15796 header_ http.Header
15797 }
15798
15799 // SearchForInstances: SearchForInstances returns a list of matching instances.
15800 // See [Search Transaction]
15801 // (https://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.6).
15802 // For details on the implementation of SearchForInstances, see Search
15803 // transaction
15804 // (https://cloud.google.com/healthcare/docs/dicom#search_transaction) in the
15805 // Cloud Healthcare API conformance statement. For samples that show how to
15806 // call SearchForInstances, see Search for DICOM data
15807 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#search-dicom).
15808 //
15809 // - dicomWebPath: The path of the SearchForInstancesRequest DICOMweb request.
15810 // For example, `instances`,
15811 // `studies/{study_uid}/series/{series_uid}/instances`, or
15812 // `studies/{study_uid}/instances`.
15813 // - parent: The name of the DICOM store that is being accessed. For example,
15814 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
15815 // tores/{dicom_store_id}`.
15816 func (r *ProjectsLocationsDatasetsDicomStoresStudiesSeriesService) SearchForInstances(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesSearchForInstancesCall {
15817 c := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesSearchForInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15818 c.parent = parent
15819 c.dicomWebPath = dicomWebPath
15820 return c
15821 }
15822
15823 // Fields allows partial responses to be retrieved. See
15824 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15825 // details.
15826 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesSearchForInstancesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesSearchForInstancesCall {
15827 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15828 return c
15829 }
15830
15831 // IfNoneMatch sets an optional parameter which makes the operation fail if the
15832 // object's ETag matches the given value. This is useful for getting updates
15833 // only after the object has changed since the last request.
15834 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesSearchForInstancesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesSearchForInstancesCall {
15835 c.ifNoneMatch_ = entityTag
15836 return c
15837 }
15838
15839 // Context sets the context to be used in this call's Do method.
15840 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesSearchForInstancesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesSearchForInstancesCall {
15841 c.ctx_ = ctx
15842 return c
15843 }
15844
15845 // Header returns a http.Header that can be modified by the caller to add
15846 // headers to the request.
15847 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesSearchForInstancesCall) Header() http.Header {
15848 if c.header_ == nil {
15849 c.header_ = make(http.Header)
15850 }
15851 return c.header_
15852 }
15853
15854 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesSearchForInstancesCall) doRequest(alt string) (*http.Response, error) {
15855 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15856 if c.ifNoneMatch_ != "" {
15857 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15858 }
15859 c.urlParams_.Set("alt", alt)
15860 c.urlParams_.Set("prettyPrint", "false")
15861 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}")
15862 urls += "?" + c.urlParams_.Encode()
15863 req, err := http.NewRequest("GET", urls, nil)
15864 if err != nil {
15865 return nil, err
15866 }
15867 req.Header = reqHeaders
15868 googleapi.Expand(req.URL, map[string]string{
15869 "parent": c.parent,
15870 "dicomWebPath": c.dicomWebPath,
15871 })
15872 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.studies.series.searchForInstances", "request", internallog.HTTPRequest(req, nil))
15873 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15874 }
15875
15876 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.series.searchForInstances" call.
15877 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesSearchForInstancesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
15878 gensupport.SetOptions(c.urlParams_, opts...)
15879 return c.doRequest("")
15880 }
15881
15882 type ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesDeleteCall struct {
15883 s *Service
15884 parent string
15885 dicomWebPath string
15886 urlParams_ gensupport.URLParams
15887 ctx_ context.Context
15888 header_ http.Header
15889 }
15890
15891 // Delete: DeleteInstance deletes an instance associated with the given study,
15892 // series, and SOP Instance UID. Delete requests are equivalent to the GET
15893 // requests specified in the Retrieve transaction. Study and series search
15894 // results can take a few seconds to be updated after an instance is deleted
15895 // using DeleteInstance. For samples that show how to call DeleteInstance, see
15896 // Delete a study, series, or instance
15897 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#delete-dicom).
15898 //
15899 // - dicomWebPath: The path of the DeleteInstance request. For example,
15900 // `studies/{study_uid}/series/{series_uid}/instances/{instance_uid}`.
15901 // - parent: The name of the DICOM store that is being accessed. For example,
15902 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
15903 // tores/{dicom_store_id}`.
15904 func (r *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesService) Delete(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesDeleteCall {
15905 c := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15906 c.parent = parent
15907 c.dicomWebPath = dicomWebPath
15908 return c
15909 }
15910
15911 // Fields allows partial responses to be retrieved. See
15912 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15913 // details.
15914 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesDeleteCall {
15915 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15916 return c
15917 }
15918
15919 // Context sets the context to be used in this call's Do method.
15920 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesDeleteCall {
15921 c.ctx_ = ctx
15922 return c
15923 }
15924
15925 // Header returns a http.Header that can be modified by the caller to add
15926 // headers to the request.
15927 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesDeleteCall) Header() http.Header {
15928 if c.header_ == nil {
15929 c.header_ = make(http.Header)
15930 }
15931 return c.header_
15932 }
15933
15934 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
15935 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15936 c.urlParams_.Set("alt", alt)
15937 c.urlParams_.Set("prettyPrint", "false")
15938 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}")
15939 urls += "?" + c.urlParams_.Encode()
15940 req, err := http.NewRequest("DELETE", urls, nil)
15941 if err != nil {
15942 return nil, err
15943 }
15944 req.Header = reqHeaders
15945 googleapi.Expand(req.URL, map[string]string{
15946 "parent": c.parent,
15947 "dicomWebPath": c.dicomWebPath,
15948 })
15949 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.delete", "request", internallog.HTTPRequest(req, nil))
15950 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15951 }
15952
15953 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.delete" call.
15954 // Any non-2xx status code is an error. Response headers are in either
15955 // *Empty.ServerResponse.Header or (if a response was returned at all) in
15956 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15957 // whether the returned error was because http.StatusNotModified was returned.
15958 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
15959 gensupport.SetOptions(c.urlParams_, opts...)
15960 res, err := c.doRequest("json")
15961 if res != nil && res.StatusCode == http.StatusNotModified {
15962 if res.Body != nil {
15963 res.Body.Close()
15964 }
15965 return nil, gensupport.WrapError(&googleapi.Error{
15966 Code: res.StatusCode,
15967 Header: res.Header,
15968 })
15969 }
15970 if err != nil {
15971 return nil, err
15972 }
15973 defer googleapi.CloseBody(res)
15974 if err := googleapi.CheckResponse(res); err != nil {
15975 return nil, gensupport.WrapError(err)
15976 }
15977 ret := &Empty{
15978 ServerResponse: googleapi.ServerResponse{
15979 Header: res.Header,
15980 HTTPStatusCode: res.StatusCode,
15981 },
15982 }
15983 target := &ret
15984 b, err := gensupport.DecodeResponseBytes(target, res)
15985 if err != nil {
15986 return nil, err
15987 }
15988 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.delete", "response", internallog.HTTPResponse(res, b))
15989 return ret, nil
15990 }
15991
15992 type ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveInstanceCall struct {
15993 s *Service
15994 parent string
15995 dicomWebPath string
15996 urlParams_ gensupport.URLParams
15997 ifNoneMatch_ string
15998 ctx_ context.Context
15999 header_ http.Header
16000 }
16001
16002 // RetrieveInstance: RetrieveInstance returns instance associated with the
16003 // given study, series, and SOP Instance UID. See [RetrieveTransaction]
16004 // (https://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4).
16005 // For details on the implementation of RetrieveInstance, see DICOM
16006 // study/series/instances
16007 // (https://cloud.google.com/healthcare/docs/dicom#dicom_studyseriesinstances)
16008 // and DICOM instances
16009 // (https://cloud.google.com/healthcare/docs/dicom#dicom_instances) in the
16010 // Cloud Healthcare API conformance statement. For samples that show how to
16011 // call RetrieveInstance, see Retrieve an instance
16012 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieve-instance).
16013 //
16014 // - dicomWebPath: The path of the RetrieveInstance DICOMweb request. For
16015 // example,
16016 // `studies/{study_uid}/series/{series_uid}/instances/{instance_uid}`.
16017 // - parent: The name of the DICOM store that is being accessed. For example,
16018 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
16019 // tores/{dicom_store_id}`.
16020 func (r *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesService) RetrieveInstance(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveInstanceCall {
16021 c := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16022 c.parent = parent
16023 c.dicomWebPath = dicomWebPath
16024 return c
16025 }
16026
16027 // Fields allows partial responses to be retrieved. See
16028 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
16029 // details.
16030 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveInstanceCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveInstanceCall {
16031 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16032 return c
16033 }
16034
16035 // IfNoneMatch sets an optional parameter which makes the operation fail if the
16036 // object's ETag matches the given value. This is useful for getting updates
16037 // only after the object has changed since the last request.
16038 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveInstanceCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveInstanceCall {
16039 c.ifNoneMatch_ = entityTag
16040 return c
16041 }
16042
16043 // Context sets the context to be used in this call's Do method.
16044 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveInstanceCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveInstanceCall {
16045 c.ctx_ = ctx
16046 return c
16047 }
16048
16049 // Header returns a http.Header that can be modified by the caller to add
16050 // headers to the request.
16051 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveInstanceCall) Header() http.Header {
16052 if c.header_ == nil {
16053 c.header_ = make(http.Header)
16054 }
16055 return c.header_
16056 }
16057
16058 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveInstanceCall) doRequest(alt string) (*http.Response, error) {
16059 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16060 if c.ifNoneMatch_ != "" {
16061 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16062 }
16063 c.urlParams_.Set("alt", alt)
16064 c.urlParams_.Set("prettyPrint", "false")
16065 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}")
16066 urls += "?" + c.urlParams_.Encode()
16067 req, err := http.NewRequest("GET", urls, nil)
16068 if err != nil {
16069 return nil, err
16070 }
16071 req.Header = reqHeaders
16072 googleapi.Expand(req.URL, map[string]string{
16073 "parent": c.parent,
16074 "dicomWebPath": c.dicomWebPath,
16075 })
16076 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.retrieveInstance", "request", internallog.HTTPRequest(req, nil))
16077 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16078 }
16079
16080 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.retrieveInstance" call.
16081 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveInstanceCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
16082 gensupport.SetOptions(c.urlParams_, opts...)
16083 return c.doRequest("")
16084 }
16085
16086 type ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataCall struct {
16087 s *Service
16088 parent string
16089 dicomWebPath string
16090 urlParams_ gensupport.URLParams
16091 ifNoneMatch_ string
16092 ctx_ context.Context
16093 header_ http.Header
16094 }
16095
16096 // RetrieveMetadata: RetrieveInstanceMetadata returns instance associated with
16097 // the given study, series, and SOP Instance UID presented as metadata. See
16098 // [RetrieveTransaction]
16099 // (https://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4).
16100 // For details on the implementation of RetrieveInstanceMetadata, see Metadata
16101 // resources
16102 // (https://cloud.google.com/healthcare/docs/dicom#metadata_resources) in the
16103 // Cloud Healthcare API conformance statement. For samples that show how to
16104 // call RetrieveInstanceMetadata, see Retrieve metadata
16105 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieve-metadata).
16106 //
16107 // - dicomWebPath: The path of the RetrieveInstanceMetadata DICOMweb request.
16108 // For example,
16109 // `studies/{study_uid}/series/{series_uid}/instances/{instance_uid}/metadata`
16110 // .
16111 // - parent: The name of the DICOM store that is being accessed. For example,
16112 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
16113 // tores/{dicom_store_id}`.
16114 func (r *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesService) RetrieveMetadata(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataCall {
16115 c := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16116 c.parent = parent
16117 c.dicomWebPath = dicomWebPath
16118 return c
16119 }
16120
16121 // Fields allows partial responses to be retrieved. See
16122 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
16123 // details.
16124 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataCall {
16125 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16126 return c
16127 }
16128
16129 // IfNoneMatch sets an optional parameter which makes the operation fail if the
16130 // object's ETag matches the given value. This is useful for getting updates
16131 // only after the object has changed since the last request.
16132 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataCall {
16133 c.ifNoneMatch_ = entityTag
16134 return c
16135 }
16136
16137 // Context sets the context to be used in this call's Do method.
16138 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataCall {
16139 c.ctx_ = ctx
16140 return c
16141 }
16142
16143 // Header returns a http.Header that can be modified by the caller to add
16144 // headers to the request.
16145 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataCall) Header() http.Header {
16146 if c.header_ == nil {
16147 c.header_ = make(http.Header)
16148 }
16149 return c.header_
16150 }
16151
16152 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataCall) doRequest(alt string) (*http.Response, error) {
16153 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16154 if c.ifNoneMatch_ != "" {
16155 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16156 }
16157 c.urlParams_.Set("alt", alt)
16158 c.urlParams_.Set("prettyPrint", "false")
16159 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}")
16160 urls += "?" + c.urlParams_.Encode()
16161 req, err := http.NewRequest("GET", urls, nil)
16162 if err != nil {
16163 return nil, err
16164 }
16165 req.Header = reqHeaders
16166 googleapi.Expand(req.URL, map[string]string{
16167 "parent": c.parent,
16168 "dicomWebPath": c.dicomWebPath,
16169 })
16170 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.retrieveMetadata", "request", internallog.HTTPRequest(req, nil))
16171 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16172 }
16173
16174 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.retrieveMetadata" call.
16175 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
16176 gensupport.SetOptions(c.urlParams_, opts...)
16177 return c.doRequest("")
16178 }
16179
16180 type ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall struct {
16181 s *Service
16182 parent string
16183 dicomWebPath string
16184 urlParams_ gensupport.URLParams
16185 ifNoneMatch_ string
16186 ctx_ context.Context
16187 header_ http.Header
16188 }
16189
16190 // RetrieveRendered: RetrieveRenderedInstance returns instance associated with
16191 // the given study, series, and SOP Instance UID in an acceptable Rendered
16192 // Media Type. See [RetrieveTransaction]
16193 // (https://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4).
16194 // For details on the implementation of RetrieveRenderedInstance, see Rendered
16195 // resources
16196 // (https://cloud.google.com/healthcare/docs/dicom#rendered_resources) in the
16197 // Cloud Healthcare API conformance statement. For samples that show how to
16198 // call RetrieveRenderedInstance, see Retrieve consumer image formats
16199 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieve-consumer).
16200 //
16201 // - dicomWebPath: The path of the RetrieveRenderedInstance DICOMweb request.
16202 // For example,
16203 // `studies/{study_uid}/series/{series_uid}/instances/{instance_uid}/rendered`
16204 // .
16205 // - parent: The name of the DICOM store that is being accessed. For example,
16206 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
16207 // tores/{dicom_store_id}`.
16208 func (r *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesService) RetrieveRendered(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall {
16209 c := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16210 c.parent = parent
16211 c.dicomWebPath = dicomWebPath
16212 return c
16213 }
16214
16215 // Viewport sets the optional parameter "viewport": The viewport setting to use
16216 // as specified in
16217 // https://dicom.nema.org/medical/dicom/current/output/chtml/part18/sect_8.3.5.html#sect_8.3.5.1.3
16218 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall) Viewport(viewport string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall {
16219 c.urlParams_.Set("viewport", viewport)
16220 return c
16221 }
16222
16223 // Fields allows partial responses to be retrieved. See
16224 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
16225 // details.
16226 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall {
16227 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16228 return c
16229 }
16230
16231 // IfNoneMatch sets an optional parameter which makes the operation fail if the
16232 // object's ETag matches the given value. This is useful for getting updates
16233 // only after the object has changed since the last request.
16234 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall {
16235 c.ifNoneMatch_ = entityTag
16236 return c
16237 }
16238
16239 // Context sets the context to be used in this call's Do method.
16240 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall {
16241 c.ctx_ = ctx
16242 return c
16243 }
16244
16245 // Header returns a http.Header that can be modified by the caller to add
16246 // headers to the request.
16247 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall) Header() http.Header {
16248 if c.header_ == nil {
16249 c.header_ = make(http.Header)
16250 }
16251 return c.header_
16252 }
16253
16254 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall) doRequest(alt string) (*http.Response, error) {
16255 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16256 if c.ifNoneMatch_ != "" {
16257 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16258 }
16259 c.urlParams_.Set("alt", alt)
16260 c.urlParams_.Set("prettyPrint", "false")
16261 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}")
16262 urls += "?" + c.urlParams_.Encode()
16263 req, err := http.NewRequest("GET", urls, nil)
16264 if err != nil {
16265 return nil, err
16266 }
16267 req.Header = reqHeaders
16268 googleapi.Expand(req.URL, map[string]string{
16269 "parent": c.parent,
16270 "dicomWebPath": c.dicomWebPath,
16271 })
16272 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.retrieveRendered", "request", internallog.HTTPRequest(req, nil))
16273 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16274 }
16275
16276 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.retrieveRendered" call.
16277 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
16278 gensupport.SetOptions(c.urlParams_, opts...)
16279 return c.doRequest("")
16280 }
16281
16282 type ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesBulkdataRetrieveBulkdataCall struct {
16283 s *Service
16284 parent string
16285 dicomWebPath string
16286 urlParams_ gensupport.URLParams
16287 ifNoneMatch_ string
16288 ctx_ context.Context
16289 header_ http.Header
16290 }
16291
16292 // RetrieveBulkdata: Returns uncompressed, unencoded bytes representing the
16293 // referenced bulkdata tag from an instance. See Retrieve Transaction
16294 // (https://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4).
16295 // For details on the implementation of RetrieveBulkdata, see Bulkdata
16296 // resources
16297 // (https://cloud.google.com/healthcare/docs/dicom#bulkdata-resources) in the
16298 // Cloud Healthcare API conformance statement. For samples that show how to
16299 // call RetrieveBulkdata, see Retrieve bulkdata
16300 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieve-bulkdata).
16301 //
16302 // - dicomWebPath: The path for the `RetrieveBulkdata` DICOMweb request. For
16303 // example,
16304 // `studies/{study_uid}/series/{series_uid}/instances/{instance_uid}/bukdata/{
16305 // bulkdata_uri}`.
16306 // - parent: The name of the DICOM store that is being accessed. For example,
16307 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
16308 // tores/{dicom_store_id}`.
16309 func (r *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesBulkdataService) RetrieveBulkdata(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesBulkdataRetrieveBulkdataCall {
16310 c := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesBulkdataRetrieveBulkdataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16311 c.parent = parent
16312 c.dicomWebPath = dicomWebPath
16313 return c
16314 }
16315
16316 // Fields allows partial responses to be retrieved. See
16317 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
16318 // details.
16319 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesBulkdataRetrieveBulkdataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesBulkdataRetrieveBulkdataCall {
16320 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16321 return c
16322 }
16323
16324 // IfNoneMatch sets an optional parameter which makes the operation fail if the
16325 // object's ETag matches the given value. This is useful for getting updates
16326 // only after the object has changed since the last request.
16327 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesBulkdataRetrieveBulkdataCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesBulkdataRetrieveBulkdataCall {
16328 c.ifNoneMatch_ = entityTag
16329 return c
16330 }
16331
16332 // Context sets the context to be used in this call's Do method.
16333 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesBulkdataRetrieveBulkdataCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesBulkdataRetrieveBulkdataCall {
16334 c.ctx_ = ctx
16335 return c
16336 }
16337
16338 // Header returns a http.Header that can be modified by the caller to add
16339 // headers to the request.
16340 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesBulkdataRetrieveBulkdataCall) Header() http.Header {
16341 if c.header_ == nil {
16342 c.header_ = make(http.Header)
16343 }
16344 return c.header_
16345 }
16346
16347 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesBulkdataRetrieveBulkdataCall) doRequest(alt string) (*http.Response, error) {
16348 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16349 if c.ifNoneMatch_ != "" {
16350 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16351 }
16352 c.urlParams_.Set("alt", alt)
16353 c.urlParams_.Set("prettyPrint", "false")
16354 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}")
16355 urls += "?" + c.urlParams_.Encode()
16356 req, err := http.NewRequest("GET", urls, nil)
16357 if err != nil {
16358 return nil, err
16359 }
16360 req.Header = reqHeaders
16361 googleapi.Expand(req.URL, map[string]string{
16362 "parent": c.parent,
16363 "dicomWebPath": c.dicomWebPath,
16364 })
16365 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.bulkdata.retrieveBulkdata", "request", internallog.HTTPRequest(req, nil))
16366 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16367 }
16368
16369 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.bulkdata.retrieveBulkdata" call.
16370 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesBulkdataRetrieveBulkdataCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
16371 gensupport.SetOptions(c.urlParams_, opts...)
16372 return c.doRequest("")
16373 }
16374
16375 type ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveFramesCall struct {
16376 s *Service
16377 parent string
16378 dicomWebPath string
16379 urlParams_ gensupport.URLParams
16380 ifNoneMatch_ string
16381 ctx_ context.Context
16382 header_ http.Header
16383 }
16384
16385 // RetrieveFrames: RetrieveFrames returns instances associated with the given
16386 // study, series, SOP Instance UID and frame numbers. See [RetrieveTransaction]
16387 // (https://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4}.
16388 // For details on the implementation of RetrieveFrames, see DICOM frames
16389 // (https://cloud.google.com/healthcare/docs/dicom#dicom_frames) in the Cloud
16390 // Healthcare API conformance statement. For samples that show how to call
16391 // RetrieveFrames, see Retrieve DICOM data
16392 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieve-dicom).
16393 //
16394 // - dicomWebPath: The path of the RetrieveFrames DICOMweb request. For
16395 // example,
16396 // `studies/{study_uid}/series/{series_uid}/instances/{instance_uid}/frames/{f
16397 // rame_list}`.
16398 // - parent: The name of the DICOM store that is being accessed. For example,
16399 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
16400 // tores/{dicom_store_id}`.
16401 func (r *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesService) RetrieveFrames(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveFramesCall {
16402 c := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveFramesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16403 c.parent = parent
16404 c.dicomWebPath = dicomWebPath
16405 return c
16406 }
16407
16408 // Fields allows partial responses to be retrieved. See
16409 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
16410 // details.
16411 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveFramesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveFramesCall {
16412 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16413 return c
16414 }
16415
16416 // IfNoneMatch sets an optional parameter which makes the operation fail if the
16417 // object's ETag matches the given value. This is useful for getting updates
16418 // only after the object has changed since the last request.
16419 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveFramesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveFramesCall {
16420 c.ifNoneMatch_ = entityTag
16421 return c
16422 }
16423
16424 // Context sets the context to be used in this call's Do method.
16425 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveFramesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveFramesCall {
16426 c.ctx_ = ctx
16427 return c
16428 }
16429
16430 // Header returns a http.Header that can be modified by the caller to add
16431 // headers to the request.
16432 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveFramesCall) Header() http.Header {
16433 if c.header_ == nil {
16434 c.header_ = make(http.Header)
16435 }
16436 return c.header_
16437 }
16438
16439 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveFramesCall) doRequest(alt string) (*http.Response, error) {
16440 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16441 if c.ifNoneMatch_ != "" {
16442 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16443 }
16444 c.urlParams_.Set("alt", alt)
16445 c.urlParams_.Set("prettyPrint", "false")
16446 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}")
16447 urls += "?" + c.urlParams_.Encode()
16448 req, err := http.NewRequest("GET", urls, nil)
16449 if err != nil {
16450 return nil, err
16451 }
16452 req.Header = reqHeaders
16453 googleapi.Expand(req.URL, map[string]string{
16454 "parent": c.parent,
16455 "dicomWebPath": c.dicomWebPath,
16456 })
16457 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.frames.retrieveFrames", "request", internallog.HTTPRequest(req, nil))
16458 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16459 }
16460
16461 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.frames.retrieveFrames" call.
16462 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveFramesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
16463 gensupport.SetOptions(c.urlParams_, opts...)
16464 return c.doRequest("")
16465 }
16466
16467 type ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall struct {
16468 s *Service
16469 parent string
16470 dicomWebPath string
16471 urlParams_ gensupport.URLParams
16472 ifNoneMatch_ string
16473 ctx_ context.Context
16474 header_ http.Header
16475 }
16476
16477 // RetrieveRendered: RetrieveRenderedFrames returns instances associated with
16478 // the given study, series, SOP Instance UID and frame numbers in an acceptable
16479 // Rendered Media Type. See [RetrieveTransaction]
16480 // (https://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4).
16481 // For details on the implementation of RetrieveRenderedFrames, see Rendered
16482 // resources
16483 // (https://cloud.google.com/healthcare/docs/dicom#rendered_resources) in the
16484 // Cloud Healthcare API conformance statement. For samples that show how to
16485 // call RetrieveRenderedFrames, see Retrieve consumer image formats
16486 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieve-consumer).
16487 //
16488 // - dicomWebPath: The path of the RetrieveRenderedFrames DICOMweb request. For
16489 // example,
16490 // `studies/{study_uid}/series/{series_uid}/instances/{instance_uid}/frames/{f
16491 // rame_list}/rendered`.
16492 // - parent: The name of the DICOM store that is being accessed. For example,
16493 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
16494 // tores/{dicom_store_id}`.
16495 func (r *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesService) RetrieveRendered(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall {
16496 c := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16497 c.parent = parent
16498 c.dicomWebPath = dicomWebPath
16499 return c
16500 }
16501
16502 // Viewport sets the optional parameter "viewport": The viewport setting to use
16503 // as specified in
16504 // https://dicom.nema.org/medical/dicom/current/output/chtml/part18/sect_8.3.5.html#sect_8.3.5.1.3
16505 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall) Viewport(viewport string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall {
16506 c.urlParams_.Set("viewport", viewport)
16507 return c
16508 }
16509
16510 // Fields allows partial responses to be retrieved. See
16511 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
16512 // details.
16513 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall {
16514 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16515 return c
16516 }
16517
16518 // IfNoneMatch sets an optional parameter which makes the operation fail if the
16519 // object's ETag matches the given value. This is useful for getting updates
16520 // only after the object has changed since the last request.
16521 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall {
16522 c.ifNoneMatch_ = entityTag
16523 return c
16524 }
16525
16526 // Context sets the context to be used in this call's Do method.
16527 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall {
16528 c.ctx_ = ctx
16529 return c
16530 }
16531
16532 // Header returns a http.Header that can be modified by the caller to add
16533 // headers to the request.
16534 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall) Header() http.Header {
16535 if c.header_ == nil {
16536 c.header_ = make(http.Header)
16537 }
16538 return c.header_
16539 }
16540
16541 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall) doRequest(alt string) (*http.Response, error) {
16542 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16543 if c.ifNoneMatch_ != "" {
16544 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16545 }
16546 c.urlParams_.Set("alt", alt)
16547 c.urlParams_.Set("prettyPrint", "false")
16548 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dicomWeb/{+dicomWebPath}")
16549 urls += "?" + c.urlParams_.Encode()
16550 req, err := http.NewRequest("GET", urls, nil)
16551 if err != nil {
16552 return nil, err
16553 }
16554 req.Header = reqHeaders
16555 googleapi.Expand(req.URL, map[string]string{
16556 "parent": c.parent,
16557 "dicomWebPath": c.dicomWebPath,
16558 })
16559 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.frames.retrieveRendered", "request", internallog.HTTPRequest(req, nil))
16560 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16561 }
16562
16563 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.frames.retrieveRendered" call.
16564 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
16565 gensupport.SetOptions(c.urlParams_, opts...)
16566 return c.doRequest("")
16567 }
16568
16569 type ProjectsLocationsDatasetsFhirStoresApplyAdminConsentsCall struct {
16570 s *Service
16571 name string
16572 applyadminconsentsrequest *ApplyAdminConsentsRequest
16573 urlParams_ gensupport.URLParams
16574 ctx_ context.Context
16575 header_ http.Header
16576 }
16577
16578 // ApplyAdminConsents: Applies the admin Consent resources for the FHIR store
16579 // and reindexes the underlying resources in the FHIR store according to the
16580 // aggregate consents. This method also updates the
16581 // `consent_config.enforced_admin_consents` field of the FhirStore unless
16582 // `validate_only=true` in ApplyAdminConsentsRequest. Any admin Consent
16583 // resource change after this operation execution (including deletion) requires
16584 // you to call ApplyAdminConsents again for the change to take effect. This
16585 // method returns an Operation that can be used to track the progress of the
16586 // resources that were reindexed, by calling GetOperation. Upon completion, the
16587 // ApplyAdminConsentsResponse additionally contains the number of resources
16588 // that were reindexed. If at least one Consent resource contains an error or
16589 // fails be be enforced for any reason, the method returns an error instead of
16590 // an Operation. No resources will be reindexed and the
16591 // `consent_config.enforced_admin_consents` field will be unchanged. To enforce
16592 // a consent check for data access, `consent_config.access_enforced` must be
16593 // set to true for the FhirStore. FHIR Consent is not supported in DSTU2 or R5.
16594 //
16595 // - name: The name of the FHIR store to enforce, in the format
16596 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirSt
16597 // ores/{fhir_store_id}`.
16598 func (r *ProjectsLocationsDatasetsFhirStoresService) ApplyAdminConsents(name string, applyadminconsentsrequest *ApplyAdminConsentsRequest) *ProjectsLocationsDatasetsFhirStoresApplyAdminConsentsCall {
16599 c := &ProjectsLocationsDatasetsFhirStoresApplyAdminConsentsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16600 c.name = name
16601 c.applyadminconsentsrequest = applyadminconsentsrequest
16602 return c
16603 }
16604
16605 // Fields allows partial responses to be retrieved. See
16606 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
16607 // details.
16608 func (c *ProjectsLocationsDatasetsFhirStoresApplyAdminConsentsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresApplyAdminConsentsCall {
16609 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16610 return c
16611 }
16612
16613 // Context sets the context to be used in this call's Do method.
16614 func (c *ProjectsLocationsDatasetsFhirStoresApplyAdminConsentsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresApplyAdminConsentsCall {
16615 c.ctx_ = ctx
16616 return c
16617 }
16618
16619 // Header returns a http.Header that can be modified by the caller to add
16620 // headers to the request.
16621 func (c *ProjectsLocationsDatasetsFhirStoresApplyAdminConsentsCall) Header() http.Header {
16622 if c.header_ == nil {
16623 c.header_ = make(http.Header)
16624 }
16625 return c.header_
16626 }
16627
16628 func (c *ProjectsLocationsDatasetsFhirStoresApplyAdminConsentsCall) doRequest(alt string) (*http.Response, error) {
16629 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
16630 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.applyadminconsentsrequest)
16631 if err != nil {
16632 return nil, err
16633 }
16634 c.urlParams_.Set("alt", alt)
16635 c.urlParams_.Set("prettyPrint", "false")
16636 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:applyAdminConsents")
16637 urls += "?" + c.urlParams_.Encode()
16638 req, err := http.NewRequest("POST", urls, body)
16639 if err != nil {
16640 return nil, err
16641 }
16642 req.Header = reqHeaders
16643 googleapi.Expand(req.URL, map[string]string{
16644 "name": c.name,
16645 })
16646 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.applyAdminConsents", "request", internallog.HTTPRequest(req, body.Bytes()))
16647 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16648 }
16649
16650 // Do executes the "healthcare.projects.locations.datasets.fhirStores.applyAdminConsents" call.
16651 // Any non-2xx status code is an error. Response headers are in either
16652 // *Operation.ServerResponse.Header or (if a response was returned at all) in
16653 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
16654 // whether the returned error was because http.StatusNotModified was returned.
16655 func (c *ProjectsLocationsDatasetsFhirStoresApplyAdminConsentsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
16656 gensupport.SetOptions(c.urlParams_, opts...)
16657 res, err := c.doRequest("json")
16658 if res != nil && res.StatusCode == http.StatusNotModified {
16659 if res.Body != nil {
16660 res.Body.Close()
16661 }
16662 return nil, gensupport.WrapError(&googleapi.Error{
16663 Code: res.StatusCode,
16664 Header: res.Header,
16665 })
16666 }
16667 if err != nil {
16668 return nil, err
16669 }
16670 defer googleapi.CloseBody(res)
16671 if err := googleapi.CheckResponse(res); err != nil {
16672 return nil, gensupport.WrapError(err)
16673 }
16674 ret := &Operation{
16675 ServerResponse: googleapi.ServerResponse{
16676 Header: res.Header,
16677 HTTPStatusCode: res.StatusCode,
16678 },
16679 }
16680 target := &ret
16681 b, err := gensupport.DecodeResponseBytes(target, res)
16682 if err != nil {
16683 return nil, err
16684 }
16685 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.applyAdminConsents", "response", internallog.HTTPResponse(res, b))
16686 return ret, nil
16687 }
16688
16689 type ProjectsLocationsDatasetsFhirStoresApplyConsentsCall struct {
16690 s *Service
16691 name string
16692 applyconsentsrequest *ApplyConsentsRequest
16693 urlParams_ gensupport.URLParams
16694 ctx_ context.Context
16695 header_ http.Header
16696 }
16697
16698 // ApplyConsents: Apply the Consent resources for the FHIR store and reindex
16699 // the underlying resources in the FHIR store according to the aggregate
16700 // consent. The aggregate consent of the patient in scope in this request
16701 // replaces any previous call of this method. Any Consent resource change after
16702 // this operation execution (including deletion) requires you to call
16703 // ApplyConsents again to have effect. This method returns an Operation that
16704 // can be used to track the progress of the consent resources that were
16705 // processed by calling GetOperation. Upon completion, the
16706 // ApplyConsentsResponse additionally contains the number of resources that was
16707 // reindexed. Errors are logged to Cloud Logging (see Viewing error logs in
16708 // Cloud Logging (https://cloud.google.com/healthcare/docs/how-tos/logging)).
16709 // To enforce consent check for data access, `consent_config.access_enforced`
16710 // must be set to true for the FhirStore. FHIR Consent is not supported in
16711 // DSTU2 or R5.
16712 //
16713 // - name: The name of the FHIR store to enforce, in the format
16714 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirSt
16715 // ores/{fhir_store_id}`.
16716 func (r *ProjectsLocationsDatasetsFhirStoresService) ApplyConsents(name string, applyconsentsrequest *ApplyConsentsRequest) *ProjectsLocationsDatasetsFhirStoresApplyConsentsCall {
16717 c := &ProjectsLocationsDatasetsFhirStoresApplyConsentsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16718 c.name = name
16719 c.applyconsentsrequest = applyconsentsrequest
16720 return c
16721 }
16722
16723 // Fields allows partial responses to be retrieved. See
16724 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
16725 // details.
16726 func (c *ProjectsLocationsDatasetsFhirStoresApplyConsentsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresApplyConsentsCall {
16727 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16728 return c
16729 }
16730
16731 // Context sets the context to be used in this call's Do method.
16732 func (c *ProjectsLocationsDatasetsFhirStoresApplyConsentsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresApplyConsentsCall {
16733 c.ctx_ = ctx
16734 return c
16735 }
16736
16737 // Header returns a http.Header that can be modified by the caller to add
16738 // headers to the request.
16739 func (c *ProjectsLocationsDatasetsFhirStoresApplyConsentsCall) Header() http.Header {
16740 if c.header_ == nil {
16741 c.header_ = make(http.Header)
16742 }
16743 return c.header_
16744 }
16745
16746 func (c *ProjectsLocationsDatasetsFhirStoresApplyConsentsCall) doRequest(alt string) (*http.Response, error) {
16747 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
16748 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.applyconsentsrequest)
16749 if err != nil {
16750 return nil, err
16751 }
16752 c.urlParams_.Set("alt", alt)
16753 c.urlParams_.Set("prettyPrint", "false")
16754 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:applyConsents")
16755 urls += "?" + c.urlParams_.Encode()
16756 req, err := http.NewRequest("POST", urls, body)
16757 if err != nil {
16758 return nil, err
16759 }
16760 req.Header = reqHeaders
16761 googleapi.Expand(req.URL, map[string]string{
16762 "name": c.name,
16763 })
16764 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.applyConsents", "request", internallog.HTTPRequest(req, body.Bytes()))
16765 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16766 }
16767
16768 // Do executes the "healthcare.projects.locations.datasets.fhirStores.applyConsents" call.
16769 // Any non-2xx status code is an error. Response headers are in either
16770 // *Operation.ServerResponse.Header or (if a response was returned at all) in
16771 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
16772 // whether the returned error was because http.StatusNotModified was returned.
16773 func (c *ProjectsLocationsDatasetsFhirStoresApplyConsentsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
16774 gensupport.SetOptions(c.urlParams_, opts...)
16775 res, err := c.doRequest("json")
16776 if res != nil && res.StatusCode == http.StatusNotModified {
16777 if res.Body != nil {
16778 res.Body.Close()
16779 }
16780 return nil, gensupport.WrapError(&googleapi.Error{
16781 Code: res.StatusCode,
16782 Header: res.Header,
16783 })
16784 }
16785 if err != nil {
16786 return nil, err
16787 }
16788 defer googleapi.CloseBody(res)
16789 if err := googleapi.CheckResponse(res); err != nil {
16790 return nil, gensupport.WrapError(err)
16791 }
16792 ret := &Operation{
16793 ServerResponse: googleapi.ServerResponse{
16794 Header: res.Header,
16795 HTTPStatusCode: res.StatusCode,
16796 },
16797 }
16798 target := &ret
16799 b, err := gensupport.DecodeResponseBytes(target, res)
16800 if err != nil {
16801 return nil, err
16802 }
16803 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.applyConsents", "response", internallog.HTTPResponse(res, b))
16804 return ret, nil
16805 }
16806
16807 type ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall struct {
16808 s *Service
16809 name string
16810 urlParams_ gensupport.URLParams
16811 ifNoneMatch_ string
16812 ctx_ context.Context
16813 header_ http.Header
16814 }
16815
16816 // BulkExportGroup: Bulk exports a Group resource and resources in the member
16817 // field, including related resources for each Patient member. The export for
16818 // each Patient is identical to a GetPatientEverything request. Implements the
16819 // FHIR implementation guide $export group of patients
16820 // (https://build.fhir.org/ig/HL7/bulk-data/export.html#endpoint---group-of-patients).
16821 // The following headers must be set in the request: * `Accept`: specifies the
16822 // format of the `OperationOutcome` response. Only `application/fhir+json` is
16823 // supported. * `Prefer`: specifies whether the response is immediate or
16824 // asynchronous. Must be to `respond-async` because only asynchronous responses
16825 // are supported. Specify the destination for the server to write result files
16826 // by setting the Cloud Storage location bulk_export_gcs_destination on the
16827 // FHIR store. URI of an existing Cloud Storage directory where the server
16828 // writes result files, in the format
16829 // gs://{bucket-id}/{path/to/destination/dir}. If there is no trailing slash,
16830 // the service appends one when composing the object path. The user is
16831 // responsible for creating the Cloud Storage bucket referenced. Supports the
16832 // following query parameters: * `_type`: string of comma-delimited FHIR
16833 // resource types. If provided, only resources of the specified type(s) are
16834 // exported. * `_since`: if provided, only resources updated after the
16835 // specified time are exported. * `_outputFormat`: optional, specify ndjson to
16836 // export data in NDJSON format. Exported file names use the format:
16837 // {export_id}_{resource_type}.ndjson. * `organizeOutputBy`: resource type to
16838 // organize the output by. Required and must be set to `Patient`. When
16839 // specified, output files are organized by instances of the specified resource
16840 // type, including the resource, referenced resources, and resources that
16841 // contain references to that resource. On success, the `Content-Location`
16842 // header of response is set to a URL that you can use to query the status of
16843 // the export. The URL is in the format
16844 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStor
16845 // es/{fhir_store_id}/operations/{export_id}`. See get-fhir-operation-status
16846 // for more information. Errors generated by the FHIR store contain a
16847 // JSON-encoded `OperationOutcome` resource describing the reason for the
16848 // error.
16849 //
16850 // - name: Name of the Group resource that is exported, in format
16851 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirSt
16852 // ores/{fhir_store_id}/fhir/Group/{group_id}`.
16853 func (r *ProjectsLocationsDatasetsFhirStoresService) BulkExportGroup(name string) *ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall {
16854 c := &ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16855 c.name = name
16856 return c
16857 }
16858
16859 // Since sets the optional parameter "_since": If provided, only resources
16860 // updated after this time are exported. The time uses the format
16861 // YYYY-MM-DDThh:mm:ss.sss+zz:zz. For example, `2015-02-07T13:28:17.239+02:00`
16862 // or `2017-01-01T00:00:00Z`. The time must be specified to the second and
16863 // include a time zone.
16864 func (c *ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall) Since(Since string) *ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall {
16865 c.urlParams_.Set("_since", Since)
16866 return c
16867 }
16868
16869 // Type sets the optional parameter "_type": String of comma-delimited FHIR
16870 // resource types. If provided, only resources of the specified resource
16871 // type(s) are exported.
16872 func (c *ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall) Type(Type string) *ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall {
16873 c.urlParams_.Set("_type", Type)
16874 return c
16875 }
16876
16877 // OrganizeOutputBy sets the optional parameter "organizeOutputBy": Required.
16878 // The FHIR resource type used to organize exported resources. Only supports
16879 // "Patient". When organized by Patient resource, output files are grouped as
16880 // follows: * Patient file(s) containing the Patient resources. Each Patient is
16881 // sequentially followed by all resources the Patient references, and all
16882 // resources that reference the Patient (equivalent to a GetPatientEverything
16883 // request). * Individual files grouped by resource type for resources in the
16884 // Group's member field and the Group resource itself. Resources may be
16885 // duplicated across multiple Patients. For example, if two Patient resources
16886 // reference the same Organization resource, it will appear twice, once after
16887 // each Patient. The Group resource from the request does not appear in the
16888 // Patient files.
16889 func (c *ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall) OrganizeOutputBy(organizeOutputBy string) *ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall {
16890 c.urlParams_.Set("organizeOutputBy", organizeOutputBy)
16891 return c
16892 }
16893
16894 // OutputFormat sets the optional parameter "outputFormat": Output format of
16895 // the export. This field is optional and only `application/fhir+ndjson` is
16896 // supported.
16897 func (c *ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall) OutputFormat(outputFormat string) *ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall {
16898 c.urlParams_.Set("outputFormat", outputFormat)
16899 return c
16900 }
16901
16902 // Fields allows partial responses to be retrieved. See
16903 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
16904 // details.
16905 func (c *ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall {
16906 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16907 return c
16908 }
16909
16910 // IfNoneMatch sets an optional parameter which makes the operation fail if the
16911 // object's ETag matches the given value. This is useful for getting updates
16912 // only after the object has changed since the last request.
16913 func (c *ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall {
16914 c.ifNoneMatch_ = entityTag
16915 return c
16916 }
16917
16918 // Context sets the context to be used in this call's Do method.
16919 func (c *ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall {
16920 c.ctx_ = ctx
16921 return c
16922 }
16923
16924 // Header returns a http.Header that can be modified by the caller to add
16925 // headers to the request.
16926 func (c *ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall) Header() http.Header {
16927 if c.header_ == nil {
16928 c.header_ = make(http.Header)
16929 }
16930 return c.header_
16931 }
16932
16933 func (c *ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall) doRequest(alt string) (*http.Response, error) {
16934 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16935 if c.ifNoneMatch_ != "" {
16936 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16937 }
16938 c.urlParams_.Set("alt", alt)
16939 c.urlParams_.Set("prettyPrint", "false")
16940 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/$export")
16941 urls += "?" + c.urlParams_.Encode()
16942 req, err := http.NewRequest("GET", urls, nil)
16943 if err != nil {
16944 return nil, err
16945 }
16946 req.Header = reqHeaders
16947 googleapi.Expand(req.URL, map[string]string{
16948 "name": c.name,
16949 })
16950 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.bulk-export-group", "request", internallog.HTTPRequest(req, nil))
16951 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16952 }
16953
16954 // Do executes the "healthcare.projects.locations.datasets.fhirStores.bulk-export-group" call.
16955 func (c *ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
16956 gensupport.SetOptions(c.urlParams_, opts...)
16957 return c.doRequest("")
16958 }
16959
16960 type ProjectsLocationsDatasetsFhirStoresBulkDeleteCall struct {
16961 s *Service
16962 name string
16963 bulkdeleteresourcesrequest *BulkDeleteResourcesRequest
16964 urlParams_ gensupport.URLParams
16965 ctx_ context.Context
16966 header_ http.Header
16967 }
16968
16969 // BulkDelete: Bulk deletes the FHIR resources from the given FHIR store. This
16970 // method returns an Operation that can be used to track the progress of the
16971 // deletion by calling GetOperation. The success and secondary_success counters
16972 // correspond to the deleted current version and historical versions,
16973 // respectively.
16974 //
16975 // - name: The name of the FHIR store to bulk delete resources from, in the
16976 // format of
16977 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirSt
16978 // ores/{fhir_store_id}`.
16979 func (r *ProjectsLocationsDatasetsFhirStoresService) BulkDelete(name string, bulkdeleteresourcesrequest *BulkDeleteResourcesRequest) *ProjectsLocationsDatasetsFhirStoresBulkDeleteCall {
16980 c := &ProjectsLocationsDatasetsFhirStoresBulkDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16981 c.name = name
16982 c.bulkdeleteresourcesrequest = bulkdeleteresourcesrequest
16983 return c
16984 }
16985
16986 // Fields allows partial responses to be retrieved. See
16987 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
16988 // details.
16989 func (c *ProjectsLocationsDatasetsFhirStoresBulkDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresBulkDeleteCall {
16990 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16991 return c
16992 }
16993
16994 // Context sets the context to be used in this call's Do method.
16995 func (c *ProjectsLocationsDatasetsFhirStoresBulkDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresBulkDeleteCall {
16996 c.ctx_ = ctx
16997 return c
16998 }
16999
17000 // Header returns a http.Header that can be modified by the caller to add
17001 // headers to the request.
17002 func (c *ProjectsLocationsDatasetsFhirStoresBulkDeleteCall) Header() http.Header {
17003 if c.header_ == nil {
17004 c.header_ = make(http.Header)
17005 }
17006 return c.header_
17007 }
17008
17009 func (c *ProjectsLocationsDatasetsFhirStoresBulkDeleteCall) doRequest(alt string) (*http.Response, error) {
17010 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
17011 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.bulkdeleteresourcesrequest)
17012 if err != nil {
17013 return nil, err
17014 }
17015 c.urlParams_.Set("alt", alt)
17016 c.urlParams_.Set("prettyPrint", "false")
17017 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:bulkDelete")
17018 urls += "?" + c.urlParams_.Encode()
17019 req, err := http.NewRequest("POST", urls, body)
17020 if err != nil {
17021 return nil, err
17022 }
17023 req.Header = reqHeaders
17024 googleapi.Expand(req.URL, map[string]string{
17025 "name": c.name,
17026 })
17027 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.bulkDelete", "request", internallog.HTTPRequest(req, body.Bytes()))
17028 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17029 }
17030
17031 // Do executes the "healthcare.projects.locations.datasets.fhirStores.bulkDelete" call.
17032 // Any non-2xx status code is an error. Response headers are in either
17033 // *Operation.ServerResponse.Header or (if a response was returned at all) in
17034 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17035 // whether the returned error was because http.StatusNotModified was returned.
17036 func (c *ProjectsLocationsDatasetsFhirStoresBulkDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
17037 gensupport.SetOptions(c.urlParams_, opts...)
17038 res, err := c.doRequest("json")
17039 if res != nil && res.StatusCode == http.StatusNotModified {
17040 if res.Body != nil {
17041 res.Body.Close()
17042 }
17043 return nil, gensupport.WrapError(&googleapi.Error{
17044 Code: res.StatusCode,
17045 Header: res.Header,
17046 })
17047 }
17048 if err != nil {
17049 return nil, err
17050 }
17051 defer googleapi.CloseBody(res)
17052 if err := googleapi.CheckResponse(res); err != nil {
17053 return nil, gensupport.WrapError(err)
17054 }
17055 ret := &Operation{
17056 ServerResponse: googleapi.ServerResponse{
17057 Header: res.Header,
17058 HTTPStatusCode: res.StatusCode,
17059 },
17060 }
17061 target := &ret
17062 b, err := gensupport.DecodeResponseBytes(target, res)
17063 if err != nil {
17064 return nil, err
17065 }
17066 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.bulkDelete", "response", internallog.HTTPResponse(res, b))
17067 return ret, nil
17068 }
17069
17070 type ProjectsLocationsDatasetsFhirStoresCreateCall struct {
17071 s *Service
17072 parent string
17073 fhirstore *FhirStore
17074 urlParams_ gensupport.URLParams
17075 ctx_ context.Context
17076 header_ http.Header
17077 }
17078
17079 // Create: Creates a new FHIR store within the parent dataset.
17080 //
17081 // - parent: The name of the dataset this FHIR store belongs to.
17082 func (r *ProjectsLocationsDatasetsFhirStoresService) Create(parent string, fhirstore *FhirStore) *ProjectsLocationsDatasetsFhirStoresCreateCall {
17083 c := &ProjectsLocationsDatasetsFhirStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17084 c.parent = parent
17085 c.fhirstore = fhirstore
17086 return c
17087 }
17088
17089 // FhirStoreId sets the optional parameter "fhirStoreId": Required. The ID of
17090 // the FHIR store that is being created. The string must match the following
17091 // regex: `[\p{L}\p{N}_\-\.]{1,256}`.
17092 func (c *ProjectsLocationsDatasetsFhirStoresCreateCall) FhirStoreId(fhirStoreId string) *ProjectsLocationsDatasetsFhirStoresCreateCall {
17093 c.urlParams_.Set("fhirStoreId", fhirStoreId)
17094 return c
17095 }
17096
17097 // Fields allows partial responses to be retrieved. See
17098 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
17099 // details.
17100 func (c *ProjectsLocationsDatasetsFhirStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresCreateCall {
17101 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17102 return c
17103 }
17104
17105 // Context sets the context to be used in this call's Do method.
17106 func (c *ProjectsLocationsDatasetsFhirStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresCreateCall {
17107 c.ctx_ = ctx
17108 return c
17109 }
17110
17111 // Header returns a http.Header that can be modified by the caller to add
17112 // headers to the request.
17113 func (c *ProjectsLocationsDatasetsFhirStoresCreateCall) Header() http.Header {
17114 if c.header_ == nil {
17115 c.header_ = make(http.Header)
17116 }
17117 return c.header_
17118 }
17119
17120 func (c *ProjectsLocationsDatasetsFhirStoresCreateCall) doRequest(alt string) (*http.Response, error) {
17121 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
17122 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.fhirstore)
17123 if err != nil {
17124 return nil, err
17125 }
17126 c.urlParams_.Set("alt", alt)
17127 c.urlParams_.Set("prettyPrint", "false")
17128 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/fhirStores")
17129 urls += "?" + c.urlParams_.Encode()
17130 req, err := http.NewRequest("POST", urls, body)
17131 if err != nil {
17132 return nil, err
17133 }
17134 req.Header = reqHeaders
17135 googleapi.Expand(req.URL, map[string]string{
17136 "parent": c.parent,
17137 })
17138 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.create", "request", internallog.HTTPRequest(req, body.Bytes()))
17139 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17140 }
17141
17142 // Do executes the "healthcare.projects.locations.datasets.fhirStores.create" call.
17143 // Any non-2xx status code is an error. Response headers are in either
17144 // *FhirStore.ServerResponse.Header or (if a response was returned at all) in
17145 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17146 // whether the returned error was because http.StatusNotModified was returned.
17147 func (c *ProjectsLocationsDatasetsFhirStoresCreateCall) Do(opts ...googleapi.CallOption) (*FhirStore, error) {
17148 gensupport.SetOptions(c.urlParams_, opts...)
17149 res, err := c.doRequest("json")
17150 if res != nil && res.StatusCode == http.StatusNotModified {
17151 if res.Body != nil {
17152 res.Body.Close()
17153 }
17154 return nil, gensupport.WrapError(&googleapi.Error{
17155 Code: res.StatusCode,
17156 Header: res.Header,
17157 })
17158 }
17159 if err != nil {
17160 return nil, err
17161 }
17162 defer googleapi.CloseBody(res)
17163 if err := googleapi.CheckResponse(res); err != nil {
17164 return nil, gensupport.WrapError(err)
17165 }
17166 ret := &FhirStore{
17167 ServerResponse: googleapi.ServerResponse{
17168 Header: res.Header,
17169 HTTPStatusCode: res.StatusCode,
17170 },
17171 }
17172 target := &ret
17173 b, err := gensupport.DecodeResponseBytes(target, res)
17174 if err != nil {
17175 return nil, err
17176 }
17177 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.create", "response", internallog.HTTPResponse(res, b))
17178 return ret, nil
17179 }
17180
17181 type ProjectsLocationsDatasetsFhirStoresDeidentifyCall struct {
17182 s *Service
17183 sourceStore string
17184 deidentifyfhirstorerequest *DeidentifyFhirStoreRequest
17185 urlParams_ gensupport.URLParams
17186 ctx_ context.Context
17187 header_ http.Header
17188 }
17189
17190 // Deidentify: De-identifies data from the source store and writes it to the
17191 // destination store. The metadata field type is OperationMetadata. If the
17192 // request is successful, the response field type is
17193 // DeidentifyFhirStoreSummary. If errors occur, error is set. Error details are
17194 // also logged to Cloud Logging (see Viewing error logs in Cloud Logging
17195 // (https://cloud.google.com/healthcare/docs/how-tos/logging)).
17196 //
17197 // - sourceStore: Source FHIR store resource name. For example,
17198 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirSt
17199 // ores/{fhir_store_id}`. R5 stores are not supported.
17200 func (r *ProjectsLocationsDatasetsFhirStoresService) Deidentify(sourceStore string, deidentifyfhirstorerequest *DeidentifyFhirStoreRequest) *ProjectsLocationsDatasetsFhirStoresDeidentifyCall {
17201 c := &ProjectsLocationsDatasetsFhirStoresDeidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17202 c.sourceStore = sourceStore
17203 c.deidentifyfhirstorerequest = deidentifyfhirstorerequest
17204 return c
17205 }
17206
17207 // Fields allows partial responses to be retrieved. See
17208 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
17209 // details.
17210 func (c *ProjectsLocationsDatasetsFhirStoresDeidentifyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresDeidentifyCall {
17211 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17212 return c
17213 }
17214
17215 // Context sets the context to be used in this call's Do method.
17216 func (c *ProjectsLocationsDatasetsFhirStoresDeidentifyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresDeidentifyCall {
17217 c.ctx_ = ctx
17218 return c
17219 }
17220
17221 // Header returns a http.Header that can be modified by the caller to add
17222 // headers to the request.
17223 func (c *ProjectsLocationsDatasetsFhirStoresDeidentifyCall) Header() http.Header {
17224 if c.header_ == nil {
17225 c.header_ = make(http.Header)
17226 }
17227 return c.header_
17228 }
17229
17230 func (c *ProjectsLocationsDatasetsFhirStoresDeidentifyCall) doRequest(alt string) (*http.Response, error) {
17231 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
17232 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.deidentifyfhirstorerequest)
17233 if err != nil {
17234 return nil, err
17235 }
17236 c.urlParams_.Set("alt", alt)
17237 c.urlParams_.Set("prettyPrint", "false")
17238 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+sourceStore}:deidentify")
17239 urls += "?" + c.urlParams_.Encode()
17240 req, err := http.NewRequest("POST", urls, body)
17241 if err != nil {
17242 return nil, err
17243 }
17244 req.Header = reqHeaders
17245 googleapi.Expand(req.URL, map[string]string{
17246 "sourceStore": c.sourceStore,
17247 })
17248 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.deidentify", "request", internallog.HTTPRequest(req, body.Bytes()))
17249 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17250 }
17251
17252 // Do executes the "healthcare.projects.locations.datasets.fhirStores.deidentify" call.
17253 // Any non-2xx status code is an error. Response headers are in either
17254 // *Operation.ServerResponse.Header or (if a response was returned at all) in
17255 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17256 // whether the returned error was because http.StatusNotModified was returned.
17257 func (c *ProjectsLocationsDatasetsFhirStoresDeidentifyCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
17258 gensupport.SetOptions(c.urlParams_, opts...)
17259 res, err := c.doRequest("json")
17260 if res != nil && res.StatusCode == http.StatusNotModified {
17261 if res.Body != nil {
17262 res.Body.Close()
17263 }
17264 return nil, gensupport.WrapError(&googleapi.Error{
17265 Code: res.StatusCode,
17266 Header: res.Header,
17267 })
17268 }
17269 if err != nil {
17270 return nil, err
17271 }
17272 defer googleapi.CloseBody(res)
17273 if err := googleapi.CheckResponse(res); err != nil {
17274 return nil, gensupport.WrapError(err)
17275 }
17276 ret := &Operation{
17277 ServerResponse: googleapi.ServerResponse{
17278 Header: res.Header,
17279 HTTPStatusCode: res.StatusCode,
17280 },
17281 }
17282 target := &ret
17283 b, err := gensupport.DecodeResponseBytes(target, res)
17284 if err != nil {
17285 return nil, err
17286 }
17287 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.deidentify", "response", internallog.HTTPResponse(res, b))
17288 return ret, nil
17289 }
17290
17291 type ProjectsLocationsDatasetsFhirStoresDeleteCall struct {
17292 s *Service
17293 name string
17294 urlParams_ gensupport.URLParams
17295 ctx_ context.Context
17296 header_ http.Header
17297 }
17298
17299 // Delete: Deletes the specified FHIR store and removes all resources within
17300 // it.
17301 //
17302 // - name: The resource name of the FHIR store to delete.
17303 func (r *ProjectsLocationsDatasetsFhirStoresService) Delete(name string) *ProjectsLocationsDatasetsFhirStoresDeleteCall {
17304 c := &ProjectsLocationsDatasetsFhirStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17305 c.name = name
17306 return c
17307 }
17308
17309 // Fields allows partial responses to be retrieved. See
17310 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
17311 // details.
17312 func (c *ProjectsLocationsDatasetsFhirStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresDeleteCall {
17313 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17314 return c
17315 }
17316
17317 // Context sets the context to be used in this call's Do method.
17318 func (c *ProjectsLocationsDatasetsFhirStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresDeleteCall {
17319 c.ctx_ = ctx
17320 return c
17321 }
17322
17323 // Header returns a http.Header that can be modified by the caller to add
17324 // headers to the request.
17325 func (c *ProjectsLocationsDatasetsFhirStoresDeleteCall) Header() http.Header {
17326 if c.header_ == nil {
17327 c.header_ = make(http.Header)
17328 }
17329 return c.header_
17330 }
17331
17332 func (c *ProjectsLocationsDatasetsFhirStoresDeleteCall) doRequest(alt string) (*http.Response, error) {
17333 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17334 c.urlParams_.Set("alt", alt)
17335 c.urlParams_.Set("prettyPrint", "false")
17336 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
17337 urls += "?" + c.urlParams_.Encode()
17338 req, err := http.NewRequest("DELETE", urls, nil)
17339 if err != nil {
17340 return nil, err
17341 }
17342 req.Header = reqHeaders
17343 googleapi.Expand(req.URL, map[string]string{
17344 "name": c.name,
17345 })
17346 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.delete", "request", internallog.HTTPRequest(req, nil))
17347 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17348 }
17349
17350 // Do executes the "healthcare.projects.locations.datasets.fhirStores.delete" call.
17351 // Any non-2xx status code is an error. Response headers are in either
17352 // *Empty.ServerResponse.Header or (if a response was returned at all) in
17353 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17354 // whether the returned error was because http.StatusNotModified was returned.
17355 func (c *ProjectsLocationsDatasetsFhirStoresDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
17356 gensupport.SetOptions(c.urlParams_, opts...)
17357 res, err := c.doRequest("json")
17358 if res != nil && res.StatusCode == http.StatusNotModified {
17359 if res.Body != nil {
17360 res.Body.Close()
17361 }
17362 return nil, gensupport.WrapError(&googleapi.Error{
17363 Code: res.StatusCode,
17364 Header: res.Header,
17365 })
17366 }
17367 if err != nil {
17368 return nil, err
17369 }
17370 defer googleapi.CloseBody(res)
17371 if err := googleapi.CheckResponse(res); err != nil {
17372 return nil, gensupport.WrapError(err)
17373 }
17374 ret := &Empty{
17375 ServerResponse: googleapi.ServerResponse{
17376 Header: res.Header,
17377 HTTPStatusCode: res.StatusCode,
17378 },
17379 }
17380 target := &ret
17381 b, err := gensupport.DecodeResponseBytes(target, res)
17382 if err != nil {
17383 return nil, err
17384 }
17385 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.delete", "response", internallog.HTTPResponse(res, b))
17386 return ret, nil
17387 }
17388
17389 type ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall struct {
17390 s *Service
17391 name string
17392 urlParams_ gensupport.URLParams
17393 ifNoneMatch_ string
17394 ctx_ context.Context
17395 header_ http.Header
17396 }
17397
17398 // ExplainDataAccess: Explains all the permitted/denied actor, purpose and
17399 // environment for a given resource. FHIR Consent is not supported in DSTU2 or
17400 // R5.
17401 //
17402 // - name: The name of the FHIR store to enforce, in the format
17403 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirSt
17404 // ores/{fhir_store_id}`.
17405 func (r *ProjectsLocationsDatasetsFhirStoresService) ExplainDataAccess(name string) *ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall {
17406 c := &ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17407 c.name = name
17408 return c
17409 }
17410
17411 // ResourceId sets the optional parameter "resourceId": Required. The ID
17412 // (`{resourceType}/{id}`) of the resource to explain data access on.
17413 func (c *ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall) ResourceId(resourceId string) *ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall {
17414 c.urlParams_.Set("resourceId", resourceId)
17415 return c
17416 }
17417
17418 // Fields allows partial responses to be retrieved. See
17419 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
17420 // details.
17421 func (c *ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall {
17422 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17423 return c
17424 }
17425
17426 // IfNoneMatch sets an optional parameter which makes the operation fail if the
17427 // object's ETag matches the given value. This is useful for getting updates
17428 // only after the object has changed since the last request.
17429 func (c *ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall {
17430 c.ifNoneMatch_ = entityTag
17431 return c
17432 }
17433
17434 // Context sets the context to be used in this call's Do method.
17435 func (c *ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall {
17436 c.ctx_ = ctx
17437 return c
17438 }
17439
17440 // Header returns a http.Header that can be modified by the caller to add
17441 // headers to the request.
17442 func (c *ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall) Header() http.Header {
17443 if c.header_ == nil {
17444 c.header_ = make(http.Header)
17445 }
17446 return c.header_
17447 }
17448
17449 func (c *ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall) doRequest(alt string) (*http.Response, error) {
17450 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17451 if c.ifNoneMatch_ != "" {
17452 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17453 }
17454 c.urlParams_.Set("alt", alt)
17455 c.urlParams_.Set("prettyPrint", "false")
17456 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:explainDataAccess")
17457 urls += "?" + c.urlParams_.Encode()
17458 req, err := http.NewRequest("GET", urls, nil)
17459 if err != nil {
17460 return nil, err
17461 }
17462 req.Header = reqHeaders
17463 googleapi.Expand(req.URL, map[string]string{
17464 "name": c.name,
17465 })
17466 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.explainDataAccess", "request", internallog.HTTPRequest(req, nil))
17467 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17468 }
17469
17470 // Do executes the "healthcare.projects.locations.datasets.fhirStores.explainDataAccess" call.
17471 // Any non-2xx status code is an error. Response headers are in either
17472 // *ExplainDataAccessResponse.ServerResponse.Header or (if a response was
17473 // returned at all) in error.(*googleapi.Error).Header. Use
17474 // googleapi.IsNotModified to check whether the returned error was because
17475 // http.StatusNotModified was returned.
17476 func (c *ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall) Do(opts ...googleapi.CallOption) (*ExplainDataAccessResponse, error) {
17477 gensupport.SetOptions(c.urlParams_, opts...)
17478 res, err := c.doRequest("json")
17479 if res != nil && res.StatusCode == http.StatusNotModified {
17480 if res.Body != nil {
17481 res.Body.Close()
17482 }
17483 return nil, gensupport.WrapError(&googleapi.Error{
17484 Code: res.StatusCode,
17485 Header: res.Header,
17486 })
17487 }
17488 if err != nil {
17489 return nil, err
17490 }
17491 defer googleapi.CloseBody(res)
17492 if err := googleapi.CheckResponse(res); err != nil {
17493 return nil, gensupport.WrapError(err)
17494 }
17495 ret := &ExplainDataAccessResponse{
17496 ServerResponse: googleapi.ServerResponse{
17497 Header: res.Header,
17498 HTTPStatusCode: res.StatusCode,
17499 },
17500 }
17501 target := &ret
17502 b, err := gensupport.DecodeResponseBytes(target, res)
17503 if err != nil {
17504 return nil, err
17505 }
17506 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.explainDataAccess", "response", internallog.HTTPResponse(res, b))
17507 return ret, nil
17508 }
17509
17510 type ProjectsLocationsDatasetsFhirStoresExportCall struct {
17511 s *Service
17512 name string
17513 exportresourcesrequest *ExportResourcesRequest
17514 urlParams_ gensupport.URLParams
17515 ctx_ context.Context
17516 header_ http.Header
17517 }
17518
17519 // Export: Export resources from the FHIR store to the specified destination.
17520 // This method returns an Operation that can be used to track the status of the
17521 // export by calling GetOperation. To improve performance, it is recommended to
17522 // make the `type` filter as specific as possible, including only the resource
17523 // types that are absolutely needed. This minimizes the size of the initial
17524 // dataset to be processed and is the most effective way to improve
17525 // performance. While post-filters like `_since` are useful for refining
17526 // results, they do not speed up the initial data retrieval phase, which is
17527 // primarily governed by the `type` filter. Immediate fatal errors appear in
17528 // the error field, errors are also logged to Cloud Logging (see Viewing error
17529 // logs in Cloud Logging
17530 // (https://cloud.google.com/healthcare/docs/how-tos/logging)). Otherwise, when
17531 // the operation finishes, a detailed response of type ExportResourcesResponse
17532 // is returned in the response field. The metadata field type for this
17533 // operation is OperationMetadata.
17534 //
17535 // - name: The name of the FHIR store to export resource from, in the format of
17536 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirSt
17537 // ores/{fhir_store_id}`.
17538 func (r *ProjectsLocationsDatasetsFhirStoresService) Export(name string, exportresourcesrequest *ExportResourcesRequest) *ProjectsLocationsDatasetsFhirStoresExportCall {
17539 c := &ProjectsLocationsDatasetsFhirStoresExportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17540 c.name = name
17541 c.exportresourcesrequest = exportresourcesrequest
17542 return c
17543 }
17544
17545 // Fields allows partial responses to be retrieved. See
17546 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
17547 // details.
17548 func (c *ProjectsLocationsDatasetsFhirStoresExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresExportCall {
17549 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17550 return c
17551 }
17552
17553 // Context sets the context to be used in this call's Do method.
17554 func (c *ProjectsLocationsDatasetsFhirStoresExportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresExportCall {
17555 c.ctx_ = ctx
17556 return c
17557 }
17558
17559 // Header returns a http.Header that can be modified by the caller to add
17560 // headers to the request.
17561 func (c *ProjectsLocationsDatasetsFhirStoresExportCall) Header() http.Header {
17562 if c.header_ == nil {
17563 c.header_ = make(http.Header)
17564 }
17565 return c.header_
17566 }
17567
17568 func (c *ProjectsLocationsDatasetsFhirStoresExportCall) doRequest(alt string) (*http.Response, error) {
17569 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
17570 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.exportresourcesrequest)
17571 if err != nil {
17572 return nil, err
17573 }
17574 c.urlParams_.Set("alt", alt)
17575 c.urlParams_.Set("prettyPrint", "false")
17576 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:export")
17577 urls += "?" + c.urlParams_.Encode()
17578 req, err := http.NewRequest("POST", urls, body)
17579 if err != nil {
17580 return nil, err
17581 }
17582 req.Header = reqHeaders
17583 googleapi.Expand(req.URL, map[string]string{
17584 "name": c.name,
17585 })
17586 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.export", "request", internallog.HTTPRequest(req, body.Bytes()))
17587 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17588 }
17589
17590 // Do executes the "healthcare.projects.locations.datasets.fhirStores.export" call.
17591 // Any non-2xx status code is an error. Response headers are in either
17592 // *Operation.ServerResponse.Header or (if a response was returned at all) in
17593 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17594 // whether the returned error was because http.StatusNotModified was returned.
17595 func (c *ProjectsLocationsDatasetsFhirStoresExportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
17596 gensupport.SetOptions(c.urlParams_, opts...)
17597 res, err := c.doRequest("json")
17598 if res != nil && res.StatusCode == http.StatusNotModified {
17599 if res.Body != nil {
17600 res.Body.Close()
17601 }
17602 return nil, gensupport.WrapError(&googleapi.Error{
17603 Code: res.StatusCode,
17604 Header: res.Header,
17605 })
17606 }
17607 if err != nil {
17608 return nil, err
17609 }
17610 defer googleapi.CloseBody(res)
17611 if err := googleapi.CheckResponse(res); err != nil {
17612 return nil, gensupport.WrapError(err)
17613 }
17614 ret := &Operation{
17615 ServerResponse: googleapi.ServerResponse{
17616 Header: res.Header,
17617 HTTPStatusCode: res.StatusCode,
17618 },
17619 }
17620 target := &ret
17621 b, err := gensupport.DecodeResponseBytes(target, res)
17622 if err != nil {
17623 return nil, err
17624 }
17625 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.export", "response", internallog.HTTPResponse(res, b))
17626 return ret, nil
17627 }
17628
17629 type ProjectsLocationsDatasetsFhirStoresGetCall struct {
17630 s *Service
17631 name string
17632 urlParams_ gensupport.URLParams
17633 ifNoneMatch_ string
17634 ctx_ context.Context
17635 header_ http.Header
17636 }
17637
17638 // Get: Gets the configuration of the specified FHIR store.
17639 //
17640 // - name: The resource name of the FHIR store to get.
17641 func (r *ProjectsLocationsDatasetsFhirStoresService) Get(name string) *ProjectsLocationsDatasetsFhirStoresGetCall {
17642 c := &ProjectsLocationsDatasetsFhirStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17643 c.name = name
17644 return c
17645 }
17646
17647 // Fields allows partial responses to be retrieved. See
17648 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
17649 // details.
17650 func (c *ProjectsLocationsDatasetsFhirStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresGetCall {
17651 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17652 return c
17653 }
17654
17655 // IfNoneMatch sets an optional parameter which makes the operation fail if the
17656 // object's ETag matches the given value. This is useful for getting updates
17657 // only after the object has changed since the last request.
17658 func (c *ProjectsLocationsDatasetsFhirStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresGetCall {
17659 c.ifNoneMatch_ = entityTag
17660 return c
17661 }
17662
17663 // Context sets the context to be used in this call's Do method.
17664 func (c *ProjectsLocationsDatasetsFhirStoresGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresGetCall {
17665 c.ctx_ = ctx
17666 return c
17667 }
17668
17669 // Header returns a http.Header that can be modified by the caller to add
17670 // headers to the request.
17671 func (c *ProjectsLocationsDatasetsFhirStoresGetCall) Header() http.Header {
17672 if c.header_ == nil {
17673 c.header_ = make(http.Header)
17674 }
17675 return c.header_
17676 }
17677
17678 func (c *ProjectsLocationsDatasetsFhirStoresGetCall) doRequest(alt string) (*http.Response, error) {
17679 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17680 if c.ifNoneMatch_ != "" {
17681 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17682 }
17683 c.urlParams_.Set("alt", alt)
17684 c.urlParams_.Set("prettyPrint", "false")
17685 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
17686 urls += "?" + c.urlParams_.Encode()
17687 req, err := http.NewRequest("GET", urls, nil)
17688 if err != nil {
17689 return nil, err
17690 }
17691 req.Header = reqHeaders
17692 googleapi.Expand(req.URL, map[string]string{
17693 "name": c.name,
17694 })
17695 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.get", "request", internallog.HTTPRequest(req, nil))
17696 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17697 }
17698
17699 // Do executes the "healthcare.projects.locations.datasets.fhirStores.get" call.
17700 // Any non-2xx status code is an error. Response headers are in either
17701 // *FhirStore.ServerResponse.Header or (if a response was returned at all) in
17702 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17703 // whether the returned error was because http.StatusNotModified was returned.
17704 func (c *ProjectsLocationsDatasetsFhirStoresGetCall) Do(opts ...googleapi.CallOption) (*FhirStore, error) {
17705 gensupport.SetOptions(c.urlParams_, opts...)
17706 res, err := c.doRequest("json")
17707 if res != nil && res.StatusCode == http.StatusNotModified {
17708 if res.Body != nil {
17709 res.Body.Close()
17710 }
17711 return nil, gensupport.WrapError(&googleapi.Error{
17712 Code: res.StatusCode,
17713 Header: res.Header,
17714 })
17715 }
17716 if err != nil {
17717 return nil, err
17718 }
17719 defer googleapi.CloseBody(res)
17720 if err := googleapi.CheckResponse(res); err != nil {
17721 return nil, gensupport.WrapError(err)
17722 }
17723 ret := &FhirStore{
17724 ServerResponse: googleapi.ServerResponse{
17725 Header: res.Header,
17726 HTTPStatusCode: res.StatusCode,
17727 },
17728 }
17729 target := &ret
17730 b, err := gensupport.DecodeResponseBytes(target, res)
17731 if err != nil {
17732 return nil, err
17733 }
17734 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.get", "response", internallog.HTTPResponse(res, b))
17735 return ret, nil
17736 }
17737
17738 type ProjectsLocationsDatasetsFhirStoresGetFHIRStoreMetricsCall struct {
17739 s *Service
17740 name string
17741 urlParams_ gensupport.URLParams
17742 ifNoneMatch_ string
17743 ctx_ context.Context
17744 header_ http.Header
17745 }
17746
17747 // GetFHIRStoreMetrics: Gets metrics associated with the FHIR store.
17748 //
17749 // - name: The resource name of the FHIR store to get metrics for.
17750 func (r *ProjectsLocationsDatasetsFhirStoresService) GetFHIRStoreMetrics(name string) *ProjectsLocationsDatasetsFhirStoresGetFHIRStoreMetricsCall {
17751 c := &ProjectsLocationsDatasetsFhirStoresGetFHIRStoreMetricsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17752 c.name = name
17753 return c
17754 }
17755
17756 // Fields allows partial responses to be retrieved. See
17757 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
17758 // details.
17759 func (c *ProjectsLocationsDatasetsFhirStoresGetFHIRStoreMetricsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresGetFHIRStoreMetricsCall {
17760 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17761 return c
17762 }
17763
17764 // IfNoneMatch sets an optional parameter which makes the operation fail if the
17765 // object's ETag matches the given value. This is useful for getting updates
17766 // only after the object has changed since the last request.
17767 func (c *ProjectsLocationsDatasetsFhirStoresGetFHIRStoreMetricsCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresGetFHIRStoreMetricsCall {
17768 c.ifNoneMatch_ = entityTag
17769 return c
17770 }
17771
17772 // Context sets the context to be used in this call's Do method.
17773 func (c *ProjectsLocationsDatasetsFhirStoresGetFHIRStoreMetricsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresGetFHIRStoreMetricsCall {
17774 c.ctx_ = ctx
17775 return c
17776 }
17777
17778 // Header returns a http.Header that can be modified by the caller to add
17779 // headers to the request.
17780 func (c *ProjectsLocationsDatasetsFhirStoresGetFHIRStoreMetricsCall) Header() http.Header {
17781 if c.header_ == nil {
17782 c.header_ = make(http.Header)
17783 }
17784 return c.header_
17785 }
17786
17787 func (c *ProjectsLocationsDatasetsFhirStoresGetFHIRStoreMetricsCall) doRequest(alt string) (*http.Response, error) {
17788 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17789 if c.ifNoneMatch_ != "" {
17790 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17791 }
17792 c.urlParams_.Set("alt", alt)
17793 c.urlParams_.Set("prettyPrint", "false")
17794 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:getFHIRStoreMetrics")
17795 urls += "?" + c.urlParams_.Encode()
17796 req, err := http.NewRequest("GET", urls, nil)
17797 if err != nil {
17798 return nil, err
17799 }
17800 req.Header = reqHeaders
17801 googleapi.Expand(req.URL, map[string]string{
17802 "name": c.name,
17803 })
17804 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.getFHIRStoreMetrics", "request", internallog.HTTPRequest(req, nil))
17805 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17806 }
17807
17808 // Do executes the "healthcare.projects.locations.datasets.fhirStores.getFHIRStoreMetrics" call.
17809 // Any non-2xx status code is an error. Response headers are in either
17810 // *FhirStoreMetrics.ServerResponse.Header or (if a response was returned at
17811 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
17812 // check whether the returned error was because http.StatusNotModified was
17813 // returned.
17814 func (c *ProjectsLocationsDatasetsFhirStoresGetFHIRStoreMetricsCall) Do(opts ...googleapi.CallOption) (*FhirStoreMetrics, error) {
17815 gensupport.SetOptions(c.urlParams_, opts...)
17816 res, err := c.doRequest("json")
17817 if res != nil && res.StatusCode == http.StatusNotModified {
17818 if res.Body != nil {
17819 res.Body.Close()
17820 }
17821 return nil, gensupport.WrapError(&googleapi.Error{
17822 Code: res.StatusCode,
17823 Header: res.Header,
17824 })
17825 }
17826 if err != nil {
17827 return nil, err
17828 }
17829 defer googleapi.CloseBody(res)
17830 if err := googleapi.CheckResponse(res); err != nil {
17831 return nil, gensupport.WrapError(err)
17832 }
17833 ret := &FhirStoreMetrics{
17834 ServerResponse: googleapi.ServerResponse{
17835 Header: res.Header,
17836 HTTPStatusCode: res.StatusCode,
17837 },
17838 }
17839 target := &ret
17840 b, err := gensupport.DecodeResponseBytes(target, res)
17841 if err != nil {
17842 return nil, err
17843 }
17844 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.getFHIRStoreMetrics", "response", internallog.HTTPResponse(res, b))
17845 return ret, nil
17846 }
17847
17848 type ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall struct {
17849 s *Service
17850 resource string
17851 urlParams_ gensupport.URLParams
17852 ifNoneMatch_ string
17853 ctx_ context.Context
17854 header_ http.Header
17855 }
17856
17857 // GetIamPolicy: Gets the access control policy for a resource. Returns an
17858 // empty policy if the resource exists and does not have a policy set.
17859 //
17860 // - resource: REQUIRED: The resource for which the policy is being requested.
17861 // See Resource names (https://cloud.google.com/apis/design/resource_names)
17862 // for the appropriate value for this field.
17863 func (r *ProjectsLocationsDatasetsFhirStoresService) GetIamPolicy(resource string) *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall {
17864 c := &ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17865 c.resource = resource
17866 return c
17867 }
17868
17869 // OptionsRequestedPolicyVersion sets the optional parameter
17870 // "options.requestedPolicyVersion": The maximum policy version that will be
17871 // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
17872 // an invalid value will be rejected. Requests for policies with any
17873 // conditional role bindings must specify version 3. Policies with no
17874 // conditional role bindings may specify any valid value or leave the field
17875 // unset. The policy in the response might use the policy version that you
17876 // specified, or it might use a lower policy version. For example, if you
17877 // specify version 3, but the policy has no conditional role bindings, the
17878 // response uses version 1. To learn which resources support conditions in
17879 // their IAM policies, see the IAM documentation
17880 // (https://cloud.google.com/iam/help/conditions/resource-policies).
17881 func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall {
17882 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
17883 return c
17884 }
17885
17886 // Fields allows partial responses to be retrieved. See
17887 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
17888 // details.
17889 func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall {
17890 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17891 return c
17892 }
17893
17894 // IfNoneMatch sets an optional parameter which makes the operation fail if the
17895 // object's ETag matches the given value. This is useful for getting updates
17896 // only after the object has changed since the last request.
17897 func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall {
17898 c.ifNoneMatch_ = entityTag
17899 return c
17900 }
17901
17902 // Context sets the context to be used in this call's Do method.
17903 func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall {
17904 c.ctx_ = ctx
17905 return c
17906 }
17907
17908 // Header returns a http.Header that can be modified by the caller to add
17909 // headers to the request.
17910 func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) Header() http.Header {
17911 if c.header_ == nil {
17912 c.header_ = make(http.Header)
17913 }
17914 return c.header_
17915 }
17916
17917 func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
17918 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17919 if c.ifNoneMatch_ != "" {
17920 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17921 }
17922 c.urlParams_.Set("alt", alt)
17923 c.urlParams_.Set("prettyPrint", "false")
17924 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
17925 urls += "?" + c.urlParams_.Encode()
17926 req, err := http.NewRequest("GET", urls, nil)
17927 if err != nil {
17928 return nil, err
17929 }
17930 req.Header = reqHeaders
17931 googleapi.Expand(req.URL, map[string]string{
17932 "resource": c.resource,
17933 })
17934 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.getIamPolicy", "request", internallog.HTTPRequest(req, nil))
17935 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17936 }
17937
17938 // Do executes the "healthcare.projects.locations.datasets.fhirStores.getIamPolicy" call.
17939 // Any non-2xx status code is an error. Response headers are in either
17940 // *Policy.ServerResponse.Header or (if a response was returned at all) in
17941 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17942 // whether the returned error was because http.StatusNotModified was returned.
17943 func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
17944 gensupport.SetOptions(c.urlParams_, opts...)
17945 res, err := c.doRequest("json")
17946 if res != nil && res.StatusCode == http.StatusNotModified {
17947 if res.Body != nil {
17948 res.Body.Close()
17949 }
17950 return nil, gensupport.WrapError(&googleapi.Error{
17951 Code: res.StatusCode,
17952 Header: res.Header,
17953 })
17954 }
17955 if err != nil {
17956 return nil, err
17957 }
17958 defer googleapi.CloseBody(res)
17959 if err := googleapi.CheckResponse(res); err != nil {
17960 return nil, gensupport.WrapError(err)
17961 }
17962 ret := &Policy{
17963 ServerResponse: googleapi.ServerResponse{
17964 Header: res.Header,
17965 HTTPStatusCode: res.StatusCode,
17966 },
17967 }
17968 target := &ret
17969 b, err := gensupport.DecodeResponseBytes(target, res)
17970 if err != nil {
17971 return nil, err
17972 }
17973 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.getIamPolicy", "response", internallog.HTTPResponse(res, b))
17974 return ret, nil
17975 }
17976
17977 type ProjectsLocationsDatasetsFhirStoresImportCall struct {
17978 s *Service
17979 name string
17980 importresourcesrequest *ImportResourcesRequest
17981 urlParams_ gensupport.URLParams
17982 ctx_ context.Context
17983 header_ http.Header
17984 }
17985
17986 // Import: Imports resources to the FHIR store by loading data from the
17987 // specified sources. This method is optimized to load large quantities of data
17988 // using import semantics that ignore some FHIR store configuration options and
17989 // are not suitable for all use cases. It is primarily intended to load data
17990 // into an empty FHIR store that is not being used by other clients. In cases
17991 // where this method is not appropriate, consider using ExecuteBundle to load
17992 // data. Every resource in the input must contain a client-supplied ID. Each
17993 // resource is stored using the supplied ID regardless of the
17994 // enable_update_create setting on the FHIR store. It is strongly advised not
17995 // to include or encode any sensitive data such as patient identifiers in
17996 // client-specified resource IDs. Those IDs are part of the FHIR resource path
17997 // recorded in Cloud Audit Logs and Cloud Pub/Sub notifications. Those IDs can
17998 // also be contained in reference fields within other resources. The import
17999 // process does not enforce referential integrity, regardless of the
18000 // disable_referential_integrity setting on the FHIR store. This allows the
18001 // import of resources with arbitrary interdependencies without considering
18002 // grouping or ordering, but if the input data contains invalid references or
18003 // if some resources fail to be imported, the FHIR store might be left in a
18004 // state that violates referential integrity. The import process does not
18005 // trigger Pub/Sub notification or BigQuery streaming update, regardless of how
18006 // those are configured on the FHIR store. If a resource with the specified ID
18007 // already exists, the most recent version of the resource is overwritten
18008 // without creating a new historical version, regardless of the
18009 // disable_resource_versioning setting on the FHIR store. If transient failures
18010 // occur during the import, it's possible that successfully imported resources
18011 // will be overwritten more than once. The import operation is idempotent
18012 // unless the input data contains multiple valid resources with the same ID but
18013 // different contents. In that case, after the import completes, the store
18014 // contains exactly one resource with that ID but there is no ordering
18015 // guarantee on which version of the contents it will have. The operation
18016 // result counters do not count duplicate IDs as an error and count one success
18017 // for each resource in the input, which might result in a success count larger
18018 // than the number of resources in the FHIR store. This often occurs when
18019 // importing data organized in bundles produced by Patient-everything where
18020 // each bundle contains its own copy of a resource such as Practitioner that
18021 // might be referred to by many patients. If some resources fail to import, for
18022 // example due to parsing errors, successfully imported resources are not
18023 // rolled back. The location and format of the input data is specified by the
18024 // parameters in ImportResourcesRequest. Note that if no format is specified,
18025 // this method assumes the `BUNDLE` format. When using the `BUNDLE` format this
18026 // method ignores the `Bundle.type` field, except that `history` bundles are
18027 // rejected, and does not apply any of the bundle processing semantics for
18028 // batch or transaction bundles. Unlike in ExecuteBundle, transaction bundles
18029 // are not executed as a single transaction and bundle-internal references are
18030 // not rewritten. The bundle is treated as a collection of resources to be
18031 // written as provided in `Bundle.entry.resource`, ignoring
18032 // `Bundle.entry.request`. As an example, this allows the import of `searchset`
18033 // bundles produced by a FHIR search or Patient-everything operation. This
18034 // method returns an Operation that can be used to track the status of the
18035 // import by calling GetOperation. Immediate fatal errors appear in the error
18036 // field, errors are also logged to Cloud Logging (see Viewing error logs in
18037 // Cloud Logging (https://cloud.google.com/healthcare/docs/how-tos/logging)).
18038 // Otherwise, when the operation finishes, a detailed response of type
18039 // ImportResourcesResponse is returned in the response field. The metadata
18040 // field type for this operation is OperationMetadata.
18041 //
18042 // - name: The name of the FHIR store to import FHIR resources to, in the
18043 // format of
18044 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirSt
18045 // ores/{fhir_store_id}`.
18046 func (r *ProjectsLocationsDatasetsFhirStoresService) Import(name string, importresourcesrequest *ImportResourcesRequest) *ProjectsLocationsDatasetsFhirStoresImportCall {
18047 c := &ProjectsLocationsDatasetsFhirStoresImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18048 c.name = name
18049 c.importresourcesrequest = importresourcesrequest
18050 return c
18051 }
18052
18053 // Fields allows partial responses to be retrieved. See
18054 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
18055 // details.
18056 func (c *ProjectsLocationsDatasetsFhirStoresImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresImportCall {
18057 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18058 return c
18059 }
18060
18061 // Context sets the context to be used in this call's Do method.
18062 func (c *ProjectsLocationsDatasetsFhirStoresImportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresImportCall {
18063 c.ctx_ = ctx
18064 return c
18065 }
18066
18067 // Header returns a http.Header that can be modified by the caller to add
18068 // headers to the request.
18069 func (c *ProjectsLocationsDatasetsFhirStoresImportCall) Header() http.Header {
18070 if c.header_ == nil {
18071 c.header_ = make(http.Header)
18072 }
18073 return c.header_
18074 }
18075
18076 func (c *ProjectsLocationsDatasetsFhirStoresImportCall) doRequest(alt string) (*http.Response, error) {
18077 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
18078 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.importresourcesrequest)
18079 if err != nil {
18080 return nil, err
18081 }
18082 c.urlParams_.Set("alt", alt)
18083 c.urlParams_.Set("prettyPrint", "false")
18084 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:import")
18085 urls += "?" + c.urlParams_.Encode()
18086 req, err := http.NewRequest("POST", urls, body)
18087 if err != nil {
18088 return nil, err
18089 }
18090 req.Header = reqHeaders
18091 googleapi.Expand(req.URL, map[string]string{
18092 "name": c.name,
18093 })
18094 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.import", "request", internallog.HTTPRequest(req, body.Bytes()))
18095 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18096 }
18097
18098 // Do executes the "healthcare.projects.locations.datasets.fhirStores.import" call.
18099 // Any non-2xx status code is an error. Response headers are in either
18100 // *Operation.ServerResponse.Header or (if a response was returned at all) in
18101 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
18102 // whether the returned error was because http.StatusNotModified was returned.
18103 func (c *ProjectsLocationsDatasetsFhirStoresImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
18104 gensupport.SetOptions(c.urlParams_, opts...)
18105 res, err := c.doRequest("json")
18106 if res != nil && res.StatusCode == http.StatusNotModified {
18107 if res.Body != nil {
18108 res.Body.Close()
18109 }
18110 return nil, gensupport.WrapError(&googleapi.Error{
18111 Code: res.StatusCode,
18112 Header: res.Header,
18113 })
18114 }
18115 if err != nil {
18116 return nil, err
18117 }
18118 defer googleapi.CloseBody(res)
18119 if err := googleapi.CheckResponse(res); err != nil {
18120 return nil, gensupport.WrapError(err)
18121 }
18122 ret := &Operation{
18123 ServerResponse: googleapi.ServerResponse{
18124 Header: res.Header,
18125 HTTPStatusCode: res.StatusCode,
18126 },
18127 }
18128 target := &ret
18129 b, err := gensupport.DecodeResponseBytes(target, res)
18130 if err != nil {
18131 return nil, err
18132 }
18133 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.import", "response", internallog.HTTPResponse(res, b))
18134 return ret, nil
18135 }
18136
18137 type ProjectsLocationsDatasetsFhirStoresListCall struct {
18138 s *Service
18139 parent string
18140 urlParams_ gensupport.URLParams
18141 ifNoneMatch_ string
18142 ctx_ context.Context
18143 header_ http.Header
18144 }
18145
18146 // List: Lists the FHIR stores in the given dataset.
18147 //
18148 // - parent: Name of the dataset.
18149 func (r *ProjectsLocationsDatasetsFhirStoresService) List(parent string) *ProjectsLocationsDatasetsFhirStoresListCall {
18150 c := &ProjectsLocationsDatasetsFhirStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18151 c.parent = parent
18152 return c
18153 }
18154
18155 // Filter sets the optional parameter "filter": Restricts stores returned to
18156 // those matching a filter. The following syntax is available: * A string field
18157 // value can be written as text inside quotation marks, for example "query
18158 // text". The only valid relational operation for text fields is equality
18159 // (`=`), where text is searched within the field, rather than having the field
18160 // be equal to the text. For example, "Comment = great" returns messages with
18161 // `great` in the comment field. * A number field value can be written as an
18162 // integer, a decimal, or an exponential. The valid relational operators for
18163 // number fields are the equality operator (`=`), along with the less
18164 // than/greater than operators (`<`, `<=`, `>`, `>=`). Note that there is no
18165 // inequality (`!=`) operator. You can prepend the `NOT` operator to an
18166 // expression to negate it. * A date field value must be written in
18167 // `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format.
18168 // Leading zeros are required for one-digit months and days. The valid
18169 // relational operators for date fields are the equality operator (`=`) , along
18170 // with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that
18171 // there is no inequality (`!=`) operator. You can prepend the `NOT` operator
18172 // to an expression to negate it. * Multiple field query expressions can be
18173 // combined in one query by adding `AND` or `OR` operators between the
18174 // expressions. If a boolean operator appears within a quoted string, it is not
18175 // treated as special, it's just another part of the character string to be
18176 // matched. You can prepend the `NOT` operator to an expression to negate it.
18177 // Only filtering on labels is supported, for example `labels.key=value`.
18178 func (c *ProjectsLocationsDatasetsFhirStoresListCall) Filter(filter string) *ProjectsLocationsDatasetsFhirStoresListCall {
18179 c.urlParams_.Set("filter", filter)
18180 return c
18181 }
18182
18183 // PageSize sets the optional parameter "pageSize": Limit on the number of FHIR
18184 // stores to return in a single response. If not specified, 100 is used. May
18185 // not be larger than 1000.
18186 func (c *ProjectsLocationsDatasetsFhirStoresListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsFhirStoresListCall {
18187 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
18188 return c
18189 }
18190
18191 // PageToken sets the optional parameter "pageToken": The next_page_token value
18192 // returned from the previous List request, if any.
18193 func (c *ProjectsLocationsDatasetsFhirStoresListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsFhirStoresListCall {
18194 c.urlParams_.Set("pageToken", pageToken)
18195 return c
18196 }
18197
18198 // Fields allows partial responses to be retrieved. See
18199 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
18200 // details.
18201 func (c *ProjectsLocationsDatasetsFhirStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresListCall {
18202 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18203 return c
18204 }
18205
18206 // IfNoneMatch sets an optional parameter which makes the operation fail if the
18207 // object's ETag matches the given value. This is useful for getting updates
18208 // only after the object has changed since the last request.
18209 func (c *ProjectsLocationsDatasetsFhirStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresListCall {
18210 c.ifNoneMatch_ = entityTag
18211 return c
18212 }
18213
18214 // Context sets the context to be used in this call's Do method.
18215 func (c *ProjectsLocationsDatasetsFhirStoresListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresListCall {
18216 c.ctx_ = ctx
18217 return c
18218 }
18219
18220 // Header returns a http.Header that can be modified by the caller to add
18221 // headers to the request.
18222 func (c *ProjectsLocationsDatasetsFhirStoresListCall) Header() http.Header {
18223 if c.header_ == nil {
18224 c.header_ = make(http.Header)
18225 }
18226 return c.header_
18227 }
18228
18229 func (c *ProjectsLocationsDatasetsFhirStoresListCall) doRequest(alt string) (*http.Response, error) {
18230 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
18231 if c.ifNoneMatch_ != "" {
18232 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18233 }
18234 c.urlParams_.Set("alt", alt)
18235 c.urlParams_.Set("prettyPrint", "false")
18236 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/fhirStores")
18237 urls += "?" + c.urlParams_.Encode()
18238 req, err := http.NewRequest("GET", urls, nil)
18239 if err != nil {
18240 return nil, err
18241 }
18242 req.Header = reqHeaders
18243 googleapi.Expand(req.URL, map[string]string{
18244 "parent": c.parent,
18245 })
18246 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.list", "request", internallog.HTTPRequest(req, nil))
18247 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18248 }
18249
18250 // Do executes the "healthcare.projects.locations.datasets.fhirStores.list" call.
18251 // Any non-2xx status code is an error. Response headers are in either
18252 // *ListFhirStoresResponse.ServerResponse.Header or (if a response was returned
18253 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
18254 // check whether the returned error was because http.StatusNotModified was
18255 // returned.
18256 func (c *ProjectsLocationsDatasetsFhirStoresListCall) Do(opts ...googleapi.CallOption) (*ListFhirStoresResponse, error) {
18257 gensupport.SetOptions(c.urlParams_, opts...)
18258 res, err := c.doRequest("json")
18259 if res != nil && res.StatusCode == http.StatusNotModified {
18260 if res.Body != nil {
18261 res.Body.Close()
18262 }
18263 return nil, gensupport.WrapError(&googleapi.Error{
18264 Code: res.StatusCode,
18265 Header: res.Header,
18266 })
18267 }
18268 if err != nil {
18269 return nil, err
18270 }
18271 defer googleapi.CloseBody(res)
18272 if err := googleapi.CheckResponse(res); err != nil {
18273 return nil, gensupport.WrapError(err)
18274 }
18275 ret := &ListFhirStoresResponse{
18276 ServerResponse: googleapi.ServerResponse{
18277 Header: res.Header,
18278 HTTPStatusCode: res.StatusCode,
18279 },
18280 }
18281 target := &ret
18282 b, err := gensupport.DecodeResponseBytes(target, res)
18283 if err != nil {
18284 return nil, err
18285 }
18286 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.list", "response", internallog.HTTPResponse(res, b))
18287 return ret, nil
18288 }
18289
18290 // Pages invokes f for each page of results.
18291 // A non-nil error returned from f will halt the iteration.
18292 // The provided context supersedes any context provided to the Context method.
18293 func (c *ProjectsLocationsDatasetsFhirStoresListCall) Pages(ctx context.Context, f func(*ListFhirStoresResponse) error) error {
18294 c.ctx_ = ctx
18295 defer c.PageToken(c.urlParams_.Get("pageToken"))
18296 for {
18297 x, err := c.Do()
18298 if err != nil {
18299 return err
18300 }
18301 if err := f(x); err != nil {
18302 return err
18303 }
18304 if x.NextPageToken == "" {
18305 return nil
18306 }
18307 c.PageToken(x.NextPageToken)
18308 }
18309 }
18310
18311 type ProjectsLocationsDatasetsFhirStoresPatchCall struct {
18312 s *Service
18313 name string
18314 fhirstore *FhirStore
18315 urlParams_ gensupport.URLParams
18316 ctx_ context.Context
18317 header_ http.Header
18318 }
18319
18320 // Patch: Updates the configuration of the specified FHIR store.
18321 //
18322 // - name: Output only. Identifier. Resource name of the FHIR store, of the
18323 // form
18324 // `projects/{project_id}/locations/{location}/datasets/{dataset_id}/fhirStore
18325 // s/{fhir_store_id}`.
18326 func (r *ProjectsLocationsDatasetsFhirStoresService) Patch(name string, fhirstore *FhirStore) *ProjectsLocationsDatasetsFhirStoresPatchCall {
18327 c := &ProjectsLocationsDatasetsFhirStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18328 c.name = name
18329 c.fhirstore = fhirstore
18330 return c
18331 }
18332
18333 // UpdateMask sets the optional parameter "updateMask": Required. The update
18334 // mask applies to the resource. For the `FieldMask` definition, see
18335 // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
18336 func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsFhirStoresPatchCall {
18337 c.urlParams_.Set("updateMask", updateMask)
18338 return c
18339 }
18340
18341 // Fields allows partial responses to be retrieved. See
18342 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
18343 // details.
18344 func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresPatchCall {
18345 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18346 return c
18347 }
18348
18349 // Context sets the context to be used in this call's Do method.
18350 func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresPatchCall {
18351 c.ctx_ = ctx
18352 return c
18353 }
18354
18355 // Header returns a http.Header that can be modified by the caller to add
18356 // headers to the request.
18357 func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) Header() http.Header {
18358 if c.header_ == nil {
18359 c.header_ = make(http.Header)
18360 }
18361 return c.header_
18362 }
18363
18364 func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) doRequest(alt string) (*http.Response, error) {
18365 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
18366 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.fhirstore)
18367 if err != nil {
18368 return nil, err
18369 }
18370 c.urlParams_.Set("alt", alt)
18371 c.urlParams_.Set("prettyPrint", "false")
18372 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
18373 urls += "?" + c.urlParams_.Encode()
18374 req, err := http.NewRequest("PATCH", urls, body)
18375 if err != nil {
18376 return nil, err
18377 }
18378 req.Header = reqHeaders
18379 googleapi.Expand(req.URL, map[string]string{
18380 "name": c.name,
18381 })
18382 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
18383 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18384 }
18385
18386 // Do executes the "healthcare.projects.locations.datasets.fhirStores.patch" call.
18387 // Any non-2xx status code is an error. Response headers are in either
18388 // *FhirStore.ServerResponse.Header or (if a response was returned at all) in
18389 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
18390 // whether the returned error was because http.StatusNotModified was returned.
18391 func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) Do(opts ...googleapi.CallOption) (*FhirStore, error) {
18392 gensupport.SetOptions(c.urlParams_, opts...)
18393 res, err := c.doRequest("json")
18394 if res != nil && res.StatusCode == http.StatusNotModified {
18395 if res.Body != nil {
18396 res.Body.Close()
18397 }
18398 return nil, gensupport.WrapError(&googleapi.Error{
18399 Code: res.StatusCode,
18400 Header: res.Header,
18401 })
18402 }
18403 if err != nil {
18404 return nil, err
18405 }
18406 defer googleapi.CloseBody(res)
18407 if err := googleapi.CheckResponse(res); err != nil {
18408 return nil, gensupport.WrapError(err)
18409 }
18410 ret := &FhirStore{
18411 ServerResponse: googleapi.ServerResponse{
18412 Header: res.Header,
18413 HTTPStatusCode: res.StatusCode,
18414 },
18415 }
18416 target := &ret
18417 b, err := gensupport.DecodeResponseBytes(target, res)
18418 if err != nil {
18419 return nil, err
18420 }
18421 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.patch", "response", internallog.HTTPResponse(res, b))
18422 return ret, nil
18423 }
18424
18425 type ProjectsLocationsDatasetsFhirStoresRollbackCall struct {
18426 s *Service
18427 name string
18428 rollbackfhirresourcesrequest *RollbackFhirResourcesRequest
18429 urlParams_ gensupport.URLParams
18430 ctx_ context.Context
18431 header_ http.Header
18432 }
18433
18434 // Rollback: Rolls back resources from the FHIR store to the specified time.
18435 // This method returns an Operation that can be used to track the status of the
18436 // rollback by calling GetOperation. Immediate fatal errors appear in the error
18437 // field, errors are also logged to Cloud Logging (see Viewing error logs in
18438 // Cloud Logging (https://cloud.google.com/healthcare/docs/how-tos/logging)).
18439 // Otherwise, when the operation finishes, a detailed response of type
18440 // RollbackFhirResourcesResponse is returned in the response field. The
18441 // metadata field type for this operation is OperationMetadata.
18442 //
18443 // - name: The name of the FHIR store to rollback, in the format of
18444 // "projects/{project_id}/locations/{location_id}/datasets/{dataset_id}
18445 // /fhirStores/{fhir_store_id}".
18446 func (r *ProjectsLocationsDatasetsFhirStoresService) Rollback(name string, rollbackfhirresourcesrequest *RollbackFhirResourcesRequest) *ProjectsLocationsDatasetsFhirStoresRollbackCall {
18447 c := &ProjectsLocationsDatasetsFhirStoresRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18448 c.name = name
18449 c.rollbackfhirresourcesrequest = rollbackfhirresourcesrequest
18450 return c
18451 }
18452
18453 // Fields allows partial responses to be retrieved. See
18454 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
18455 // details.
18456 func (c *ProjectsLocationsDatasetsFhirStoresRollbackCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresRollbackCall {
18457 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18458 return c
18459 }
18460
18461 // Context sets the context to be used in this call's Do method.
18462 func (c *ProjectsLocationsDatasetsFhirStoresRollbackCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresRollbackCall {
18463 c.ctx_ = ctx
18464 return c
18465 }
18466
18467 // Header returns a http.Header that can be modified by the caller to add
18468 // headers to the request.
18469 func (c *ProjectsLocationsDatasetsFhirStoresRollbackCall) Header() http.Header {
18470 if c.header_ == nil {
18471 c.header_ = make(http.Header)
18472 }
18473 return c.header_
18474 }
18475
18476 func (c *ProjectsLocationsDatasetsFhirStoresRollbackCall) doRequest(alt string) (*http.Response, error) {
18477 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
18478 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.rollbackfhirresourcesrequest)
18479 if err != nil {
18480 return nil, err
18481 }
18482 c.urlParams_.Set("alt", alt)
18483 c.urlParams_.Set("prettyPrint", "false")
18484 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:rollback")
18485 urls += "?" + c.urlParams_.Encode()
18486 req, err := http.NewRequest("POST", urls, body)
18487 if err != nil {
18488 return nil, err
18489 }
18490 req.Header = reqHeaders
18491 googleapi.Expand(req.URL, map[string]string{
18492 "name": c.name,
18493 })
18494 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.rollback", "request", internallog.HTTPRequest(req, body.Bytes()))
18495 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18496 }
18497
18498 // Do executes the "healthcare.projects.locations.datasets.fhirStores.rollback" call.
18499 // Any non-2xx status code is an error. Response headers are in either
18500 // *Operation.ServerResponse.Header or (if a response was returned at all) in
18501 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
18502 // whether the returned error was because http.StatusNotModified was returned.
18503 func (c *ProjectsLocationsDatasetsFhirStoresRollbackCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
18504 gensupport.SetOptions(c.urlParams_, opts...)
18505 res, err := c.doRequest("json")
18506 if res != nil && res.StatusCode == http.StatusNotModified {
18507 if res.Body != nil {
18508 res.Body.Close()
18509 }
18510 return nil, gensupport.WrapError(&googleapi.Error{
18511 Code: res.StatusCode,
18512 Header: res.Header,
18513 })
18514 }
18515 if err != nil {
18516 return nil, err
18517 }
18518 defer googleapi.CloseBody(res)
18519 if err := googleapi.CheckResponse(res); err != nil {
18520 return nil, gensupport.WrapError(err)
18521 }
18522 ret := &Operation{
18523 ServerResponse: googleapi.ServerResponse{
18524 Header: res.Header,
18525 HTTPStatusCode: res.StatusCode,
18526 },
18527 }
18528 target := &ret
18529 b, err := gensupport.DecodeResponseBytes(target, res)
18530 if err != nil {
18531 return nil, err
18532 }
18533 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.rollback", "response", internallog.HTTPResponse(res, b))
18534 return ret, nil
18535 }
18536
18537 type ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall struct {
18538 s *Service
18539 resource string
18540 setiampolicyrequest *SetIamPolicyRequest
18541 urlParams_ gensupport.URLParams
18542 ctx_ context.Context
18543 header_ http.Header
18544 }
18545
18546 // SetIamPolicy: Sets the access control policy on the specified resource.
18547 // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
18548 // and `PERMISSION_DENIED` errors.
18549 //
18550 // - resource: REQUIRED: The resource for which the policy is being specified.
18551 // See Resource names (https://cloud.google.com/apis/design/resource_names)
18552 // for the appropriate value for this field.
18553 func (r *ProjectsLocationsDatasetsFhirStoresService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall {
18554 c := &ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18555 c.resource = resource
18556 c.setiampolicyrequest = setiampolicyrequest
18557 return c
18558 }
18559
18560 // Fields allows partial responses to be retrieved. See
18561 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
18562 // details.
18563 func (c *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall {
18564 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18565 return c
18566 }
18567
18568 // Context sets the context to be used in this call's Do method.
18569 func (c *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall {
18570 c.ctx_ = ctx
18571 return c
18572 }
18573
18574 // Header returns a http.Header that can be modified by the caller to add
18575 // headers to the request.
18576 func (c *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall) Header() http.Header {
18577 if c.header_ == nil {
18578 c.header_ = make(http.Header)
18579 }
18580 return c.header_
18581 }
18582
18583 func (c *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
18584 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
18585 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest)
18586 if err != nil {
18587 return nil, err
18588 }
18589 c.urlParams_.Set("alt", alt)
18590 c.urlParams_.Set("prettyPrint", "false")
18591 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
18592 urls += "?" + c.urlParams_.Encode()
18593 req, err := http.NewRequest("POST", urls, body)
18594 if err != nil {
18595 return nil, err
18596 }
18597 req.Header = reqHeaders
18598 googleapi.Expand(req.URL, map[string]string{
18599 "resource": c.resource,
18600 })
18601 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes()))
18602 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18603 }
18604
18605 // Do executes the "healthcare.projects.locations.datasets.fhirStores.setIamPolicy" call.
18606 // Any non-2xx status code is an error. Response headers are in either
18607 // *Policy.ServerResponse.Header or (if a response was returned at all) in
18608 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
18609 // whether the returned error was because http.StatusNotModified was returned.
18610 func (c *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
18611 gensupport.SetOptions(c.urlParams_, opts...)
18612 res, err := c.doRequest("json")
18613 if res != nil && res.StatusCode == http.StatusNotModified {
18614 if res.Body != nil {
18615 res.Body.Close()
18616 }
18617 return nil, gensupport.WrapError(&googleapi.Error{
18618 Code: res.StatusCode,
18619 Header: res.Header,
18620 })
18621 }
18622 if err != nil {
18623 return nil, err
18624 }
18625 defer googleapi.CloseBody(res)
18626 if err := googleapi.CheckResponse(res); err != nil {
18627 return nil, gensupport.WrapError(err)
18628 }
18629 ret := &Policy{
18630 ServerResponse: googleapi.ServerResponse{
18631 Header: res.Header,
18632 HTTPStatusCode: res.StatusCode,
18633 },
18634 }
18635 target := &ret
18636 b, err := gensupport.DecodeResponseBytes(target, res)
18637 if err != nil {
18638 return nil, err
18639 }
18640 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.setIamPolicy", "response", internallog.HTTPResponse(res, b))
18641 return ret, nil
18642 }
18643
18644 type ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall struct {
18645 s *Service
18646 resource string
18647 testiampermissionsrequest *TestIamPermissionsRequest
18648 urlParams_ gensupport.URLParams
18649 ctx_ context.Context
18650 header_ http.Header
18651 }
18652
18653 // TestIamPermissions: Returns permissions that a caller has on the specified
18654 // resource. If the resource does not exist, this will return an empty set of
18655 // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
18656 // used for building permission-aware UIs and command-line tools, not for
18657 // authorization checking. This operation may "fail open" without warning.
18658 //
18659 // - resource: REQUIRED: The resource for which the policy detail is being
18660 // requested. See Resource names
18661 // (https://cloud.google.com/apis/design/resource_names) for the appropriate
18662 // value for this field.
18663 func (r *ProjectsLocationsDatasetsFhirStoresService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall {
18664 c := &ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18665 c.resource = resource
18666 c.testiampermissionsrequest = testiampermissionsrequest
18667 return c
18668 }
18669
18670 // Fields allows partial responses to be retrieved. See
18671 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
18672 // details.
18673 func (c *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall {
18674 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18675 return c
18676 }
18677
18678 // Context sets the context to be used in this call's Do method.
18679 func (c *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall {
18680 c.ctx_ = ctx
18681 return c
18682 }
18683
18684 // Header returns a http.Header that can be modified by the caller to add
18685 // headers to the request.
18686 func (c *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall) Header() http.Header {
18687 if c.header_ == nil {
18688 c.header_ = make(http.Header)
18689 }
18690 return c.header_
18691 }
18692
18693 func (c *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
18694 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
18695 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest)
18696 if err != nil {
18697 return nil, err
18698 }
18699 c.urlParams_.Set("alt", alt)
18700 c.urlParams_.Set("prettyPrint", "false")
18701 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
18702 urls += "?" + c.urlParams_.Encode()
18703 req, err := http.NewRequest("POST", urls, body)
18704 if err != nil {
18705 return nil, err
18706 }
18707 req.Header = reqHeaders
18708 googleapi.Expand(req.URL, map[string]string{
18709 "resource": c.resource,
18710 })
18711 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes()))
18712 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18713 }
18714
18715 // Do executes the "healthcare.projects.locations.datasets.fhirStores.testIamPermissions" call.
18716 // Any non-2xx status code is an error. Response headers are in either
18717 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
18718 // returned at all) in error.(*googleapi.Error).Header. Use
18719 // googleapi.IsNotModified to check whether the returned error was because
18720 // http.StatusNotModified was returned.
18721 func (c *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
18722 gensupport.SetOptions(c.urlParams_, opts...)
18723 res, err := c.doRequest("json")
18724 if res != nil && res.StatusCode == http.StatusNotModified {
18725 if res.Body != nil {
18726 res.Body.Close()
18727 }
18728 return nil, gensupport.WrapError(&googleapi.Error{
18729 Code: res.StatusCode,
18730 Header: res.Header,
18731 })
18732 }
18733 if err != nil {
18734 return nil, err
18735 }
18736 defer googleapi.CloseBody(res)
18737 if err := googleapi.CheckResponse(res); err != nil {
18738 return nil, gensupport.WrapError(err)
18739 }
18740 ret := &TestIamPermissionsResponse{
18741 ServerResponse: googleapi.ServerResponse{
18742 Header: res.Header,
18743 HTTPStatusCode: res.StatusCode,
18744 },
18745 }
18746 target := &ret
18747 b, err := gensupport.DecodeResponseBytes(target, res)
18748 if err != nil {
18749 return nil, err
18750 }
18751 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.testIamPermissions", "response", internallog.HTTPResponse(res, b))
18752 return ret, nil
18753 }
18754
18755 type ProjectsLocationsDatasetsFhirStoresFhirBinaryCreateCall struct {
18756 s *Service
18757 parent string
18758 body_ io.Reader
18759 urlParams_ gensupport.URLParams
18760 ctx_ context.Context
18761 header_ http.Header
18762 }
18763
18764 // BinaryCreate: Creates a FHIR Binary resource. This method can be used to
18765 // create a Binary resource either by using one of the accepted FHIR JSON
18766 // content types, or as a raw data stream. If a resource is created with this
18767 // method using the FHIR content type this method's behavior is the same as
18768 // `fhir.create`
18769 // (https://cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.fhirStores.fhir/create).
18770 // If a resource type other than Binary is used in the request it's treated in
18771 // the same way as non-FHIR data (e.g., images, zip archives, pdf files,
18772 // documents). When a non-FHIR content type is used in the request, a Binary
18773 // resource will be generated, and the uploaded data will be stored in the
18774 // `content` field (`DSTU2` and `STU3`), or the `data` field (`R4` and `R5`).
18775 // The Binary resource's `contentType` will be filled in using the value of the
18776 // `Content-Type` header, and the `securityContext` field (not present in
18777 // `DSTU2`) will be populated from the `X-Security-Context` header if it
18778 // exists. At this time `securityContext` has no special behavior in the Cloud
18779 // Healthcare API. Note: the limit on data ingested through this method is 1
18780 // GB. For best performance, use a non-FHIR data type instead of wrapping the
18781 // data in a Binary resource. Some of the Healthcare API features, such as
18782 // exporting to BigQuery
18783 // (https://cloud.google.com/healthcare-api/docs/how-tos/fhir-export-bigquery)
18784 // or Pub/Sub notifications
18785 // (https://cloud.google.com/healthcare-api/docs/fhir-pubsub#behavior_when_a_fhir_resource_is_too_large_or_traffic_is_high)
18786 // with full resource content, do not support Binary resources that are larger
18787 // than 10 MB. In these cases the resource's `data` field will be omitted.
18788 // Instead, the "http://hl7.org/fhir/StructureDefinition/data-absent-reason"
18789 // extension will be present to indicate that including the data is
18790 // `unsupported`. On success, an empty `201 Created` response is returned. The
18791 // newly created resource's ID and version are returned in the Location header.
18792 // Using `Prefer: representation=resource` is not allowed for this method. The
18793 // definition of the Binary REST API can be found at
18794 // https://hl7.org/fhir/binary.html#rest.
18795 //
18796 // - parent: The name of the FHIR store this resource belongs to.
18797 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) BinaryCreate(parent string, body_ io.Reader) *ProjectsLocationsDatasetsFhirStoresFhirBinaryCreateCall {
18798 c := &ProjectsLocationsDatasetsFhirStoresFhirBinaryCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18799 c.parent = parent
18800 c.body_ = body_
18801 return c
18802 }
18803
18804 // Fields allows partial responses to be retrieved. See
18805 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
18806 // details.
18807 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirBinaryCreateCall {
18808 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18809 return c
18810 }
18811
18812 // Context sets the context to be used in this call's Do method.
18813 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirBinaryCreateCall {
18814 c.ctx_ = ctx
18815 return c
18816 }
18817
18818 // Header returns a http.Header that can be modified by the caller to add
18819 // headers to the request.
18820 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryCreateCall) Header() http.Header {
18821 if c.header_ == nil {
18822 c.header_ = make(http.Header)
18823 }
18824 return c.header_
18825 }
18826
18827 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryCreateCall) doRequest(alt string) (*http.Response, error) {
18828 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
18829 body := bytes.NewBuffer(nil)
18830 _, err := body.ReadFrom(c.body_)
18831 if err != nil {
18832 return nil, err
18833 }
18834 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/fhir/Binary")
18835 urls += "?" + c.urlParams_.Encode()
18836 req, err := http.NewRequest("POST", urls, body)
18837 if err != nil {
18838 return nil, err
18839 }
18840 req.Header = reqHeaders
18841 googleapi.Expand(req.URL, map[string]string{
18842 "parent": c.parent,
18843 })
18844 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.Binary-create", "request", internallog.HTTPRequest(req, body.Bytes()))
18845 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18846 }
18847
18848 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.Binary-create" call.
18849 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryCreateCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
18850 gensupport.SetOptions(c.urlParams_, opts...)
18851 return c.doRequest("")
18852 }
18853
18854 type ProjectsLocationsDatasetsFhirStoresFhirBinaryReadCall struct {
18855 s *Service
18856 name string
18857 urlParams_ gensupport.URLParams
18858 ifNoneMatch_ string
18859 ctx_ context.Context
18860 header_ http.Header
18861 }
18862
18863 // BinaryRead: Gets the contents of a FHIR Binary resource. This method can be
18864 // used to retrieve a Binary resource either by using the FHIR JSON mimetype as
18865 // the value for the Accept header, or as a raw data stream. If the FHIR Accept
18866 // type is used this method will return a Binary resource with the data
18867 // base64-encoded, regardless of how the resource was created. The resource
18868 // data can be retrieved in base64-decoded form if the Accept type of the
18869 // request matches the value of the resource's `contentType` field. The
18870 // definition of the Binary REST API can be found at
18871 // https://hl7.org/fhir/binary.html#rest.
18872 //
18873 // - name: The name of the Binary resource to retrieve.
18874 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) BinaryRead(name string) *ProjectsLocationsDatasetsFhirStoresFhirBinaryReadCall {
18875 c := &ProjectsLocationsDatasetsFhirStoresFhirBinaryReadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18876 c.name = name
18877 return c
18878 }
18879
18880 // Fields allows partial responses to be retrieved. See
18881 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
18882 // details.
18883 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryReadCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirBinaryReadCall {
18884 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18885 return c
18886 }
18887
18888 // IfNoneMatch sets an optional parameter which makes the operation fail if the
18889 // object's ETag matches the given value. This is useful for getting updates
18890 // only after the object has changed since the last request.
18891 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryReadCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirBinaryReadCall {
18892 c.ifNoneMatch_ = entityTag
18893 return c
18894 }
18895
18896 // Context sets the context to be used in this call's Do method.
18897 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryReadCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirBinaryReadCall {
18898 c.ctx_ = ctx
18899 return c
18900 }
18901
18902 // Header returns a http.Header that can be modified by the caller to add
18903 // headers to the request.
18904 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryReadCall) Header() http.Header {
18905 if c.header_ == nil {
18906 c.header_ = make(http.Header)
18907 }
18908 return c.header_
18909 }
18910
18911 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryReadCall) doRequest(alt string) (*http.Response, error) {
18912 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
18913 if c.ifNoneMatch_ != "" {
18914 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18915 }
18916 c.urlParams_.Set("alt", alt)
18917 c.urlParams_.Set("prettyPrint", "false")
18918 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
18919 urls += "?" + c.urlParams_.Encode()
18920 req, err := http.NewRequest("GET", urls, nil)
18921 if err != nil {
18922 return nil, err
18923 }
18924 req.Header = reqHeaders
18925 googleapi.Expand(req.URL, map[string]string{
18926 "name": c.name,
18927 })
18928 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.Binary-read", "request", internallog.HTTPRequest(req, nil))
18929 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18930 }
18931
18932 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.Binary-read" call.
18933 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryReadCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
18934 gensupport.SetOptions(c.urlParams_, opts...)
18935 return c.doRequest("")
18936 }
18937
18938 type ProjectsLocationsDatasetsFhirStoresFhirBinaryUpdateCall struct {
18939 s *Service
18940 name string
18941 body_ io.Reader
18942 urlParams_ gensupport.URLParams
18943 ctx_ context.Context
18944 header_ http.Header
18945 }
18946
18947 // BinaryUpdate: Updates the entire contents of a Binary resource. If the
18948 // specified resource does not exist and the FHIR store has
18949 // enable_update_create set, creates the resource with the client-specified ID.
18950 // It is strongly advised not to include or encode any sensitive data such as
18951 // patient identifiers in client-specified resource IDs. Those IDs are part of
18952 // the FHIR resource path recorded in Cloud Audit Logs and Pub/Sub
18953 // notifications. Those IDs can also be contained in reference fields within
18954 // other resources. This method can be used to update a Binary resource either
18955 // by using one of the accepted FHIR JSON content types, or as a raw data
18956 // stream. If a resource is updated with this method using the FHIR content
18957 // type this method's behavior is the same as `update`. If a resource type
18958 // other than Binary is used in the request it will be treated in the same way
18959 // as non-FHIR data. When a non-FHIR content type is used in the request, a
18960 // Binary resource will be generated using the ID from the resource path, and
18961 // the uploaded data will be stored in the `content` field (`DSTU2` and
18962 // `STU3`), or the `data` field (`R4` and `R5`). The Binary resource's
18963 // `contentType` will be filled in using the value of the `Content-Type`
18964 // header, and the `securityContext` field (not present in `DSTU2`) will be
18965 // populated from the `X-Security-Context` header if it exists. At this time
18966 // `securityContext` has no special behavior in the Cloud Healthcare API. Note:
18967 // the limit on data ingested through this method is 2 GB. For best
18968 // performance, use a non-FHIR data type instead of wrapping the data in a
18969 // Binary resource. Some of the Healthcare API features, such as exporting to
18970 // BigQuery
18971 // (https://cloud.google.com/healthcare-api/docs/how-tos/fhir-export-bigquery)
18972 // or Pub/Sub notifications
18973 // (https://cloud.google.com/healthcare-api/docs/fhir-pubsub#behavior_when_a_fhir_resource_is_too_large_or_traffic_is_high)
18974 // with full resource content, do not support Binary resources that are larger
18975 // than 10 MB. In these cases the resource's `data` field will be omitted.
18976 // Instead, the "http://hl7.org/fhir/StructureDefinition/data-absent-reason"
18977 // extension will be present to indicate that including the data is
18978 // `unsupported`. On success, an empty 200 OK response will be returned, or a
18979 // 201 Created if the resource did not exit. The resource's ID and version are
18980 // returned in the Location header. Using `Prefer: representation=resource` is
18981 // not allowed for this method. The definition of the Binary REST API can be
18982 // found at https://hl7.org/fhir/binary.html#rest.
18983 //
18984 // - name: The name of the resource to update.
18985 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) BinaryUpdate(name string, body_ io.Reader) *ProjectsLocationsDatasetsFhirStoresFhirBinaryUpdateCall {
18986 c := &ProjectsLocationsDatasetsFhirStoresFhirBinaryUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18987 c.name = name
18988 c.body_ = body_
18989 return c
18990 }
18991
18992 // Fields allows partial responses to be retrieved. See
18993 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
18994 // details.
18995 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirBinaryUpdateCall {
18996 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18997 return c
18998 }
18999
19000 // Context sets the context to be used in this call's Do method.
19001 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryUpdateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirBinaryUpdateCall {
19002 c.ctx_ = ctx
19003 return c
19004 }
19005
19006 // Header returns a http.Header that can be modified by the caller to add
19007 // headers to the request.
19008 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryUpdateCall) Header() http.Header {
19009 if c.header_ == nil {
19010 c.header_ = make(http.Header)
19011 }
19012 return c.header_
19013 }
19014
19015 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryUpdateCall) doRequest(alt string) (*http.Response, error) {
19016 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19017 body := bytes.NewBuffer(nil)
19018 _, err := body.ReadFrom(c.body_)
19019 if err != nil {
19020 return nil, err
19021 }
19022 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
19023 urls += "?" + c.urlParams_.Encode()
19024 req, err := http.NewRequest("PUT", urls, body)
19025 if err != nil {
19026 return nil, err
19027 }
19028 req.Header = reqHeaders
19029 googleapi.Expand(req.URL, map[string]string{
19030 "name": c.name,
19031 })
19032 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.Binary-update", "request", internallog.HTTPRequest(req, body.Bytes()))
19033 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19034 }
19035
19036 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.Binary-update" call.
19037 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryUpdateCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
19038 gensupport.SetOptions(c.urlParams_, opts...)
19039 return c.doRequest("")
19040 }
19041
19042 type ProjectsLocationsDatasetsFhirStoresFhirBinaryVreadCall struct {
19043 s *Service
19044 name string
19045 urlParams_ gensupport.URLParams
19046 ifNoneMatch_ string
19047 ctx_ context.Context
19048 header_ http.Header
19049 }
19050
19051 // BinaryVread: Gets the contents of a version (current or historical) of a
19052 // FHIR Binary resource by version ID. This method can be used to retrieve a
19053 // Binary resource version either by using the FHIR JSON mimetype as the value
19054 // for the Accept header, or as a raw data stream. If the FHIR Accept type is
19055 // used this method will return a Binary resource with the data base64-encoded,
19056 // regardless of how the resource version was created. The resource data can be
19057 // retrieved in base64-decoded form if the Accept type of the request matches
19058 // the value of the resource version's `contentType` field. The definition of
19059 // the Binary REST API can be found at https://hl7.org/fhir/binary.html#rest.
19060 //
19061 // - name: The name of the Binary resource version to retrieve.
19062 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) BinaryVread(name string) *ProjectsLocationsDatasetsFhirStoresFhirBinaryVreadCall {
19063 c := &ProjectsLocationsDatasetsFhirStoresFhirBinaryVreadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19064 c.name = name
19065 return c
19066 }
19067
19068 // Fields allows partial responses to be retrieved. See
19069 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
19070 // details.
19071 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryVreadCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirBinaryVreadCall {
19072 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19073 return c
19074 }
19075
19076 // IfNoneMatch sets an optional parameter which makes the operation fail if the
19077 // object's ETag matches the given value. This is useful for getting updates
19078 // only after the object has changed since the last request.
19079 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryVreadCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirBinaryVreadCall {
19080 c.ifNoneMatch_ = entityTag
19081 return c
19082 }
19083
19084 // Context sets the context to be used in this call's Do method.
19085 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryVreadCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirBinaryVreadCall {
19086 c.ctx_ = ctx
19087 return c
19088 }
19089
19090 // Header returns a http.Header that can be modified by the caller to add
19091 // headers to the request.
19092 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryVreadCall) Header() http.Header {
19093 if c.header_ == nil {
19094 c.header_ = make(http.Header)
19095 }
19096 return c.header_
19097 }
19098
19099 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryVreadCall) doRequest(alt string) (*http.Response, error) {
19100 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19101 if c.ifNoneMatch_ != "" {
19102 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19103 }
19104 c.urlParams_.Set("alt", alt)
19105 c.urlParams_.Set("prettyPrint", "false")
19106 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
19107 urls += "?" + c.urlParams_.Encode()
19108 req, err := http.NewRequest("GET", urls, nil)
19109 if err != nil {
19110 return nil, err
19111 }
19112 req.Header = reqHeaders
19113 googleapi.Expand(req.URL, map[string]string{
19114 "name": c.name,
19115 })
19116 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.Binary-vread", "request", internallog.HTTPRequest(req, nil))
19117 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19118 }
19119
19120 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.Binary-vread" call.
19121 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryVreadCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
19122 gensupport.SetOptions(c.urlParams_, opts...)
19123 return c.doRequest("")
19124 }
19125
19126 type ProjectsLocationsDatasetsFhirStoresFhirConsentEnforcementStatusCall struct {
19127 s *Service
19128 name string
19129 urlParams_ gensupport.URLParams
19130 ifNoneMatch_ string
19131 ctx_ context.Context
19132 header_ http.Header
19133 }
19134
19135 // ConsentEnforcementStatus: Returns the consent enforcement status of a single
19136 // consent resource. On success, the response body contains a JSON-encoded
19137 // representation of a `Parameters` (http://hl7.org/fhir/parameters.html) FHIR
19138 // resource, containing the current enforcement status. Does not support DSTU2.
19139 //
19140 // - name: The name of the consent resource to find enforcement status, in the
19141 // format
19142 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirSt
19143 // ores/{fhir_store_id}/fhir/Consent/{consent_id}`.
19144 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) ConsentEnforcementStatus(name string) *ProjectsLocationsDatasetsFhirStoresFhirConsentEnforcementStatusCall {
19145 c := &ProjectsLocationsDatasetsFhirStoresFhirConsentEnforcementStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19146 c.name = name
19147 return c
19148 }
19149
19150 // Fields allows partial responses to be retrieved. See
19151 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
19152 // details.
19153 func (c *ProjectsLocationsDatasetsFhirStoresFhirConsentEnforcementStatusCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirConsentEnforcementStatusCall {
19154 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19155 return c
19156 }
19157
19158 // IfNoneMatch sets an optional parameter which makes the operation fail if the
19159 // object's ETag matches the given value. This is useful for getting updates
19160 // only after the object has changed since the last request.
19161 func (c *ProjectsLocationsDatasetsFhirStoresFhirConsentEnforcementStatusCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirConsentEnforcementStatusCall {
19162 c.ifNoneMatch_ = entityTag
19163 return c
19164 }
19165
19166 // Context sets the context to be used in this call's Do method.
19167 func (c *ProjectsLocationsDatasetsFhirStoresFhirConsentEnforcementStatusCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirConsentEnforcementStatusCall {
19168 c.ctx_ = ctx
19169 return c
19170 }
19171
19172 // Header returns a http.Header that can be modified by the caller to add
19173 // headers to the request.
19174 func (c *ProjectsLocationsDatasetsFhirStoresFhirConsentEnforcementStatusCall) Header() http.Header {
19175 if c.header_ == nil {
19176 c.header_ = make(http.Header)
19177 }
19178 return c.header_
19179 }
19180
19181 func (c *ProjectsLocationsDatasetsFhirStoresFhirConsentEnforcementStatusCall) doRequest(alt string) (*http.Response, error) {
19182 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19183 if c.ifNoneMatch_ != "" {
19184 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19185 }
19186 c.urlParams_.Set("alt", alt)
19187 c.urlParams_.Set("prettyPrint", "false")
19188 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/$consent-enforcement-status")
19189 urls += "?" + c.urlParams_.Encode()
19190 req, err := http.NewRequest("GET", urls, nil)
19191 if err != nil {
19192 return nil, err
19193 }
19194 req.Header = reqHeaders
19195 googleapi.Expand(req.URL, map[string]string{
19196 "name": c.name,
19197 })
19198 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.Consent-enforcement-status", "request", internallog.HTTPRequest(req, nil))
19199 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19200 }
19201
19202 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.Consent-enforcement-status" call.
19203 func (c *ProjectsLocationsDatasetsFhirStoresFhirConsentEnforcementStatusCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
19204 gensupport.SetOptions(c.urlParams_, opts...)
19205 return c.doRequest("")
19206 }
19207
19208 type ProjectsLocationsDatasetsFhirStoresFhirPatientConsentEnforcementStatusCall struct {
19209 s *Service
19210 name string
19211 urlParams_ gensupport.URLParams
19212 ifNoneMatch_ string
19213 ctx_ context.Context
19214 header_ http.Header
19215 }
19216
19217 // PatientConsentEnforcementStatus: Returns the consent enforcement status of
19218 // all consent resources for a patient. On success, the response body contains
19219 // a JSON-encoded representation of a bundle of `Parameters`
19220 // (http://hl7.org/fhir/parameters.html) FHIR resources, containing the current
19221 // enforcement status for each consent resource of the patient. Does not
19222 // support DSTU2.
19223 //
19224 // - name: The name of the patient to find enforcement statuses, in the format
19225 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirSt
19226 // ores/{fhir_store_id}/fhir/Patient/{patient_id}`.
19227 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) PatientConsentEnforcementStatus(name string) *ProjectsLocationsDatasetsFhirStoresFhirPatientConsentEnforcementStatusCall {
19228 c := &ProjectsLocationsDatasetsFhirStoresFhirPatientConsentEnforcementStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19229 c.name = name
19230 return c
19231 }
19232
19233 // Count sets the optional parameter "_count": The maximum number of results on
19234 // a page. If not specified, 100 is used. May not be larger than 1000.
19235 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientConsentEnforcementStatusCall) Count(Count int64) *ProjectsLocationsDatasetsFhirStoresFhirPatientConsentEnforcementStatusCall {
19236 c.urlParams_.Set("_count", fmt.Sprint(Count))
19237 return c
19238 }
19239
19240 // PageToken sets the optional parameter "_page_token": Used to retrieve the
19241 // first, previous, next, or last page of consent enforcement statuses when
19242 // using pagination. Value should be set to the value of `_page_token` set in
19243 // next or previous page links' URLs. Next and previous page are returned in
19244 // the response bundle's links field, where `link.relation` is "previous" or
19245 // "next". Omit `_page_token` if no previous request has been made.
19246 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientConsentEnforcementStatusCall) PageToken(PageToken string) *ProjectsLocationsDatasetsFhirStoresFhirPatientConsentEnforcementStatusCall {
19247 c.urlParams_.Set("_page_token", PageToken)
19248 return c
19249 }
19250
19251 // Fields allows partial responses to be retrieved. See
19252 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
19253 // details.
19254 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientConsentEnforcementStatusCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirPatientConsentEnforcementStatusCall {
19255 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19256 return c
19257 }
19258
19259 // IfNoneMatch sets an optional parameter which makes the operation fail if the
19260 // object's ETag matches the given value. This is useful for getting updates
19261 // only after the object has changed since the last request.
19262 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientConsentEnforcementStatusCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirPatientConsentEnforcementStatusCall {
19263 c.ifNoneMatch_ = entityTag
19264 return c
19265 }
19266
19267 // Context sets the context to be used in this call's Do method.
19268 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientConsentEnforcementStatusCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirPatientConsentEnforcementStatusCall {
19269 c.ctx_ = ctx
19270 return c
19271 }
19272
19273 // Header returns a http.Header that can be modified by the caller to add
19274 // headers to the request.
19275 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientConsentEnforcementStatusCall) Header() http.Header {
19276 if c.header_ == nil {
19277 c.header_ = make(http.Header)
19278 }
19279 return c.header_
19280 }
19281
19282 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientConsentEnforcementStatusCall) doRequest(alt string) (*http.Response, error) {
19283 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19284 if c.ifNoneMatch_ != "" {
19285 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19286 }
19287 c.urlParams_.Set("alt", alt)
19288 c.urlParams_.Set("prettyPrint", "false")
19289 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/$consent-enforcement-status")
19290 urls += "?" + c.urlParams_.Encode()
19291 req, err := http.NewRequest("GET", urls, nil)
19292 if err != nil {
19293 return nil, err
19294 }
19295 req.Header = reqHeaders
19296 googleapi.Expand(req.URL, map[string]string{
19297 "name": c.name,
19298 })
19299 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.Patient-consent-enforcement-status", "request", internallog.HTTPRequest(req, nil))
19300 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19301 }
19302
19303 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.Patient-consent-enforcement-status" call.
19304 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientConsentEnforcementStatusCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
19305 gensupport.SetOptions(c.urlParams_, opts...)
19306 return c.doRequest("")
19307 }
19308
19309 type ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall struct {
19310 s *Service
19311 name string
19312 urlParams_ gensupport.URLParams
19313 ifNoneMatch_ string
19314 ctx_ context.Context
19315 header_ http.Header
19316 }
19317
19318 // PatientEverything: Retrieves a Patient resource and resources related to
19319 // that patient. Implements the FHIR extended operation Patient-everything
19320 // (DSTU2 (https://hl7.org/fhir/DSTU2/patient-operations.html#everything), STU3
19321 // (https://hl7.org/fhir/STU3/patient-operations.html#everything), R4
19322 // (https://hl7.org/fhir/R4/patient-operation-everything.html), R5
19323 // (https://hl7.org/fhir/R5/patient-operation-everything.html)). On success,
19324 // the response body contains a JSON-encoded representation of a `Bundle`
19325 // resource of type `searchset`, containing the results of the operation.
19326 // Errors generated by the FHIR store contain a JSON-encoded `OperationOutcome`
19327 // resource describing the reason for the error. If the request cannot be
19328 // mapped to a valid API method on a FHIR store, a generic GCP error might be
19329 // returned instead. The resources in scope for the response are: * The patient
19330 // resource itself. * All the resources directly referenced by the patient
19331 // resource. * Resources directly referencing the patient resource that meet
19332 // the inclusion criteria. The inclusion criteria are based on the membership
19333 // rules in the patient compartment definition (DSTU2
19334 // (http://hl7.org/fhir/DSTU2/compartment-patient.html), STU3
19335 // (http://www.hl7.org/fhir/stu3/compartmentdefinition-patient.html), R4
19336 // (http://hl7.org/fhir/R4/compartmentdefinition-patient.html), R5
19337 // (http://hl7.org/fhir/R5/compartmentdefinition-patient.html)), which details
19338 // the eligible resource types and referencing search parameters. For samples
19339 // that show how to call `Patient-everything`, see Getting all patient
19340 // compartment resources
19341 // (https://cloud.google.com/healthcare/docs/how-tos/fhir-resources#getting_all_patient_compartment_resources).
19342 //
19343 // - name: Name of the `Patient` resource for which the information is
19344 // required.
19345 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) PatientEverything(name string) *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall {
19346 c := &ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19347 c.name = name
19348 return c
19349 }
19350
19351 // Count sets the optional parameter "_count": Maximum number of resources in a
19352 // page. If not specified, 100 is used. May not be larger than 1000.
19353 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) Count(Count int64) *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall {
19354 c.urlParams_.Set("_count", fmt.Sprint(Count))
19355 return c
19356 }
19357
19358 // PageToken sets the optional parameter "_page_token": Used to retrieve the
19359 // next or previous page of results when using pagination. Set `_page_token` to
19360 // the value of _page_token set in next or previous page links' url. Next and
19361 // previous page are returned in the response bundle's links field, where
19362 // `link.relation` is "previous" or "next". Omit `_page_token` if no previous
19363 // request has been made.
19364 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) PageToken(PageToken string) *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall {
19365 c.urlParams_.Set("_page_token", PageToken)
19366 return c
19367 }
19368
19369 // Since sets the optional parameter "_since": If provided, only resources
19370 // updated after this time are returned. The time uses the format
19371 // YYYY-MM-DDThh:mm:ss.sss+zz:zz. For example, `2015-02-07T13:28:17.239+02:00`
19372 // or `2017-01-01T00:00:00Z`. The time must be specified to the second and
19373 // include a time zone.
19374 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) Since(Since string) *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall {
19375 c.urlParams_.Set("_since", Since)
19376 return c
19377 }
19378
19379 // Type sets the optional parameter "_type": String of comma-delimited FHIR
19380 // resource types. If provided, only resources of the specified resource
19381 // type(s) are returned. Specifying multiple `_type` parameters isn't
19382 // supported. For example, the result of `_type=Observation&_type=Encounter` is
19383 // undefined. Use `_type=Observation,Encounter` instead.
19384 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) Type(Type string) *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall {
19385 c.urlParams_.Set("_type", Type)
19386 return c
19387 }
19388
19389 // End sets the optional parameter "end": The response includes records prior
19390 // to the end date. The date uses the format YYYY-MM-DD. If no end date is
19391 // provided, all records subsequent to the start date are in scope.
19392 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) End(end string) *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall {
19393 c.urlParams_.Set("end", end)
19394 return c
19395 }
19396
19397 // Start sets the optional parameter "start": The response includes records
19398 // subsequent to the start date. The date uses the format YYYY-MM-DD. If no
19399 // start date is provided, all records prior to the end date are in scope.
19400 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) Start(start string) *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall {
19401 c.urlParams_.Set("start", start)
19402 return c
19403 }
19404
19405 // Fields allows partial responses to be retrieved. See
19406 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
19407 // details.
19408 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall {
19409 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19410 return c
19411 }
19412
19413 // IfNoneMatch sets an optional parameter which makes the operation fail if the
19414 // object's ETag matches the given value. This is useful for getting updates
19415 // only after the object has changed since the last request.
19416 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall {
19417 c.ifNoneMatch_ = entityTag
19418 return c
19419 }
19420
19421 // Context sets the context to be used in this call's Do method.
19422 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall {
19423 c.ctx_ = ctx
19424 return c
19425 }
19426
19427 // Header returns a http.Header that can be modified by the caller to add
19428 // headers to the request.
19429 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) Header() http.Header {
19430 if c.header_ == nil {
19431 c.header_ = make(http.Header)
19432 }
19433 return c.header_
19434 }
19435
19436 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) doRequest(alt string) (*http.Response, error) {
19437 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19438 if c.ifNoneMatch_ != "" {
19439 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19440 }
19441 c.urlParams_.Set("alt", alt)
19442 c.urlParams_.Set("prettyPrint", "false")
19443 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/$everything")
19444 urls += "?" + c.urlParams_.Encode()
19445 req, err := http.NewRequest("GET", urls, nil)
19446 if err != nil {
19447 return nil, err
19448 }
19449 req.Header = reqHeaders
19450 googleapi.Expand(req.URL, map[string]string{
19451 "name": c.name,
19452 })
19453 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.Patient-everything", "request", internallog.HTTPRequest(req, nil))
19454 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19455 }
19456
19457 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.Patient-everything" call.
19458 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
19459 gensupport.SetOptions(c.urlParams_, opts...)
19460 return c.doRequest("")
19461 }
19462
19463 type ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall struct {
19464 s *Service
19465 name string
19466 urlParams_ gensupport.URLParams
19467 ctx_ context.Context
19468 header_ http.Header
19469 }
19470
19471 // ResourcePurge: Deletes all the historical versions of a resource (excluding
19472 // the current version) from the FHIR store. To remove all versions of a
19473 // resource, first delete the current version and then call this method. This
19474 // is not a FHIR standard operation. For samples that show how to call
19475 // `Resource-purge`, see Deleting historical versions of a FHIR resource
19476 // (https://cloud.google.com/healthcare/docs/how-tos/fhir-resources#deleting_historical_versions_of_a_fhir_resource).
19477 //
19478 // - name: The name of the resource to purge.
19479 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) ResourcePurge(name string) *ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall {
19480 c := &ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19481 c.name = name
19482 return c
19483 }
19484
19485 // Fields allows partial responses to be retrieved. See
19486 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
19487 // details.
19488 func (c *ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall {
19489 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19490 return c
19491 }
19492
19493 // Context sets the context to be used in this call's Do method.
19494 func (c *ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall {
19495 c.ctx_ = ctx
19496 return c
19497 }
19498
19499 // Header returns a http.Header that can be modified by the caller to add
19500 // headers to the request.
19501 func (c *ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall) Header() http.Header {
19502 if c.header_ == nil {
19503 c.header_ = make(http.Header)
19504 }
19505 return c.header_
19506 }
19507
19508 func (c *ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall) doRequest(alt string) (*http.Response, error) {
19509 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19510 c.urlParams_.Set("alt", alt)
19511 c.urlParams_.Set("prettyPrint", "false")
19512 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/$purge")
19513 urls += "?" + c.urlParams_.Encode()
19514 req, err := http.NewRequest("DELETE", urls, nil)
19515 if err != nil {
19516 return nil, err
19517 }
19518 req.Header = reqHeaders
19519 googleapi.Expand(req.URL, map[string]string{
19520 "name": c.name,
19521 })
19522 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.Resource-purge", "request", internallog.HTTPRequest(req, nil))
19523 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19524 }
19525
19526 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.Resource-purge" call.
19527 // Any non-2xx status code is an error. Response headers are in either
19528 // *Empty.ServerResponse.Header or (if a response was returned at all) in
19529 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
19530 // whether the returned error was because http.StatusNotModified was returned.
19531 func (c *ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
19532 gensupport.SetOptions(c.urlParams_, opts...)
19533 res, err := c.doRequest("json")
19534 if res != nil && res.StatusCode == http.StatusNotModified {
19535 if res.Body != nil {
19536 res.Body.Close()
19537 }
19538 return nil, gensupport.WrapError(&googleapi.Error{
19539 Code: res.StatusCode,
19540 Header: res.Header,
19541 })
19542 }
19543 if err != nil {
19544 return nil, err
19545 }
19546 defer googleapi.CloseBody(res)
19547 if err := googleapi.CheckResponse(res); err != nil {
19548 return nil, gensupport.WrapError(err)
19549 }
19550 ret := &Empty{
19551 ServerResponse: googleapi.ServerResponse{
19552 Header: res.Header,
19553 HTTPStatusCode: res.StatusCode,
19554 },
19555 }
19556 target := &ret
19557 b, err := gensupport.DecodeResponseBytes(target, res)
19558 if err != nil {
19559 return nil, err
19560 }
19561 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.Resource-purge", "response", internallog.HTTPResponse(res, b))
19562 return ret, nil
19563 }
19564
19565 type ProjectsLocationsDatasetsFhirStoresFhirResourceValidateCall struct {
19566 s *Service
19567 parent string
19568 type_ string
19569 body_ io.Reader
19570 urlParams_ gensupport.URLParams
19571 ctx_ context.Context
19572 header_ http.Header
19573 }
19574
19575 // ResourceValidate: Validates an input FHIR resource's conformance to its
19576 // profiles and the profiles configured on the FHIR store. Implements the FHIR
19577 // extended operation $validate (DSTU2
19578 // (https://hl7.org/fhir/DSTU2/resource-operations.html#validate), STU3
19579 // (https://hl7.org/fhir/STU3/resource-operations.html#validate), R4
19580 // (https://hl7.org/fhir/R4/resource-operation-validate.html). or R5
19581 // (https://hl7.org/fhir/R5/resource-operation-validate.html)). The request
19582 // body must contain a JSON-encoded FHIR resource, and the request headers must
19583 // contain `Content-Type: application/fhir+json`. The `Parameters` input syntax
19584 // is not supported. The `profile` query parameter can be used to request that
19585 // the resource only be validated against a specific profile. If a profile with
19586 // the given URL cannot be found in the FHIR store then an error is returned.
19587 // Errors generated by validation contain a JSON-encoded `OperationOutcome`
19588 // resource describing the reason for the error. If the request cannot be
19589 // mapped to a valid API method on a FHIR store, a generic GCP error might be
19590 // returned instead.
19591 //
19592 // - parent: The name of the FHIR store that holds the profiles being used for
19593 // validation.
19594 // - type: The FHIR resource type of the resource being validated. For a
19595 // complete list, see the FHIR Resource Index (DSTU2
19596 // (https://hl7.org/fhir/DSTU2/resourcelist.html), STU3
19597 // (https://hl7.org/fhir/STU3/resourcelist.html), R4
19598 // (https://hl7.org/fhir/R4/resourcelist.html), or R5
19599 // (https://hl7.org/fhir/R5/resourcelist.html)). Must match the resource type
19600 // in the provided content.
19601 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) ResourceValidate(parent string, type_ string, body_ io.Reader) *ProjectsLocationsDatasetsFhirStoresFhirResourceValidateCall {
19602 c := &ProjectsLocationsDatasetsFhirStoresFhirResourceValidateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19603 c.parent = parent
19604 c.type_ = type_
19605 c.body_ = body_
19606 return c
19607 }
19608
19609 // Profile sets the optional parameter "profile": The canonical URL of a
19610 // profile that this resource should be validated against. For example, to
19611 // validate a Patient resource against the US Core Patient profile this
19612 // parameter would be
19613 // `http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient`. A
19614 // StructureDefinition with this canonical URL must exist in the FHIR store.
19615 func (c *ProjectsLocationsDatasetsFhirStoresFhirResourceValidateCall) Profile(profile string) *ProjectsLocationsDatasetsFhirStoresFhirResourceValidateCall {
19616 c.urlParams_.Set("profile", profile)
19617 return c
19618 }
19619
19620 // Fields allows partial responses to be retrieved. See
19621 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
19622 // details.
19623 func (c *ProjectsLocationsDatasetsFhirStoresFhirResourceValidateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirResourceValidateCall {
19624 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19625 return c
19626 }
19627
19628 // Context sets the context to be used in this call's Do method.
19629 func (c *ProjectsLocationsDatasetsFhirStoresFhirResourceValidateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirResourceValidateCall {
19630 c.ctx_ = ctx
19631 return c
19632 }
19633
19634 // Header returns a http.Header that can be modified by the caller to add
19635 // headers to the request.
19636 func (c *ProjectsLocationsDatasetsFhirStoresFhirResourceValidateCall) Header() http.Header {
19637 if c.header_ == nil {
19638 c.header_ = make(http.Header)
19639 }
19640 return c.header_
19641 }
19642
19643 func (c *ProjectsLocationsDatasetsFhirStoresFhirResourceValidateCall) doRequest(alt string) (*http.Response, error) {
19644 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19645 body := bytes.NewBuffer(nil)
19646 _, err := body.ReadFrom(c.body_)
19647 if err != nil {
19648 return nil, err
19649 }
19650 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/fhir/{+type}/$validate")
19651 urls += "?" + c.urlParams_.Encode()
19652 req, err := http.NewRequest("POST", urls, body)
19653 if err != nil {
19654 return nil, err
19655 }
19656 req.Header = reqHeaders
19657 googleapi.Expand(req.URL, map[string]string{
19658 "parent": c.parent,
19659 "type": c.type_,
19660 })
19661 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.Resource-validate", "request", internallog.HTTPRequest(req, body.Bytes()))
19662 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19663 }
19664
19665 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.Resource-validate" call.
19666 func (c *ProjectsLocationsDatasetsFhirStoresFhirResourceValidateCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
19667 gensupport.SetOptions(c.urlParams_, opts...)
19668 return c.doRequest("")
19669 }
19670
19671 type ProjectsLocationsDatasetsFhirStoresFhirBulkExportCall struct {
19672 s *Service
19673 name string
19674 urlParams_ gensupport.URLParams
19675 ifNoneMatch_ string
19676 ctx_ context.Context
19677 header_ http.Header
19678 }
19679
19680 // BulkExport: Bulk exports all resources from the FHIR store to the specified
19681 // destination. Implements the FHIR implementation guide system level $export
19682 // (https://build.fhir.org/ig/HL7/bulk-data/export.html#endpoint---system-level-export).
19683 // The following headers must be set in the request: * `Accept`: specifies the
19684 // format of the `OperationOutcome` response. Only `application/fhir+json` is
19685 // supported. * `Prefer`: specifies whether the response is immediate or
19686 // asynchronous. Must be to `respond-async` because only asynchronous responses
19687 // are supported. Specify the destination for the server to write result files
19688 // by setting the Cloud Storage location bulk_export_gcs_destination on the
19689 // FHIR store. URI of an existing Cloud Storage directory where the server
19690 // writes result files, in the format
19691 // gs://{bucket-id}/{path/to/destination/dir}. If there is no trailing slash,
19692 // the service appends one when composing the object path. The user is
19693 // responsible for creating the Cloud Storage bucket referenced. Supports the
19694 // following query parameters: * `_type`: string of comma-delimited FHIR
19695 // resource types. If provided, only the resources of the specified type(s) are
19696 // exported. * `_since`: if provided, only the resources that are updated after
19697 // the specified time are exported. * `_outputFormat`: optional, specify ndjson
19698 // to export data in NDJSON format. Exported file names use the format:
19699 // {export_id}_{resource_type}.ndjson. On success, the `Content-Location`
19700 // header of the response is set to a URL that the user can use to query the
19701 // status of the export. The URL is in the format:
19702 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStor
19703 // es/{fhir_store_id}/operations/{export_id}`. See get-fhir-operation-status
19704 // for more information. Errors generated by the FHIR store contain a
19705 // JSON-encoded `OperationOutcome` resource describing the reason for the
19706 // error.
19707 //
19708 // - name: The name of the FHIR store to export resources from, in the format
19709 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirSt
19710 // ores/{fhir_store_id}`.
19711 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) BulkExport(name string) *ProjectsLocationsDatasetsFhirStoresFhirBulkExportCall {
19712 c := &ProjectsLocationsDatasetsFhirStoresFhirBulkExportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19713 c.name = name
19714 return c
19715 }
19716
19717 // Since sets the optional parameter "_since": If provided, only resources
19718 // updated after this time are exported. The time uses the format
19719 // YYYY-MM-DDThh:mm:ss.sss+zz:zz. For example, `2015-02-07T13:28:17.239+02:00`
19720 // or `2017-01-01T00:00:00Z`. The time must be specified to the second and
19721 // include a time zone.
19722 func (c *ProjectsLocationsDatasetsFhirStoresFhirBulkExportCall) Since(Since string) *ProjectsLocationsDatasetsFhirStoresFhirBulkExportCall {
19723 c.urlParams_.Set("_since", Since)
19724 return c
19725 }
19726
19727 // Type sets the optional parameter "_type": String of comma-delimited FHIR
19728 // resource types. If provided, only resources of the specified resource
19729 // type(s) are exported.
19730 func (c *ProjectsLocationsDatasetsFhirStoresFhirBulkExportCall) Type(Type string) *ProjectsLocationsDatasetsFhirStoresFhirBulkExportCall {
19731 c.urlParams_.Set("_type", Type)
19732 return c
19733 }
19734
19735 // OutputFormat sets the optional parameter "outputFormat": Output format of
19736 // the export. This field is optional and only `application/fhir+ndjson` is
19737 // supported.
19738 func (c *ProjectsLocationsDatasetsFhirStoresFhirBulkExportCall) OutputFormat(outputFormat string) *ProjectsLocationsDatasetsFhirStoresFhirBulkExportCall {
19739 c.urlParams_.Set("outputFormat", outputFormat)
19740 return c
19741 }
19742
19743 // Fields allows partial responses to be retrieved. See
19744 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
19745 // details.
19746 func (c *ProjectsLocationsDatasetsFhirStoresFhirBulkExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirBulkExportCall {
19747 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19748 return c
19749 }
19750
19751 // IfNoneMatch sets an optional parameter which makes the operation fail if the
19752 // object's ETag matches the given value. This is useful for getting updates
19753 // only after the object has changed since the last request.
19754 func (c *ProjectsLocationsDatasetsFhirStoresFhirBulkExportCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirBulkExportCall {
19755 c.ifNoneMatch_ = entityTag
19756 return c
19757 }
19758
19759 // Context sets the context to be used in this call's Do method.
19760 func (c *ProjectsLocationsDatasetsFhirStoresFhirBulkExportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirBulkExportCall {
19761 c.ctx_ = ctx
19762 return c
19763 }
19764
19765 // Header returns a http.Header that can be modified by the caller to add
19766 // headers to the request.
19767 func (c *ProjectsLocationsDatasetsFhirStoresFhirBulkExportCall) Header() http.Header {
19768 if c.header_ == nil {
19769 c.header_ = make(http.Header)
19770 }
19771 return c.header_
19772 }
19773
19774 func (c *ProjectsLocationsDatasetsFhirStoresFhirBulkExportCall) doRequest(alt string) (*http.Response, error) {
19775 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19776 if c.ifNoneMatch_ != "" {
19777 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19778 }
19779 c.urlParams_.Set("alt", alt)
19780 c.urlParams_.Set("prettyPrint", "false")
19781 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/fhir/$export")
19782 urls += "?" + c.urlParams_.Encode()
19783 req, err := http.NewRequest("GET", urls, nil)
19784 if err != nil {
19785 return nil, err
19786 }
19787 req.Header = reqHeaders
19788 googleapi.Expand(req.URL, map[string]string{
19789 "name": c.name,
19790 })
19791 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.bulk-export", "request", internallog.HTTPRequest(req, nil))
19792 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19793 }
19794
19795 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.bulk-export" call.
19796 func (c *ProjectsLocationsDatasetsFhirStoresFhirBulkExportCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
19797 gensupport.SetOptions(c.urlParams_, opts...)
19798 return c.doRequest("")
19799 }
19800
19801 type ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall struct {
19802 s *Service
19803 name string
19804 urlParams_ gensupport.URLParams
19805 ifNoneMatch_ string
19806 ctx_ context.Context
19807 header_ http.Header
19808 }
19809
19810 // Capabilities: Gets the FHIR capability statement (STU3
19811 // (https://hl7.org/fhir/STU3/capabilitystatement.html), R4
19812 // (https://hl7.org/fhir/R4/capabilitystatement.html), R5
19813 // (https://hl7.org/fhir/R5/capabilitystatement.html)), or the conformance
19814 // statement (https://hl7.org/fhir/DSTU2/conformance.html) in the DSTU2 case
19815 // for the store, which contains a description of functionality supported by
19816 // the server. Implements the FHIR standard capabilities interaction (STU3
19817 // (https://hl7.org/fhir/STU3/http.html#capabilities), R4
19818 // (https://hl7.org/fhir/R4/http.html#capabilities), R5
19819 // (https://hl7.org/fhir/R5/http.html#capabilities)), or the conformance
19820 // interaction (https://hl7.org/fhir/DSTU2/http.html#conformance) in the DSTU2
19821 // case. On success, the response body contains a JSON-encoded representation
19822 // of a `CapabilityStatement` resource.
19823 //
19824 // - name: Name of the FHIR store to retrieve the capabilities for.
19825 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Capabilities(name string) *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall {
19826 c := &ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19827 c.name = name
19828 return c
19829 }
19830
19831 // Fields allows partial responses to be retrieved. See
19832 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
19833 // details.
19834 func (c *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall {
19835 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19836 return c
19837 }
19838
19839 // IfNoneMatch sets an optional parameter which makes the operation fail if the
19840 // object's ETag matches the given value. This is useful for getting updates
19841 // only after the object has changed since the last request.
19842 func (c *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall {
19843 c.ifNoneMatch_ = entityTag
19844 return c
19845 }
19846
19847 // Context sets the context to be used in this call's Do method.
19848 func (c *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall {
19849 c.ctx_ = ctx
19850 return c
19851 }
19852
19853 // Header returns a http.Header that can be modified by the caller to add
19854 // headers to the request.
19855 func (c *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall) Header() http.Header {
19856 if c.header_ == nil {
19857 c.header_ = make(http.Header)
19858 }
19859 return c.header_
19860 }
19861
19862 func (c *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall) doRequest(alt string) (*http.Response, error) {
19863 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19864 if c.ifNoneMatch_ != "" {
19865 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19866 }
19867 c.urlParams_.Set("alt", alt)
19868 c.urlParams_.Set("prettyPrint", "false")
19869 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/fhir/metadata")
19870 urls += "?" + c.urlParams_.Encode()
19871 req, err := http.NewRequest("GET", urls, nil)
19872 if err != nil {
19873 return nil, err
19874 }
19875 req.Header = reqHeaders
19876 googleapi.Expand(req.URL, map[string]string{
19877 "name": c.name,
19878 })
19879 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.capabilities", "request", internallog.HTTPRequest(req, nil))
19880 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19881 }
19882
19883 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.capabilities" call.
19884 func (c *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
19885 gensupport.SetOptions(c.urlParams_, opts...)
19886 return c.doRequest("")
19887 }
19888
19889 type ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteCall struct {
19890 s *Service
19891 parent string
19892 type_ string
19893 urlParams_ gensupport.URLParams
19894 ctx_ context.Context
19895 header_ http.Header
19896 }
19897
19898 // ConditionalDelete: Deletes a FHIR resource that match an identifier search
19899 // query. Implements the FHIR standard conditional delete interaction, limited
19900 // to searching by resource identifier. If multiple resources match, 412
19901 // Precondition Failed error will be returned. Search term for identifier
19902 // should be in the pattern `identifier=system|value` or `identifier=value` -
19903 // similar to the `search` method on resources with a specific identifier.
19904 // Note: Unless resource versioning is disabled by setting the
19905 // disable_resource_versioning flag on the FHIR store, the deleted resource is
19906 // moved to a history repository that can still be retrieved through vread and
19907 // related methods, unless they are removed by the purge method. For samples
19908 // that show how to call `conditionalDelete`, see Conditionally deleting a FHIR
19909 // resource
19910 // (https://cloud.google.com/healthcare/docs/how-tos/fhir-resources#conditionally_deleting_a_fhir_resource).
19911 //
19912 // - parent: The name of the FHIR store this resource belongs to.
19913 // - type: The FHIR resource type to delete, such as Patient or Observation.
19914 // For a complete list, see the FHIR Resource Index (DSTU2
19915 // (https://hl7.org/fhir/DSTU2/resourcelist.html), STU3
19916 // (https://hl7.org/fhir/STU3/resourcelist.html), R4
19917 // (https://hl7.org/fhir/R4/resourcelist.html), R5
19918 // (https://hl7.org/fhir/R5/resourcelist.html)).
19919 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) ConditionalDelete(parent string, type_ string) *ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteCall {
19920 c := &ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19921 c.parent = parent
19922 c.type_ = type_
19923 return c
19924 }
19925
19926 // Fields allows partial responses to be retrieved. See
19927 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
19928 // details.
19929 func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteCall {
19930 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19931 return c
19932 }
19933
19934 // Context sets the context to be used in this call's Do method.
19935 func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteCall {
19936 c.ctx_ = ctx
19937 return c
19938 }
19939
19940 // Header returns a http.Header that can be modified by the caller to add
19941 // headers to the request.
19942 func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteCall) Header() http.Header {
19943 if c.header_ == nil {
19944 c.header_ = make(http.Header)
19945 }
19946 return c.header_
19947 }
19948
19949 func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteCall) doRequest(alt string) (*http.Response, error) {
19950 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19951 c.urlParams_.Set("alt", alt)
19952 c.urlParams_.Set("prettyPrint", "false")
19953 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/fhir/{+type}")
19954 urls += "?" + c.urlParams_.Encode()
19955 req, err := http.NewRequest("DELETE", urls, nil)
19956 if err != nil {
19957 return nil, err
19958 }
19959 req.Header = reqHeaders
19960 googleapi.Expand(req.URL, map[string]string{
19961 "parent": c.parent,
19962 "type": c.type_,
19963 })
19964 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.conditionalDelete", "request", internallog.HTTPRequest(req, nil))
19965 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19966 }
19967
19968 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.conditionalDelete" call.
19969 // Any non-2xx status code is an error. Response headers are in either
19970 // *Empty.ServerResponse.Header or (if a response was returned at all) in
19971 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
19972 // whether the returned error was because http.StatusNotModified was returned.
19973 func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
19974 gensupport.SetOptions(c.urlParams_, opts...)
19975 res, err := c.doRequest("json")
19976 if res != nil && res.StatusCode == http.StatusNotModified {
19977 if res.Body != nil {
19978 res.Body.Close()
19979 }
19980 return nil, gensupport.WrapError(&googleapi.Error{
19981 Code: res.StatusCode,
19982 Header: res.Header,
19983 })
19984 }
19985 if err != nil {
19986 return nil, err
19987 }
19988 defer googleapi.CloseBody(res)
19989 if err := googleapi.CheckResponse(res); err != nil {
19990 return nil, gensupport.WrapError(err)
19991 }
19992 ret := &Empty{
19993 ServerResponse: googleapi.ServerResponse{
19994 Header: res.Header,
19995 HTTPStatusCode: res.StatusCode,
19996 },
19997 }
19998 target := &ret
19999 b, err := gensupport.DecodeResponseBytes(target, res)
20000 if err != nil {
20001 return nil, err
20002 }
20003 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.conditionalDelete", "response", internallog.HTTPResponse(res, b))
20004 return ret, nil
20005 }
20006
20007 type ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchCall struct {
20008 s *Service
20009 parent string
20010 type_ string
20011 body_ io.Reader
20012 urlParams_ gensupport.URLParams
20013 ctx_ context.Context
20014 header_ http.Header
20015 }
20016
20017 // ConditionalPatch: If a resource is found with the identifier specified in
20018 // the query parameters, updates part of that resource by applying the
20019 // operations specified in a JSON Patch (http://jsonpatch.com/) document.
20020 // Implements the FHIR standard conditional patch interaction, limited to
20021 // searching by resource identifier. DSTU2 doesn't define a conditional patch
20022 // method, but the server supports it in the same way it supports STU3. Search
20023 // term for identifier should be in the pattern `identifier=system|value` or
20024 // `identifier=value` - similar to the `search` method on resources with a
20025 // specific identifier. If the search criteria identify more than one match,
20026 // the request returns a `412 Precondition Failed` error. If the search
20027 // criteria doesn't identify any matches, the request returns a `404 Not Found`
20028 // error. The request body must contain a JSON Patch document, and the request
20029 // headers must contain `Content-Type: application/json-patch+json`. On
20030 // success, the response body contains a JSON-encoded representation of the
20031 // updated resource, including the server-assigned version ID. Errors generated
20032 // by the FHIR store contain a JSON-encoded `OperationOutcome` resource
20033 // describing the reason for the error. If the request cannot be mapped to a
20034 // valid API method on a FHIR store, a generic GCP error might be returned
20035 // instead. For samples that show how to call `conditionalPatch`, see
20036 // Conditionally patching a FHIR resource
20037 // (https://cloud.google.com/healthcare/docs/how-tos/fhir-resources#conditionally_patching_a_fhir_resource).
20038 //
20039 // - parent: The name of the FHIR store this resource belongs to.
20040 // - type: The FHIR resource type to update, such as Patient or Observation.
20041 // For a complete list, see the FHIR Resource Index (DSTU2
20042 // (https://hl7.org/fhir/DSTU2/resourcelist.html), STU3
20043 // (https://hl7.org/fhir/STU3/resourcelist.html), R4
20044 // (https://hl7.org/fhir/R4/resourcelist.html), R5
20045 // (https://hl7.org/fhir/R5/resourcelist.html)).
20046 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) ConditionalPatch(parent string, type_ string, body_ io.Reader) *ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchCall {
20047 c := &ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20048 c.parent = parent
20049 c.type_ = type_
20050 c.body_ = body_
20051 return c
20052 }
20053
20054 // Fields allows partial responses to be retrieved. See
20055 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
20056 // details.
20057 func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchCall {
20058 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20059 return c
20060 }
20061
20062 // Context sets the context to be used in this call's Do method.
20063 func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchCall {
20064 c.ctx_ = ctx
20065 return c
20066 }
20067
20068 // Header returns a http.Header that can be modified by the caller to add
20069 // headers to the request.
20070 func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchCall) Header() http.Header {
20071 if c.header_ == nil {
20072 c.header_ = make(http.Header)
20073 }
20074 return c.header_
20075 }
20076
20077 func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchCall) doRequest(alt string) (*http.Response, error) {
20078 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
20079 body := bytes.NewBuffer(nil)
20080 _, err := body.ReadFrom(c.body_)
20081 if err != nil {
20082 return nil, err
20083 }
20084 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/fhir/{+type}")
20085 urls += "?" + c.urlParams_.Encode()
20086 req, err := http.NewRequest("PATCH", urls, body)
20087 if err != nil {
20088 return nil, err
20089 }
20090 req.Header = reqHeaders
20091 googleapi.Expand(req.URL, map[string]string{
20092 "parent": c.parent,
20093 "type": c.type_,
20094 })
20095 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.conditionalPatch", "request", internallog.HTTPRequest(req, body.Bytes()))
20096 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20097 }
20098
20099 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.conditionalPatch" call.
20100 func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
20101 gensupport.SetOptions(c.urlParams_, opts...)
20102 return c.doRequest("")
20103 }
20104
20105 type ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateCall struct {
20106 s *Service
20107 parent string
20108 type_ string
20109 body_ io.Reader
20110 urlParams_ gensupport.URLParams
20111 ctx_ context.Context
20112 header_ http.Header
20113 }
20114
20115 // ConditionalUpdate: If a resource is found with the identifier specified in
20116 // the query parameters, updates the entire contents of that resource.
20117 // Implements the FHIR standard conditional update interaction, limited to
20118 // searching by resource identifier. Search term for identifier should be in
20119 // the pattern `identifier=system|value` or `identifier=value` - similar to the
20120 // `search` method on resources with a specific identifier. If the search
20121 // criteria identify more than one match, the request returns a `412
20122 // Precondition Failed` error. If the search criteria identify zero matches,
20123 // and the supplied resource body contains an `id`, and the FHIR store has
20124 // enable_update_create set, creates the resource with the client-specified ID.
20125 // It is strongly advised not to include or encode any sensitive data such as
20126 // patient identifiers in client-specified resource IDs. Those IDs are part of
20127 // the FHIR resource path recorded in Cloud Audit Logs and Pub/Sub
20128 // notifications. Those IDs can also be contained in reference fields within
20129 // other resources. If the search criteria identify zero matches, and the
20130 // supplied resource body does not contain an `id`, the resource is created
20131 // with a server-assigned ID as per the create method. The request body must
20132 // contain a JSON-encoded FHIR resource, and the request headers must contain
20133 // `Content-Type: application/fhir+json`. On success, the response body
20134 // contains a JSON-encoded representation of the updated resource, including
20135 // the server-assigned version ID. Errors generated by the FHIR store contain a
20136 // JSON-encoded `OperationOutcome` resource describing the reason for the
20137 // error. If the request cannot be mapped to a valid API method on a FHIR
20138 // store, a generic GCP error might be returned instead. For samples that show
20139 // how to call `conditionalUpdate`, see Conditionally updating a FHIR resource
20140 // (https://cloud.google.com/healthcare/docs/how-tos/fhir-resources#conditionally_updating_a_fhir_resource).
20141 //
20142 // - parent: The name of the FHIR store this resource belongs to.
20143 // - type: The FHIR resource type to update, such as Patient or Observation.
20144 // For a complete list, see the FHIR Resource Index (DSTU2
20145 // (https://hl7.org/fhir/DSTU2/resourcelist.html), STU3
20146 // (https://hl7.org/fhir/STU3/resourcelist.html), R4
20147 // (https://hl7.org/fhir/R4/resourcelist.html), R5
20148 // (https://hl7.org/fhir/R5/resourcelist.html)). Must match the resource type
20149 // in the provided content.
20150 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) ConditionalUpdate(parent string, type_ string, body_ io.Reader) *ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateCall {
20151 c := &ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20152 c.parent = parent
20153 c.type_ = type_
20154 c.body_ = body_
20155 return c
20156 }
20157
20158 // Fields allows partial responses to be retrieved. See
20159 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
20160 // details.
20161 func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateCall {
20162 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20163 return c
20164 }
20165
20166 // Context sets the context to be used in this call's Do method.
20167 func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateCall {
20168 c.ctx_ = ctx
20169 return c
20170 }
20171
20172 // Header returns a http.Header that can be modified by the caller to add
20173 // headers to the request.
20174 func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateCall) Header() http.Header {
20175 if c.header_ == nil {
20176 c.header_ = make(http.Header)
20177 }
20178 return c.header_
20179 }
20180
20181 func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateCall) doRequest(alt string) (*http.Response, error) {
20182 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
20183 body := bytes.NewBuffer(nil)
20184 _, err := body.ReadFrom(c.body_)
20185 if err != nil {
20186 return nil, err
20187 }
20188 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/fhir/{+type}")
20189 urls += "?" + c.urlParams_.Encode()
20190 req, err := http.NewRequest("PUT", urls, body)
20191 if err != nil {
20192 return nil, err
20193 }
20194 req.Header = reqHeaders
20195 googleapi.Expand(req.URL, map[string]string{
20196 "parent": c.parent,
20197 "type": c.type_,
20198 })
20199 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.conditionalUpdate", "request", internallog.HTTPRequest(req, body.Bytes()))
20200 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20201 }
20202
20203 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.conditionalUpdate" call.
20204 func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
20205 gensupport.SetOptions(c.urlParams_, opts...)
20206 return c.doRequest("")
20207 }
20208
20209 type ProjectsLocationsDatasetsFhirStoresFhirCreateCall struct {
20210 s *Service
20211 parent string
20212 type_ string
20213 body_ io.Reader
20214 urlParams_ gensupport.URLParams
20215 ctx_ context.Context
20216 header_ http.Header
20217 }
20218
20219 // Create: Creates a FHIR resource. Implements the FHIR standard create
20220 // interaction (DSTU2 (https://hl7.org/fhir/DSTU2/http.html#create), STU3
20221 // (https://hl7.org/fhir/STU3/http.html#create), R4
20222 // (https://hl7.org/fhir/R4/http.html#create), R5
20223 // (https://hl7.org/fhir/R5/http.html#create)), which creates a new resource
20224 // with a server-assigned resource ID. Also supports the FHIR standard
20225 // conditional create interaction (DSTU2
20226 // (https://hl7.org/fhir/DSTU2/http.html#ccreate), STU3
20227 // (https://hl7.org/fhir/STU3/http.html#ccreate), R4
20228 // (https://hl7.org/fhir/R4/http.html#ccreate), R5
20229 // (https://hl7.org/fhir/R5/http.html#ccreate)), specified by supplying an
20230 // `If-None-Exist` header containing a FHIR search query, limited to searching
20231 // by resource identifier. If no resources match this search query, the server
20232 // processes the create operation as normal. When using conditional create, the
20233 // search term for identifier should be in the pattern
20234 // `identifier=system|value` or `identifier=value` - similar to the `search`
20235 // method on resources with a specific identifier. The request body must
20236 // contain a JSON-encoded FHIR resource, and the request headers must contain
20237 // `Content-Type: application/fhir+json`. On success, the response body
20238 // contains a JSON-encoded representation of the resource as it was created on
20239 // the server, including the server-assigned resource ID and version ID. Errors
20240 // generated by the FHIR store contain a JSON-encoded `OperationOutcome`
20241 // resource describing the reason for the error. If the request cannot be
20242 // mapped to a valid API method on a FHIR store, a generic GCP error might be
20243 // returned instead. For samples that show how to call `create`, see Creating a
20244 // FHIR resource
20245 // (https://cloud.google.com/healthcare/docs/how-tos/fhir-resources#creating_a_fhir_resource).
20246 //
20247 // - parent: The name of the FHIR store this resource belongs to.
20248 // - type: The FHIR resource type to create, such as Patient or Observation.
20249 // For a complete list, see the FHIR Resource Index (DSTU2
20250 // (https://hl7.org/fhir/DSTU2/resourcelist.html), STU3
20251 // (https://hl7.org/fhir/STU3/resourcelist.html), R4
20252 // (https://hl7.org/fhir/R4/resourcelist.html), R5
20253 // (https://hl7.org/fhir/R5/resourcelist.html)). Must match the resource type
20254 // in the provided content.
20255 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Create(parent string, type_ string, body_ io.Reader) *ProjectsLocationsDatasetsFhirStoresFhirCreateCall {
20256 c := &ProjectsLocationsDatasetsFhirStoresFhirCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20257 c.parent = parent
20258 c.type_ = type_
20259 c.body_ = body_
20260 return c
20261 }
20262
20263 // Fields allows partial responses to be retrieved. See
20264 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
20265 // details.
20266 func (c *ProjectsLocationsDatasetsFhirStoresFhirCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirCreateCall {
20267 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20268 return c
20269 }
20270
20271 // Context sets the context to be used in this call's Do method.
20272 func (c *ProjectsLocationsDatasetsFhirStoresFhirCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirCreateCall {
20273 c.ctx_ = ctx
20274 return c
20275 }
20276
20277 // Header returns a http.Header that can be modified by the caller to add
20278 // headers to the request.
20279 func (c *ProjectsLocationsDatasetsFhirStoresFhirCreateCall) Header() http.Header {
20280 if c.header_ == nil {
20281 c.header_ = make(http.Header)
20282 }
20283 return c.header_
20284 }
20285
20286 func (c *ProjectsLocationsDatasetsFhirStoresFhirCreateCall) doRequest(alt string) (*http.Response, error) {
20287 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
20288 body := bytes.NewBuffer(nil)
20289 _, err := body.ReadFrom(c.body_)
20290 if err != nil {
20291 return nil, err
20292 }
20293 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/fhir/{+type}")
20294 urls += "?" + c.urlParams_.Encode()
20295 req, err := http.NewRequest("POST", urls, body)
20296 if err != nil {
20297 return nil, err
20298 }
20299 req.Header = reqHeaders
20300 googleapi.Expand(req.URL, map[string]string{
20301 "parent": c.parent,
20302 "type": c.type_,
20303 })
20304 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.create", "request", internallog.HTTPRequest(req, body.Bytes()))
20305 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20306 }
20307
20308 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.create" call.
20309 func (c *ProjectsLocationsDatasetsFhirStoresFhirCreateCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
20310 gensupport.SetOptions(c.urlParams_, opts...)
20311 return c.doRequest("")
20312 }
20313
20314 type ProjectsLocationsDatasetsFhirStoresFhirDeleteCall struct {
20315 s *Service
20316 name string
20317 urlParams_ gensupport.URLParams
20318 ctx_ context.Context
20319 header_ http.Header
20320 }
20321
20322 // Delete: Deletes a FHIR resource. Implements the FHIR standard delete
20323 // interaction (DSTU2 (https://hl7.org/fhir/DSTU2/http.html#delete), STU3
20324 // (https://hl7.org/fhir/STU3/http.html#delete), R4
20325 // (https://hl7.org/fhir/R4/http.html#delete), R5
20326 // (https://hl7.org/fhir/R5/http.html#delete)). Note: Unless resource
20327 // versioning is disabled by setting the disable_resource_versioning flag on
20328 // the FHIR store, the deleted resources will be moved to a history repository
20329 // that can still be retrieved through vread and related methods, unless they
20330 // are removed by the purge method. For samples that show how to call `delete`,
20331 // see Deleting a FHIR resource
20332 // (https://cloud.google.com/healthcare/docs/how-tos/fhir-resources#deleting_a_fhir_resource).
20333 //
20334 // - name: The name of the resource to delete.
20335 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Delete(name string) *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall {
20336 c := &ProjectsLocationsDatasetsFhirStoresFhirDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20337 c.name = name
20338 return c
20339 }
20340
20341 // Fields allows partial responses to be retrieved. See
20342 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
20343 // details.
20344 func (c *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall {
20345 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20346 return c
20347 }
20348
20349 // Context sets the context to be used in this call's Do method.
20350 func (c *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall {
20351 c.ctx_ = ctx
20352 return c
20353 }
20354
20355 // Header returns a http.Header that can be modified by the caller to add
20356 // headers to the request.
20357 func (c *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall) Header() http.Header {
20358 if c.header_ == nil {
20359 c.header_ = make(http.Header)
20360 }
20361 return c.header_
20362 }
20363
20364 func (c *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall) doRequest(alt string) (*http.Response, error) {
20365 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
20366 c.urlParams_.Set("alt", alt)
20367 c.urlParams_.Set("prettyPrint", "false")
20368 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
20369 urls += "?" + c.urlParams_.Encode()
20370 req, err := http.NewRequest("DELETE", urls, nil)
20371 if err != nil {
20372 return nil, err
20373 }
20374 req.Header = reqHeaders
20375 googleapi.Expand(req.URL, map[string]string{
20376 "name": c.name,
20377 })
20378 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.delete", "request", internallog.HTTPRequest(req, nil))
20379 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20380 }
20381
20382 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.delete" call.
20383 func (c *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
20384 gensupport.SetOptions(c.urlParams_, opts...)
20385 return c.doRequest("")
20386 }
20387
20388 type ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall struct {
20389 s *Service
20390 parent string
20391 body_ io.Reader
20392 urlParams_ gensupport.URLParams
20393 ctx_ context.Context
20394 header_ http.Header
20395 }
20396
20397 // ExecuteBundle: Executes all the requests in the given Bundle. Implements the
20398 // FHIR standard batch/transaction interaction (DSTU2
20399 // (https://hl7.org/fhir/DSTU2/http.html#transaction), STU3
20400 // (https://hl7.org/fhir/STU3/http.html#transaction), R4
20401 // (https://hl7.org/fhir/R4/http.html#transaction), R5
20402 // (https://hl7.org/fhir/R5/http.html#transaction)). Supports all interactions
20403 // within a bundle, except search. This method accepts Bundles of type `batch`
20404 // and `transaction`, processing them according to the batch processing rules
20405 // (DSTU2 (https://hl7.org/fhir/DSTU2/http.html#2.1.0.16.1), STU3
20406 // (https://hl7.org/fhir/STU3/http.html#2.21.0.17.1), R4
20407 // (https://hl7.org/fhir/R4/http.html#brules), R5
20408 // (https://hl7.org/fhir/R5/http.html#brules)) and transaction processing rules
20409 // (DSTU2 (https://hl7.org/fhir/DSTU2/http.html#2.1.0.16.2), STU3
20410 // (https://hl7.org/fhir/STU3/http.html#2.21.0.17.2), R4
20411 // (https://hl7.org/fhir/R4/http.html#trules), R5
20412 // (https://hl7.org/fhir/R5/http.html#trules)). The request body must contain a
20413 // JSON-encoded FHIR `Bundle` resource, and the request headers must contain
20414 // `Content-Type: application/fhir+json`. For a batch bundle or a successful
20415 // transaction, the response body contains a JSON-encoded representation of a
20416 // `Bundle` resource of type `batch-response` or `transaction-response`
20417 // containing one entry for each entry in the request, with the outcome of
20418 // processing the entry. In the case of an error for a transaction bundle, the
20419 // response body contains a JSON-encoded `OperationOutcome` resource describing
20420 // the reason for the error. If the request cannot be mapped to a valid API
20421 // method on a FHIR store, a generic GCP error might be returned instead. This
20422 // method checks permissions for each request in the bundle. The
20423 // `executeBundle` permission is required to call this method, but you must
20424 // also grant sufficient permissions to execute the individual requests in the
20425 // bundle. For example, if the bundle contains a request to create a FHIR
20426 // resource, the caller must also have been granted the
20427 // `healthcare.fhirResources.create` permission. You can use audit logs to view
20428 // the permissions for `executeBundle` and each request in the bundle. For more
20429 // information, see Viewing Cloud Audit logs
20430 // (https://cloud.google.com/healthcare-api/docs/how-tos/audit-logging). For
20431 // samples that show how to call `executeBundle`, see Managing FHIR resources
20432 // using FHIR bundles
20433 // (https://cloud.google.com/healthcare/docs/how-tos/fhir-bundles).
20434 //
20435 // - parent: Name of the FHIR store in which this bundle will be executed.
20436 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) ExecuteBundle(parent string, body_ io.Reader) *ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall {
20437 c := &ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20438 c.parent = parent
20439 c.body_ = body_
20440 return c
20441 }
20442
20443 // Fields allows partial responses to be retrieved. See
20444 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
20445 // details.
20446 func (c *ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall {
20447 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20448 return c
20449 }
20450
20451 // Context sets the context to be used in this call's Do method.
20452 func (c *ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall {
20453 c.ctx_ = ctx
20454 return c
20455 }
20456
20457 // Header returns a http.Header that can be modified by the caller to add
20458 // headers to the request.
20459 func (c *ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall) Header() http.Header {
20460 if c.header_ == nil {
20461 c.header_ = make(http.Header)
20462 }
20463 return c.header_
20464 }
20465
20466 func (c *ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall) doRequest(alt string) (*http.Response, error) {
20467 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
20468 body := bytes.NewBuffer(nil)
20469 _, err := body.ReadFrom(c.body_)
20470 if err != nil {
20471 return nil, err
20472 }
20473 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/fhir")
20474 urls += "?" + c.urlParams_.Encode()
20475 req, err := http.NewRequest("POST", urls, body)
20476 if err != nil {
20477 return nil, err
20478 }
20479 req.Header = reqHeaders
20480 googleapi.Expand(req.URL, map[string]string{
20481 "parent": c.parent,
20482 })
20483 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.executeBundle", "request", internallog.HTTPRequest(req, body.Bytes()))
20484 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20485 }
20486
20487 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.executeBundle" call.
20488 func (c *ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
20489 gensupport.SetOptions(c.urlParams_, opts...)
20490 return c.doRequest("")
20491 }
20492
20493 type ProjectsLocationsDatasetsFhirStoresFhirHistoryCall struct {
20494 s *Service
20495 name string
20496 urlParams_ gensupport.URLParams
20497 ifNoneMatch_ string
20498 ctx_ context.Context
20499 header_ http.Header
20500 }
20501
20502 // History: Lists all the versions of a resource (including the current version
20503 // and deleted versions) from the FHIR store. Implements the per-resource form
20504 // of the FHIR standard history interaction (DSTU2
20505 // (https://hl7.org/fhir/DSTU2/http.html#history), STU3
20506 // (https://hl7.org/fhir/STU3/http.html#history), R4
20507 // (https://hl7.org/fhir/R4/http.html#history), R5
20508 // (https://hl7.org/fhir/R5/http.html#history)). On success, the response body
20509 // contains a JSON-encoded representation of a `Bundle` resource of type
20510 // `history`, containing the version history sorted from most recent to oldest
20511 // versions. Errors generated by the FHIR store contain a JSON-encoded
20512 // `OperationOutcome` resource describing the reason for the error. If the
20513 // request cannot be mapped to a valid API method on a FHIR store, a generic
20514 // GCP error might be returned instead. For samples that show how to call
20515 // `history`, see Listing FHIR resource versions
20516 // (https://cloud.google.com/healthcare/docs/how-tos/fhir-resources#listing_fhir_resource_versions).
20517 //
20518 // - name: The name of the resource to retrieve.
20519 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) History(name string) *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall {
20520 c := &ProjectsLocationsDatasetsFhirStoresFhirHistoryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20521 c.name = name
20522 return c
20523 }
20524
20525 // At sets the optional parameter "_at": Only include resource versions that
20526 // were current at some point during the time period specified in the date time
20527 // value. The date parameter format is yyyy-mm-ddThh:mm:ss[Z|(+|-)hh:mm]
20528 // Clients may specify any of the following: * An entire year: `_at=2019` * An
20529 // entire month: `_at=2019-01` * A specific day: `_at=2019-01-20` * A specific
20530 // second: `_at=2018-12-31T23:59:58Z`
20531 func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) At(At string) *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall {
20532 c.urlParams_.Set("_at", At)
20533 return c
20534 }
20535
20536 // Count sets the optional parameter "_count": The maximum number of search
20537 // results on a page. If not specified, 100 is used. May not be larger than
20538 // 1000.
20539 func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) Count(Count int64) *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall {
20540 c.urlParams_.Set("_count", fmt.Sprint(Count))
20541 return c
20542 }
20543
20544 // PageToken sets the optional parameter "_page_token": Used to retrieve the
20545 // first, previous, next, or last page of resource versions when using
20546 // pagination. Value should be set to the value of `_page_token` set in next or
20547 // previous page links' URLs. Next and previous page are returned in the
20548 // response bundle's links field, where `link.relation` is "previous" or
20549 // "next". Omit `_page_token` if no previous request has been made.
20550 func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) PageToken(PageToken string) *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall {
20551 c.urlParams_.Set("_page_token", PageToken)
20552 return c
20553 }
20554
20555 // Since sets the optional parameter "_since": Only include resource versions
20556 // that were created at or after the given instant in time. The instant in time
20557 // uses the format YYYY-MM-DDThh:mm:ss.sss+zz:zz (for example
20558 // 2015-02-07T13:28:17.239+02:00 or 2017-01-01T00:00:00Z). The time must be
20559 // specified to the second and include a time zone.
20560 func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) Since(Since string) *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall {
20561 c.urlParams_.Set("_since", Since)
20562 return c
20563 }
20564
20565 // Fields allows partial responses to be retrieved. See
20566 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
20567 // details.
20568 func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall {
20569 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20570 return c
20571 }
20572
20573 // IfNoneMatch sets an optional parameter which makes the operation fail if the
20574 // object's ETag matches the given value. This is useful for getting updates
20575 // only after the object has changed since the last request.
20576 func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall {
20577 c.ifNoneMatch_ = entityTag
20578 return c
20579 }
20580
20581 // Context sets the context to be used in this call's Do method.
20582 func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall {
20583 c.ctx_ = ctx
20584 return c
20585 }
20586
20587 // Header returns a http.Header that can be modified by the caller to add
20588 // headers to the request.
20589 func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) Header() http.Header {
20590 if c.header_ == nil {
20591 c.header_ = make(http.Header)
20592 }
20593 return c.header_
20594 }
20595
20596 func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) doRequest(alt string) (*http.Response, error) {
20597 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
20598 if c.ifNoneMatch_ != "" {
20599 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20600 }
20601 c.urlParams_.Set("alt", alt)
20602 c.urlParams_.Set("prettyPrint", "false")
20603 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/_history")
20604 urls += "?" + c.urlParams_.Encode()
20605 req, err := http.NewRequest("GET", urls, nil)
20606 if err != nil {
20607 return nil, err
20608 }
20609 req.Header = reqHeaders
20610 googleapi.Expand(req.URL, map[string]string{
20611 "name": c.name,
20612 })
20613 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.history", "request", internallog.HTTPRequest(req, nil))
20614 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20615 }
20616
20617 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.history" call.
20618 func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
20619 gensupport.SetOptions(c.urlParams_, opts...)
20620 return c.doRequest("")
20621 }
20622
20623 type ProjectsLocationsDatasetsFhirStoresFhirPatchCall struct {
20624 s *Service
20625 name string
20626 body_ io.Reader
20627 urlParams_ gensupport.URLParams
20628 ctx_ context.Context
20629 header_ http.Header
20630 }
20631
20632 // Patch: Updates part of an existing resource by applying the operations
20633 // specified in a JSON Patch (http://jsonpatch.com/) document. Implements the
20634 // FHIR standard patch interaction (STU3
20635 // (https://hl7.org/fhir/STU3/http.html#patch), R4
20636 // (https://hl7.org/fhir/R4/http.html#patch), R5
20637 // (https://hl7.org/fhir/R5/http.html#patch)). DSTU2 doesn't define a patch
20638 // method, but the server supports it in the same way it supports STU3. The
20639 // request body must contain a JSON Patch document, and the request headers
20640 // must contain `Content-Type: application/json-patch+json`. On success, the
20641 // response body contains a JSON-encoded representation of the updated
20642 // resource, including the server-assigned version ID. Errors generated by the
20643 // FHIR store contain a JSON-encoded `OperationOutcome` resource describing the
20644 // reason for the error. If the request cannot be mapped to a valid API method
20645 // on a FHIR store, a generic GCP error might be returned instead. For samples
20646 // that show how to call `patch`, see Patching a FHIR resource
20647 // (https://cloud.google.com/healthcare/docs/how-tos/fhir-resources#patching_a_fhir_resource).
20648 //
20649 // - name: The name of the resource to update.
20650 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Patch(name string, body_ io.Reader) *ProjectsLocationsDatasetsFhirStoresFhirPatchCall {
20651 c := &ProjectsLocationsDatasetsFhirStoresFhirPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20652 c.name = name
20653 c.body_ = body_
20654 return c
20655 }
20656
20657 // Fields allows partial responses to be retrieved. See
20658 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
20659 // details.
20660 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirPatchCall {
20661 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20662 return c
20663 }
20664
20665 // Context sets the context to be used in this call's Do method.
20666 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirPatchCall {
20667 c.ctx_ = ctx
20668 return c
20669 }
20670
20671 // Header returns a http.Header that can be modified by the caller to add
20672 // headers to the request.
20673 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatchCall) Header() http.Header {
20674 if c.header_ == nil {
20675 c.header_ = make(http.Header)
20676 }
20677 return c.header_
20678 }
20679
20680 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatchCall) doRequest(alt string) (*http.Response, error) {
20681 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
20682 body := bytes.NewBuffer(nil)
20683 _, err := body.ReadFrom(c.body_)
20684 if err != nil {
20685 return nil, err
20686 }
20687 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
20688 urls += "?" + c.urlParams_.Encode()
20689 req, err := http.NewRequest("PATCH", urls, body)
20690 if err != nil {
20691 return nil, err
20692 }
20693 req.Header = reqHeaders
20694 googleapi.Expand(req.URL, map[string]string{
20695 "name": c.name,
20696 })
20697 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
20698 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20699 }
20700
20701 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.patch" call.
20702 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatchCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
20703 gensupport.SetOptions(c.urlParams_, opts...)
20704 return c.doRequest("")
20705 }
20706
20707 type ProjectsLocationsDatasetsFhirStoresFhirReadCall struct {
20708 s *Service
20709 name string
20710 urlParams_ gensupport.URLParams
20711 ifNoneMatch_ string
20712 ctx_ context.Context
20713 header_ http.Header
20714 }
20715
20716 // Read: Gets the contents of a FHIR resource. Implements the FHIR standard
20717 // read interaction (DSTU2 (https://hl7.org/fhir/DSTU2/http.html#read), STU3
20718 // (https://hl7.org/fhir/STU3/http.html#read), R4
20719 // (https://hl7.org/fhir/R4/http.html#read), R5
20720 // (https://hl7.org/fhir/R5/http.html#read)). Also supports the FHIR standard
20721 // conditional read interaction (DSTU2
20722 // (https://hl7.org/fhir/DSTU2/http.html#cread), STU3
20723 // (https://hl7.org/fhir/STU3/http.html#cread), R4
20724 // (https://hl7.org/fhir/R4/http.html#cread), R5
20725 // (https://hl7.org/fhir/R5/http.html#cread)) specified by supplying an
20726 // `If-Modified-Since` header with a date/time value or an `If-None-Match`
20727 // header with an ETag value. On success, the response body contains a
20728 // JSON-encoded representation of the resource. Errors generated by the FHIR
20729 // store contain a JSON-encoded `OperationOutcome` resource describing the
20730 // reason for the error. If the request cannot be mapped to a valid API method
20731 // on a FHIR store, a generic GCP error might be returned instead. For samples
20732 // that show how to call `read`, see Getting a FHIR resource
20733 // (https://cloud.google.com/healthcare/docs/how-tos/fhir-resources#getting_a_fhir_resource).
20734 //
20735 // - name: The name of the resource to retrieve.
20736 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Read(name string) *ProjectsLocationsDatasetsFhirStoresFhirReadCall {
20737 c := &ProjectsLocationsDatasetsFhirStoresFhirReadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20738 c.name = name
20739 return c
20740 }
20741
20742 // Fields allows partial responses to be retrieved. See
20743 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
20744 // details.
20745 func (c *ProjectsLocationsDatasetsFhirStoresFhirReadCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirReadCall {
20746 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20747 return c
20748 }
20749
20750 // IfNoneMatch sets an optional parameter which makes the operation fail if the
20751 // object's ETag matches the given value. This is useful for getting updates
20752 // only after the object has changed since the last request.
20753 func (c *ProjectsLocationsDatasetsFhirStoresFhirReadCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirReadCall {
20754 c.ifNoneMatch_ = entityTag
20755 return c
20756 }
20757
20758 // Context sets the context to be used in this call's Do method.
20759 func (c *ProjectsLocationsDatasetsFhirStoresFhirReadCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirReadCall {
20760 c.ctx_ = ctx
20761 return c
20762 }
20763
20764 // Header returns a http.Header that can be modified by the caller to add
20765 // headers to the request.
20766 func (c *ProjectsLocationsDatasetsFhirStoresFhirReadCall) Header() http.Header {
20767 if c.header_ == nil {
20768 c.header_ = make(http.Header)
20769 }
20770 return c.header_
20771 }
20772
20773 func (c *ProjectsLocationsDatasetsFhirStoresFhirReadCall) doRequest(alt string) (*http.Response, error) {
20774 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
20775 if c.ifNoneMatch_ != "" {
20776 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20777 }
20778 c.urlParams_.Set("alt", alt)
20779 c.urlParams_.Set("prettyPrint", "false")
20780 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
20781 urls += "?" + c.urlParams_.Encode()
20782 req, err := http.NewRequest("GET", urls, nil)
20783 if err != nil {
20784 return nil, err
20785 }
20786 req.Header = reqHeaders
20787 googleapi.Expand(req.URL, map[string]string{
20788 "name": c.name,
20789 })
20790 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.read", "request", internallog.HTTPRequest(req, nil))
20791 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20792 }
20793
20794 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.read" call.
20795 func (c *ProjectsLocationsDatasetsFhirStoresFhirReadCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
20796 gensupport.SetOptions(c.urlParams_, opts...)
20797 return c.doRequest("")
20798 }
20799
20800 type ProjectsLocationsDatasetsFhirStoresFhirSearchCall struct {
20801 s *Service
20802 parent string
20803 body_ io.Reader
20804 urlParams_ gensupport.URLParams
20805 ctx_ context.Context
20806 header_ http.Header
20807 }
20808
20809 // Search: Searches for resources in the given FHIR store according to criteria
20810 // specified as query parameters. Implements the FHIR standard search
20811 // interaction (DSTU2 (https://hl7.org/fhir/DSTU2/http.html#search), STU3
20812 // (https://hl7.org/fhir/STU3/http.html#search), R4
20813 // (https://hl7.org/fhir/R4/http.html#search), R5
20814 // (https://hl7.org/fhir/R5/http.html#search)) using the search semantics
20815 // described in the FHIR Search specification (DSTU2
20816 // (https://hl7.org/fhir/DSTU2/search.html), STU3
20817 // (https://hl7.org/fhir/STU3/search.html), R4
20818 // (https://hl7.org/fhir/R4/search.html), R5
20819 // (https://hl7.org/fhir/R5/search.html)). Supports four methods of search
20820 // defined by the specification: * `GET [base]?[parameters]` to search across
20821 // all resources. * `GET [base]/[type]?[parameters]` to search resources of a
20822 // specified type. * `POST [base]/_search?[parameters]` as an alternate form
20823 // having the same semantics as the `GET` method across all resources. * `POST
20824 // [base]/[type]/_search?[parameters]` as an alternate form having the same
20825 // semantics as the `GET` method for the specified type. The `GET` and `POST`
20826 // methods do not support compartment searches. The `POST` method does not
20827 // support `application/x-www-form-urlencoded` search parameters. On success,
20828 // the response body contains a JSON-encoded representation of a `Bundle`
20829 // resource of type `searchset`, containing the results of the search. Errors
20830 // generated by the FHIR store contain a JSON-encoded `OperationOutcome`
20831 // resource describing the reason for the error. If the request cannot be
20832 // mapped to a valid API method on a FHIR store, a generic GCP error might be
20833 // returned instead. The server's capability statement, retrieved through
20834 // capabilities, indicates what search parameters are supported on each FHIR
20835 // resource. A list of all search parameters defined by the specification can
20836 // be found in the FHIR Search Parameter Registry (STU3
20837 // (https://hl7.org/fhir/STU3/searchparameter-registry.html), R4
20838 // (https://hl7.org/fhir/R4/searchparameter-registry.html), R5
20839 // (https://hl7.org/fhir/R5/searchparameter-registry.html)). FHIR search
20840 // parameters for DSTU2 can be found on each resource's definition page.
20841 // Supported search modifiers: `:missing`, `:exact`, `:contains`, `:text`,
20842 // `:in`, `:not-in`, `:above`, `:below`, `:[type]`, `:not`, and `recurse`
20843 // (DSTU2 and STU3) or `:iterate` (R4 and R5). Supported search result
20844 // parameters: `_sort`, `_count`, `_include`, `_revinclude`, `_summary=text`,
20845 // `_summary=data`, and `_elements`. The maximum number of search results
20846 // returned defaults to 100, which can be overridden by the `_count` parameter
20847 // up to a maximum limit of 1000. The server might return fewer resources than
20848 // requested to prevent excessively large responses. If there are additional
20849 // results, the returned `Bundle` contains a link of `relation` "next", which
20850 // has a `_page_token` parameter for an opaque pagination token that can be
20851 // used to retrieve the next page. Resources with a total size larger than 5MB
20852 // or a field count larger than 50,000 might not be fully searchable as the
20853 // server might trim its generated search index in those cases. Note: FHIR
20854 // resources are indexed asynchronously, so there might be a slight delay
20855 // between the time a resource is created or changed, and the time when the
20856 // change reflects in search results. The only exception is resource identifier
20857 // data, which is indexed synchronously as a special index. As a result,
20858 // searching using resource identifier is not subject to indexing delay. To use
20859 // the special synchronous index, the search term for identifier should be in
20860 // the pattern `identifier=[system]|[value]` or `identifier=[value]`, and any
20861 // of the following search result parameters can be used: * `_count` *
20862 // `_include` * `_revinclude` * `_summary` * `_elements` If your query contains
20863 // any other search parameters, the standard asynchronous index will be used
20864 // instead. Note that searching against the special index is optimized for
20865 // resolving a small number of matches. The search isn't optimized if your
20866 // identifier search criteria matches a large number (i.e. more than 2,000) of
20867 // resources. For a search query that will match a large number of resources,
20868 // you can avoiding using the special synchronous index by including an
20869 // additional `_sort` parameter in your query. Use `_sort=-_lastUpdated` if you
20870 // want to keep the default sorting order. For samples and detailed
20871 // information, see Searching for FHIR resources
20872 // (https://cloud.google.com/healthcare/docs/how-tos/fhir-search) and Advanced
20873 // FHIR search features
20874 // (https://cloud.google.com/healthcare/docs/how-tos/fhir-advanced-search).
20875 //
20876 // - parent: Name of the FHIR store to retrieve resources from.
20877 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Search(parent string, body_ io.Reader) *ProjectsLocationsDatasetsFhirStoresFhirSearchCall {
20878 c := &ProjectsLocationsDatasetsFhirStoresFhirSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20879 c.parent = parent
20880 c.body_ = body_
20881 return c
20882 }
20883
20884 // ResourceType sets the optional parameter "resourceType": The FHIR resource
20885 // type to search, such as Patient or Observation. For a complete list, see the
20886 // FHIR Resource Index (DSTU2 (https://hl7.org/fhir/DSTU2/resourcelist.html),
20887 // STU3 (https://hl7.org/fhir/STU3/resourcelist.html), R4
20888 // (https://hl7.org/fhir/R4/resourcelist.html)), R5
20889 // (https://hl7.org/fhir/R5/resourcelist.html)).
20890 func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchCall) ResourceType(resourceType string) *ProjectsLocationsDatasetsFhirStoresFhirSearchCall {
20891 c.urlParams_.Set("resourceType", resourceType)
20892 return c
20893 }
20894
20895 // Fields allows partial responses to be retrieved. See
20896 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
20897 // details.
20898 func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirSearchCall {
20899 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20900 return c
20901 }
20902
20903 // Context sets the context to be used in this call's Do method.
20904 func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirSearchCall {
20905 c.ctx_ = ctx
20906 return c
20907 }
20908
20909 // Header returns a http.Header that can be modified by the caller to add
20910 // headers to the request.
20911 func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchCall) Header() http.Header {
20912 if c.header_ == nil {
20913 c.header_ = make(http.Header)
20914 }
20915 return c.header_
20916 }
20917
20918 func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchCall) doRequest(alt string) (*http.Response, error) {
20919 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
20920 body := bytes.NewBuffer(nil)
20921 _, err := body.ReadFrom(c.body_)
20922 if err != nil {
20923 return nil, err
20924 }
20925 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/fhir/_search")
20926 urls += "?" + c.urlParams_.Encode()
20927 req, err := http.NewRequest("POST", urls, body)
20928 if err != nil {
20929 return nil, err
20930 }
20931 req.Header = reqHeaders
20932 googleapi.Expand(req.URL, map[string]string{
20933 "parent": c.parent,
20934 })
20935 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.search", "request", internallog.HTTPRequest(req, body.Bytes()))
20936 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20937 }
20938
20939 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.search" call.
20940 func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
20941 gensupport.SetOptions(c.urlParams_, opts...)
20942 return c.doRequest("")
20943 }
20944
20945 type ProjectsLocationsDatasetsFhirStoresFhirSearchTypeCall struct {
20946 s *Service
20947 parent string
20948 resourceType string
20949 body_ io.Reader
20950 urlParams_ gensupport.URLParams
20951 ctx_ context.Context
20952 header_ http.Header
20953 }
20954
20955 // SearchType: Searches for resources in the given FHIR store according to
20956 // criteria specified as query parameters. Implements the FHIR standard search
20957 // interaction (DSTU2 (https://hl7.org/fhir/DSTU2/http.html#search), STU3
20958 // (https://hl7.org/fhir/STU3/http.html#search), R4
20959 // (https://hl7.org/fhir/R4/http.html#search), R5
20960 // (https://hl7.org/fhir/R5/http.html#search)) using the search semantics
20961 // described in the FHIR Search specification (DSTU2
20962 // (https://hl7.org/fhir/DSTU2/search.html), STU3
20963 // (https://hl7.org/fhir/STU3/search.html), R4
20964 // (https://hl7.org/fhir/R4/search.html), R5
20965 // (https://hl7.org/fhir/R5/search.html)). Supports four methods of search
20966 // defined by the specification: * `GET [base]?[parameters]` to search across
20967 // all resources. * `GET [base]/[type]?[parameters]` to search resources of a
20968 // specified type. * `POST [base]/_search?[parameters]` as an alternate form
20969 // having the same semantics as the `GET` method across all resources. * `POST
20970 // [base]/[type]/_search?[parameters]` as an alternate form having the same
20971 // semantics as the `GET` method for the specified type. The `GET` and `POST`
20972 // methods do not support compartment searches. The `POST` method does not
20973 // support `application/x-www-form-urlencoded` search parameters. On success,
20974 // the response body contains a JSON-encoded representation of a `Bundle`
20975 // resource of type `searchset`, containing the results of the search. Errors
20976 // generated by the FHIR store contain a JSON-encoded `OperationOutcome`
20977 // resource describing the reason for the error. If the request cannot be
20978 // mapped to a valid API method on a FHIR store, a generic GCP error might be
20979 // returned instead. The server's capability statement, retrieved through
20980 // capabilities, indicates what search parameters are supported on each FHIR
20981 // resource. A list of all search parameters defined by the specification can
20982 // be found in the FHIR Search Parameter Registry (STU3
20983 // (https://hl7.org/fhir/STU3/searchparameter-registry.html), R4
20984 // (https://hl7.org/fhir/R4/searchparameter-registry.html), R5
20985 // (https://hl7.org/fhir/R5/searchparameter-registry.html)). FHIR search
20986 // parameters for DSTU2 can be found on each resource's definition page.
20987 // Supported search modifiers: `:missing`, `:exact`, `:contains`, `:text`,
20988 // `:in`, `:not-in`, `:above`, `:below`, `:[type]`, `:not`, and `recurse`
20989 // (DSTU2 and STU3) or `:iterate` (R4 and R5). Supported search result
20990 // parameters: `_sort`, `_count`, `_include`, `_revinclude`, `_summary=text`,
20991 // `_summary=data`, and `_elements`. The maximum number of search results
20992 // returned defaults to 100, which can be overridden by the `_count` parameter
20993 // up to a maximum limit of 1000. The server might return fewer resources than
20994 // requested to prevent excessively large responses. If there are additional
20995 // results, the returned `Bundle` contains a link of `relation` "next", which
20996 // has a `_page_token` parameter for an opaque pagination token that can be
20997 // used to retrieve the next page. Resources with a total size larger than 5MB
20998 // or a field count larger than 50,000 might not be fully searchable as the
20999 // server might trim its generated search index in those cases. Note: FHIR
21000 // resources are indexed asynchronously, so there might be a slight delay
21001 // between the time a resource is created or changed, and the time when the
21002 // change reflects in search results. The only exception is resource identifier
21003 // data, which is indexed synchronously as a special index. As a result,
21004 // searching using resource identifier is not subject to indexing delay. To use
21005 // the special synchronous index, the search term for identifier should be in
21006 // the pattern `identifier=[system]|[value]` or `identifier=[value]`, and any
21007 // of the following search result parameters can be used: * `_count` *
21008 // `_include` * `_revinclude` * `_summary` * `_elements` If your query contains
21009 // any other search parameters, the standard asynchronous index will be used
21010 // instead. Note that searching against the special index is optimized for
21011 // resolving a small number of matches. The search isn't optimized if your
21012 // identifier search criteria matches a large number (i.e. more than 2,000) of
21013 // resources. For a search query that will match a large number of resources,
21014 // you can avoiding using the special synchronous index by including an
21015 // additional `_sort` parameter in your query. Use `_sort=-_lastUpdated` if you
21016 // want to keep the default sorting order. For samples and detailed
21017 // information, see Searching for FHIR resources
21018 // (https://cloud.google.com/healthcare/docs/how-tos/fhir-search) and Advanced
21019 // FHIR search features
21020 // (https://cloud.google.com/healthcare/docs/how-tos/fhir-advanced-search).
21021 //
21022 // - parent: Name of the FHIR store to retrieve resources from.
21023 // - resourceType: Optional. The FHIR resource type to search, such as Patient
21024 // or Observation. For a complete list, see the FHIR Resource Index (DSTU2
21025 // (https://hl7.org/fhir/DSTU2/resourcelist.html), STU3
21026 // (https://hl7.org/fhir/STU3/resourcelist.html), R4
21027 // (https://hl7.org/fhir/R4/resourcelist.html)), R5
21028 // (https://hl7.org/fhir/R5/resourcelist.html)).
21029 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) SearchType(parent string, resourceType string, body_ io.Reader) *ProjectsLocationsDatasetsFhirStoresFhirSearchTypeCall {
21030 c := &ProjectsLocationsDatasetsFhirStoresFhirSearchTypeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21031 c.parent = parent
21032 c.resourceType = resourceType
21033 c.body_ = body_
21034 return c
21035 }
21036
21037 // Fields allows partial responses to be retrieved. See
21038 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
21039 // details.
21040 func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchTypeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirSearchTypeCall {
21041 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21042 return c
21043 }
21044
21045 // Context sets the context to be used in this call's Do method.
21046 func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchTypeCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirSearchTypeCall {
21047 c.ctx_ = ctx
21048 return c
21049 }
21050
21051 // Header returns a http.Header that can be modified by the caller to add
21052 // headers to the request.
21053 func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchTypeCall) Header() http.Header {
21054 if c.header_ == nil {
21055 c.header_ = make(http.Header)
21056 }
21057 return c.header_
21058 }
21059
21060 func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchTypeCall) doRequest(alt string) (*http.Response, error) {
21061 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
21062 body := bytes.NewBuffer(nil)
21063 _, err := body.ReadFrom(c.body_)
21064 if err != nil {
21065 return nil, err
21066 }
21067 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/fhir/{resourceType}/_search")
21068 urls += "?" + c.urlParams_.Encode()
21069 req, err := http.NewRequest("POST", urls, body)
21070 if err != nil {
21071 return nil, err
21072 }
21073 req.Header = reqHeaders
21074 googleapi.Expand(req.URL, map[string]string{
21075 "parent": c.parent,
21076 "resourceType": c.resourceType,
21077 })
21078 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.search-type", "request", internallog.HTTPRequest(req, body.Bytes()))
21079 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21080 }
21081
21082 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.search-type" call.
21083 func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchTypeCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
21084 gensupport.SetOptions(c.urlParams_, opts...)
21085 return c.doRequest("")
21086 }
21087
21088 type ProjectsLocationsDatasetsFhirStoresFhirUpdateCall struct {
21089 s *Service
21090 name string
21091 body_ io.Reader
21092 urlParams_ gensupport.URLParams
21093 ctx_ context.Context
21094 header_ http.Header
21095 }
21096
21097 // Update: Updates the entire contents of a resource. Implements the FHIR
21098 // standard update interaction (DSTU2
21099 // (https://hl7.org/fhir/DSTU2/http.html#update), STU3
21100 // (https://hl7.org/fhir/STU3/http.html#update), R4
21101 // (https://hl7.org/fhir/R4/http.html#update), R5
21102 // (https://hl7.org/fhir/R5/http.html#update)). If the specified resource does
21103 // not exist and the FHIR store has enable_update_create set, creates the
21104 // resource with the client-specified ID. It is strongly advised not to include
21105 // or encode any sensitive data such as patient identifiers in client-specified
21106 // resource IDs. Those IDs are part of the FHIR resource path recorded in Cloud
21107 // Audit Logs and Pub/Sub notifications. Those IDs can also be contained in
21108 // reference fields within other resources. The request body must contain a
21109 // JSON-encoded FHIR resource, and the request headers must contain
21110 // `Content-Type: application/fhir+json`. The resource must contain an `id`
21111 // element having an identical value to the ID in the REST path of the request.
21112 // On success, the response body contains a JSON-encoded representation of the
21113 // updated resource, including the server-assigned version ID. Errors generated
21114 // by the FHIR store contain a JSON-encoded `OperationOutcome` resource
21115 // describing the reason for the error. If the request cannot be mapped to a
21116 // valid API method on a FHIR store, a generic GCP error might be returned
21117 // instead. The conditional update interaction If-None-Match is supported,
21118 // including the wildcard behaviour, as defined by the R5 spec. This
21119 // functionality is supported in R4 and R5. For samples that show how to call
21120 // `update`, see Updating a FHIR resource
21121 // (https://cloud.google.com/healthcare/docs/how-tos/fhir-resources#updating_a_fhir_resource).
21122 //
21123 // - name: The name of the resource to update.
21124 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Update(name string, body_ io.Reader) *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall {
21125 c := &ProjectsLocationsDatasetsFhirStoresFhirUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21126 c.name = name
21127 c.body_ = body_
21128 return c
21129 }
21130
21131 // Fields allows partial responses to be retrieved. See
21132 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
21133 // details.
21134 func (c *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall {
21135 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21136 return c
21137 }
21138
21139 // Context sets the context to be used in this call's Do method.
21140 func (c *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall {
21141 c.ctx_ = ctx
21142 return c
21143 }
21144
21145 // Header returns a http.Header that can be modified by the caller to add
21146 // headers to the request.
21147 func (c *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall) Header() http.Header {
21148 if c.header_ == nil {
21149 c.header_ = make(http.Header)
21150 }
21151 return c.header_
21152 }
21153
21154 func (c *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall) doRequest(alt string) (*http.Response, error) {
21155 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
21156 body := bytes.NewBuffer(nil)
21157 _, err := body.ReadFrom(c.body_)
21158 if err != nil {
21159 return nil, err
21160 }
21161 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
21162 urls += "?" + c.urlParams_.Encode()
21163 req, err := http.NewRequest("PUT", urls, body)
21164 if err != nil {
21165 return nil, err
21166 }
21167 req.Header = reqHeaders
21168 googleapi.Expand(req.URL, map[string]string{
21169 "name": c.name,
21170 })
21171 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.update", "request", internallog.HTTPRequest(req, body.Bytes()))
21172 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21173 }
21174
21175 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.update" call.
21176 func (c *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
21177 gensupport.SetOptions(c.urlParams_, opts...)
21178 return c.doRequest("")
21179 }
21180
21181 type ProjectsLocationsDatasetsFhirStoresFhirVreadCall struct {
21182 s *Service
21183 name string
21184 urlParams_ gensupport.URLParams
21185 ifNoneMatch_ string
21186 ctx_ context.Context
21187 header_ http.Header
21188 }
21189
21190 // Vread: Gets the contents of a version (current or historical) of a FHIR
21191 // resource by version ID. Implements the FHIR standard vread interaction
21192 // (DSTU2 (https://hl7.org/fhir/DSTU2/http.html#vread), STU3
21193 // (https://hl7.org/fhir/STU3/http.html#vread), R4
21194 // (https://hl7.org/fhir/R4/http.html#vread), R5
21195 // (https://hl7.org/fhir/R5/http.html#vread)). On success, the response body
21196 // contains a JSON-encoded representation of the resource. Errors generated by
21197 // the FHIR store contain a JSON-encoded `OperationOutcome` resource describing
21198 // the reason for the error. If the request cannot be mapped to a valid API
21199 // method on a FHIR store, a generic GCP error might be returned instead. For
21200 // samples that show how to call `vread`, see Retrieving a FHIR resource
21201 // version
21202 // (https://cloud.google.com/healthcare/docs/how-tos/fhir-resources#retrieving_a_fhir_resource_version).
21203 //
21204 // - name: The name of the resource version to retrieve.
21205 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Vread(name string) *ProjectsLocationsDatasetsFhirStoresFhirVreadCall {
21206 c := &ProjectsLocationsDatasetsFhirStoresFhirVreadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21207 c.name = name
21208 return c
21209 }
21210
21211 // Fields allows partial responses to be retrieved. See
21212 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
21213 // details.
21214 func (c *ProjectsLocationsDatasetsFhirStoresFhirVreadCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirVreadCall {
21215 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21216 return c
21217 }
21218
21219 // IfNoneMatch sets an optional parameter which makes the operation fail if the
21220 // object's ETag matches the given value. This is useful for getting updates
21221 // only after the object has changed since the last request.
21222 func (c *ProjectsLocationsDatasetsFhirStoresFhirVreadCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirVreadCall {
21223 c.ifNoneMatch_ = entityTag
21224 return c
21225 }
21226
21227 // Context sets the context to be used in this call's Do method.
21228 func (c *ProjectsLocationsDatasetsFhirStoresFhirVreadCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirVreadCall {
21229 c.ctx_ = ctx
21230 return c
21231 }
21232
21233 // Header returns a http.Header that can be modified by the caller to add
21234 // headers to the request.
21235 func (c *ProjectsLocationsDatasetsFhirStoresFhirVreadCall) Header() http.Header {
21236 if c.header_ == nil {
21237 c.header_ = make(http.Header)
21238 }
21239 return c.header_
21240 }
21241
21242 func (c *ProjectsLocationsDatasetsFhirStoresFhirVreadCall) doRequest(alt string) (*http.Response, error) {
21243 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
21244 if c.ifNoneMatch_ != "" {
21245 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21246 }
21247 c.urlParams_.Set("alt", alt)
21248 c.urlParams_.Set("prettyPrint", "false")
21249 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
21250 urls += "?" + c.urlParams_.Encode()
21251 req, err := http.NewRequest("GET", urls, nil)
21252 if err != nil {
21253 return nil, err
21254 }
21255 req.Header = reqHeaders
21256 googleapi.Expand(req.URL, map[string]string{
21257 "name": c.name,
21258 })
21259 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.vread", "request", internallog.HTTPRequest(req, nil))
21260 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21261 }
21262
21263 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.vread" call.
21264 func (c *ProjectsLocationsDatasetsFhirStoresFhirVreadCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
21265 gensupport.SetOptions(c.urlParams_, opts...)
21266 return c.doRequest("")
21267 }
21268
21269 type ProjectsLocationsDatasetsFhirStoresOperationsDeleteFhirOperationCall struct {
21270 s *Service
21271 name string
21272 urlParams_ gensupport.URLParams
21273 ctx_ context.Context
21274 header_ http.Header
21275 }
21276
21277 // DeleteFhirOperation: Deletes operations as defined in the FHIR
21278 // specification. Implements the FHIR implementation guide bulk data delete
21279 // request
21280 // (https://build.fhir.org/ig/HL7/bulk-data/export.html#bulk-data-delete-request).
21281 // Returns success if the operation was successfully cancelled. If the
21282 // operation is complete, or has already been cancelled, returns an error
21283 // response.
21284 //
21285 // - name: Name of the operation to be deleted, in the format
21286 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirSt
21287 // ores/{fhir_store_id}/operations/{operation_id}`.
21288 func (r *ProjectsLocationsDatasetsFhirStoresOperationsService) DeleteFhirOperation(name string) *ProjectsLocationsDatasetsFhirStoresOperationsDeleteFhirOperationCall {
21289 c := &ProjectsLocationsDatasetsFhirStoresOperationsDeleteFhirOperationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21290 c.name = name
21291 return c
21292 }
21293
21294 // Fields allows partial responses to be retrieved. See
21295 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
21296 // details.
21297 func (c *ProjectsLocationsDatasetsFhirStoresOperationsDeleteFhirOperationCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresOperationsDeleteFhirOperationCall {
21298 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21299 return c
21300 }
21301
21302 // Context sets the context to be used in this call's Do method.
21303 func (c *ProjectsLocationsDatasetsFhirStoresOperationsDeleteFhirOperationCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresOperationsDeleteFhirOperationCall {
21304 c.ctx_ = ctx
21305 return c
21306 }
21307
21308 // Header returns a http.Header that can be modified by the caller to add
21309 // headers to the request.
21310 func (c *ProjectsLocationsDatasetsFhirStoresOperationsDeleteFhirOperationCall) Header() http.Header {
21311 if c.header_ == nil {
21312 c.header_ = make(http.Header)
21313 }
21314 return c.header_
21315 }
21316
21317 func (c *ProjectsLocationsDatasetsFhirStoresOperationsDeleteFhirOperationCall) doRequest(alt string) (*http.Response, error) {
21318 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
21319 c.urlParams_.Set("alt", alt)
21320 c.urlParams_.Set("prettyPrint", "false")
21321 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
21322 urls += "?" + c.urlParams_.Encode()
21323 req, err := http.NewRequest("DELETE", urls, nil)
21324 if err != nil {
21325 return nil, err
21326 }
21327 req.Header = reqHeaders
21328 googleapi.Expand(req.URL, map[string]string{
21329 "name": c.name,
21330 })
21331 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.operations.delete-fhir-operation", "request", internallog.HTTPRequest(req, nil))
21332 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21333 }
21334
21335 // Do executes the "healthcare.projects.locations.datasets.fhirStores.operations.delete-fhir-operation" call.
21336 func (c *ProjectsLocationsDatasetsFhirStoresOperationsDeleteFhirOperationCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
21337 gensupport.SetOptions(c.urlParams_, opts...)
21338 return c.doRequest("")
21339 }
21340
21341 type ProjectsLocationsDatasetsFhirStoresOperationsGetFhirOperationStatusCall struct {
21342 s *Service
21343 name string
21344 urlParams_ gensupport.URLParams
21345 ifNoneMatch_ string
21346 ctx_ context.Context
21347 header_ http.Header
21348 }
21349
21350 // GetFhirOperationStatus: Gets the status of operations as defined in the FHIR
21351 // specification. Implements the FHIR implementation guide bulk data status
21352 // request
21353 // (https://build.fhir.org/ig/HL7/bulk-data/export.html#bulk-data-status-request).
21354 // Operations can have one of these states: * in-progress: response status code
21355 // is `202` and `X-Progress` header is set to `in progress`. * complete:
21356 // response status code is `200` and the body is a JSON-encoded operation
21357 // response as defined by the spec. For a bulk export, this response is defined
21358 // in
21359 // https://build.fhir.org/ig/HL7/bulk-data/export.html#response---complete-status.
21360 // * error: response status code is `5XX`, and the body is a JSON-encoded
21361 // `OperationOutcome` resource describing the reason for the error.
21362 //
21363 // - name: Name of the operation to query, in the format
21364 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirSt
21365 // ores/{fhir_store_id}/operations/{operation_id}`.
21366 func (r *ProjectsLocationsDatasetsFhirStoresOperationsService) GetFhirOperationStatus(name string) *ProjectsLocationsDatasetsFhirStoresOperationsGetFhirOperationStatusCall {
21367 c := &ProjectsLocationsDatasetsFhirStoresOperationsGetFhirOperationStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21368 c.name = name
21369 return c
21370 }
21371
21372 // Fields allows partial responses to be retrieved. See
21373 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
21374 // details.
21375 func (c *ProjectsLocationsDatasetsFhirStoresOperationsGetFhirOperationStatusCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresOperationsGetFhirOperationStatusCall {
21376 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21377 return c
21378 }
21379
21380 // IfNoneMatch sets an optional parameter which makes the operation fail if the
21381 // object's ETag matches the given value. This is useful for getting updates
21382 // only after the object has changed since the last request.
21383 func (c *ProjectsLocationsDatasetsFhirStoresOperationsGetFhirOperationStatusCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresOperationsGetFhirOperationStatusCall {
21384 c.ifNoneMatch_ = entityTag
21385 return c
21386 }
21387
21388 // Context sets the context to be used in this call's Do method.
21389 func (c *ProjectsLocationsDatasetsFhirStoresOperationsGetFhirOperationStatusCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresOperationsGetFhirOperationStatusCall {
21390 c.ctx_ = ctx
21391 return c
21392 }
21393
21394 // Header returns a http.Header that can be modified by the caller to add
21395 // headers to the request.
21396 func (c *ProjectsLocationsDatasetsFhirStoresOperationsGetFhirOperationStatusCall) Header() http.Header {
21397 if c.header_ == nil {
21398 c.header_ = make(http.Header)
21399 }
21400 return c.header_
21401 }
21402
21403 func (c *ProjectsLocationsDatasetsFhirStoresOperationsGetFhirOperationStatusCall) doRequest(alt string) (*http.Response, error) {
21404 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
21405 if c.ifNoneMatch_ != "" {
21406 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21407 }
21408 c.urlParams_.Set("alt", alt)
21409 c.urlParams_.Set("prettyPrint", "false")
21410 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
21411 urls += "?" + c.urlParams_.Encode()
21412 req, err := http.NewRequest("GET", urls, nil)
21413 if err != nil {
21414 return nil, err
21415 }
21416 req.Header = reqHeaders
21417 googleapi.Expand(req.URL, map[string]string{
21418 "name": c.name,
21419 })
21420 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.operations.get-fhir-operation-status", "request", internallog.HTTPRequest(req, nil))
21421 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21422 }
21423
21424 // Do executes the "healthcare.projects.locations.datasets.fhirStores.operations.get-fhir-operation-status" call.
21425 func (c *ProjectsLocationsDatasetsFhirStoresOperationsGetFhirOperationStatusCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
21426 gensupport.SetOptions(c.urlParams_, opts...)
21427 return c.doRequest("")
21428 }
21429
21430 type ProjectsLocationsDatasetsHl7V2StoresCreateCall struct {
21431 s *Service
21432 parent string
21433 hl7v2store *Hl7V2Store
21434 urlParams_ gensupport.URLParams
21435 ctx_ context.Context
21436 header_ http.Header
21437 }
21438
21439 // Create: Creates a new HL7v2 store within the parent dataset.
21440 //
21441 // - parent: The name of the dataset this HL7v2 store belongs to.
21442 func (r *ProjectsLocationsDatasetsHl7V2StoresService) Create(parent string, hl7v2store *Hl7V2Store) *ProjectsLocationsDatasetsHl7V2StoresCreateCall {
21443 c := &ProjectsLocationsDatasetsHl7V2StoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21444 c.parent = parent
21445 c.hl7v2store = hl7v2store
21446 return c
21447 }
21448
21449 // Hl7V2StoreId sets the optional parameter "hl7V2StoreId": Required. The ID of
21450 // the HL7v2 store that is being created. The string must match the following
21451 // regex: `[\p{L}\p{N}_\-\.]{1,256}`.
21452 func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) Hl7V2StoreId(hl7V2StoreId string) *ProjectsLocationsDatasetsHl7V2StoresCreateCall {
21453 c.urlParams_.Set("hl7V2StoreId", hl7V2StoreId)
21454 return c
21455 }
21456
21457 // Fields allows partial responses to be retrieved. See
21458 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
21459 // details.
21460 func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresCreateCall {
21461 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21462 return c
21463 }
21464
21465 // Context sets the context to be used in this call's Do method.
21466 func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresCreateCall {
21467 c.ctx_ = ctx
21468 return c
21469 }
21470
21471 // Header returns a http.Header that can be modified by the caller to add
21472 // headers to the request.
21473 func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) Header() http.Header {
21474 if c.header_ == nil {
21475 c.header_ = make(http.Header)
21476 }
21477 return c.header_
21478 }
21479
21480 func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) doRequest(alt string) (*http.Response, error) {
21481 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
21482 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.hl7v2store)
21483 if err != nil {
21484 return nil, err
21485 }
21486 c.urlParams_.Set("alt", alt)
21487 c.urlParams_.Set("prettyPrint", "false")
21488 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/hl7V2Stores")
21489 urls += "?" + c.urlParams_.Encode()
21490 req, err := http.NewRequest("POST", urls, body)
21491 if err != nil {
21492 return nil, err
21493 }
21494 req.Header = reqHeaders
21495 googleapi.Expand(req.URL, map[string]string{
21496 "parent": c.parent,
21497 })
21498 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.create", "request", internallog.HTTPRequest(req, body.Bytes()))
21499 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21500 }
21501
21502 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.create" call.
21503 // Any non-2xx status code is an error. Response headers are in either
21504 // *Hl7V2Store.ServerResponse.Header or (if a response was returned at all) in
21505 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
21506 // whether the returned error was because http.StatusNotModified was returned.
21507 func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) Do(opts ...googleapi.CallOption) (*Hl7V2Store, error) {
21508 gensupport.SetOptions(c.urlParams_, opts...)
21509 res, err := c.doRequest("json")
21510 if res != nil && res.StatusCode == http.StatusNotModified {
21511 if res.Body != nil {
21512 res.Body.Close()
21513 }
21514 return nil, gensupport.WrapError(&googleapi.Error{
21515 Code: res.StatusCode,
21516 Header: res.Header,
21517 })
21518 }
21519 if err != nil {
21520 return nil, err
21521 }
21522 defer googleapi.CloseBody(res)
21523 if err := googleapi.CheckResponse(res); err != nil {
21524 return nil, gensupport.WrapError(err)
21525 }
21526 ret := &Hl7V2Store{
21527 ServerResponse: googleapi.ServerResponse{
21528 Header: res.Header,
21529 HTTPStatusCode: res.StatusCode,
21530 },
21531 }
21532 target := &ret
21533 b, err := gensupport.DecodeResponseBytes(target, res)
21534 if err != nil {
21535 return nil, err
21536 }
21537 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.create", "response", internallog.HTTPResponse(res, b))
21538 return ret, nil
21539 }
21540
21541 type ProjectsLocationsDatasetsHl7V2StoresDeleteCall struct {
21542 s *Service
21543 name string
21544 urlParams_ gensupport.URLParams
21545 ctx_ context.Context
21546 header_ http.Header
21547 }
21548
21549 // Delete: Deletes the specified HL7v2 store and removes all messages that it
21550 // contains.
21551 //
21552 // - name: The resource name of the HL7v2 store to delete.
21553 func (r *ProjectsLocationsDatasetsHl7V2StoresService) Delete(name string) *ProjectsLocationsDatasetsHl7V2StoresDeleteCall {
21554 c := &ProjectsLocationsDatasetsHl7V2StoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21555 c.name = name
21556 return c
21557 }
21558
21559 // Fields allows partial responses to be retrieved. See
21560 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
21561 // details.
21562 func (c *ProjectsLocationsDatasetsHl7V2StoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresDeleteCall {
21563 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21564 return c
21565 }
21566
21567 // Context sets the context to be used in this call's Do method.
21568 func (c *ProjectsLocationsDatasetsHl7V2StoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresDeleteCall {
21569 c.ctx_ = ctx
21570 return c
21571 }
21572
21573 // Header returns a http.Header that can be modified by the caller to add
21574 // headers to the request.
21575 func (c *ProjectsLocationsDatasetsHl7V2StoresDeleteCall) Header() http.Header {
21576 if c.header_ == nil {
21577 c.header_ = make(http.Header)
21578 }
21579 return c.header_
21580 }
21581
21582 func (c *ProjectsLocationsDatasetsHl7V2StoresDeleteCall) doRequest(alt string) (*http.Response, error) {
21583 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
21584 c.urlParams_.Set("alt", alt)
21585 c.urlParams_.Set("prettyPrint", "false")
21586 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
21587 urls += "?" + c.urlParams_.Encode()
21588 req, err := http.NewRequest("DELETE", urls, nil)
21589 if err != nil {
21590 return nil, err
21591 }
21592 req.Header = reqHeaders
21593 googleapi.Expand(req.URL, map[string]string{
21594 "name": c.name,
21595 })
21596 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.delete", "request", internallog.HTTPRequest(req, nil))
21597 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21598 }
21599
21600 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.delete" call.
21601 // Any non-2xx status code is an error. Response headers are in either
21602 // *Empty.ServerResponse.Header or (if a response was returned at all) in
21603 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
21604 // whether the returned error was because http.StatusNotModified was returned.
21605 func (c *ProjectsLocationsDatasetsHl7V2StoresDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
21606 gensupport.SetOptions(c.urlParams_, opts...)
21607 res, err := c.doRequest("json")
21608 if res != nil && res.StatusCode == http.StatusNotModified {
21609 if res.Body != nil {
21610 res.Body.Close()
21611 }
21612 return nil, gensupport.WrapError(&googleapi.Error{
21613 Code: res.StatusCode,
21614 Header: res.Header,
21615 })
21616 }
21617 if err != nil {
21618 return nil, err
21619 }
21620 defer googleapi.CloseBody(res)
21621 if err := googleapi.CheckResponse(res); err != nil {
21622 return nil, gensupport.WrapError(err)
21623 }
21624 ret := &Empty{
21625 ServerResponse: googleapi.ServerResponse{
21626 Header: res.Header,
21627 HTTPStatusCode: res.StatusCode,
21628 },
21629 }
21630 target := &ret
21631 b, err := gensupport.DecodeResponseBytes(target, res)
21632 if err != nil {
21633 return nil, err
21634 }
21635 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.delete", "response", internallog.HTTPResponse(res, b))
21636 return ret, nil
21637 }
21638
21639 type ProjectsLocationsDatasetsHl7V2StoresExportCall struct {
21640 s *Service
21641 name string
21642 exportmessagesrequest *ExportMessagesRequest
21643 urlParams_ gensupport.URLParams
21644 ctx_ context.Context
21645 header_ http.Header
21646 }
21647
21648 // Export: Exports the messages to a destination. To filter messages to be
21649 // exported, define a filter using the start and end time, relative to the
21650 // message generation time (MSH.7). This API returns an Operation that can be
21651 // used to track the status of the job by calling GetOperation. Immediate fatal
21652 // errors appear in the error field. Otherwise, when the operation finishes, a
21653 // detailed response of type ExportMessagesResponse is returned in the response
21654 // field. The metadata field type for this operation is OperationMetadata.
21655 //
21656 // - name: The name of the source HL7v2 store, in the format
21657 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7v2S
21658 // tores/{hl7v2_store_id}`.
21659 func (r *ProjectsLocationsDatasetsHl7V2StoresService) Export(name string, exportmessagesrequest *ExportMessagesRequest) *ProjectsLocationsDatasetsHl7V2StoresExportCall {
21660 c := &ProjectsLocationsDatasetsHl7V2StoresExportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21661 c.name = name
21662 c.exportmessagesrequest = exportmessagesrequest
21663 return c
21664 }
21665
21666 // Fields allows partial responses to be retrieved. See
21667 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
21668 // details.
21669 func (c *ProjectsLocationsDatasetsHl7V2StoresExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresExportCall {
21670 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21671 return c
21672 }
21673
21674 // Context sets the context to be used in this call's Do method.
21675 func (c *ProjectsLocationsDatasetsHl7V2StoresExportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresExportCall {
21676 c.ctx_ = ctx
21677 return c
21678 }
21679
21680 // Header returns a http.Header that can be modified by the caller to add
21681 // headers to the request.
21682 func (c *ProjectsLocationsDatasetsHl7V2StoresExportCall) Header() http.Header {
21683 if c.header_ == nil {
21684 c.header_ = make(http.Header)
21685 }
21686 return c.header_
21687 }
21688
21689 func (c *ProjectsLocationsDatasetsHl7V2StoresExportCall) doRequest(alt string) (*http.Response, error) {
21690 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
21691 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.exportmessagesrequest)
21692 if err != nil {
21693 return nil, err
21694 }
21695 c.urlParams_.Set("alt", alt)
21696 c.urlParams_.Set("prettyPrint", "false")
21697 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:export")
21698 urls += "?" + c.urlParams_.Encode()
21699 req, err := http.NewRequest("POST", urls, body)
21700 if err != nil {
21701 return nil, err
21702 }
21703 req.Header = reqHeaders
21704 googleapi.Expand(req.URL, map[string]string{
21705 "name": c.name,
21706 })
21707 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.export", "request", internallog.HTTPRequest(req, body.Bytes()))
21708 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21709 }
21710
21711 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.export" call.
21712 // Any non-2xx status code is an error. Response headers are in either
21713 // *Operation.ServerResponse.Header or (if a response was returned at all) in
21714 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
21715 // whether the returned error was because http.StatusNotModified was returned.
21716 func (c *ProjectsLocationsDatasetsHl7V2StoresExportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
21717 gensupport.SetOptions(c.urlParams_, opts...)
21718 res, err := c.doRequest("json")
21719 if res != nil && res.StatusCode == http.StatusNotModified {
21720 if res.Body != nil {
21721 res.Body.Close()
21722 }
21723 return nil, gensupport.WrapError(&googleapi.Error{
21724 Code: res.StatusCode,
21725 Header: res.Header,
21726 })
21727 }
21728 if err != nil {
21729 return nil, err
21730 }
21731 defer googleapi.CloseBody(res)
21732 if err := googleapi.CheckResponse(res); err != nil {
21733 return nil, gensupport.WrapError(err)
21734 }
21735 ret := &Operation{
21736 ServerResponse: googleapi.ServerResponse{
21737 Header: res.Header,
21738 HTTPStatusCode: res.StatusCode,
21739 },
21740 }
21741 target := &ret
21742 b, err := gensupport.DecodeResponseBytes(target, res)
21743 if err != nil {
21744 return nil, err
21745 }
21746 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.export", "response", internallog.HTTPResponse(res, b))
21747 return ret, nil
21748 }
21749
21750 type ProjectsLocationsDatasetsHl7V2StoresGetCall struct {
21751 s *Service
21752 name string
21753 urlParams_ gensupport.URLParams
21754 ifNoneMatch_ string
21755 ctx_ context.Context
21756 header_ http.Header
21757 }
21758
21759 // Get: Gets the specified HL7v2 store.
21760 //
21761 // - name: The resource name of the HL7v2 store to get.
21762 func (r *ProjectsLocationsDatasetsHl7V2StoresService) Get(name string) *ProjectsLocationsDatasetsHl7V2StoresGetCall {
21763 c := &ProjectsLocationsDatasetsHl7V2StoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21764 c.name = name
21765 return c
21766 }
21767
21768 // Fields allows partial responses to be retrieved. See
21769 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
21770 // details.
21771 func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresGetCall {
21772 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21773 return c
21774 }
21775
21776 // IfNoneMatch sets an optional parameter which makes the operation fail if the
21777 // object's ETag matches the given value. This is useful for getting updates
21778 // only after the object has changed since the last request.
21779 func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsHl7V2StoresGetCall {
21780 c.ifNoneMatch_ = entityTag
21781 return c
21782 }
21783
21784 // Context sets the context to be used in this call's Do method.
21785 func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresGetCall {
21786 c.ctx_ = ctx
21787 return c
21788 }
21789
21790 // Header returns a http.Header that can be modified by the caller to add
21791 // headers to the request.
21792 func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) Header() http.Header {
21793 if c.header_ == nil {
21794 c.header_ = make(http.Header)
21795 }
21796 return c.header_
21797 }
21798
21799 func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) doRequest(alt string) (*http.Response, error) {
21800 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
21801 if c.ifNoneMatch_ != "" {
21802 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21803 }
21804 c.urlParams_.Set("alt", alt)
21805 c.urlParams_.Set("prettyPrint", "false")
21806 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
21807 urls += "?" + c.urlParams_.Encode()
21808 req, err := http.NewRequest("GET", urls, nil)
21809 if err != nil {
21810 return nil, err
21811 }
21812 req.Header = reqHeaders
21813 googleapi.Expand(req.URL, map[string]string{
21814 "name": c.name,
21815 })
21816 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.get", "request", internallog.HTTPRequest(req, nil))
21817 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21818 }
21819
21820 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.get" call.
21821 // Any non-2xx status code is an error. Response headers are in either
21822 // *Hl7V2Store.ServerResponse.Header or (if a response was returned at all) in
21823 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
21824 // whether the returned error was because http.StatusNotModified was returned.
21825 func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) Do(opts ...googleapi.CallOption) (*Hl7V2Store, error) {
21826 gensupport.SetOptions(c.urlParams_, opts...)
21827 res, err := c.doRequest("json")
21828 if res != nil && res.StatusCode == http.StatusNotModified {
21829 if res.Body != nil {
21830 res.Body.Close()
21831 }
21832 return nil, gensupport.WrapError(&googleapi.Error{
21833 Code: res.StatusCode,
21834 Header: res.Header,
21835 })
21836 }
21837 if err != nil {
21838 return nil, err
21839 }
21840 defer googleapi.CloseBody(res)
21841 if err := googleapi.CheckResponse(res); err != nil {
21842 return nil, gensupport.WrapError(err)
21843 }
21844 ret := &Hl7V2Store{
21845 ServerResponse: googleapi.ServerResponse{
21846 Header: res.Header,
21847 HTTPStatusCode: res.StatusCode,
21848 },
21849 }
21850 target := &ret
21851 b, err := gensupport.DecodeResponseBytes(target, res)
21852 if err != nil {
21853 return nil, err
21854 }
21855 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.get", "response", internallog.HTTPResponse(res, b))
21856 return ret, nil
21857 }
21858
21859 type ProjectsLocationsDatasetsHl7V2StoresGetHL7v2StoreMetricsCall struct {
21860 s *Service
21861 name string
21862 urlParams_ gensupport.URLParams
21863 ifNoneMatch_ string
21864 ctx_ context.Context
21865 header_ http.Header
21866 }
21867
21868 // GetHL7v2StoreMetrics: Gets metrics associated with the HL7v2 store.
21869 //
21870 // - name: The resource name of the HL7v2 store to get metrics for, in the
21871 // format
21872 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2S
21873 // tores/{hl7v2_store_id}`.
21874 func (r *ProjectsLocationsDatasetsHl7V2StoresService) GetHL7v2StoreMetrics(name string) *ProjectsLocationsDatasetsHl7V2StoresGetHL7v2StoreMetricsCall {
21875 c := &ProjectsLocationsDatasetsHl7V2StoresGetHL7v2StoreMetricsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21876 c.name = name
21877 return c
21878 }
21879
21880 // Fields allows partial responses to be retrieved. See
21881 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
21882 // details.
21883 func (c *ProjectsLocationsDatasetsHl7V2StoresGetHL7v2StoreMetricsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresGetHL7v2StoreMetricsCall {
21884 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21885 return c
21886 }
21887
21888 // IfNoneMatch sets an optional parameter which makes the operation fail if the
21889 // object's ETag matches the given value. This is useful for getting updates
21890 // only after the object has changed since the last request.
21891 func (c *ProjectsLocationsDatasetsHl7V2StoresGetHL7v2StoreMetricsCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsHl7V2StoresGetHL7v2StoreMetricsCall {
21892 c.ifNoneMatch_ = entityTag
21893 return c
21894 }
21895
21896 // Context sets the context to be used in this call's Do method.
21897 func (c *ProjectsLocationsDatasetsHl7V2StoresGetHL7v2StoreMetricsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresGetHL7v2StoreMetricsCall {
21898 c.ctx_ = ctx
21899 return c
21900 }
21901
21902 // Header returns a http.Header that can be modified by the caller to add
21903 // headers to the request.
21904 func (c *ProjectsLocationsDatasetsHl7V2StoresGetHL7v2StoreMetricsCall) Header() http.Header {
21905 if c.header_ == nil {
21906 c.header_ = make(http.Header)
21907 }
21908 return c.header_
21909 }
21910
21911 func (c *ProjectsLocationsDatasetsHl7V2StoresGetHL7v2StoreMetricsCall) doRequest(alt string) (*http.Response, error) {
21912 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
21913 if c.ifNoneMatch_ != "" {
21914 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21915 }
21916 c.urlParams_.Set("alt", alt)
21917 c.urlParams_.Set("prettyPrint", "false")
21918 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:getHL7v2StoreMetrics")
21919 urls += "?" + c.urlParams_.Encode()
21920 req, err := http.NewRequest("GET", urls, nil)
21921 if err != nil {
21922 return nil, err
21923 }
21924 req.Header = reqHeaders
21925 googleapi.Expand(req.URL, map[string]string{
21926 "name": c.name,
21927 })
21928 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.getHL7v2StoreMetrics", "request", internallog.HTTPRequest(req, nil))
21929 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21930 }
21931
21932 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.getHL7v2StoreMetrics" call.
21933 // Any non-2xx status code is an error. Response headers are in either
21934 // *Hl7V2StoreMetrics.ServerResponse.Header or (if a response was returned at
21935 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
21936 // check whether the returned error was because http.StatusNotModified was
21937 // returned.
21938 func (c *ProjectsLocationsDatasetsHl7V2StoresGetHL7v2StoreMetricsCall) Do(opts ...googleapi.CallOption) (*Hl7V2StoreMetrics, error) {
21939 gensupport.SetOptions(c.urlParams_, opts...)
21940 res, err := c.doRequest("json")
21941 if res != nil && res.StatusCode == http.StatusNotModified {
21942 if res.Body != nil {
21943 res.Body.Close()
21944 }
21945 return nil, gensupport.WrapError(&googleapi.Error{
21946 Code: res.StatusCode,
21947 Header: res.Header,
21948 })
21949 }
21950 if err != nil {
21951 return nil, err
21952 }
21953 defer googleapi.CloseBody(res)
21954 if err := googleapi.CheckResponse(res); err != nil {
21955 return nil, gensupport.WrapError(err)
21956 }
21957 ret := &Hl7V2StoreMetrics{
21958 ServerResponse: googleapi.ServerResponse{
21959 Header: res.Header,
21960 HTTPStatusCode: res.StatusCode,
21961 },
21962 }
21963 target := &ret
21964 b, err := gensupport.DecodeResponseBytes(target, res)
21965 if err != nil {
21966 return nil, err
21967 }
21968 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.getHL7v2StoreMetrics", "response", internallog.HTTPResponse(res, b))
21969 return ret, nil
21970 }
21971
21972 type ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall struct {
21973 s *Service
21974 resource string
21975 urlParams_ gensupport.URLParams
21976 ifNoneMatch_ string
21977 ctx_ context.Context
21978 header_ http.Header
21979 }
21980
21981 // GetIamPolicy: Gets the access control policy for a resource. Returns an
21982 // empty policy if the resource exists and does not have a policy set.
21983 //
21984 // - resource: REQUIRED: The resource for which the policy is being requested.
21985 // See Resource names (https://cloud.google.com/apis/design/resource_names)
21986 // for the appropriate value for this field.
21987 func (r *ProjectsLocationsDatasetsHl7V2StoresService) GetIamPolicy(resource string) *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall {
21988 c := &ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21989 c.resource = resource
21990 return c
21991 }
21992
21993 // OptionsRequestedPolicyVersion sets the optional parameter
21994 // "options.requestedPolicyVersion": The maximum policy version that will be
21995 // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
21996 // an invalid value will be rejected. Requests for policies with any
21997 // conditional role bindings must specify version 3. Policies with no
21998 // conditional role bindings may specify any valid value or leave the field
21999 // unset. The policy in the response might use the policy version that you
22000 // specified, or it might use a lower policy version. For example, if you
22001 // specify version 3, but the policy has no conditional role bindings, the
22002 // response uses version 1. To learn which resources support conditions in
22003 // their IAM policies, see the IAM documentation
22004 // (https://cloud.google.com/iam/help/conditions/resource-policies).
22005 func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall {
22006 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
22007 return c
22008 }
22009
22010 // Fields allows partial responses to be retrieved. See
22011 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
22012 // details.
22013 func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall {
22014 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22015 return c
22016 }
22017
22018 // IfNoneMatch sets an optional parameter which makes the operation fail if the
22019 // object's ETag matches the given value. This is useful for getting updates
22020 // only after the object has changed since the last request.
22021 func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall {
22022 c.ifNoneMatch_ = entityTag
22023 return c
22024 }
22025
22026 // Context sets the context to be used in this call's Do method.
22027 func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall {
22028 c.ctx_ = ctx
22029 return c
22030 }
22031
22032 // Header returns a http.Header that can be modified by the caller to add
22033 // headers to the request.
22034 func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) Header() http.Header {
22035 if c.header_ == nil {
22036 c.header_ = make(http.Header)
22037 }
22038 return c.header_
22039 }
22040
22041 func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
22042 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
22043 if c.ifNoneMatch_ != "" {
22044 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22045 }
22046 c.urlParams_.Set("alt", alt)
22047 c.urlParams_.Set("prettyPrint", "false")
22048 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
22049 urls += "?" + c.urlParams_.Encode()
22050 req, err := http.NewRequest("GET", urls, nil)
22051 if err != nil {
22052 return nil, err
22053 }
22054 req.Header = reqHeaders
22055 googleapi.Expand(req.URL, map[string]string{
22056 "resource": c.resource,
22057 })
22058 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.getIamPolicy", "request", internallog.HTTPRequest(req, nil))
22059 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22060 }
22061
22062 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.getIamPolicy" call.
22063 // Any non-2xx status code is an error. Response headers are in either
22064 // *Policy.ServerResponse.Header or (if a response was returned at all) in
22065 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
22066 // whether the returned error was because http.StatusNotModified was returned.
22067 func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
22068 gensupport.SetOptions(c.urlParams_, opts...)
22069 res, err := c.doRequest("json")
22070 if res != nil && res.StatusCode == http.StatusNotModified {
22071 if res.Body != nil {
22072 res.Body.Close()
22073 }
22074 return nil, gensupport.WrapError(&googleapi.Error{
22075 Code: res.StatusCode,
22076 Header: res.Header,
22077 })
22078 }
22079 if err != nil {
22080 return nil, err
22081 }
22082 defer googleapi.CloseBody(res)
22083 if err := googleapi.CheckResponse(res); err != nil {
22084 return nil, gensupport.WrapError(err)
22085 }
22086 ret := &Policy{
22087 ServerResponse: googleapi.ServerResponse{
22088 Header: res.Header,
22089 HTTPStatusCode: res.StatusCode,
22090 },
22091 }
22092 target := &ret
22093 b, err := gensupport.DecodeResponseBytes(target, res)
22094 if err != nil {
22095 return nil, err
22096 }
22097 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.getIamPolicy", "response", internallog.HTTPResponse(res, b))
22098 return ret, nil
22099 }
22100
22101 type ProjectsLocationsDatasetsHl7V2StoresImportCall struct {
22102 s *Service
22103 name string
22104 importmessagesrequest *ImportMessagesRequest
22105 urlParams_ gensupport.URLParams
22106 ctx_ context.Context
22107 header_ http.Header
22108 }
22109
22110 // Import: Import messages to the HL7v2 store by loading data from the
22111 // specified sources. This method is optimized to load large quantities of data
22112 // using import semantics that ignore some HL7v2 store configuration options
22113 // and are not suitable for all use cases. It is primarily intended to load
22114 // data into an empty HL7v2 store that is not being used by other clients. An
22115 // existing message will be overwritten if a duplicate message is imported. A
22116 // duplicate message is a message with the same raw bytes as a message that
22117 // already exists in this HL7v2 store. When a message is overwritten, its
22118 // labels will also be overwritten. The import operation is idempotent unless
22119 // the input data contains multiple valid messages with the same raw bytes but
22120 // different labels. In that case, after the import completes, the store
22121 // contains exactly one message with those raw bytes but there is no ordering
22122 // guarantee on which version of the labels it has. The operation result
22123 // counters do not count duplicated raw bytes as an error and count one success
22124 // for each message in the input, which might result in a success count larger
22125 // than the number of messages in the HL7v2 store. If some messages fail to
22126 // import, for example due to parsing errors, successfully imported messages
22127 // are not rolled back. This method returns an Operation that can be used to
22128 // track the status of the import by calling GetOperation. Immediate fatal
22129 // errors appear in the error field, errors are also logged to Cloud Logging
22130 // (see Viewing error logs in Cloud Logging
22131 // (https://cloud.google.com/healthcare/docs/how-tos/logging)). Otherwise, when
22132 // the operation finishes, a response of type ImportMessagesResponse is
22133 // returned in the response field. The metadata field type for this operation
22134 // is OperationMetadata.
22135 //
22136 // - name: The name of the target HL7v2 store, in the format
22137 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7v2S
22138 // tores/{hl7v2_store_id}`.
22139 func (r *ProjectsLocationsDatasetsHl7V2StoresService) Import(name string, importmessagesrequest *ImportMessagesRequest) *ProjectsLocationsDatasetsHl7V2StoresImportCall {
22140 c := &ProjectsLocationsDatasetsHl7V2StoresImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22141 c.name = name
22142 c.importmessagesrequest = importmessagesrequest
22143 return c
22144 }
22145
22146 // Fields allows partial responses to be retrieved. See
22147 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
22148 // details.
22149 func (c *ProjectsLocationsDatasetsHl7V2StoresImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresImportCall {
22150 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22151 return c
22152 }
22153
22154 // Context sets the context to be used in this call's Do method.
22155 func (c *ProjectsLocationsDatasetsHl7V2StoresImportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresImportCall {
22156 c.ctx_ = ctx
22157 return c
22158 }
22159
22160 // Header returns a http.Header that can be modified by the caller to add
22161 // headers to the request.
22162 func (c *ProjectsLocationsDatasetsHl7V2StoresImportCall) Header() http.Header {
22163 if c.header_ == nil {
22164 c.header_ = make(http.Header)
22165 }
22166 return c.header_
22167 }
22168
22169 func (c *ProjectsLocationsDatasetsHl7V2StoresImportCall) doRequest(alt string) (*http.Response, error) {
22170 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
22171 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.importmessagesrequest)
22172 if err != nil {
22173 return nil, err
22174 }
22175 c.urlParams_.Set("alt", alt)
22176 c.urlParams_.Set("prettyPrint", "false")
22177 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:import")
22178 urls += "?" + c.urlParams_.Encode()
22179 req, err := http.NewRequest("POST", urls, body)
22180 if err != nil {
22181 return nil, err
22182 }
22183 req.Header = reqHeaders
22184 googleapi.Expand(req.URL, map[string]string{
22185 "name": c.name,
22186 })
22187 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.import", "request", internallog.HTTPRequest(req, body.Bytes()))
22188 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22189 }
22190
22191 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.import" call.
22192 // Any non-2xx status code is an error. Response headers are in either
22193 // *Operation.ServerResponse.Header or (if a response was returned at all) in
22194 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
22195 // whether the returned error was because http.StatusNotModified was returned.
22196 func (c *ProjectsLocationsDatasetsHl7V2StoresImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
22197 gensupport.SetOptions(c.urlParams_, opts...)
22198 res, err := c.doRequest("json")
22199 if res != nil && res.StatusCode == http.StatusNotModified {
22200 if res.Body != nil {
22201 res.Body.Close()
22202 }
22203 return nil, gensupport.WrapError(&googleapi.Error{
22204 Code: res.StatusCode,
22205 Header: res.Header,
22206 })
22207 }
22208 if err != nil {
22209 return nil, err
22210 }
22211 defer googleapi.CloseBody(res)
22212 if err := googleapi.CheckResponse(res); err != nil {
22213 return nil, gensupport.WrapError(err)
22214 }
22215 ret := &Operation{
22216 ServerResponse: googleapi.ServerResponse{
22217 Header: res.Header,
22218 HTTPStatusCode: res.StatusCode,
22219 },
22220 }
22221 target := &ret
22222 b, err := gensupport.DecodeResponseBytes(target, res)
22223 if err != nil {
22224 return nil, err
22225 }
22226 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.import", "response", internallog.HTTPResponse(res, b))
22227 return ret, nil
22228 }
22229
22230 type ProjectsLocationsDatasetsHl7V2StoresListCall struct {
22231 s *Service
22232 parent string
22233 urlParams_ gensupport.URLParams
22234 ifNoneMatch_ string
22235 ctx_ context.Context
22236 header_ http.Header
22237 }
22238
22239 // List: Lists the HL7v2 stores in the given dataset.
22240 //
22241 // - parent: Name of the dataset.
22242 func (r *ProjectsLocationsDatasetsHl7V2StoresService) List(parent string) *ProjectsLocationsDatasetsHl7V2StoresListCall {
22243 c := &ProjectsLocationsDatasetsHl7V2StoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22244 c.parent = parent
22245 return c
22246 }
22247
22248 // Filter sets the optional parameter "filter": Restricts stores returned to
22249 // those matching a filter. The following syntax is available: * A string field
22250 // value can be written as text inside quotation marks, for example "query
22251 // text". The only valid relational operation for text fields is equality
22252 // (`=`), where text is searched within the field, rather than having the field
22253 // be equal to the text. For example, "Comment = great" returns messages with
22254 // `great` in the comment field. * A number field value can be written as an
22255 // integer, a decimal, or an exponential. The valid relational operators for
22256 // number fields are the equality operator (`=`), along with the less
22257 // than/greater than operators (`<`, `<=`, `>`, `>=`). Note that there is no
22258 // inequality (`!=`) operator. You can prepend the `NOT` operator to an
22259 // expression to negate it. * A date field value must be written in
22260 // `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format.
22261 // Leading zeros are required for one-digit months and days. The valid
22262 // relational operators for date fields are the equality operator (`=`) , along
22263 // with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that
22264 // there is no inequality (`!=`) operator. You can prepend the `NOT` operator
22265 // to an expression to negate it. * Multiple field query expressions can be
22266 // combined in one query by adding `AND` or `OR` operators between the
22267 // expressions. If a boolean operator appears within a quoted string, it is not
22268 // treated as special, it's just another part of the character string to be
22269 // matched. You can prepend the `NOT` operator to an expression to negate it.
22270 // Only filtering on labels is supported. For example, `labels.key=value`.
22271 func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Filter(filter string) *ProjectsLocationsDatasetsHl7V2StoresListCall {
22272 c.urlParams_.Set("filter", filter)
22273 return c
22274 }
22275
22276 // PageSize sets the optional parameter "pageSize": Limit on the number of
22277 // HL7v2 stores to return in a single response. If not specified, 100 is used.
22278 // May not be larger than 1000.
22279 func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsHl7V2StoresListCall {
22280 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
22281 return c
22282 }
22283
22284 // PageToken sets the optional parameter "pageToken": The next_page_token value
22285 // returned from the previous List request, if any.
22286 func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsHl7V2StoresListCall {
22287 c.urlParams_.Set("pageToken", pageToken)
22288 return c
22289 }
22290
22291 // Fields allows partial responses to be retrieved. See
22292 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
22293 // details.
22294 func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresListCall {
22295 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22296 return c
22297 }
22298
22299 // IfNoneMatch sets an optional parameter which makes the operation fail if the
22300 // object's ETag matches the given value. This is useful for getting updates
22301 // only after the object has changed since the last request.
22302 func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsHl7V2StoresListCall {
22303 c.ifNoneMatch_ = entityTag
22304 return c
22305 }
22306
22307 // Context sets the context to be used in this call's Do method.
22308 func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresListCall {
22309 c.ctx_ = ctx
22310 return c
22311 }
22312
22313 // Header returns a http.Header that can be modified by the caller to add
22314 // headers to the request.
22315 func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Header() http.Header {
22316 if c.header_ == nil {
22317 c.header_ = make(http.Header)
22318 }
22319 return c.header_
22320 }
22321
22322 func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) doRequest(alt string) (*http.Response, error) {
22323 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
22324 if c.ifNoneMatch_ != "" {
22325 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22326 }
22327 c.urlParams_.Set("alt", alt)
22328 c.urlParams_.Set("prettyPrint", "false")
22329 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/hl7V2Stores")
22330 urls += "?" + c.urlParams_.Encode()
22331 req, err := http.NewRequest("GET", urls, nil)
22332 if err != nil {
22333 return nil, err
22334 }
22335 req.Header = reqHeaders
22336 googleapi.Expand(req.URL, map[string]string{
22337 "parent": c.parent,
22338 })
22339 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.list", "request", internallog.HTTPRequest(req, nil))
22340 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22341 }
22342
22343 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.list" call.
22344 // Any non-2xx status code is an error. Response headers are in either
22345 // *ListHl7V2StoresResponse.ServerResponse.Header or (if a response was
22346 // returned at all) in error.(*googleapi.Error).Header. Use
22347 // googleapi.IsNotModified to check whether the returned error was because
22348 // http.StatusNotModified was returned.
22349 func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Do(opts ...googleapi.CallOption) (*ListHl7V2StoresResponse, error) {
22350 gensupport.SetOptions(c.urlParams_, opts...)
22351 res, err := c.doRequest("json")
22352 if res != nil && res.StatusCode == http.StatusNotModified {
22353 if res.Body != nil {
22354 res.Body.Close()
22355 }
22356 return nil, gensupport.WrapError(&googleapi.Error{
22357 Code: res.StatusCode,
22358 Header: res.Header,
22359 })
22360 }
22361 if err != nil {
22362 return nil, err
22363 }
22364 defer googleapi.CloseBody(res)
22365 if err := googleapi.CheckResponse(res); err != nil {
22366 return nil, gensupport.WrapError(err)
22367 }
22368 ret := &ListHl7V2StoresResponse{
22369 ServerResponse: googleapi.ServerResponse{
22370 Header: res.Header,
22371 HTTPStatusCode: res.StatusCode,
22372 },
22373 }
22374 target := &ret
22375 b, err := gensupport.DecodeResponseBytes(target, res)
22376 if err != nil {
22377 return nil, err
22378 }
22379 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.list", "response", internallog.HTTPResponse(res, b))
22380 return ret, nil
22381 }
22382
22383 // Pages invokes f for each page of results.
22384 // A non-nil error returned from f will halt the iteration.
22385 // The provided context supersedes any context provided to the Context method.
22386 func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Pages(ctx context.Context, f func(*ListHl7V2StoresResponse) error) error {
22387 c.ctx_ = ctx
22388 defer c.PageToken(c.urlParams_.Get("pageToken"))
22389 for {
22390 x, err := c.Do()
22391 if err != nil {
22392 return err
22393 }
22394 if err := f(x); err != nil {
22395 return err
22396 }
22397 if x.NextPageToken == "" {
22398 return nil
22399 }
22400 c.PageToken(x.NextPageToken)
22401 }
22402 }
22403
22404 type ProjectsLocationsDatasetsHl7V2StoresPatchCall struct {
22405 s *Service
22406 name string
22407 hl7v2store *Hl7V2Store
22408 urlParams_ gensupport.URLParams
22409 ctx_ context.Context
22410 header_ http.Header
22411 }
22412
22413 // Patch: Updates the HL7v2 store.
22414 //
22415 // - name: Identifier. Resource name of the HL7v2 store, of the form
22416 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2S
22417 // tores/{hl7v2_store_id}`.
22418 func (r *ProjectsLocationsDatasetsHl7V2StoresService) Patch(name string, hl7v2store *Hl7V2Store) *ProjectsLocationsDatasetsHl7V2StoresPatchCall {
22419 c := &ProjectsLocationsDatasetsHl7V2StoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22420 c.name = name
22421 c.hl7v2store = hl7v2store
22422 return c
22423 }
22424
22425 // UpdateMask sets the optional parameter "updateMask": Required. The update
22426 // mask applies to the resource. For the `FieldMask` definition, see
22427 // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
22428 func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsHl7V2StoresPatchCall {
22429 c.urlParams_.Set("updateMask", updateMask)
22430 return c
22431 }
22432
22433 // Fields allows partial responses to be retrieved. See
22434 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
22435 // details.
22436 func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresPatchCall {
22437 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22438 return c
22439 }
22440
22441 // Context sets the context to be used in this call's Do method.
22442 func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresPatchCall {
22443 c.ctx_ = ctx
22444 return c
22445 }
22446
22447 // Header returns a http.Header that can be modified by the caller to add
22448 // headers to the request.
22449 func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) Header() http.Header {
22450 if c.header_ == nil {
22451 c.header_ = make(http.Header)
22452 }
22453 return c.header_
22454 }
22455
22456 func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) doRequest(alt string) (*http.Response, error) {
22457 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
22458 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.hl7v2store)
22459 if err != nil {
22460 return nil, err
22461 }
22462 c.urlParams_.Set("alt", alt)
22463 c.urlParams_.Set("prettyPrint", "false")
22464 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
22465 urls += "?" + c.urlParams_.Encode()
22466 req, err := http.NewRequest("PATCH", urls, body)
22467 if err != nil {
22468 return nil, err
22469 }
22470 req.Header = reqHeaders
22471 googleapi.Expand(req.URL, map[string]string{
22472 "name": c.name,
22473 })
22474 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
22475 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22476 }
22477
22478 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.patch" call.
22479 // Any non-2xx status code is an error. Response headers are in either
22480 // *Hl7V2Store.ServerResponse.Header or (if a response was returned at all) in
22481 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
22482 // whether the returned error was because http.StatusNotModified was returned.
22483 func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) Do(opts ...googleapi.CallOption) (*Hl7V2Store, error) {
22484 gensupport.SetOptions(c.urlParams_, opts...)
22485 res, err := c.doRequest("json")
22486 if res != nil && res.StatusCode == http.StatusNotModified {
22487 if res.Body != nil {
22488 res.Body.Close()
22489 }
22490 return nil, gensupport.WrapError(&googleapi.Error{
22491 Code: res.StatusCode,
22492 Header: res.Header,
22493 })
22494 }
22495 if err != nil {
22496 return nil, err
22497 }
22498 defer googleapi.CloseBody(res)
22499 if err := googleapi.CheckResponse(res); err != nil {
22500 return nil, gensupport.WrapError(err)
22501 }
22502 ret := &Hl7V2Store{
22503 ServerResponse: googleapi.ServerResponse{
22504 Header: res.Header,
22505 HTTPStatusCode: res.StatusCode,
22506 },
22507 }
22508 target := &ret
22509 b, err := gensupport.DecodeResponseBytes(target, res)
22510 if err != nil {
22511 return nil, err
22512 }
22513 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.patch", "response", internallog.HTTPResponse(res, b))
22514 return ret, nil
22515 }
22516
22517 type ProjectsLocationsDatasetsHl7V2StoresRollbackCall struct {
22518 s *Service
22519 name string
22520 rollbackhl7v2messagesrequest *RollbackHl7V2MessagesRequest
22521 urlParams_ gensupport.URLParams
22522 ctx_ context.Context
22523 header_ http.Header
22524 }
22525
22526 // Rollback: Rolls back messages from the HL7v2 store to the specified time.
22527 // This method returns an Operation that can be used to track the status of the
22528 // rollback by calling GetOperation. Immediate fatal errors appear in the error
22529 // field, errors are also logged to Cloud Logging (see Viewing error logs in
22530 // Cloud Logging (https://cloud.google.com/healthcare/docs/how-tos/logging)).
22531 // Otherwise, when the operation finishes, a detailed response of type
22532 // RollbackHl7V2MessagesResponse is returned in the response field. The
22533 // metadata field type for this operation is OperationMetadata.
22534 //
22535 // - name: The name of the HL7v2 store to rollback, in the format of
22536 // "projects/{project_id}/locations/{location_id}/datasets/{dataset_id}
22537 // /hl7V2Stores/{hl7v2_store_id}".
22538 func (r *ProjectsLocationsDatasetsHl7V2StoresService) Rollback(name string, rollbackhl7v2messagesrequest *RollbackHl7V2MessagesRequest) *ProjectsLocationsDatasetsHl7V2StoresRollbackCall {
22539 c := &ProjectsLocationsDatasetsHl7V2StoresRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22540 c.name = name
22541 c.rollbackhl7v2messagesrequest = rollbackhl7v2messagesrequest
22542 return c
22543 }
22544
22545 // Fields allows partial responses to be retrieved. See
22546 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
22547 // details.
22548 func (c *ProjectsLocationsDatasetsHl7V2StoresRollbackCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresRollbackCall {
22549 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22550 return c
22551 }
22552
22553 // Context sets the context to be used in this call's Do method.
22554 func (c *ProjectsLocationsDatasetsHl7V2StoresRollbackCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresRollbackCall {
22555 c.ctx_ = ctx
22556 return c
22557 }
22558
22559 // Header returns a http.Header that can be modified by the caller to add
22560 // headers to the request.
22561 func (c *ProjectsLocationsDatasetsHl7V2StoresRollbackCall) Header() http.Header {
22562 if c.header_ == nil {
22563 c.header_ = make(http.Header)
22564 }
22565 return c.header_
22566 }
22567
22568 func (c *ProjectsLocationsDatasetsHl7V2StoresRollbackCall) doRequest(alt string) (*http.Response, error) {
22569 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
22570 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.rollbackhl7v2messagesrequest)
22571 if err != nil {
22572 return nil, err
22573 }
22574 c.urlParams_.Set("alt", alt)
22575 c.urlParams_.Set("prettyPrint", "false")
22576 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:rollback")
22577 urls += "?" + c.urlParams_.Encode()
22578 req, err := http.NewRequest("POST", urls, body)
22579 if err != nil {
22580 return nil, err
22581 }
22582 req.Header = reqHeaders
22583 googleapi.Expand(req.URL, map[string]string{
22584 "name": c.name,
22585 })
22586 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.rollback", "request", internallog.HTTPRequest(req, body.Bytes()))
22587 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22588 }
22589
22590 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.rollback" call.
22591 // Any non-2xx status code is an error. Response headers are in either
22592 // *Operation.ServerResponse.Header or (if a response was returned at all) in
22593 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
22594 // whether the returned error was because http.StatusNotModified was returned.
22595 func (c *ProjectsLocationsDatasetsHl7V2StoresRollbackCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
22596 gensupport.SetOptions(c.urlParams_, opts...)
22597 res, err := c.doRequest("json")
22598 if res != nil && res.StatusCode == http.StatusNotModified {
22599 if res.Body != nil {
22600 res.Body.Close()
22601 }
22602 return nil, gensupport.WrapError(&googleapi.Error{
22603 Code: res.StatusCode,
22604 Header: res.Header,
22605 })
22606 }
22607 if err != nil {
22608 return nil, err
22609 }
22610 defer googleapi.CloseBody(res)
22611 if err := googleapi.CheckResponse(res); err != nil {
22612 return nil, gensupport.WrapError(err)
22613 }
22614 ret := &Operation{
22615 ServerResponse: googleapi.ServerResponse{
22616 Header: res.Header,
22617 HTTPStatusCode: res.StatusCode,
22618 },
22619 }
22620 target := &ret
22621 b, err := gensupport.DecodeResponseBytes(target, res)
22622 if err != nil {
22623 return nil, err
22624 }
22625 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.rollback", "response", internallog.HTTPResponse(res, b))
22626 return ret, nil
22627 }
22628
22629 type ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall struct {
22630 s *Service
22631 resource string
22632 setiampolicyrequest *SetIamPolicyRequest
22633 urlParams_ gensupport.URLParams
22634 ctx_ context.Context
22635 header_ http.Header
22636 }
22637
22638 // SetIamPolicy: Sets the access control policy on the specified resource.
22639 // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
22640 // and `PERMISSION_DENIED` errors.
22641 //
22642 // - resource: REQUIRED: The resource for which the policy is being specified.
22643 // See Resource names (https://cloud.google.com/apis/design/resource_names)
22644 // for the appropriate value for this field.
22645 func (r *ProjectsLocationsDatasetsHl7V2StoresService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall {
22646 c := &ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22647 c.resource = resource
22648 c.setiampolicyrequest = setiampolicyrequest
22649 return c
22650 }
22651
22652 // Fields allows partial responses to be retrieved. See
22653 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
22654 // details.
22655 func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall {
22656 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22657 return c
22658 }
22659
22660 // Context sets the context to be used in this call's Do method.
22661 func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall {
22662 c.ctx_ = ctx
22663 return c
22664 }
22665
22666 // Header returns a http.Header that can be modified by the caller to add
22667 // headers to the request.
22668 func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) Header() http.Header {
22669 if c.header_ == nil {
22670 c.header_ = make(http.Header)
22671 }
22672 return c.header_
22673 }
22674
22675 func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
22676 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
22677 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest)
22678 if err != nil {
22679 return nil, err
22680 }
22681 c.urlParams_.Set("alt", alt)
22682 c.urlParams_.Set("prettyPrint", "false")
22683 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
22684 urls += "?" + c.urlParams_.Encode()
22685 req, err := http.NewRequest("POST", urls, body)
22686 if err != nil {
22687 return nil, err
22688 }
22689 req.Header = reqHeaders
22690 googleapi.Expand(req.URL, map[string]string{
22691 "resource": c.resource,
22692 })
22693 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes()))
22694 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22695 }
22696
22697 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.setIamPolicy" call.
22698 // Any non-2xx status code is an error. Response headers are in either
22699 // *Policy.ServerResponse.Header or (if a response was returned at all) in
22700 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
22701 // whether the returned error was because http.StatusNotModified was returned.
22702 func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
22703 gensupport.SetOptions(c.urlParams_, opts...)
22704 res, err := c.doRequest("json")
22705 if res != nil && res.StatusCode == http.StatusNotModified {
22706 if res.Body != nil {
22707 res.Body.Close()
22708 }
22709 return nil, gensupport.WrapError(&googleapi.Error{
22710 Code: res.StatusCode,
22711 Header: res.Header,
22712 })
22713 }
22714 if err != nil {
22715 return nil, err
22716 }
22717 defer googleapi.CloseBody(res)
22718 if err := googleapi.CheckResponse(res); err != nil {
22719 return nil, gensupport.WrapError(err)
22720 }
22721 ret := &Policy{
22722 ServerResponse: googleapi.ServerResponse{
22723 Header: res.Header,
22724 HTTPStatusCode: res.StatusCode,
22725 },
22726 }
22727 target := &ret
22728 b, err := gensupport.DecodeResponseBytes(target, res)
22729 if err != nil {
22730 return nil, err
22731 }
22732 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.setIamPolicy", "response", internallog.HTTPResponse(res, b))
22733 return ret, nil
22734 }
22735
22736 type ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall struct {
22737 s *Service
22738 resource string
22739 testiampermissionsrequest *TestIamPermissionsRequest
22740 urlParams_ gensupport.URLParams
22741 ctx_ context.Context
22742 header_ http.Header
22743 }
22744
22745 // TestIamPermissions: Returns permissions that a caller has on the specified
22746 // resource. If the resource does not exist, this will return an empty set of
22747 // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
22748 // used for building permission-aware UIs and command-line tools, not for
22749 // authorization checking. This operation may "fail open" without warning.
22750 //
22751 // - resource: REQUIRED: The resource for which the policy detail is being
22752 // requested. See Resource names
22753 // (https://cloud.google.com/apis/design/resource_names) for the appropriate
22754 // value for this field.
22755 func (r *ProjectsLocationsDatasetsHl7V2StoresService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall {
22756 c := &ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22757 c.resource = resource
22758 c.testiampermissionsrequest = testiampermissionsrequest
22759 return c
22760 }
22761
22762 // Fields allows partial responses to be retrieved. See
22763 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
22764 // details.
22765 func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall {
22766 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22767 return c
22768 }
22769
22770 // Context sets the context to be used in this call's Do method.
22771 func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall {
22772 c.ctx_ = ctx
22773 return c
22774 }
22775
22776 // Header returns a http.Header that can be modified by the caller to add
22777 // headers to the request.
22778 func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) Header() http.Header {
22779 if c.header_ == nil {
22780 c.header_ = make(http.Header)
22781 }
22782 return c.header_
22783 }
22784
22785 func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
22786 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
22787 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest)
22788 if err != nil {
22789 return nil, err
22790 }
22791 c.urlParams_.Set("alt", alt)
22792 c.urlParams_.Set("prettyPrint", "false")
22793 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
22794 urls += "?" + c.urlParams_.Encode()
22795 req, err := http.NewRequest("POST", urls, body)
22796 if err != nil {
22797 return nil, err
22798 }
22799 req.Header = reqHeaders
22800 googleapi.Expand(req.URL, map[string]string{
22801 "resource": c.resource,
22802 })
22803 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes()))
22804 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22805 }
22806
22807 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.testIamPermissions" call.
22808 // Any non-2xx status code is an error. Response headers are in either
22809 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
22810 // returned at all) in error.(*googleapi.Error).Header. Use
22811 // googleapi.IsNotModified to check whether the returned error was because
22812 // http.StatusNotModified was returned.
22813 func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
22814 gensupport.SetOptions(c.urlParams_, opts...)
22815 res, err := c.doRequest("json")
22816 if res != nil && res.StatusCode == http.StatusNotModified {
22817 if res.Body != nil {
22818 res.Body.Close()
22819 }
22820 return nil, gensupport.WrapError(&googleapi.Error{
22821 Code: res.StatusCode,
22822 Header: res.Header,
22823 })
22824 }
22825 if err != nil {
22826 return nil, err
22827 }
22828 defer googleapi.CloseBody(res)
22829 if err := googleapi.CheckResponse(res); err != nil {
22830 return nil, gensupport.WrapError(err)
22831 }
22832 ret := &TestIamPermissionsResponse{
22833 ServerResponse: googleapi.ServerResponse{
22834 Header: res.Header,
22835 HTTPStatusCode: res.StatusCode,
22836 },
22837 }
22838 target := &ret
22839 b, err := gensupport.DecodeResponseBytes(target, res)
22840 if err != nil {
22841 return nil, err
22842 }
22843 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.testIamPermissions", "response", internallog.HTTPResponse(res, b))
22844 return ret, nil
22845 }
22846
22847 type ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall struct {
22848 s *Service
22849 parent string
22850 createmessagerequest *CreateMessageRequest
22851 urlParams_ gensupport.URLParams
22852 ctx_ context.Context
22853 header_ http.Header
22854 }
22855
22856 // Create: Parses and stores an HL7v2 message. This method triggers an
22857 // asynchronous notification to any Pub/Sub topic configured in
22858 // Hl7V2Store.Hl7V2NotificationConfig, if the filtering matches the message. If
22859 // an MLLP adapter is configured to listen to a Pub/Sub topic, the adapter
22860 // transmits the message when a notification is received.
22861 //
22862 // - parent: The name of the HL7v2 store this message belongs to.
22863 func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) Create(parent string, createmessagerequest *CreateMessageRequest) *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall {
22864 c := &ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22865 c.parent = parent
22866 c.createmessagerequest = createmessagerequest
22867 return c
22868 }
22869
22870 // Fields allows partial responses to be retrieved. See
22871 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
22872 // details.
22873 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall {
22874 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22875 return c
22876 }
22877
22878 // Context sets the context to be used in this call's Do method.
22879 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall {
22880 c.ctx_ = ctx
22881 return c
22882 }
22883
22884 // Header returns a http.Header that can be modified by the caller to add
22885 // headers to the request.
22886 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall) Header() http.Header {
22887 if c.header_ == nil {
22888 c.header_ = make(http.Header)
22889 }
22890 return c.header_
22891 }
22892
22893 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall) doRequest(alt string) (*http.Response, error) {
22894 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
22895 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.createmessagerequest)
22896 if err != nil {
22897 return nil, err
22898 }
22899 c.urlParams_.Set("alt", alt)
22900 c.urlParams_.Set("prettyPrint", "false")
22901 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/messages")
22902 urls += "?" + c.urlParams_.Encode()
22903 req, err := http.NewRequest("POST", urls, body)
22904 if err != nil {
22905 return nil, err
22906 }
22907 req.Header = reqHeaders
22908 googleapi.Expand(req.URL, map[string]string{
22909 "parent": c.parent,
22910 })
22911 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.messages.create", "request", internallog.HTTPRequest(req, body.Bytes()))
22912 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22913 }
22914
22915 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.create" call.
22916 // Any non-2xx status code is an error. Response headers are in either
22917 // *Message.ServerResponse.Header or (if a response was returned at all) in
22918 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
22919 // whether the returned error was because http.StatusNotModified was returned.
22920 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall) Do(opts ...googleapi.CallOption) (*Message, error) {
22921 gensupport.SetOptions(c.urlParams_, opts...)
22922 res, err := c.doRequest("json")
22923 if res != nil && res.StatusCode == http.StatusNotModified {
22924 if res.Body != nil {
22925 res.Body.Close()
22926 }
22927 return nil, gensupport.WrapError(&googleapi.Error{
22928 Code: res.StatusCode,
22929 Header: res.Header,
22930 })
22931 }
22932 if err != nil {
22933 return nil, err
22934 }
22935 defer googleapi.CloseBody(res)
22936 if err := googleapi.CheckResponse(res); err != nil {
22937 return nil, gensupport.WrapError(err)
22938 }
22939 ret := &Message{
22940 ServerResponse: googleapi.ServerResponse{
22941 Header: res.Header,
22942 HTTPStatusCode: res.StatusCode,
22943 },
22944 }
22945 target := &ret
22946 b, err := gensupport.DecodeResponseBytes(target, res)
22947 if err != nil {
22948 return nil, err
22949 }
22950 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.messages.create", "response", internallog.HTTPResponse(res, b))
22951 return ret, nil
22952 }
22953
22954 type ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall struct {
22955 s *Service
22956 name string
22957 urlParams_ gensupport.URLParams
22958 ctx_ context.Context
22959 header_ http.Header
22960 }
22961
22962 // Delete: Deletes an HL7v2 message.
22963 //
22964 // - name: The resource name of the HL7v2 message to delete.
22965 func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) Delete(name string) *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall {
22966 c := &ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22967 c.name = name
22968 return c
22969 }
22970
22971 // Fields allows partial responses to be retrieved. See
22972 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
22973 // details.
22974 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall {
22975 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22976 return c
22977 }
22978
22979 // Context sets the context to be used in this call's Do method.
22980 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall {
22981 c.ctx_ = ctx
22982 return c
22983 }
22984
22985 // Header returns a http.Header that can be modified by the caller to add
22986 // headers to the request.
22987 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall) Header() http.Header {
22988 if c.header_ == nil {
22989 c.header_ = make(http.Header)
22990 }
22991 return c.header_
22992 }
22993
22994 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall) doRequest(alt string) (*http.Response, error) {
22995 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
22996 c.urlParams_.Set("alt", alt)
22997 c.urlParams_.Set("prettyPrint", "false")
22998 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
22999 urls += "?" + c.urlParams_.Encode()
23000 req, err := http.NewRequest("DELETE", urls, nil)
23001 if err != nil {
23002 return nil, err
23003 }
23004 req.Header = reqHeaders
23005 googleapi.Expand(req.URL, map[string]string{
23006 "name": c.name,
23007 })
23008 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.messages.delete", "request", internallog.HTTPRequest(req, nil))
23009 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23010 }
23011
23012 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.delete" call.
23013 // Any non-2xx status code is an error. Response headers are in either
23014 // *Empty.ServerResponse.Header or (if a response was returned at all) in
23015 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
23016 // whether the returned error was because http.StatusNotModified was returned.
23017 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
23018 gensupport.SetOptions(c.urlParams_, opts...)
23019 res, err := c.doRequest("json")
23020 if res != nil && res.StatusCode == http.StatusNotModified {
23021 if res.Body != nil {
23022 res.Body.Close()
23023 }
23024 return nil, gensupport.WrapError(&googleapi.Error{
23025 Code: res.StatusCode,
23026 Header: res.Header,
23027 })
23028 }
23029 if err != nil {
23030 return nil, err
23031 }
23032 defer googleapi.CloseBody(res)
23033 if err := googleapi.CheckResponse(res); err != nil {
23034 return nil, gensupport.WrapError(err)
23035 }
23036 ret := &Empty{
23037 ServerResponse: googleapi.ServerResponse{
23038 Header: res.Header,
23039 HTTPStatusCode: res.StatusCode,
23040 },
23041 }
23042 target := &ret
23043 b, err := gensupport.DecodeResponseBytes(target, res)
23044 if err != nil {
23045 return nil, err
23046 }
23047 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.messages.delete", "response", internallog.HTTPResponse(res, b))
23048 return ret, nil
23049 }
23050
23051 type ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall struct {
23052 s *Service
23053 name string
23054 urlParams_ gensupport.URLParams
23055 ifNoneMatch_ string
23056 ctx_ context.Context
23057 header_ http.Header
23058 }
23059
23060 // Get: Gets an HL7v2 message.
23061 //
23062 // - name: The resource name of the HL7v2 message to retrieve.
23063 func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) Get(name string) *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall {
23064 c := &ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23065 c.name = name
23066 return c
23067 }
23068
23069 // View sets the optional parameter "view": Specifies which parts of the
23070 // Message resource to return in the response. When unspecified, equivalent to
23071 // FULL.
23072 //
23073 // Possible values:
23074 //
23075 // "MESSAGE_VIEW_UNSPECIFIED" - Not specified, equivalent to FULL.
23076 // "RAW_ONLY" - Server responses include all the message fields except
23077 //
23078 // parsed_data field, and schematized_data fields.
23079 //
23080 // "PARSED_ONLY" - Server responses include all the message fields except
23081 //
23082 // data field, and schematized_data fields.
23083 //
23084 // "FULL" - Server responses include all the message fields.
23085 // "SCHEMATIZED_ONLY" - Server responses include all the message fields
23086 //
23087 // except data and parsed_data fields.
23088 //
23089 // "BASIC" - Server responses include only the name field.
23090 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) View(view string) *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall {
23091 c.urlParams_.Set("view", view)
23092 return c
23093 }
23094
23095 // Fields allows partial responses to be retrieved. See
23096 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
23097 // details.
23098 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall {
23099 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23100 return c
23101 }
23102
23103 // IfNoneMatch sets an optional parameter which makes the operation fail if the
23104 // object's ETag matches the given value. This is useful for getting updates
23105 // only after the object has changed since the last request.
23106 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall {
23107 c.ifNoneMatch_ = entityTag
23108 return c
23109 }
23110
23111 // Context sets the context to be used in this call's Do method.
23112 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall {
23113 c.ctx_ = ctx
23114 return c
23115 }
23116
23117 // Header returns a http.Header that can be modified by the caller to add
23118 // headers to the request.
23119 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) Header() http.Header {
23120 if c.header_ == nil {
23121 c.header_ = make(http.Header)
23122 }
23123 return c.header_
23124 }
23125
23126 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) doRequest(alt string) (*http.Response, error) {
23127 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
23128 if c.ifNoneMatch_ != "" {
23129 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23130 }
23131 c.urlParams_.Set("alt", alt)
23132 c.urlParams_.Set("prettyPrint", "false")
23133 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
23134 urls += "?" + c.urlParams_.Encode()
23135 req, err := http.NewRequest("GET", urls, nil)
23136 if err != nil {
23137 return nil, err
23138 }
23139 req.Header = reqHeaders
23140 googleapi.Expand(req.URL, map[string]string{
23141 "name": c.name,
23142 })
23143 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.messages.get", "request", internallog.HTTPRequest(req, nil))
23144 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23145 }
23146
23147 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.get" call.
23148 // Any non-2xx status code is an error. Response headers are in either
23149 // *Message.ServerResponse.Header or (if a response was returned at all) in
23150 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
23151 // whether the returned error was because http.StatusNotModified was returned.
23152 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) Do(opts ...googleapi.CallOption) (*Message, error) {
23153 gensupport.SetOptions(c.urlParams_, opts...)
23154 res, err := c.doRequest("json")
23155 if res != nil && res.StatusCode == http.StatusNotModified {
23156 if res.Body != nil {
23157 res.Body.Close()
23158 }
23159 return nil, gensupport.WrapError(&googleapi.Error{
23160 Code: res.StatusCode,
23161 Header: res.Header,
23162 })
23163 }
23164 if err != nil {
23165 return nil, err
23166 }
23167 defer googleapi.CloseBody(res)
23168 if err := googleapi.CheckResponse(res); err != nil {
23169 return nil, gensupport.WrapError(err)
23170 }
23171 ret := &Message{
23172 ServerResponse: googleapi.ServerResponse{
23173 Header: res.Header,
23174 HTTPStatusCode: res.StatusCode,
23175 },
23176 }
23177 target := &ret
23178 b, err := gensupport.DecodeResponseBytes(target, res)
23179 if err != nil {
23180 return nil, err
23181 }
23182 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.messages.get", "response", internallog.HTTPResponse(res, b))
23183 return ret, nil
23184 }
23185
23186 type ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall struct {
23187 s *Service
23188 parent string
23189 ingestmessagerequest *IngestMessageRequest
23190 urlParams_ gensupport.URLParams
23191 ctx_ context.Context
23192 header_ http.Header
23193 }
23194
23195 // Ingest: Parses and stores an HL7v2 message. This method triggers an
23196 // asynchronous notification to any Pub/Sub topic configured in
23197 // Hl7V2Store.Hl7V2NotificationConfig, if the filtering matches the message. If
23198 // an MLLP adapter is configured to listen to a Pub/Sub topic, the adapter
23199 // transmits the message when a notification is received. If the method is
23200 // successful, it generates a response containing an HL7v2 acknowledgment
23201 // (`ACK`) message. If the method encounters an error, it returns a negative
23202 // acknowledgment (`NACK`) message. This behavior is suitable for replying to
23203 // HL7v2 interface systems that expect these acknowledgments.
23204 //
23205 // - parent: The name of the HL7v2 store this message belongs to.
23206 func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) Ingest(parent string, ingestmessagerequest *IngestMessageRequest) *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall {
23207 c := &ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23208 c.parent = parent
23209 c.ingestmessagerequest = ingestmessagerequest
23210 return c
23211 }
23212
23213 // Fields allows partial responses to be retrieved. See
23214 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
23215 // details.
23216 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall {
23217 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23218 return c
23219 }
23220
23221 // Context sets the context to be used in this call's Do method.
23222 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall {
23223 c.ctx_ = ctx
23224 return c
23225 }
23226
23227 // Header returns a http.Header that can be modified by the caller to add
23228 // headers to the request.
23229 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall) Header() http.Header {
23230 if c.header_ == nil {
23231 c.header_ = make(http.Header)
23232 }
23233 return c.header_
23234 }
23235
23236 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall) doRequest(alt string) (*http.Response, error) {
23237 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
23238 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.ingestmessagerequest)
23239 if err != nil {
23240 return nil, err
23241 }
23242 c.urlParams_.Set("alt", alt)
23243 c.urlParams_.Set("prettyPrint", "false")
23244 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/messages:ingest")
23245 urls += "?" + c.urlParams_.Encode()
23246 req, err := http.NewRequest("POST", urls, body)
23247 if err != nil {
23248 return nil, err
23249 }
23250 req.Header = reqHeaders
23251 googleapi.Expand(req.URL, map[string]string{
23252 "parent": c.parent,
23253 })
23254 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.messages.ingest", "request", internallog.HTTPRequest(req, body.Bytes()))
23255 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23256 }
23257
23258 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.ingest" call.
23259 // Any non-2xx status code is an error. Response headers are in either
23260 // *IngestMessageResponse.ServerResponse.Header or (if a response was returned
23261 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
23262 // check whether the returned error was because http.StatusNotModified was
23263 // returned.
23264 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall) Do(opts ...googleapi.CallOption) (*IngestMessageResponse, error) {
23265 gensupport.SetOptions(c.urlParams_, opts...)
23266 res, err := c.doRequest("json")
23267 if res != nil && res.StatusCode == http.StatusNotModified {
23268 if res.Body != nil {
23269 res.Body.Close()
23270 }
23271 return nil, gensupport.WrapError(&googleapi.Error{
23272 Code: res.StatusCode,
23273 Header: res.Header,
23274 })
23275 }
23276 if err != nil {
23277 return nil, err
23278 }
23279 defer googleapi.CloseBody(res)
23280 if err := googleapi.CheckResponse(res); err != nil {
23281 return nil, gensupport.WrapError(err)
23282 }
23283 ret := &IngestMessageResponse{
23284 ServerResponse: googleapi.ServerResponse{
23285 Header: res.Header,
23286 HTTPStatusCode: res.StatusCode,
23287 },
23288 }
23289 target := &ret
23290 b, err := gensupport.DecodeResponseBytes(target, res)
23291 if err != nil {
23292 return nil, err
23293 }
23294 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.messages.ingest", "response", internallog.HTTPResponse(res, b))
23295 return ret, nil
23296 }
23297
23298 type ProjectsLocationsDatasetsHl7V2StoresMessagesListCall struct {
23299 s *Service
23300 parent string
23301 urlParams_ gensupport.URLParams
23302 ifNoneMatch_ string
23303 ctx_ context.Context
23304 header_ http.Header
23305 }
23306
23307 // List: Lists all the messages in the given HL7v2 store with support for
23308 // filtering. Note: HL7v2 messages are indexed asynchronously, so there might
23309 // be a slight delay between the time a message is created and when it can be
23310 // found through a filter.
23311 //
23312 // - parent: Name of the HL7v2 store to retrieve messages from.
23313 func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) List(parent string) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall {
23314 c := &ProjectsLocationsDatasetsHl7V2StoresMessagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23315 c.parent = parent
23316 return c
23317 }
23318
23319 // Filter sets the optional parameter "filter": Restricts messages returned to
23320 // those matching a filter. The following syntax is available: * A string field
23321 // value can be written as text inside quotation marks, for example "query
23322 // text". The only valid relational operation for text fields is equality
23323 // (`=`), where text is searched within the field, rather than having the field
23324 // be equal to the text. For example, "Comment = great" returns messages with
23325 // `great` in the comment field. * A number field value can be written as an
23326 // integer, a decimal, or an exponential. The valid relational operators for
23327 // number fields are the equality operator (`=`), along with the less
23328 // than/greater than operators (`<`, `<=`, `>`, `>=`). Note that there is no
23329 // inequality (`!=`) operator. You can prepend the `NOT` operator to an
23330 // expression to negate it. * A date field value must be written in
23331 // `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format.
23332 // Leading zeros are required for one-digit months and days. The valid
23333 // relational operators for date fields are the equality operator (`=`) , along
23334 // with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that
23335 // there is no inequality (`!=`) operator. You can prepend the `NOT` operator
23336 // to an expression to negate it. * Multiple field query expressions can be
23337 // combined in one query by adding `AND` or `OR` operators between the
23338 // expressions. If a boolean operator appears within a quoted string, it is not
23339 // treated as special, it's just another part of the character string to be
23340 // matched. You can prepend the `NOT` operator to an expression to negate it.
23341 // Fields/functions available for filtering are: * `message_type`, from the
23342 // MSH-9.1 field. For example, `NOT message_type = "ADT". * `send_date` or
23343 // `sendDate`, the YYYY-MM-DD date the message was sent in the dataset's
23344 // time_zone, from the MSH-7 segment. For example, `send_date < "2017-01-02".
23345 // * `send_time`, the timestamp when the message was sent, using the RFC3339
23346 // time format for comparisons, from the MSH-7 segment. For example, `send_time
23347 // < "2017-01-02T00:00:00-05:00". * `create_time`, the timestamp when the
23348 // message was created in the HL7v2 store. Use the RFC3339 time format for
23349 // comparisons. For example, `create_time < "2017-01-02T00:00:00-05:00". *
23350 // `send_facility`, the care center that the message came from, from the MSH-4
23351 // segment. For example, `send_facility = "ABC". * `PatientId(value, type)`,
23352 // which matches if the message lists a patient having an ID of the given value
23353 // and type in the PID-2, PID-3, or PID-4 segments. For example,
23354 // `PatientId("123456", "MRN")`. * `labels.x`, a string value of the label with
23355 // key `x` as set using the Message.labels map. For example,
23356 // `labels."priority"="high". The operator `:*` can be used to assert the
23357 // existence of a label. For example, `labels."priority":*`.
23358 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Filter(filter string) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall {
23359 c.urlParams_.Set("filter", filter)
23360 return c
23361 }
23362
23363 // OrderBy sets the optional parameter "orderBy": Orders messages returned by
23364 // the specified order_by clause. Syntax:
23365 // https://cloud.google.com/apis/design/design_patterns#sorting_order Fields
23366 // available for ordering are: * `send_time`
23367 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) OrderBy(orderBy string) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall {
23368 c.urlParams_.Set("orderBy", orderBy)
23369 return c
23370 }
23371
23372 // PageSize sets the optional parameter "pageSize": Limit on the number of
23373 // messages to return in a single response. If not specified, 100 is used. May
23374 // not be larger than 1000.
23375 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall {
23376 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
23377 return c
23378 }
23379
23380 // PageToken sets the optional parameter "pageToken": The next_page_token value
23381 // returned from the previous List request, if any.
23382 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall {
23383 c.urlParams_.Set("pageToken", pageToken)
23384 return c
23385 }
23386
23387 // View sets the optional parameter "view": Specifies the parts of the Message
23388 // to return in the response. When unspecified, equivalent to BASIC. Setting
23389 // this to anything other than BASIC with a `page_size` larger than the default
23390 // can generate a large response, which impacts the performance of this method.
23391 //
23392 // Possible values:
23393 //
23394 // "MESSAGE_VIEW_UNSPECIFIED" - Not specified, equivalent to FULL.
23395 // "RAW_ONLY" - Server responses include all the message fields except
23396 //
23397 // parsed_data field, and schematized_data fields.
23398 //
23399 // "PARSED_ONLY" - Server responses include all the message fields except
23400 //
23401 // data field, and schematized_data fields.
23402 //
23403 // "FULL" - Server responses include all the message fields.
23404 // "SCHEMATIZED_ONLY" - Server responses include all the message fields
23405 //
23406 // except data and parsed_data fields.
23407 //
23408 // "BASIC" - Server responses include only the name field.
23409 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) View(view string) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall {
23410 c.urlParams_.Set("view", view)
23411 return c
23412 }
23413
23414 // Fields allows partial responses to be retrieved. See
23415 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
23416 // details.
23417 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall {
23418 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23419 return c
23420 }
23421
23422 // IfNoneMatch sets an optional parameter which makes the operation fail if the
23423 // object's ETag matches the given value. This is useful for getting updates
23424 // only after the object has changed since the last request.
23425 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall {
23426 c.ifNoneMatch_ = entityTag
23427 return c
23428 }
23429
23430 // Context sets the context to be used in this call's Do method.
23431 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall {
23432 c.ctx_ = ctx
23433 return c
23434 }
23435
23436 // Header returns a http.Header that can be modified by the caller to add
23437 // headers to the request.
23438 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Header() http.Header {
23439 if c.header_ == nil {
23440 c.header_ = make(http.Header)
23441 }
23442 return c.header_
23443 }
23444
23445 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) doRequest(alt string) (*http.Response, error) {
23446 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
23447 if c.ifNoneMatch_ != "" {
23448 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23449 }
23450 c.urlParams_.Set("alt", alt)
23451 c.urlParams_.Set("prettyPrint", "false")
23452 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/messages")
23453 urls += "?" + c.urlParams_.Encode()
23454 req, err := http.NewRequest("GET", urls, nil)
23455 if err != nil {
23456 return nil, err
23457 }
23458 req.Header = reqHeaders
23459 googleapi.Expand(req.URL, map[string]string{
23460 "parent": c.parent,
23461 })
23462 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.messages.list", "request", internallog.HTTPRequest(req, nil))
23463 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23464 }
23465
23466 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.list" call.
23467 // Any non-2xx status code is an error. Response headers are in either
23468 // *ListMessagesResponse.ServerResponse.Header or (if a response was returned
23469 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
23470 // check whether the returned error was because http.StatusNotModified was
23471 // returned.
23472 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Do(opts ...googleapi.CallOption) (*ListMessagesResponse, error) {
23473 gensupport.SetOptions(c.urlParams_, opts...)
23474 res, err := c.doRequest("json")
23475 if res != nil && res.StatusCode == http.StatusNotModified {
23476 if res.Body != nil {
23477 res.Body.Close()
23478 }
23479 return nil, gensupport.WrapError(&googleapi.Error{
23480 Code: res.StatusCode,
23481 Header: res.Header,
23482 })
23483 }
23484 if err != nil {
23485 return nil, err
23486 }
23487 defer googleapi.CloseBody(res)
23488 if err := googleapi.CheckResponse(res); err != nil {
23489 return nil, gensupport.WrapError(err)
23490 }
23491 ret := &ListMessagesResponse{
23492 ServerResponse: googleapi.ServerResponse{
23493 Header: res.Header,
23494 HTTPStatusCode: res.StatusCode,
23495 },
23496 }
23497 target := &ret
23498 b, err := gensupport.DecodeResponseBytes(target, res)
23499 if err != nil {
23500 return nil, err
23501 }
23502 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.messages.list", "response", internallog.HTTPResponse(res, b))
23503 return ret, nil
23504 }
23505
23506 // Pages invokes f for each page of results.
23507 // A non-nil error returned from f will halt the iteration.
23508 // The provided context supersedes any context provided to the Context method.
23509 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Pages(ctx context.Context, f func(*ListMessagesResponse) error) error {
23510 c.ctx_ = ctx
23511 defer c.PageToken(c.urlParams_.Get("pageToken"))
23512 for {
23513 x, err := c.Do()
23514 if err != nil {
23515 return err
23516 }
23517 if err := f(x); err != nil {
23518 return err
23519 }
23520 if x.NextPageToken == "" {
23521 return nil
23522 }
23523 c.PageToken(x.NextPageToken)
23524 }
23525 }
23526
23527 type ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall struct {
23528 s *Service
23529 name string
23530 message *Message
23531 urlParams_ gensupport.URLParams
23532 ctx_ context.Context
23533 header_ http.Header
23534 }
23535
23536 // Patch: Update the message. The contents of the message in Message.data and
23537 // data extracted from the contents such as Message.create_time cannot be
23538 // altered. Only the Message.labels field is allowed to be updated. The labels
23539 // in the request are merged with the existing set of labels. Existing labels
23540 // with the same keys are updated.
23541 //
23542 // - name: Output only. Resource name of the Message, of the form
23543 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2S
23544 // tores/{hl7_v2_store_id}/messages/{message_id}`.
23545 func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) Patch(name string, message *Message) *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall {
23546 c := &ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23547 c.name = name
23548 c.message = message
23549 return c
23550 }
23551
23552 // UpdateMask sets the optional parameter "updateMask": Required. The update
23553 // mask applies to the resource. For the `FieldMask` definition, see
23554 // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
23555 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall {
23556 c.urlParams_.Set("updateMask", updateMask)
23557 return c
23558 }
23559
23560 // Fields allows partial responses to be retrieved. See
23561 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
23562 // details.
23563 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall {
23564 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23565 return c
23566 }
23567
23568 // Context sets the context to be used in this call's Do method.
23569 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall {
23570 c.ctx_ = ctx
23571 return c
23572 }
23573
23574 // Header returns a http.Header that can be modified by the caller to add
23575 // headers to the request.
23576 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) Header() http.Header {
23577 if c.header_ == nil {
23578 c.header_ = make(http.Header)
23579 }
23580 return c.header_
23581 }
23582
23583 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) doRequest(alt string) (*http.Response, error) {
23584 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
23585 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.message)
23586 if err != nil {
23587 return nil, err
23588 }
23589 c.urlParams_.Set("alt", alt)
23590 c.urlParams_.Set("prettyPrint", "false")
23591 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
23592 urls += "?" + c.urlParams_.Encode()
23593 req, err := http.NewRequest("PATCH", urls, body)
23594 if err != nil {
23595 return nil, err
23596 }
23597 req.Header = reqHeaders
23598 googleapi.Expand(req.URL, map[string]string{
23599 "name": c.name,
23600 })
23601 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.messages.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
23602 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23603 }
23604
23605 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.patch" call.
23606 // Any non-2xx status code is an error. Response headers are in either
23607 // *Message.ServerResponse.Header or (if a response was returned at all) in
23608 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
23609 // whether the returned error was because http.StatusNotModified was returned.
23610 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) Do(opts ...googleapi.CallOption) (*Message, error) {
23611 gensupport.SetOptions(c.urlParams_, opts...)
23612 res, err := c.doRequest("json")
23613 if res != nil && res.StatusCode == http.StatusNotModified {
23614 if res.Body != nil {
23615 res.Body.Close()
23616 }
23617 return nil, gensupport.WrapError(&googleapi.Error{
23618 Code: res.StatusCode,
23619 Header: res.Header,
23620 })
23621 }
23622 if err != nil {
23623 return nil, err
23624 }
23625 defer googleapi.CloseBody(res)
23626 if err := googleapi.CheckResponse(res); err != nil {
23627 return nil, gensupport.WrapError(err)
23628 }
23629 ret := &Message{
23630 ServerResponse: googleapi.ServerResponse{
23631 Header: res.Header,
23632 HTTPStatusCode: res.StatusCode,
23633 },
23634 }
23635 target := &ret
23636 b, err := gensupport.DecodeResponseBytes(target, res)
23637 if err != nil {
23638 return nil, err
23639 }
23640 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.messages.patch", "response", internallog.HTTPResponse(res, b))
23641 return ret, nil
23642 }
23643
23644 type ProjectsLocationsDatasetsOperationsCancelCall struct {
23645 s *Service
23646 name string
23647 canceloperationrequest *CancelOperationRequest
23648 urlParams_ gensupport.URLParams
23649 ctx_ context.Context
23650 header_ http.Header
23651 }
23652
23653 // Cancel: Starts asynchronous cancellation on a long-running operation. The
23654 // server makes a best effort to cancel the operation, but success is not
23655 // guaranteed. If the server doesn't support this method, it returns
23656 // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
23657 // other methods to check whether the cancellation succeeded or whether the
23658 // operation completed despite cancellation. On successful cancellation, the
23659 // operation is not deleted; instead, it becomes an operation with an
23660 // Operation.error value with a google.rpc.Status.code of `1`, corresponding to
23661 // `Code.CANCELLED`.
23662 //
23663 // - name: The name of the operation resource to be cancelled.
23664 func (r *ProjectsLocationsDatasetsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsDatasetsOperationsCancelCall {
23665 c := &ProjectsLocationsDatasetsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23666 c.name = name
23667 c.canceloperationrequest = canceloperationrequest
23668 return c
23669 }
23670
23671 // Fields allows partial responses to be retrieved. See
23672 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
23673 // details.
23674 func (c *ProjectsLocationsDatasetsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsCancelCall {
23675 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23676 return c
23677 }
23678
23679 // Context sets the context to be used in this call's Do method.
23680 func (c *ProjectsLocationsDatasetsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsCancelCall {
23681 c.ctx_ = ctx
23682 return c
23683 }
23684
23685 // Header returns a http.Header that can be modified by the caller to add
23686 // headers to the request.
23687 func (c *ProjectsLocationsDatasetsOperationsCancelCall) Header() http.Header {
23688 if c.header_ == nil {
23689 c.header_ = make(http.Header)
23690 }
23691 return c.header_
23692 }
23693
23694 func (c *ProjectsLocationsDatasetsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
23695 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
23696 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.canceloperationrequest)
23697 if err != nil {
23698 return nil, err
23699 }
23700 c.urlParams_.Set("alt", alt)
23701 c.urlParams_.Set("prettyPrint", "false")
23702 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
23703 urls += "?" + c.urlParams_.Encode()
23704 req, err := http.NewRequest("POST", urls, body)
23705 if err != nil {
23706 return nil, err
23707 }
23708 req.Header = reqHeaders
23709 googleapi.Expand(req.URL, map[string]string{
23710 "name": c.name,
23711 })
23712 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.operations.cancel", "request", internallog.HTTPRequest(req, body.Bytes()))
23713 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23714 }
23715
23716 // Do executes the "healthcare.projects.locations.datasets.operations.cancel" call.
23717 // Any non-2xx status code is an error. Response headers are in either
23718 // *Empty.ServerResponse.Header or (if a response was returned at all) in
23719 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
23720 // whether the returned error was because http.StatusNotModified was returned.
23721 func (c *ProjectsLocationsDatasetsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
23722 gensupport.SetOptions(c.urlParams_, opts...)
23723 res, err := c.doRequest("json")
23724 if res != nil && res.StatusCode == http.StatusNotModified {
23725 if res.Body != nil {
23726 res.Body.Close()
23727 }
23728 return nil, gensupport.WrapError(&googleapi.Error{
23729 Code: res.StatusCode,
23730 Header: res.Header,
23731 })
23732 }
23733 if err != nil {
23734 return nil, err
23735 }
23736 defer googleapi.CloseBody(res)
23737 if err := googleapi.CheckResponse(res); err != nil {
23738 return nil, gensupport.WrapError(err)
23739 }
23740 ret := &Empty{
23741 ServerResponse: googleapi.ServerResponse{
23742 Header: res.Header,
23743 HTTPStatusCode: res.StatusCode,
23744 },
23745 }
23746 target := &ret
23747 b, err := gensupport.DecodeResponseBytes(target, res)
23748 if err != nil {
23749 return nil, err
23750 }
23751 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.operations.cancel", "response", internallog.HTTPResponse(res, b))
23752 return ret, nil
23753 }
23754
23755 type ProjectsLocationsDatasetsOperationsGetCall struct {
23756 s *Service
23757 name string
23758 urlParams_ gensupport.URLParams
23759 ifNoneMatch_ string
23760 ctx_ context.Context
23761 header_ http.Header
23762 }
23763
23764 // Get: Gets the latest state of a long-running operation. Clients can use this
23765 // method to poll the operation result at intervals as recommended by the API
23766 // service.
23767 //
23768 // - name: The name of the operation resource.
23769 func (r *ProjectsLocationsDatasetsOperationsService) Get(name string) *ProjectsLocationsDatasetsOperationsGetCall {
23770 c := &ProjectsLocationsDatasetsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23771 c.name = name
23772 return c
23773 }
23774
23775 // Fields allows partial responses to be retrieved. See
23776 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
23777 // details.
23778 func (c *ProjectsLocationsDatasetsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsGetCall {
23779 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23780 return c
23781 }
23782
23783 // IfNoneMatch sets an optional parameter which makes the operation fail if the
23784 // object's ETag matches the given value. This is useful for getting updates
23785 // only after the object has changed since the last request.
23786 func (c *ProjectsLocationsDatasetsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsOperationsGetCall {
23787 c.ifNoneMatch_ = entityTag
23788 return c
23789 }
23790
23791 // Context sets the context to be used in this call's Do method.
23792 func (c *ProjectsLocationsDatasetsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsGetCall {
23793 c.ctx_ = ctx
23794 return c
23795 }
23796
23797 // Header returns a http.Header that can be modified by the caller to add
23798 // headers to the request.
23799 func (c *ProjectsLocationsDatasetsOperationsGetCall) Header() http.Header {
23800 if c.header_ == nil {
23801 c.header_ = make(http.Header)
23802 }
23803 return c.header_
23804 }
23805
23806 func (c *ProjectsLocationsDatasetsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
23807 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
23808 if c.ifNoneMatch_ != "" {
23809 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23810 }
23811 c.urlParams_.Set("alt", alt)
23812 c.urlParams_.Set("prettyPrint", "false")
23813 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
23814 urls += "?" + c.urlParams_.Encode()
23815 req, err := http.NewRequest("GET", urls, nil)
23816 if err != nil {
23817 return nil, err
23818 }
23819 req.Header = reqHeaders
23820 googleapi.Expand(req.URL, map[string]string{
23821 "name": c.name,
23822 })
23823 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.operations.get", "request", internallog.HTTPRequest(req, nil))
23824 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23825 }
23826
23827 // Do executes the "healthcare.projects.locations.datasets.operations.get" call.
23828 // Any non-2xx status code is an error. Response headers are in either
23829 // *Operation.ServerResponse.Header or (if a response was returned at all) in
23830 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
23831 // whether the returned error was because http.StatusNotModified was returned.
23832 func (c *ProjectsLocationsDatasetsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
23833 gensupport.SetOptions(c.urlParams_, opts...)
23834 res, err := c.doRequest("json")
23835 if res != nil && res.StatusCode == http.StatusNotModified {
23836 if res.Body != nil {
23837 res.Body.Close()
23838 }
23839 return nil, gensupport.WrapError(&googleapi.Error{
23840 Code: res.StatusCode,
23841 Header: res.Header,
23842 })
23843 }
23844 if err != nil {
23845 return nil, err
23846 }
23847 defer googleapi.CloseBody(res)
23848 if err := googleapi.CheckResponse(res); err != nil {
23849 return nil, gensupport.WrapError(err)
23850 }
23851 ret := &Operation{
23852 ServerResponse: googleapi.ServerResponse{
23853 Header: res.Header,
23854 HTTPStatusCode: res.StatusCode,
23855 },
23856 }
23857 target := &ret
23858 b, err := gensupport.DecodeResponseBytes(target, res)
23859 if err != nil {
23860 return nil, err
23861 }
23862 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.operations.get", "response", internallog.HTTPResponse(res, b))
23863 return ret, nil
23864 }
23865
23866 type ProjectsLocationsDatasetsOperationsListCall struct {
23867 s *Service
23868 name string
23869 urlParams_ gensupport.URLParams
23870 ifNoneMatch_ string
23871 ctx_ context.Context
23872 header_ http.Header
23873 }
23874
23875 // List: Lists operations that match the specified filter in the request. If
23876 // the server doesn't support this method, it returns `UNIMPLEMENTED`.
23877 //
23878 // - name: The name of the operation's parent resource.
23879 func (r *ProjectsLocationsDatasetsOperationsService) List(name string) *ProjectsLocationsDatasetsOperationsListCall {
23880 c := &ProjectsLocationsDatasetsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23881 c.name = name
23882 return c
23883 }
23884
23885 // Filter sets the optional parameter "filter": The standard list filter.
23886 func (c *ProjectsLocationsDatasetsOperationsListCall) Filter(filter string) *ProjectsLocationsDatasetsOperationsListCall {
23887 c.urlParams_.Set("filter", filter)
23888 return c
23889 }
23890
23891 // PageSize sets the optional parameter "pageSize": The standard list page
23892 // size.
23893 func (c *ProjectsLocationsDatasetsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsOperationsListCall {
23894 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
23895 return c
23896 }
23897
23898 // PageToken sets the optional parameter "pageToken": The standard list page
23899 // token.
23900 func (c *ProjectsLocationsDatasetsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsOperationsListCall {
23901 c.urlParams_.Set("pageToken", pageToken)
23902 return c
23903 }
23904
23905 // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess":
23906 // When set to `true`, operations that are reachable are returned as normal,
23907 // and those that are unreachable are returned in the
23908 // ListOperationsResponse.unreachable field. This can only be `true` when
23909 // reading across collections. For example, when `parent` is set to
23910 // "projects/example/locations/-". This field is not supported by default and
23911 // will result in an `UNIMPLEMENTED` error if set unless explicitly documented
23912 // otherwise in service or product specific documentation.
23913 func (c *ProjectsLocationsDatasetsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsDatasetsOperationsListCall {
23914 c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess))
23915 return c
23916 }
23917
23918 // Fields allows partial responses to be retrieved. See
23919 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
23920 // details.
23921 func (c *ProjectsLocationsDatasetsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsListCall {
23922 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23923 return c
23924 }
23925
23926 // IfNoneMatch sets an optional parameter which makes the operation fail if the
23927 // object's ETag matches the given value. This is useful for getting updates
23928 // only after the object has changed since the last request.
23929 func (c *ProjectsLocationsDatasetsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsOperationsListCall {
23930 c.ifNoneMatch_ = entityTag
23931 return c
23932 }
23933
23934 // Context sets the context to be used in this call's Do method.
23935 func (c *ProjectsLocationsDatasetsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsListCall {
23936 c.ctx_ = ctx
23937 return c
23938 }
23939
23940 // Header returns a http.Header that can be modified by the caller to add
23941 // headers to the request.
23942 func (c *ProjectsLocationsDatasetsOperationsListCall) Header() http.Header {
23943 if c.header_ == nil {
23944 c.header_ = make(http.Header)
23945 }
23946 return c.header_
23947 }
23948
23949 func (c *ProjectsLocationsDatasetsOperationsListCall) doRequest(alt string) (*http.Response, error) {
23950 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
23951 if c.ifNoneMatch_ != "" {
23952 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23953 }
23954 c.urlParams_.Set("alt", alt)
23955 c.urlParams_.Set("prettyPrint", "false")
23956 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
23957 urls += "?" + c.urlParams_.Encode()
23958 req, err := http.NewRequest("GET", urls, nil)
23959 if err != nil {
23960 return nil, err
23961 }
23962 req.Header = reqHeaders
23963 googleapi.Expand(req.URL, map[string]string{
23964 "name": c.name,
23965 })
23966 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.operations.list", "request", internallog.HTTPRequest(req, nil))
23967 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23968 }
23969
23970 // Do executes the "healthcare.projects.locations.datasets.operations.list" call.
23971 // Any non-2xx status code is an error. Response headers are in either
23972 // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
23973 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
23974 // check whether the returned error was because http.StatusNotModified was
23975 // returned.
23976 func (c *ProjectsLocationsDatasetsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
23977 gensupport.SetOptions(c.urlParams_, opts...)
23978 res, err := c.doRequest("json")
23979 if res != nil && res.StatusCode == http.StatusNotModified {
23980 if res.Body != nil {
23981 res.Body.Close()
23982 }
23983 return nil, gensupport.WrapError(&googleapi.Error{
23984 Code: res.StatusCode,
23985 Header: res.Header,
23986 })
23987 }
23988 if err != nil {
23989 return nil, err
23990 }
23991 defer googleapi.CloseBody(res)
23992 if err := googleapi.CheckResponse(res); err != nil {
23993 return nil, gensupport.WrapError(err)
23994 }
23995 ret := &ListOperationsResponse{
23996 ServerResponse: googleapi.ServerResponse{
23997 Header: res.Header,
23998 HTTPStatusCode: res.StatusCode,
23999 },
24000 }
24001 target := &ret
24002 b, err := gensupport.DecodeResponseBytes(target, res)
24003 if err != nil {
24004 return nil, err
24005 }
24006 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.operations.list", "response", internallog.HTTPResponse(res, b))
24007 return ret, nil
24008 }
24009
24010 // Pages invokes f for each page of results.
24011 // A non-nil error returned from f will halt the iteration.
24012 // The provided context supersedes any context provided to the Context method.
24013 func (c *ProjectsLocationsDatasetsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
24014 c.ctx_ = ctx
24015 defer c.PageToken(c.urlParams_.Get("pageToken"))
24016 for {
24017 x, err := c.Do()
24018 if err != nil {
24019 return err
24020 }
24021 if err := f(x); err != nil {
24022 return err
24023 }
24024 if x.NextPageToken == "" {
24025 return nil
24026 }
24027 c.PageToken(x.NextPageToken)
24028 }
24029 }
24030
24031 type ProjectsLocationsServicesNlpAnalyzeEntitiesCall struct {
24032 s *Service
24033 nlpService string
24034 analyzeentitiesrequest *AnalyzeEntitiesRequest
24035 urlParams_ gensupport.URLParams
24036 ctx_ context.Context
24037 header_ http.Header
24038 }
24039
24040 // AnalyzeEntities: Analyze heathcare entity in a document. Its response
24041 // includes the recognized entity mentions and the relationships between them.
24042 // AnalyzeEntities uses context aware models to detect entities.
24043 //
24044 // - nlpService: The resource name of the service of the form:
24045 // "projects/{project_id}/locations/{location_id}/services/nlp".
24046 func (r *ProjectsLocationsServicesNlpService) AnalyzeEntities(nlpService string, analyzeentitiesrequest *AnalyzeEntitiesRequest) *ProjectsLocationsServicesNlpAnalyzeEntitiesCall {
24047 c := &ProjectsLocationsServicesNlpAnalyzeEntitiesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24048 c.nlpService = nlpService
24049 c.analyzeentitiesrequest = analyzeentitiesrequest
24050 return c
24051 }
24052
24053 // Fields allows partial responses to be retrieved. See
24054 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
24055 // details.
24056 func (c *ProjectsLocationsServicesNlpAnalyzeEntitiesCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesNlpAnalyzeEntitiesCall {
24057 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24058 return c
24059 }
24060
24061 // Context sets the context to be used in this call's Do method.
24062 func (c *ProjectsLocationsServicesNlpAnalyzeEntitiesCall) Context(ctx context.Context) *ProjectsLocationsServicesNlpAnalyzeEntitiesCall {
24063 c.ctx_ = ctx
24064 return c
24065 }
24066
24067 // Header returns a http.Header that can be modified by the caller to add
24068 // headers to the request.
24069 func (c *ProjectsLocationsServicesNlpAnalyzeEntitiesCall) Header() http.Header {
24070 if c.header_ == nil {
24071 c.header_ = make(http.Header)
24072 }
24073 return c.header_
24074 }
24075
24076 func (c *ProjectsLocationsServicesNlpAnalyzeEntitiesCall) doRequest(alt string) (*http.Response, error) {
24077 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
24078 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.analyzeentitiesrequest)
24079 if err != nil {
24080 return nil, err
24081 }
24082 c.urlParams_.Set("alt", alt)
24083 c.urlParams_.Set("prettyPrint", "false")
24084 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+nlpService}:analyzeEntities")
24085 urls += "?" + c.urlParams_.Encode()
24086 req, err := http.NewRequest("POST", urls, body)
24087 if err != nil {
24088 return nil, err
24089 }
24090 req.Header = reqHeaders
24091 googleapi.Expand(req.URL, map[string]string{
24092 "nlpService": c.nlpService,
24093 })
24094 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.services.nlp.analyzeEntities", "request", internallog.HTTPRequest(req, body.Bytes()))
24095 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24096 }
24097
24098 // Do executes the "healthcare.projects.locations.services.nlp.analyzeEntities" call.
24099 // Any non-2xx status code is an error. Response headers are in either
24100 // *AnalyzeEntitiesResponse.ServerResponse.Header or (if a response was
24101 // returned at all) in error.(*googleapi.Error).Header. Use
24102 // googleapi.IsNotModified to check whether the returned error was because
24103 // http.StatusNotModified was returned.
24104 func (c *ProjectsLocationsServicesNlpAnalyzeEntitiesCall) Do(opts ...googleapi.CallOption) (*AnalyzeEntitiesResponse, error) {
24105 gensupport.SetOptions(c.urlParams_, opts...)
24106 res, err := c.doRequest("json")
24107 if res != nil && res.StatusCode == http.StatusNotModified {
24108 if res.Body != nil {
24109 res.Body.Close()
24110 }
24111 return nil, gensupport.WrapError(&googleapi.Error{
24112 Code: res.StatusCode,
24113 Header: res.Header,
24114 })
24115 }
24116 if err != nil {
24117 return nil, err
24118 }
24119 defer googleapi.CloseBody(res)
24120 if err := googleapi.CheckResponse(res); err != nil {
24121 return nil, gensupport.WrapError(err)
24122 }
24123 ret := &AnalyzeEntitiesResponse{
24124 ServerResponse: googleapi.ServerResponse{
24125 Header: res.Header,
24126 HTTPStatusCode: res.StatusCode,
24127 },
24128 }
24129 target := &ret
24130 b, err := gensupport.DecodeResponseBytes(target, res)
24131 if err != nil {
24132 return nil, err
24133 }
24134 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.services.nlp.analyzeEntities", "response", internallog.HTTPResponse(res, b))
24135 return ret, nil
24136 }