Debian Codegraph @

healthcare/v1beta1/healthcare-gen.go

raw symbols SCIP
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/v1beta1"
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/v1beta1"
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:v1beta1"
98 const apiName = "healthcare"
99 const apiVersion = "v1beta1"
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 // Action: Specifies a selection of tags and an `Action` to apply to each one.
533 type Action struct {
534 // CleanImageTag: Inspect image and transform sensitive burnt-in text. Doesn't
535 // apply to elements nested in a sequence, which revert to `Keep`. Supported
536 // tags
537 // (https://dicom.nema.org/medical/dicom/2018e/output/chtml/part06/chapter_6.html):
538 // PixelData
539 CleanImageTag *ImageConfig `json:"cleanImageTag,omitempty"`
540 // CleanTextTag: Inspect text and transform sensitive text. Configurable via
541 // TextConfig. Supported Value Representations: AE, LO, LT, PN, SH, ST, UC, UT,
542 // DA, DT, AS
543 CleanTextTag *CleanTextTag `json:"cleanTextTag,omitempty"`
544 // DeleteTag: Delete tag.
545 DeleteTag *DeleteTag `json:"deleteTag,omitempty"`
546 // KeepTag: Keep tag unchanged.
547 KeepTag *KeepTag `json:"keepTag,omitempty"`
548 // Queries: Select all tags with the listed tag IDs, names, or Value
549 // Representations (VRs). Examples: ID: "00100010" Keyword: "PatientName" VR:
550 // "PN"
551 Queries []string `json:"queries,omitempty"`
552 // RecurseTag: Recursively apply DICOM de-id to tags nested in a sequence.
553 // Supported [Value Representation]
554 // (https://dicom.nema.org/medical/dicom/2018e/output/chtml/part05/sect_6.2.html#table_6.2-1):
555 // SQ
556 RecurseTag *RecurseTag `json:"recurseTag,omitempty"`
557 // RegenUidTag: Replace UID with a new generated UID. Supported [Value
558 // Representation]
559 // (https://dicom.nema.org/medical/dicom/2018e/output/chtml/part05/sect_6.2.html#table_6.2-1):
560 // UI
561 RegenUidTag *RegenUidTag `json:"regenUidTag,omitempty"`
562 // RemoveTag: Replace with empty tag.
563 RemoveTag *RemoveTag `json:"removeTag,omitempty"`
564 // ResetTag: Reset tag to a placeholder value.
565 ResetTag *ResetTag `json:"resetTag,omitempty"`
566 // ForceSendFields is a list of field names (e.g. "CleanImageTag") to
567 // unconditionally include in API requests. By default, fields with empty or
568 // default values are omitted from API requests. See
569 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
570 // details.
571 ForceSendFields []string `json:"-"`
572 // NullFields is a list of field names (e.g. "CleanImageTag") to include in API
573 // requests with the JSON null value. By default, fields with empty values are
574 // omitted from API requests. See
575 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
576 NullFields []string `json:"-"`
577 }
578
579 func (s Action) MarshalJSON() ([]byte, error) {
580 type NoMethod Action
581 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
582 }
583
584 // ActivateConsentRequest: Activates the latest revision of the specified
585 // Consent by committing a new revision with `state` updated to `ACTIVE`. If
586 // the latest revision of the given Consent is in the `ACTIVE` state, no new
587 // revision is committed. A FAILED_PRECONDITION error occurs if the latest
588 // revision of the given consent is in the `REJECTED` or `REVOKED` state.
589 type ActivateConsentRequest struct {
590 // ConsentArtifact: Required. The resource name of the Consent artifact that
591 // contains documentation of the user's consent, of the form
592 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentS
593 // tores/{consent_store_id}/consentArtifacts/{consent_artifact_id}`. If the
594 // draft Consent had a Consent artifact, this Consent artifact overwrites it.
595 ConsentArtifact string `json:"consentArtifact,omitempty"`
596 // ExpireTime: Timestamp in UTC of when this Consent is considered expired.
597 ExpireTime string `json:"expireTime,omitempty"`
598 // Ttl: The time to live for this Consent from when it is marked as active.
599 Ttl string `json:"ttl,omitempty"`
600 // ForceSendFields is a list of field names (e.g. "ConsentArtifact") to
601 // unconditionally include in API requests. By default, fields with empty or
602 // default values are omitted from API requests. See
603 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
604 // details.
605 ForceSendFields []string `json:"-"`
606 // NullFields is a list of field names (e.g. "ConsentArtifact") to include in
607 // API requests with the JSON null value. By default, fields with empty values
608 // are omitted from API requests. See
609 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
610 NullFields []string `json:"-"`
611 }
612
613 func (s ActivateConsentRequest) MarshalJSON() ([]byte, error) {
614 type NoMethod ActivateConsentRequest
615 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
616 }
617
618 // AdminConsents: List of admin Consent resources to be applied.
619 type AdminConsents struct {
620 // Names: The versioned names of the admin Consent resource(s), in the format
621 // `projects/{project_id}/locations/{location}/datasets/{dataset_id}/fhirStores/
622 // {fhir_store_id}/fhir/Consent/{resource_id}/_history/{version_id}`. For FHIR
623 // stores with `disable_resource_versioning=true`, the format is
624 // `projects/{project_id}/locations/{location}/datasets/{dataset_id}/fhirStores/
625 // {fhir_store_id}/fhir/Consent/{resource_id}`.
626 Names []string `json:"names,omitempty"`
627 // ForceSendFields is a list of field names (e.g. "Names") to unconditionally
628 // include in API requests. By default, fields with empty or default values are
629 // omitted from API requests. See
630 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
631 // details.
632 ForceSendFields []string `json:"-"`
633 // NullFields is a list of field names (e.g. "Names") to include in API
634 // requests with the JSON null value. By default, fields with empty values are
635 // omitted from API requests. See
636 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
637 NullFields []string `json:"-"`
638 }
639
640 func (s AdminConsents) MarshalJSON() ([]byte, error) {
641 type NoMethod AdminConsents
642 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
643 }
644
645 // AnalyzeEntitiesRequest: The request to analyze healthcare entities in a
646 // document.
647 type AnalyzeEntitiesRequest struct {
648 // AlternativeOutputFormat: Optional. Alternative output format to be generated
649 // based on the results of analysis.
650 //
651 // Possible values:
652 // "ALTERNATIVE_OUTPUT_FORMAT_UNSPECIFIED" - No alternative output format is
653 // specified.
654 // "FHIR_BUNDLE" - FHIR bundle output.
655 AlternativeOutputFormat string `json:"alternativeOutputFormat,omitempty"`
656 // DocumentContent: document_content is a document to be annotated.
657 DocumentContent string `json:"documentContent,omitempty"`
658 // LicensedVocabularies: A list of licensed vocabularies to use in the request,
659 // in addition to the default unlicensed vocabularies.
660 //
661 // Possible values:
662 // "LICENSED_VOCABULARY_UNSPECIFIED" - No licensed vocabulary specified.
663 // "ICD10CM" - ICD-10-CM vocabulary
664 // "SNOMEDCT_US" - SNOMED CT (US version) vocabulary
665 LicensedVocabularies []string `json:"licensedVocabularies,omitempty"`
666 // ForceSendFields is a list of field names (e.g. "AlternativeOutputFormat") to
667 // unconditionally include in API requests. By default, fields with empty or
668 // default values are omitted from API requests. See
669 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
670 // details.
671 ForceSendFields []string `json:"-"`
672 // NullFields is a list of field names (e.g. "AlternativeOutputFormat") to
673 // include in API requests with the JSON null value. By default, fields with
674 // empty values are omitted from API requests. See
675 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
676 NullFields []string `json:"-"`
677 }
678
679 func (s AnalyzeEntitiesRequest) MarshalJSON() ([]byte, error) {
680 type NoMethod AnalyzeEntitiesRequest
681 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
682 }
683
684 // AnalyzeEntitiesResponse: Includes recognized entity mentions and
685 // relationships between them.
686 type AnalyzeEntitiesResponse struct {
687 // Entities: The union of all the candidate entities that the entity_mentions
688 // in this response could link to. These are UMLS concepts or normalized
689 // mention content.
690 Entities []*Entity `json:"entities,omitempty"`
691 // EntityMentions: The `entity_mentions` field contains all the annotated
692 // medical entities that were mentioned in the provided document.
693 EntityMentions []*EntityMention `json:"entityMentions,omitempty"`
694 // FhirBundle: The FHIR bundle (`R4` (http://hl7.org/fhir/R4/bundle.html)) that
695 // includes all the entities, the entity mentions, and the relationships in
696 // JSON format.
697 FhirBundle string `json:"fhirBundle,omitempty"`
698 // Relationships: relationships contains all the binary relationships that were
699 // identified between entity mentions within the provided document.
700 Relationships []*EntityMentionRelationship `json:"relationships,omitempty"`
701
702 // ServerResponse contains the HTTP response code and headers from the server.
703 googleapi.ServerResponse `json:"-"`
704 // ForceSendFields is a list of field names (e.g. "Entities") to
705 // unconditionally include in API requests. By default, fields with empty or
706 // default values are omitted from API requests. See
707 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
708 // details.
709 ForceSendFields []string `json:"-"`
710 // NullFields is a list of field names (e.g. "Entities") to include in API
711 // requests with the JSON null value. By default, fields with empty values are
712 // omitted from API requests. See
713 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
714 NullFields []string `json:"-"`
715 }
716
717 func (s AnalyzeEntitiesResponse) MarshalJSON() ([]byte, error) {
718 type NoMethod AnalyzeEntitiesResponse
719 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
720 }
721
722 // ApplyAdminConsentsErrorDetail: Contains the error details of the unsupported
723 // admin Consent resources for when the ApplyAdminConsents method fails to
724 // apply one or more Consent resources.
725 type ApplyAdminConsentsErrorDetail struct {
726 // ConsentErrors: The list of Consent resources that are unsupported or cannot
727 // be applied and the error associated with each of them.
728 ConsentErrors []*ConsentErrors `json:"consentErrors,omitempty"`
729 // ExistingOperationId: The currently in progress non-validate-only
730 // ApplyAdminConsents operation ID if exist.
731 ExistingOperationId uint64 `json:"existingOperationId,omitempty,string"`
732 // ForceSendFields is a list of field names (e.g. "ConsentErrors") to
733 // unconditionally include in API requests. By default, fields with empty or
734 // default values are omitted from API requests. See
735 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
736 // details.
737 ForceSendFields []string `json:"-"`
738 // NullFields is a list of field names (e.g. "ConsentErrors") to include in API
739 // requests with the JSON null value. By default, fields with empty values are
740 // omitted from API requests. See
741 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
742 NullFields []string `json:"-"`
743 }
744
745 func (s ApplyAdminConsentsErrorDetail) MarshalJSON() ([]byte, error) {
746 type NoMethod ApplyAdminConsentsErrorDetail
747 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
748 }
749
750 // ApplyAdminConsentsRequest: Request to apply the admin Consent resources for
751 // the specified FHIR store.
752 type ApplyAdminConsentsRequest struct {
753 // NewConsentsList: A new list of admin Consent resources to be applied. Any
754 // existing enforced Consents, which are specified in
755 // `consent_config.enforced_admin_consents` of the FhirStore, that are not part
756 // of this list will be disabled. An empty list is equivalent to clearing or
757 // disabling all Consents enforced on the FHIR store. When a FHIR store has
758 // `disable_resource_versioning=true` and this list contains a Consent resource
759 // that exists in `consent_config.enforced_admin_consents`, the method enforces
760 // any updates to the existing resource since the last enforcement. If the
761 // existing resource hasn't been updated since the last enforcement, the
762 // resource is unaffected. After the method finishes, the resulting consent
763 // enforcement model is determined by the contents of the Consent resource(s)
764 // when the method was called: * When `disable_resource_versioning=true`, the
765 // result is identical to the current resource(s) in the FHIR store. * When
766 // `disable_resource_versioning=false`, the result is based on the historical
767 // version(s) of the Consent resource(s) at the point in time when the method
768 // was called. At most 200 Consents can be specified.
769 NewConsentsList *AdminConsents `json:"newConsentsList,omitempty"`
770 // ValidateOnly: If true, the method only validates Consent resources to make
771 // sure they are supported. Otherwise, the method applies the aggregate consent
772 // information to update the enforcement model and reindex the FHIR resources.
773 // If all Consent resources can be applied successfully, the
774 // ApplyAdminConsentsResponse is returned containing the following fields: *
775 // `consent_apply_success` to indicate the number of Consent resources applied.
776 // * `affected_resources` to indicate the number of resources that might have
777 // had their consent access changed. If, however, one or more Consent resources
778 // are unsupported or cannot be applied, the method fails and
779 // ApplyAdminConsentsErrorDetail is is returned with details about the
780 // unsupported Consent resources.
781 ValidateOnly bool `json:"validateOnly,omitempty"`
782 // ForceSendFields is a list of field names (e.g. "NewConsentsList") to
783 // unconditionally include in API requests. By default, fields with empty or
784 // default values are omitted from API requests. See
785 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
786 // details.
787 ForceSendFields []string `json:"-"`
788 // NullFields is a list of field names (e.g. "NewConsentsList") to include in
789 // API requests with the JSON null value. By default, fields with empty values
790 // are omitted from API requests. See
791 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
792 NullFields []string `json:"-"`
793 }
794
795 func (s ApplyAdminConsentsRequest) MarshalJSON() ([]byte, error) {
796 type NoMethod ApplyAdminConsentsRequest
797 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
798 }
799
800 // ApplyAdminConsentsResponse: Response when all admin Consent resources in
801 // scope were processed and all affected resources were reindexed successfully.
802 // This structure will be included in the response when the operation finishes
803 // successfully.
804 type ApplyAdminConsentsResponse struct {
805 // AffectedResources: The number of resources (including the Consent resources)
806 // that may have consent access change.
807 AffectedResources int64 `json:"affectedResources,omitempty,string"`
808 // ConsentApplySuccess: If `validate_only=false` in ApplyAdminConsentsRequest,
809 // this counter contains the number of Consent resources that were successfully
810 // applied. Otherwise, it is the number of Consent resources that are
811 // supported.
812 ConsentApplySuccess int64 `json:"consentApplySuccess,omitempty,string"`
813 // FailedResources: The number of resources (including the Consent resources)
814 // that ApplyAdminConsents failed to re-index.
815 FailedResources int64 `json:"failedResources,omitempty,string"`
816 // ForceSendFields is a list of field names (e.g. "AffectedResources") to
817 // unconditionally include in API requests. By default, fields with empty or
818 // default values are omitted from API requests. See
819 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
820 // details.
821 ForceSendFields []string `json:"-"`
822 // NullFields is a list of field names (e.g. "AffectedResources") to include in
823 // API requests with the JSON null value. By default, fields with empty values
824 // are omitted from API requests. See
825 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
826 NullFields []string `json:"-"`
827 }
828
829 func (s ApplyAdminConsentsResponse) MarshalJSON() ([]byte, error) {
830 type NoMethod ApplyAdminConsentsResponse
831 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
832 }
833
834 // ApplyConsentsRequest: Request to apply the Consent resources for the
835 // specified FHIR store.
836 type ApplyConsentsRequest struct {
837 // PatientScope: Optional. Scope down to a list of patients.
838 PatientScope *PatientScope `json:"patientScope,omitempty"`
839 // TimeRange: Optional. Scope down to patients whose most recent consent
840 // changes are in the time range. Can only be used with a versioning store
841 // (i.e. when disable_resource_versioning is set to false).
842 TimeRange *TimeRange `json:"timeRange,omitempty"`
843 // ValidateOnly: Optional. If true, the method only validates Consent resources
844 // to make sure they are supported. When the operation completes,
845 // ApplyConsentsResponse is returned where `consent_apply_success` and
846 // `consent_apply_failure` indicate supported and unsupported (or invalid)
847 // Consent resources, respectively. Otherwise, the method propagates the
848 // aggregate consensual information to the patient's resources. Upon success,
849 // `affected_resources` in the ApplyConsentsResponse indicates the number of
850 // resources that may have consensual access changed.
851 ValidateOnly bool `json:"validateOnly,omitempty"`
852 // ForceSendFields is a list of field names (e.g. "PatientScope") to
853 // unconditionally include in API requests. By default, fields with empty or
854 // default values are omitted from API requests. See
855 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
856 // details.
857 ForceSendFields []string `json:"-"`
858 // NullFields is a list of field names (e.g. "PatientScope") to include in API
859 // requests with the JSON null value. By default, fields with empty values are
860 // omitted from API requests. See
861 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
862 NullFields []string `json:"-"`
863 }
864
865 func (s ApplyConsentsRequest) MarshalJSON() ([]byte, error) {
866 type NoMethod ApplyConsentsRequest
867 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
868 }
869
870 // ApplyConsentsResponse: Response when all Consent resources in scope were
871 // processed and all affected resources were reindexed successfully. This
872 // structure is included in the response when the operation finishes
873 // successfully.
874 type ApplyConsentsResponse struct {
875 // AffectedResources: The number of resources (including the Consent resources)
876 // that may have consensual access change.
877 AffectedResources int64 `json:"affectedResources,omitempty,string"`
878 // ConsentApplyFailure: If `validate_only = false` in ApplyConsentsRequest,
879 // this counter is the number of Consent resources that were failed to apply.
880 // Otherwise, it is the number of Consent resources that are not supported or
881 // invalid.
882 ConsentApplyFailure int64 `json:"consentApplyFailure,omitempty,string"`
883 // ConsentApplySuccess: If `validate_only = false` in ApplyConsentsRequest,
884 // this counter is the number of Consent resources that were successfully
885 // applied. Otherwise, it is the number of Consent resources that are
886 // supported.
887 ConsentApplySuccess int64 `json:"consentApplySuccess,omitempty,string"`
888 // FailedResources: The number of resources (including the Consent resources)
889 // that ApplyConsents failed to re-index.
890 FailedResources int64 `json:"failedResources,omitempty,string"`
891 // ForceSendFields is a list of field names (e.g. "AffectedResources") to
892 // unconditionally include in API requests. By default, fields with empty or
893 // default values are omitted from API requests. See
894 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
895 // details.
896 ForceSendFields []string `json:"-"`
897 // NullFields is a list of field names (e.g. "AffectedResources") to include in
898 // API requests with the JSON null value. By default, fields with empty values
899 // are omitted from API requests. See
900 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
901 NullFields []string `json:"-"`
902 }
903
904 func (s ApplyConsentsResponse) MarshalJSON() ([]byte, error) {
905 type NoMethod ApplyConsentsResponse
906 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
907 }
908
909 // ArchiveUserDataMappingRequest: Archives the specified User data mapping.
910 type ArchiveUserDataMappingRequest struct {
911 }
912
913 // ArchiveUserDataMappingResponse: Archives the specified User data mapping.
914 type ArchiveUserDataMappingResponse struct {
915 // ServerResponse contains the HTTP response code and headers from the server.
916 googleapi.ServerResponse `json:"-"`
917 }
918
919 // Attribute: An attribute value for a Consent or User data mapping. Each
920 // Attribute must have a corresponding AttributeDefinition in the consent store
921 // that defines the default and allowed values.
922 type Attribute struct {
923 // AttributeDefinitionId: Indicates the name of an attribute defined in the
924 // consent store.
925 AttributeDefinitionId string `json:"attributeDefinitionId,omitempty"`
926 // Values: The value of the attribute. Must be an acceptable value as defined
927 // in the consent store. For example, if the consent store defines "data type"
928 // with acceptable values "questionnaire" and "step-count", when the attribute
929 // name is data type, this field must contain one of those values.
930 Values []string `json:"values,omitempty"`
931 // ForceSendFields is a list of field names (e.g. "AttributeDefinitionId") to
932 // unconditionally include in API requests. By default, fields with empty or
933 // default values are omitted from API requests. See
934 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
935 // details.
936 ForceSendFields []string `json:"-"`
937 // NullFields is a list of field names (e.g. "AttributeDefinitionId") to
938 // include in API requests with the JSON null value. By default, fields with
939 // empty values are omitted from API requests. See
940 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
941 NullFields []string `json:"-"`
942 }
943
944 func (s Attribute) MarshalJSON() ([]byte, error) {
945 type NoMethod Attribute
946 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
947 }
948
949 // AttributeDefinition: A client-defined consent attribute.
950 type AttributeDefinition struct {
951 // AllowedValues: Required. Possible values for the attribute. The number of
952 // allowed values must not exceed 500. An empty list is invalid. The list can
953 // only be expanded after creation.
954 AllowedValues []string `json:"allowedValues,omitempty"`
955 // Category: Required. The category of the attribute. The value of this field
956 // cannot be changed after creation.
957 //
958 // Possible values:
959 // "CATEGORY_UNSPECIFIED" - No category specified. This option is invalid.
960 // "RESOURCE" - Specify this category when this attribute describes the
961 // properties of resources. For example, data anonymity or data type.
962 // "REQUEST" - Specify this category when this attribute describes the
963 // properties of requests. For example, requester's role or requester's
964 // organization.
965 Category string `json:"category,omitempty"`
966 // ConsentDefaultValues: Optional. Default values of the attribute in Consents.
967 // If no default values are specified, it defaults to an empty value.
968 ConsentDefaultValues []string `json:"consentDefaultValues,omitempty"`
969 // DataMappingDefaultValue: Optional. Default value of the attribute in User
970 // data mappings. If no default value is specified, it defaults to an empty
971 // value. This field is only applicable to attributes of the category
972 // `RESOURCE`.
973 DataMappingDefaultValue string `json:"dataMappingDefaultValue,omitempty"`
974 // Description: Optional. A description of the attribute.
975 Description string `json:"description,omitempty"`
976 // Name: Identifier. Resource name of the Attribute definition, of the form
977 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentS
978 // tores/{consent_store_id}/attributeDefinitions/{attribute_definition_id}`.
979 // Cannot be changed after creation.
980 Name string `json:"name,omitempty"`
981
982 // ServerResponse contains the HTTP response code and headers from the server.
983 googleapi.ServerResponse `json:"-"`
984 // ForceSendFields is a list of field names (e.g. "AllowedValues") to
985 // unconditionally include in API requests. By default, fields with empty or
986 // default values are omitted from API requests. See
987 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
988 // details.
989 ForceSendFields []string `json:"-"`
990 // NullFields is a list of field names (e.g. "AllowedValues") to include in API
991 // requests with the JSON null value. By default, fields with empty values are
992 // omitted from API requests. See
993 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
994 NullFields []string `json:"-"`
995 }
996
997 func (s AttributeDefinition) MarshalJSON() ([]byte, error) {
998 type NoMethod AttributeDefinition
999 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1000 }
1001
1002 // AuditConfig: Specifies the audit configuration for a service. The
1003 // configuration determines which permission types are logged, and what
1004 // identities, if any, are exempted from logging. An AuditConfig must have one
1005 // or more AuditLogConfigs. If there are AuditConfigs for both `allServices`
1006 // and a specific service, the union of the two AuditConfigs is used for that
1007 // service: the log_types specified in each AuditConfig are enabled, and the
1008 // exempted_members in each AuditLogConfig are exempted. Example Policy with
1009 // multiple AuditConfigs: { "audit_configs": [ { "service": "allServices",
1010 // "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [
1011 // "user:[email protected]" ] }, { "log_type": "DATA_WRITE" }, { "log_type":
1012 // "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com",
1013 // "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type":
1014 // "DATA_WRITE", "exempted_members": [ "user:[email protected]" ] } ] } ] } For
1015 // sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
1016 // logging. It also exempts `[email protected]` from DATA_READ logging, and
1017 // `[email protected]` from DATA_WRITE logging.
1018 type AuditConfig struct {
1019 // AuditLogConfigs: The configuration for logging of each type of permission.
1020 AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
1021 // Service: Specifies a service that will be enabled for audit logging. For
1022 // example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices`
1023 // is a special value that covers all services.
1024 Service string `json:"service,omitempty"`
1025 // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
1026 // unconditionally include in API requests. By default, fields with empty or
1027 // default values are omitted from API requests. See
1028 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1029 // details.
1030 ForceSendFields []string `json:"-"`
1031 // NullFields is a list of field names (e.g. "AuditLogConfigs") to include in
1032 // API requests with the JSON null value. By default, fields with empty values
1033 // are omitted from API requests. See
1034 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1035 NullFields []string `json:"-"`
1036 }
1037
1038 func (s AuditConfig) MarshalJSON() ([]byte, error) {
1039 type NoMethod AuditConfig
1040 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1041 }
1042
1043 // AuditLogConfig: Provides the configuration for logging a type of
1044 // permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ",
1045 // "exempted_members": [ "user:[email protected]" ] }, { "log_type":
1046 // "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while
1047 // exempting [email protected] from DATA_READ logging.
1048 type AuditLogConfig struct {
1049 // ExemptedMembers: Specifies the identities that do not cause logging for this
1050 // type of permission. Follows the same format of Binding.members.
1051 ExemptedMembers []string `json:"exemptedMembers,omitempty"`
1052 // LogType: The log type that this config enables.
1053 //
1054 // Possible values:
1055 // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.
1056 // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy
1057 // "DATA_WRITE" - Data writes. Example: CloudSQL Users create
1058 // "DATA_READ" - Data reads. Example: CloudSQL Users list
1059 LogType string `json:"logType,omitempty"`
1060 // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
1061 // unconditionally include in API requests. By default, fields with empty or
1062 // default values are omitted from API requests. See
1063 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1064 // details.
1065 ForceSendFields []string `json:"-"`
1066 // NullFields is a list of field names (e.g. "ExemptedMembers") to include in
1067 // API requests with the JSON null value. By default, fields with empty values
1068 // are omitted from API requests. See
1069 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1070 NullFields []string `json:"-"`
1071 }
1072
1073 func (s AuditLogConfig) MarshalJSON() ([]byte, error) {
1074 type NoMethod AuditLogConfig
1075 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1076 }
1077
1078 // BatchGetMessagesResponse: Gets multiple messages in a specified HL7v2 store.
1079 type BatchGetMessagesResponse struct {
1080 // Messages: The returned Messages. See `MessageView` for populated fields.
1081 Messages []*Message `json:"messages,omitempty"`
1082
1083 // ServerResponse contains the HTTP response code and headers from the server.
1084 googleapi.ServerResponse `json:"-"`
1085 // ForceSendFields is a list of field names (e.g. "Messages") to
1086 // unconditionally include in API requests. By default, fields with empty or
1087 // default values are omitted from API requests. See
1088 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1089 // details.
1090 ForceSendFields []string `json:"-"`
1091 // NullFields is a list of field names (e.g. "Messages") to include in API
1092 // requests with the JSON null value. By default, fields with empty values are
1093 // omitted from API requests. See
1094 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1095 NullFields []string `json:"-"`
1096 }
1097
1098 func (s BatchGetMessagesResponse) MarshalJSON() ([]byte, error) {
1099 type NoMethod BatchGetMessagesResponse
1100 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1101 }
1102
1103 // Binding: Associates `members`, or principals, with a `role`.
1104 type Binding struct {
1105 // Condition: The condition that is associated with this binding. If the
1106 // condition evaluates to `true`, then this binding applies to the current
1107 // request. If the condition evaluates to `false`, then this binding does not
1108 // apply to the current request. However, a different role binding might grant
1109 // the same role to one or more of the principals in this binding. To learn
1110 // which resources support conditions in their IAM policies, see the IAM
1111 // documentation
1112 // (https://cloud.google.com/iam/help/conditions/resource-policies).
1113 Condition *Expr `json:"condition,omitempty"`
1114 // Members: Specifies the principals requesting access for a Google Cloud
1115 // resource. `members` can have the following values: * `allUsers`: A special
1116 // identifier that represents anyone who is on the internet; with or without a
1117 // Google account. * `allAuthenticatedUsers`: A special identifier that
1118 // represents anyone who is authenticated with a Google account or a service
1119 // account. Does not include identities that come from external identity
1120 // providers (IdPs) through identity federation. * `user:{emailid}`: An email
1121 // address that represents a specific Google account. For example,
1122 // `[email protected]` . * `serviceAccount:{emailid}`: An email address that
1123 // represents a Google service account. For example,
1124 // `[email protected]`. *
1125 // `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
1126 // identifier for a Kubernetes service account
1127 // (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
1128 // For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. *
1129 // `group:{emailid}`: An email address that represents a Google group. For
1130 // example, `[email protected]`. * `domain:{domain}`: The G Suite domain
1131 // (primary) that represents all the users of that domain. For example,
1132 // `google.com` or `example.com`. *
1133 // `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub
1134 // ject/{subject_attribute_value}`: A single identity in a workforce identity
1135 // pool. *
1136 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
1137 // group/{group_id}`: All workforce identities in a group. *
1138 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
1139 // attribute.{attribute_name}/{attribute_value}`: All workforce identities with
1140 // a specific attribute value. *
1141 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
1142 // *`: All identities in a workforce identity pool. *
1143 // `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo
1144 // rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single
1145 // identity in a workload identity pool. *
1146 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
1147 // /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool
1148 // group. *
1149 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
1150 // /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}
1151 // `: All identities in a workload identity pool with a certain attribute. *
1152 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
1153 // /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity
1154 // pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus
1155 // unique identifier) representing a user that has been recently deleted. For
1156 // example, `[email protected]?uid=123456789012345678901`. If the user is
1157 // recovered, this value reverts to `user:{emailid}` and the recovered user
1158 // retains the role in the binding. *
1159 // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1160 // unique identifier) representing a service account that has been recently
1161 // deleted. For example,
1162 // `[email protected]?uid=123456789012345678901`. If the
1163 // service account is undeleted, this value reverts to
1164 // `serviceAccount:{emailid}` and the undeleted service account retains the
1165 // role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email
1166 // address (plus unique identifier) representing a Google group that has been
1167 // recently deleted. For example,
1168 // `[email protected]?uid=123456789012345678901`. If the group is recovered,
1169 // this value reverts to `group:{emailid}` and the recovered group retains the
1170 // role in the binding. *
1171 // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool
1172 // _id}/subject/{subject_attribute_value}`: Deleted single identity in a
1173 // workforce identity pool. For example,
1174 // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po
1175 // ol-id/subject/my-subject-attribute-value`.
1176 Members []string `json:"members,omitempty"`
1177 // Role: Role that is assigned to the list of `members`, or principals. For
1178 // example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview
1179 // of the IAM roles and permissions, see the IAM documentation
1180 // (https://cloud.google.com/iam/docs/roles-overview). For a list of the
1181 // available pre-defined roles, see here
1182 // (https://cloud.google.com/iam/docs/understanding-roles).
1183 Role string `json:"role,omitempty"`
1184 // ForceSendFields is a list of field names (e.g. "Condition") to
1185 // unconditionally include in API requests. By default, fields with empty or
1186 // default values are omitted from API requests. See
1187 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1188 // details.
1189 ForceSendFields []string `json:"-"`
1190 // NullFields is a list of field names (e.g. "Condition") to include in API
1191 // requests with the JSON null value. By default, fields with empty values are
1192 // omitted from API requests. See
1193 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1194 NullFields []string `json:"-"`
1195 }
1196
1197 func (s Binding) MarshalJSON() ([]byte, error) {
1198 type NoMethod Binding
1199 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1200 }
1201
1202 // BlobStorageInfo: BlobStorageInfo contains details about the data stored in
1203 // Blob Storage for the referenced resource. Note: Storage class is only valid
1204 // for DICOM and hence will only be populated for DICOM resources.
1205 type BlobStorageInfo struct {
1206 // SizeBytes: Size in bytes of data stored in Blob Storage.
1207 SizeBytes int64 `json:"sizeBytes,omitempty,string"`
1208 // StorageClass: The storage class in which the Blob data is stored.
1209 //
1210 // Possible values:
1211 // "BLOB_STORAGE_CLASS_UNSPECIFIED" - If unspecified in CreateDataset, the
1212 // StorageClass defaults to STANDARD. If unspecified in UpdateDataset and the
1213 // StorageClass is set in the field mask, an InvalidRequest error is thrown.
1214 // "STANDARD" - This stores the Object in Blob Standard Storage:
1215 // https://cloud.google.com/storage/docs/storage-classes#standard
1216 // "NEARLINE" - This stores the Object in Blob Nearline Storage:
1217 // https://cloud.google.com/storage/docs/storage-classes#nearline
1218 // "COLDLINE" - This stores the Object in Blob Coldline Storage:
1219 // https://cloud.google.com/storage/docs/storage-classes#coldline
1220 // "ARCHIVE" - This stores the Object in Blob Archive Storage:
1221 // https://cloud.google.com/storage/docs/storage-classes#archive
1222 StorageClass string `json:"storageClass,omitempty"`
1223 // StorageClassUpdateTime: The time at which the storage class was updated.
1224 // This is used to compute early deletion fees of the resource.
1225 StorageClassUpdateTime string `json:"storageClassUpdateTime,omitempty"`
1226 // ForceSendFields is a list of field names (e.g. "SizeBytes") to
1227 // unconditionally include in API requests. By default, fields with empty or
1228 // default values are omitted from API requests. See
1229 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1230 // details.
1231 ForceSendFields []string `json:"-"`
1232 // NullFields is a list of field names (e.g. "SizeBytes") to include in API
1233 // requests with the JSON null value. By default, fields with empty values are
1234 // omitted from API requests. See
1235 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1236 NullFields []string `json:"-"`
1237 }
1238
1239 func (s BlobStorageInfo) MarshalJSON() ([]byte, error) {
1240 type NoMethod BlobStorageInfo
1241 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1242 }
1243
1244 // BlobStorageSettings: Settings for data stored in Blob storage.
1245 type BlobStorageSettings struct {
1246 // BlobStorageClass: The Storage class in which the Blob data is stored.
1247 //
1248 // Possible values:
1249 // "BLOB_STORAGE_CLASS_UNSPECIFIED" - If unspecified in CreateDataset, the
1250 // StorageClass defaults to STANDARD. If unspecified in UpdateDataset and the
1251 // StorageClass is set in the field mask, an InvalidRequest error is thrown.
1252 // "STANDARD" - This stores the Object in Blob Standard Storage:
1253 // https://cloud.google.com/storage/docs/storage-classes#standard
1254 // "NEARLINE" - This stores the Object in Blob Nearline Storage:
1255 // https://cloud.google.com/storage/docs/storage-classes#nearline
1256 // "COLDLINE" - This stores the Object in Blob Coldline Storage:
1257 // https://cloud.google.com/storage/docs/storage-classes#coldline
1258 // "ARCHIVE" - This stores the Object in Blob Archive Storage:
1259 // https://cloud.google.com/storage/docs/storage-classes#archive
1260 BlobStorageClass string `json:"blobStorageClass,omitempty"`
1261 // ForceSendFields is a list of field names (e.g. "BlobStorageClass") to
1262 // unconditionally include in API requests. By default, fields with empty or
1263 // default values are omitted from API requests. See
1264 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1265 // details.
1266 ForceSendFields []string `json:"-"`
1267 // NullFields is a list of field names (e.g. "BlobStorageClass") to include in
1268 // API requests with the JSON null value. By default, fields with empty values
1269 // are omitted from API requests. See
1270 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1271 NullFields []string `json:"-"`
1272 }
1273
1274 func (s BlobStorageSettings) MarshalJSON() ([]byte, error) {
1275 type NoMethod BlobStorageSettings
1276 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1277 }
1278
1279 // BulkDeleteResourcesRequest: Request to bulk delete FHIR resources.
1280 type BulkDeleteResourcesRequest struct {
1281 // GcsDestination: Optional. The Cloud Storage output destination. The
1282 // Healthcare Service Agent account requires the `roles/storage.objectAdmin`
1283 // role on the Cloud Storage location. The deleted resources outputs are
1284 // organized by FHIR resource types. The server creates one or more objects per
1285 // resource type. Each object contains newline delimited strings in the format
1286 // {resourceType}/{resourceId}.
1287 GcsDestination *GoogleCloudHealthcareV1beta1FhirGcsDestination `json:"gcsDestination,omitempty"`
1288 // Type: Optional. String of comma-delimited FHIR resource types. If provided,
1289 // only resources of the specified resource type(s) will be deleted.
1290 Type string `json:"type,omitempty"`
1291 // Until: Optional. If provided, only resources updated before or atthis time
1292 // are deleted. The time uses the format YYYY-MM-DDThh:mm:ss.sss+zz:zz. For
1293 // example, `2015-02-07T13:28:17.239+02:00` or `2017-01-01T00:00:00Z`. The time
1294 // must be specified to the second and include a time zone.
1295 Until string `json:"until,omitempty"`
1296 // VersionConfig: Optional. Specifies which version of the resources to delete.
1297 //
1298 // Possible values:
1299 // "VERSION_CONFIG_UNSPECIFIED" - Unspecified version config. Defaults to
1300 // ALL.
1301 // "ALL" - Delete the current version and all history versions.
1302 // "CURRENT_ONLY" - Delete the current version only and create a historical
1303 // version of the deleted resource.
1304 // "HISTORY_ONLY" - Delete all history versions only.
1305 VersionConfig string `json:"versionConfig,omitempty"`
1306 // ForceSendFields is a list of field names (e.g. "GcsDestination") to
1307 // unconditionally include in API requests. By default, fields with empty or
1308 // default values are omitted from API requests. See
1309 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1310 // details.
1311 ForceSendFields []string `json:"-"`
1312 // NullFields is a list of field names (e.g. "GcsDestination") to include in
1313 // API requests with the JSON null value. By default, fields with empty values
1314 // are omitted from API requests. See
1315 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1316 NullFields []string `json:"-"`
1317 }
1318
1319 func (s BulkDeleteResourcesRequest) MarshalJSON() ([]byte, error) {
1320 type NoMethod BulkDeleteResourcesRequest
1321 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1322 }
1323
1324 // BulkExportGcsDestination: The configuration for exporting to Cloud Storage
1325 // using the bulk export API.
1326 type BulkExportGcsDestination struct {
1327 // UriPrefix: Optional. URI for a Cloud Storage directory where the server
1328 // writes result files, in the format
1329 // `gs://{bucket-id}/{path/to/destination/dir}`. If there is no trailing slash,
1330 // the service appends one when composing the object path. The user is
1331 // responsible for creating the Cloud Storage bucket referenced in
1332 // `uri_prefix`.
1333 UriPrefix string `json:"uriPrefix,omitempty"`
1334 // ForceSendFields is a list of field names (e.g. "UriPrefix") to
1335 // unconditionally include in API requests. By default, fields with empty or
1336 // default values are omitted from API requests. See
1337 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1338 // details.
1339 ForceSendFields []string `json:"-"`
1340 // NullFields is a list of field names (e.g. "UriPrefix") to include in API
1341 // requests with the JSON null value. By default, fields with empty values are
1342 // omitted from API requests. See
1343 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1344 NullFields []string `json:"-"`
1345 }
1346
1347 func (s BulkExportGcsDestination) MarshalJSON() ([]byte, error) {
1348 type NoMethod BulkExportGcsDestination
1349 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1350 }
1351
1352 // CancelOperationRequest: The request message for Operations.CancelOperation.
1353 type CancelOperationRequest struct {
1354 }
1355
1356 // CharacterMaskConfig: Mask a string by replacing its characters with a fixed
1357 // character.
1358 type CharacterMaskConfig struct {
1359 // MaskingCharacter: Character to mask the sensitive values. If not supplied,
1360 // defaults to "*".
1361 MaskingCharacter string `json:"maskingCharacter,omitempty"`
1362 // ForceSendFields is a list of field names (e.g. "MaskingCharacter") to
1363 // unconditionally include in API requests. By default, fields with empty or
1364 // default values are omitted from API requests. See
1365 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1366 // details.
1367 ForceSendFields []string `json:"-"`
1368 // NullFields is a list of field names (e.g. "MaskingCharacter") to include in
1369 // API requests with the JSON null value. By default, fields with empty values
1370 // are omitted from API requests. See
1371 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1372 NullFields []string `json:"-"`
1373 }
1374
1375 func (s CharacterMaskConfig) MarshalJSON() ([]byte, error) {
1376 type NoMethod CharacterMaskConfig
1377 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1378 }
1379
1380 // CharacterMaskField: Replace field value with masking character. Supported
1381 // types (https://www.hl7.org/fhir/datatypes.html): Code, Decimal, HumanName,
1382 // Id, LanguageCode, Markdown, Oid, String, Uri, Uuid, Xhtml.
1383 type CharacterMaskField struct {
1384 }
1385
1386 // CheckDataAccessRequest: Checks if a particular data_id of a User data
1387 // mapping in the given consent store is consented for a given use.
1388 type CheckDataAccessRequest struct {
1389 // ConsentList: Optional. Specific Consents to evaluate the access request
1390 // against. These Consents must have the same `user_id` as the evaluated User
1391 // data mapping, must exist in the current `consent_store`, and have a `state`
1392 // of either `ACTIVE` or `DRAFT`. A maximum of 100 Consents can be provided
1393 // here. If no selection is specified, the access request is evaluated against
1394 // all `ACTIVE` unexpired Consents with the same `user_id` as the evaluated
1395 // User data mapping.
1396 ConsentList *ConsentList `json:"consentList,omitempty"`
1397 // DataId: Required. The unique identifier of the resource to check access for.
1398 // This identifier must correspond to a User data mapping in the given consent
1399 // store.
1400 DataId string `json:"dataId,omitempty"`
1401 // RequestAttributes: The values of request attributes associated with this
1402 // access request.
1403 RequestAttributes map[string]string `json:"requestAttributes,omitempty"`
1404 // ResponseView: Optional. The view for CheckDataAccessResponse. If
1405 // unspecified, defaults to `BASIC` and returns `consented` as `TRUE` or
1406 // `FALSE`.
1407 //
1408 // Possible values:
1409 // "RESPONSE_VIEW_UNSPECIFIED" - No response view specified. The API will
1410 // default to the BASIC view.
1411 // "BASIC" - Only the `consented` field is populated in
1412 // CheckDataAccessResponse.
1413 // "FULL" - All fields within CheckDataAccessResponse are populated. When set
1414 // to `FULL`, all `ACTIVE` Consents are evaluated even if a matching policy is
1415 // found during evaluation.
1416 ResponseView string `json:"responseView,omitempty"`
1417 // ForceSendFields is a list of field names (e.g. "ConsentList") to
1418 // unconditionally include in API requests. By default, fields with empty or
1419 // default values are omitted from API requests. See
1420 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1421 // details.
1422 ForceSendFields []string `json:"-"`
1423 // NullFields is a list of field names (e.g. "ConsentList") to include in API
1424 // requests with the JSON null value. By default, fields with empty values are
1425 // omitted from API requests. See
1426 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1427 NullFields []string `json:"-"`
1428 }
1429
1430 func (s CheckDataAccessRequest) MarshalJSON() ([]byte, error) {
1431 type NoMethod CheckDataAccessRequest
1432 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1433 }
1434
1435 // CheckDataAccessResponse: Checks if a particular data_id of a User data
1436 // mapping in the given consent store is consented for a given use.
1437 type CheckDataAccessResponse struct {
1438 // ConsentDetails: The resource names of all evaluated Consents mapped to their
1439 // evaluation.
1440 ConsentDetails map[string]ConsentEvaluation `json:"consentDetails,omitempty"`
1441 // Consented: Whether the requested resource is consented for the given use.
1442 Consented bool `json:"consented,omitempty"`
1443
1444 // ServerResponse contains the HTTP response code and headers from the server.
1445 googleapi.ServerResponse `json:"-"`
1446 // ForceSendFields is a list of field names (e.g. "ConsentDetails") to
1447 // unconditionally include in API requests. By default, fields with empty or
1448 // default values are omitted from API requests. See
1449 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1450 // details.
1451 ForceSendFields []string `json:"-"`
1452 // NullFields is a list of field names (e.g. "ConsentDetails") to include in
1453 // API requests with the JSON null value. By default, fields with empty values
1454 // are omitted from API requests. See
1455 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1456 NullFields []string `json:"-"`
1457 }
1458
1459 func (s CheckDataAccessResponse) MarshalJSON() ([]byte, error) {
1460 type NoMethod CheckDataAccessResponse
1461 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1462 }
1463
1464 // CleanDescriptorsOption: This option is based on the DICOM Standard's Clean
1465 // Descriptors Option
1466 // (https://dicom.nema.org/medical/dicom/2018e/output/chtml/part15/sect_E.3.5.html),
1467 // and the `CleanText` `Action` is applied to all the specified fields. When
1468 // cleaning text, the process attempts to transform phrases matching any of the
1469 // tags marked for removal (action codes D, Z, X, and U) in the Basic Profile
1470 // (https://dicom.nema.org/medical/dicom/2018e/output/chtml/part15/chapter_E.html).
1471 // These contextual phrases are replaced with the token "[CTX]". This option
1472 // uses an additional infoType during inspection.
1473 type CleanDescriptorsOption struct {
1474 }
1475
1476 // CleanTextField: Inspect text and transform sensitive text. Configure using
1477 // TextConfig. Supported types (https://www.hl7.org/fhir/datatypes.html): Code,
1478 // Date, DateTime, Decimal, HumanName, Id, LanguageCode, Markdown, Oid, String,
1479 // Uri, Uuid, Xhtml.
1480 type CleanTextField struct {
1481 }
1482
1483 // CleanTextTag: Inspect text and transform sensitive text. Configurable using
1484 // TextConfig. Supported [Value Representations]
1485 // (https://dicom.nema.org/medical/dicom/2018e/output/chtml/part05/sect_6.2.html#table_6.2-1):
1486 // AE, LO, LT, PN, SH, ST, UC, UT, DA, DT, AS
1487 type CleanTextTag struct {
1488 }
1489
1490 // ConfigureSearchRequest: Request to configure the search parameters for the
1491 // specified FHIR store.
1492 type ConfigureSearchRequest struct {
1493 // CanonicalUrls: The canonical URLs of the search parameters that are intended
1494 // to be used for the FHIR store. See
1495 // https://www.hl7.org/fhir/references.html#canonical for explanation on FHIR
1496 // canonical urls
1497 CanonicalUrls []string `json:"canonicalUrls,omitempty"`
1498 // ValidateOnly: If `validate_only` is set to true, the method will compile all
1499 // the search parameters without actually setting the search config for the
1500 // store and triggering the reindex.
1501 ValidateOnly bool `json:"validateOnly,omitempty"`
1502 // ForceSendFields is a list of field names (e.g. "CanonicalUrls") to
1503 // unconditionally include in API requests. By default, fields with empty or
1504 // default values are omitted from API requests. See
1505 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1506 // details.
1507 ForceSendFields []string `json:"-"`
1508 // NullFields is a list of field names (e.g. "CanonicalUrls") to include in API
1509 // requests with the JSON null value. By default, fields with empty values are
1510 // omitted from API requests. See
1511 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1512 NullFields []string `json:"-"`
1513 }
1514
1515 func (s ConfigureSearchRequest) MarshalJSON() ([]byte, error) {
1516 type NoMethod ConfigureSearchRequest
1517 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1518 }
1519
1520 // Consent: Represents a user's consent.
1521 type Consent struct {
1522 // ConsentArtifact: Required. The resource name of the Consent artifact that
1523 // contains proof of the end user's consent, of the form
1524 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentS
1525 // tores/{consent_store_id}/consentArtifacts/{consent_artifact_id}`.
1526 ConsentArtifact string `json:"consentArtifact,omitempty"`
1527 // ExpireTime: Timestamp in UTC of when this Consent is considered expired.
1528 ExpireTime string `json:"expireTime,omitempty"`
1529 // Metadata: Optional. User-supplied key-value pairs used to organize Consent
1530 // resources. Metadata keys must: - be between 1 and 63 characters long - have
1531 // a UTF-8 encoding of maximum 128 bytes - begin with a letter - consist of up
1532 // to 63 characters including lowercase letters, numeric characters,
1533 // underscores, and dashes Metadata values must be: - be between 1 and 63
1534 // characters long - have a UTF-8 encoding of maximum 128 bytes - consist of up
1535 // to 63 characters including lowercase letters, numeric characters,
1536 // underscores, and dashes No more than 64 metadata entries can be associated
1537 // with a given consent.
1538 Metadata map[string]string `json:"metadata,omitempty"`
1539 // Name: Identifier. Resource name of the Consent, of the form
1540 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentS
1541 // tores/{consent_store_id}/consents/{consent_id}`. Cannot be changed after
1542 // creation.
1543 Name string `json:"name,omitempty"`
1544 // Policies: Optional. Represents a user's consent in terms of the resources
1545 // that can be accessed and under what conditions.
1546 Policies []*GoogleCloudHealthcareV1beta1ConsentPolicy `json:"policies,omitempty"`
1547 // RevisionCreateTime: Output only. The timestamp that the revision was
1548 // created.
1549 RevisionCreateTime string `json:"revisionCreateTime,omitempty"`
1550 // RevisionId: Output only. The revision ID of the Consent. The format is an
1551 // 8-character hexadecimal string. Refer to a specific revision of a Consent by
1552 // appending `@{revision_id}` to the Consent's resource name.
1553 RevisionId string `json:"revisionId,omitempty"`
1554 // State: Required. Indicates the current state of this Consent.
1555 //
1556 // Possible values:
1557 // "STATE_UNSPECIFIED" - No state specified. Treated as ACTIVE only at the
1558 // time of resource creation.
1559 // "ACTIVE" - The Consent is active and is considered when evaluating a
1560 // user's consent on resources.
1561 // "ARCHIVED" - The archived state is currently not being used.
1562 // "REVOKED" - A revoked Consent is not considered when evaluating a user's
1563 // consent on resources.
1564 // "DRAFT" - A draft Consent is not considered when evaluating a user's
1565 // consent on resources unless explicitly specified.
1566 // "REJECTED" - When a draft Consent is rejected by a user, it is set to a
1567 // rejected state. A rejected Consent is not considered when evaluating a
1568 // user's consent on resources.
1569 State string `json:"state,omitempty"`
1570 // Ttl: Input only. The time to live for this Consent from when it is created.
1571 Ttl string `json:"ttl,omitempty"`
1572 // UserId: Required. User's UUID provided by the client.
1573 UserId string `json:"userId,omitempty"`
1574
1575 // ServerResponse contains the HTTP response code and headers from the server.
1576 googleapi.ServerResponse `json:"-"`
1577 // ForceSendFields is a list of field names (e.g. "ConsentArtifact") to
1578 // unconditionally include in API requests. By default, fields with empty or
1579 // default values are omitted from API requests. See
1580 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1581 // details.
1582 ForceSendFields []string `json:"-"`
1583 // NullFields is a list of field names (e.g. "ConsentArtifact") to include in
1584 // API requests with the JSON null value. By default, fields with empty values
1585 // are omitted from API requests. See
1586 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1587 NullFields []string `json:"-"`
1588 }
1589
1590 func (s Consent) MarshalJSON() ([]byte, error) {
1591 type NoMethod Consent
1592 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1593 }
1594
1595 // ConsentAccessorScope: The accessor scope that describes who can access, for
1596 // what purpose, in which environment.
1597 type ConsentAccessorScope struct {
1598 // Actor: An individual, group, or access role that identifies the accessor or
1599 // a characteristic of the accessor. This can be a resource ID (such as
1600 // `{resourceType}/{id}`) or an external URI. This value must be present.
1601 Actor string `json:"actor,omitempty"`
1602 // Environment: An abstract identifier that describes the environment or
1603 // conditions under which the accessor is acting. If it's not specified, it
1604 // applies to all environments.
1605 Environment string `json:"environment,omitempty"`
1606 // Purpose: The intent of data use. If it's not specified, it applies to all
1607 // purposes.
1608 Purpose string `json:"purpose,omitempty"`
1609 // ForceSendFields is a list of field names (e.g. "Actor") to unconditionally
1610 // include in API requests. By default, fields with empty or default values are
1611 // omitted from API requests. See
1612 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1613 // details.
1614 ForceSendFields []string `json:"-"`
1615 // NullFields is a list of field names (e.g. "Actor") to include in API
1616 // requests with the JSON null value. By default, fields with empty values are
1617 // omitted from API requests. See
1618 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1619 NullFields []string `json:"-"`
1620 }
1621
1622 func (s ConsentAccessorScope) MarshalJSON() ([]byte, error) {
1623 type NoMethod ConsentAccessorScope
1624 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1625 }
1626
1627 // ConsentArtifact: Documentation of a user's consent.
1628 type ConsentArtifact struct {
1629 // ConsentContentScreenshots: Optional. Screenshots, PDFs, or other binary
1630 // information documenting the user's consent.
1631 ConsentContentScreenshots []*Image `json:"consentContentScreenshots,omitempty"`
1632 // ConsentContentVersion: Optional. An string indicating the version of the
1633 // consent information shown to the user.
1634 ConsentContentVersion string `json:"consentContentVersion,omitempty"`
1635 // GuardianSignature: Optional. A signature from a guardian.
1636 GuardianSignature *Signature `json:"guardianSignature,omitempty"`
1637 // Metadata: Optional. Metadata associated with the Consent artifact. For
1638 // example, the consent locale or user agent version.
1639 Metadata map[string]string `json:"metadata,omitempty"`
1640 // Name: Identifier. Resource name of the Consent artifact, of the form
1641 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentS
1642 // tores/{consent_store_id}/consentArtifacts/{consent_artifact_id}`. Cannot be
1643 // changed after creation.
1644 Name string `json:"name,omitempty"`
1645 // UserId: Required. User's UUID provided by the client.
1646 UserId string `json:"userId,omitempty"`
1647 // UserSignature: Optional. User's signature.
1648 UserSignature *Signature `json:"userSignature,omitempty"`
1649 // WitnessSignature: Optional. A signature from a witness.
1650 WitnessSignature *Signature `json:"witnessSignature,omitempty"`
1651
1652 // ServerResponse contains the HTTP response code and headers from the server.
1653 googleapi.ServerResponse `json:"-"`
1654 // ForceSendFields is a list of field names (e.g. "ConsentContentScreenshots")
1655 // to unconditionally include in API requests. By default, fields with empty or
1656 // default values are omitted from API requests. See
1657 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1658 // details.
1659 ForceSendFields []string `json:"-"`
1660 // NullFields is a list of field names (e.g. "ConsentContentScreenshots") to
1661 // include in API requests with the JSON null value. By default, fields with
1662 // empty values are omitted from API requests. See
1663 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1664 NullFields []string `json:"-"`
1665 }
1666
1667 func (s ConsentArtifact) MarshalJSON() ([]byte, error) {
1668 type NoMethod ConsentArtifact
1669 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1670 }
1671
1672 // ConsentConfig: Configures whether to enforce consent for the FHIR store and
1673 // which consent enforcement version is being used.
1674 type ConsentConfig struct {
1675 // AccessDeterminationLogConfig: Optional. Specifies how the server logs the
1676 // consent-aware requests. If not specified, the
1677 // `AccessDeterminationLogConfig.LogLevel.MINIMUM` option is used.
1678 AccessDeterminationLogConfig *AccessDeterminationLogConfig `json:"accessDeterminationLogConfig,omitempty"`
1679 // AccessEnforced: Optional. The default value is false. If set to true, when
1680 // accessing FHIR resources, the consent headers will be verified against
1681 // consents given by patients. See the ConsentEnforcementVersion for the
1682 // supported consent headers.
1683 AccessEnforced bool `json:"accessEnforced,omitempty"`
1684 // ConsentHeaderHandling: Optional. Different options to configure the
1685 // behaviour of the server when handling the `X-Consent-Scope` header.
1686 ConsentHeaderHandling *ConsentHeaderHandling `json:"consentHeaderHandling,omitempty"`
1687 // EnforcedAdminConsents: Output only. The versioned names of the enforced
1688 // admin Consent resource(s), in the format
1689 // `projects/{project_id}/locations/{location}/datasets/{dataset_id}/fhirStores/
1690 // {fhir_store_id}/fhir/Consent/{resource_id}/_history/{version_id}`. For FHIR
1691 // stores with `disable_resource_versioning=true`, the format is
1692 // `projects/{project_id}/locations/{location}/datasets/{dataset_id}/fhirStores/
1693 // {fhir_store_id}/fhir/Consent/{resource_id}`. This field can only be updated
1694 // using ApplyAdminConsents.
1695 EnforcedAdminConsents []string `json:"enforcedAdminConsents,omitempty"`
1696 // Version: Required. Specifies which consent enforcement version is being used
1697 // for this FHIR store. This field can only be set once by either
1698 // CreateFhirStore or UpdateFhirStore. After that, you must call ApplyConsents
1699 // to change the version.
1700 //
1701 // Possible values:
1702 // "CONSENT_ENFORCEMENT_VERSION_UNSPECIFIED" - Users must specify an
1703 // enforcement version or an error is returned.
1704 // "V1" - Enforcement version 1. See the [FHIR Consent resources in the Cloud
1705 // Healthcare API](https://cloud.google.com/healthcare-api/docs/fhir-consent)
1706 // guide for more details.
1707 Version string `json:"version,omitempty"`
1708 // ForceSendFields is a list of field names (e.g.
1709 // "AccessDeterminationLogConfig") to unconditionally include in API requests.
1710 // By default, fields with empty or default values are omitted from API
1711 // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields
1712 // for more details.
1713 ForceSendFields []string `json:"-"`
1714 // NullFields is a list of field names (e.g. "AccessDeterminationLogConfig") to
1715 // include in API requests with the JSON null value. By default, fields with
1716 // empty values are omitted from API requests. See
1717 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1718 NullFields []string `json:"-"`
1719 }
1720
1721 func (s ConsentConfig) MarshalJSON() ([]byte, error) {
1722 type NoMethod ConsentConfig
1723 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1724 }
1725
1726 // ConsentErrors: The Consent resource name and error.
1727 type ConsentErrors struct {
1728 // Error: The error code and message.
1729 Error *Status `json:"error,omitempty"`
1730 // Name: The versioned name of the admin Consent resource, in the format
1731 // `projects/{project_id}/locations/{location}/datasets/{dataset_id}/fhirStores/
1732 // {fhir_store_id}/fhir/Consent/{resource_id}/_history/{version_id}`. For FHIR
1733 // stores with `disable_resource_versioning=true`, the format is
1734 // `projects/{project_id}/locations/{location}/datasets/{dataset_id}/fhirStores/
1735 // {fhir_store_id}/fhir/Consent/{resource_id}`.
1736 Name string `json:"name,omitempty"`
1737 // ForceSendFields is a list of field names (e.g. "Error") to unconditionally
1738 // include in API requests. By default, fields with empty or default values are
1739 // omitted from API requests. See
1740 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1741 // details.
1742 ForceSendFields []string `json:"-"`
1743 // NullFields is a list of field names (e.g. "Error") to include in API
1744 // requests with the JSON null value. By default, fields with empty values are
1745 // omitted from API requests. See
1746 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1747 NullFields []string `json:"-"`
1748 }
1749
1750 func (s ConsentErrors) MarshalJSON() ([]byte, error) {
1751 type NoMethod ConsentErrors
1752 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1753 }
1754
1755 // ConsentEvaluation: The detailed evaluation of a particular Consent.
1756 type ConsentEvaluation struct {
1757 // EvaluationResult: The evaluation result.
1758 //
1759 // Possible values:
1760 // "EVALUATION_RESULT_UNSPECIFIED" - No evaluation result specified. This
1761 // option is invalid.
1762 // "NOT_APPLICABLE" - The Consent is not applicable to the requested access
1763 // determination. For example, the Consent does not apply to the user for which
1764 // the access determination is requested, or it has a `state` of `REVOKED`, or
1765 // it has expired.
1766 // "NO_MATCHING_POLICY" - The Consent does not have a policy that matches the
1767 // `resource_attributes` of the evaluated resource.
1768 // "NO_SATISFIED_POLICY" - The Consent has at least one policy that matches
1769 // the `resource_attributes` of the evaluated resource, but no
1770 // `authorization_rule` was satisfied.
1771 // "HAS_SATISFIED_POLICY" - The Consent has at least one policy that matches
1772 // the `resource_attributes` of the evaluated resource, and at least one
1773 // `authorization_rule` was satisfied.
1774 EvaluationResult string `json:"evaluationResult,omitempty"`
1775 // ForceSendFields is a list of field names (e.g. "EvaluationResult") to
1776 // unconditionally include in API requests. By default, fields with empty or
1777 // default values are omitted from API requests. See
1778 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1779 // details.
1780 ForceSendFields []string `json:"-"`
1781 // NullFields is a list of field names (e.g. "EvaluationResult") to include in
1782 // API requests with the JSON null value. By default, fields with empty values
1783 // are omitted from API requests. See
1784 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1785 NullFields []string `json:"-"`
1786 }
1787
1788 func (s ConsentEvaluation) MarshalJSON() ([]byte, error) {
1789 type NoMethod ConsentEvaluation
1790 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1791 }
1792
1793 // ConsentHeaderHandling: How the server handles the consent header.
1794 type ConsentHeaderHandling struct {
1795 // Profile: Optional. Specifies the default server behavior when the header is
1796 // empty. If not specified, the `ScopeProfile.PERMIT_EMPTY_SCOPE` option is
1797 // used.
1798 //
1799 // Possible values:
1800 // "SCOPE_PROFILE_UNSPECIFIED" - If not specified, the default value
1801 // `PERMIT_EMPTY_SCOPE` is used.
1802 // "PERMIT_EMPTY_SCOPE" - When no consent scopes are provided (for example,
1803 // if there's an empty or missing header), then consent check is disabled,
1804 // similar to when `access_enforced` is `false`. You can use audit logs to
1805 // differentiate these two cases by looking at the value of
1806 // `protopayload.metadata.consentMode`. If consents scopes are present, they
1807 // must be valid and within the allowed limits, otherwise the request will be
1808 // rejected with a `4xx` code.
1809 // "REQUIRED_ON_READ" - The consent header must be non-empty when performing
1810 // read and search operations, otherwise the request is rejected with a `4xx`
1811 // code. Additionally, invalid consent scopes or scopes exceeding the allowed
1812 // limits are rejected.
1813 Profile string `json:"profile,omitempty"`
1814 // ForceSendFields is a list of field names (e.g. "Profile") to unconditionally
1815 // include in API requests. By default, fields with empty or default values are
1816 // omitted from API requests. See
1817 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1818 // details.
1819 ForceSendFields []string `json:"-"`
1820 // NullFields is a list of field names (e.g. "Profile") to include in API
1821 // requests with the JSON null value. By default, fields with empty values are
1822 // omitted from API requests. See
1823 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1824 NullFields []string `json:"-"`
1825 }
1826
1827 func (s ConsentHeaderHandling) MarshalJSON() ([]byte, error) {
1828 type NoMethod ConsentHeaderHandling
1829 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1830 }
1831
1832 // ConsentList: List of resource names of Consent resources.
1833 type ConsentList struct {
1834 // Consents: The resource names of the Consents to evaluate against, of the
1835 // form
1836 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentS
1837 // tores/{consent_store_id}/consents/{consent_id}`.
1838 Consents []string `json:"consents,omitempty"`
1839 // ForceSendFields is a list of field names (e.g. "Consents") to
1840 // unconditionally include in API requests. By default, fields with empty or
1841 // default values are omitted from API requests. See
1842 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1843 // details.
1844 ForceSendFields []string `json:"-"`
1845 // NullFields is a list of field names (e.g. "Consents") to include in API
1846 // requests with the JSON null value. By default, fields with empty values are
1847 // omitted from API requests. See
1848 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1849 NullFields []string `json:"-"`
1850 }
1851
1852 func (s ConsentList) MarshalJSON() ([]byte, error) {
1853 type NoMethod ConsentList
1854 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1855 }
1856
1857 // ConsentStore: Represents a consent store.
1858 type ConsentStore struct {
1859 // DefaultConsentTtl: Optional. Default time to live for Consents created in
1860 // this store. Must be at least 24 hours. Updating this field will not affect
1861 // the expiration time of existing consents.
1862 DefaultConsentTtl string `json:"defaultConsentTtl,omitempty"`
1863 // EnableConsentCreateOnUpdate: Optional. If `true`, UpdateConsent creates the
1864 // Consent if it does not already exist. If unspecified, defaults to `false`.
1865 EnableConsentCreateOnUpdate bool `json:"enableConsentCreateOnUpdate,omitempty"`
1866 // Labels: Optional. User-supplied key-value pairs used to organize consent
1867 // stores. Label keys must be between 1 and 63 characters long, have a UTF-8
1868 // encoding of maximum 128 bytes, and must conform to the following PCRE
1869 // regular expression: \p{Ll}\p{Lo}{0,62}. Label values must be between 1 and
1870 // 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must
1871 // conform to the following PCRE regular expression:
1872 // [\p{Ll}\p{Lo}\p{N}_-]{0,63}. No more than 64 labels can be associated with a
1873 // given store. For more information:
1874 // https://cloud.google.com/healthcare/docs/how-tos/labeling-resources
1875 Labels map[string]string `json:"labels,omitempty"`
1876 // Name: Resource name of the consent store, of the form
1877 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentS
1878 // tores/{consent_store_id}`. Cannot be changed after creation.
1879 Name string `json:"name,omitempty"`
1880
1881 // ServerResponse contains the HTTP response code and headers from the server.
1882 googleapi.ServerResponse `json:"-"`
1883 // ForceSendFields is a list of field names (e.g. "DefaultConsentTtl") to
1884 // unconditionally include in API requests. By default, fields with empty or
1885 // default values are omitted from API requests. See
1886 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1887 // details.
1888 ForceSendFields []string `json:"-"`
1889 // NullFields is a list of field names (e.g. "DefaultConsentTtl") to include in
1890 // API requests with the JSON null value. By default, fields with empty values
1891 // are omitted from API requests. See
1892 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1893 NullFields []string `json:"-"`
1894 }
1895
1896 func (s ConsentStore) MarshalJSON() ([]byte, error) {
1897 type NoMethod ConsentStore
1898 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1899 }
1900
1901 // ContextualDeidConfig: Fields that don't match a KeepField or CleanTextField
1902 // `action` in the BASIC profile are collected into a contextual phrase list.
1903 // For fields that match a CleanTextField `action` in FieldMetadata or
1904 // ProfileType, the process attempts to transform phrases matching these
1905 // contextual entries. These contextual phrases are replaced with the token
1906 // "[CTX]". This feature uses an additional InfoType during inspection.
1907 type ContextualDeidConfig struct {
1908 }
1909
1910 // CreateMessageRequest: Creates a new message.
1911 type CreateMessageRequest struct {
1912 // Message: Required. HL7v2 message.
1913 Message *Message `json:"message,omitempty"`
1914 // ForceSendFields is a list of field names (e.g. "Message") to unconditionally
1915 // include in API requests. By default, fields with empty or default values are
1916 // omitted from API requests. See
1917 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1918 // details.
1919 ForceSendFields []string `json:"-"`
1920 // NullFields is a list of field names (e.g. "Message") to include in API
1921 // requests with the JSON null value. By default, fields with empty values are
1922 // omitted from API requests. See
1923 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1924 NullFields []string `json:"-"`
1925 }
1926
1927 func (s CreateMessageRequest) MarshalJSON() ([]byte, error) {
1928 type NoMethod CreateMessageRequest
1929 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1930 }
1931
1932 // CryptoHashConfig: Pseudonymization method that generates surrogates via
1933 // cryptographic hashing. Uses SHA-256. Outputs a base64-encoded representation
1934 // of the hashed output. For example,
1935 // `L7k0BHmF1ha5U3NfGykjro4xWi1MPVQPjhMAZbSV9mM=`.
1936 type CryptoHashConfig struct {
1937 // CryptoKey: An AES 128/192/256 bit key. Causes the hash to be computed based
1938 // on this key. A default key is generated for each Deidentify operation and is
1939 // used when neither crypto_key nor kms_wrapped is specified. Must not be set
1940 // if kms_wrapped is set.
1941 CryptoKey string `json:"cryptoKey,omitempty"`
1942 // KmsWrapped: KMS wrapped key. Must not be set if crypto_key is set.
1943 KmsWrapped *KmsWrappedCryptoKey `json:"kmsWrapped,omitempty"`
1944 // ForceSendFields is a list of field names (e.g. "CryptoKey") to
1945 // unconditionally include in API requests. By default, fields with empty or
1946 // default values are omitted from API requests. See
1947 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1948 // details.
1949 ForceSendFields []string `json:"-"`
1950 // NullFields is a list of field names (e.g. "CryptoKey") to include in API
1951 // requests with the JSON null value. By default, fields with empty values are
1952 // omitted from API requests. See
1953 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1954 NullFields []string `json:"-"`
1955 }
1956
1957 func (s CryptoHashConfig) MarshalJSON() ([]byte, error) {
1958 type NoMethod CryptoHashConfig
1959 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1960 }
1961
1962 // CryptoHashField: Replace field value with a hash of that value. Supported
1963 // types (https://www.hl7.org/fhir/datatypes.html): Code, Decimal, HumanName,
1964 // Id, LanguageCode, Markdown, Oid, String, Uri, Uuid, Xhtml.
1965 type CryptoHashField struct {
1966 }
1967
1968 // Dataset: A message representing a health dataset. A health dataset
1969 // represents a collection of healthcare data pertaining to one or more
1970 // patients. This may include multiple modalities of healthcare data, such as
1971 // electronic medical records or medical imaging data.
1972 type Dataset struct {
1973 // EncryptionSpec: Customer-managed encryption key spec for a Dataset. If set,
1974 // this Dataset and all of its sub-resources will be secured by this key. If
1975 // empty, the Dataset is secured by the default Google encryption key.
1976 EncryptionSpec *EncryptionSpec `json:"encryptionSpec,omitempty"`
1977 // Name: Identifier. Resource name of the dataset, of the form
1978 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.
1979 Name string `json:"name,omitempty"`
1980 // SatisfiesPzi: Output only. Whether the dataset satisfies zone isolation.
1981 SatisfiesPzi bool `json:"satisfiesPzi,omitempty"`
1982 // SatisfiesPzs: Output only. Whether the dataset satisfies zone separation.
1983 SatisfiesPzs bool `json:"satisfiesPzs,omitempty"`
1984 // TimeZone: The default timezone used by this dataset. Must be a either a
1985 // valid IANA time zone name such as "America/New_York" or empty, which
1986 // defaults to UTC. This is used for parsing times in resources, such as HL7
1987 // messages, where no explicit timezone is specified.
1988 TimeZone string `json:"timeZone,omitempty"`
1989
1990 // ServerResponse contains the HTTP response code and headers from the server.
1991 googleapi.ServerResponse `json:"-"`
1992 // ForceSendFields is a list of field names (e.g. "EncryptionSpec") to
1993 // unconditionally include in API requests. By default, fields with empty or
1994 // default values are omitted from API requests. See
1995 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1996 // details.
1997 ForceSendFields []string `json:"-"`
1998 // NullFields is a list of field names (e.g. "EncryptionSpec") to include in
1999 // API requests with the JSON null value. By default, fields with empty values
2000 // are omitted from API requests. See
2001 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2002 NullFields []string `json:"-"`
2003 }
2004
2005 func (s Dataset) MarshalJSON() ([]byte, error) {
2006 type NoMethod Dataset
2007 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2008 }
2009
2010 // DateShiftConfig: Shift a date forward or backward in time by a random amount
2011 // which is consistent for a given patient and crypto key combination.
2012 type DateShiftConfig struct {
2013 // CryptoKey: An AES 128/192/256 bit key. The date shift is computed based on
2014 // this key and the patient ID. If the patient ID is empty for a DICOM
2015 // resource, the date shift is computed based on this key and the study
2016 // instance UID. If crypto_key is not set, then kms_wrapped is used to
2017 // calculate the date shift. If neither is set, a default key is generated for
2018 // each de-identify operation. Must not be set if kms_wrapped is set.
2019 CryptoKey string `json:"cryptoKey,omitempty"`
2020 // KmsWrapped: KMS wrapped key. If kms_wrapped is not set, then crypto_key is
2021 // used to calculate the date shift. If neither is set, a default key is
2022 // generated for each de-identify operation. Must not be set if crypto_key is
2023 // set.
2024 KmsWrapped *KmsWrappedCryptoKey `json:"kmsWrapped,omitempty"`
2025 // ForceSendFields is a list of field names (e.g. "CryptoKey") to
2026 // unconditionally include in API requests. By default, fields with empty or
2027 // default values are omitted from API requests. See
2028 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2029 // details.
2030 ForceSendFields []string `json:"-"`
2031 // NullFields is a list of field names (e.g. "CryptoKey") to include in API
2032 // requests with the JSON null value. By default, fields with empty values are
2033 // omitted from API requests. See
2034 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2035 NullFields []string `json:"-"`
2036 }
2037
2038 func (s DateShiftConfig) MarshalJSON() ([]byte, error) {
2039 type NoMethod DateShiftConfig
2040 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2041 }
2042
2043 // DateShiftField: Shift the date by a randomized number of days. See date
2044 // shifting (https://cloud.google.com/dlp/docs/concepts-date-shifting) for more
2045 // information. Supported types (https://www.hl7.org/fhir/datatypes.html):
2046 // Date, DateTime.
2047 type DateShiftField struct {
2048 }
2049
2050 // DeidentifiedStoreDestination: Contains configuration for streaming
2051 // de-identified FHIR export.
2052 type DeidentifiedStoreDestination struct {
2053 // Config: The configuration to use when de-identifying resources that are
2054 // added to this store.
2055 Config *DeidentifyConfig `json:"config,omitempty"`
2056 // Store: The full resource name of a Cloud Healthcare FHIR store, for example,
2057 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStor
2058 // es/{fhir_store_id}`.
2059 Store string `json:"store,omitempty"`
2060 // ForceSendFields is a list of field names (e.g. "Config") to unconditionally
2061 // include in API requests. By default, fields with empty or default values are
2062 // omitted from API requests. See
2063 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2064 // details.
2065 ForceSendFields []string `json:"-"`
2066 // NullFields is a list of field names (e.g. "Config") to include in API
2067 // requests with the JSON null value. By default, fields with empty values are
2068 // omitted from API requests. See
2069 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2070 NullFields []string `json:"-"`
2071 }
2072
2073 func (s DeidentifiedStoreDestination) MarshalJSON() ([]byte, error) {
2074 type NoMethod DeidentifiedStoreDestination
2075 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2076 }
2077
2078 // DeidentifyConfig: Configures de-id options specific to different types of
2079 // content. Each submessage customizes the handling of an
2080 // https://tools.ietf.org/html/rfc6838 media type or subtype. Configs are
2081 // applied in a nested manner at runtime.
2082 type DeidentifyConfig struct {
2083 // Dicom: Configures de-id of application/DICOM content. Deprecated. Use
2084 // `dicom_tag_config` instead.
2085 Dicom *DicomConfig `json:"dicom,omitempty"`
2086 // DicomTagConfig: Configures de-id of application/DICOM content.
2087 DicomTagConfig *DicomTagConfig `json:"dicomTagConfig,omitempty"`
2088 // Fhir: Configures de-id of application/FHIR content. Deprecated. Use
2089 // `fhir_field_config` instead.
2090 Fhir *FhirConfig `json:"fhir,omitempty"`
2091 // FhirFieldConfig: Configures de-id of application/FHIR content.
2092 FhirFieldConfig *FhirFieldConfig `json:"fhirFieldConfig,omitempty"`
2093 // Image: Configures the de-identification of image pixels in the
2094 // source_dataset. Deprecated. Use `dicom_tag_config.options.clean_image`
2095 // instead.
2096 Image *ImageConfig `json:"image,omitempty"`
2097 // OperationMetadata: Details about the work the de-identify operation
2098 // performed.
2099 OperationMetadata *DeidentifyOperationMetadata `json:"operationMetadata,omitempty"`
2100 // Text: Configures de-identification of text wherever it is found in the
2101 // source_dataset.
2102 Text *TextConfig `json:"text,omitempty"`
2103 // UseRegionalDataProcessing: Ensures in-flight data remains in the region of
2104 // origin during de-identification. The default value is false. Using this
2105 // option results in a significant reduction of throughput, and is not
2106 // compatible with `LOCATION` or `ORGANIZATION_NAME` infoTypes. If the
2107 // deprecated DicomConfig or FhirConfig are used, then `LOCATION` must be
2108 // excluded within TextConfig, and must also be excluded within ImageConfig if
2109 // image redaction is required.
2110 UseRegionalDataProcessing bool `json:"useRegionalDataProcessing,omitempty"`
2111 // ForceSendFields is a list of field names (e.g. "Dicom") to unconditionally
2112 // include in API requests. By default, fields with empty or default values are
2113 // omitted from API requests. See
2114 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2115 // details.
2116 ForceSendFields []string `json:"-"`
2117 // NullFields is a list of field names (e.g. "Dicom") to include in API
2118 // requests with the JSON null value. By default, fields with empty values are
2119 // omitted from API requests. See
2120 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2121 NullFields []string `json:"-"`
2122 }
2123
2124 func (s DeidentifyConfig) MarshalJSON() ([]byte, error) {
2125 type NoMethod DeidentifyConfig
2126 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2127 }
2128
2129 // DeidentifyDatasetRequest: Redacts identifying information from the specified
2130 // dataset.
2131 type DeidentifyDatasetRequest struct {
2132 // Config: Deidentify configuration. Only one of `config` and `gcs_config_uri`
2133 // can be specified.
2134 Config *DeidentifyConfig `json:"config,omitempty"`
2135 // DestinationDataset: Required. The name of the dataset resource to create and
2136 // write the redacted data to. * The destination dataset must not exist. * The
2137 // destination dataset must be in the same location as the source dataset.
2138 // De-identifying data across multiple locations is not supported.
2139 DestinationDataset string `json:"destinationDataset,omitempty"`
2140 // GcsConfigUri: Cloud Storage location to read the JSON
2141 // cloud.healthcare.deidentify.DeidentifyConfig from, overriding the default
2142 // config. Must be of the form `gs://{bucket_id}/path/to/object`. The Cloud
2143 // Storage location must grant the Cloud IAM role `roles/storage.objectViewer`
2144 // to the project's Cloud Healthcare Service Agent service account. Only one of
2145 // `config` and `gcs_config_uri` can be specified.
2146 GcsConfigUri string `json:"gcsConfigUri,omitempty"`
2147 // ForceSendFields is a list of field names (e.g. "Config") to unconditionally
2148 // include in API requests. By default, fields with empty or default values are
2149 // omitted from API requests. See
2150 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2151 // details.
2152 ForceSendFields []string `json:"-"`
2153 // NullFields is a list of field names (e.g. "Config") to include in API
2154 // requests with the JSON null value. By default, fields with empty values are
2155 // omitted from API requests. See
2156 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2157 NullFields []string `json:"-"`
2158 }
2159
2160 func (s DeidentifyDatasetRequest) MarshalJSON() ([]byte, error) {
2161 type NoMethod DeidentifyDatasetRequest
2162 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2163 }
2164
2165 // DeidentifyDicomStoreRequest: Creates a new DICOM store with sensitive
2166 // information de-identified.
2167 type DeidentifyDicomStoreRequest struct {
2168 // Config: Deidentify configuration. Only one of `config` and `gcs_config_uri`
2169 // can be specified.
2170 Config *DeidentifyConfig `json:"config,omitempty"`
2171 // DestinationStore: Required. The name of the DICOM store to write the
2172 // redacted data to. For example,
2173 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomSto
2174 // res/{dicom_store_id}`. * The destination dataset and DICOM store must exist.
2175 // * The source dataset and destination dataset must both reside in the same
2176 // location. De-identifying data across multiple locations is not supported. *
2177 // The caller must have the healthcare.dicomStores.dicomWebWrite permission to
2178 // write to the destination DICOM store.
2179 DestinationStore string `json:"destinationStore,omitempty"`
2180 // FilterConfig: Filter configuration.
2181 FilterConfig *DicomFilterConfig `json:"filterConfig,omitempty"`
2182 // GcsConfigUri: Cloud Storage location to read the JSON
2183 // cloud.healthcare.deidentify.DeidentifyConfig from, overriding the default
2184 // config. Must be of the form `gs://{bucket_id}/path/to/object`. The Cloud
2185 // Storage location must grant the Cloud IAM role `roles/storage.objectViewer`
2186 // to the project's Cloud Healthcare Service Agent service account. Only one of
2187 // `config` and `gcs_config_uri` can be specified.
2188 GcsConfigUri string `json:"gcsConfigUri,omitempty"`
2189 // ForceSendFields is a list of field names (e.g. "Config") to unconditionally
2190 // include in API requests. By default, fields with empty or default values are
2191 // omitted from API requests. See
2192 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2193 // details.
2194 ForceSendFields []string `json:"-"`
2195 // NullFields is a list of field names (e.g. "Config") to include in API
2196 // requests with the JSON null value. By default, fields with empty values are
2197 // omitted from API requests. See
2198 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2199 NullFields []string `json:"-"`
2200 }
2201
2202 func (s DeidentifyDicomStoreRequest) MarshalJSON() ([]byte, error) {
2203 type NoMethod DeidentifyDicomStoreRequest
2204 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2205 }
2206
2207 // DeidentifyFhirStoreRequest: Creates a new FHIR store with sensitive
2208 // information de-identified.
2209 type DeidentifyFhirStoreRequest struct {
2210 // Config: Deidentify configuration. Only one of `config` and `gcs_config_uri`
2211 // can be specified.
2212 Config *DeidentifyConfig `json:"config,omitempty"`
2213 // DestinationStore: Required. The name of the FHIR store to write the redacted
2214 // data to. For example,
2215 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStor
2216 // es/{fhir_store_id}`. * The destination dataset and FHIR store must exist. *
2217 // The source dataset and destination dataset must both reside in the same
2218 // location. De-identifying data across multiple locations is not supported. *
2219 // The caller must have the healthcare.fhirResources.update permission to write
2220 // to the destination FHIR store.
2221 DestinationStore string `json:"destinationStore,omitempty"`
2222 // GcsConfigUri: Cloud Storage location to read the JSON
2223 // cloud.healthcare.deidentify.DeidentifyConfig from, overriding the default
2224 // config. Must be of the form `gs://{bucket_id}/path/to/object`. The Cloud
2225 // Storage location must grant the Cloud IAM role `roles/storage.objectViewer`
2226 // to the project's Cloud Healthcare Service Agent service account. Only one of
2227 // `config` and `gcs_config_uri` can be specified.
2228 GcsConfigUri string `json:"gcsConfigUri,omitempty"`
2229 // ResourceFilter: A filter specifying the resources to include in the output.
2230 // If not specified, all resources are included in the output.
2231 ResourceFilter *FhirFilter `json:"resourceFilter,omitempty"`
2232 // SkipModifiedResources: If true, skips resources that are created or modified
2233 // after the de-identify operation is created.
2234 SkipModifiedResources bool `json:"skipModifiedResources,omitempty"`
2235 // ForceSendFields is a list of field names (e.g. "Config") to unconditionally
2236 // include in API requests. By default, fields with empty or default values are
2237 // omitted from API requests. See
2238 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2239 // details.
2240 ForceSendFields []string `json:"-"`
2241 // NullFields is a list of field names (e.g. "Config") to include in API
2242 // requests with the JSON null value. By default, fields with empty values are
2243 // omitted from API requests. See
2244 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2245 NullFields []string `json:"-"`
2246 }
2247
2248 func (s DeidentifyFhirStoreRequest) MarshalJSON() ([]byte, error) {
2249 type NoMethod DeidentifyFhirStoreRequest
2250 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2251 }
2252
2253 // DeidentifyOperationMetadata: Details about the work the de-identify
2254 // operation performed.
2255 type DeidentifyOperationMetadata struct {
2256 // FhirOutput: Details about the FHIR store to write the output to.
2257 FhirOutput *FhirOutput `json:"fhirOutput,omitempty"`
2258 // ForceSendFields is a list of field names (e.g. "FhirOutput") to
2259 // unconditionally include in API requests. By default, fields with empty or
2260 // default values are omitted from API requests. See
2261 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2262 // details.
2263 ForceSendFields []string `json:"-"`
2264 // NullFields is a list of field names (e.g. "FhirOutput") to include in API
2265 // requests with the JSON null value. By default, fields with empty values are
2266 // omitted from API requests. See
2267 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2268 NullFields []string `json:"-"`
2269 }
2270
2271 func (s DeidentifyOperationMetadata) MarshalJSON() ([]byte, error) {
2272 type NoMethod DeidentifyOperationMetadata
2273 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2274 }
2275
2276 // DeidentifySummary: Contains a detailed summary of the Deidentify operation.
2277 type DeidentifySummary struct {
2278 }
2279
2280 // DeleteTag: Delete tag.
2281 type DeleteTag struct {
2282 }
2283
2284 // DicomConfig: Specifies the parameters needed for de-identification of DICOM
2285 // stores.
2286 type DicomConfig struct {
2287 // FilterProfile: Tag filtering profile that determines which tags to
2288 // keep/remove.
2289 //
2290 // Possible values:
2291 // "TAG_FILTER_PROFILE_UNSPECIFIED" - No tag filtration profile provided.
2292 // Same as KEEP_ALL_PROFILE.
2293 // "MINIMAL_KEEP_LIST_PROFILE" - Keep only the tags required to produce valid
2294 // DICOM objects.
2295 // "ATTRIBUTE_CONFIDENTIALITY_BASIC_PROFILE" - Remove tags based on DICOM
2296 // Standard's Attribute Confidentiality Basic Profile (DICOM Standard Edition
2297 // 2018e)
2298 // https://dicom.nema.org/medical/dicom/2018e/output/chtml/part15/chapter_E.html.
2299 // "KEEP_ALL_PROFILE" - Keep all tags.
2300 // "DEIDENTIFY_TAG_CONTENTS" - Inspect within tag contents and replace
2301 // sensitive text. The process can be configured using the TextConfig. Applies
2302 // to all tags with the following Value Representation names: AE, LO, LT, PN,
2303 // SH, ST, UC, UT, DA, DT, AS
2304 FilterProfile string `json:"filterProfile,omitempty"`
2305 // KeepList: List of tags to keep. Remove all other tags.
2306 KeepList *TagFilterList `json:"keepList,omitempty"`
2307 // RemoveList: List of tags to remove. Keep all other tags.
2308 RemoveList *TagFilterList `json:"removeList,omitempty"`
2309 // SkipIdRedaction: If true, skip replacing StudyInstanceUID,
2310 // SeriesInstanceUID, SOPInstanceUID, and MediaStorageSOPInstanceUID and leave
2311 // them untouched. The Cloud Healthcare API regenerates these UIDs by default
2312 // based on the DICOM Standard's reasoning: "Whilst these UIDs cannot be mapped
2313 // directly to an individual out of context, given access to the original
2314 // images, or to a database of the original images containing the UIDs, it
2315 // would be possible to recover the individual's identity."
2316 // https://dicom.nema.org/medical/dicom/current/output/chtml/part15/sect_E.3.9.html
2317 SkipIdRedaction bool `json:"skipIdRedaction,omitempty"`
2318 // ForceSendFields is a list of field names (e.g. "FilterProfile") to
2319 // unconditionally include in API requests. By default, fields with empty or
2320 // default values are omitted from API requests. See
2321 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2322 // details.
2323 ForceSendFields []string `json:"-"`
2324 // NullFields is a list of field names (e.g. "FilterProfile") to include in API
2325 // requests with the JSON null value. By default, fields with empty values are
2326 // omitted from API requests. See
2327 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2328 NullFields []string `json:"-"`
2329 }
2330
2331 func (s DicomConfig) MarshalJSON() ([]byte, error) {
2332 type NoMethod DicomConfig
2333 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2334 }
2335
2336 // DicomFilterConfig: Specifies the filter configuration for DICOM resources.
2337 type DicomFilterConfig struct {
2338 // ResourcePathsGcsUri: The Cloud Storage location of the filter configuration
2339 // file. The `gcs_uri` must be in the format `gs://bucket/path/to/object`. The
2340 // filter configuration file must contain a list of resource paths separated by
2341 // newline characters (\n or \r\n). Each resource path must be in the format
2342 // "/studies/{studyUID}[/series/{seriesUID}[/instances/{instanceUID}]]" The
2343 // Cloud Healthcare API service account must have the
2344 // `roles/storage.objectViewer` Cloud IAM role for this Cloud Storage location.
2345 ResourcePathsGcsUri string `json:"resourcePathsGcsUri,omitempty"`
2346 // ForceSendFields is a list of field names (e.g. "ResourcePathsGcsUri") to
2347 // unconditionally include in API requests. By default, fields with empty or
2348 // default values are omitted from API requests. See
2349 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2350 // details.
2351 ForceSendFields []string `json:"-"`
2352 // NullFields is a list of field names (e.g. "ResourcePathsGcsUri") to include
2353 // in API requests with the JSON null value. By default, fields with empty
2354 // values are omitted from API requests. See
2355 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2356 NullFields []string `json:"-"`
2357 }
2358
2359 func (s DicomFilterConfig) MarshalJSON() ([]byte, error) {
2360 type NoMethod DicomFilterConfig
2361 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2362 }
2363
2364 // DicomNotificationConfig: Contains the configuration for DICOM notifications.
2365 type DicomNotificationConfig struct {
2366 // PubsubTopic: Required. The Pub/Sub (https://cloud.google.com/pubsub/docs/)
2367 // topic that notifications of changes are published on. Supplied by the
2368 // client. The notification is a `PubsubMessage` with the following fields: *
2369 // `PubsubMessage.Data` contains the resource name. * `PubsubMessage.MessageId`
2370 // is the ID of this notification. It is guaranteed to be unique within the
2371 // topic. * `PubsubMessage.PublishTime` is the time when the message was
2372 // published. * `PubsubMessage.Attributes` contains the following attributes: *
2373 // `action`: The name of the endpoint that generated the notification. Possible
2374 // values are `StoreInstances`, `SetBlobSettings`, `ImportDicomData`, etc. *
2375 // `lastUpdatedTime`: The latest timestamp when the DICOM instance was updated.
2376 // * `storeName`: The resource name of the DICOM store, of the form
2377 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomSto
2378 // res/{dicom_store_id}`. * `studyInstanceUID`: The study UID of the DICOM
2379 // instance that was changed. * `seriesInstanceUID`: The series UID of the
2380 // DICOM instance that was changed. * `sopInstanceUID`: The instance UID of the
2381 // DICOM instance that was changed. * `versionId`: The version ID of the DICOM
2382 // instance that was changed. * `modality`: The modality tag of the DICOM
2383 // instance that was changed. * `previousStorageClass`: The storage class where
2384 // the DICOM instance was previously stored if the storage class was changed. *
2385 // `storageClass`: The storage class where the DICOM instance is currently
2386 // stored. Note that notifications are only sent if the topic is non-empty.
2387 // Topic names (https://cloud.google.com/pubsub/docs/overview#names) must be
2388 // scoped to a project. The Cloud Healthcare API service account,
2389 // [email protected], must have the
2390 // `pubsub.topics.publish` permission (which is typically included in
2391 // `roles/pubsub.publisher` role) on the given Pub/Sub topic. Not having
2392 // adequate permissions causes the calls that send notifications to fail
2393 // (https://cloud.google.com/healthcare-api/docs/permissions-healthcare-api-gcp-products#dicom_fhir_and_hl7v2_store_cloud_pubsub_permissions).
2394 // If a notification can't be published to Pub/Sub, errors are logged to Cloud
2395 // Logging. For more information, see Viewing error logs in Cloud Logging
2396 // (https://cloud.google.com/healthcare-api/docs/how-tos/logging).
2397 PubsubTopic string `json:"pubsubTopic,omitempty"`
2398 // ForceSendFields is a list of field names (e.g. "PubsubTopic") to
2399 // unconditionally include in API requests. By default, fields with empty or
2400 // default values are omitted from API requests. See
2401 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2402 // details.
2403 ForceSendFields []string `json:"-"`
2404 // NullFields is a list of field names (e.g. "PubsubTopic") to include in API
2405 // requests with the JSON null value. By default, fields with empty values are
2406 // omitted from API requests. See
2407 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2408 NullFields []string `json:"-"`
2409 }
2410
2411 func (s DicomNotificationConfig) MarshalJSON() ([]byte, error) {
2412 type NoMethod DicomNotificationConfig
2413 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2414 }
2415
2416 // DicomStore: Represents a DICOM store.
2417 type DicomStore struct {
2418 // Labels: User-supplied key-value pairs used to organize DICOM stores. Label
2419 // keys must be between 1 and 63 characters long, have a UTF-8 encoding of
2420 // maximum 128 bytes, and must conform to the following PCRE regular
2421 // expression: \p{Ll}\p{Lo}{0,62} Label values are optional, must be between 1
2422 // and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must
2423 // conform to the following PCRE regular expression:
2424 // [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64 labels can be associated with a
2425 // given store.
2426 Labels map[string]string `json:"labels,omitempty"`
2427 // Name: Identifier. Resource name of the DICOM store, of the form
2428 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomSto
2429 // res/{dicom_store_id}`.
2430 Name string `json:"name,omitempty"`
2431 // NotificationConfig: Notification destination for new DICOM instances.
2432 // Supplied by the client.
2433 NotificationConfig *NotificationConfig `json:"notificationConfig,omitempty"`
2434 // NotificationConfigs: Optional. Specifies where and whether to send
2435 // notifications upon changes to a DICOM store.
2436 NotificationConfigs []*DicomNotificationConfig `json:"notificationConfigs,omitempty"`
2437 // StreamConfigs: Optional. A list of streaming configs used to configure the
2438 // destination of streaming exports for every DICOM instance insertion in this
2439 // DICOM store. After a new config is added to `stream_configs`, DICOM instance
2440 // insertions are streamed to the new destination. When a config is removed
2441 // from `stream_configs`, the server stops streaming to that destination. Each
2442 // config must contain a unique destination.
2443 StreamConfigs []*GoogleCloudHealthcareV1beta1DicomStreamConfig `json:"streamConfigs,omitempty"`
2444
2445 // ServerResponse contains the HTTP response code and headers from the server.
2446 googleapi.ServerResponse `json:"-"`
2447 // ForceSendFields is a list of field names (e.g. "Labels") to unconditionally
2448 // include in API requests. By default, fields with empty or default values are
2449 // omitted from API requests. See
2450 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2451 // details.
2452 ForceSendFields []string `json:"-"`
2453 // NullFields is a list of field names (e.g. "Labels") to include in API
2454 // requests with the JSON null value. By default, fields with empty values are
2455 // omitted from API requests. See
2456 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2457 NullFields []string `json:"-"`
2458 }
2459
2460 func (s DicomStore) MarshalJSON() ([]byte, error) {
2461 type NoMethod DicomStore
2462 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2463 }
2464
2465 // DicomStoreMetrics: DicomStoreMetrics contains metrics describing a DICOM
2466 // store.
2467 type DicomStoreMetrics struct {
2468 // BlobStorageSizeBytes: Total blob storage bytes for all instances in the
2469 // store.
2470 BlobStorageSizeBytes int64 `json:"blobStorageSizeBytes,omitempty,string"`
2471 // InstanceCount: Number of instances in the store.
2472 InstanceCount int64 `json:"instanceCount,omitempty,string"`
2473 // Name: Resource name of the DICOM store, of the form
2474 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomSto
2475 // res/{dicom_store_id}`.
2476 Name string `json:"name,omitempty"`
2477 // SeriesCount: Number of series in the store.
2478 SeriesCount int64 `json:"seriesCount,omitempty,string"`
2479 // StructuredStorageSizeBytes: Total structured storage bytes for all instances
2480 // in the store.
2481 StructuredStorageSizeBytes int64 `json:"structuredStorageSizeBytes,omitempty,string"`
2482 // StudyCount: Number of studies in the store.
2483 StudyCount int64 `json:"studyCount,omitempty,string"`
2484
2485 // ServerResponse contains the HTTP response code and headers from the server.
2486 googleapi.ServerResponse `json:"-"`
2487 // ForceSendFields is a list of field names (e.g. "BlobStorageSizeBytes") to
2488 // unconditionally include in API requests. By default, fields with empty or
2489 // default values are omitted from API requests. See
2490 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2491 // details.
2492 ForceSendFields []string `json:"-"`
2493 // NullFields is a list of field names (e.g. "BlobStorageSizeBytes") to include
2494 // in API requests with the JSON null value. By default, fields with empty
2495 // values are omitted from API requests. See
2496 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2497 NullFields []string `json:"-"`
2498 }
2499
2500 func (s DicomStoreMetrics) MarshalJSON() ([]byte, error) {
2501 type NoMethod DicomStoreMetrics
2502 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2503 }
2504
2505 // DicomTagConfig: Specifies the parameters needed for the de-identification of
2506 // DICOM stores.
2507 type DicomTagConfig struct {
2508 // Actions: Specifies custom tag selections and `Actions` to apply to them.
2509 // Overrides `options` and `profile`. Conflicting `Actions` are applied in the
2510 // order given.
2511 Actions []*Action `json:"actions,omitempty"`
2512 // Options: Specifies additional options to apply, overriding the base
2513 // `profile`.
2514 Options *Options `json:"options,omitempty"`
2515 // ProfileType: Base profile type for handling DICOM tags.
2516 //
2517 // Possible values:
2518 // "PROFILE_TYPE_UNSPECIFIED" - No profile provided. Same as
2519 // `ATTRIBUTE_CONFIDENTIALITY_BASIC_PROFILE`.
2520 // "MINIMAL_KEEP_LIST_PROFILE" - Keep only the tags required to produce valid
2521 // DICOM objects.
2522 // "ATTRIBUTE_CONFIDENTIALITY_BASIC_PROFILE" - Remove tags based on DICOM
2523 // Standard's [Attribute Confidentiality Basic Profile (DICOM Standard Edition
2524 // 2018e)](https://dicom.nema.org/medical/dicom/2018e/output/chtml/part15/chapte
2525 // r_E.html).
2526 // "KEEP_ALL_PROFILE" - Keep all tags.
2527 // "DEIDENTIFY_TAG_CONTENTS" - Inspect tag contents and replace sensitive
2528 // text. The process can be configured using the TextConfig. Applies to all
2529 // tags with the following [Value Representations]
2530 // (https://dicom.nema.org/medical/dicom/2018e/output/chtml/part05/sect_6.2.html#table_6.2-1):
2531 // AE, LO, LT, PN, SH, ST, UC, UT, DA, DT, AS
2532 ProfileType string `json:"profileType,omitempty"`
2533 // ForceSendFields is a list of field names (e.g. "Actions") to unconditionally
2534 // include in API requests. By default, fields with empty or default values are
2535 // omitted from API requests. See
2536 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2537 // details.
2538 ForceSendFields []string `json:"-"`
2539 // NullFields is a list of field names (e.g. "Actions") to include in API
2540 // requests with the JSON null value. By default, fields with empty values are
2541 // omitted from API requests. See
2542 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2543 NullFields []string `json:"-"`
2544 }
2545
2546 func (s DicomTagConfig) MarshalJSON() ([]byte, error) {
2547 type NoMethod DicomTagConfig
2548 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2549 }
2550
2551 // Empty: A generic empty message that you can re-use to avoid defining
2552 // duplicated empty messages in your APIs. A typical example is to use it as
2553 // the request or the response type of an API method. For instance: service Foo
2554 // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
2555 type Empty struct {
2556 // ServerResponse contains the HTTP response code and headers from the server.
2557 googleapi.ServerResponse `json:"-"`
2558 }
2559
2560 // EncryptionSpec: Represents a customer-managed encryption key spec that can
2561 // be applied to a resource.
2562 type EncryptionSpec struct {
2563 // KmsKeyName: Required. The resource name of customer-managed encryption key
2564 // that is used to secure a resource and its sub-resources. Only the key in the
2565 // same location as this dataset is allowed to be used for encryption. Format
2566 // is:
2567 // `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{key}`
2568 KmsKeyName string `json:"kmsKeyName,omitempty"`
2569 // ForceSendFields is a list of field names (e.g. "KmsKeyName") to
2570 // unconditionally include in API requests. By default, fields with empty or
2571 // default values are omitted from API requests. See
2572 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2573 // details.
2574 ForceSendFields []string `json:"-"`
2575 // NullFields is a list of field names (e.g. "KmsKeyName") to include in API
2576 // requests with the JSON null value. By default, fields with empty values are
2577 // omitted from API requests. See
2578 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2579 NullFields []string `json:"-"`
2580 }
2581
2582 func (s EncryptionSpec) MarshalJSON() ([]byte, error) {
2583 type NoMethod EncryptionSpec
2584 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2585 }
2586
2587 // Entity: The candidate entities that an entity mention could link to.
2588 type Entity struct {
2589 // EntityId: entity_id is a first class field entity_id uniquely identifies
2590 // this concept and its meta-vocabulary. For example, "UMLS/C0000970".
2591 EntityId string `json:"entityId,omitempty"`
2592 // PreferredTerm: preferred_term is the preferred term for this concept. For
2593 // example, "Acetaminophen". For ad hoc entities formed by normalization, this
2594 // is the most popular unnormalized string.
2595 PreferredTerm string `json:"preferredTerm,omitempty"`
2596 // VocabularyCodes: Vocabulary codes are first-class fields and differentiated
2597 // from the concept unique identifier (entity_id). vocabulary_codes contains
2598 // the representation of this concept in particular vocabularies, such as
2599 // ICD-10, SNOMED-CT and RxNORM. These are prefixed by the name of the
2600 // vocabulary, followed by the unique code within that vocabulary. For example,
2601 // "RXNORM/A10334543".
2602 VocabularyCodes []string `json:"vocabularyCodes,omitempty"`
2603 // ForceSendFields is a list of field names (e.g. "EntityId") to
2604 // unconditionally include in API requests. By default, fields with empty or
2605 // default values are omitted from API requests. See
2606 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2607 // details.
2608 ForceSendFields []string `json:"-"`
2609 // NullFields is a list of field names (e.g. "EntityId") to include in API
2610 // requests with the JSON null value. By default, fields with empty values are
2611 // omitted from API requests. See
2612 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2613 NullFields []string `json:"-"`
2614 }
2615
2616 func (s Entity) MarshalJSON() ([]byte, error) {
2617 type NoMethod Entity
2618 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2619 }
2620
2621 // EntityMention: An entity mention in the document.
2622 type EntityMention struct {
2623 // AdditionalInfo: Additional information about the entity mention. For
2624 // example, for an entity mention of type `DATE` this can be its more specific
2625 // date types from the following list: `ADMISSION_DATE`, `CONSULTATION_DATE`,
2626 // `DISCHARGE_DATE`, `SERVICE_DATE`, `VISIT_DATE`, `DIAGNOSIS_DATE`,
2627 // `MED_STARTED_DATE`, `MED_ENDED_DATE`, `NOTE_DATE`, `PROCEDURE_DATE`,
2628 // `RADIATION_STARTED_DATE`, `RADIATION_ENDED_DATE`, `STAGE_DATE`
2629 AdditionalInfo []*Feature `json:"additionalInfo,omitempty"`
2630 // CertaintyAssessment: The certainty assessment of the entity mention. Its
2631 // value is one of: LIKELY, SOMEWHAT_LIKELY, UNCERTAIN, SOMEWHAT_UNLIKELY,
2632 // UNLIKELY, CONDITIONAL
2633 CertaintyAssessment *Feature `json:"certaintyAssessment,omitempty"`
2634 // Confidence: The model's confidence in this entity mention annotation. A
2635 // number between 0 and 1.
2636 Confidence float64 `json:"confidence,omitempty"`
2637 // LinkedEntities: linked_entities are candidate ontological concepts that this
2638 // entity mention may refer to. They are sorted by decreasing confidence.
2639 LinkedEntities []*LinkedEntity `json:"linkedEntities,omitempty"`
2640 // MentionId: mention_id uniquely identifies each entity mention in a single
2641 // response.
2642 MentionId string `json:"mentionId,omitempty"`
2643 // Subject: The subject this entity mention relates to. Its value is one of:
2644 // PATIENT, FAMILY_MEMBER, OTHER
2645 Subject *Feature `json:"subject,omitempty"`
2646 // TemporalAssessment: How this entity mention relates to the subject
2647 // temporally. Its value is one of: CURRENT, CLINICAL_HISTORY, FAMILY_HISTORY,
2648 // UPCOMING, ALLERGY
2649 TemporalAssessment *Feature `json:"temporalAssessment,omitempty"`
2650 // Text: text is the location of the entity mention in the document.
2651 Text *TextSpan `json:"text,omitempty"`
2652 // Type: The semantic type of the entity: UNKNOWN_ENTITY_TYPE, ALONE,
2653 // ANATOMICAL_STRUCTURE, ASSISTED_LIVING, BF_RESULT, BM_RESULT, BM_UNIT,
2654 // BM_VALUE, BODY_FUNCTION, BODY_MEASUREMENT, COMPLIANT, DOESNOT_FOLLOWUP,
2655 // FAMILY, FOLLOWSUP, LABORATORY_DATA, LAB_RESULT, LAB_UNIT, LAB_VALUE,
2656 // MEDICAL_DEVICE, MEDICINE, MED_DOSE, MED_DURATION, MED_FORM, MED_FREQUENCY,
2657 // MED_ROUTE, MED_STATUS, MED_STRENGTH, MED_TOTALDOSE, MED_UNIT, NON_COMPLIANT,
2658 // OTHER_LIVINGSTATUS, PROBLEM, PROCEDURE, PROCEDURE_RESULT, PROC_METHOD,
2659 // REASON_FOR_NONCOMPLIANCE, SEVERITY, SUBSTANCE_ABUSE, UNCLEAR_FOLLOWUP.
2660 Type string `json:"type,omitempty"`
2661 // ForceSendFields is a list of field names (e.g. "AdditionalInfo") to
2662 // unconditionally include in API requests. By default, fields with empty or
2663 // default values are omitted from API requests. See
2664 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2665 // details.
2666 ForceSendFields []string `json:"-"`
2667 // NullFields is a list of field names (e.g. "AdditionalInfo") to include in
2668 // API requests with the JSON null value. By default, fields with empty values
2669 // are omitted from API requests. See
2670 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2671 NullFields []string `json:"-"`
2672 }
2673
2674 func (s EntityMention) MarshalJSON() ([]byte, error) {
2675 type NoMethod EntityMention
2676 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2677 }
2678
2679 func (s *EntityMention) UnmarshalJSON(data []byte) error {
2680 type NoMethod EntityMention
2681 var s1 struct {
2682 Confidence gensupport.JSONFloat64 `json:"confidence"`
2683 *NoMethod
2684 }
2685 s1.NoMethod = (*NoMethod)(s)
2686 if err := json.Unmarshal(data, &s1); err != nil {
2687 return err
2688 }
2689 s.Confidence = float64(s1.Confidence)
2690 return nil
2691 }
2692
2693 // EntityMentionRelationship: Defines directed relationship from one entity
2694 // mention to another.
2695 type EntityMentionRelationship struct {
2696 // Confidence: The model's confidence in this annotation. A number between 0
2697 // and 1.
2698 Confidence float64 `json:"confidence,omitempty"`
2699 // ObjectId: object_id is the id of the object entity mention.
2700 ObjectId string `json:"objectId,omitempty"`
2701 // SubjectId: subject_id is the id of the subject entity mention.
2702 SubjectId string `json:"subjectId,omitempty"`
2703 // ForceSendFields is a list of field names (e.g. "Confidence") to
2704 // unconditionally include in API requests. By default, fields with empty or
2705 // default values are omitted from API requests. See
2706 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2707 // details.
2708 ForceSendFields []string `json:"-"`
2709 // NullFields is a list of field names (e.g. "Confidence") to include in API
2710 // requests with the JSON null value. By default, fields with empty values are
2711 // omitted from API requests. See
2712 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2713 NullFields []string `json:"-"`
2714 }
2715
2716 func (s EntityMentionRelationship) MarshalJSON() ([]byte, error) {
2717 type NoMethod EntityMentionRelationship
2718 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2719 }
2720
2721 func (s *EntityMentionRelationship) UnmarshalJSON(data []byte) error {
2722 type NoMethod EntityMentionRelationship
2723 var s1 struct {
2724 Confidence gensupport.JSONFloat64 `json:"confidence"`
2725 *NoMethod
2726 }
2727 s1.NoMethod = (*NoMethod)(s)
2728 if err := json.Unmarshal(data, &s1); err != nil {
2729 return err
2730 }
2731 s.Confidence = float64(s1.Confidence)
2732 return nil
2733 }
2734
2735 // EvaluateUserConsentsRequest: Evaluate a user's Consents for all matching
2736 // User data mappings. Note: User data mappings are indexed asynchronously,
2737 // causing slight delays between the time mappings are created or updated and
2738 // when they are included in EvaluateUserConsents results.
2739 type EvaluateUserConsentsRequest struct {
2740 // ConsentList: Optional. Specific Consents to evaluate the access request
2741 // against. These Consents must have the same `user_id` as the User data
2742 // mappings being evalauted, must exist in the current `consent_store`, and
2743 // must have a `state` of either `ACTIVE` or `DRAFT`. A maximum of 100 Consents
2744 // can be provided here. If unspecified, all `ACTIVE` unexpired Consents in the
2745 // current `consent_store` will be evaluated.
2746 ConsentList *ConsentList `json:"consentList,omitempty"`
2747 // PageSize: Optional. Limit on the number of User data mappings to return in a
2748 // single response. If not specified, 100 is used. May not be larger than 1000.
2749 PageSize int64 `json:"pageSize,omitempty"`
2750 // PageToken: Optional. Token to retrieve the next page of results, or empty to
2751 // get the first page.
2752 PageToken string `json:"pageToken,omitempty"`
2753 // RequestAttributes: Required. The values of request attributes associated
2754 // with this access request.
2755 RequestAttributes map[string]string `json:"requestAttributes,omitempty"`
2756 // ResourceAttributes: Optional. The values of resource attributes associated
2757 // with the resources being requested. If no values are specified, then all
2758 // resources are queried.
2759 ResourceAttributes map[string]string `json:"resourceAttributes,omitempty"`
2760 // ResponseView: Optional. The view for EvaluateUserConsentsResponse. If
2761 // unspecified, defaults to `BASIC` and returns `consented` as `TRUE` or
2762 // `FALSE`.
2763 //
2764 // Possible values:
2765 // "RESPONSE_VIEW_UNSPECIFIED" - No response view specified. The API will
2766 // default to the BASIC view.
2767 // "BASIC" - Only the `data_id` and `consented` fields are populated in the
2768 // response.
2769 // "FULL" - All fields within the response are populated. When set to `FULL`,
2770 // all `ACTIVE` Consents are evaluated even if a matching policy is found
2771 // during evaluation.
2772 ResponseView string `json:"responseView,omitempty"`
2773 // UserId: Required. User ID to evaluate consents for.
2774 UserId string `json:"userId,omitempty"`
2775 // ForceSendFields is a list of field names (e.g. "ConsentList") to
2776 // unconditionally include in API requests. By default, fields with empty or
2777 // default values are omitted from API requests. See
2778 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2779 // details.
2780 ForceSendFields []string `json:"-"`
2781 // NullFields is a list of field names (e.g. "ConsentList") to include in API
2782 // requests with the JSON null value. By default, fields with empty values are
2783 // omitted from API requests. See
2784 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2785 NullFields []string `json:"-"`
2786 }
2787
2788 func (s EvaluateUserConsentsRequest) MarshalJSON() ([]byte, error) {
2789 type NoMethod EvaluateUserConsentsRequest
2790 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2791 }
2792
2793 type EvaluateUserConsentsResponse struct {
2794 // NextPageToken: Token to retrieve the next page of results, or empty if there
2795 // are no more results in the list. This token is valid for 72 hours after it
2796 // is created.
2797 NextPageToken string `json:"nextPageToken,omitempty"`
2798 // Results: The consent evaluation result for each `data_id`.
2799 Results []*Result `json:"results,omitempty"`
2800
2801 // ServerResponse contains the HTTP response code and headers from the server.
2802 googleapi.ServerResponse `json:"-"`
2803 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
2804 // unconditionally include in API requests. By default, fields with empty or
2805 // default values are omitted from API requests. See
2806 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2807 // details.
2808 ForceSendFields []string `json:"-"`
2809 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
2810 // requests with the JSON null value. By default, fields with empty values are
2811 // omitted from API requests. See
2812 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2813 NullFields []string `json:"-"`
2814 }
2815
2816 func (s EvaluateUserConsentsResponse) MarshalJSON() ([]byte, error) {
2817 type NoMethod EvaluateUserConsentsResponse
2818 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2819 }
2820
2821 // ExplainDataAccessConsentInfo: The enforcing consent's metadata.
2822 type ExplainDataAccessConsentInfo struct {
2823 // CascadeOrigins: The compartment base resources that matched a cascading
2824 // policy. Each resource has the following format:
2825 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStor
2826 // es/{fhir_store_id}/fhir/{resource_type}/{resource_id}`
2827 CascadeOrigins []string `json:"cascadeOrigins,omitempty"`
2828 // ConsentResource: The resource name of this consent resource, in the format:
2829 // `projects/{project_id}/locations/{location}/datasets/{dataset_id}/fhirStores/
2830 // {fhir_store_id}/fhir/Consent/{resource_id}`.
2831 ConsentResource string `json:"consentResource,omitempty"`
2832 // EnforcementTime: Last enforcement timestamp of this consent resource.
2833 EnforcementTime string `json:"enforcementTime,omitempty"`
2834 // MatchingAccessorScopes: A list of all the matching accessor scopes of this
2835 // consent policy that enforced ExplainDataAccessConsentScope.accessor_scope.
2836 MatchingAccessorScopes []*ConsentAccessorScope `json:"matchingAccessorScopes,omitempty"`
2837 // PatientConsentOwner: The patient owning the consent (only applicable for
2838 // patient consents), in the format:
2839 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStor
2840 // es/{fhir_store_id}/fhir/Patient/{patient_id}`
2841 PatientConsentOwner string `json:"patientConsentOwner,omitempty"`
2842 // Type: The policy type of consent resource (e.g. PATIENT, ADMIN).
2843 //
2844 // Possible values:
2845 // "CONSENT_POLICY_TYPE_UNSPECIFIED" - Unspecified policy type.
2846 // "CONSENT_POLICY_TYPE_PATIENT" - Consent represent a patient consent.
2847 // "CONSENT_POLICY_TYPE_ADMIN" - Consent represent an admin consent.
2848 Type string `json:"type,omitempty"`
2849 // Variants: The consent's variant combinations. A single consent may have
2850 // multiple variants.
2851 //
2852 // Possible values:
2853 // "CONSENT_VARIANT_UNSPECIFIED" - Consent variant unspecified.
2854 // "CONSENT_VARIANT_STANDARD" - Consent is a standard patient or admin
2855 // consent.
2856 // "CONSENT_VARIANT_CASCADE" - Consent is a cascading consent.
2857 Variants []string `json:"variants,omitempty"`
2858 // ForceSendFields is a list of field names (e.g. "CascadeOrigins") to
2859 // unconditionally include in API requests. By default, fields with empty or
2860 // default values are omitted from API requests. See
2861 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2862 // details.
2863 ForceSendFields []string `json:"-"`
2864 // NullFields is a list of field names (e.g. "CascadeOrigins") to include in
2865 // API requests with the JSON null value. By default, fields with empty values
2866 // are omitted from API requests. See
2867 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2868 NullFields []string `json:"-"`
2869 }
2870
2871 func (s ExplainDataAccessConsentInfo) MarshalJSON() ([]byte, error) {
2872 type NoMethod ExplainDataAccessConsentInfo
2873 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2874 }
2875
2876 // ExplainDataAccessConsentScope: A single consent scope that provides info on
2877 // who has access to the requested resource scope for a particular purpose and
2878 // environment, enforced by which consent.
2879 type ExplainDataAccessConsentScope struct {
2880 // AccessorScope: The accessor scope that describes who can access, for what
2881 // purpose, and in which environment.
2882 AccessorScope *ConsentAccessorScope `json:"accessorScope,omitempty"`
2883 // Decision: Whether the current consent scope is permitted or denied access on
2884 // the requested resource.
2885 //
2886 // Possible values:
2887 // "CONSENT_DECISION_TYPE_UNSPECIFIED" - Unspecified consent decision type.
2888 // "CONSENT_DECISION_TYPE_PERMIT" - Consent permitted access.
2889 // "CONSENT_DECISION_TYPE_DENY" - Consent denied access.
2890 Decision string `json:"decision,omitempty"`
2891 // EnforcingConsents: Metadata of the consent resources that enforce the
2892 // consent scope's access.
2893 EnforcingConsents []*ExplainDataAccessConsentInfo `json:"enforcingConsents,omitempty"`
2894 // Exceptions: Other consent scopes that created exceptions within this scope.
2895 Exceptions []*ExplainDataAccessConsentScope `json:"exceptions,omitempty"`
2896 // ForceSendFields is a list of field names (e.g. "AccessorScope") to
2897 // unconditionally include in API requests. By default, fields with empty or
2898 // default values are omitted from API requests. See
2899 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2900 // details.
2901 ForceSendFields []string `json:"-"`
2902 // NullFields is a list of field names (e.g. "AccessorScope") to include in API
2903 // requests with the JSON null value. By default, fields with empty values are
2904 // omitted from API requests. See
2905 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2906 NullFields []string `json:"-"`
2907 }
2908
2909 func (s ExplainDataAccessConsentScope) MarshalJSON() ([]byte, error) {
2910 type NoMethod ExplainDataAccessConsentScope
2911 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2912 }
2913
2914 // ExplainDataAccessResponse: List of consent scopes that are applicable to the
2915 // explained access on a given resource.
2916 type ExplainDataAccessResponse struct {
2917 // ConsentScopes: List of applicable consent scopes. Sorted in order of actor
2918 // such that scopes belonging to the same actor will be adjacent to each other
2919 // in the list.
2920 ConsentScopes []*ExplainDataAccessConsentScope `json:"consentScopes,omitempty"`
2921 // Warning: Warnings associated with this response. It inform user with
2922 // exceeded scope limit errors.
2923 Warning string `json:"warning,omitempty"`
2924
2925 // ServerResponse contains the HTTP response code and headers from the server.
2926 googleapi.ServerResponse `json:"-"`
2927 // ForceSendFields is a list of field names (e.g. "ConsentScopes") to
2928 // unconditionally include in API requests. By default, fields with empty or
2929 // default values are omitted from API requests. See
2930 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2931 // details.
2932 ForceSendFields []string `json:"-"`
2933 // NullFields is a list of field names (e.g. "ConsentScopes") to include in API
2934 // requests with the JSON null value. By default, fields with empty values are
2935 // omitted from API requests. See
2936 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2937 NullFields []string `json:"-"`
2938 }
2939
2940 func (s ExplainDataAccessResponse) MarshalJSON() ([]byte, error) {
2941 type NoMethod ExplainDataAccessResponse
2942 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2943 }
2944
2945 // ExportDicomDataRequest: Exports data from the specified DICOM store. If a
2946 // given resource, such as a DICOM object with the same SOPInstance UID,
2947 // already exists in the output, it is overwritten with the version in the
2948 // source dataset. Exported DICOM data persists when the DICOM store from which
2949 // it was exported is deleted.
2950 type ExportDicomDataRequest struct {
2951 // BigqueryDestination: The BigQuery output destination. You can only export to
2952 // a BigQuery dataset that's in the same project as the DICOM store you're
2953 // exporting from. The Cloud Healthcare Service Agent requires two IAM roles on
2954 // the BigQuery location: `roles/bigquery.dataEditor` and
2955 // `roles/bigquery.jobUser`.
2956 BigqueryDestination *GoogleCloudHealthcareV1beta1DicomBigQueryDestination `json:"bigqueryDestination,omitempty"`
2957 // FilterConfig: Specifies the filter configuration.
2958 FilterConfig *DicomFilterConfig `json:"filterConfig,omitempty"`
2959 // GcsDestination: The Cloud Storage output destination. The Cloud Healthcare
2960 // Service Agent requires the `roles/storage.objectAdmin` Cloud IAM roles on
2961 // the Cloud Storage location.
2962 GcsDestination *GoogleCloudHealthcareV1beta1DicomGcsDestination `json:"gcsDestination,omitempty"`
2963 // ForceSendFields is a list of field names (e.g. "BigqueryDestination") to
2964 // unconditionally include in API requests. By default, fields with empty or
2965 // default values are omitted from API requests. See
2966 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2967 // details.
2968 ForceSendFields []string `json:"-"`
2969 // NullFields is a list of field names (e.g. "BigqueryDestination") to include
2970 // in API requests with the JSON null value. By default, fields with empty
2971 // values are omitted from API requests. See
2972 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2973 NullFields []string `json:"-"`
2974 }
2975
2976 func (s ExportDicomDataRequest) MarshalJSON() ([]byte, error) {
2977 type NoMethod ExportDicomDataRequest
2978 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2979 }
2980
2981 // ExportDicomDataResponse: Returns additional information in regards to a
2982 // completed DICOM store export.
2983 type ExportDicomDataResponse struct {
2984 }
2985
2986 // ExportMessagesRequest: Request to schedule an export.
2987 type ExportMessagesRequest struct {
2988 // EndTime: The end of the range in `send_time` (MSH.7,
2989 // https://www.hl7.org/documentcenter/public_temp_2E58C1F9-1C23-BA17-0C6126475344DA9D/wg/conf/HL7MSH.htm)
2990 // to process. If not specified, the time when the export is scheduled is used.
2991 // This value has to come after the `start_time` defined below. Only messages
2992 // whose `send_time` lies in the range `start_time` (inclusive) to `end_time`
2993 // (exclusive) are exported.
2994 EndTime string `json:"endTime,omitempty"`
2995 // Filter: Restricts messages exported to those matching a filter, only
2996 // applicable to PubsubDestination and GcsDestination. The following syntax is
2997 // available: * A string field value can be written as text inside quotation
2998 // marks, for example "query text". The only valid relational operation for
2999 // text fields is equality (`=`), where text is searched within the field,
3000 // rather than having the field be equal to the text. For example, "Comment =
3001 // great" returns messages with `great` in the comment field. * A number field
3002 // value can be written as an integer, a decimal, or an exponential. The valid
3003 // relational operators for number fields are the equality operator (`=`),
3004 // along with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note
3005 // that there is no inequality (`!=`) operator. You can prepend the `NOT`
3006 // operator to an expression to negate it. * A date field value must be written
3007 // in the `yyyy-mm-dd` format. Fields with date and time use the RFC3339 time
3008 // format. Leading zeros are required for one-digit months and days. The valid
3009 // relational operators for date fields are the equality operator (`=`) , along
3010 // with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that
3011 // there is no inequality (`!=`) operator. You can prepend the `NOT` operator
3012 // to an expression to negate it. * Multiple field query expressions can be
3013 // combined in one query by adding `AND` or `OR` operators between the
3014 // expressions. If a boolean operator appears within a quoted string, it is not
3015 // treated as special, and is just another part of the character string to be
3016 // matched. You can prepend the `NOT` operator to an expression to negate it.
3017 // The following fields and functions are available for filtering: *
3018 // `message_type`, from the MSH-9.1 field. For example, `NOT message_type =
3019 // "ADT". * `send_date` or `sendDate`, the YYYY-MM-DD date the message was
3020 // sent in the dataset's time_zone, from the MSH-7 segment. For example,
3021 // `send_date < "2017-01-02". * `send_time`, the timestamp when the message
3022 // was sent, using the RFC3339 time format for comparisons, from the MSH-7
3023 // segment. For example, `send_time < "2017-01-02T00:00:00-05:00". *
3024 // `create_time`, the timestamp when the message was created in the HL7v2
3025 // store. Use the RFC3339 time format for comparisons. For example,
3026 // `create_time < "2017-01-02T00:00:00-05:00". * `send_facility`, the care
3027 // center that the message came from, from the MSH-4 segment. For example,
3028 // `send_facility = "ABC". Note: The filter will be applied to every message
3029 // in the HL7v2 store whose `send_time` lies in the range defined by the
3030 // `start_time` and the `end_time`. Even if the filter only matches a small set
3031 // of messages, the export operation can still take a long time to finish when
3032 // a lot of messages are between the specified `start_time` and `end_time`
3033 // range.
3034 Filter string `json:"filter,omitempty"`
3035 // GcsDestination: Export to a Cloud Storage destination.
3036 GcsDestination *GcsDestination `json:"gcsDestination,omitempty"`
3037 // PubsubDestination: Export messages to a Pub/Sub topic.
3038 PubsubDestination *PubsubDestination `json:"pubsubDestination,omitempty"`
3039 // StartTime: The start of the range in `send_time` (MSH.7,
3040 // https://www.hl7.org/documentcenter/public_temp_2E58C1F9-1C23-BA17-0C6126475344DA9D/wg/conf/HL7MSH.htm)
3041 // to process. If not specified, the UNIX epoch (1970-01-01T00:00:00Z) is used.
3042 // This value has to come before the `end_time` defined below. Only messages
3043 // whose `send_time` lies in the range `start_time` (inclusive) to `end_time`
3044 // (exclusive) are exported.
3045 StartTime string `json:"startTime,omitempty"`
3046 // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally
3047 // include in API requests. By default, fields with empty or default values are
3048 // omitted from API requests. See
3049 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3050 // details.
3051 ForceSendFields []string `json:"-"`
3052 // NullFields is a list of field names (e.g. "EndTime") to include in API
3053 // requests with the JSON null value. By default, fields with empty values are
3054 // omitted from API requests. See
3055 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3056 NullFields []string `json:"-"`
3057 }
3058
3059 func (s ExportMessagesRequest) MarshalJSON() ([]byte, error) {
3060 type NoMethod ExportMessagesRequest
3061 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3062 }
3063
3064 // ExportMessagesResponse: Final response for the export operation. This
3065 // structure is included in the response to describe the detailed outcome.
3066 type ExportMessagesResponse struct {
3067 }
3068
3069 // ExportResourcesHistoryRequest: Request to export the history of resources.
3070 type ExportResourcesHistoryRequest struct {
3071 // Since: If provided, only resources versions updated after this time are
3072 // exported. The time uses the format YYYY-MM-DDThh:mm:ss.sss+zz:zz. For
3073 // example, `2015-02-07T13:28:17.239+02:00` or `2017-01-01T00:00:00Z`. The time
3074 // must be specified to the second and include a time zone.
3075 Since string `json:"_since,omitempty"`
3076 // Type: String of comma-delimited FHIR resource types. If provided, only
3077 // resources of the specified resource type(s) are exported.
3078 Type string `json:"_type,omitempty"`
3079 // GcsDestination: The Cloud Storage output destination. The Healthcare Service
3080 // Agent account requires the `roles/storage.objectAdmin` role on the Cloud
3081 // Storage location. The exported outputs are organized by FHIR resource types.
3082 // The server creates one or more objects per resource type depending on the
3083 // volume of the resources exported. When there is only one object per resource
3084 // type, the object name is in the form of
3085 // `{operation_id})_history_{resource_type}`. When there are multiple objects
3086 // for a given resource type, the object names are in the form of
3087 // `{operation_id}_history_{resource_type}-{index}-of-{total}`. Each object
3088 // contains newline delimited JSON, and each line is a FHIR history bundle
3089 // containing the history for a single resource.
3090 GcsDestination *GoogleCloudHealthcareV1beta1FhirGcsDestination `json:"gcsDestination,omitempty"`
3091 // MaxResourceVersions: If provided and non-zero, places a limit on the number
3092 // of resource versions that are returned for a given resource. For example, if
3093 // the limit is `100` and a resource has over 100 versions, only the 100 most
3094 // recent versions will be returned. Must be positive.
3095 MaxResourceVersions int64 `json:"maxResourceVersions,omitempty,string"`
3096 // ForceSendFields is a list of field names (e.g. "Since") to unconditionally
3097 // include in API requests. By default, fields with empty or default values are
3098 // omitted from API requests. See
3099 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3100 // details.
3101 ForceSendFields []string `json:"-"`
3102 // NullFields is a list of field names (e.g. "Since") to include in API
3103 // requests with the JSON null value. By default, fields with empty values are
3104 // omitted from API requests. See
3105 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3106 NullFields []string `json:"-"`
3107 }
3108
3109 func (s ExportResourcesHistoryRequest) MarshalJSON() ([]byte, error) {
3110 type NoMethod ExportResourcesHistoryRequest
3111 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3112 }
3113
3114 // ExportResourcesRequest: Request to export resources.
3115 type ExportResourcesRequest struct {
3116 // Since: If provided, only resources updated after this time are exported. The
3117 // time uses the format YYYY-MM-DDThh:mm:ss.sss+zz:zz. For example,
3118 // `2015-02-07T13:28:17.239+02:00` or `2017-01-01T00:00:00Z`. The time must be
3119 // specified to the second and include a time zone.
3120 Since string `json:"_since,omitempty"`
3121 // Type: String of comma-delimited FHIR resource types. If provided, only
3122 // resources of the specified resource type(s) are exported.
3123 Type string `json:"_type,omitempty"`
3124 // BigqueryDestination: The BigQuery output destination. The Cloud Healthcare
3125 // Service Agent requires two IAM roles on the BigQuery location:
3126 // `roles/bigquery.dataEditor` and `roles/bigquery.jobUser`. The output is one
3127 // BigQuery table per resource type. Unlike when setting `BigQueryDestination`
3128 // for `StreamConfig`, `ExportResources` does not create BigQuery views.
3129 BigqueryDestination *GoogleCloudHealthcareV1beta1FhirBigQueryDestination `json:"bigqueryDestination,omitempty"`
3130 // GcsDestination: The Cloud Storage output destination. The Cloud Healthcare
3131 // Service Agent requires the `roles/storage.objectAdmin` Cloud IAM roles on
3132 // the Cloud Storage location. The exported outputs are organized by FHIR
3133 // resource types. The server creates one object per resource type. Each object
3134 // contains newline delimited JSON, and each line is a FHIR resource.
3135 GcsDestination *GoogleCloudHealthcareV1beta1FhirGcsDestination `json:"gcsDestination,omitempty"`
3136 // ForceSendFields is a list of field names (e.g. "Since") to unconditionally
3137 // include in API requests. By default, fields with empty or default values are
3138 // omitted from API requests. See
3139 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3140 // details.
3141 ForceSendFields []string `json:"-"`
3142 // NullFields is a list of field names (e.g. "Since") to include in API
3143 // requests with the JSON null value. By default, fields with empty values are
3144 // omitted from API requests. See
3145 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3146 NullFields []string `json:"-"`
3147 }
3148
3149 func (s ExportResourcesRequest) MarshalJSON() ([]byte, error) {
3150 type NoMethod ExportResourcesRequest
3151 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3152 }
3153
3154 // Expr: Represents a textual expression in the Common Expression Language
3155 // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics
3156 // of CEL are documented at https://github.com/google/cel-spec. Example
3157 // (Comparison): title: "Summary size limit" description: "Determines if a
3158 // summary is less than 100 chars" expression: "document.summary.size() < 100"
3159 // Example (Equality): title: "Requestor is owner" description: "Determines if
3160 // requestor is the document owner" expression: "document.owner ==
3161 // request.auth.claims.email" Example (Logic): title: "Public documents"
3162 // description: "Determine whether the document should be publicly visible"
3163 // expression: "document.type != 'private' && document.type != 'internal'"
3164 // Example (Data Manipulation): title: "Notification string" description:
3165 // "Create a notification string with a timestamp." expression: "'New message
3166 // received at ' + string(document.create_time)" The exact variables and
3167 // functions that may be referenced within an expression are determined by the
3168 // service that evaluates it. See the service documentation for additional
3169 // information.
3170 type Expr struct {
3171 // Description: Optional. Description of the expression. This is a longer text
3172 // which describes the expression, e.g. when hovered over it in a UI.
3173 Description string `json:"description,omitempty"`
3174 // Expression: Textual representation of an expression in Common Expression
3175 // Language syntax.
3176 Expression string `json:"expression,omitempty"`
3177 // Location: Optional. String indicating the location of the expression for
3178 // error reporting, e.g. a file name and a position in the file.
3179 Location string `json:"location,omitempty"`
3180 // Title: Optional. Title for the expression, i.e. a short string describing
3181 // its purpose. This can be used e.g. in UIs which allow to enter the
3182 // expression.
3183 Title string `json:"title,omitempty"`
3184 // ForceSendFields is a list of field names (e.g. "Description") to
3185 // unconditionally include in API requests. By default, fields with empty or
3186 // default values are omitted from API requests. See
3187 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3188 // details.
3189 ForceSendFields []string `json:"-"`
3190 // NullFields is a list of field names (e.g. "Description") to include in API
3191 // requests with the JSON null value. By default, fields with empty values are
3192 // omitted from API requests. See
3193 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3194 NullFields []string `json:"-"`
3195 }
3196
3197 func (s Expr) MarshalJSON() ([]byte, error) {
3198 type NoMethod Expr
3199 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3200 }
3201
3202 // Feature: A feature of an entity mention.
3203 type Feature struct {
3204 // Confidence: The model's confidence in this feature annotation. A number
3205 // between 0 and 1.
3206 Confidence float64 `json:"confidence,omitempty"`
3207 // Value: The value of this feature annotation. Its range depends on the type
3208 // of the feature.
3209 Value string `json:"value,omitempty"`
3210 // ForceSendFields is a list of field names (e.g. "Confidence") to
3211 // unconditionally include in API requests. By default, fields with empty or
3212 // default values are omitted from API requests. See
3213 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3214 // details.
3215 ForceSendFields []string `json:"-"`
3216 // NullFields is a list of field names (e.g. "Confidence") to include in API
3217 // requests with the JSON null value. By default, fields with empty values are
3218 // omitted from API requests. See
3219 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3220 NullFields []string `json:"-"`
3221 }
3222
3223 func (s Feature) MarshalJSON() ([]byte, error) {
3224 type NoMethod Feature
3225 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3226 }
3227
3228 func (s *Feature) UnmarshalJSON(data []byte) error {
3229 type NoMethod Feature
3230 var s1 struct {
3231 Confidence gensupport.JSONFloat64 `json:"confidence"`
3232 *NoMethod
3233 }
3234 s1.NoMethod = (*NoMethod)(s)
3235 if err := json.Unmarshal(data, &s1); err != nil {
3236 return err
3237 }
3238 s.Confidence = float64(s1.Confidence)
3239 return nil
3240 }
3241
3242 // FhirConfig: Specifies how to handle de-identification of a FHIR store.
3243 type FhirConfig struct {
3244 // DefaultKeepExtensions: The behaviour for handling FHIR extensions that
3245 // aren't otherwise specified for de-identification. If true, all extensions
3246 // are preserved during de-identification by default. If false or unspecified,
3247 // all extensions are removed during de-identification by default.
3248 DefaultKeepExtensions bool `json:"defaultKeepExtensions,omitempty"`
3249 // FieldMetadataList: Specifies FHIR paths to match and how to transform them.
3250 // Any field that is not matched by a FieldMetadata is passed through to the
3251 // output dataset unmodified. All extensions will be processed according to
3252 // `default_keep_extensions`. If a field can be matched by more than one
3253 // FieldMetadata, the first FieldMetadata.Action is applied.
3254 FieldMetadataList []*FieldMetadata `json:"fieldMetadataList,omitempty"`
3255 // ForceSendFields is a list of field names (e.g. "DefaultKeepExtensions") to
3256 // unconditionally include in API requests. By default, fields with empty or
3257 // default values are omitted from API requests. See
3258 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3259 // details.
3260 ForceSendFields []string `json:"-"`
3261 // NullFields is a list of field names (e.g. "DefaultKeepExtensions") to
3262 // include in API requests with the JSON null value. By default, fields with
3263 // empty values are omitted from API requests. See
3264 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3265 NullFields []string `json:"-"`
3266 }
3267
3268 func (s FhirConfig) MarshalJSON() ([]byte, error) {
3269 type NoMethod FhirConfig
3270 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3271 }
3272
3273 // FhirFieldConfig: Specifies how to handle the de-identification of a FHIR
3274 // store.
3275 type FhirFieldConfig struct {
3276 // FieldMetadataList: Specifies FHIR paths to match and how to transform them.
3277 // Any field that is not matched by a FieldMetadata `action` is passed through
3278 // to the output dataset unmodified. All extensions will be processed according
3279 // to keep_extensions. If a field can be matched by more than one FieldMetadata
3280 // `action`, the first `action` option is applied. Overrides options and the
3281 // union field `profile` in FhirFieldConfig.
3282 FieldMetadataList []*GoogleCloudHealthcareV1beta1DeidentifyFieldMetadata `json:"fieldMetadataList,omitempty"`
3283 // Options: Specifies additional options, overriding the base ProfileType.
3284 Options *GoogleCloudHealthcareV1beta1DeidentifyOptions `json:"options,omitempty"`
3285 // ProfileType: Base profile type for handling FHIR fields.
3286 //
3287 // Possible values:
3288 // "PROFILE_TYPE_UNSPECIFIED" - No profile provided. Same as `BASIC`.
3289 // "KEEP_ALL" - Keep all fields.
3290 // "BASIC" - Transforms known [HIPAA
3291 // 18](https://www.hhs.gov/hipaa/for-professionals/privacy/special-topics/de-ide
3292 // ntification/index.html#standard) fields and cleans known unstructured text
3293 // fields.
3294 // "CLEAN_ALL" - Cleans all supported tags. Applies to types: Code, Date,
3295 // DateTime, Decimal, HumanName, Id, LanguageCode, Markdown, Oid, String, Uri,
3296 // Uuid, Xhtml.
3297 ProfileType string `json:"profileType,omitempty"`
3298 // ForceSendFields is a list of field names (e.g. "FieldMetadataList") to
3299 // unconditionally include in API requests. By default, fields with empty or
3300 // default values are omitted from API requests. See
3301 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3302 // details.
3303 ForceSendFields []string `json:"-"`
3304 // NullFields is a list of field names (e.g. "FieldMetadataList") to include in
3305 // API requests with the JSON null value. By default, fields with empty values
3306 // are omitted from API requests. See
3307 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3308 NullFields []string `json:"-"`
3309 }
3310
3311 func (s FhirFieldConfig) MarshalJSON() ([]byte, error) {
3312 type NoMethod FhirFieldConfig
3313 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3314 }
3315
3316 // FhirFilter: Filter configuration.
3317 type FhirFilter struct {
3318 // Resources: List of resources to include in the output. If this list is empty
3319 // or not specified, all resources are included in the output.
3320 Resources *Resources `json:"resources,omitempty"`
3321 // ForceSendFields is a list of field names (e.g. "Resources") to
3322 // unconditionally include in API requests. By default, fields with empty or
3323 // default values are omitted from API requests. See
3324 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3325 // details.
3326 ForceSendFields []string `json:"-"`
3327 // NullFields is a list of field names (e.g. "Resources") to include in API
3328 // requests with the JSON null value. By default, fields with empty values are
3329 // omitted from API requests. See
3330 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3331 NullFields []string `json:"-"`
3332 }
3333
3334 func (s FhirFilter) MarshalJSON() ([]byte, error) {
3335 type NoMethod FhirFilter
3336 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3337 }
3338
3339 // FhirNotificationConfig: Contains the configuration for FHIR notifications.
3340 type FhirNotificationConfig struct {
3341 // PubsubTopic: The Pub/Sub (https://cloud.google.com/pubsub/docs/) topic that
3342 // notifications of changes are published on. Supplied by the client. The
3343 // notification is a `PubsubMessage` with the following fields: *
3344 // `PubsubMessage.Data` contains the resource name. * `PubsubMessage.MessageId`
3345 // is the ID of this notification. It is guaranteed to be unique within the
3346 // topic. * `PubsubMessage.PublishTime` is the time when the message was
3347 // published. Note that notifications are only sent if the topic is non-empty.
3348 // Topic names (https://cloud.google.com/pubsub/docs/overview#names) must be
3349 // scoped to a project. The Cloud Healthcare API service account,
3350 // [email protected], must have publisher
3351 // permissions on the given Pub/Sub topic. Not having adequate permissions
3352 // causes the calls that send notifications to fail
3353 // (https://cloud.google.com/healthcare-api/docs/permissions-healthcare-api-gcp-products#dicom_fhir_and_hl7v2_store_cloud_pubsub_permissions).
3354 // If a notification can't be published to Pub/Sub, errors are logged to Cloud
3355 // Logging. For more information, see Viewing error logs in Cloud Logging
3356 // (https://cloud.google.com/healthcare-api/docs/how-tos/logging).
3357 PubsubTopic string `json:"pubsubTopic,omitempty"`
3358 // SendFullResource: Whether to send full FHIR resource to this Pub/Sub topic
3359 // for Create and Update operation. The default value is false. Note that
3360 // setting this to true does not guarantee that all resources will be sent in
3361 // the format of full FHIR resource. When a resource change is too large or
3362 // during heavy traffic, only the resource name will be sent. Clients should
3363 // always check the "payloadType" label from a Pub/Sub message to determine
3364 // whether it needs to fetch the full resource as a separate operation.
3365 SendFullResource bool `json:"sendFullResource,omitempty"`
3366 // SendPreviousResourceOnDelete: Whether to send full FHIR resource to this
3367 // Pub/Sub topic for deleting FHIR resource. The default value is false. Note
3368 // that setting this to true does not guarantee that all previous resources
3369 // will be sent in the format of full FHIR resource. When a resource change is
3370 // too large or during heavy traffic, only the resource name will be sent.
3371 // Clients should always check the "payloadType" label from a Pub/Sub message
3372 // to determine whether it needs to fetch the full previous resource as a
3373 // separate operation.
3374 SendPreviousResourceOnDelete bool `json:"sendPreviousResourceOnDelete,omitempty"`
3375 // ForceSendFields is a list of field names (e.g. "PubsubTopic") to
3376 // unconditionally include in API requests. By default, fields with empty or
3377 // default values are omitted from API requests. See
3378 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3379 // details.
3380 ForceSendFields []string `json:"-"`
3381 // NullFields is a list of field names (e.g. "PubsubTopic") to include in API
3382 // requests with the JSON null value. By default, fields with empty values are
3383 // omitted from API requests. See
3384 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3385 NullFields []string `json:"-"`
3386 }
3387
3388 func (s FhirNotificationConfig) MarshalJSON() ([]byte, error) {
3389 type NoMethod FhirNotificationConfig
3390 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3391 }
3392
3393 // FhirOutput: Details about the FHIR store to write the output to.
3394 type FhirOutput struct {
3395 // FhirStore: Name of the output FHIR store, which must already exist. You must
3396 // grant the healthcare.fhirResources.update permission on the destination
3397 // store to your project's **Cloud Healthcare Service Agent** service account
3398 // (https://cloud.google.com/healthcare/docs/how-tos/permissions-healthcare-api-gcp-products#the_cloud_healthcare_service_agent).
3399 // The destination store must set enableUpdateCreate to true. The destination
3400 // store must use FHIR version R4. Writing these resources will consume FHIR
3401 // operations quota from the project containing the source data. De-identify
3402 // operation metadata is only generated for DICOM de-identification operations.
3403 FhirStore string `json:"fhirStore,omitempty"`
3404 // ForceSendFields is a list of field names (e.g. "FhirStore") to
3405 // unconditionally include in API requests. By default, fields with empty or
3406 // default values are omitted from API requests. See
3407 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3408 // details.
3409 ForceSendFields []string `json:"-"`
3410 // NullFields is a list of field names (e.g. "FhirStore") to include in API
3411 // requests with the JSON null value. By default, fields with empty values are
3412 // omitted from API requests. See
3413 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3414 NullFields []string `json:"-"`
3415 }
3416
3417 func (s FhirOutput) MarshalJSON() ([]byte, error) {
3418 type NoMethod FhirOutput
3419 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3420 }
3421
3422 // FhirStore: Represents a FHIR store.
3423 type FhirStore struct {
3424 // BulkExportGcsDestination: Optional. FHIR bulk export exports resources to
3425 // the specified Cloud Storage destination. A Cloud Storage destination is a
3426 // URI for a Cloud Storage directory where result files will be written. Only
3427 // used in the spec-defined bulk $export methods. The Cloud Healthcare Service
3428 // Agent requires the `roles/storage.objectAdmin` Cloud IAM role on the
3429 // destination.
3430 BulkExportGcsDestination *BulkExportGcsDestination `json:"bulkExportGcsDestination,omitempty"`
3431 // ComplexDataTypeReferenceParsing: Enable parsing of references within complex
3432 // FHIR data types such as Extensions. If this value is set to ENABLED, then
3433 // features like referential integrity and Bundle reference rewriting apply to
3434 // all references. If this flag has not been specified the behavior of the FHIR
3435 // store will not change, references in complex data types will not be parsed.
3436 // New stores will have this value set to ENABLED after a notification period.
3437 // Warning: turning on this flag causes processing existing resources to fail
3438 // if they contain references to non-existent resources. Cannot be disabled in
3439 // R5.
3440 //
3441 // Possible values:
3442 // "COMPLEX_DATA_TYPE_REFERENCE_PARSING_UNSPECIFIED" - No parsing behavior
3443 // specified. This is the same as DISABLED for backwards compatibility.
3444 // "DISABLED" - References in complex data types are ignored.
3445 // "ENABLED" - References in complex data types are parsed.
3446 ComplexDataTypeReferenceParsing string `json:"complexDataTypeReferenceParsing,omitempty"`
3447 // ConsentConfig: Optional. Specifies whether this store has consent
3448 // enforcement. Not available for DSTU2 FHIR version due to absence of Consent
3449 // resources. Not supported for R5 FHIR version.
3450 ConsentConfig *ConsentConfig `json:"consentConfig,omitempty"`
3451 // DefaultSearchHandlingStrict: If true, overrides the default search behavior
3452 // for this FHIR store to `handling=strict` which returns an error for
3453 // unrecognized search parameters. If false, uses the FHIR specification
3454 // default `handling=lenient` which ignores unrecognized search parameters. The
3455 // handling can always be changed from the default on an individual API call by
3456 // setting the HTTP header `Prefer: handling=strict` or `Prefer:
3457 // handling=lenient`. Defaults to false.
3458 DefaultSearchHandlingStrict bool `json:"defaultSearchHandlingStrict,omitempty"`
3459 // DisableReferentialIntegrity: Immutable. Whether to disable referential
3460 // integrity in this FHIR store. This field is immutable after FHIR store
3461 // creation. The default value is false, meaning that the API enforces
3462 // referential integrity and fails the requests that result in inconsistent
3463 // state in the FHIR store. When this field is set to true, the API skips
3464 // referential integrity checks. Consequently, operations that rely on
3465 // references, such as GetPatientEverything, do not return all the results if
3466 // broken references exist.
3467 DisableReferentialIntegrity bool `json:"disableReferentialIntegrity,omitempty"`
3468 // DisableResourceVersioning: Immutable. Whether to disable resource versioning
3469 // for this FHIR store. This field can not be changed after the creation of
3470 // FHIR store. If set to false, all write operations cause historical versions
3471 // to be recorded automatically. The historical versions can be fetched through
3472 // the history APIs, but cannot be updated. If set to true, no historical
3473 // versions are kept. The server sends errors for attempts to read the
3474 // historical versions. Defaults to false.
3475 DisableResourceVersioning bool `json:"disableResourceVersioning,omitempty"`
3476 // EnableHistoryModifications: Optional. Whether to allow the
3477 // [ImportResourcesHistory] and [ExecuteBundle] APIs to accept history bundles,
3478 // and directly insert and overwrite historical resource versions into the FHIR
3479 // store. Changing resource histories creates resource interactions that have
3480 // occurred in the past which clients might not allow. If set to false,
3481 // [ImportResourcesHistory] and [ExecuteBundle] requests will return errors.
3482 EnableHistoryModifications bool `json:"enableHistoryModifications,omitempty"`
3483 // EnableUpdateCreate: Whether this FHIR store has the updateCreate capability
3484 // (https://www.hl7.org/fhir/capabilitystatement-definitions.html#CapabilityStatement.rest.resource.updateCreate).
3485 // This determines if the client can use an Update operation to create a new
3486 // resource with a client-specified ID. If false, all IDs are server-assigned
3487 // through the Create operation and attempts to update a non-existent resource
3488 // return errors. It is strongly advised not to include or encode any sensitive
3489 // data such as patient identifiers in client-specified resource IDs. Those IDs
3490 // are part of the FHIR resource path recorded in Cloud audit logs and Pub/Sub
3491 // notifications. Those IDs can also be contained in reference fields within
3492 // other resources. Defaults to false.
3493 EnableUpdateCreate bool `json:"enableUpdateCreate,omitempty"`
3494 // Labels: User-supplied key-value pairs used to organize FHIR stores. Label
3495 // keys must be between 1 and 63 characters long, have a UTF-8 encoding of
3496 // maximum 128 bytes, and must conform to the following PCRE regular
3497 // expression: \p{Ll}\p{Lo}{0,62} Label values are optional, must be between 1
3498 // and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must
3499 // conform to the following PCRE regular expression:
3500 // [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64 labels can be associated with a
3501 // given store.
3502 Labels map[string]string `json:"labels,omitempty"`
3503 // Name: Output only. Identifier. Resource name of the FHIR store, of the form
3504 // `projects/{project_id}/locations/{location}/datasets/{dataset_id}/fhirStores/
3505 // {fhir_store_id}`.
3506 Name string `json:"name,omitempty"`
3507 // NotificationConfig: Deprecated. Use `notification_configs` instead. If
3508 // non-empty, publish all resource modifications of this FHIR store to this
3509 // destination. The Pub/Sub message attributes contain a map with a string
3510 // describing the action that has triggered the notification. For example,
3511 // "action":"CreateResource". Not supported in R5. Use `notification_configs`
3512 // instead.
3513 NotificationConfig *NotificationConfig `json:"notificationConfig,omitempty"`
3514 // NotificationConfigs: Specifies where and whether to send notifications upon
3515 // changes to a Fhir store.
3516 NotificationConfigs []*FhirNotificationConfig `json:"notificationConfigs,omitempty"`
3517 // SearchConfig: Configuration for how FHIR resources can be searched.
3518 SearchConfig *SearchConfig `json:"searchConfig,omitempty"`
3519 // StreamConfigs: A list of streaming configs that configure the destinations
3520 // of streaming export for every resource mutation in this FHIR store. Each
3521 // store is allowed to have up to 10 streaming configs. After a new config is
3522 // added, the next resource mutation is streamed to the new location in
3523 // addition to the existing ones. When a location is removed from the list, the
3524 // server stops streaming to that location. Before adding a new config, you
3525 // must add the required `bigquery.dataEditor`
3526 // (https://cloud.google.com/bigquery/docs/access-control#bigquery.dataEditor)
3527 // role to your project's **Cloud Healthcare Service Agent** service account
3528 // (https://cloud.google.com/iam/docs/service-accounts). Some lag (typically on
3529 // the order of dozens of seconds) is expected before the results show up in
3530 // the streaming destination.
3531 StreamConfigs []*StreamConfig `json:"streamConfigs,omitempty"`
3532 // ValidationConfig: Configuration for how to validate incoming FHIR resources
3533 // against configured profiles.
3534 ValidationConfig *ValidationConfig `json:"validationConfig,omitempty"`
3535 // Version: Required. Immutable. The FHIR specification version that this FHIR
3536 // store supports natively. This field is immutable after store creation.
3537 // Requests are rejected if they contain FHIR resources of a different version.
3538 // Version is required for every FHIR store.
3539 //
3540 // Possible values:
3541 // "VERSION_UNSPECIFIED" - VERSION_UNSPECIFIED is treated as STU3 to
3542 // accommodate the existing FHIR stores.
3543 // "DSTU2" - Draft Standard for Trial Use, [Release
3544 // 2](https://www.hl7.org/fhir/DSTU2)
3545 // "STU3" - Standard for Trial Use, [Release
3546 // 3](https://www.hl7.org/fhir/STU3)
3547 // "R4" - [Release 4](https://www.hl7.org/fhir/R4)
3548 // "R5" - [Release 5](https://www.hl7.org/fhir/R5)
3549 Version string `json:"version,omitempty"`
3550
3551 // ServerResponse contains the HTTP response code and headers from the server.
3552 googleapi.ServerResponse `json:"-"`
3553 // ForceSendFields is a list of field names (e.g. "BulkExportGcsDestination")
3554 // to unconditionally include in API requests. By default, fields with empty or
3555 // default values are omitted from API requests. See
3556 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3557 // details.
3558 ForceSendFields []string `json:"-"`
3559 // NullFields is a list of field names (e.g. "BulkExportGcsDestination") to
3560 // include in API requests with the JSON null value. By default, fields with
3561 // empty values are omitted from API requests. See
3562 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3563 NullFields []string `json:"-"`
3564 }
3565
3566 func (s FhirStore) MarshalJSON() ([]byte, error) {
3567 type NoMethod FhirStore
3568 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3569 }
3570
3571 // FhirStoreMetric: Count of resources and total storage size by type for a
3572 // given FHIR store.
3573 type FhirStoreMetric struct {
3574 // Count: The total count of FHIR resources in the store of this resource type.
3575 Count int64 `json:"count,omitempty,string"`
3576 // ResourceType: The FHIR resource type this metric applies to.
3577 ResourceType string `json:"resourceType,omitempty"`
3578 // StructuredStorageSizeBytes: The total amount of structured storage used by
3579 // FHIR resources of this resource type in the store.
3580 StructuredStorageSizeBytes int64 `json:"structuredStorageSizeBytes,omitempty,string"`
3581 // VersionedStorageSizeBytes: The total amount of versioned storage used by
3582 // versioned FHIR resources of this resource type in the store.
3583 VersionedStorageSizeBytes int64 `json:"versionedStorageSizeBytes,omitempty,string"`
3584 // ForceSendFields is a list of field names (e.g. "Count") to unconditionally
3585 // include in API requests. By default, fields with empty or default values are
3586 // omitted from API requests. See
3587 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3588 // details.
3589 ForceSendFields []string `json:"-"`
3590 // NullFields is a list of field names (e.g. "Count") to include in API
3591 // requests with the JSON null value. By default, fields with empty values are
3592 // omitted from API requests. See
3593 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3594 NullFields []string `json:"-"`
3595 }
3596
3597 func (s FhirStoreMetric) MarshalJSON() ([]byte, error) {
3598 type NoMethod FhirStoreMetric
3599 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3600 }
3601
3602 // FhirStoreMetrics: List of metrics for a given FHIR store.
3603 type FhirStoreMetrics struct {
3604 // Metrics: List of FhirStoreMetric by resource type.
3605 Metrics []*FhirStoreMetric `json:"metrics,omitempty"`
3606 // Name: The resource name of the FHIR store to get metrics for, in the format
3607 // `projects/{project_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}`.
3608 Name string `json:"name,omitempty"`
3609
3610 // ServerResponse contains the HTTP response code and headers from the server.
3611 googleapi.ServerResponse `json:"-"`
3612 // ForceSendFields is a list of field names (e.g. "Metrics") to unconditionally
3613 // include in API requests. By default, fields with empty or default values are
3614 // omitted from API requests. See
3615 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3616 // details.
3617 ForceSendFields []string `json:"-"`
3618 // NullFields is a list of field names (e.g. "Metrics") to include in API
3619 // requests with the JSON null value. By default, fields with empty values are
3620 // omitted from API requests. See
3621 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3622 NullFields []string `json:"-"`
3623 }
3624
3625 func (s FhirStoreMetrics) MarshalJSON() ([]byte, error) {
3626 type NoMethod FhirStoreMetrics
3627 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3628 }
3629
3630 // Field: A (sub) field of a type.
3631 type Field struct {
3632 // MaxOccurs: The maximum number of times this field can be repeated. 0 or -1
3633 // means unbounded.
3634 MaxOccurs int64 `json:"maxOccurs,omitempty"`
3635 // MinOccurs: The minimum number of times this field must be present/repeated.
3636 MinOccurs int64 `json:"minOccurs,omitempty"`
3637 // Name: The name of the field. For example, "PID-1" or just "1".
3638 Name string `json:"name,omitempty"`
3639 // Table: The HL7v2 table this field refers to. For example, PID-15 (Patient's
3640 // Primary Language) usually refers to table "0296".
3641 Table string `json:"table,omitempty"`
3642 // Type: The type of this field. A Type with this name must be defined in an
3643 // Hl7TypesConfig.
3644 Type string `json:"type,omitempty"`
3645 // ForceSendFields is a list of field names (e.g. "MaxOccurs") to
3646 // unconditionally include in API requests. By default, fields with empty or
3647 // default values are omitted from API requests. See
3648 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3649 // details.
3650 ForceSendFields []string `json:"-"`
3651 // NullFields is a list of field names (e.g. "MaxOccurs") to include in API
3652 // requests with the JSON null value. By default, fields with empty values are
3653 // omitted from API requests. See
3654 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3655 NullFields []string `json:"-"`
3656 }
3657
3658 func (s Field) MarshalJSON() ([]byte, error) {
3659 type NoMethod Field
3660 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3661 }
3662
3663 // FieldMetadata: Specifies FHIR paths to match, and how to handle
3664 // de-identification of matching fields.
3665 type FieldMetadata struct {
3666 // Action: Deidentify action for one field.
3667 //
3668 // Possible values:
3669 // "ACTION_UNSPECIFIED" - No action specified.
3670 // "TRANSFORM" - Transform the entire field based on transformations
3671 // specified in TextConfig. When the specified transformation cannot be applied
3672 // to a field, RedactConfig is used. For example, a Crypto Hash transformation
3673 // can't be applied to a FHIR Date field.
3674 // "INSPECT_AND_TRANSFORM" - Inspect and transform any found PHI.
3675 // "DO_NOT_TRANSFORM" - Do not transform.
3676 Action string `json:"action,omitempty"`
3677 // Paths: List of paths to FHIR fields to redact. Each path is a
3678 // period-separated list where each component is either a field name or FHIR
3679 // type name. All types begin with an upper case letter. For example, the
3680 // resource field "Patient.Address.city", which uses a string type, can be
3681 // matched by "Patient.Address.String". Path also supports partial matching.
3682 // For example, "Patient.Address.city" can be matched by "Address.city"
3683 // (Patient omitted). Partial matching and type matching can be combined. For
3684 // example, "Patient.Address.city" can be matched by "Address.String". For
3685 // "choice" types (those defined in the FHIR spec with the form: field[x]), use
3686 // two separate components. For example, "deceasedAge.unit" is matched by
3687 // "Deceased.Age.unit". Supported types are: AdministrativeGenderCode,
3688 // Base64Binary, Boolean, Code, Date, DateTime, Decimal, HumanName, Id,
3689 // Instant, Integer, LanguageCode, Markdown, Oid, PositiveInt, String,
3690 // UnsignedInt, Uri, Uuid, Xhtml. The sub-type for HumanName(for example
3691 // HumanName.given, HumanName.family) can be omitted.
3692 Paths []string `json:"paths,omitempty"`
3693 // ForceSendFields is a list of field names (e.g. "Action") to unconditionally
3694 // include in API requests. By default, fields with empty or default values are
3695 // omitted from API requests. See
3696 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3697 // details.
3698 ForceSendFields []string `json:"-"`
3699 // NullFields is a list of field names (e.g. "Action") to include in API
3700 // requests with the JSON null value. By default, fields with empty values are
3701 // omitted from API requests. See
3702 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3703 NullFields []string `json:"-"`
3704 }
3705
3706 func (s FieldMetadata) MarshalJSON() ([]byte, error) {
3707 type NoMethod FieldMetadata
3708 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3709 }
3710
3711 // GcsDestination: The Cloud Storage output destination. The Cloud Healthcare
3712 // Service Agent requires the `roles/storage.objectAdmin` Cloud IAM roles on
3713 // the Cloud Storage location.
3714 type GcsDestination struct {
3715 // ContentStructure: The format of the exported HL7v2 message files.
3716 //
3717 // Possible values:
3718 // "CONTENT_STRUCTURE_UNSPECIFIED" - If the content structure is not
3719 // specified, the default value `MESSAGE_JSON` will be used.
3720 // "MESSAGE_JSON" - Messages are printed using the JSON format returned from
3721 // the `GetMessage` API. Messages are delimited with newlines.
3722 ContentStructure string `json:"contentStructure,omitempty"`
3723 // MessageView: Specifies the parts of the Message resource to include in the
3724 // export. If not specified, FULL is used.
3725 //
3726 // Possible values:
3727 // "MESSAGE_VIEW_UNSPECIFIED" - Not specified, equivalent to FULL for
3728 // getMessage, equivalent to BASIC for listMessages.
3729 // "RAW_ONLY" - Server responses include all the message fields except
3730 // parsed_data, and schematized_data fields.
3731 // "PARSED_ONLY" - Server responses include all the message fields except
3732 // data and schematized_data fields.
3733 // "FULL" - Server responses include all the message fields.
3734 // "SCHEMATIZED_ONLY" - Server responses include all the message fields
3735 // except data and parsed_data fields.
3736 // "BASIC" - Server responses include only the name field.
3737 MessageView string `json:"messageView,omitempty"`
3738 // UriPrefix: URI of an existing Cloud Storage directory where the server
3739 // writes result files, in the format
3740 // `gs://{bucket-id}/{path/to/destination/dir}`. If there is no trailing slash,
3741 // the service appends one when composing the object path.
3742 UriPrefix string `json:"uriPrefix,omitempty"`
3743 // ForceSendFields is a list of field names (e.g. "ContentStructure") to
3744 // unconditionally include in API requests. By default, fields with empty or
3745 // default values are omitted from API requests. See
3746 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3747 // details.
3748 ForceSendFields []string `json:"-"`
3749 // NullFields is a list of field names (e.g. "ContentStructure") to include in
3750 // API requests with the JSON null value. By default, fields with empty values
3751 // are omitted from API requests. See
3752 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3753 NullFields []string `json:"-"`
3754 }
3755
3756 func (s GcsDestination) MarshalJSON() ([]byte, error) {
3757 type NoMethod GcsDestination
3758 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3759 }
3760
3761 // GcsSource: Specifies the configuration for importing data from Cloud
3762 // Storage.
3763 type GcsSource struct {
3764 // Uri: Points to a Cloud Storage URI containing file(s) to import. The URI
3765 // must be in the following format: `gs://{bucket_id}/{object_id}`. The URI can
3766 // include wildcards in `object_id` and thus identify multiple files. Supported
3767 // wildcards: * `*` to match 0 or more non-separator characters * `**` to match
3768 // 0 or more characters (including separators). Must be used at the end of a
3769 // path and with no other wildcards in the path. Can also be used with a file
3770 // extension (such as .ndjson), which imports all files with the extension in
3771 // the specified directory and its sub-directories. For example,
3772 // `gs://my-bucket/my-directory/**.ndjson` imports all files with `.ndjson`
3773 // extensions in `my-directory/` and its sub-directories. * `?` to match 1
3774 // character Files matching the wildcard are expected to contain content only,
3775 // no metadata.
3776 Uri string `json:"uri,omitempty"`
3777 // ForceSendFields is a list of field names (e.g. "Uri") to unconditionally
3778 // include in API requests. By default, fields with empty or default values are
3779 // omitted from API requests. See
3780 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3781 // details.
3782 ForceSendFields []string `json:"-"`
3783 // NullFields is a list of field names (e.g. "Uri") to include in API requests
3784 // with the JSON null value. By default, fields with empty values are omitted
3785 // from API requests. See
3786 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3787 NullFields []string `json:"-"`
3788 }
3789
3790 func (s GcsSource) MarshalJSON() ([]byte, error) {
3791 type NoMethod GcsSource
3792 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3793 }
3794
3795 // GoogleCloudHealthcareV1beta1ConsentGcsDestination: The Cloud Storage
3796 // location for export.
3797 type GoogleCloudHealthcareV1beta1ConsentGcsDestination struct {
3798 // UriPrefix: URI for a Cloud Storage directory where the server writes result
3799 // files, in the format `gs://{bucket-id}/{path/to/destination/dir}`. If there
3800 // is no trailing slash, the service appends one when composing the object
3801 // path. The user is responsible for creating the Cloud Storage bucket and
3802 // directory referenced in `uri_prefix`.
3803 UriPrefix string `json:"uriPrefix,omitempty"`
3804 // ForceSendFields is a list of field names (e.g. "UriPrefix") to
3805 // unconditionally include in API requests. By default, fields with empty or
3806 // default values are omitted from API requests. See
3807 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3808 // details.
3809 ForceSendFields []string `json:"-"`
3810 // NullFields is a list of field names (e.g. "UriPrefix") to include in API
3811 // requests with the JSON null value. By default, fields with empty values are
3812 // omitted from API requests. See
3813 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3814 NullFields []string `json:"-"`
3815 }
3816
3817 func (s GoogleCloudHealthcareV1beta1ConsentGcsDestination) MarshalJSON() ([]byte, error) {
3818 type NoMethod GoogleCloudHealthcareV1beta1ConsentGcsDestination
3819 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3820 }
3821
3822 // GoogleCloudHealthcareV1beta1ConsentPolicy: Represents a user's consent in
3823 // terms of the resources that can be accessed and under what conditions.
3824 type GoogleCloudHealthcareV1beta1ConsentPolicy struct {
3825 // AuthorizationRule: Required. The request conditions to meet to grant access.
3826 // In addition to any supported comparison operators, authorization rules may
3827 // have `IN` operator as well as at most 10 logical operators that are limited
3828 // to `AND` (`&&`), `OR` (`||`).
3829 AuthorizationRule *Expr `json:"authorizationRule,omitempty"`
3830 // ResourceAttributes: The resources that this policy applies to. A resource is
3831 // a match if it matches all the attributes listed here. If empty, this policy
3832 // applies to all User data mappings for the given user.
3833 ResourceAttributes []*Attribute `json:"resourceAttributes,omitempty"`
3834 // ForceSendFields is a list of field names (e.g. "AuthorizationRule") to
3835 // unconditionally include in API requests. By default, fields with empty or
3836 // default values are omitted from API requests. See
3837 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3838 // details.
3839 ForceSendFields []string `json:"-"`
3840 // NullFields is a list of field names (e.g. "AuthorizationRule") to include in
3841 // API requests with the JSON null value. By default, fields with empty values
3842 // are omitted from API requests. See
3843 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3844 NullFields []string `json:"-"`
3845 }
3846
3847 func (s GoogleCloudHealthcareV1beta1ConsentPolicy) MarshalJSON() ([]byte, error) {
3848 type NoMethod GoogleCloudHealthcareV1beta1ConsentPolicy
3849 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3850 }
3851
3852 // GoogleCloudHealthcareV1beta1DeidentifyDeidentifyDicomStoreSummary: Contains
3853 // a summary of the DeidentifyDicomStore operation.
3854 type GoogleCloudHealthcareV1beta1DeidentifyDeidentifyDicomStoreSummary struct {
3855 }
3856
3857 // GoogleCloudHealthcareV1beta1DeidentifyDeidentifyFhirStoreSummary: Contains a
3858 // summary of the DeidentifyFhirStore operation.
3859 type GoogleCloudHealthcareV1beta1DeidentifyDeidentifyFhirStoreSummary struct {
3860 }
3861
3862 // GoogleCloudHealthcareV1beta1DeidentifyFieldMetadata: Specifies the FHIR
3863 // paths to match and how to handle the de-identification of matching fields.
3864 type GoogleCloudHealthcareV1beta1DeidentifyFieldMetadata struct {
3865 // CharacterMaskField: Replace the field's value with a masking character.
3866 // Supported types (https://www.hl7.org/fhir/datatypes.html): Code, Decimal,
3867 // HumanName, Id, LanguageCode, Markdown, Oid, String, Uri, Uuid, Xhtml.
3868 CharacterMaskField *CharacterMaskField `json:"characterMaskField,omitempty"`
3869 // CleanTextField: Inspect the field's text and transform sensitive text.
3870 // Configure using TextConfig. Supported types
3871 // (https://www.hl7.org/fhir/datatypes.html): Code, Date, DateTime, Decimal,
3872 // HumanName, Id, LanguageCode, Markdown, Oid, String, Uri, Uuid, Xhtml.
3873 CleanTextField *CleanTextField `json:"cleanTextField,omitempty"`
3874 // CryptoHashField: Replace field value with a hash of that value. Supported
3875 // types (https://www.hl7.org/fhir/datatypes.html): Code, Decimal, HumanName,
3876 // Id, LanguageCode, Markdown, Oid, String, Uri, Uuid, Xhtml.
3877 CryptoHashField *CryptoHashField `json:"cryptoHashField,omitempty"`
3878 // DateShiftField: Shift the date by a randomized number of days. See date
3879 // shifting (https://cloud.google.com/dlp/docs/concepts-date-shifting) for more
3880 // information. Supported types (https://www.hl7.org/fhir/datatypes.html):
3881 // Date, DateTime.
3882 DateShiftField *DateShiftField `json:"dateShiftField,omitempty"`
3883 // KeepField: Keep the field unchanged.
3884 KeepField *KeepField `json:"keepField,omitempty"`
3885 // Paths: List of paths to FHIR fields to redact. Each path is a
3886 // period-separated list where each component is either a field name or FHIR
3887 // type (https://www.hl7.org/fhir/datatypes.html) name. All types begin with an
3888 // upper case letter. For example, the resource field `Patient.Address.city`,
3889 // which uses a string
3890 // (https://www.hl7.org/fhir/datatypes-definitions.html#Address.city) type, can
3891 // be matched by `Patient.Address.String`. Partial matching is supported. For
3892 // example, `Patient.Address.city` can be matched by `Address.city` (with
3893 // `Patient` omitted). Partial matching and type matching can be combined, for
3894 // example `Patient.Address.city` can be matched by `Address.String`. For
3895 // "choice" types (those defined in the FHIR spec with the format `field[x]`),
3896 // use two separate components. For example, `deceasedAge.unit` is matched by
3897 // `Deceased.Age.unit`. The following types are supported:
3898 // AdministrativeGenderCode, Base64Binary, Boolean, Code, Date, DateTime,
3899 // Decimal, HumanName, Id, Instant, Integer, LanguageCode, Markdown, Oid,
3900 // PositiveInt, String, UnsignedInt, Uri, Uuid, Xhtml. The sub-type for
3901 // HumanName (for example `HumanName.given`, `HumanName.family`) can be
3902 // omitted.
3903 Paths []string `json:"paths,omitempty"`
3904 // RemoveField: Remove the field.
3905 RemoveField *RemoveField `json:"removeField,omitempty"`
3906 // ForceSendFields is a list of field names (e.g. "CharacterMaskField") to
3907 // unconditionally include in API requests. By default, fields with empty or
3908 // default values are omitted from API requests. See
3909 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3910 // details.
3911 ForceSendFields []string `json:"-"`
3912 // NullFields is a list of field names (e.g. "CharacterMaskField") to include
3913 // in API requests with the JSON null value. By default, fields with empty
3914 // values are omitted from API requests. See
3915 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3916 NullFields []string `json:"-"`
3917 }
3918
3919 func (s GoogleCloudHealthcareV1beta1DeidentifyFieldMetadata) MarshalJSON() ([]byte, error) {
3920 type NoMethod GoogleCloudHealthcareV1beta1DeidentifyFieldMetadata
3921 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3922 }
3923
3924 // GoogleCloudHealthcareV1beta1DeidentifyOptions: Specifies additional options
3925 // to apply to the base ProfileType.
3926 type GoogleCloudHealthcareV1beta1DeidentifyOptions struct {
3927 // CharacterMaskConfig: Character mask config for CharacterMaskField.
3928 CharacterMaskConfig *CharacterMaskConfig `json:"characterMaskConfig,omitempty"`
3929 // ContextualDeid: Configure contextual de-id.
3930 ContextualDeid *ContextualDeidConfig `json:"contextualDeid,omitempty"`
3931 // CryptoHashConfig: Crypto hash config for CharacterMaskField.
3932 CryptoHashConfig *CryptoHashConfig `json:"cryptoHashConfig,omitempty"`
3933 // DateShiftConfig: Date shifting config for CharacterMaskField.
3934 DateShiftConfig *DateShiftConfig `json:"dateShiftConfig,omitempty"`
3935 // KeepExtensions: Configure keeping extensions by default.
3936 KeepExtensions *KeepExtensionsConfig `json:"keepExtensions,omitempty"`
3937 // ForceSendFields is a list of field names (e.g. "CharacterMaskConfig") to
3938 // unconditionally include in API requests. By default, fields with empty or
3939 // default values are omitted from API requests. See
3940 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3941 // details.
3942 ForceSendFields []string `json:"-"`
3943 // NullFields is a list of field names (e.g. "CharacterMaskConfig") to include
3944 // in API requests with the JSON null value. By default, fields with empty
3945 // values are omitted from API requests. See
3946 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3947 NullFields []string `json:"-"`
3948 }
3949
3950 func (s GoogleCloudHealthcareV1beta1DeidentifyOptions) MarshalJSON() ([]byte, error) {
3951 type NoMethod GoogleCloudHealthcareV1beta1DeidentifyOptions
3952 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3953 }
3954
3955 // GoogleCloudHealthcareV1beta1DicomBigQueryDestination: The BigQuery table
3956 // where the server writes output.
3957 type GoogleCloudHealthcareV1beta1DicomBigQueryDestination struct {
3958 // ChangeDataCaptureConfig: Optional. Setting this field will enable BigQuery's
3959 // Change Data Capture (CDC) on the destination tables with JSON schema. Set
3960 // this field if you want to only keep the latest version of each instance.
3961 // Updates and deletes to an existing' instance will overwrite the
3962 // corresponding row. See
3963 // https://cloud.google.com/bigquery/docs/change-data-capture for details. Note
3964 // that this field is only supported with the SchemaJSON option. The
3965 // SchemaFlattened option is not compatible with CDC.
3966 ChangeDataCaptureConfig *GoogleCloudHealthcareV1beta1DicomChangeDataCaptureConfig `json:"changeDataCaptureConfig,omitempty"`
3967 // Force: Use `write_disposition` instead. If `write_disposition` is specified,
3968 // this parameter is ignored. force=false is equivalent to
3969 // write_disposition=WRITE_EMPTY and force=true is equivalent to
3970 // write_disposition=WRITE_TRUNCATE.
3971 Force bool `json:"force,omitempty"`
3972 // IncludeSourceStore: Optional. If true, the source store name will be
3973 // included as a column in the BigQuery schema.
3974 IncludeSourceStore bool `json:"includeSourceStore,omitempty"`
3975 // SchemaFlattened: Optional. Setting this field will use flattened DICOM
3976 // instances schema for the BigQuery table. The flattened schema will have one
3977 // column for each DICOM tag.
3978 SchemaFlattened *SchemaFlattened `json:"schemaFlattened,omitempty"`
3979 // SchemaJson: Optional. Setting this field will store all the DICOM tags as a
3980 // JSON type in a single column.
3981 SchemaJson *SchemaJSON `json:"schemaJson,omitempty"`
3982 // TableUri: BigQuery URI to a table, up to 2000 characters long, in the format
3983 // `bq://projectId.bqDatasetId.tableId`
3984 TableUri string `json:"tableUri,omitempty"`
3985 // WriteDisposition: Determines whether the existing table in the destination
3986 // is to be overwritten or appended to. If a write_disposition is specified,
3987 // the `force` parameter is ignored.
3988 //
3989 // Possible values:
3990 // "WRITE_DISPOSITION_UNSPECIFIED" - Default behavior is the same as
3991 // WRITE_EMPTY.
3992 // "WRITE_EMPTY" - Only export data if the destination table is empty.
3993 // "WRITE_TRUNCATE" - Erase all existing data in the destination table before
3994 // writing the instances.
3995 // "WRITE_APPEND" - Append data to the destination table.
3996 WriteDisposition string `json:"writeDisposition,omitempty"`
3997 // ForceSendFields is a list of field names (e.g. "ChangeDataCaptureConfig") to
3998 // unconditionally include in API requests. By default, fields with empty or
3999 // default values are omitted from API requests. See
4000 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4001 // details.
4002 ForceSendFields []string `json:"-"`
4003 // NullFields is a list of field names (e.g. "ChangeDataCaptureConfig") to
4004 // include in API requests with the JSON null value. By default, fields with
4005 // empty values are omitted from API requests. See
4006 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4007 NullFields []string `json:"-"`
4008 }
4009
4010 func (s GoogleCloudHealthcareV1beta1DicomBigQueryDestination) MarshalJSON() ([]byte, error) {
4011 type NoMethod GoogleCloudHealthcareV1beta1DicomBigQueryDestination
4012 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4013 }
4014
4015 // GoogleCloudHealthcareV1beta1DicomChangeDataCaptureConfig: BigQuery Change
4016 // Data Capture configuration.
4017 type GoogleCloudHealthcareV1beta1DicomChangeDataCaptureConfig struct {
4018 }
4019
4020 // GoogleCloudHealthcareV1beta1DicomGcsDestination: The Cloud Storage location
4021 // where the server writes the output and the export configuration.
4022 type GoogleCloudHealthcareV1beta1DicomGcsDestination struct {
4023 // MimeType: MIME types supported by DICOM spec. Each file is written in the
4024 // following format:
4025 // `.../{study_id}/{series_id}/{instance_id}[/{frame_number}].{extension}` The
4026 // frame_number component exists only for multi-frame instances. Supported MIME
4027 // types are consistent with supported formats in DICOMweb:
4028 // https://cloud.google.com/healthcare/docs/dicom#retrieve_transaction.
4029 // Specifically, the following are supported: - application/dicom;
4030 // transfer-syntax=1.2.840.10008.1.2 (DICOM Implicit VR Little Endian) -
4031 // application/dicom; transfer-syntax=1.2.840.10008.1.2.1 (DICOM Explicit VR
4032 // Little Endian) - application/dicom; transfer-syntax=1.2.840.10008.1.2.1.99
4033 // (DICOM Deflated Explicit VR Little Endian) - application/dicom;
4034 // transfer-syntax=1.2.840.10008.1.2.4.50 (DICOM with embedded JPEG Baseline) -
4035 // application/dicom; transfer-syntax=1.2.840.10008.1.2.4.51 (DICOM with
4036 // embedded JPEG Extended) - application/dicom;
4037 // transfer-syntax=1.2.840.10008.1.2.4.57 (DICOM with embedded JPEG Lossless) -
4038 // application/dicom; transfer-syntax=1.2.840.10008.1.2.4.70 (DICOM with
4039 // embedded JPEG Lossless First-Order Prediction) - application/dicom;
4040 // transfer-syntax=1.2.840.10008.1.2.4.80 (DICOM with embedded JPEG-LS
4041 // Lossless) - application/dicom; transfer-syntax=1.2.840.10008.1.2.4.81 (DICOM
4042 // with embedded JPEG-LS Lossy (Near-Lossless)) - application/dicom;
4043 // transfer-syntax=1.2.840.10008.1.2.4.90 (DICOM with embedded JPEG 2000
4044 // Lossless Only) - application/dicom; transfer-syntax=1.2.840.10008.1.2.4.91
4045 // (DICOM with embedded JPEG 2000) - application/dicom;
4046 // transfer-syntax=1.2.840.10008.1.2.4.110 (DICOM with embedded JPEG XL
4047 // Lossless) - application/dicom; transfer-syntax=1.2.840.10008.1.2.4.111
4048 // (DICOM with embedded JPEG XL JPEG Recompression) - application/dicom;
4049 // transfer-syntax=1.2.840.10008.1.2.4.112 (DICOM with embedded JPEG XL) -
4050 // application/dicom; transfer-syntax=1.2.840.10008.1.2.4.201 (DICOM with
4051 // embedded High-Throughput JPEG 2000 Lossless) - application/dicom;
4052 // transfer-syntax=1.2.840.10008.1.2.4.202 (DICOM with embedded High-Throughput
4053 // JPEG 2000 with RPCL Options Lossless) - application/dicom;
4054 // transfer-syntax=1.2.840.10008.1.2.4.203 (DICOM with embedded High-Throughput
4055 // JPEG 2000) - application/dicom; transfer-syntax=1.2.840.10008.1.2.5 (DICOM
4056 // with embedded RLE Lossless) - application/dicom;
4057 // transfer-syntax=1.2.840.10008.1.2.8.1 (DICOM with embedded Deflated Image
4058 // Frame Compression) - application/dicom; transfer-syntax=* (DICOM with no
4059 // transcoding) - application/octet-stream; transfer-syntax=1.2.840.10008.1.2.1
4060 // (raw uncompressed PixelData) - application/octet-stream; transfer-syntax=*
4061 // (raw PixelData in whatever format it was uploaded in) - image/jpeg;
4062 // transfer-syntax=1.2.840.10008.1.2.4.50 (Consumer JPEG) - image/png The
4063 // following extensions are used for output files: - application/dicom -> .dcm
4064 // - image/jpeg -> .jpg - image/png -> .png - application/octet-stream -> no
4065 // extension If unspecified, the instances are exported in the original DICOM
4066 // format they were uploaded in.
4067 MimeType string `json:"mimeType,omitempty"`
4068 // UriPrefix: The Cloud Storage destination to export to. URI for a Cloud
4069 // Storage directory where the server writes the result files, in the format
4070 // `gs://{bucket-id}/{path/to/destination/dir}`). If there is no trailing
4071 // slash, the service appends one when composing the object path. The user is
4072 // responsible for creating the Cloud Storage bucket referenced in
4073 // `uri_prefix`.
4074 UriPrefix string `json:"uriPrefix,omitempty"`
4075 // ForceSendFields is a list of field names (e.g. "MimeType") to
4076 // unconditionally include in API requests. By default, fields with empty or
4077 // default values are omitted from API requests. See
4078 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4079 // details.
4080 ForceSendFields []string `json:"-"`
4081 // NullFields is a list of field names (e.g. "MimeType") to include in API
4082 // requests with the JSON null value. By default, fields with empty values are
4083 // omitted from API requests. See
4084 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4085 NullFields []string `json:"-"`
4086 }
4087
4088 func (s GoogleCloudHealthcareV1beta1DicomGcsDestination) MarshalJSON() ([]byte, error) {
4089 type NoMethod GoogleCloudHealthcareV1beta1DicomGcsDestination
4090 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4091 }
4092
4093 // GoogleCloudHealthcareV1beta1DicomGcsSource: Specifies the configuration for
4094 // importing data from Cloud Storage.
4095 type GoogleCloudHealthcareV1beta1DicomGcsSource struct {
4096 // Uri: Points to a Cloud Storage URI containing file(s) with content only. The
4097 // URI must be in the following format: `gs://{bucket_id}/{object_id}`. The URI
4098 // can include wildcards in `object_id` and thus identify multiple files.
4099 // Supported wildcards: * '*' to match 0 or more non-separator characters *
4100 // '**' to match 0 or more characters (including separators). Must be used at
4101 // the end of a path and with no other wildcards in the path. Can also be used
4102 // with a file extension (such as .dcm), which imports all files with the
4103 // extension in the specified directory and its sub-directories. For example,
4104 // `gs://my-bucket/my-directory/**.dcm` imports all files with .dcm extensions
4105 // in `my-directory/` and its sub-directories. * '?' to match 1 character. All
4106 // other URI formats are invalid. Files matching the wildcard are expected to
4107 // contain content only, no metadata.
4108 Uri string `json:"uri,omitempty"`
4109 // ForceSendFields is a list of field names (e.g. "Uri") to unconditionally
4110 // include in API requests. By default, fields with empty or default values are
4111 // omitted from API requests. See
4112 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4113 // details.
4114 ForceSendFields []string `json:"-"`
4115 // NullFields is a list of field names (e.g. "Uri") to include in API requests
4116 // with the JSON null value. By default, fields with empty values are omitted
4117 // from API requests. See
4118 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4119 NullFields []string `json:"-"`
4120 }
4121
4122 func (s GoogleCloudHealthcareV1beta1DicomGcsSource) MarshalJSON() ([]byte, error) {
4123 type NoMethod GoogleCloudHealthcareV1beta1DicomGcsSource
4124 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4125 }
4126
4127 // GoogleCloudHealthcareV1beta1DicomStreamConfig: StreamConfig specifies
4128 // configuration for a streaming DICOM export.
4129 type GoogleCloudHealthcareV1beta1DicomStreamConfig struct {
4130 // BigqueryDestination: Results are appended to this table. The server creates
4131 // a new table in the given BigQuery dataset if the specified table does not
4132 // exist. To enable the Cloud Healthcare API to write to your BigQuery table,
4133 // you must give the Cloud Healthcare API service account the
4134 // bigquery.dataEditor role. The service account is:
4135 // `service-{PROJECT_NUMBER}@gcp-sa-healthcare.iam.gserviceaccount.com`. The
4136 // PROJECT_NUMBER identifies the project that the DICOM store resides in. To
4137 // get the project number, go to the Cloud Console Dashboard. It is recommended
4138 // to not have a custom schema in the destination table which could conflict
4139 // with the schema created by the Cloud Healthcare API. Instance deletions are
4140 // not applied to the destination table. The destination's table schema will be
4141 // automatically updated in case a new instance's data is incompatible with the
4142 // current schema. The schema should not be updated manually as this can cause
4143 // incompatibilies that cannot be resolved automatically. One resolution in
4144 // this case is to delete the incompatible table and let the server recreate
4145 // one, though the newly created table only contains data after the table
4146 // recreation. BigQuery imposes a 1 MB limit on streaming insert row size,
4147 // therefore any instance that generates more than 1 MB of BigQuery data will
4148 // not be streamed. If an instance cannot be streamed to BigQuery, errors will
4149 // be logged to Cloud Logging (see Viewing error logs in Cloud Logging
4150 // (https://cloud.google.com/healthcare/docs/how-tos/logging)).
4151 BigqueryDestination *GoogleCloudHealthcareV1beta1DicomBigQueryDestination `json:"bigqueryDestination,omitempty"`
4152 // ForceSendFields is a list of field names (e.g. "BigqueryDestination") to
4153 // unconditionally include in API requests. By default, fields with empty or
4154 // default values are omitted from API requests. See
4155 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4156 // details.
4157 ForceSendFields []string `json:"-"`
4158 // NullFields is a list of field names (e.g. "BigqueryDestination") to include
4159 // in API requests with the JSON null value. By default, fields with empty
4160 // values are omitted from API requests. See
4161 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4162 NullFields []string `json:"-"`
4163 }
4164
4165 func (s GoogleCloudHealthcareV1beta1DicomStreamConfig) MarshalJSON() ([]byte, error) {
4166 type NoMethod GoogleCloudHealthcareV1beta1DicomStreamConfig
4167 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4168 }
4169
4170 // GoogleCloudHealthcareV1beta1FhirBigQueryDestination: The configuration for
4171 // exporting to BigQuery.
4172 type GoogleCloudHealthcareV1beta1FhirBigQueryDestination struct {
4173 // ChangeDataCaptureConfig: Optional. Setting this field will enable BigQuery's
4174 // Change Data Capture (CDC) on the destination tables. Use this field if you:
4175 // - Want to only keep the latest version of each resource. Updates and deletes
4176 // to an existing resource will overwrite the corresponding row. - Have a store
4177 // with enabled history modifications and want to keep the entire history of
4178 // resource versions but want the history to be mutable. Updates and deletes to
4179 // a specific resource version will overwrite the corresponding row. See
4180 // https://cloud.google.com/bigquery/docs/change-data-capture for details.
4181 ChangeDataCaptureConfig *GoogleCloudHealthcareV1beta1FhirChangeDataCaptureConfig `json:"changeDataCaptureConfig,omitempty"`
4182 // DatasetUri: BigQuery URI to an existing dataset, up to 2000 characters long,
4183 // in the format `bq://projectId.bqDatasetId`.
4184 DatasetUri string `json:"datasetUri,omitempty"`
4185 // Force: Use `write_disposition` instead. If `write_disposition` is specified,
4186 // this parameter is ignored. force=false is equivalent to
4187 // write_disposition=WRITE_EMPTY and force=true is equivalent to
4188 // write_disposition=WRITE_TRUNCATE.
4189 Force bool `json:"force,omitempty"`
4190 // SchemaConfig: The configuration for the exported BigQuery schema.
4191 SchemaConfig *SchemaConfig `json:"schemaConfig,omitempty"`
4192 // WriteDisposition: Determines if existing data in the destination dataset is
4193 // overwritten, appended to, or not written if the tables contain data. If a
4194 // write_disposition is specified, the `force` parameter is ignored.
4195 //
4196 // Possible values:
4197 // "WRITE_DISPOSITION_UNSPECIFIED" - Default behavior is the same as
4198 // WRITE_EMPTY.
4199 // "WRITE_EMPTY" - Only export data if the destination tables are empty.
4200 // "WRITE_TRUNCATE" - Erase all existing data in the destination tables
4201 // before writing the FHIR resources.
4202 // "WRITE_APPEND" - Append data to the destination tables.
4203 WriteDisposition string `json:"writeDisposition,omitempty"`
4204 // ForceSendFields is a list of field names (e.g. "ChangeDataCaptureConfig") 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. "ChangeDataCaptureConfig") to
4211 // include in API requests with the JSON null value. By default, fields with
4212 // empty values are 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 GoogleCloudHealthcareV1beta1FhirBigQueryDestination) MarshalJSON() ([]byte, error) {
4218 type NoMethod GoogleCloudHealthcareV1beta1FhirBigQueryDestination
4219 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4220 }
4221
4222 // GoogleCloudHealthcareV1beta1FhirChangeDataCaptureConfig: BigQuery Change
4223 // Data Capture configuration.
4224 type GoogleCloudHealthcareV1beta1FhirChangeDataCaptureConfig struct {
4225 // HistoryMode: Optional. Configures how historical versions of FHIR resources
4226 // will be reflected in the destination table through updates and deletes.
4227 // Defaults to `HistoryMode.KEEP_LATEST_VERSION` if unspecified.
4228 //
4229 // Possible values:
4230 // "HISTORY_MODE_UNSPECIFIED" - Default behavior is the same as
4231 // KEEP_LATEST_VERSION.
4232 // "KEEP_LATEST_VERSION" - The table will have a unique entry for each
4233 // resource ID. Updates and deletes will overwrite the row matching the
4234 // resource ID if it exists in the table.
4235 // "KEEP_ALL_VERSIONS" - Historical versions of resources will be maintained.
4236 // However, history mutation is allowed. Updates will overwrite the row
4237 // matching the resource ID and version if it exists in the table. This option
4238 // is only supported for stores with history enabled.
4239 HistoryMode string `json:"historyMode,omitempty"`
4240 // ForceSendFields is a list of field names (e.g. "HistoryMode") to
4241 // unconditionally include in API requests. By default, fields with empty or
4242 // default values are omitted from API requests. See
4243 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4244 // details.
4245 ForceSendFields []string `json:"-"`
4246 // NullFields is a list of field names (e.g. "HistoryMode") to include in API
4247 // requests with the JSON null value. By default, fields with empty values are
4248 // omitted from API requests. See
4249 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4250 NullFields []string `json:"-"`
4251 }
4252
4253 func (s GoogleCloudHealthcareV1beta1FhirChangeDataCaptureConfig) MarshalJSON() ([]byte, error) {
4254 type NoMethod GoogleCloudHealthcareV1beta1FhirChangeDataCaptureConfig
4255 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4256 }
4257
4258 // GoogleCloudHealthcareV1beta1FhirExportResourcesResponse: Response when all
4259 // resources export successfully. This structure is included in the response to
4260 // describe the detailed outcome after the operation finishes successfully.
4261 type GoogleCloudHealthcareV1beta1FhirExportResourcesResponse struct {
4262 }
4263
4264 // GoogleCloudHealthcareV1beta1FhirGcsDestination: The configuration for
4265 // exporting to Cloud Storage.
4266 type GoogleCloudHealthcareV1beta1FhirGcsDestination struct {
4267 // UriPrefix: URI for a Cloud Storage directory where result files should be
4268 // written (in the format `gs://{bucket-id}/{path/to/destination/dir}`). If
4269 // there is no trailing slash, the service appends one when composing the
4270 // object path. The Cloud Storage bucket referenced in `uri_prefix` must exist
4271 // or an error occurs.
4272 UriPrefix string `json:"uriPrefix,omitempty"`
4273 // ForceSendFields is a list of field names (e.g. "UriPrefix") to
4274 // unconditionally include in API requests. By default, fields with empty or
4275 // default values are omitted from API requests. See
4276 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4277 // details.
4278 ForceSendFields []string `json:"-"`
4279 // NullFields is a list of field names (e.g. "UriPrefix") to include in API
4280 // requests with the JSON null value. By default, fields with empty values are
4281 // omitted from API requests. See
4282 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4283 NullFields []string `json:"-"`
4284 }
4285
4286 func (s GoogleCloudHealthcareV1beta1FhirGcsDestination) MarshalJSON() ([]byte, error) {
4287 type NoMethod GoogleCloudHealthcareV1beta1FhirGcsDestination
4288 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4289 }
4290
4291 // GoogleCloudHealthcareV1beta1FhirGcsSource: Specifies the configuration for
4292 // importing data from Cloud Storage.
4293 type GoogleCloudHealthcareV1beta1FhirGcsSource struct {
4294 // Uri: Points to a Cloud Storage URI containing file(s) to import. The URI
4295 // must be in the following format: `gs://{bucket_id}/{object_id}`. The URI can
4296 // include wildcards in `object_id` and thus identify multiple files. Supported
4297 // wildcards: * `*` to match 0 or more non-separator characters * `**` to match
4298 // 0 or more characters (including separators). Must be used at the end of a
4299 // path and with no other wildcards in the path. Can also be used with a file
4300 // extension (such as .ndjson), which imports all files with the extension in
4301 // the specified directory and its sub-directories. For example,
4302 // `gs://my-bucket/my-directory/**.ndjson` imports all files with `.ndjson`
4303 // extensions in `my-directory/` and its sub-directories. * `?` to match 1
4304 // character Files matching the wildcard are expected to contain content only,
4305 // no metadata.
4306 Uri string `json:"uri,omitempty"`
4307 // ForceSendFields is a list of field names (e.g. "Uri") to unconditionally
4308 // include in API requests. By default, fields with empty or default values are
4309 // omitted from API requests. See
4310 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4311 // details.
4312 ForceSendFields []string `json:"-"`
4313 // NullFields is a list of field names (e.g. "Uri") to include in API requests
4314 // with the JSON null value. By default, fields with empty values are omitted
4315 // from API requests. See
4316 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4317 NullFields []string `json:"-"`
4318 }
4319
4320 func (s GoogleCloudHealthcareV1beta1FhirGcsSource) MarshalJSON() ([]byte, error) {
4321 type NoMethod GoogleCloudHealthcareV1beta1FhirGcsSource
4322 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4323 }
4324
4325 // GoogleCloudHealthcareV1beta1FhirImportResourcesResponse: Final response of
4326 // importing resources. This structure is included in the response to describe
4327 // the detailed outcome after the operation finishes successfully.
4328 type GoogleCloudHealthcareV1beta1FhirImportResourcesResponse struct {
4329 }
4330
4331 // GroupOrSegment: Construct representing a logical group or a segment.
4332 type GroupOrSegment struct {
4333 Group *SchemaGroup `json:"group,omitempty"`
4334 Segment *SchemaSegment `json:"segment,omitempty"`
4335 // ForceSendFields is a list of field names (e.g. "Group") to unconditionally
4336 // include in API requests. By default, fields with empty or default values are
4337 // omitted from API requests. See
4338 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4339 // details.
4340 ForceSendFields []string `json:"-"`
4341 // NullFields is a list of field names (e.g. "Group") to include in API
4342 // requests with the JSON null value. By default, fields with empty values are
4343 // omitted from API requests. See
4344 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4345 NullFields []string `json:"-"`
4346 }
4347
4348 func (s GroupOrSegment) MarshalJSON() ([]byte, error) {
4349 type NoMethod GroupOrSegment
4350 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4351 }
4352
4353 // Hl7SchemaConfig: Root config message for HL7v2 schema. This contains a
4354 // schema structure of groups and segments, and filters that determine which
4355 // messages to apply the schema structure to.
4356 type Hl7SchemaConfig struct {
4357 // MessageSchemaConfigs: Map from each HL7v2 message type and trigger event
4358 // pair, such as ADT_A04, to its schema configuration root group.
4359 MessageSchemaConfigs map[string]SchemaGroup `json:"messageSchemaConfigs,omitempty"`
4360 // Version: Each VersionSource is tested and only if they all match is the
4361 // schema used for the message.
4362 Version []*VersionSource `json:"version,omitempty"`
4363 // ForceSendFields is a list of field names (e.g. "MessageSchemaConfigs") to
4364 // unconditionally include in API requests. By default, fields with empty or
4365 // default values are omitted from API requests. See
4366 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4367 // details.
4368 ForceSendFields []string `json:"-"`
4369 // NullFields is a list of field names (e.g. "MessageSchemaConfigs") to include
4370 // in API requests with the JSON null value. By default, fields with empty
4371 // values are omitted from API requests. See
4372 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4373 NullFields []string `json:"-"`
4374 }
4375
4376 func (s Hl7SchemaConfig) MarshalJSON() ([]byte, error) {
4377 type NoMethod Hl7SchemaConfig
4378 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4379 }
4380
4381 // Hl7TypesConfig: Root config for HL7v2 datatype definitions for a specific
4382 // HL7v2 version.
4383 type Hl7TypesConfig struct {
4384 // Type: The HL7v2 type definitions.
4385 Type []*Type `json:"type,omitempty"`
4386 // Version: The version selectors that this config applies to. A message must
4387 // match ALL version sources to apply.
4388 Version []*VersionSource `json:"version,omitempty"`
4389 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally
4390 // include in API requests. By default, fields with empty or default values are
4391 // omitted from API requests. See
4392 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4393 // details.
4394 ForceSendFields []string `json:"-"`
4395 // NullFields is a list of field names (e.g. "Type") to include in API requests
4396 // with the JSON null value. By default, fields with empty values are omitted
4397 // from API requests. See
4398 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4399 NullFields []string `json:"-"`
4400 }
4401
4402 func (s Hl7TypesConfig) MarshalJSON() ([]byte, error) {
4403 type NoMethod Hl7TypesConfig
4404 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4405 }
4406
4407 // Hl7V2NotificationConfig: Specifies where and whether to send notifications
4408 // upon changes to a data store.
4409 type Hl7V2NotificationConfig struct {
4410 // Filter: Restricts notifications sent for messages matching a filter. If this
4411 // is empty, all messages are matched. The following syntax is available: * A
4412 // string field value can be written as text inside quotation marks, for
4413 // example "query text". The only valid relational operation for text fields
4414 // is equality (`=`), where text is searched within the field, rather than
4415 // having the field be equal to the text. For example, "Comment = great"
4416 // returns messages with `great` in the comment field. * A number field value
4417 // can be written as an integer, a decimal, or an exponential. The valid
4418 // relational operators for number fields are the equality operator (`=`),
4419 // along with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note
4420 // that there is no inequality (`!=`) operator. You can prepend the `NOT`
4421 // operator to an expression to negate it. * A date field value must be written
4422 // in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format.
4423 // Leading zeros are required for one-digit months and days. The valid
4424 // relational operators for date fields are the equality operator (`=`) , along
4425 // with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that
4426 // there is no inequality (`!=`) operator. You can prepend the `NOT` operator
4427 // to an expression to negate it. * Multiple field query expressions can be
4428 // combined in one query by adding `AND` or `OR` operators between the
4429 // expressions. If a boolean operator appears within a quoted string, it is not
4430 // treated as special, it's just another part of the character string to be
4431 // matched. You can prepend the `NOT` operator to an expression to negate it.
4432 // Fields/functions available for filtering are: * `message_type`, from the
4433 // MSH-9.1 field. For example, `NOT message_type = "ADT". * `send_date` or
4434 // `sendDate`, the YYYY-MM-DD date the message was sent in the dataset's
4435 // time_zone, from the MSH-7 segment. For example, `send_date < "2017-01-02".
4436 // * `send_time`, the timestamp when the message was sent, using the RFC3339
4437 // time format for comparisons, from the MSH-7 segment. For example, `send_time
4438 // < "2017-01-02T00:00:00-05:00". * `create_time`, the timestamp when the
4439 // message was created in the HL7v2 store. Use the RFC3339 time format for
4440 // comparisons. For example, `create_time < "2017-01-02T00:00:00-05:00". *
4441 // `send_facility`, the care center that the message came from, from the MSH-4
4442 // segment. For example, `send_facility = "ABC". * `PatientId(value, type)`,
4443 // which matches if the message lists a patient having an ID of the given value
4444 // and type in the PID-2, PID-3, or PID-4 segments. For example,
4445 // `PatientId("123456", "MRN")`. * `labels.x`, a string value of the label with
4446 // key `x` as set using the Message.labels map. For example,
4447 // `labels."priority"="high". The operator `:*` can be used to assert the
4448 // existence of a label. For example, `labels."priority":*`.
4449 Filter string `json:"filter,omitempty"`
4450 // PubsubTopic: The Pub/Sub (https://cloud.google.com/pubsub/docs/) topic that
4451 // notifications of changes are published on. Supplied by the client. The
4452 // notification is a `PubsubMessage` with the following fields: *
4453 // `PubsubMessage.Data` contains the resource name. * `PubsubMessage.MessageId`
4454 // is the ID of this notification. It is guaranteed to be unique within the
4455 // topic. * `PubsubMessage.PublishTime` is the time when the message was
4456 // published. Note that notifications are only sent if the topic is non-empty.
4457 // Topic names (https://cloud.google.com/pubsub/docs/overview#names) must be
4458 // scoped to a project. Cloud Healthcare API service account must have
4459 // publisher permissions on the given Pub/Sub topic. Not having adequate
4460 // permissions causes the calls that send notifications to fail. If a
4461 // notification can't be published to Pub/Sub, errors are logged to Cloud
4462 // Logging. For more information, see Viewing error logs in Cloud Logging
4463 // (https://cloud.google.com/healthcare/docs/how-tos/logging).
4464 PubsubTopic string `json:"pubsubTopic,omitempty"`
4465 // ForceSendFields is a list of field names (e.g. "Filter") to unconditionally
4466 // include in API requests. By default, fields with empty or default values are
4467 // omitted from API requests. See
4468 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4469 // details.
4470 ForceSendFields []string `json:"-"`
4471 // NullFields is a list of field names (e.g. "Filter") to include in API
4472 // requests with the JSON null value. By default, fields with empty values are
4473 // omitted from API requests. See
4474 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4475 NullFields []string `json:"-"`
4476 }
4477
4478 func (s Hl7V2NotificationConfig) MarshalJSON() ([]byte, error) {
4479 type NoMethod Hl7V2NotificationConfig
4480 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4481 }
4482
4483 // Hl7V2Store: Represents an HL7v2 store.
4484 type Hl7V2Store struct {
4485 // Labels: User-supplied key-value pairs used to organize HL7v2 stores. Label
4486 // keys must be between 1 and 63 characters long, have a UTF-8 encoding of
4487 // maximum 128 bytes, and must conform to the following PCRE regular
4488 // expression: \p{Ll}\p{Lo}{0,62} Label values are optional, must be between 1
4489 // and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must
4490 // conform to the following PCRE regular expression:
4491 // [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64 labels can be associated with a
4492 // given store.
4493 Labels map[string]string `json:"labels,omitempty"`
4494 // Name: Identifier. Resource name of the HL7v2 store, of the form
4495 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Sto
4496 // res/{hl7v2_store_id}`.
4497 Name string `json:"name,omitempty"`
4498 // NotificationConfig: The notification destination all messages (both Ingest &
4499 // Create) are published on. Only the message name is sent as part of the
4500 // notification. If this is unset, no notifications are sent. Supplied by the
4501 // client.
4502 NotificationConfig *NotificationConfig `json:"notificationConfig,omitempty"`
4503 // NotificationConfigs: A list of notification configs. Each configuration uses
4504 // a filter to determine whether to publish a message (both Ingest & Create) on
4505 // the corresponding notification destination. Only the message name is sent as
4506 // part of the notification. Supplied by the client.
4507 NotificationConfigs []*Hl7V2NotificationConfig `json:"notificationConfigs,omitempty"`
4508 // ParserConfig: The configuration for the parser. It determines how the server
4509 // parses the messages.
4510 ParserConfig *ParserConfig `json:"parserConfig,omitempty"`
4511 // RejectDuplicateMessage: Determines whether to reject duplicate messages. A
4512 // duplicate message is a message with the same raw bytes as a message that has
4513 // already been ingested/created in this HL7v2 store. The default value is
4514 // false, meaning that the store accepts the duplicate messages and it also
4515 // returns the same ACK message in the IngestMessageResponse as has been
4516 // returned previously. Note that only one resource is created in the store.
4517 // When this field is set to true, CreateMessage/IngestMessage requests with a
4518 // duplicate message will be rejected by the store, and
4519 // IngestMessageErrorDetail returns a NACK message upon rejection.
4520 RejectDuplicateMessage bool `json:"rejectDuplicateMessage,omitempty"`
4521
4522 // ServerResponse contains the HTTP response code and headers from the server.
4523 googleapi.ServerResponse `json:"-"`
4524 // ForceSendFields is a list of field names (e.g. "Labels") to unconditionally
4525 // include in API requests. By default, fields with empty or default values are
4526 // omitted from API requests. See
4527 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4528 // details.
4529 ForceSendFields []string `json:"-"`
4530 // NullFields is a list of field names (e.g. "Labels") to include in API
4531 // requests with the JSON null value. By default, fields with empty values are
4532 // omitted from API requests. See
4533 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4534 NullFields []string `json:"-"`
4535 }
4536
4537 func (s Hl7V2Store) MarshalJSON() ([]byte, error) {
4538 type NoMethod Hl7V2Store
4539 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4540 }
4541
4542 // Hl7V2StoreMetric: Count of messages and total storage size by type for a
4543 // given HL7 store.
4544 type Hl7V2StoreMetric struct {
4545 // Count: The total count of HL7v2 messages in the store for the given message
4546 // type.
4547 Count int64 `json:"count,omitempty,string"`
4548 // MessageType: The Hl7v2 message type this metric applies to, such as `ADT` or
4549 // `ORU`.
4550 MessageType string `json:"messageType,omitempty"`
4551 // StructuredStorageSizeBytes: The total amount of structured storage used by
4552 // HL7v2 messages of this message type in the store.
4553 StructuredStorageSizeBytes int64 `json:"structuredStorageSizeBytes,omitempty,string"`
4554 // ForceSendFields is a list of field names (e.g. "Count") to unconditionally
4555 // include in API requests. By default, fields with empty or default values are
4556 // omitted from API requests. See
4557 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4558 // details.
4559 ForceSendFields []string `json:"-"`
4560 // NullFields is a list of field names (e.g. "Count") to include in API
4561 // requests with the JSON null value. By default, fields with empty values are
4562 // omitted from API requests. See
4563 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4564 NullFields []string `json:"-"`
4565 }
4566
4567 func (s Hl7V2StoreMetric) MarshalJSON() ([]byte, error) {
4568 type NoMethod Hl7V2StoreMetric
4569 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4570 }
4571
4572 // Hl7V2StoreMetrics: List of metrics for a given HL7v2 store.
4573 type Hl7V2StoreMetrics struct {
4574 // Metrics: List of HL7v2 store metrics by message type.
4575 Metrics []*Hl7V2StoreMetric `json:"metrics,omitempty"`
4576 // Name: The resource name of the HL7v2 store to get metrics for, in the format
4577 // `projects/{project_id}/datasets/{dataset_id}/hl7V2Stores/{hl7v2_store_id}`.
4578 Name string `json:"name,omitempty"`
4579
4580 // ServerResponse contains the HTTP response code and headers from the server.
4581 googleapi.ServerResponse `json:"-"`
4582 // ForceSendFields is a list of field names (e.g. "Metrics") to unconditionally
4583 // include in API requests. By default, fields with empty or default values are
4584 // omitted from API requests. See
4585 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4586 // details.
4587 ForceSendFields []string `json:"-"`
4588 // NullFields is a list of field names (e.g. "Metrics") to include in API
4589 // requests with the JSON null value. By default, fields with empty values are
4590 // omitted from API requests. See
4591 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4592 NullFields []string `json:"-"`
4593 }
4594
4595 func (s Hl7V2StoreMetrics) MarshalJSON() ([]byte, error) {
4596 type NoMethod Hl7V2StoreMetrics
4597 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4598 }
4599
4600 // HttpBody: Message that represents an arbitrary HTTP body. It should only be
4601 // used for payload formats that can't be represented as JSON, such as raw
4602 // binary or an HTML page. This message can be used both in streaming and
4603 // non-streaming API methods in the request as well as the response. It can be
4604 // used as a top-level request field, which is convenient if one wants to
4605 // extract parameters from either the URL or HTTP template into the request
4606 // fields and also want access to the raw HTTP body. Example: message
4607 // GetResourceRequest { // A unique request id. string request_id = 1; // The
4608 // raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; }
4609 // service ResourceService { rpc GetResource(GetResourceRequest) returns
4610 // (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns
4611 // (google.protobuf.Empty); } Example with streaming methods: service
4612 // CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream
4613 // google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns
4614 // (stream google.api.HttpBody); } Use of this type only changes how the
4615 // request and response bodies are handled, all other features will continue to
4616 // work unchanged.
4617 type HttpBody struct {
4618 // ContentType: The HTTP Content-Type header value specifying the content type
4619 // of the body.
4620 ContentType string `json:"contentType,omitempty"`
4621 // Data: The HTTP request/response body as raw binary.
4622 Data string `json:"data,omitempty"`
4623 // Extensions: Application specific response metadata. Must be set in the first
4624 // response for streaming APIs.
4625 Extensions []googleapi.RawMessage `json:"extensions,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. "ContentType") 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. "ContentType") 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 HttpBody) MarshalJSON() ([]byte, error) {
4643 type NoMethod HttpBody
4644 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4645 }
4646
4647 // Image: Raw bytes representing consent artifact content.
4648 type Image struct {
4649 // GcsUri: Input only. Points to a Cloud Storage URI containing the consent
4650 // artifact content. The URI must be in the following format:
4651 // `gs://{bucket_id}/{object_id}`. The Cloud Healthcare API service account
4652 // must have the `roles/storage.objectViewer` Cloud IAM role for this Cloud
4653 // Storage location. The consent artifact content at this URI is copied to a
4654 // Cloud Storage location managed by the Cloud Healthcare API. Responses to
4655 // fetching requests return the consent artifact content in raw_bytes.
4656 GcsUri string `json:"gcsUri,omitempty"`
4657 // RawBytes: Consent artifact content represented as a stream of bytes. This
4658 // field is populated when returned in GetConsentArtifact response, but not
4659 // included in CreateConsentArtifact and ListConsentArtifact response.
4660 RawBytes string `json:"rawBytes,omitempty"`
4661 // ForceSendFields is a list of field names (e.g. "GcsUri") to unconditionally
4662 // include in API requests. By default, fields with empty or default values are
4663 // omitted from API requests. See
4664 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4665 // details.
4666 ForceSendFields []string `json:"-"`
4667 // NullFields is a list of field names (e.g. "GcsUri") to include in API
4668 // requests with the JSON null value. By default, fields with empty values are
4669 // omitted from API requests. See
4670 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4671 NullFields []string `json:"-"`
4672 }
4673
4674 func (s Image) MarshalJSON() ([]byte, error) {
4675 type NoMethod Image
4676 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4677 }
4678
4679 // ImageConfig: Specifies how to handle de-identification of image pixels.
4680 type ImageConfig struct {
4681 // AdditionalInfoTypes: Additional InfoTypes to redact in the images in
4682 // addition to those used by `text_redaction_mode`. Can only be used when
4683 // `text_redaction_mode` is set to `REDACT_SENSITIVE_TEXT`,
4684 // `REDACT_SENSITIVE_TEXT_CLEAN_DESCRIPTORS` or
4685 // `TEXT_REDACTION_MODE_UNSPECIFIED`.
4686 AdditionalInfoTypes []string `json:"additionalInfoTypes,omitempty"`
4687 // ExcludeInfoTypes: InfoTypes to skip redacting, overriding those used by
4688 // `text_redaction_mode`. Can only be used when `text_redaction_mode` is set to
4689 // `REDACT_SENSITIVE_TEXT` or `REDACT_SENSITIVE_TEXT_CLEAN_DESCRIPTORS`.
4690 ExcludeInfoTypes []string `json:"excludeInfoTypes,omitempty"`
4691 // TextRedactionMode: Determines how to redact text from image.
4692 //
4693 // Possible values:
4694 // "TEXT_REDACTION_MODE_UNSPECIFIED" - No text redaction specified. Same as
4695 // REDACT_NO_TEXT.
4696 // "REDACT_ALL_TEXT" - Redact all text.
4697 // "REDACT_SENSITIVE_TEXT" - Redact sensitive text. Uses the set of [Default
4698 // DICOM
4699 // InfoTypes](https://cloud.google.com/healthcare-api/docs/how-tos/dicom-deident
4700 // ify#default_dicom_infotypes).
4701 // "REDACT_NO_TEXT" - Do not redact text.
4702 // "REDACT_SENSITIVE_TEXT_CLEAN_DESCRIPTORS" - This mode is like
4703 // `REDACT_SENSITIVE_TEXT` with the addition of the [Clean Descriptors Option]
4704 // (https://dicom.nema.org/medical/dicom/2018e/output/chtml/part15/sect_E.3.5.html)
4705 // enabled: When cleaning text, the process attempts to transform phrases
4706 // matching any of the tags marked for removal (action codes D, Z, X, and U) in
4707 // the [Basic Profile]
4708 // (https://dicom.nema.org/medical/dicom/2018e/output/chtml/part15/chapter_E.html).
4709 // These contextual phrases are replaced with the token "[CTX]". This mode uses
4710 // an additional InfoType during inspection.
4711 TextRedactionMode string `json:"textRedactionMode,omitempty"`
4712 // ForceSendFields is a list of field names (e.g. "AdditionalInfoTypes") to
4713 // unconditionally include in API requests. By default, fields with empty or
4714 // default values are omitted from API requests. See
4715 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4716 // details.
4717 ForceSendFields []string `json:"-"`
4718 // NullFields is a list of field names (e.g. "AdditionalInfoTypes") to include
4719 // in API requests with the JSON null value. By default, fields with empty
4720 // values are omitted from API requests. See
4721 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4722 NullFields []string `json:"-"`
4723 }
4724
4725 func (s ImageConfig) MarshalJSON() ([]byte, error) {
4726 type NoMethod ImageConfig
4727 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4728 }
4729
4730 // ImportDicomDataRequest: Imports data into the specified DICOM store. Returns
4731 // an error if any of the files to import are not DICOM files. This API accepts
4732 // duplicate DICOM instances by ignoring the newly-pushed instance. It does not
4733 // overwrite.
4734 type ImportDicomDataRequest struct {
4735 // BlobStorageSettings: Optional. The blob storage settings for the data
4736 // imported by this operation.
4737 BlobStorageSettings *BlobStorageSettings `json:"blobStorageSettings,omitempty"`
4738 // GcsSource: Cloud Storage source data location and import configuration. The
4739 // Cloud Healthcare Service Agent requires the `roles/storage.objectViewer`
4740 // Cloud IAM roles on the Cloud Storage location.
4741 GcsSource *GoogleCloudHealthcareV1beta1DicomGcsSource `json:"gcsSource,omitempty"`
4742 // ForceSendFields is a list of field names (e.g. "BlobStorageSettings") to
4743 // unconditionally include in API requests. By default, fields with empty or
4744 // default values are omitted from API requests. See
4745 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4746 // details.
4747 ForceSendFields []string `json:"-"`
4748 // NullFields is a list of field names (e.g. "BlobStorageSettings") to include
4749 // in API requests with the JSON null value. By default, fields with empty
4750 // values are omitted from API requests. See
4751 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4752 NullFields []string `json:"-"`
4753 }
4754
4755 func (s ImportDicomDataRequest) MarshalJSON() ([]byte, error) {
4756 type NoMethod ImportDicomDataRequest
4757 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4758 }
4759
4760 // ImportDicomDataResponse: Returns additional information in regards to a
4761 // completed DICOM store import.
4762 type ImportDicomDataResponse struct {
4763 }
4764
4765 // ImportMessagesRequest: Request to import messages.
4766 type ImportMessagesRequest struct {
4767 // GcsSource: Cloud Storage source data location and import configuration. The
4768 // Cloud Healthcare Service Agent requires the `roles/storage.objectViewer`
4769 // Cloud IAM roles on the Cloud Storage location.
4770 GcsSource *GcsSource `json:"gcsSource,omitempty"`
4771 // ForceSendFields is a list of field names (e.g. "GcsSource") to
4772 // unconditionally include in API requests. By default, fields with empty or
4773 // default values are omitted from API requests. See
4774 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4775 // details.
4776 ForceSendFields []string `json:"-"`
4777 // NullFields is a list of field names (e.g. "GcsSource") to include in API
4778 // requests with the JSON null value. By default, fields with empty values are
4779 // omitted from API requests. See
4780 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4781 NullFields []string `json:"-"`
4782 }
4783
4784 func (s ImportMessagesRequest) MarshalJSON() ([]byte, error) {
4785 type NoMethod ImportMessagesRequest
4786 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4787 }
4788
4789 // ImportMessagesResponse: Final response of importing messages. This structure
4790 // is included in the response to describe the detailed outcome. It is only
4791 // included when the operation finishes successfully.
4792 type ImportMessagesResponse struct {
4793 }
4794
4795 // ImportResourcesHistoryRequest: Request to import the history of resources.
4796 type ImportResourcesHistoryRequest struct {
4797 // ContentStructure: The content structure in the source location. If not
4798 // specified, the server treats the input source files as BUNDLE.
4799 //
4800 // Possible values:
4801 // "CONTENT_STRUCTURE_UNSPECIFIED" - If the content structure is not
4802 // specified, the default value `BUNDLE` is used.
4803 // "BUNDLE" - The source file contains one or more lines of newline-delimited
4804 // JSON (ndjson). Each line is a bundle that contains one or more resources.
4805 // "RESOURCE" - The source file contains one or more lines of
4806 // newline-delimited JSON (ndjson). Each line is a single resource.
4807 // "BUNDLE_PRETTY" - The entire file is one JSON bundle. The JSON can span
4808 // multiple lines.
4809 // "RESOURCE_PRETTY" - The entire file is one JSON resource. The JSON can
4810 // span multiple lines.
4811 ContentStructure string `json:"contentStructure,omitempty"`
4812 // GcsSource: Cloud Storage source data location and import configuration. The
4813 // Cloud Healthcare Service Agent requires the `roles/storage.objectAdmin`
4814 // Cloud IAM roles on the Cloud Storage location. The Healthcare Service Agent
4815 // Each Cloud Storage object should be a text file that contains the format
4816 // specified in ContentStructure.
4817 GcsSource *GoogleCloudHealthcareV1beta1FhirGcsSource `json:"gcsSource,omitempty"`
4818 // MaxErrorCount: The maximum number of errors before the server cancels the
4819 // operation. If not specified or set to 0, defaults to 100. -1 means no
4820 // maximum, the server tries to process all input. Since the server executes
4821 // the operation in parallel, it might not stop the operation after exactly
4822 // this number of errors occur.
4823 MaxErrorCount int64 `json:"maxErrorCount,omitempty,string"`
4824 // ForceSendFields is a list of field names (e.g. "ContentStructure") to
4825 // unconditionally include in API requests. By default, fields with empty or
4826 // default values are omitted from API requests. See
4827 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4828 // details.
4829 ForceSendFields []string `json:"-"`
4830 // NullFields is a list of field names (e.g. "ContentStructure") to include in
4831 // API requests with the JSON null value. By default, fields with empty values
4832 // are omitted from API requests. See
4833 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4834 NullFields []string `json:"-"`
4835 }
4836
4837 func (s ImportResourcesHistoryRequest) MarshalJSON() ([]byte, error) {
4838 type NoMethod ImportResourcesHistoryRequest
4839 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4840 }
4841
4842 // ImportResourcesRequest: Request to import resources.
4843 type ImportResourcesRequest struct {
4844 // ContentStructure: The content structure in the source location. If not
4845 // specified, the server treats the input source files as BUNDLE.
4846 //
4847 // Possible values:
4848 // "CONTENT_STRUCTURE_UNSPECIFIED" - If the content structure is not
4849 // specified, the default value `BUNDLE` is used.
4850 // "BUNDLE" - The source file contains one or more lines of newline-delimited
4851 // JSON (ndjson). Each line is a bundle that contains one or more resources.
4852 // "RESOURCE" - The source file contains one or more lines of
4853 // newline-delimited JSON (ndjson). Each line is a single resource.
4854 // "BUNDLE_PRETTY" - The entire file is one JSON bundle. The JSON can span
4855 // multiple lines.
4856 // "RESOURCE_PRETTY" - The entire file is one JSON resource. The JSON can
4857 // span multiple lines.
4858 ContentStructure string `json:"contentStructure,omitempty"`
4859 // GcsSource: Cloud Storage source data location and import configuration. The
4860 // Cloud Healthcare Service Agent requires the `roles/storage.objectViewer`
4861 // Cloud IAM roles on the Cloud Storage location. The Healthcare Service Agent
4862 // Each Cloud Storage object should be a text file that contains the format
4863 // specified in ContentStructure.
4864 GcsSource *GoogleCloudHealthcareV1beta1FhirGcsSource `json:"gcsSource,omitempty"`
4865 // ForceSendFields is a list of field names (e.g. "ContentStructure") to
4866 // unconditionally include in API requests. By default, fields with empty or
4867 // default values are omitted from API requests. See
4868 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4869 // details.
4870 ForceSendFields []string `json:"-"`
4871 // NullFields is a list of field names (e.g. "ContentStructure") to include in
4872 // API requests with the JSON null value. By default, fields with empty values
4873 // are omitted from API requests. See
4874 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4875 NullFields []string `json:"-"`
4876 }
4877
4878 func (s ImportResourcesRequest) MarshalJSON() ([]byte, error) {
4879 type NoMethod ImportResourcesRequest
4880 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4881 }
4882
4883 // InfoTypeTransformation: A transformation to apply to text that is identified
4884 // as a specific info_type.
4885 type InfoTypeTransformation struct {
4886 // CharacterMaskConfig: Config for character mask.
4887 CharacterMaskConfig *CharacterMaskConfig `json:"characterMaskConfig,omitempty"`
4888 // CryptoHashConfig: Config for crypto hash.
4889 CryptoHashConfig *CryptoHashConfig `json:"cryptoHashConfig,omitempty"`
4890 // DateShiftConfig: Config for date shift.
4891 DateShiftConfig *DateShiftConfig `json:"dateShiftConfig,omitempty"`
4892 // InfoTypes: `InfoTypes` to apply this transformation to. If this is not
4893 // specified, this transformation becomes the default transformation, and is
4894 // used for any `info_type` that is not specified in another transformation.
4895 InfoTypes []string `json:"infoTypes,omitempty"`
4896 // RedactConfig: Config for text redaction.
4897 RedactConfig *RedactConfig `json:"redactConfig,omitempty"`
4898 // ReplaceWithInfoTypeConfig: Config for replace with InfoType.
4899 ReplaceWithInfoTypeConfig *ReplaceWithInfoTypeConfig `json:"replaceWithInfoTypeConfig,omitempty"`
4900 // ForceSendFields is a list of field names (e.g. "CharacterMaskConfig") to
4901 // unconditionally include in API requests. By default, fields with empty or
4902 // default values are omitted from API requests. See
4903 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4904 // details.
4905 ForceSendFields []string `json:"-"`
4906 // NullFields is a list of field names (e.g. "CharacterMaskConfig") to include
4907 // in API requests with the JSON null value. By default, fields with empty
4908 // values are omitted from API requests. See
4909 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4910 NullFields []string `json:"-"`
4911 }
4912
4913 func (s InfoTypeTransformation) MarshalJSON() ([]byte, error) {
4914 type NoMethod InfoTypeTransformation
4915 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4916 }
4917
4918 // IngestMessageRequest: Ingests a message into the specified HL7v2 store.
4919 type IngestMessageRequest struct {
4920 // Message: Required. HL7v2 message to ingest.
4921 Message *Message `json:"message,omitempty"`
4922 // ForceSendFields is a list of field names (e.g. "Message") to unconditionally
4923 // include in API requests. By default, fields with empty or default values are
4924 // omitted from API requests. See
4925 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4926 // details.
4927 ForceSendFields []string `json:"-"`
4928 // NullFields is a list of field names (e.g. "Message") to include in API
4929 // requests with the JSON null value. By default, fields with empty values are
4930 // omitted from API requests. See
4931 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4932 NullFields []string `json:"-"`
4933 }
4934
4935 func (s IngestMessageRequest) MarshalJSON() ([]byte, error) {
4936 type NoMethod IngestMessageRequest
4937 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4938 }
4939
4940 // IngestMessageResponse: Acknowledges that a message has been ingested into
4941 // the specified HL7v2 store.
4942 type IngestMessageResponse struct {
4943 // Hl7Ack: HL7v2 ACK message.
4944 Hl7Ack string `json:"hl7Ack,omitempty"`
4945 // Message: Created message resource.
4946 Message *Message `json:"message,omitempty"`
4947
4948 // ServerResponse contains the HTTP response code and headers from the server.
4949 googleapi.ServerResponse `json:"-"`
4950 // ForceSendFields is a list of field names (e.g. "Hl7Ack") to unconditionally
4951 // include in API requests. By default, fields with empty or default values are
4952 // omitted from API requests. See
4953 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4954 // details.
4955 ForceSendFields []string `json:"-"`
4956 // NullFields is a list of field names (e.g. "Hl7Ack") to include in API
4957 // requests with the JSON null value. By default, fields with empty values are
4958 // omitted from API requests. See
4959 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4960 NullFields []string `json:"-"`
4961 }
4962
4963 func (s IngestMessageResponse) MarshalJSON() ([]byte, error) {
4964 type NoMethod IngestMessageResponse
4965 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4966 }
4967
4968 // KeepExtensionsConfig: The behavior for handling FHIR extensions that aren't
4969 // otherwise specified for de-identification. If provided, all extensions are
4970 // preserved during de-identification by default. If unspecified, all
4971 // extensions are removed during de-identification by default.
4972 type KeepExtensionsConfig struct {
4973 }
4974
4975 // KeepField: Keep field unchanged.
4976 type KeepField struct {
4977 }
4978
4979 // KeepTag: Keep tag unchanged.
4980 type KeepTag struct {
4981 }
4982
4983 // KmsWrappedCryptoKey: Include to use an existing data crypto key wrapped by
4984 // KMS. The wrapped key must be a 128-, 192-, or 256-bit key. The key must
4985 // grant the Cloud IAM permission `cloudkms.cryptoKeyVersions.useToDecrypt` to
4986 // the project's Cloud Healthcare Service Agent service account. For more
4987 // information, see [Creating a wrapped key]
4988 // (https://cloud.google.com/dlp/docs/create-wrapped-key).
4989 type KmsWrappedCryptoKey struct {
4990 // CryptoKey: Required. The resource name of the KMS CryptoKey to use for
4991 // unwrapping. For example,
4992 // `projects/{project_id}/locations/{location_id}/keyRings/{keyring}/cryptoKeys/
4993 // {key}`.
4994 CryptoKey string `json:"cryptoKey,omitempty"`
4995 // WrappedKey: Required. The wrapped data crypto key.
4996 WrappedKey string `json:"wrappedKey,omitempty"`
4997 // ForceSendFields is a list of field names (e.g. "CryptoKey") 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. "CryptoKey") 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 KmsWrappedCryptoKey) MarshalJSON() ([]byte, error) {
5011 type NoMethod KmsWrappedCryptoKey
5012 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5013 }
5014
5015 // LinkedEntity: EntityMentions can be linked to multiple entities using a
5016 // LinkedEntity message lets us add other fields, e.g. confidence.
5017 type LinkedEntity struct {
5018 // EntityId: entity_id is a concept unique identifier. These are prefixed by a
5019 // string that identifies the entity coding system, followed by the unique
5020 // identifier within that system. For example, "UMLS/C0000970". This also
5021 // supports ad hoc entities, which are formed by normalizing entity mention
5022 // content.
5023 EntityId string `json:"entityId,omitempty"`
5024 // ForceSendFields is a list of field names (e.g. "EntityId") to
5025 // unconditionally include in API requests. By default, fields with empty or
5026 // default values are omitted from API requests. See
5027 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5028 // details.
5029 ForceSendFields []string `json:"-"`
5030 // NullFields is a list of field names (e.g. "EntityId") to include in API
5031 // requests with the JSON null value. By default, fields with empty values are
5032 // omitted from API requests. See
5033 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5034 NullFields []string `json:"-"`
5035 }
5036
5037 func (s LinkedEntity) MarshalJSON() ([]byte, error) {
5038 type NoMethod LinkedEntity
5039 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5040 }
5041
5042 type ListAttributeDefinitionsResponse struct {
5043 // AttributeDefinitions: The returned Attribute definitions. The maximum number
5044 // of attributes returned is determined by the value of page_size in the
5045 // ListAttributeDefinitionsRequest.
5046 AttributeDefinitions []*AttributeDefinition `json:"attributeDefinitions,omitempty"`
5047 // NextPageToken: Token to retrieve the next page of results, or empty if there
5048 // are no more results in the list.
5049 NextPageToken string `json:"nextPageToken,omitempty"`
5050
5051 // ServerResponse contains the HTTP response code and headers from the server.
5052 googleapi.ServerResponse `json:"-"`
5053 // ForceSendFields is a list of field names (e.g. "AttributeDefinitions") to
5054 // unconditionally include in API requests. By default, fields with empty or
5055 // default values are omitted from API requests. See
5056 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5057 // details.
5058 ForceSendFields []string `json:"-"`
5059 // NullFields is a list of field names (e.g. "AttributeDefinitions") to include
5060 // in API requests with the JSON null value. By default, fields with empty
5061 // values are omitted from API requests. See
5062 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5063 NullFields []string `json:"-"`
5064 }
5065
5066 func (s ListAttributeDefinitionsResponse) MarshalJSON() ([]byte, error) {
5067 type NoMethod ListAttributeDefinitionsResponse
5068 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5069 }
5070
5071 type ListConsentArtifactsResponse struct {
5072 // ConsentArtifacts: The returned Consent artifacts. The maximum number of
5073 // artifacts returned is determined by the value of page_size in the
5074 // ListConsentArtifactsRequest.
5075 ConsentArtifacts []*ConsentArtifact `json:"consentArtifacts,omitempty"`
5076 // NextPageToken: Token to retrieve the next page of results, or empty if there
5077 // are no more results in the list.
5078 NextPageToken string `json:"nextPageToken,omitempty"`
5079
5080 // ServerResponse contains the HTTP response code and headers from the server.
5081 googleapi.ServerResponse `json:"-"`
5082 // ForceSendFields is a list of field names (e.g. "ConsentArtifacts") to
5083 // unconditionally include in API requests. By default, fields with empty or
5084 // default values are omitted from API requests. See
5085 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5086 // details.
5087 ForceSendFields []string `json:"-"`
5088 // NullFields is a list of field names (e.g. "ConsentArtifacts") to include in
5089 // API requests with the JSON null value. By default, fields with empty values
5090 // are omitted from API requests. See
5091 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5092 NullFields []string `json:"-"`
5093 }
5094
5095 func (s ListConsentArtifactsResponse) MarshalJSON() ([]byte, error) {
5096 type NoMethod ListConsentArtifactsResponse
5097 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5098 }
5099
5100 type ListConsentRevisionsResponse struct {
5101 // Consents: The returned Consent revisions. The maximum number of revisions
5102 // returned is determined by the value of `page_size` in the
5103 // ListConsentRevisionsRequest.
5104 Consents []*Consent `json:"consents,omitempty"`
5105 // NextPageToken: Token to retrieve the next page of results, or empty if there
5106 // are no more results in the list.
5107 NextPageToken string `json:"nextPageToken,omitempty"`
5108
5109 // ServerResponse contains the HTTP response code and headers from the server.
5110 googleapi.ServerResponse `json:"-"`
5111 // ForceSendFields is a list of field names (e.g. "Consents") to
5112 // unconditionally include in API requests. By default, fields with empty or
5113 // default values are omitted from API requests. See
5114 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5115 // details.
5116 ForceSendFields []string `json:"-"`
5117 // NullFields is a list of field names (e.g. "Consents") to include in API
5118 // requests with the JSON null value. By default, fields with empty values are
5119 // omitted from API requests. See
5120 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5121 NullFields []string `json:"-"`
5122 }
5123
5124 func (s ListConsentRevisionsResponse) MarshalJSON() ([]byte, error) {
5125 type NoMethod ListConsentRevisionsResponse
5126 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5127 }
5128
5129 type ListConsentStoresResponse struct {
5130 // ConsentStores: The returned consent stores. The maximum number of stores
5131 // returned is determined by the value of page_size in the
5132 // ListConsentStoresRequest.
5133 ConsentStores []*ConsentStore `json:"consentStores,omitempty"`
5134 // NextPageToken: Token to retrieve the next page of results, or empty if there
5135 // are no more results in the list.
5136 NextPageToken string `json:"nextPageToken,omitempty"`
5137
5138 // ServerResponse contains the HTTP response code and headers from the server.
5139 googleapi.ServerResponse `json:"-"`
5140 // ForceSendFields is a list of field names (e.g. "ConsentStores") to
5141 // unconditionally include in API requests. By default, fields with empty or
5142 // default values are omitted from API requests. See
5143 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5144 // details.
5145 ForceSendFields []string `json:"-"`
5146 // NullFields is a list of field names (e.g. "ConsentStores") to include in API
5147 // requests with the JSON null value. By default, fields with empty values are
5148 // omitted from API requests. See
5149 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5150 NullFields []string `json:"-"`
5151 }
5152
5153 func (s ListConsentStoresResponse) MarshalJSON() ([]byte, error) {
5154 type NoMethod ListConsentStoresResponse
5155 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5156 }
5157
5158 type ListConsentsResponse struct {
5159 // Consents: The returned Consents. The maximum number of Consents returned is
5160 // determined by the value of page_size in the ListConsentsRequest.
5161 Consents []*Consent `json:"consents,omitempty"`
5162 // NextPageToken: Token to retrieve the next page of results, or empty if there
5163 // are no more results in the list.
5164 NextPageToken string `json:"nextPageToken,omitempty"`
5165
5166 // ServerResponse contains the HTTP response code and headers from the server.
5167 googleapi.ServerResponse `json:"-"`
5168 // ForceSendFields is a list of field names (e.g. "Consents") to
5169 // unconditionally include in API requests. By default, fields with empty or
5170 // default values are omitted from API requests. See
5171 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5172 // details.
5173 ForceSendFields []string `json:"-"`
5174 // NullFields is a list of field names (e.g. "Consents") to include in API
5175 // requests with the JSON null value. By default, fields with empty values are
5176 // omitted from API requests. See
5177 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5178 NullFields []string `json:"-"`
5179 }
5180
5181 func (s ListConsentsResponse) MarshalJSON() ([]byte, error) {
5182 type NoMethod ListConsentsResponse
5183 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5184 }
5185
5186 // ListDatasetsResponse: Lists the available datasets.
5187 type ListDatasetsResponse struct {
5188 // Datasets: The first page of datasets.
5189 Datasets []*Dataset `json:"datasets,omitempty"`
5190 // NextPageToken: Token to retrieve the next page of results, or empty if there
5191 // are no more results in the list.
5192 NextPageToken string `json:"nextPageToken,omitempty"`
5193
5194 // ServerResponse contains the HTTP response code and headers from the server.
5195 googleapi.ServerResponse `json:"-"`
5196 // ForceSendFields is a list of field names (e.g. "Datasets") to
5197 // unconditionally include in API requests. By default, fields with empty or
5198 // default values are omitted from API requests. See
5199 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5200 // details.
5201 ForceSendFields []string `json:"-"`
5202 // NullFields is a list of field names (e.g. "Datasets") to include in API
5203 // requests with the JSON null value. By default, fields with empty values are
5204 // omitted from API requests. See
5205 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5206 NullFields []string `json:"-"`
5207 }
5208
5209 func (s ListDatasetsResponse) MarshalJSON() ([]byte, error) {
5210 type NoMethod ListDatasetsResponse
5211 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5212 }
5213
5214 // ListDicomStoresResponse: Lists the DICOM stores in the given dataset.
5215 type ListDicomStoresResponse struct {
5216 // DicomStores: The returned DICOM stores. Won't be more DICOM stores than the
5217 // value of page_size in the request.
5218 DicomStores []*DicomStore `json:"dicomStores,omitempty"`
5219 // NextPageToken: Token to retrieve the next page of results or empty if there
5220 // are no more results in the list.
5221 NextPageToken string `json:"nextPageToken,omitempty"`
5222
5223 // ServerResponse contains the HTTP response code and headers from the server.
5224 googleapi.ServerResponse `json:"-"`
5225 // ForceSendFields is a list of field names (e.g. "DicomStores") to
5226 // unconditionally include in API requests. By default, fields with empty or
5227 // default values are omitted from API requests. See
5228 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5229 // details.
5230 ForceSendFields []string `json:"-"`
5231 // NullFields is a list of field names (e.g. "DicomStores") to include in API
5232 // requests with the JSON null value. By default, fields with empty values are
5233 // omitted from API requests. See
5234 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5235 NullFields []string `json:"-"`
5236 }
5237
5238 func (s ListDicomStoresResponse) MarshalJSON() ([]byte, error) {
5239 type NoMethod ListDicomStoresResponse
5240 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5241 }
5242
5243 // ListFhirStoresResponse: Lists the FHIR stores in the given dataset.
5244 type ListFhirStoresResponse struct {
5245 // FhirStores: The returned FHIR stores. Won't be more FHIR stores than the
5246 // value of page_size in the request.
5247 FhirStores []*FhirStore `json:"fhirStores,omitempty"`
5248 // NextPageToken: Token to retrieve the next page of results or empty if there
5249 // are no more results in the list.
5250 NextPageToken string `json:"nextPageToken,omitempty"`
5251
5252 // ServerResponse contains the HTTP response code and headers from the server.
5253 googleapi.ServerResponse `json:"-"`
5254 // ForceSendFields is a list of field names (e.g. "FhirStores") to
5255 // unconditionally include in API requests. By default, fields with empty or
5256 // default values are omitted from API requests. See
5257 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5258 // details.
5259 ForceSendFields []string `json:"-"`
5260 // NullFields is a list of field names (e.g. "FhirStores") to include in API
5261 // requests with the JSON null value. By default, fields with empty values are
5262 // omitted from API requests. See
5263 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5264 NullFields []string `json:"-"`
5265 }
5266
5267 func (s ListFhirStoresResponse) MarshalJSON() ([]byte, error) {
5268 type NoMethod ListFhirStoresResponse
5269 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5270 }
5271
5272 // ListHl7V2StoresResponse: Lists the HL7v2 stores in the given dataset.
5273 type ListHl7V2StoresResponse struct {
5274 // Hl7V2Stores: The returned HL7v2 stores. Won't be more HL7v2 stores than the
5275 // value of page_size in the request.
5276 Hl7V2Stores []*Hl7V2Store `json:"hl7V2Stores,omitempty"`
5277 // NextPageToken: Token to retrieve the next page of results or empty if there
5278 // are no more results in the list.
5279 NextPageToken string `json:"nextPageToken,omitempty"`
5280
5281 // ServerResponse contains the HTTP response code and headers from the server.
5282 googleapi.ServerResponse `json:"-"`
5283 // ForceSendFields is a list of field names (e.g. "Hl7V2Stores") to
5284 // unconditionally include in API requests. By default, fields with empty or
5285 // default values are omitted from API requests. See
5286 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5287 // details.
5288 ForceSendFields []string `json:"-"`
5289 // NullFields is a list of field names (e.g. "Hl7V2Stores") to include in API
5290 // requests with the JSON null value. By default, fields with empty values are
5291 // omitted from API requests. See
5292 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5293 NullFields []string `json:"-"`
5294 }
5295
5296 func (s ListHl7V2StoresResponse) MarshalJSON() ([]byte, error) {
5297 type NoMethod ListHl7V2StoresResponse
5298 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5299 }
5300
5301 // ListLocationsResponse: The response message for Locations.ListLocations.
5302 type ListLocationsResponse struct {
5303 // Locations: A list of locations that matches the specified filter in the
5304 // request.
5305 Locations []*Location `json:"locations,omitempty"`
5306 // NextPageToken: The standard List next-page token.
5307 NextPageToken string `json:"nextPageToken,omitempty"`
5308
5309 // ServerResponse contains the HTTP response code and headers from the server.
5310 googleapi.ServerResponse `json:"-"`
5311 // ForceSendFields is a list of field names (e.g. "Locations") to
5312 // unconditionally include in API requests. By default, fields with empty or
5313 // default values are omitted from API requests. See
5314 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5315 // details.
5316 ForceSendFields []string `json:"-"`
5317 // NullFields is a list of field names (e.g. "Locations") to include in API
5318 // requests with the JSON null value. By default, fields with empty values are
5319 // omitted from API requests. See
5320 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5321 NullFields []string `json:"-"`
5322 }
5323
5324 func (s ListLocationsResponse) MarshalJSON() ([]byte, error) {
5325 type NoMethod ListLocationsResponse
5326 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5327 }
5328
5329 // ListMessagesResponse: Lists the messages in the specified HL7v2 store.
5330 type ListMessagesResponse struct {
5331 // Hl7V2Messages: The returned Messages. Won't be more Messages than the value
5332 // of page_size in the request. See view for populated fields.
5333 Hl7V2Messages []*Message `json:"hl7V2Messages,omitempty"`
5334 // NextPageToken: Token to retrieve the next page of results or empty if there
5335 // are no more results in the list.
5336 NextPageToken string `json:"nextPageToken,omitempty"`
5337
5338 // ServerResponse contains the HTTP response code and headers from the server.
5339 googleapi.ServerResponse `json:"-"`
5340 // ForceSendFields is a list of field names (e.g. "Hl7V2Messages") to
5341 // unconditionally include in API requests. By default, fields with empty or
5342 // default values are omitted from API requests. See
5343 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5344 // details.
5345 ForceSendFields []string `json:"-"`
5346 // NullFields is a list of field names (e.g. "Hl7V2Messages") to include in API
5347 // requests with the JSON null value. By default, fields with empty values are
5348 // omitted from API requests. See
5349 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5350 NullFields []string `json:"-"`
5351 }
5352
5353 func (s ListMessagesResponse) MarshalJSON() ([]byte, error) {
5354 type NoMethod ListMessagesResponse
5355 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5356 }
5357
5358 // ListOperationsResponse: The response message for Operations.ListOperations.
5359 type ListOperationsResponse struct {
5360 // NextPageToken: The standard List next-page token.
5361 NextPageToken string `json:"nextPageToken,omitempty"`
5362 // Operations: A list of operations that matches the specified filter in the
5363 // request.
5364 Operations []*Operation `json:"operations,omitempty"`
5365 // Unreachable: Unordered list. Unreachable resources. Populated when the
5366 // request sets `ListOperationsRequest.return_partial_success` and reads across
5367 // collections. For example, when attempting to list all resources across all
5368 // supported locations.
5369 Unreachable []string `json:"unreachable,omitempty"`
5370
5371 // ServerResponse contains the HTTP response code and headers from the server.
5372 googleapi.ServerResponse `json:"-"`
5373 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
5374 // unconditionally include in API requests. By default, fields with empty or
5375 // default values are omitted from API requests. See
5376 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5377 // details.
5378 ForceSendFields []string `json:"-"`
5379 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
5380 // requests with the JSON null value. By default, fields with empty values are
5381 // omitted from API requests. See
5382 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5383 NullFields []string `json:"-"`
5384 }
5385
5386 func (s ListOperationsResponse) MarshalJSON() ([]byte, error) {
5387 type NoMethod ListOperationsResponse
5388 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5389 }
5390
5391 type ListUserDataMappingsResponse struct {
5392 // NextPageToken: Token to retrieve the next page of results, or empty if there
5393 // are no more results in the list.
5394 NextPageToken string `json:"nextPageToken,omitempty"`
5395 // UserDataMappings: The returned User data mappings. The maximum number of
5396 // User data mappings returned is determined by the value of page_size in the
5397 // ListUserDataMappingsRequest.
5398 UserDataMappings []*UserDataMapping `json:"userDataMappings,omitempty"`
5399
5400 // ServerResponse contains the HTTP response code and headers from the server.
5401 googleapi.ServerResponse `json:"-"`
5402 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
5403 // unconditionally include in API requests. By default, fields with empty or
5404 // default values are omitted from API requests. See
5405 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5406 // details.
5407 ForceSendFields []string `json:"-"`
5408 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
5409 // requests with the JSON null value. By default, fields with empty values are
5410 // omitted from API requests. See
5411 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5412 NullFields []string `json:"-"`
5413 }
5414
5415 func (s ListUserDataMappingsResponse) MarshalJSON() ([]byte, error) {
5416 type NoMethod ListUserDataMappingsResponse
5417 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5418 }
5419
5420 // Location: A resource that represents a Google Cloud location.
5421 type Location struct {
5422 // DisplayName: The friendly name for this location, typically a nearby city
5423 // name. For example, "Tokyo".
5424 DisplayName string `json:"displayName,omitempty"`
5425 // Labels: Cross-service attributes for the location. For example
5426 // {"cloud.googleapis.com/region": "us-east1"}
5427 Labels map[string]string `json:"labels,omitempty"`
5428 // LocationId: The canonical id for this location. For example: "us-east1".
5429 LocationId string `json:"locationId,omitempty"`
5430 // Metadata: Service-specific metadata. For example the available capacity at
5431 // the given location.
5432 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
5433 // Name: Resource name for the location, which may vary between
5434 // implementations. For example:
5435 // "projects/example-project/locations/us-east1"
5436 Name string `json:"name,omitempty"`
5437
5438 // ServerResponse contains the HTTP response code and headers from the server.
5439 googleapi.ServerResponse `json:"-"`
5440 // ForceSendFields is a list of field names (e.g. "DisplayName") to
5441 // unconditionally include in API requests. By default, fields with empty or
5442 // default values are omitted from API requests. See
5443 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5444 // details.
5445 ForceSendFields []string `json:"-"`
5446 // NullFields is a list of field names (e.g. "DisplayName") to include in API
5447 // requests with the JSON null value. By default, fields with empty values are
5448 // omitted from API requests. See
5449 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5450 NullFields []string `json:"-"`
5451 }
5452
5453 func (s Location) MarshalJSON() ([]byte, error) {
5454 type NoMethod Location
5455 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5456 }
5457
5458 // Message: A complete HL7v2 message. See [Introduction to HL7 Standards]
5459 // (https://www.hl7.org/implement/standards/index.cfm?ref=common) for details
5460 // on the standard.
5461 type Message struct {
5462 // CreateTime: Output only. The datetime when the message was created. Set by
5463 // the server.
5464 CreateTime string `json:"createTime,omitempty"`
5465 // Data: Required. Raw message bytes.
5466 Data string `json:"data,omitempty"`
5467 // Labels: User-supplied key-value pairs used to organize HL7v2 stores. Label
5468 // keys must be between 1 and 63 characters long, have a UTF-8 encoding of
5469 // maximum 128 bytes, and must conform to the following PCRE regular
5470 // expression: \p{Ll}\p{Lo}{0,62} Label values are optional, must be between 1
5471 // and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must
5472 // conform to the following PCRE regular expression:
5473 // [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64 labels can be associated with a
5474 // given store.
5475 Labels map[string]string `json:"labels,omitempty"`
5476 // MessageType: The message type for this message. MSH-9.1.
5477 MessageType string `json:"messageType,omitempty"`
5478 // Name: Output only. Resource name of the Message, of the form
5479 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Sto
5480 // res/{hl7_v2_store_id}/messages/{message_id}`. Assigned by the server.
5481 Name string `json:"name,omitempty"`
5482 // ParsedData: Output only. The parsed version of the raw message data.
5483 ParsedData *ParsedData `json:"parsedData,omitempty"`
5484 // PatientIds: All patient IDs listed in the PID-2, PID-3, and PID-4 segments
5485 // of this message.
5486 PatientIds []*PatientId `json:"patientIds,omitempty"`
5487 // SchematizedData: The parsed version of the raw message data schematized
5488 // according to this store's schemas and type definitions.
5489 SchematizedData *SchematizedData `json:"schematizedData,omitempty"`
5490 // SendFacility: The hospital that this message came from. MSH-4.
5491 SendFacility string `json:"sendFacility,omitempty"`
5492 // SendTime: The datetime the sending application sent this message. MSH-7.
5493 SendTime string `json:"sendTime,omitempty"`
5494
5495 // ServerResponse contains the HTTP response code and headers from the server.
5496 googleapi.ServerResponse `json:"-"`
5497 // ForceSendFields is a list of field names (e.g. "CreateTime") to
5498 // unconditionally include in API requests. By default, fields with empty or
5499 // default values are omitted from API requests. See
5500 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5501 // details.
5502 ForceSendFields []string `json:"-"`
5503 // NullFields is a list of field names (e.g. "CreateTime") to include in API
5504 // requests with the JSON null value. By default, fields with empty values are
5505 // omitted from API requests. See
5506 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5507 NullFields []string `json:"-"`
5508 }
5509
5510 func (s Message) MarshalJSON() ([]byte, error) {
5511 type NoMethod Message
5512 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5513 }
5514
5515 // NotificationConfig: Specifies where to send notifications upon changes to a
5516 // data store.
5517 type NotificationConfig struct {
5518 // PubsubTopic: The Pub/Sub (https://cloud.google.com/pubsub/docs/) topic that
5519 // notifications of changes are published on. Supplied by the client.
5520 // PubsubMessage.Data contains the resource name. PubsubMessage.MessageId is
5521 // the ID of this message. It is guaranteed to be unique within the topic.
5522 // PubsubMessage.PublishTime is the time at which the message was published.
5523 // Notifications are only sent if the topic is non-empty. Topic names
5524 // (https://cloud.google.com/pubsub/docs/overview#names) must be scoped to a
5525 // project. Cloud Healthcare API service account must have publisher
5526 // permissions on the given Pub/Sub topic. Not having adequate permissions
5527 // causes the calls that send notifications to fail. If a notification can't be
5528 // published to Pub/Sub, errors are logged to Cloud Logging (see Viewing error
5529 // logs in Cloud Logging
5530 // (https://cloud.google.com/healthcare/docs/how-tos/logging)). If the number
5531 // of errors exceeds a certain rate, some aren't submitted. Note that not all
5532 // operations trigger notifications, see Configuring Pub/Sub notifications
5533 // (https://cloud.google.com/healthcare/docs/how-tos/pubsub) for specific
5534 // details.
5535 PubsubTopic string `json:"pubsubTopic,omitempty"`
5536 // SendForBulkImport: Indicates whether or not to send Pub/Sub notifications on
5537 // bulk import. Only supported for DICOM imports.
5538 SendForBulkImport bool `json:"sendForBulkImport,omitempty"`
5539 // ForceSendFields is a list of field names (e.g. "PubsubTopic") to
5540 // unconditionally include in API requests. By default, fields with empty or
5541 // default values are omitted from API requests. See
5542 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5543 // details.
5544 ForceSendFields []string `json:"-"`
5545 // NullFields is a list of field names (e.g. "PubsubTopic") to include in API
5546 // requests with the JSON null value. By default, fields with empty values are
5547 // omitted from API requests. See
5548 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5549 NullFields []string `json:"-"`
5550 }
5551
5552 func (s NotificationConfig) MarshalJSON() ([]byte, error) {
5553 type NoMethod NotificationConfig
5554 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5555 }
5556
5557 // Operation: This resource represents a long-running operation that is the
5558 // result of a network API call.
5559 type Operation struct {
5560 // Done: If the value is `false`, it means the operation is still in progress.
5561 // If `true`, the operation is completed, and either `error` or `response` is
5562 // available.
5563 Done bool `json:"done,omitempty"`
5564 // Error: The error result of the operation in case of failure or cancellation.
5565 Error *Status `json:"error,omitempty"`
5566 // Metadata: Service-specific metadata associated with the operation. It
5567 // typically contains progress information and common metadata such as create
5568 // time. Some services might not provide such metadata. Any method that returns
5569 // a long-running operation should document the metadata type, if any.
5570 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
5571 // Name: The server-assigned name, which is only unique within the same service
5572 // that originally returns it. If you use the default HTTP mapping, the `name`
5573 // should be a resource name ending with `operations/{unique_id}`.
5574 Name string `json:"name,omitempty"`
5575 // Response: The normal, successful response of the operation. If the original
5576 // method returns no data on success, such as `Delete`, the response is
5577 // `google.protobuf.Empty`. If the original method is standard
5578 // `Get`/`Create`/`Update`, the response should be the resource. For other
5579 // methods, the response should have the type `XxxResponse`, where `Xxx` is the
5580 // original method name. For example, if the original method name is
5581 // `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
5582 Response googleapi.RawMessage `json:"response,omitempty"`
5583
5584 // ServerResponse contains the HTTP response code and headers from the server.
5585 googleapi.ServerResponse `json:"-"`
5586 // ForceSendFields is a list of field names (e.g. "Done") to unconditionally
5587 // include in API requests. By default, fields with empty or default values are
5588 // omitted from API requests. See
5589 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5590 // details.
5591 ForceSendFields []string `json:"-"`
5592 // NullFields is a list of field names (e.g. "Done") to include in API requests
5593 // with the JSON null value. By default, fields with empty values are omitted
5594 // from API requests. See
5595 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5596 NullFields []string `json:"-"`
5597 }
5598
5599 func (s Operation) MarshalJSON() ([]byte, error) {
5600 type NoMethod Operation
5601 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5602 }
5603
5604 // OperationMetadata: OperationMetadata provides information about the
5605 // operation execution. Returned in the long-running operation's metadata
5606 // field.
5607 type OperationMetadata struct {
5608 // ApiMethodName: The name of the API method that initiated the operation.
5609 ApiMethodName string `json:"apiMethodName,omitempty"`
5610 // CancelRequested: Specifies if cancellation was requested for the operation.
5611 CancelRequested bool `json:"cancelRequested,omitempty"`
5612 Counter *ProgressCounter `json:"counter,omitempty"`
5613 // CreateTime: The time at which the operation was created by the API.
5614 CreateTime string `json:"createTime,omitempty"`
5615 // EndTime: The time at which execution workloads were completed. Some tasks
5616 // will complete after this time such as logging audit logs.
5617 EndTime string `json:"endTime,omitempty"`
5618 // LogsUrl: A link to audit and error logs in the log viewer. Error logs are
5619 // generated only by some operations, listed at Viewing error logs in Cloud
5620 // Logging (https://cloud.google.com/healthcare/docs/how-tos/logging). The
5621 // `end_time` specified in this URL may not match the end time on the metadata
5622 // because logs are written asynchronously from execution.
5623 LogsUrl string `json:"logsUrl,omitempty"`
5624 // ForceSendFields is a list of field names (e.g. "ApiMethodName") to
5625 // unconditionally include in API requests. By default, fields with empty or
5626 // default values are omitted from API requests. See
5627 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5628 // details.
5629 ForceSendFields []string `json:"-"`
5630 // NullFields is a list of field names (e.g. "ApiMethodName") to include in API
5631 // requests with the JSON null value. By default, fields with empty values are
5632 // omitted from API requests. See
5633 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5634 NullFields []string `json:"-"`
5635 }
5636
5637 func (s OperationMetadata) MarshalJSON() ([]byte, error) {
5638 type NoMethod OperationMetadata
5639 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5640 }
5641
5642 // Options: Specifies additional options to apply to the base profile.
5643 type Options struct {
5644 // CleanDescriptors: Set Clean Descriptors Option.
5645 CleanDescriptors *CleanDescriptorsOption `json:"cleanDescriptors,omitempty"`
5646 // CleanImage: Apply `Action.clean_image` to `PixelData`
5647 // (https://dicom.nema.org/medical/dicom/2018e/output/chtml/part06/chapter_6.html)
5648 // as configured.
5649 CleanImage *ImageConfig `json:"cleanImage,omitempty"`
5650 // PrimaryIds: Set `Action` for `StudyInstanceUID`, `SeriesInstanceUID`,
5651 // `SOPInstanceUID`, and `MediaStorageSOPInstanceUID`
5652 // (https://dicom.nema.org/medical/dicom/2018e/output/chtml/part06/chapter_6.html).
5653 //
5654 // Possible values:
5655 // "PRIMARY_IDS_OPTION_UNSPECIFIED" - No value provided. Default to the
5656 // behavior specified by the base profile.
5657 // "KEEP" - Keep primary IDs.
5658 // "REGEN" - Regenerate primary IDs.
5659 PrimaryIds string `json:"primaryIds,omitempty"`
5660 // ForceSendFields is a list of field names (e.g. "CleanDescriptors") to
5661 // unconditionally include in API requests. By default, fields with empty or
5662 // default values are omitted from API requests. See
5663 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5664 // details.
5665 ForceSendFields []string `json:"-"`
5666 // NullFields is a list of field names (e.g. "CleanDescriptors") to include in
5667 // API requests with the JSON null value. By default, fields with empty values
5668 // are omitted from API requests. See
5669 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5670 NullFields []string `json:"-"`
5671 }
5672
5673 func (s Options) MarshalJSON() ([]byte, error) {
5674 type NoMethod Options
5675 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5676 }
5677
5678 // ParsedData: The content of an HL7v2 message in a structured format.
5679 type ParsedData struct {
5680 Segments []*Segment `json:"segments,omitempty"`
5681 // ForceSendFields is a list of field names (e.g. "Segments") to
5682 // unconditionally include in API requests. By default, fields with empty or
5683 // default values are omitted from API requests. See
5684 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5685 // details.
5686 ForceSendFields []string `json:"-"`
5687 // NullFields is a list of field names (e.g. "Segments") to include in API
5688 // requests with the JSON null value. By default, fields with empty values are
5689 // omitted from API requests. See
5690 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5691 NullFields []string `json:"-"`
5692 }
5693
5694 func (s ParsedData) MarshalJSON() ([]byte, error) {
5695 type NoMethod ParsedData
5696 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5697 }
5698
5699 // ParserConfig: The configuration for the parser. It determines how the server
5700 // parses the messages.
5701 type ParserConfig struct {
5702 // AllowNullHeader: Determines whether messages with no header are allowed.
5703 AllowNullHeader bool `json:"allowNullHeader,omitempty"`
5704 // Schema: Schemas used to parse messages in this store, if schematized parsing
5705 // is desired.
5706 Schema *SchemaPackage `json:"schema,omitempty"`
5707 // SegmentTerminator: Byte(s) to use as the segment terminator. If this is
5708 // unset, '\r' is used as segment terminator, matching the HL7 version 2
5709 // specification.
5710 SegmentTerminator string `json:"segmentTerminator,omitempty"`
5711 // Version: Immutable. Determines the version of both the default parser to be
5712 // used when `schema` is not given, as well as the schematized parser used when
5713 // `schema` is specified. This field is immutable after HL7v2 store creation.
5714 //
5715 // Possible values:
5716 // "PARSER_VERSION_UNSPECIFIED" - Unspecified parser version, equivalent to
5717 // V1.
5718 // "V1" - The `parsed_data` includes every given non-empty message field
5719 // except the Field Separator (MSH-1) field. As a result, the parsed MSH
5720 // segment starts with the MSH-2 field and the field numbers are off-by-one
5721 // with respect to the HL7 standard.
5722 // "V2" - The `parsed_data` includes every given non-empty message field.
5723 // "V3" - This version is the same as V2, with the following change. The
5724 // `parsed_data` contains unescaped escaped field separators, component
5725 // separators, sub-component separators, repetition separators, escape
5726 // characters, and truncation characters. If `schema` is specified, the
5727 // schematized parser uses improved parsing heuristics compared to previous
5728 // versions.
5729 Version string `json:"version,omitempty"`
5730 // ForceSendFields is a list of field names (e.g. "AllowNullHeader") to
5731 // unconditionally include in API requests. By default, fields with empty or
5732 // default values are omitted from API requests. See
5733 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5734 // details.
5735 ForceSendFields []string `json:"-"`
5736 // NullFields is a list of field names (e.g. "AllowNullHeader") to include in
5737 // API requests with the JSON null value. By default, fields with empty values
5738 // are omitted from API requests. See
5739 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5740 NullFields []string `json:"-"`
5741 }
5742
5743 func (s ParserConfig) MarshalJSON() ([]byte, error) {
5744 type NoMethod ParserConfig
5745 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5746 }
5747
5748 // PatientId: A patient identifier and associated type.
5749 type PatientId struct {
5750 // Type: ID type. For example, MRN or NHS.
5751 Type string `json:"type,omitempty"`
5752 // Value: The patient's unique identifier.
5753 Value string `json:"value,omitempty"`
5754 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally
5755 // include in API requests. By default, fields with empty or default values are
5756 // omitted from API requests. See
5757 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5758 // details.
5759 ForceSendFields []string `json:"-"`
5760 // NullFields is a list of field names (e.g. "Type") to include in API requests
5761 // with the JSON null value. By default, fields with empty values are omitted
5762 // from API requests. See
5763 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5764 NullFields []string `json:"-"`
5765 }
5766
5767 func (s PatientId) MarshalJSON() ([]byte, error) {
5768 type NoMethod PatientId
5769 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5770 }
5771
5772 // PatientScope: Apply consents given by a list of patients.
5773 type PatientScope struct {
5774 // PatientIds: Optional. The list of patient IDs whose Consent resources will
5775 // be enforced. At most 10,000 patients can be specified. An empty list is
5776 // equivalent to all patients (meaning the entire FHIR store).
5777 PatientIds []string `json:"patientIds,omitempty"`
5778 // ForceSendFields is a list of field names (e.g. "PatientIds") to
5779 // unconditionally include in API requests. By default, fields with empty or
5780 // default values are omitted from API requests. See
5781 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5782 // details.
5783 ForceSendFields []string `json:"-"`
5784 // NullFields is a list of field names (e.g. "PatientIds") to include in API
5785 // requests with the JSON null value. By default, fields with empty values are
5786 // omitted from API requests. See
5787 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5788 NullFields []string `json:"-"`
5789 }
5790
5791 func (s PatientScope) MarshalJSON() ([]byte, error) {
5792 type NoMethod PatientScope
5793 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5794 }
5795
5796 // Policy: An Identity and Access Management (IAM) policy, which specifies
5797 // access controls for Google Cloud resources. A `Policy` is a collection of
5798 // `bindings`. A `binding` binds one or more `members`, or principals, to a
5799 // single `role`. Principals can be user accounts, service accounts, Google
5800 // groups, and domains (such as G Suite). A `role` is a named list of
5801 // permissions; each `role` can be an IAM predefined role or a user-created
5802 // custom role. For some types of Google Cloud resources, a `binding` can also
5803 // specify a `condition`, which is a logical expression that allows access to a
5804 // resource only if the expression evaluates to `true`. A condition can add
5805 // constraints based on attributes of the request, the resource, or both. To
5806 // learn which resources support conditions in their IAM policies, see the IAM
5807 // documentation
5808 // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON
5809 // example:** ``` { "bindings": [ { "role":
5810 // "roles/resourcemanager.organizationAdmin", "members": [
5811 // "user:[email protected]", "group:[email protected]", "domain:google.com",
5812 // "serviceAccount:[email protected]" ] }, { "role":
5813 // "roles/resourcemanager.organizationViewer", "members": [
5814 // "user:[email protected]" ], "condition": { "title": "expirable access",
5815 // "description": "Does not grant access after Sep 2020", "expression":
5816 // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag":
5817 // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: -
5818 // members: - user:[email protected] - group:[email protected] -
5819 // domain:google.com - serviceAccount:[email protected]
5820 // role: roles/resourcemanager.organizationAdmin - members: -
5821 // user:[email protected] role: roles/resourcemanager.organizationViewer
5822 // condition: title: expirable access description: Does not grant access after
5823 // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
5824 // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features,
5825 // see the IAM documentation (https://cloud.google.com/iam/docs/).
5826 type Policy struct {
5827 // AuditConfigs: Specifies cloud audit logging configuration for this policy.
5828 AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
5829 // Bindings: Associates a list of `members`, or principals, with a `role`.
5830 // Optionally, may specify a `condition` that determines how and when the
5831 // `bindings` are applied. Each of the `bindings` must contain at least one
5832 // principal. The `bindings` in a `Policy` can refer to up to 1,500 principals;
5833 // up to 250 of these principals can be Google groups. Each occurrence of a
5834 // principal counts towards these limits. For example, if the `bindings` grant
5835 // 50 different roles to `user:[email protected]`, and not to any other
5836 // principal, then you can add another 1,450 principals to the `bindings` in
5837 // the `Policy`.
5838 Bindings []*Binding `json:"bindings,omitempty"`
5839 // Etag: `etag` is used for optimistic concurrency control as a way to help
5840 // prevent simultaneous updates of a policy from overwriting each other. It is
5841 // strongly suggested that systems make use of the `etag` in the
5842 // read-modify-write cycle to perform policy updates in order to avoid race
5843 // conditions: An `etag` is returned in the response to `getIamPolicy`, and
5844 // systems are expected to put that etag in the request to `setIamPolicy` to
5845 // ensure that their change will be applied to the same version of the policy.
5846 // **Important:** If you use IAM Conditions, you must include the `etag` field
5847 // whenever you call `setIamPolicy`. If you omit this field, then IAM allows
5848 // you to overwrite a version `3` policy with a version `1` policy, and all of
5849 // the conditions in the version `3` policy are lost.
5850 Etag string `json:"etag,omitempty"`
5851 // Version: Specifies the format of the policy. Valid values are `0`, `1`, and
5852 // `3`. Requests that specify an invalid value are rejected. Any operation that
5853 // affects conditional role bindings must specify version `3`. This requirement
5854 // applies to the following operations: * Getting a policy that includes a
5855 // conditional role binding * Adding a conditional role binding to a policy *
5856 // Changing a conditional role binding in a policy * Removing any role binding,
5857 // with or without a condition, from a policy that includes conditions
5858 // **Important:** If you use IAM Conditions, you must include the `etag` field
5859 // whenever you call `setIamPolicy`. If you omit this field, then IAM allows
5860 // you to overwrite a version `3` policy with a version `1` policy, and all of
5861 // the conditions in the version `3` policy are lost. If a policy does not
5862 // include any conditions, operations on that policy may specify any valid
5863 // version or leave the field unset. To learn which resources support
5864 // conditions in their IAM policies, see the IAM documentation
5865 // (https://cloud.google.com/iam/help/conditions/resource-policies).
5866 Version int64 `json:"version,omitempty"`
5867
5868 // ServerResponse contains the HTTP response code and headers from the server.
5869 googleapi.ServerResponse `json:"-"`
5870 // ForceSendFields is a list of field names (e.g. "AuditConfigs") to
5871 // unconditionally include in API requests. By default, fields with empty or
5872 // default values are omitted from API requests. See
5873 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5874 // details.
5875 ForceSendFields []string `json:"-"`
5876 // NullFields is a list of field names (e.g. "AuditConfigs") to include in API
5877 // requests with the JSON null value. By default, fields with empty values are
5878 // omitted from API requests. See
5879 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5880 NullFields []string `json:"-"`
5881 }
5882
5883 func (s Policy) MarshalJSON() ([]byte, error) {
5884 type NoMethod Policy
5885 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5886 }
5887
5888 // ProgressCounter: ProgressCounter provides counters to describe an
5889 // operation's progress.
5890 type ProgressCounter struct {
5891 // Failure: The number of units that failed in the operation.
5892 Failure int64 `json:"failure,omitempty,string"`
5893 // Pending: The number of units that are pending in the operation.
5894 Pending int64 `json:"pending,omitempty,string"`
5895 // SecondaryFailure: The number of secondary units that failed in the
5896 // operation.
5897 SecondaryFailure int64 `json:"secondaryFailure,omitempty,string"`
5898 // SecondarySuccess: The number of secondary units that succeeded in the
5899 // operation.
5900 SecondarySuccess int64 `json:"secondarySuccess,omitempty,string"`
5901 // Success: The number of units that succeeded in the operation.
5902 Success int64 `json:"success,omitempty,string"`
5903 // ForceSendFields is a list of field names (e.g. "Failure") to unconditionally
5904 // include in API requests. By default, fields with empty or default values are
5905 // omitted from API requests. See
5906 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5907 // details.
5908 ForceSendFields []string `json:"-"`
5909 // NullFields is a list of field names (e.g. "Failure") to include in API
5910 // requests with the JSON null value. By default, fields with empty values are
5911 // omitted from API requests. See
5912 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5913 NullFields []string `json:"-"`
5914 }
5915
5916 func (s ProgressCounter) MarshalJSON() ([]byte, error) {
5917 type NoMethod ProgressCounter
5918 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5919 }
5920
5921 // PubsubDestination: The Pub/Sub output destination. The Cloud Healthcare
5922 // Service Agent requires the `roles/pubsub.publisher` Cloud IAM role on the
5923 // Pub/Sub topic.
5924 type PubsubDestination struct {
5925 // PubsubTopic: The Pub/Sub (https://cloud.google.com/pubsub/docs/) topic that
5926 // Pub/Sub messages are published on. Supplied by the client. The
5927 // `PubsubMessage` contains the following fields: * `PubsubMessage.Data`
5928 // contains the resource name. * `PubsubMessage.MessageId` is the ID of this
5929 // notification. It is guaranteed to be unique within the topic. *
5930 // `PubsubMessage.PublishTime` is the time when the message was published.
5931 // Topic names (https://cloud.google.com/pubsub/docs/overview#names) must be
5932 // scoped to a project. The Cloud Healthcare API service account,
5933 // [email protected], must have
5934 // publisher permissions on the given Pub/Sub topic. Not having adequate
5935 // permissions causes the calls that send notifications to fail.
5936 PubsubTopic string `json:"pubsubTopic,omitempty"`
5937 // ForceSendFields is a list of field names (e.g. "PubsubTopic") to
5938 // unconditionally include in API requests. By default, fields with empty or
5939 // default values are omitted from API requests. See
5940 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5941 // details.
5942 ForceSendFields []string `json:"-"`
5943 // NullFields is a list of field names (e.g. "PubsubTopic") to include in API
5944 // requests with the JSON null value. By default, fields with empty values are
5945 // omitted from API requests. See
5946 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5947 NullFields []string `json:"-"`
5948 }
5949
5950 func (s PubsubDestination) MarshalJSON() ([]byte, error) {
5951 type NoMethod PubsubDestination
5952 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5953 }
5954
5955 // QueryAccessibleDataRequest: Queries all data_ids that are consented for a
5956 // given use in the given consent store and writes them to a specified
5957 // destination. The returned Operation includes a progress counter for the
5958 // number of User data mappings processed. Errors are logged to Cloud Logging
5959 // (see [Viewing error logs in Cloud Logging]
5960 // (https://cloud.google.com/healthcare/docs/how-tos/logging) and
5961 // [QueryAccessibleData] for a sample log entry).
5962 type QueryAccessibleDataRequest struct {
5963 // GcsDestination: The Cloud Storage destination. The Cloud Healthcare API
5964 // service account must have the `roles/storage.objectAdmin` Cloud IAM role for
5965 // this Cloud Storage location. The object name is in the following format:
5966 // query-accessible-data-result-{operation_id}.txt where each line contains a
5967 // single data_id.
5968 GcsDestination *GoogleCloudHealthcareV1beta1ConsentGcsDestination `json:"gcsDestination,omitempty"`
5969 // RequestAttributes: The values of request attributes associated with this
5970 // access request.
5971 RequestAttributes map[string]string `json:"requestAttributes,omitempty"`
5972 // ResourceAttributes: Optional. The values of resource attributes associated
5973 // with the type of resources being requested. If no values are specified, then
5974 // all resource types are included in the output.
5975 ResourceAttributes map[string]string `json:"resourceAttributes,omitempty"`
5976 // ForceSendFields is a list of field names (e.g. "GcsDestination") to
5977 // unconditionally include in API requests. By default, fields with empty or
5978 // default values are omitted from API requests. See
5979 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5980 // details.
5981 ForceSendFields []string `json:"-"`
5982 // NullFields is a list of field names (e.g. "GcsDestination") to include in
5983 // API requests with the JSON null value. By default, fields with empty values
5984 // are omitted from API requests. See
5985 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5986 NullFields []string `json:"-"`
5987 }
5988
5989 func (s QueryAccessibleDataRequest) MarshalJSON() ([]byte, error) {
5990 type NoMethod QueryAccessibleDataRequest
5991 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5992 }
5993
5994 // QueryAccessibleDataResponse: Response for successful QueryAccessibleData
5995 // operations. This structure is included in the response upon operation
5996 // completion.
5997 type QueryAccessibleDataResponse struct {
5998 // GcsUris: List of files, each of which contains a list of data_id(s) that are
5999 // consented for a specified use in the request.
6000 GcsUris []string `json:"gcsUris,omitempty"`
6001 // ForceSendFields is a list of field names (e.g. "GcsUris") to unconditionally
6002 // include in API requests. By default, fields with empty or default values are
6003 // omitted from API requests. See
6004 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6005 // details.
6006 ForceSendFields []string `json:"-"`
6007 // NullFields is a list of field names (e.g. "GcsUris") to include in API
6008 // requests with the JSON null value. By default, fields with empty values are
6009 // omitted from API requests. See
6010 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6011 NullFields []string `json:"-"`
6012 }
6013
6014 func (s QueryAccessibleDataResponse) MarshalJSON() ([]byte, error) {
6015 type NoMethod QueryAccessibleDataResponse
6016 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6017 }
6018
6019 // RecurseTag: Recursively apply DICOM de-id to tags nested in a sequence.
6020 // Supported [Value Representation]
6021 // (https://dicom.nema.org/medical/dicom/2018e/output/chtml/part05/sect_6.2.html#table_6.2-1):
6022 // SQ
6023 type RecurseTag struct {
6024 }
6025
6026 // RedactConfig: Define how to redact sensitive values. Default behaviour is
6027 // erase. For example, "My name is Jane." becomes "My name is ."
6028 type RedactConfig struct {
6029 }
6030
6031 // RegenUidTag: Replace UID with a new generated UID. Supported [Value
6032 // Representation]
6033 // (https://dicom.nema.org/medical/dicom/2018e/output/chtml/part05/sect_6.2.html#table_6.2-1):
6034 // UI
6035 type RegenUidTag struct {
6036 }
6037
6038 // RejectConsentRequest: Rejects the latest revision of the specified Consent
6039 // by committing a new revision with `state` updated to `REJECTED`. If the
6040 // latest revision of the given Consent is in the `REJECTED` state, no new
6041 // revision is committed.
6042 type RejectConsentRequest struct {
6043 // ConsentArtifact: Optional. The resource name of the Consent artifact that
6044 // contains documentation of the user's rejection of the draft Consent, of the
6045 // form
6046 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentS
6047 // tores/{consent_store_id}/consentArtifacts/{consent_artifact_id}`. If the
6048 // draft Consent had a Consent artifact, this Consent artifact overwrites it.
6049 ConsentArtifact string `json:"consentArtifact,omitempty"`
6050 // ForceSendFields is a list of field names (e.g. "ConsentArtifact") to
6051 // unconditionally include in API requests. By default, fields with empty or
6052 // default values are omitted from API requests. See
6053 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6054 // details.
6055 ForceSendFields []string `json:"-"`
6056 // NullFields is a list of field names (e.g. "ConsentArtifact") to include in
6057 // API requests with the JSON null value. By default, fields with empty values
6058 // are omitted from API requests. See
6059 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6060 NullFields []string `json:"-"`
6061 }
6062
6063 func (s RejectConsentRequest) MarshalJSON() ([]byte, error) {
6064 type NoMethod RejectConsentRequest
6065 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6066 }
6067
6068 // RemoveField: Remove field.
6069 type RemoveField struct {
6070 }
6071
6072 // RemoveTag: Replace with empty tag.
6073 type RemoveTag struct {
6074 }
6075
6076 // ReplaceWithInfoTypeConfig: When using the INSPECT_AND_TRANSFORM action, each
6077 // match is replaced with the name of the info_type. For example, "My name is
6078 // Jane" becomes "My name is [PERSON_NAME]." The TRANSFORM action is equivalent
6079 // to redacting.
6080 type ReplaceWithInfoTypeConfig struct {
6081 }
6082
6083 // ResetTag: Reset tag to a placeholder value.
6084 type ResetTag struct {
6085 }
6086
6087 // Resources: A list of FHIR resources.
6088 type Resources struct {
6089 // Resources: List of resources IDs. For example, "Patient/1234".
6090 Resources []string `json:"resources,omitempty"`
6091 // ForceSendFields is a list of field names (e.g. "Resources") to
6092 // unconditionally include in API requests. By default, fields with empty or
6093 // default values are omitted from API requests. See
6094 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6095 // details.
6096 ForceSendFields []string `json:"-"`
6097 // NullFields is a list of field names (e.g. "Resources") to include in API
6098 // requests with the JSON null value. By default, fields with empty values are
6099 // omitted from API requests. See
6100 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6101 NullFields []string `json:"-"`
6102 }
6103
6104 func (s Resources) MarshalJSON() ([]byte, error) {
6105 type NoMethod Resources
6106 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6107 }
6108
6109 // Result: The consent evaluation result for a single `data_id`.
6110 type Result struct {
6111 // ConsentDetails: The resource names of all evaluated Consents mapped to their
6112 // evaluation.
6113 ConsentDetails map[string]ConsentEvaluation `json:"consentDetails,omitempty"`
6114 // Consented: Whether the resource is consented for the given use.
6115 Consented bool `json:"consented,omitempty"`
6116 // DataId: The unique identifier of the evaluated resource.
6117 DataId string `json:"dataId,omitempty"`
6118 // ForceSendFields is a list of field names (e.g. "ConsentDetails") to
6119 // unconditionally include in API requests. By default, fields with empty or
6120 // default values are omitted from API requests. See
6121 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6122 // details.
6123 ForceSendFields []string `json:"-"`
6124 // NullFields is a list of field names (e.g. "ConsentDetails") to include in
6125 // API requests with the JSON null value. By default, fields with empty values
6126 // are omitted from API requests. See
6127 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6128 NullFields []string `json:"-"`
6129 }
6130
6131 func (s Result) MarshalJSON() ([]byte, error) {
6132 type NoMethod Result
6133 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6134 }
6135
6136 // RevokeConsentRequest: Revokes the latest revision of the specified Consent
6137 // by committing a new revision with `state` updated to `REVOKED`. If the
6138 // latest revision of the given Consent is in the `REVOKED` state, no new
6139 // revision is committed.
6140 type RevokeConsentRequest struct {
6141 // ConsentArtifact: Optional. The resource name of the Consent artifact that
6142 // contains proof of the user's revocation of the Consent, of the form
6143 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentS
6144 // tores/{consent_store_id}/consentArtifacts/{consent_artifact_id}`.
6145 ConsentArtifact string `json:"consentArtifact,omitempty"`
6146 // ForceSendFields is a list of field names (e.g. "ConsentArtifact") to
6147 // unconditionally include in API requests. By default, fields with empty or
6148 // default values are omitted from API requests. See
6149 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6150 // details.
6151 ForceSendFields []string `json:"-"`
6152 // NullFields is a list of field names (e.g. "ConsentArtifact") to include in
6153 // API requests with the JSON null value. By default, fields with empty values
6154 // are omitted from API requests. See
6155 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6156 NullFields []string `json:"-"`
6157 }
6158
6159 func (s RevokeConsentRequest) MarshalJSON() ([]byte, error) {
6160 type NoMethod RevokeConsentRequest
6161 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6162 }
6163
6164 // RollbackFhirResourceFilteringFields: Filters to select resources that need
6165 // to be rolled back.
6166 type RollbackFhirResourceFilteringFields struct {
6167 // MetadataFilter: Optional. A filter expression that matches data in the
6168 // `Resource.meta` element. Supports all filters in AIP-160
6169 // (https://google.aip.dev/160) except the "has" (`:`) operator. Supports the
6170 // following custom functions: * `tag("") = "" for tag filtering. *
6171 // `extension_value_ts("") = ` for filtering extensions with a timestamp, where
6172 // `` is a Unix timestamp. Supports the `>`, `<`, `<=`, `>=`, and `!=`
6173 // comparison operators.
6174 MetadataFilter string `json:"metadataFilter,omitempty"`
6175 // OperationIds: Optional. A list of operation IDs to roll back. Only changes
6176 // made by these operations will be rolled back.
6177 OperationIds googleapi.Uint64s `json:"operationIds,omitempty"`
6178 // ForceSendFields is a list of field names (e.g. "MetadataFilter") 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. "MetadataFilter") to include in
6185 // API requests with the JSON null value. By default, fields with empty values
6186 // 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 RollbackFhirResourceFilteringFields) MarshalJSON() ([]byte, error) {
6192 type NoMethod RollbackFhirResourceFilteringFields
6193 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6194 }
6195
6196 // RollbackFhirResourcesRequest: Request to roll back resources.
6197 type RollbackFhirResourcesRequest struct {
6198 // ChangeType: Optional. CREATE/UPDATE/DELETE/ALL for reverting all txns of a
6199 // certain type.
6200 //
6201 // Possible values:
6202 // "CHANGE_TYPE_UNSPECIFIED" - When unspecified, revert all transactions
6203 // "ALL" - All transactions
6204 // "CREATE" - Revert only CREATE transactions
6205 // "UPDATE" - Revert only Update transactions
6206 // "DELETE" - Revert only Delete transactions
6207 ChangeType string `json:"changeType,omitempty"`
6208 // ExcludeRollbacks: Optional. Specifies whether to exclude earlier rollbacks.
6209 ExcludeRollbacks bool `json:"excludeRollbacks,omitempty"`
6210 // FilteringFields: Optional. Tag represents fields that HDE needs to identify
6211 // resources that will be reverted. Parameters for filtering resources
6212 FilteringFields *RollbackFhirResourceFilteringFields `json:"filteringFields,omitempty"`
6213 // Force: Optional. When enabled, changes will be reverted without explicit
6214 // confirmation
6215 Force bool `json:"force,omitempty"`
6216 // InputGcsObject: Optional. Cloud Storage object containing list of
6217 // {resourceType}/{resourceId} lines, identifying resources to be reverted
6218 InputGcsObject string `json:"inputGcsObject,omitempty"`
6219 // ResultGcsBucket: Required. Bucket to deposit result
6220 ResultGcsBucket string `json:"resultGcsBucket,omitempty"`
6221 // RollbackTime: Required. Time point to rollback to.
6222 RollbackTime string `json:"rollbackTime,omitempty"`
6223 // Type: Optional. If specified, revert only resources of these types
6224 Type []string `json:"type,omitempty"`
6225 // ForceSendFields is a list of field names (e.g. "ChangeType") to
6226 // unconditionally include in API requests. By default, fields with empty or
6227 // default values are omitted from API requests. See
6228 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6229 // details.
6230 ForceSendFields []string `json:"-"`
6231 // NullFields is a list of field names (e.g. "ChangeType") to include in API
6232 // requests with the JSON null value. By default, fields with empty values are
6233 // omitted from API requests. See
6234 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6235 NullFields []string `json:"-"`
6236 }
6237
6238 func (s RollbackFhirResourcesRequest) MarshalJSON() ([]byte, error) {
6239 type NoMethod RollbackFhirResourcesRequest
6240 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6241 }
6242
6243 // RollbackFhirResourcesResponse: Final response of rollback FHIR resources
6244 // request.
6245 type RollbackFhirResourcesResponse struct {
6246 // FhirStore: The name of the FHIR store to rollback, in the format of
6247 // "projects/{project_id}/locations/{location_id}/datasets/{dataset_id}
6248 // /fhirStores/{fhir_store_id}".
6249 FhirStore string `json:"fhirStore,omitempty"`
6250 // ForceSendFields is a list of field names (e.g. "FhirStore") to
6251 // unconditionally include in API requests. By default, fields with empty or
6252 // default values are omitted from API requests. See
6253 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6254 // details.
6255 ForceSendFields []string `json:"-"`
6256 // NullFields is a list of field names (e.g. "FhirStore") to include in API
6257 // requests with the JSON null value. By default, fields with empty values are
6258 // omitted from API requests. See
6259 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6260 NullFields []string `json:"-"`
6261 }
6262
6263 func (s RollbackFhirResourcesResponse) MarshalJSON() ([]byte, error) {
6264 type NoMethod RollbackFhirResourcesResponse
6265 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6266 }
6267
6268 // RollbackHL7MessagesFilteringFields: Filtering fields for an HL7v2 rollback.
6269 // Currently only supports a list of operation ids to roll back.
6270 type RollbackHL7MessagesFilteringFields struct {
6271 // OperationIds: Optional. A list of operation IDs to roll back.
6272 OperationIds googleapi.Uint64s `json:"operationIds,omitempty"`
6273 // ForceSendFields is a list of field names (e.g. "OperationIds") to
6274 // unconditionally include in API requests. By default, fields with empty or
6275 // default values are omitted from API requests. See
6276 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6277 // details.
6278 ForceSendFields []string `json:"-"`
6279 // NullFields is a list of field names (e.g. "OperationIds") to include in API
6280 // requests with the JSON null value. By default, fields with empty values are
6281 // omitted from API requests. See
6282 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6283 NullFields []string `json:"-"`
6284 }
6285
6286 func (s RollbackHL7MessagesFilteringFields) MarshalJSON() ([]byte, error) {
6287 type NoMethod RollbackHL7MessagesFilteringFields
6288 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6289 }
6290
6291 // RollbackHl7V2MessagesRequest: Point in time recovery rollback request.
6292 type RollbackHl7V2MessagesRequest struct {
6293 // ChangeType: Optional. CREATE/UPDATE/DELETE/ALL for reverting all txns of a
6294 // certain type.
6295 //
6296 // Possible values:
6297 // "CHANGE_TYPE_UNSPECIFIED" - When unspecified, revert all transactions
6298 // "ALL" - All transactions
6299 // "CREATE" - Revert only CREATE transactions
6300 // "UPDATE" - Revert only Update transactions
6301 // "DELETE" - Revert only Delete transactions
6302 ChangeType string `json:"changeType,omitempty"`
6303 // ExcludeRollbacks: Optional. Specifies whether to exclude earlier rollbacks.
6304 ExcludeRollbacks bool `json:"excludeRollbacks,omitempty"`
6305 // FilteringFields: Optional. Parameters for filtering.
6306 FilteringFields *RollbackHL7MessagesFilteringFields `json:"filteringFields,omitempty"`
6307 // Force: Optional. When enabled, changes will be reverted without explicit
6308 // confirmation.
6309 Force bool `json:"force,omitempty"`
6310 // InputGcsObject: Optional. Cloud storage object containing list of
6311 // {resourceId} lines, identifying resources to be reverted
6312 InputGcsObject string `json:"inputGcsObject,omitempty"`
6313 // ResultGcsBucket: Required. Bucket to deposit result
6314 ResultGcsBucket string `json:"resultGcsBucket,omitempty"`
6315 // RollbackTime: Required. Times point to rollback to.
6316 RollbackTime string `json:"rollbackTime,omitempty"`
6317 // ForceSendFields is a list of field names (e.g. "ChangeType") to
6318 // unconditionally include in API requests. By default, fields with empty or
6319 // default values are omitted from API requests. See
6320 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6321 // details.
6322 ForceSendFields []string `json:"-"`
6323 // NullFields is a list of field names (e.g. "ChangeType") to include in API
6324 // requests with the JSON null value. By default, fields with empty values are
6325 // omitted from API requests. See
6326 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6327 NullFields []string `json:"-"`
6328 }
6329
6330 func (s RollbackHl7V2MessagesRequest) MarshalJSON() ([]byte, error) {
6331 type NoMethod RollbackHl7V2MessagesRequest
6332 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6333 }
6334
6335 // RollbackHl7V2MessagesResponse: Final response of rollback FHIR resources
6336 // request.
6337 type RollbackHl7V2MessagesResponse struct {
6338 // Hl7v2Store: The name of the HL7v2 store to rollback, in the format of
6339 // "projects/{project_id}/locations/{location_id}/datasets/{dataset_id}
6340 // /hl7v2Stores/{fhir_store_id}".
6341 Hl7v2Store string `json:"hl7v2Store,omitempty"`
6342 // ForceSendFields is a list of field names (e.g. "Hl7v2Store") to
6343 // unconditionally include in API requests. By default, fields with empty or
6344 // default values are omitted from API requests. See
6345 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6346 // details.
6347 ForceSendFields []string `json:"-"`
6348 // NullFields is a list of field names (e.g. "Hl7v2Store") to include in API
6349 // requests with the JSON null value. By default, fields with empty values are
6350 // omitted from API requests. See
6351 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6352 NullFields []string `json:"-"`
6353 }
6354
6355 func (s RollbackHl7V2MessagesResponse) MarshalJSON() ([]byte, error) {
6356 type NoMethod RollbackHl7V2MessagesResponse
6357 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6358 }
6359
6360 // SchemaConfig: Configuration for the FHIR BigQuery schema. Determines how the
6361 // server generates the schema.
6362 type SchemaConfig struct {
6363 // LastUpdatedPartitionConfig: The configuration for exported BigQuery tables
6364 // to be partitioned by FHIR resource's last updated time column.
6365 LastUpdatedPartitionConfig *TimePartitioning `json:"lastUpdatedPartitionConfig,omitempty"`
6366 // RecursiveStructureDepth: The depth for all recursive structures in the
6367 // output analytics schema. For example, `concept` in the CodeSystem resource
6368 // is a recursive structure; when the depth is 2, the CodeSystem table will
6369 // have a column called `concept.concept` but not `concept.concept.concept`. If
6370 // not specified or set to 0, the server will use the default value 2. The
6371 // maximum depth allowed is 5.
6372 RecursiveStructureDepth int64 `json:"recursiveStructureDepth,omitempty,string"`
6373 // SchemaType: Specifies the output schema type. Schema type is required.
6374 //
6375 // Possible values:
6376 // "SCHEMA_TYPE_UNSPECIFIED" - No schema type specified. This type is
6377 // unsupported.
6378 // "LOSSLESS" - A data-driven schema generated from the fields present in the
6379 // FHIR data being exported, with no additional simplification. This type
6380 // cannot be used for streaming to BigQuery.
6381 // "ANALYTICS" - Analytics schema defined by the FHIR community. See
6382 // https://github.com/FHIR/sql-on-fhir/blob/master/sql-on-fhir.md. BigQuery
6383 // only allows a maximum of 10,000 columns per table. Due to this limitation,
6384 // the server will not generate schemas for fields of type `Resource`, which
6385 // can hold any resource type. The affected fields are
6386 // `Parameters.parameter.resource`, `Bundle.entry.resource`, and
6387 // `Bundle.entry.response.outcome`. Analytics schema does not gracefully handle
6388 // extensions with one or more occurrences, anaytics schema also does not
6389 // handle contained resource. Additionally, extensions with a URL ending in
6390 // "/{existing_resource_field_name}" may cause undefined behavior.
6391 // "ANALYTICS_V2" - Analytics V2, similar to schema defined by the FHIR
6392 // community, with added support for extensions with one or more occurrences
6393 // and contained resources in stringified JSON. Extensions with a URL ending in
6394 // "/{existing_resource_field_name}" will cause conflict and prevent the
6395 // resource from being sent to BigQuery. Analytics V2 uses more space in the
6396 // destination table than Analytics V1. It is generally recommended to use
6397 // Analytics V2 over Analytics.
6398 SchemaType string `json:"schemaType,omitempty"`
6399 // ForceSendFields is a list of field names (e.g. "LastUpdatedPartitionConfig")
6400 // to unconditionally include in API requests. By default, fields with empty or
6401 // default values are omitted from API requests. See
6402 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6403 // details.
6404 ForceSendFields []string `json:"-"`
6405 // NullFields is a list of field names (e.g. "LastUpdatedPartitionConfig") to
6406 // include in API requests with the JSON null value. By default, fields with
6407 // empty values are omitted from API requests. See
6408 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6409 NullFields []string `json:"-"`
6410 }
6411
6412 func (s SchemaConfig) MarshalJSON() ([]byte, error) {
6413 type NoMethod SchemaConfig
6414 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6415 }
6416
6417 // SchemaFlattened: Using this field will flatten the DICOM instances into a
6418 // BigQuery table. The table will have one column for each DICOM tag. The
6419 // column name will be the DICOM tag's textual representation.
6420 type SchemaFlattened struct {
6421 }
6422
6423 // SchemaGroup: An HL7v2 logical group construct.
6424 type SchemaGroup struct {
6425 // Choice: True indicates that this is a choice group, meaning that only one of
6426 // its segments can exist in a given message.
6427 Choice bool `json:"choice,omitempty"`
6428 // MaxOccurs: The maximum number of times this group can be repeated. 0 or -1
6429 // means unbounded.
6430 MaxOccurs int64 `json:"maxOccurs,omitempty"`
6431 // Members: Nested groups and/or segments.
6432 Members []*GroupOrSegment `json:"members,omitempty"`
6433 // MinOccurs: The minimum number of times this group must be present/repeated.
6434 MinOccurs int64 `json:"minOccurs,omitempty"`
6435 // Name: The name of this group. For example, "ORDER_DETAIL".
6436 Name string `json:"name,omitempty"`
6437 // ForceSendFields is a list of field names (e.g. "Choice") to unconditionally
6438 // include in API requests. By default, fields with empty or default values are
6439 // omitted from API requests. See
6440 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6441 // details.
6442 ForceSendFields []string `json:"-"`
6443 // NullFields is a list of field names (e.g. "Choice") to include in API
6444 // requests with the JSON null value. By default, fields with empty values are
6445 // omitted from API requests. See
6446 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6447 NullFields []string `json:"-"`
6448 }
6449
6450 func (s SchemaGroup) MarshalJSON() ([]byte, error) {
6451 type NoMethod SchemaGroup
6452 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6453 }
6454
6455 // SchemaJSON: Using this field will set the schema such that all DICOM tags
6456 // will be included in the BigQuery table as a single JSON type column. The
6457 // BigQuery table schema will include the following columns: *
6458 // `StudyInstanceUID` (Type: STRING): DICOM Tag 0020000D. * `SeriesInstanceUID`
6459 // (Type: STRING): DICOM Tag 0020000E. * `SOPInstanceUID` (Type: STRING): DICOM
6460 // Tag 00080018. * `SourceDicomStore` (Type: STRING): The name of the source
6461 // DICOM store. This field is only included if the `include_source_store`
6462 // option is set to true. * `Metadata` (Type: JSON): All DICOM tags for the
6463 // instance, stored in a single JSON object. * `StructuredStorageSize` (Type:
6464 // INTEGER): Size of the structured storage in bytes. * `DroppedTags` (Type:
6465 // STRING, Repeated: Yes): List of tags that were dropped during the
6466 // conversion. * `StorageClass` (Type: STRING): The storage class of the
6467 // instance. * `LastUpdated` (Type: TIMESTAMP): Timestamp of the last update to
6468 // the instance. * `BlobStorageSize` (Type: INTEGER): Size of the blob storage
6469 // in bytes. * `Type` (Type: STRING): Indicates the type of operation (e.g.,
6470 // INSERT, DELETE). This field is *omitted* if `ChangeDataCaptureConfig` is
6471 // enabled.
6472 type SchemaJSON struct {
6473 }
6474
6475 // SchemaPackage: A schema package contains a set of schemas and type
6476 // definitions.
6477 type SchemaPackage struct {
6478 // IgnoreMinOccurs: Flag to ignore all min_occurs restrictions in the schema.
6479 // This means that incoming messages can omit any group, segment, field,
6480 // component, or subcomponent.
6481 IgnoreMinOccurs bool `json:"ignoreMinOccurs,omitempty"`
6482 // Schemas: Schema configs that are layered based on their VersionSources that
6483 // match the incoming message. Schema configs present in higher indices
6484 // override those in lower indices with the same message type and trigger event
6485 // if their VersionSources all match an incoming message.
6486 Schemas []*Hl7SchemaConfig `json:"schemas,omitempty"`
6487 // SchematizedParsingType: Determines how messages that fail to parse are
6488 // handled.
6489 //
6490 // Possible values:
6491 // "SCHEMATIZED_PARSING_TYPE_UNSPECIFIED" - Unspecified schematized parsing
6492 // type, equivalent to `SOFT_FAIL`.
6493 // "SOFT_FAIL" - Messages that fail to parse are still stored and ACKed but a
6494 // parser error is stored in place of the schematized data.
6495 // "HARD_FAIL" - Messages that fail to parse are rejected from
6496 // ingestion/insertion and return an error code.
6497 SchematizedParsingType string `json:"schematizedParsingType,omitempty"`
6498 // Types: Schema type definitions that are layered based on their
6499 // VersionSources that match the incoming message. Type definitions present in
6500 // higher indices override those in lower indices with the same type name if
6501 // their VersionSources all match an incoming message.
6502 Types []*Hl7TypesConfig `json:"types,omitempty"`
6503 // UnexpectedSegmentHandling: Determines how unexpected segments (segments not
6504 // matched to the schema) are handled.
6505 //
6506 // Possible values:
6507 // "UNEXPECTED_SEGMENT_HANDLING_MODE_UNSPECIFIED" - Unspecified handling
6508 // mode, equivalent to FAIL.
6509 // "FAIL" - Unexpected segments fail to parse and return an error.
6510 // "SKIP" - Unexpected segments do not fail, but are omitted from the output.
6511 // "PARSE" - Unexpected segments do not fail, but are parsed in place and
6512 // added to the current group. If a segment has a type definition, it is used,
6513 // otherwise it is parsed as VARIES.
6514 UnexpectedSegmentHandling string `json:"unexpectedSegmentHandling,omitempty"`
6515 // ForceSendFields is a list of field names (e.g. "IgnoreMinOccurs") to
6516 // unconditionally include in API requests. By default, fields with empty or
6517 // default values are omitted from API requests. See
6518 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6519 // details.
6520 ForceSendFields []string `json:"-"`
6521 // NullFields is a list of field names (e.g. "IgnoreMinOccurs") to include in
6522 // API requests with the JSON null value. By default, fields with empty values
6523 // are omitted from API requests. See
6524 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6525 NullFields []string `json:"-"`
6526 }
6527
6528 func (s SchemaPackage) MarshalJSON() ([]byte, error) {
6529 type NoMethod SchemaPackage
6530 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6531 }
6532
6533 // SchemaSegment: An HL7v2 Segment.
6534 type SchemaSegment struct {
6535 // MaxOccurs: The maximum number of times this segment can be present in this
6536 // group. 0 or -1 means unbounded.
6537 MaxOccurs int64 `json:"maxOccurs,omitempty"`
6538 // MinOccurs: The minimum number of times this segment can be present in this
6539 // group.
6540 MinOccurs int64 `json:"minOccurs,omitempty"`
6541 // Type: The Segment type. For example, "PID".
6542 Type string `json:"type,omitempty"`
6543 // ForceSendFields is a list of field names (e.g. "MaxOccurs") to
6544 // unconditionally include in API requests. By default, fields with empty or
6545 // default values are omitted from API requests. See
6546 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6547 // details.
6548 ForceSendFields []string `json:"-"`
6549 // NullFields is a list of field names (e.g. "MaxOccurs") to include in API
6550 // requests with the JSON null value. By default, fields with empty values are
6551 // omitted from API requests. See
6552 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6553 NullFields []string `json:"-"`
6554 }
6555
6556 func (s SchemaSegment) MarshalJSON() ([]byte, error) {
6557 type NoMethod SchemaSegment
6558 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6559 }
6560
6561 // SchematizedData: The content of an HL7v2 message in a structured format as
6562 // specified by a schema.
6563 type SchematizedData struct {
6564 // Data: JSON output of the parser.
6565 Data string `json:"data,omitempty"`
6566 // Error: The error output of the parser.
6567 Error string `json:"error,omitempty"`
6568 // ForceSendFields is a list of field names (e.g. "Data") to unconditionally
6569 // include in API requests. By default, fields with empty or default values are
6570 // omitted from API requests. See
6571 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6572 // details.
6573 ForceSendFields []string `json:"-"`
6574 // NullFields is a list of field names (e.g. "Data") to include in API requests
6575 // with the JSON null value. By default, fields with empty values are omitted
6576 // from API requests. See
6577 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6578 NullFields []string `json:"-"`
6579 }
6580
6581 func (s SchematizedData) MarshalJSON() ([]byte, error) {
6582 type NoMethod SchematizedData
6583 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6584 }
6585
6586 // SearchConfig: Contains the configuration for FHIR search.
6587 type SearchConfig struct {
6588 // SearchParameters: A list of search parameters in this FHIR store that are
6589 // used to configure this FHIR store.
6590 SearchParameters []*SearchParameter `json:"searchParameters,omitempty"`
6591 // ForceSendFields is a list of field names (e.g. "SearchParameters") to
6592 // unconditionally include in API requests. By default, fields with empty or
6593 // default values are omitted from API requests. See
6594 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6595 // details.
6596 ForceSendFields []string `json:"-"`
6597 // NullFields is a list of field names (e.g. "SearchParameters") to include in
6598 // API requests with the JSON null value. By default, fields with empty values
6599 // are omitted from API requests. See
6600 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6601 NullFields []string `json:"-"`
6602 }
6603
6604 func (s SearchConfig) MarshalJSON() ([]byte, error) {
6605 type NoMethod SearchConfig
6606 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6607 }
6608
6609 // SearchParameter: Contains the versioned name and the URL for one
6610 // SearchParameter.
6611 type SearchParameter struct {
6612 // CanonicalUrl: The canonical url of the search parameter resource.
6613 CanonicalUrl string `json:"canonicalUrl,omitempty"`
6614 // Parameter: The versioned name of the search parameter resource. The format
6615 // is
6616 // projects/{project-id}/locations/{location}/datasets/{dataset-id}/fhirStores/{
6617 // fhirStore-id}/fhir/SearchParameter/{resource-id}/_history/{version-id} For
6618 // fhir stores with disable_resource_versioning=true, the format is
6619 // projects/{project-id}/locations/{location}/datasets/{dataset-id}/fhirStores/{
6620 // fhirStore-id}/fhir/SearchParameter/{resource-id}/
6621 Parameter string `json:"parameter,omitempty"`
6622 // ForceSendFields is a list of field names (e.g. "CanonicalUrl") to
6623 // unconditionally include in API requests. By default, fields with empty or
6624 // default values are omitted from API requests. See
6625 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6626 // details.
6627 ForceSendFields []string `json:"-"`
6628 // NullFields is a list of field names (e.g. "CanonicalUrl") to include in API
6629 // requests with the JSON null value. By default, fields with empty values are
6630 // omitted from API requests. See
6631 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6632 NullFields []string `json:"-"`
6633 }
6634
6635 func (s SearchParameter) MarshalJSON() ([]byte, error) {
6636 type NoMethod SearchParameter
6637 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6638 }
6639
6640 // Segment: A segment in a structured format.
6641 type Segment struct {
6642 // Fields: A mapping from the positional location to the value. The key string
6643 // uses zero-based indexes separated by dots to identify Fields, components and
6644 // sub-components. A bracket notation is also used to identify different
6645 // instances of a repeated field. Regex for key: (\d+)(\[\d+\])?(.\d+)?(.\d+)?
6646 // Examples of (key, value) pairs: * (0.1, "hemoglobin") denotes that the first
6647 // component of Field 0 has the value "hemoglobin". * (1.1.2, "CBC") denotes
6648 // that the second sub-component of the first component of Field 1 has the
6649 // value "CBC". * (1[0].1, "HbA1c") denotes that the first component of the
6650 // first Instance of Field 1, which is repeated, has the value "HbA1c".
6651 Fields map[string]string `json:"fields,omitempty"`
6652 // SegmentId: A string that indicates the type of segment. For example, EVN or
6653 // PID.
6654 SegmentId string `json:"segmentId,omitempty"`
6655 // SetId: Set ID for segments that can be in a set. This can be empty if it's
6656 // missing or isn't applicable.
6657 SetId string `json:"setId,omitempty"`
6658 // ForceSendFields is a list of field names (e.g. "Fields") to unconditionally
6659 // include in API requests. By default, fields with empty or default values are
6660 // omitted from API requests. See
6661 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6662 // details.
6663 ForceSendFields []string `json:"-"`
6664 // NullFields is a list of field names (e.g. "Fields") to include in API
6665 // requests with the JSON null value. By default, fields with empty values are
6666 // omitted from API requests. See
6667 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6668 NullFields []string `json:"-"`
6669 }
6670
6671 func (s Segment) MarshalJSON() ([]byte, error) {
6672 type NoMethod Segment
6673 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6674 }
6675
6676 // SeriesMetrics: SeriesMetrics contains metrics describing a DICOM series.
6677 type SeriesMetrics struct {
6678 // BlobStorageSizeBytes: Total blob storage bytes for all instances in the
6679 // series.
6680 BlobStorageSizeBytes int64 `json:"blobStorageSizeBytes,omitempty,string"`
6681 // InstanceCount: Number of instances in the series.
6682 InstanceCount int64 `json:"instanceCount,omitempty,string"`
6683 // Series: The series resource path. For example,
6684 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomSto
6685 // res/{dicom_store_id}/dicomWeb/studies/{study_uid}/series/{series_uid}`.
6686 Series string `json:"series,omitempty"`
6687 // StructuredStorageSizeBytes: Total structured storage bytes for all instances
6688 // in the series.
6689 StructuredStorageSizeBytes int64 `json:"structuredStorageSizeBytes,omitempty,string"`
6690
6691 // ServerResponse contains the HTTP response code and headers from the server.
6692 googleapi.ServerResponse `json:"-"`
6693 // ForceSendFields is a list of field names (e.g. "BlobStorageSizeBytes") to
6694 // unconditionally include in API requests. By default, fields with empty or
6695 // default values are omitted from API requests. See
6696 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6697 // details.
6698 ForceSendFields []string `json:"-"`
6699 // NullFields is a list of field names (e.g. "BlobStorageSizeBytes") to include
6700 // in API requests with the JSON null value. By default, fields with empty
6701 // values are omitted from API requests. See
6702 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6703 NullFields []string `json:"-"`
6704 }
6705
6706 func (s SeriesMetrics) MarshalJSON() ([]byte, error) {
6707 type NoMethod SeriesMetrics
6708 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6709 }
6710
6711 // SetBlobStorageSettingsRequest: Request message for `SetBlobStorageSettings`
6712 // method.
6713 type SetBlobStorageSettingsRequest struct {
6714 // BlobStorageSettings: The blob storage settings to update for the specified
6715 // resources. Only fields listed in `update_mask` are applied.
6716 BlobStorageSettings *BlobStorageSettings `json:"blobStorageSettings,omitempty"`
6717 // FilterConfig: Optional. A filter configuration. If `filter_config` is
6718 // specified, set the value of `resource` to the resource name of a DICOM store
6719 // in the format
6720 // `projects/{projectID}/locations/{locationID}/datasets/{datasetID}/dicomStores
6721 // /{dicomStoreID}`.
6722 FilterConfig *DicomFilterConfig `json:"filterConfig,omitempty"`
6723 // ForceSendFields is a list of field names (e.g. "BlobStorageSettings") to
6724 // unconditionally include in API requests. By default, fields with empty or
6725 // default values are omitted from API requests. See
6726 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6727 // details.
6728 ForceSendFields []string `json:"-"`
6729 // NullFields is a list of field names (e.g. "BlobStorageSettings") to include
6730 // in API requests with the JSON null value. By default, fields with empty
6731 // values are omitted from API requests. See
6732 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6733 NullFields []string `json:"-"`
6734 }
6735
6736 func (s SetBlobStorageSettingsRequest) MarshalJSON() ([]byte, error) {
6737 type NoMethod SetBlobStorageSettingsRequest
6738 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6739 }
6740
6741 // SetBlobStorageSettingsResponse: Returns additional info in regards to a
6742 // completed set blob storage settings API.
6743 type SetBlobStorageSettingsResponse struct {
6744 }
6745
6746 // SetIamPolicyRequest: Request message for `SetIamPolicy` method.
6747 type SetIamPolicyRequest struct {
6748 // Policy: REQUIRED: The complete policy to be applied to the `resource`. The
6749 // size of the policy is limited to a few 10s of KB. An empty policy is a valid
6750 // policy but certain Google Cloud services (such as Projects) might reject
6751 // them.
6752 Policy *Policy `json:"policy,omitempty"`
6753 // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the policy to
6754 // modify. Only the fields in the mask will be modified. If no mask is
6755 // provided, the following default mask is used: `paths: "bindings, etag"
6756 UpdateMask string `json:"updateMask,omitempty"`
6757 // ForceSendFields is a list of field names (e.g. "Policy") to unconditionally
6758 // include in API requests. By default, fields with empty or default values are
6759 // omitted from API requests. See
6760 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6761 // details.
6762 ForceSendFields []string `json:"-"`
6763 // NullFields is a list of field names (e.g. "Policy") to include in API
6764 // requests with the JSON null value. By default, fields with empty values are
6765 // omitted from API requests. See
6766 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6767 NullFields []string `json:"-"`
6768 }
6769
6770 func (s SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
6771 type NoMethod SetIamPolicyRequest
6772 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6773 }
6774
6775 // Signature: User signature.
6776 type Signature struct {
6777 // Image: Optional. An image of the user's signature.
6778 Image *Image `json:"image,omitempty"`
6779 // Metadata: Optional. Metadata associated with the user's signature. For
6780 // example, the user's name or the user's title.
6781 Metadata map[string]string `json:"metadata,omitempty"`
6782 // SignatureTime: Optional. Timestamp of the signature.
6783 SignatureTime string `json:"signatureTime,omitempty"`
6784 // UserId: Required. User's UUID provided by the client.
6785 UserId string `json:"userId,omitempty"`
6786 // ForceSendFields is a list of field names (e.g. "Image") to unconditionally
6787 // include in API requests. By default, fields with empty or default values are
6788 // omitted from API requests. See
6789 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6790 // details.
6791 ForceSendFields []string `json:"-"`
6792 // NullFields is a list of field names (e.g. "Image") to include in API
6793 // requests with the JSON null value. By default, fields with empty values are
6794 // omitted from API requests. See
6795 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6796 NullFields []string `json:"-"`
6797 }
6798
6799 func (s Signature) MarshalJSON() ([]byte, error) {
6800 type NoMethod Signature
6801 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6802 }
6803
6804 // Status: The `Status` type defines a logical error model that is suitable for
6805 // different programming environments, including REST APIs and RPC APIs. It is
6806 // used by gRPC (https://github.com/grpc). Each `Status` message contains three
6807 // pieces of data: error code, error message, and error details. You can find
6808 // out more about this error model and how to work with it in the API Design
6809 // Guide (https://cloud.google.com/apis/design/errors).
6810 type Status struct {
6811 // Code: The status code, which should be an enum value of google.rpc.Code.
6812 Code int64 `json:"code,omitempty"`
6813 // Details: A list of messages that carry the error details. There is a common
6814 // set of message types for APIs to use.
6815 Details []googleapi.RawMessage `json:"details,omitempty"`
6816 // Message: A developer-facing error message, which should be in English. Any
6817 // user-facing error message should be localized and sent in the
6818 // google.rpc.Status.details field, or localized by the client.
6819 Message string `json:"message,omitempty"`
6820 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
6821 // include in API requests. By default, fields with empty or default values are
6822 // omitted from API requests. See
6823 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6824 // details.
6825 ForceSendFields []string `json:"-"`
6826 // NullFields is a list of field names (e.g. "Code") to include in API requests
6827 // with the JSON null value. By default, fields with empty values are omitted
6828 // from API requests. See
6829 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6830 NullFields []string `json:"-"`
6831 }
6832
6833 func (s Status) MarshalJSON() ([]byte, error) {
6834 type NoMethod Status
6835 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6836 }
6837
6838 // StorageInfo: StorageInfo encapsulates all the storage info of a resource.
6839 type StorageInfo struct {
6840 // BlobStorageInfo: Info about the data stored in blob storage for the
6841 // resource.
6842 BlobStorageInfo *BlobStorageInfo `json:"blobStorageInfo,omitempty"`
6843 // ReferencedResource: The resource whose storage info is returned. For
6844 // example:
6845 // `projects/{projectID}/locations/{locationID}/datasets/{datasetID}/dicomStores
6846 // /{dicomStoreID}/dicomWeb/studies/{studyUID}/series/{seriesUID}/instances/{ins
6847 // tanceUID}`
6848 ReferencedResource string `json:"referencedResource,omitempty"`
6849 // StructuredStorageInfo: Info about the data stored in structured storage for
6850 // the resource.
6851 StructuredStorageInfo *StructuredStorageInfo `json:"structuredStorageInfo,omitempty"`
6852
6853 // ServerResponse contains the HTTP response code and headers from the server.
6854 googleapi.ServerResponse `json:"-"`
6855 // ForceSendFields is a list of field names (e.g. "BlobStorageInfo") to
6856 // unconditionally include in API requests. By default, fields with empty or
6857 // default values are omitted from API requests. See
6858 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6859 // details.
6860 ForceSendFields []string `json:"-"`
6861 // NullFields is a list of field names (e.g. "BlobStorageInfo") to include in
6862 // API requests with the JSON null value. By default, fields with empty values
6863 // are omitted from API requests. See
6864 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6865 NullFields []string `json:"-"`
6866 }
6867
6868 func (s StorageInfo) MarshalJSON() ([]byte, error) {
6869 type NoMethod StorageInfo
6870 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6871 }
6872
6873 // StreamConfig: Contains configuration for streaming FHIR export.
6874 type StreamConfig struct {
6875 // BigqueryDestination: The destination BigQuery structure that contains both
6876 // the dataset location and corresponding schema config. The output is
6877 // organized in one table per resource type. The server reuses the existing
6878 // tables (if any) that are named after the resource types, e.g. "Patient",
6879 // "Observation". When there is no existing table for a given resource type,
6880 // the server attempts to create one. When a table schema doesn't align with
6881 // the schema config, either because of existing incompatible schema or out of
6882 // band incompatible modification, the server does not stream in new data. One
6883 // resolution in this case is to delete the incompatible table and let the
6884 // server recreate one, though the newly created table only contains data after
6885 // the table recreation. BigQuery imposes a 1 MB limit on streaming insert row
6886 // size, therefore any resource mutation that generates more than 1 MB of
6887 // BigQuery data will not be streamed. Results are written to BigQuery tables
6888 // according to the parameters in BigQueryDestination.WriteDisposition.
6889 // Different versions of the same resource are distinguishable by the
6890 // meta.versionId and meta.lastUpdated columns. The operation
6891 // (CREATE/UPDATE/DELETE) that results in the new version is recorded in the
6892 // meta.tag. The tables contain all historical resource versions since
6893 // streaming was enabled. For query convenience, the server also creates one
6894 // view per table of the same name containing only the current resource
6895 // version. The streamed data in the BigQuery dataset is not guaranteed to be
6896 // completely unique. The combination of the id and meta.versionId columns
6897 // should ideally identify a single unique row. But in rare cases, duplicates
6898 // may exist. At query time, users may use the SQL select statement to keep
6899 // only one of the duplicate rows given an id and meta.versionId pair.
6900 // Alternatively, the server created view mentioned above also filters out
6901 // duplicates. If a resource mutation cannot be streamed to BigQuery, errors
6902 // will be logged to Cloud Logging (see Viewing error logs in Cloud Logging
6903 // (https://cloud.google.com/healthcare/docs/how-tos/logging)).
6904 BigqueryDestination *GoogleCloudHealthcareV1beta1FhirBigQueryDestination `json:"bigqueryDestination,omitempty"`
6905 // DeidentifiedStoreDestination: The destination FHIR store for de-identified
6906 // resources. After this field is added, all subsequent creates/updates/patches
6907 // to the source store will be de-identified using the provided configuration
6908 // and applied to the destination store. Resources deleted from the source
6909 // store will be deleted from the destination store. Importing resources to the
6910 // source store will not trigger the streaming. If the source store already
6911 // contains resources when this option is enabled, those resources will not be
6912 // copied to the destination store unless they are subsequently updated. This
6913 // may result in invalid references in the destination store. Before adding
6914 // this config, you must grant the healthcare.fhirResources.update permission
6915 // on the destination store to your project's **Cloud Healthcare Service
6916 // Agent** service account
6917 // (https://cloud.google.com/healthcare/docs/how-tos/permissions-healthcare-api-gcp-products#the_cloud_healthcare_service_agent).
6918 // The destination store must set enable_update_create to true. The destination
6919 // store must have disable_referential_integrity set to true. If a resource
6920 // cannot be de-identified, errors will be logged to Cloud Logging (see Viewing
6921 // error logs in Cloud Logging
6922 // (https://cloud.google.com/healthcare/docs/how-tos/logging)). Not supported
6923 // for R5 stores.
6924 DeidentifiedStoreDestination *DeidentifiedStoreDestination `json:"deidentifiedStoreDestination,omitempty"`
6925 // ResourceTypes: Supply a FHIR resource type (such as "Patient" or
6926 // "Observation"). See https://www.hl7.org/fhir/valueset-resource-types.html
6927 // for a list of all FHIR resource types. The server treats an empty list as an
6928 // intent to stream all the supported resource types in this FHIR store.
6929 ResourceTypes []string `json:"resourceTypes,omitempty"`
6930 // ForceSendFields is a list of field names (e.g. "BigqueryDestination") to
6931 // unconditionally include in API requests. By default, fields with empty or
6932 // default values are omitted from API requests. See
6933 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6934 // details.
6935 ForceSendFields []string `json:"-"`
6936 // NullFields is a list of field names (e.g. "BigqueryDestination") to include
6937 // in API requests with the JSON null value. By default, fields with empty
6938 // values are omitted from API requests. See
6939 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6940 NullFields []string `json:"-"`
6941 }
6942
6943 func (s StreamConfig) MarshalJSON() ([]byte, error) {
6944 type NoMethod StreamConfig
6945 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6946 }
6947
6948 // StructuredStorageInfo: StructuredStorageInfo contains details about the data
6949 // stored in Structured Storage for the referenced resource.
6950 type StructuredStorageInfo struct {
6951 // SizeBytes: Size in bytes of data stored in structured storage.
6952 SizeBytes int64 `json:"sizeBytes,omitempty,string"`
6953 // ForceSendFields is a list of field names (e.g. "SizeBytes") to
6954 // unconditionally include in API requests. By default, fields with empty or
6955 // default values are omitted from API requests. See
6956 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6957 // details.
6958 ForceSendFields []string `json:"-"`
6959 // NullFields is a list of field names (e.g. "SizeBytes") to include in API
6960 // requests with the JSON null value. By default, fields with empty values are
6961 // omitted from API requests. See
6962 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6963 NullFields []string `json:"-"`
6964 }
6965
6966 func (s StructuredStorageInfo) MarshalJSON() ([]byte, error) {
6967 type NoMethod StructuredStorageInfo
6968 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6969 }
6970
6971 // StudyMetrics: StudyMetrics contains metrics describing a DICOM study.
6972 type StudyMetrics struct {
6973 // BlobStorageSizeBytes: Total blob storage bytes for all instances in the
6974 // study.
6975 BlobStorageSizeBytes int64 `json:"blobStorageSizeBytes,omitempty,string"`
6976 // InstanceCount: Number of instances in the study.
6977 InstanceCount int64 `json:"instanceCount,omitempty,string"`
6978 // SeriesCount: Number of series in the study.
6979 SeriesCount int64 `json:"seriesCount,omitempty,string"`
6980 // StructuredStorageSizeBytes: Total structured storage bytes for all instances
6981 // in the study.
6982 StructuredStorageSizeBytes int64 `json:"structuredStorageSizeBytes,omitempty,string"`
6983 // Study: The study resource path. For example,
6984 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomSto
6985 // res/{dicom_store_id}/dicomWeb/studies/{study_uid}`.
6986 Study string `json:"study,omitempty"`
6987
6988 // ServerResponse contains the HTTP response code and headers from the server.
6989 googleapi.ServerResponse `json:"-"`
6990 // ForceSendFields is a list of field names (e.g. "BlobStorageSizeBytes") to
6991 // unconditionally include in API requests. By default, fields with empty or
6992 // default values are omitted from API requests. See
6993 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6994 // details.
6995 ForceSendFields []string `json:"-"`
6996 // NullFields is a list of field names (e.g. "BlobStorageSizeBytes") to include
6997 // in API requests with the JSON null value. By default, fields with empty
6998 // values are omitted from API requests. See
6999 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
7000 NullFields []string `json:"-"`
7001 }
7002
7003 func (s StudyMetrics) MarshalJSON() ([]byte, error) {
7004 type NoMethod StudyMetrics
7005 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
7006 }
7007
7008 // TagFilterList: List of tags to be filtered.
7009 type TagFilterList struct {
7010 // Tags: Tags to be filtered. Tags must be DICOM Data Elements, File Meta
7011 // Elements, or Directory Structuring Elements, as defined at:
7012 // https://dicom.nema.org/medical/dicom/current/output/html/part06.html#table_6-1,.
7013 // They may be provided by "Keyword" or "Tag". For example, "PatientID",
7014 // "00100010".
7015 Tags []string `json:"tags,omitempty"`
7016 // ForceSendFields is a list of field names (e.g. "Tags") to unconditionally
7017 // include in API requests. By default, fields with empty or default values are
7018 // omitted from API requests. See
7019 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
7020 // details.
7021 ForceSendFields []string `json:"-"`
7022 // NullFields is a list of field names (e.g. "Tags") to include in API requests
7023 // with the JSON null value. By default, fields with empty values are omitted
7024 // from API requests. See
7025 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
7026 NullFields []string `json:"-"`
7027 }
7028
7029 func (s TagFilterList) MarshalJSON() ([]byte, error) {
7030 type NoMethod TagFilterList
7031 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
7032 }
7033
7034 // TestIamPermissionsRequest: Request message for `TestIamPermissions` method.
7035 type TestIamPermissionsRequest struct {
7036 // Permissions: The set of permissions to check for the `resource`. Permissions
7037 // with wildcards (such as `*` or `storage.*`) are not allowed. For more
7038 // information see IAM Overview
7039 // (https://cloud.google.com/iam/docs/overview#permissions).
7040 Permissions []string `json:"permissions,omitempty"`
7041 // ForceSendFields is a list of field names (e.g. "Permissions") to
7042 // unconditionally include in API requests. By default, fields with empty or
7043 // default values are omitted from API requests. See
7044 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
7045 // details.
7046 ForceSendFields []string `json:"-"`
7047 // NullFields is a list of field names (e.g. "Permissions") to include in API
7048 // requests with the JSON null value. By default, fields with empty values are
7049 // omitted from API requests. See
7050 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
7051 NullFields []string `json:"-"`
7052 }
7053
7054 func (s TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
7055 type NoMethod TestIamPermissionsRequest
7056 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
7057 }
7058
7059 // TestIamPermissionsResponse: Response message for `TestIamPermissions`
7060 // method.
7061 type TestIamPermissionsResponse struct {
7062 // Permissions: A subset of `TestPermissionsRequest.permissions` that the
7063 // caller is allowed.
7064 Permissions []string `json:"permissions,omitempty"`
7065
7066 // ServerResponse contains the HTTP response code and headers from the server.
7067 googleapi.ServerResponse `json:"-"`
7068 // ForceSendFields is a list of field names (e.g. "Permissions") to
7069 // unconditionally include in API requests. By default, fields with empty or
7070 // default values are omitted from API requests. See
7071 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
7072 // details.
7073 ForceSendFields []string `json:"-"`
7074 // NullFields is a list of field names (e.g. "Permissions") to include in API
7075 // requests with the JSON null value. By default, fields with empty values are
7076 // omitted from API requests. See
7077 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
7078 NullFields []string `json:"-"`
7079 }
7080
7081 func (s TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
7082 type NoMethod TestIamPermissionsResponse
7083 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
7084 }
7085
7086 // TextConfig: Configures how to transform sensitive text `InfoTypes`.
7087 type TextConfig struct {
7088 // AdditionalTransformations: Additional transformations to apply to the
7089 // detected data, overriding `profile`.
7090 AdditionalTransformations []*InfoTypeTransformation `json:"additionalTransformations,omitempty"`
7091 // ExcludeInfoTypes: InfoTypes to skip transforming, overriding `profile`.
7092 ExcludeInfoTypes []string `json:"excludeInfoTypes,omitempty"`
7093 // ProfileType: Base profile type for text transformation.
7094 //
7095 // Possible values:
7096 // "PROFILE_TYPE_UNSPECIFIED" - No profile provided. Same as BASIC.
7097 // "EMPTY" - Empty profile which does not perform any transformations.
7098 // "BASIC" - Automatically converts "DATE" infoTypes using a DateShiftConfig,
7099 // and all other infoTypes using a ReplaceWithInfoTypeConfig.
7100 ProfileType string `json:"profileType,omitempty"`
7101 // Transformations: The transformations to apply to the detected data.
7102 // Deprecated. Use `additional_transformations` instead.
7103 Transformations []*InfoTypeTransformation `json:"transformations,omitempty"`
7104 // ForceSendFields is a list of field names (e.g. "AdditionalTransformations")
7105 // to unconditionally include in API requests. By default, fields with empty or
7106 // default values are omitted from API requests. See
7107 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
7108 // details.
7109 ForceSendFields []string `json:"-"`
7110 // NullFields is a list of field names (e.g. "AdditionalTransformations") to
7111 // include in API requests with the JSON null value. By default, fields with
7112 // empty values are omitted from API requests. See
7113 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
7114 NullFields []string `json:"-"`
7115 }
7116
7117 func (s TextConfig) MarshalJSON() ([]byte, error) {
7118 type NoMethod TextConfig
7119 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
7120 }
7121
7122 // TextSpan: A span of text in the provided document.
7123 type TextSpan struct {
7124 // BeginOffset: The unicode codepoint index of the beginning of this span.
7125 BeginOffset int64 `json:"beginOffset,omitempty"`
7126 // Content: The original text contained in this span.
7127 Content string `json:"content,omitempty"`
7128 // ForceSendFields is a list of field names (e.g. "BeginOffset") to
7129 // unconditionally include in API requests. By default, fields with empty or
7130 // default values are omitted from API requests. See
7131 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
7132 // details.
7133 ForceSendFields []string `json:"-"`
7134 // NullFields is a list of field names (e.g. "BeginOffset") to include in API
7135 // requests with the JSON null value. By default, fields with empty values are
7136 // omitted from API requests. See
7137 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
7138 NullFields []string `json:"-"`
7139 }
7140
7141 func (s TextSpan) MarshalJSON() ([]byte, error) {
7142 type NoMethod TextSpan
7143 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
7144 }
7145
7146 // TimePartitioning: Configuration for FHIR BigQuery time-partitioned tables.
7147 type TimePartitioning struct {
7148 // ExpirationMs: Number of milliseconds for which to keep the storage for a
7149 // partition.
7150 ExpirationMs int64 `json:"expirationMs,omitempty,string"`
7151 // Type: Type of partitioning.
7152 //
7153 // Possible values:
7154 // "PARTITION_TYPE_UNSPECIFIED" - Default unknown time.
7155 // "HOUR" - Data partitioned by hour.
7156 // "DAY" - Data partitioned by day.
7157 // "MONTH" - Data partitioned by month.
7158 // "YEAR" - Data partitioned by year.
7159 Type string `json:"type,omitempty"`
7160 // ForceSendFields is a list of field names (e.g. "ExpirationMs") to
7161 // unconditionally include in API requests. By default, fields with empty or
7162 // default values are omitted from API requests. See
7163 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
7164 // details.
7165 ForceSendFields []string `json:"-"`
7166 // NullFields is a list of field names (e.g. "ExpirationMs") to include in API
7167 // requests with the JSON null value. By default, fields with empty values are
7168 // omitted from API requests. See
7169 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
7170 NullFields []string `json:"-"`
7171 }
7172
7173 func (s TimePartitioning) MarshalJSON() ([]byte, error) {
7174 type NoMethod TimePartitioning
7175 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
7176 }
7177
7178 // TimeRange: Apply consents given by patients whose most recent consent
7179 // changes are in the time range. Note that after identifying these patients,
7180 // the server applies all Consent resources given by those patients, not just
7181 // the Consent resources within the timestamp in the range.
7182 type TimeRange struct {
7183 // End: Optional. The latest consent change time, in format
7184 // YYYY-MM-DDThh:mm:ss.sss+zz:zz If not specified, the system uses the time
7185 // when ApplyConsents was called.
7186 End string `json:"end,omitempty"`
7187 // Start: Optional. The earliest consent change time, in format
7188 // YYYY-MM-DDThh:mm:ss.sss+zz:zz If not specified, the system uses the FHIR
7189 // store creation time.
7190 Start string `json:"start,omitempty"`
7191 // ForceSendFields is a list of field names (e.g. "End") to unconditionally
7192 // include in API requests. By default, fields with empty or default values are
7193 // omitted from API requests. See
7194 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
7195 // details.
7196 ForceSendFields []string `json:"-"`
7197 // NullFields is a list of field names (e.g. "End") to include in API requests
7198 // with the JSON null value. By default, fields with empty values are omitted
7199 // from API requests. See
7200 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
7201 NullFields []string `json:"-"`
7202 }
7203
7204 func (s TimeRange) MarshalJSON() ([]byte, error) {
7205 type NoMethod TimeRange
7206 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
7207 }
7208
7209 // Type: A type definition for some HL7v2 type (incl. Segments and Datatypes).
7210 type Type struct {
7211 // Fields: The (sub) fields this type has (if not primitive).
7212 Fields []*Field `json:"fields,omitempty"`
7213 // Name: The name of this type. This would be the segment or datatype name. For
7214 // example, "PID" or "XPN".
7215 Name string `json:"name,omitempty"`
7216 // Primitive: If this is a primitive type then this field is the type of the
7217 // primitive For example, STRING. Leave unspecified for composite types.
7218 //
7219 // Possible values:
7220 // "PRIMITIVE_UNSPECIFIED" - Not a primitive.
7221 // "STRING" - String primitive.
7222 // "VARIES" - Element that can have unschematized children.
7223 // "UNESCAPED_STRING" - Like STRING, but all delimiters below this element
7224 // are ignored.
7225 Primitive string `json:"primitive,omitempty"`
7226 // ForceSendFields is a list of field names (e.g. "Fields") to unconditionally
7227 // include in API requests. By default, fields with empty or default values are
7228 // omitted from API requests. See
7229 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
7230 // details.
7231 ForceSendFields []string `json:"-"`
7232 // NullFields is a list of field names (e.g. "Fields") to include in API
7233 // requests with the JSON null value. By default, fields with empty values are
7234 // omitted from API requests. See
7235 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
7236 NullFields []string `json:"-"`
7237 }
7238
7239 func (s Type) MarshalJSON() ([]byte, error) {
7240 type NoMethod Type
7241 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
7242 }
7243
7244 // UpdateSeriesMetadataResponse: UpdateSeriesMetadataResponse is the LRO
7245 // response for UpdateSeriesMetadata.
7246 type UpdateSeriesMetadataResponse struct {
7247 }
7248
7249 // UpdateStudyMetadataResponse: UpdateStudyMetadataResponse is the LRO response
7250 // for UpdateStudyMetadata.
7251 type UpdateStudyMetadataResponse struct {
7252 }
7253
7254 // UserDataMapping: Maps a resource to the associated user and Attributes.
7255 type UserDataMapping struct {
7256 // ArchiveTime: Output only. Indicates the time when this mapping was archived.
7257 ArchiveTime string `json:"archiveTime,omitempty"`
7258 // Archived: Output only. Indicates whether this mapping is archived.
7259 Archived bool `json:"archived,omitempty"`
7260 // DataId: Required. A unique identifier for the mapped resource.
7261 DataId string `json:"dataId,omitempty"`
7262 // Name: Resource name of the User data mapping, of the form
7263 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentS
7264 // tores/{consent_store_id}/userDataMappings/{user_data_mapping_id}`.
7265 Name string `json:"name,omitempty"`
7266 // ResourceAttributes: Attributes of the resource. Only explicitly set
7267 // attributes are displayed here. Attribute definitions with defaults set
7268 // implicitly apply to these User data mappings. Attributes listed here must be
7269 // single valued, that is, exactly one value is specified for the field
7270 // "values" in each Attribute.
7271 ResourceAttributes []*Attribute `json:"resourceAttributes,omitempty"`
7272 // UserId: Required. User's UUID provided by the client.
7273 UserId string `json:"userId,omitempty"`
7274
7275 // ServerResponse contains the HTTP response code and headers from the server.
7276 googleapi.ServerResponse `json:"-"`
7277 // ForceSendFields is a list of field names (e.g. "ArchiveTime") to
7278 // unconditionally include in API requests. By default, fields with empty or
7279 // default values are omitted from API requests. See
7280 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
7281 // details.
7282 ForceSendFields []string `json:"-"`
7283 // NullFields is a list of field names (e.g. "ArchiveTime") to include in API
7284 // requests with the JSON null value. By default, fields with empty values are
7285 // omitted from API requests. See
7286 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
7287 NullFields []string `json:"-"`
7288 }
7289
7290 func (s UserDataMapping) MarshalJSON() ([]byte, error) {
7291 type NoMethod UserDataMapping
7292 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
7293 }
7294
7295 // ValidationConfig: Contains the configuration for FHIR profiles and
7296 // validation.
7297 type ValidationConfig struct {
7298 // DisableFhirpathValidation: Whether to disable FHIRPath validation for
7299 // incoming resources. The default value is false. Set this to true to disable
7300 // checking incoming resources for conformance against FHIRPath requirement
7301 // defined in the FHIR specification. This property only affects resource types
7302 // that do not have profiles configured for them, any rules in enabled
7303 // implementation guides will still be enforced.
7304 DisableFhirpathValidation bool `json:"disableFhirpathValidation,omitempty"`
7305 // DisableProfileValidation: Whether to disable profile validation for this
7306 // FHIR store. The default value is false. Set this to true to disable checking
7307 // incoming resources for conformance against StructureDefinitions in this FHIR
7308 // store.
7309 DisableProfileValidation bool `json:"disableProfileValidation,omitempty"`
7310 // DisableReferenceTypeValidation: Whether to disable reference type validation
7311 // for incoming resources. The default value is false. Set this to true to
7312 // disable checking incoming resources for conformance against reference type
7313 // requirement defined in the FHIR specification. This property only affects
7314 // resource types that do not have profiles configured for them, any rules in
7315 // enabled implementation guides will still be enforced.
7316 DisableReferenceTypeValidation bool `json:"disableReferenceTypeValidation,omitempty"`
7317 // DisableRequiredFieldValidation: Whether to disable required fields
7318 // validation for incoming resources. The default value is false. Set this to
7319 // true to disable checking incoming resources for conformance against required
7320 // fields requirement defined in the FHIR specification. This property only
7321 // affects resource types that do not have profiles configured for them, any
7322 // rules in enabled implementation guides will still be enforced.
7323 DisableRequiredFieldValidation bool `json:"disableRequiredFieldValidation,omitempty"`
7324 // EnableFhirpathProfileValidation: Optional. Whether to enable FHIRPath
7325 // validation for incoming resource types that have profiles configured for
7326 // them in the `enabled_implementation_guides` list. Set this to true to enable
7327 // checking incoming resources for conformance against FHIRPath requirements
7328 // defined in the configured profiles.
7329 EnableFhirpathProfileValidation bool `json:"enableFhirpathProfileValidation,omitempty"`
7330 // EnabledImplementationGuides: A list of ImplementationGuide URLs in this FHIR
7331 // store that are used to configure the profiles to use for validation. For
7332 // example, to use the US Core profiles for validation, set
7333 // `enabled_implementation_guides` to
7334 // `["http://hl7.org/fhir/us/core/ImplementationGuide/ig"]`. If
7335 // `enabled_implementation_guides` is empty or omitted, then incoming resources
7336 // are only required to conform to the base FHIR profiles. Otherwise, a
7337 // resource must conform to at least one profile listed in the `global`
7338 // property of one of the enabled ImplementationGuides. The Cloud Healthcare
7339 // API does not currently enforce all of the rules in a StructureDefinition.
7340 // The following rules are supported: - min/max - minValue/maxValue - maxLength
7341 // - type - fixed[x] - pattern[x] on simple types - slicing, when using "value"
7342 // as the discriminator type - FHIRPath constraints (only when
7343 // `enable_fhirpath_profile_validation` is true) When a URL cannot be resolved
7344 // (for example, in a type assertion), the server does not return an error.
7345 EnabledImplementationGuides []string `json:"enabledImplementationGuides,omitempty"`
7346 // ForceSendFields is a list of field names (e.g. "DisableFhirpathValidation")
7347 // to unconditionally include in API requests. By default, fields with empty or
7348 // default values are omitted from API requests. See
7349 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
7350 // details.
7351 ForceSendFields []string `json:"-"`
7352 // NullFields is a list of field names (e.g. "DisableFhirpathValidation") to
7353 // include in API requests with the JSON null value. By default, fields with
7354 // empty values are omitted from API requests. See
7355 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
7356 NullFields []string `json:"-"`
7357 }
7358
7359 func (s ValidationConfig) MarshalJSON() ([]byte, error) {
7360 type NoMethod ValidationConfig
7361 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
7362 }
7363
7364 // VersionSource: Describes a selector for extracting and matching an MSH field
7365 // to a value.
7366 type VersionSource struct {
7367 // MshField: The field to extract from the MSH segment. For example, "3.1" or
7368 // "18[1].1".
7369 MshField string `json:"mshField,omitempty"`
7370 // Value: The value to match with the field. For example, "My Application Name"
7371 // or "2.3".
7372 Value string `json:"value,omitempty"`
7373 // ForceSendFields is a list of field names (e.g. "MshField") to
7374 // unconditionally include in API requests. By default, fields with empty or
7375 // default values are omitted from API requests. See
7376 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
7377 // details.
7378 ForceSendFields []string `json:"-"`
7379 // NullFields is a list of field names (e.g. "MshField") to include in API
7380 // requests with the JSON null value. By default, fields with empty values are
7381 // omitted from API requests. See
7382 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
7383 NullFields []string `json:"-"`
7384 }
7385
7386 func (s VersionSource) MarshalJSON() ([]byte, error) {
7387 type NoMethod VersionSource
7388 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
7389 }
7390
7391 type ProjectsLocationsGetCall struct {
7392 s *Service
7393 name string
7394 urlParams_ gensupport.URLParams
7395 ifNoneMatch_ string
7396 ctx_ context.Context
7397 header_ http.Header
7398 }
7399
7400 // Get: Gets information about a location.
7401 //
7402 // - name: Resource name for the location.
7403 func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
7404 c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7405 c.name = name
7406 return c
7407 }
7408
7409 // Fields allows partial responses to be retrieved. See
7410 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7411 // details.
7412 func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
7413 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7414 return c
7415 }
7416
7417 // IfNoneMatch sets an optional parameter which makes the operation fail if the
7418 // object's ETag matches the given value. This is useful for getting updates
7419 // only after the object has changed since the last request.
7420 func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
7421 c.ifNoneMatch_ = entityTag
7422 return c
7423 }
7424
7425 // Context sets the context to be used in this call's Do method.
7426 func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
7427 c.ctx_ = ctx
7428 return c
7429 }
7430
7431 // Header returns a http.Header that can be modified by the caller to add
7432 // headers to the request.
7433 func (c *ProjectsLocationsGetCall) Header() http.Header {
7434 if c.header_ == nil {
7435 c.header_ = make(http.Header)
7436 }
7437 return c.header_
7438 }
7439
7440 func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
7441 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7442 if c.ifNoneMatch_ != "" {
7443 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7444 }
7445 c.urlParams_.Set("alt", alt)
7446 c.urlParams_.Set("prettyPrint", "false")
7447 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
7448 urls += "?" + c.urlParams_.Encode()
7449 req, err := http.NewRequest("GET", urls, nil)
7450 if err != nil {
7451 return nil, err
7452 }
7453 req.Header = reqHeaders
7454 googleapi.Expand(req.URL, map[string]string{
7455 "name": c.name,
7456 })
7457 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.get", "request", internallog.HTTPRequest(req, nil))
7458 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7459 }
7460
7461 // Do executes the "healthcare.projects.locations.get" call.
7462 // Any non-2xx status code is an error. Response headers are in either
7463 // *Location.ServerResponse.Header or (if a response was returned at all) in
7464 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7465 // whether the returned error was because http.StatusNotModified was returned.
7466 func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
7467 gensupport.SetOptions(c.urlParams_, opts...)
7468 res, err := c.doRequest("json")
7469 if res != nil && res.StatusCode == http.StatusNotModified {
7470 if res.Body != nil {
7471 res.Body.Close()
7472 }
7473 return nil, gensupport.WrapError(&googleapi.Error{
7474 Code: res.StatusCode,
7475 Header: res.Header,
7476 })
7477 }
7478 if err != nil {
7479 return nil, err
7480 }
7481 defer googleapi.CloseBody(res)
7482 if err := googleapi.CheckResponse(res); err != nil {
7483 return nil, gensupport.WrapError(err)
7484 }
7485 ret := &Location{
7486 ServerResponse: googleapi.ServerResponse{
7487 Header: res.Header,
7488 HTTPStatusCode: res.StatusCode,
7489 },
7490 }
7491 target := &ret
7492 b, err := gensupport.DecodeResponseBytes(target, res)
7493 if err != nil {
7494 return nil, err
7495 }
7496 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.get", "response", internallog.HTTPResponse(res, b))
7497 return ret, nil
7498 }
7499
7500 type ProjectsLocationsListCall struct {
7501 s *Service
7502 name string
7503 urlParams_ gensupport.URLParams
7504 ifNoneMatch_ string
7505 ctx_ context.Context
7506 header_ http.Header
7507 }
7508
7509 // List: Lists information about the supported locations for this service. This
7510 // method lists locations based on the resource scope provided in the
7511 // [ListLocationsRequest.name] field: * **Global locations**: If `name` is
7512 // empty, the method lists the public locations available to all projects. *
7513 // **Project-specific locations**: If `name` follows the format
7514 // `projects/{project}`, the method lists locations visible to that specific
7515 // project. This includes public, private, or other project-specific locations
7516 // enabled for the project. For gRPC and client library implementations, the
7517 // resource name is passed as the `name` field. For direct service calls, the
7518 // resource name is incorporated into the request path based on the specific
7519 // service implementation and version.
7520 //
7521 // - name: The resource that owns the locations collection, if applicable.
7522 func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
7523 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7524 c.name = name
7525 return c
7526 }
7527
7528 // ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do not
7529 // use this field. It is unsupported and is ignored unless explicitly
7530 // documented otherwise. This is primarily for internal usage.
7531 func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall {
7532 c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...))
7533 return c
7534 }
7535
7536 // Filter sets the optional parameter "filter": A filter to narrow down results
7537 // to a preferred subset. The filtering language accepts strings like
7538 // "displayName=tokyo", and is documented in more detail in AIP-160
7539 // (https://google.aip.dev/160).
7540 func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
7541 c.urlParams_.Set("filter", filter)
7542 return c
7543 }
7544
7545 // PageSize sets the optional parameter "pageSize": The maximum number of
7546 // results to return. If not set, the service selects a default.
7547 func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
7548 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7549 return c
7550 }
7551
7552 // PageToken sets the optional parameter "pageToken": A page token received
7553 // from the `next_page_token` field in the response. Send that page token to
7554 // receive the subsequent page.
7555 func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
7556 c.urlParams_.Set("pageToken", pageToken)
7557 return c
7558 }
7559
7560 // Fields allows partial responses to be retrieved. See
7561 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7562 // details.
7563 func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
7564 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7565 return c
7566 }
7567
7568 // IfNoneMatch sets an optional parameter which makes the operation fail if the
7569 // object's ETag matches the given value. This is useful for getting updates
7570 // only after the object has changed since the last request.
7571 func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
7572 c.ifNoneMatch_ = entityTag
7573 return c
7574 }
7575
7576 // Context sets the context to be used in this call's Do method.
7577 func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
7578 c.ctx_ = ctx
7579 return c
7580 }
7581
7582 // Header returns a http.Header that can be modified by the caller to add
7583 // headers to the request.
7584 func (c *ProjectsLocationsListCall) Header() http.Header {
7585 if c.header_ == nil {
7586 c.header_ = make(http.Header)
7587 }
7588 return c.header_
7589 }
7590
7591 func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
7592 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7593 if c.ifNoneMatch_ != "" {
7594 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7595 }
7596 c.urlParams_.Set("alt", alt)
7597 c.urlParams_.Set("prettyPrint", "false")
7598 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/locations")
7599 urls += "?" + c.urlParams_.Encode()
7600 req, err := http.NewRequest("GET", urls, nil)
7601 if err != nil {
7602 return nil, err
7603 }
7604 req.Header = reqHeaders
7605 googleapi.Expand(req.URL, map[string]string{
7606 "name": c.name,
7607 })
7608 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.list", "request", internallog.HTTPRequest(req, nil))
7609 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7610 }
7611
7612 // Do executes the "healthcare.projects.locations.list" call.
7613 // Any non-2xx status code is an error. Response headers are in either
7614 // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
7615 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7616 // check whether the returned error was because http.StatusNotModified was
7617 // returned.
7618 func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
7619 gensupport.SetOptions(c.urlParams_, opts...)
7620 res, err := c.doRequest("json")
7621 if res != nil && res.StatusCode == http.StatusNotModified {
7622 if res.Body != nil {
7623 res.Body.Close()
7624 }
7625 return nil, gensupport.WrapError(&googleapi.Error{
7626 Code: res.StatusCode,
7627 Header: res.Header,
7628 })
7629 }
7630 if err != nil {
7631 return nil, err
7632 }
7633 defer googleapi.CloseBody(res)
7634 if err := googleapi.CheckResponse(res); err != nil {
7635 return nil, gensupport.WrapError(err)
7636 }
7637 ret := &ListLocationsResponse{
7638 ServerResponse: googleapi.ServerResponse{
7639 Header: res.Header,
7640 HTTPStatusCode: res.StatusCode,
7641 },
7642 }
7643 target := &ret
7644 b, err := gensupport.DecodeResponseBytes(target, res)
7645 if err != nil {
7646 return nil, err
7647 }
7648 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.list", "response", internallog.HTTPResponse(res, b))
7649 return ret, nil
7650 }
7651
7652 // Pages invokes f for each page of results.
7653 // A non-nil error returned from f will halt the iteration.
7654 // The provided context supersedes any context provided to the Context method.
7655 func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
7656 c.ctx_ = ctx
7657 defer c.PageToken(c.urlParams_.Get("pageToken"))
7658 for {
7659 x, err := c.Do()
7660 if err != nil {
7661 return err
7662 }
7663 if err := f(x); err != nil {
7664 return err
7665 }
7666 if x.NextPageToken == "" {
7667 return nil
7668 }
7669 c.PageToken(x.NextPageToken)
7670 }
7671 }
7672
7673 type ProjectsLocationsDatasetsCreateCall struct {
7674 s *Service
7675 parent string
7676 dataset *Dataset
7677 urlParams_ gensupport.URLParams
7678 ctx_ context.Context
7679 header_ http.Header
7680 }
7681
7682 // Create: Creates a new health dataset. Results are returned through the
7683 // Operation interface which returns either an `Operation.response` which
7684 // contains a Dataset or `Operation.error`. The metadata field type is
7685 // OperationMetadata.
7686 //
7687 // - parent: The name of the project where the server creates the dataset. For
7688 // example, `projects/{project_id}/locations/{location_id}`.
7689 func (r *ProjectsLocationsDatasetsService) Create(parent string, dataset *Dataset) *ProjectsLocationsDatasetsCreateCall {
7690 c := &ProjectsLocationsDatasetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7691 c.parent = parent
7692 c.dataset = dataset
7693 return c
7694 }
7695
7696 // DatasetId sets the optional parameter "datasetId": Required. The ID of the
7697 // dataset that is being created. The string must match the following regex:
7698 // `[\p{L}\p{N}_\-\.]{1,256}`.
7699 func (c *ProjectsLocationsDatasetsCreateCall) DatasetId(datasetId string) *ProjectsLocationsDatasetsCreateCall {
7700 c.urlParams_.Set("datasetId", datasetId)
7701 return c
7702 }
7703
7704 // Fields allows partial responses to be retrieved. See
7705 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7706 // details.
7707 func (c *ProjectsLocationsDatasetsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsCreateCall {
7708 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7709 return c
7710 }
7711
7712 // Context sets the context to be used in this call's Do method.
7713 func (c *ProjectsLocationsDatasetsCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsCreateCall {
7714 c.ctx_ = ctx
7715 return c
7716 }
7717
7718 // Header returns a http.Header that can be modified by the caller to add
7719 // headers to the request.
7720 func (c *ProjectsLocationsDatasetsCreateCall) Header() http.Header {
7721 if c.header_ == nil {
7722 c.header_ = make(http.Header)
7723 }
7724 return c.header_
7725 }
7726
7727 func (c *ProjectsLocationsDatasetsCreateCall) doRequest(alt string) (*http.Response, error) {
7728 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7729 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.dataset)
7730 if err != nil {
7731 return nil, err
7732 }
7733 c.urlParams_.Set("alt", alt)
7734 c.urlParams_.Set("prettyPrint", "false")
7735 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/datasets")
7736 urls += "?" + c.urlParams_.Encode()
7737 req, err := http.NewRequest("POST", urls, body)
7738 if err != nil {
7739 return nil, err
7740 }
7741 req.Header = reqHeaders
7742 googleapi.Expand(req.URL, map[string]string{
7743 "parent": c.parent,
7744 })
7745 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.create", "request", internallog.HTTPRequest(req, body.Bytes()))
7746 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7747 }
7748
7749 // Do executes the "healthcare.projects.locations.datasets.create" call.
7750 // Any non-2xx status code is an error. Response headers are in either
7751 // *Operation.ServerResponse.Header or (if a response was returned at all) in
7752 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7753 // whether the returned error was because http.StatusNotModified was returned.
7754 func (c *ProjectsLocationsDatasetsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7755 gensupport.SetOptions(c.urlParams_, opts...)
7756 res, err := c.doRequest("json")
7757 if res != nil && res.StatusCode == http.StatusNotModified {
7758 if res.Body != nil {
7759 res.Body.Close()
7760 }
7761 return nil, gensupport.WrapError(&googleapi.Error{
7762 Code: res.StatusCode,
7763 Header: res.Header,
7764 })
7765 }
7766 if err != nil {
7767 return nil, err
7768 }
7769 defer googleapi.CloseBody(res)
7770 if err := googleapi.CheckResponse(res); err != nil {
7771 return nil, gensupport.WrapError(err)
7772 }
7773 ret := &Operation{
7774 ServerResponse: googleapi.ServerResponse{
7775 Header: res.Header,
7776 HTTPStatusCode: res.StatusCode,
7777 },
7778 }
7779 target := &ret
7780 b, err := gensupport.DecodeResponseBytes(target, res)
7781 if err != nil {
7782 return nil, err
7783 }
7784 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.create", "response", internallog.HTTPResponse(res, b))
7785 return ret, nil
7786 }
7787
7788 type ProjectsLocationsDatasetsDeidentifyCall struct {
7789 s *Service
7790 sourceDataset string
7791 deidentifydatasetrequest *DeidentifyDatasetRequest
7792 urlParams_ gensupport.URLParams
7793 ctx_ context.Context
7794 header_ http.Header
7795 }
7796
7797 // Deidentify: Creates a new dataset containing de-identified data from the
7798 // source dataset. The metadata field type is OperationMetadata. If the request
7799 // is successful, the response field type is DeidentifySummary. The LRO result
7800 // may still be successful if de-identification fails for some resources. The
7801 // new de-identified dataset will not contain these failed resources. The
7802 // number of resources processed are tracked in Operation.metadata. Error
7803 // details are logged to Cloud Logging. For more information, see Viewing error
7804 // logs in Cloud Logging
7805 // (https://cloud.google.com/healthcare/docs/how-tos/logging).
7806 //
7807 // - sourceDataset: Source dataset resource name. For example,
7808 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`. R5
7809 // FHIR stores are not supported and will be skipped.
7810 func (r *ProjectsLocationsDatasetsService) Deidentify(sourceDataset string, deidentifydatasetrequest *DeidentifyDatasetRequest) *ProjectsLocationsDatasetsDeidentifyCall {
7811 c := &ProjectsLocationsDatasetsDeidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7812 c.sourceDataset = sourceDataset
7813 c.deidentifydatasetrequest = deidentifydatasetrequest
7814 return c
7815 }
7816
7817 // Fields allows partial responses to be retrieved. See
7818 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7819 // details.
7820 func (c *ProjectsLocationsDatasetsDeidentifyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDeidentifyCall {
7821 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7822 return c
7823 }
7824
7825 // Context sets the context to be used in this call's Do method.
7826 func (c *ProjectsLocationsDatasetsDeidentifyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDeidentifyCall {
7827 c.ctx_ = ctx
7828 return c
7829 }
7830
7831 // Header returns a http.Header that can be modified by the caller to add
7832 // headers to the request.
7833 func (c *ProjectsLocationsDatasetsDeidentifyCall) Header() http.Header {
7834 if c.header_ == nil {
7835 c.header_ = make(http.Header)
7836 }
7837 return c.header_
7838 }
7839
7840 func (c *ProjectsLocationsDatasetsDeidentifyCall) doRequest(alt string) (*http.Response, error) {
7841 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7842 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.deidentifydatasetrequest)
7843 if err != nil {
7844 return nil, err
7845 }
7846 c.urlParams_.Set("alt", alt)
7847 c.urlParams_.Set("prettyPrint", "false")
7848 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+sourceDataset}:deidentify")
7849 urls += "?" + c.urlParams_.Encode()
7850 req, err := http.NewRequest("POST", urls, body)
7851 if err != nil {
7852 return nil, err
7853 }
7854 req.Header = reqHeaders
7855 googleapi.Expand(req.URL, map[string]string{
7856 "sourceDataset": c.sourceDataset,
7857 })
7858 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.deidentify", "request", internallog.HTTPRequest(req, body.Bytes()))
7859 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7860 }
7861
7862 // Do executes the "healthcare.projects.locations.datasets.deidentify" call.
7863 // Any non-2xx status code is an error. Response headers are in either
7864 // *Operation.ServerResponse.Header or (if a response was returned at all) in
7865 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7866 // whether the returned error was because http.StatusNotModified was returned.
7867 func (c *ProjectsLocationsDatasetsDeidentifyCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7868 gensupport.SetOptions(c.urlParams_, opts...)
7869 res, err := c.doRequest("json")
7870 if res != nil && res.StatusCode == http.StatusNotModified {
7871 if res.Body != nil {
7872 res.Body.Close()
7873 }
7874 return nil, gensupport.WrapError(&googleapi.Error{
7875 Code: res.StatusCode,
7876 Header: res.Header,
7877 })
7878 }
7879 if err != nil {
7880 return nil, err
7881 }
7882 defer googleapi.CloseBody(res)
7883 if err := googleapi.CheckResponse(res); err != nil {
7884 return nil, gensupport.WrapError(err)
7885 }
7886 ret := &Operation{
7887 ServerResponse: googleapi.ServerResponse{
7888 Header: res.Header,
7889 HTTPStatusCode: res.StatusCode,
7890 },
7891 }
7892 target := &ret
7893 b, err := gensupport.DecodeResponseBytes(target, res)
7894 if err != nil {
7895 return nil, err
7896 }
7897 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.deidentify", "response", internallog.HTTPResponse(res, b))
7898 return ret, nil
7899 }
7900
7901 type ProjectsLocationsDatasetsDeleteCall struct {
7902 s *Service
7903 name string
7904 urlParams_ gensupport.URLParams
7905 ctx_ context.Context
7906 header_ http.Header
7907 }
7908
7909 // Delete: Deletes the specified health dataset and all data contained in the
7910 // dataset. Deleting a dataset does not affect the sources from which the
7911 // dataset was imported (if any).
7912 //
7913 // - name: The name of the dataset to delete. For example,
7914 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.
7915 func (r *ProjectsLocationsDatasetsService) Delete(name string) *ProjectsLocationsDatasetsDeleteCall {
7916 c := &ProjectsLocationsDatasetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7917 c.name = name
7918 return c
7919 }
7920
7921 // Fields allows partial responses to be retrieved. See
7922 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7923 // details.
7924 func (c *ProjectsLocationsDatasetsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDeleteCall {
7925 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7926 return c
7927 }
7928
7929 // Context sets the context to be used in this call's Do method.
7930 func (c *ProjectsLocationsDatasetsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDeleteCall {
7931 c.ctx_ = ctx
7932 return c
7933 }
7934
7935 // Header returns a http.Header that can be modified by the caller to add
7936 // headers to the request.
7937 func (c *ProjectsLocationsDatasetsDeleteCall) Header() http.Header {
7938 if c.header_ == nil {
7939 c.header_ = make(http.Header)
7940 }
7941 return c.header_
7942 }
7943
7944 func (c *ProjectsLocationsDatasetsDeleteCall) doRequest(alt string) (*http.Response, error) {
7945 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7946 c.urlParams_.Set("alt", alt)
7947 c.urlParams_.Set("prettyPrint", "false")
7948 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
7949 urls += "?" + c.urlParams_.Encode()
7950 req, err := http.NewRequest("DELETE", urls, nil)
7951 if err != nil {
7952 return nil, err
7953 }
7954 req.Header = reqHeaders
7955 googleapi.Expand(req.URL, map[string]string{
7956 "name": c.name,
7957 })
7958 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.delete", "request", internallog.HTTPRequest(req, nil))
7959 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7960 }
7961
7962 // Do executes the "healthcare.projects.locations.datasets.delete" call.
7963 // Any non-2xx status code is an error. Response headers are in either
7964 // *Empty.ServerResponse.Header or (if a response was returned at all) in
7965 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7966 // whether the returned error was because http.StatusNotModified was returned.
7967 func (c *ProjectsLocationsDatasetsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
7968 gensupport.SetOptions(c.urlParams_, opts...)
7969 res, err := c.doRequest("json")
7970 if res != nil && res.StatusCode == http.StatusNotModified {
7971 if res.Body != nil {
7972 res.Body.Close()
7973 }
7974 return nil, gensupport.WrapError(&googleapi.Error{
7975 Code: res.StatusCode,
7976 Header: res.Header,
7977 })
7978 }
7979 if err != nil {
7980 return nil, err
7981 }
7982 defer googleapi.CloseBody(res)
7983 if err := googleapi.CheckResponse(res); err != nil {
7984 return nil, gensupport.WrapError(err)
7985 }
7986 ret := &Empty{
7987 ServerResponse: googleapi.ServerResponse{
7988 Header: res.Header,
7989 HTTPStatusCode: res.StatusCode,
7990 },
7991 }
7992 target := &ret
7993 b, err := gensupport.DecodeResponseBytes(target, res)
7994 if err != nil {
7995 return nil, err
7996 }
7997 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.delete", "response", internallog.HTTPResponse(res, b))
7998 return ret, nil
7999 }
8000
8001 type ProjectsLocationsDatasetsGetCall struct {
8002 s *Service
8003 name string
8004 urlParams_ gensupport.URLParams
8005 ifNoneMatch_ string
8006 ctx_ context.Context
8007 header_ http.Header
8008 }
8009
8010 // Get: Gets any metadata associated with a dataset.
8011 //
8012 // - name: The name of the dataset to read. For example,
8013 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.
8014 func (r *ProjectsLocationsDatasetsService) Get(name string) *ProjectsLocationsDatasetsGetCall {
8015 c := &ProjectsLocationsDatasetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8016 c.name = name
8017 return c
8018 }
8019
8020 // Fields allows partial responses to be retrieved. See
8021 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8022 // details.
8023 func (c *ProjectsLocationsDatasetsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsGetCall {
8024 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8025 return c
8026 }
8027
8028 // IfNoneMatch sets an optional parameter which makes the operation fail if the
8029 // object's ETag matches the given value. This is useful for getting updates
8030 // only after the object has changed since the last request.
8031 func (c *ProjectsLocationsDatasetsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsGetCall {
8032 c.ifNoneMatch_ = entityTag
8033 return c
8034 }
8035
8036 // Context sets the context to be used in this call's Do method.
8037 func (c *ProjectsLocationsDatasetsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsGetCall {
8038 c.ctx_ = ctx
8039 return c
8040 }
8041
8042 // Header returns a http.Header that can be modified by the caller to add
8043 // headers to the request.
8044 func (c *ProjectsLocationsDatasetsGetCall) Header() http.Header {
8045 if c.header_ == nil {
8046 c.header_ = make(http.Header)
8047 }
8048 return c.header_
8049 }
8050
8051 func (c *ProjectsLocationsDatasetsGetCall) doRequest(alt string) (*http.Response, error) {
8052 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8053 if c.ifNoneMatch_ != "" {
8054 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8055 }
8056 c.urlParams_.Set("alt", alt)
8057 c.urlParams_.Set("prettyPrint", "false")
8058 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
8059 urls += "?" + c.urlParams_.Encode()
8060 req, err := http.NewRequest("GET", urls, nil)
8061 if err != nil {
8062 return nil, err
8063 }
8064 req.Header = reqHeaders
8065 googleapi.Expand(req.URL, map[string]string{
8066 "name": c.name,
8067 })
8068 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.get", "request", internallog.HTTPRequest(req, nil))
8069 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8070 }
8071
8072 // Do executes the "healthcare.projects.locations.datasets.get" call.
8073 // Any non-2xx status code is an error. Response headers are in either
8074 // *Dataset.ServerResponse.Header or (if a response was returned at all) in
8075 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8076 // whether the returned error was because http.StatusNotModified was returned.
8077 func (c *ProjectsLocationsDatasetsGetCall) Do(opts ...googleapi.CallOption) (*Dataset, error) {
8078 gensupport.SetOptions(c.urlParams_, opts...)
8079 res, err := c.doRequest("json")
8080 if res != nil && res.StatusCode == http.StatusNotModified {
8081 if res.Body != nil {
8082 res.Body.Close()
8083 }
8084 return nil, gensupport.WrapError(&googleapi.Error{
8085 Code: res.StatusCode,
8086 Header: res.Header,
8087 })
8088 }
8089 if err != nil {
8090 return nil, err
8091 }
8092 defer googleapi.CloseBody(res)
8093 if err := googleapi.CheckResponse(res); err != nil {
8094 return nil, gensupport.WrapError(err)
8095 }
8096 ret := &Dataset{
8097 ServerResponse: googleapi.ServerResponse{
8098 Header: res.Header,
8099 HTTPStatusCode: res.StatusCode,
8100 },
8101 }
8102 target := &ret
8103 b, err := gensupport.DecodeResponseBytes(target, res)
8104 if err != nil {
8105 return nil, err
8106 }
8107 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.get", "response", internallog.HTTPResponse(res, b))
8108 return ret, nil
8109 }
8110
8111 type ProjectsLocationsDatasetsGetIamPolicyCall struct {
8112 s *Service
8113 resource string
8114 urlParams_ gensupport.URLParams
8115 ifNoneMatch_ string
8116 ctx_ context.Context
8117 header_ http.Header
8118 }
8119
8120 // GetIamPolicy: Gets the access control policy for a resource. Returns an
8121 // empty policy if the resource exists and does not have a policy set.
8122 //
8123 // - resource: REQUIRED: The resource for which the policy is being requested.
8124 // See Resource names (https://cloud.google.com/apis/design/resource_names)
8125 // for the appropriate value for this field.
8126 func (r *ProjectsLocationsDatasetsService) GetIamPolicy(resource string) *ProjectsLocationsDatasetsGetIamPolicyCall {
8127 c := &ProjectsLocationsDatasetsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8128 c.resource = resource
8129 return c
8130 }
8131
8132 // OptionsRequestedPolicyVersion sets the optional parameter
8133 // "options.requestedPolicyVersion": The maximum policy version that will be
8134 // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
8135 // an invalid value will be rejected. Requests for policies with any
8136 // conditional role bindings must specify version 3. Policies with no
8137 // conditional role bindings may specify any valid value or leave the field
8138 // unset. The policy in the response might use the policy version that you
8139 // specified, or it might use a lower policy version. For example, if you
8140 // specify version 3, but the policy has no conditional role bindings, the
8141 // response uses version 1. To learn which resources support conditions in
8142 // their IAM policies, see the IAM documentation
8143 // (https://cloud.google.com/iam/help/conditions/resource-policies).
8144 func (c *ProjectsLocationsDatasetsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDatasetsGetIamPolicyCall {
8145 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
8146 return c
8147 }
8148
8149 // Fields allows partial responses to be retrieved. See
8150 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8151 // details.
8152 func (c *ProjectsLocationsDatasetsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsGetIamPolicyCall {
8153 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8154 return c
8155 }
8156
8157 // IfNoneMatch sets an optional parameter which makes the operation fail if the
8158 // object's ETag matches the given value. This is useful for getting updates
8159 // only after the object has changed since the last request.
8160 func (c *ProjectsLocationsDatasetsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsGetIamPolicyCall {
8161 c.ifNoneMatch_ = entityTag
8162 return c
8163 }
8164
8165 // Context sets the context to be used in this call's Do method.
8166 func (c *ProjectsLocationsDatasetsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsGetIamPolicyCall {
8167 c.ctx_ = ctx
8168 return c
8169 }
8170
8171 // Header returns a http.Header that can be modified by the caller to add
8172 // headers to the request.
8173 func (c *ProjectsLocationsDatasetsGetIamPolicyCall) Header() http.Header {
8174 if c.header_ == nil {
8175 c.header_ = make(http.Header)
8176 }
8177 return c.header_
8178 }
8179
8180 func (c *ProjectsLocationsDatasetsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
8181 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8182 if c.ifNoneMatch_ != "" {
8183 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8184 }
8185 c.urlParams_.Set("alt", alt)
8186 c.urlParams_.Set("prettyPrint", "false")
8187 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy")
8188 urls += "?" + c.urlParams_.Encode()
8189 req, err := http.NewRequest("GET", urls, nil)
8190 if err != nil {
8191 return nil, err
8192 }
8193 req.Header = reqHeaders
8194 googleapi.Expand(req.URL, map[string]string{
8195 "resource": c.resource,
8196 })
8197 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.getIamPolicy", "request", internallog.HTTPRequest(req, nil))
8198 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8199 }
8200
8201 // Do executes the "healthcare.projects.locations.datasets.getIamPolicy" call.
8202 // Any non-2xx status code is an error. Response headers are in either
8203 // *Policy.ServerResponse.Header or (if a response was returned at all) in
8204 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8205 // whether the returned error was because http.StatusNotModified was returned.
8206 func (c *ProjectsLocationsDatasetsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
8207 gensupport.SetOptions(c.urlParams_, opts...)
8208 res, err := c.doRequest("json")
8209 if res != nil && res.StatusCode == http.StatusNotModified {
8210 if res.Body != nil {
8211 res.Body.Close()
8212 }
8213 return nil, gensupport.WrapError(&googleapi.Error{
8214 Code: res.StatusCode,
8215 Header: res.Header,
8216 })
8217 }
8218 if err != nil {
8219 return nil, err
8220 }
8221 defer googleapi.CloseBody(res)
8222 if err := googleapi.CheckResponse(res); err != nil {
8223 return nil, gensupport.WrapError(err)
8224 }
8225 ret := &Policy{
8226 ServerResponse: googleapi.ServerResponse{
8227 Header: res.Header,
8228 HTTPStatusCode: res.StatusCode,
8229 },
8230 }
8231 target := &ret
8232 b, err := gensupport.DecodeResponseBytes(target, res)
8233 if err != nil {
8234 return nil, err
8235 }
8236 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.getIamPolicy", "response", internallog.HTTPResponse(res, b))
8237 return ret, nil
8238 }
8239
8240 type ProjectsLocationsDatasetsListCall struct {
8241 s *Service
8242 parent string
8243 urlParams_ gensupport.URLParams
8244 ifNoneMatch_ string
8245 ctx_ context.Context
8246 header_ http.Header
8247 }
8248
8249 // List: Lists the health datasets in the current project.
8250 //
8251 // - parent: The name of the project whose datasets should be listed. For
8252 // example, `projects/{project_id}/locations/{location_id}`.
8253 func (r *ProjectsLocationsDatasetsService) List(parent string) *ProjectsLocationsDatasetsListCall {
8254 c := &ProjectsLocationsDatasetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8255 c.parent = parent
8256 return c
8257 }
8258
8259 // PageSize sets the optional parameter "pageSize": The maximum number of items
8260 // to return. If not specified, 100 is used. May not be larger than 1000.
8261 func (c *ProjectsLocationsDatasetsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsListCall {
8262 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8263 return c
8264 }
8265
8266 // PageToken sets the optional parameter "pageToken": The next_page_token value
8267 // returned from a previous List request, if any.
8268 func (c *ProjectsLocationsDatasetsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsListCall {
8269 c.urlParams_.Set("pageToken", pageToken)
8270 return c
8271 }
8272
8273 // Fields allows partial responses to be retrieved. See
8274 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8275 // details.
8276 func (c *ProjectsLocationsDatasetsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsListCall {
8277 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8278 return c
8279 }
8280
8281 // IfNoneMatch sets an optional parameter which makes the operation fail if the
8282 // object's ETag matches the given value. This is useful for getting updates
8283 // only after the object has changed since the last request.
8284 func (c *ProjectsLocationsDatasetsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsListCall {
8285 c.ifNoneMatch_ = entityTag
8286 return c
8287 }
8288
8289 // Context sets the context to be used in this call's Do method.
8290 func (c *ProjectsLocationsDatasetsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsListCall {
8291 c.ctx_ = ctx
8292 return c
8293 }
8294
8295 // Header returns a http.Header that can be modified by the caller to add
8296 // headers to the request.
8297 func (c *ProjectsLocationsDatasetsListCall) Header() http.Header {
8298 if c.header_ == nil {
8299 c.header_ = make(http.Header)
8300 }
8301 return c.header_
8302 }
8303
8304 func (c *ProjectsLocationsDatasetsListCall) doRequest(alt string) (*http.Response, error) {
8305 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8306 if c.ifNoneMatch_ != "" {
8307 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8308 }
8309 c.urlParams_.Set("alt", alt)
8310 c.urlParams_.Set("prettyPrint", "false")
8311 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/datasets")
8312 urls += "?" + c.urlParams_.Encode()
8313 req, err := http.NewRequest("GET", urls, nil)
8314 if err != nil {
8315 return nil, err
8316 }
8317 req.Header = reqHeaders
8318 googleapi.Expand(req.URL, map[string]string{
8319 "parent": c.parent,
8320 })
8321 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.list", "request", internallog.HTTPRequest(req, nil))
8322 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8323 }
8324
8325 // Do executes the "healthcare.projects.locations.datasets.list" call.
8326 // Any non-2xx status code is an error. Response headers are in either
8327 // *ListDatasetsResponse.ServerResponse.Header or (if a response was returned
8328 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
8329 // check whether the returned error was because http.StatusNotModified was
8330 // returned.
8331 func (c *ProjectsLocationsDatasetsListCall) Do(opts ...googleapi.CallOption) (*ListDatasetsResponse, error) {
8332 gensupport.SetOptions(c.urlParams_, opts...)
8333 res, err := c.doRequest("json")
8334 if res != nil && res.StatusCode == http.StatusNotModified {
8335 if res.Body != nil {
8336 res.Body.Close()
8337 }
8338 return nil, gensupport.WrapError(&googleapi.Error{
8339 Code: res.StatusCode,
8340 Header: res.Header,
8341 })
8342 }
8343 if err != nil {
8344 return nil, err
8345 }
8346 defer googleapi.CloseBody(res)
8347 if err := googleapi.CheckResponse(res); err != nil {
8348 return nil, gensupport.WrapError(err)
8349 }
8350 ret := &ListDatasetsResponse{
8351 ServerResponse: googleapi.ServerResponse{
8352 Header: res.Header,
8353 HTTPStatusCode: res.StatusCode,
8354 },
8355 }
8356 target := &ret
8357 b, err := gensupport.DecodeResponseBytes(target, res)
8358 if err != nil {
8359 return nil, err
8360 }
8361 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.list", "response", internallog.HTTPResponse(res, b))
8362 return ret, nil
8363 }
8364
8365 // Pages invokes f for each page of results.
8366 // A non-nil error returned from f will halt the iteration.
8367 // The provided context supersedes any context provided to the Context method.
8368 func (c *ProjectsLocationsDatasetsListCall) Pages(ctx context.Context, f func(*ListDatasetsResponse) error) error {
8369 c.ctx_ = ctx
8370 defer c.PageToken(c.urlParams_.Get("pageToken"))
8371 for {
8372 x, err := c.Do()
8373 if err != nil {
8374 return err
8375 }
8376 if err := f(x); err != nil {
8377 return err
8378 }
8379 if x.NextPageToken == "" {
8380 return nil
8381 }
8382 c.PageToken(x.NextPageToken)
8383 }
8384 }
8385
8386 type ProjectsLocationsDatasetsPatchCall struct {
8387 s *Service
8388 name string
8389 dataset *Dataset
8390 urlParams_ gensupport.URLParams
8391 ctx_ context.Context
8392 header_ http.Header
8393 }
8394
8395 // Patch: Updates dataset metadata.
8396 //
8397 // - name: Identifier. Resource name of the dataset, of the form
8398 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.
8399 func (r *ProjectsLocationsDatasetsService) Patch(name string, dataset *Dataset) *ProjectsLocationsDatasetsPatchCall {
8400 c := &ProjectsLocationsDatasetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8401 c.name = name
8402 c.dataset = dataset
8403 return c
8404 }
8405
8406 // UpdateMask sets the optional parameter "updateMask": Required. The update
8407 // mask applies to the resource. For the `FieldMask` definition, see
8408 // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
8409 func (c *ProjectsLocationsDatasetsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsPatchCall {
8410 c.urlParams_.Set("updateMask", updateMask)
8411 return c
8412 }
8413
8414 // Fields allows partial responses to be retrieved. See
8415 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8416 // details.
8417 func (c *ProjectsLocationsDatasetsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsPatchCall {
8418 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8419 return c
8420 }
8421
8422 // Context sets the context to be used in this call's Do method.
8423 func (c *ProjectsLocationsDatasetsPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsPatchCall {
8424 c.ctx_ = ctx
8425 return c
8426 }
8427
8428 // Header returns a http.Header that can be modified by the caller to add
8429 // headers to the request.
8430 func (c *ProjectsLocationsDatasetsPatchCall) Header() http.Header {
8431 if c.header_ == nil {
8432 c.header_ = make(http.Header)
8433 }
8434 return c.header_
8435 }
8436
8437 func (c *ProjectsLocationsDatasetsPatchCall) doRequest(alt string) (*http.Response, error) {
8438 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8439 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.dataset)
8440 if err != nil {
8441 return nil, err
8442 }
8443 c.urlParams_.Set("alt", alt)
8444 c.urlParams_.Set("prettyPrint", "false")
8445 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
8446 urls += "?" + c.urlParams_.Encode()
8447 req, err := http.NewRequest("PATCH", urls, body)
8448 if err != nil {
8449 return nil, err
8450 }
8451 req.Header = reqHeaders
8452 googleapi.Expand(req.URL, map[string]string{
8453 "name": c.name,
8454 })
8455 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
8456 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8457 }
8458
8459 // Do executes the "healthcare.projects.locations.datasets.patch" call.
8460 // Any non-2xx status code is an error. Response headers are in either
8461 // *Dataset.ServerResponse.Header or (if a response was returned at all) in
8462 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8463 // whether the returned error was because http.StatusNotModified was returned.
8464 func (c *ProjectsLocationsDatasetsPatchCall) Do(opts ...googleapi.CallOption) (*Dataset, error) {
8465 gensupport.SetOptions(c.urlParams_, opts...)
8466 res, err := c.doRequest("json")
8467 if res != nil && res.StatusCode == http.StatusNotModified {
8468 if res.Body != nil {
8469 res.Body.Close()
8470 }
8471 return nil, gensupport.WrapError(&googleapi.Error{
8472 Code: res.StatusCode,
8473 Header: res.Header,
8474 })
8475 }
8476 if err != nil {
8477 return nil, err
8478 }
8479 defer googleapi.CloseBody(res)
8480 if err := googleapi.CheckResponse(res); err != nil {
8481 return nil, gensupport.WrapError(err)
8482 }
8483 ret := &Dataset{
8484 ServerResponse: googleapi.ServerResponse{
8485 Header: res.Header,
8486 HTTPStatusCode: res.StatusCode,
8487 },
8488 }
8489 target := &ret
8490 b, err := gensupport.DecodeResponseBytes(target, res)
8491 if err != nil {
8492 return nil, err
8493 }
8494 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.patch", "response", internallog.HTTPResponse(res, b))
8495 return ret, nil
8496 }
8497
8498 type ProjectsLocationsDatasetsSetIamPolicyCall struct {
8499 s *Service
8500 resource string
8501 setiampolicyrequest *SetIamPolicyRequest
8502 urlParams_ gensupport.URLParams
8503 ctx_ context.Context
8504 header_ http.Header
8505 }
8506
8507 // SetIamPolicy: Sets the access control policy on the specified resource.
8508 // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
8509 // and `PERMISSION_DENIED` errors.
8510 //
8511 // - resource: REQUIRED: The resource for which the policy is being specified.
8512 // See Resource names (https://cloud.google.com/apis/design/resource_names)
8513 // for the appropriate value for this field.
8514 func (r *ProjectsLocationsDatasetsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsSetIamPolicyCall {
8515 c := &ProjectsLocationsDatasetsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8516 c.resource = resource
8517 c.setiampolicyrequest = setiampolicyrequest
8518 return c
8519 }
8520
8521 // Fields allows partial responses to be retrieved. See
8522 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8523 // details.
8524 func (c *ProjectsLocationsDatasetsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSetIamPolicyCall {
8525 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8526 return c
8527 }
8528
8529 // Context sets the context to be used in this call's Do method.
8530 func (c *ProjectsLocationsDatasetsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSetIamPolicyCall {
8531 c.ctx_ = ctx
8532 return c
8533 }
8534
8535 // Header returns a http.Header that can be modified by the caller to add
8536 // headers to the request.
8537 func (c *ProjectsLocationsDatasetsSetIamPolicyCall) Header() http.Header {
8538 if c.header_ == nil {
8539 c.header_ = make(http.Header)
8540 }
8541 return c.header_
8542 }
8543
8544 func (c *ProjectsLocationsDatasetsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
8545 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8546 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest)
8547 if err != nil {
8548 return nil, err
8549 }
8550 c.urlParams_.Set("alt", alt)
8551 c.urlParams_.Set("prettyPrint", "false")
8552 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy")
8553 urls += "?" + c.urlParams_.Encode()
8554 req, err := http.NewRequest("POST", urls, body)
8555 if err != nil {
8556 return nil, err
8557 }
8558 req.Header = reqHeaders
8559 googleapi.Expand(req.URL, map[string]string{
8560 "resource": c.resource,
8561 })
8562 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes()))
8563 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8564 }
8565
8566 // Do executes the "healthcare.projects.locations.datasets.setIamPolicy" call.
8567 // Any non-2xx status code is an error. Response headers are in either
8568 // *Policy.ServerResponse.Header or (if a response was returned at all) in
8569 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8570 // whether the returned error was because http.StatusNotModified was returned.
8571 func (c *ProjectsLocationsDatasetsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
8572 gensupport.SetOptions(c.urlParams_, opts...)
8573 res, err := c.doRequest("json")
8574 if res != nil && res.StatusCode == http.StatusNotModified {
8575 if res.Body != nil {
8576 res.Body.Close()
8577 }
8578 return nil, gensupport.WrapError(&googleapi.Error{
8579 Code: res.StatusCode,
8580 Header: res.Header,
8581 })
8582 }
8583 if err != nil {
8584 return nil, err
8585 }
8586 defer googleapi.CloseBody(res)
8587 if err := googleapi.CheckResponse(res); err != nil {
8588 return nil, gensupport.WrapError(err)
8589 }
8590 ret := &Policy{
8591 ServerResponse: googleapi.ServerResponse{
8592 Header: res.Header,
8593 HTTPStatusCode: res.StatusCode,
8594 },
8595 }
8596 target := &ret
8597 b, err := gensupport.DecodeResponseBytes(target, res)
8598 if err != nil {
8599 return nil, err
8600 }
8601 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.setIamPolicy", "response", internallog.HTTPResponse(res, b))
8602 return ret, nil
8603 }
8604
8605 type ProjectsLocationsDatasetsTestIamPermissionsCall struct {
8606 s *Service
8607 resource string
8608 testiampermissionsrequest *TestIamPermissionsRequest
8609 urlParams_ gensupport.URLParams
8610 ctx_ context.Context
8611 header_ http.Header
8612 }
8613
8614 // TestIamPermissions: Returns permissions that a caller has on the specified
8615 // resource. If the resource does not exist, this will return an empty set of
8616 // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
8617 // used for building permission-aware UIs and command-line tools, not for
8618 // authorization checking. This operation may "fail open" without warning.
8619 //
8620 // - resource: REQUIRED: The resource for which the policy detail is being
8621 // requested. See Resource names
8622 // (https://cloud.google.com/apis/design/resource_names) for the appropriate
8623 // value for this field.
8624 func (r *ProjectsLocationsDatasetsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsTestIamPermissionsCall {
8625 c := &ProjectsLocationsDatasetsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8626 c.resource = resource
8627 c.testiampermissionsrequest = testiampermissionsrequest
8628 return c
8629 }
8630
8631 // Fields allows partial responses to be retrieved. See
8632 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8633 // details.
8634 func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsTestIamPermissionsCall {
8635 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8636 return c
8637 }
8638
8639 // Context sets the context to be used in this call's Do method.
8640 func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsTestIamPermissionsCall {
8641 c.ctx_ = ctx
8642 return c
8643 }
8644
8645 // Header returns a http.Header that can be modified by the caller to add
8646 // headers to the request.
8647 func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) Header() http.Header {
8648 if c.header_ == nil {
8649 c.header_ = make(http.Header)
8650 }
8651 return c.header_
8652 }
8653
8654 func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
8655 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8656 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest)
8657 if err != nil {
8658 return nil, err
8659 }
8660 c.urlParams_.Set("alt", alt)
8661 c.urlParams_.Set("prettyPrint", "false")
8662 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions")
8663 urls += "?" + c.urlParams_.Encode()
8664 req, err := http.NewRequest("POST", urls, body)
8665 if err != nil {
8666 return nil, err
8667 }
8668 req.Header = reqHeaders
8669 googleapi.Expand(req.URL, map[string]string{
8670 "resource": c.resource,
8671 })
8672 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes()))
8673 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8674 }
8675
8676 // Do executes the "healthcare.projects.locations.datasets.testIamPermissions" call.
8677 // Any non-2xx status code is an error. Response headers are in either
8678 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
8679 // returned at all) in error.(*googleapi.Error).Header. Use
8680 // googleapi.IsNotModified to check whether the returned error was because
8681 // http.StatusNotModified was returned.
8682 func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
8683 gensupport.SetOptions(c.urlParams_, opts...)
8684 res, err := c.doRequest("json")
8685 if res != nil && res.StatusCode == http.StatusNotModified {
8686 if res.Body != nil {
8687 res.Body.Close()
8688 }
8689 return nil, gensupport.WrapError(&googleapi.Error{
8690 Code: res.StatusCode,
8691 Header: res.Header,
8692 })
8693 }
8694 if err != nil {
8695 return nil, err
8696 }
8697 defer googleapi.CloseBody(res)
8698 if err := googleapi.CheckResponse(res); err != nil {
8699 return nil, gensupport.WrapError(err)
8700 }
8701 ret := &TestIamPermissionsResponse{
8702 ServerResponse: googleapi.ServerResponse{
8703 Header: res.Header,
8704 HTTPStatusCode: res.StatusCode,
8705 },
8706 }
8707 target := &ret
8708 b, err := gensupport.DecodeResponseBytes(target, res)
8709 if err != nil {
8710 return nil, err
8711 }
8712 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.testIamPermissions", "response", internallog.HTTPResponse(res, b))
8713 return ret, nil
8714 }
8715
8716 type ProjectsLocationsDatasetsConsentStoresCheckDataAccessCall struct {
8717 s *Service
8718 consentStore string
8719 checkdataaccessrequest *CheckDataAccessRequest
8720 urlParams_ gensupport.URLParams
8721 ctx_ context.Context
8722 header_ http.Header
8723 }
8724
8725 // CheckDataAccess: Checks if a particular data_id of a User data mapping in
8726 // the specified consent store is consented for the specified use.
8727 //
8728 // - consentStore: Name of the consent store where the requested data_id is
8729 // stored, of the form
8730 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consen
8731 // tStores/{consent_store_id}`.
8732 func (r *ProjectsLocationsDatasetsConsentStoresService) CheckDataAccess(consentStore string, checkdataaccessrequest *CheckDataAccessRequest) *ProjectsLocationsDatasetsConsentStoresCheckDataAccessCall {
8733 c := &ProjectsLocationsDatasetsConsentStoresCheckDataAccessCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8734 c.consentStore = consentStore
8735 c.checkdataaccessrequest = checkdataaccessrequest
8736 return c
8737 }
8738
8739 // Fields allows partial responses to be retrieved. See
8740 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8741 // details.
8742 func (c *ProjectsLocationsDatasetsConsentStoresCheckDataAccessCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresCheckDataAccessCall {
8743 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8744 return c
8745 }
8746
8747 // Context sets the context to be used in this call's Do method.
8748 func (c *ProjectsLocationsDatasetsConsentStoresCheckDataAccessCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresCheckDataAccessCall {
8749 c.ctx_ = ctx
8750 return c
8751 }
8752
8753 // Header returns a http.Header that can be modified by the caller to add
8754 // headers to the request.
8755 func (c *ProjectsLocationsDatasetsConsentStoresCheckDataAccessCall) Header() http.Header {
8756 if c.header_ == nil {
8757 c.header_ = make(http.Header)
8758 }
8759 return c.header_
8760 }
8761
8762 func (c *ProjectsLocationsDatasetsConsentStoresCheckDataAccessCall) doRequest(alt string) (*http.Response, error) {
8763 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8764 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.checkdataaccessrequest)
8765 if err != nil {
8766 return nil, err
8767 }
8768 c.urlParams_.Set("alt", alt)
8769 c.urlParams_.Set("prettyPrint", "false")
8770 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+consentStore}:checkDataAccess")
8771 urls += "?" + c.urlParams_.Encode()
8772 req, err := http.NewRequest("POST", urls, body)
8773 if err != nil {
8774 return nil, err
8775 }
8776 req.Header = reqHeaders
8777 googleapi.Expand(req.URL, map[string]string{
8778 "consentStore": c.consentStore,
8779 })
8780 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.checkDataAccess", "request", internallog.HTTPRequest(req, body.Bytes()))
8781 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8782 }
8783
8784 // Do executes the "healthcare.projects.locations.datasets.consentStores.checkDataAccess" call.
8785 // Any non-2xx status code is an error. Response headers are in either
8786 // *CheckDataAccessResponse.ServerResponse.Header or (if a response was
8787 // returned at all) in error.(*googleapi.Error).Header. Use
8788 // googleapi.IsNotModified to check whether the returned error was because
8789 // http.StatusNotModified was returned.
8790 func (c *ProjectsLocationsDatasetsConsentStoresCheckDataAccessCall) Do(opts ...googleapi.CallOption) (*CheckDataAccessResponse, error) {
8791 gensupport.SetOptions(c.urlParams_, opts...)
8792 res, err := c.doRequest("json")
8793 if res != nil && res.StatusCode == http.StatusNotModified {
8794 if res.Body != nil {
8795 res.Body.Close()
8796 }
8797 return nil, gensupport.WrapError(&googleapi.Error{
8798 Code: res.StatusCode,
8799 Header: res.Header,
8800 })
8801 }
8802 if err != nil {
8803 return nil, err
8804 }
8805 defer googleapi.CloseBody(res)
8806 if err := googleapi.CheckResponse(res); err != nil {
8807 return nil, gensupport.WrapError(err)
8808 }
8809 ret := &CheckDataAccessResponse{
8810 ServerResponse: googleapi.ServerResponse{
8811 Header: res.Header,
8812 HTTPStatusCode: res.StatusCode,
8813 },
8814 }
8815 target := &ret
8816 b, err := gensupport.DecodeResponseBytes(target, res)
8817 if err != nil {
8818 return nil, err
8819 }
8820 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.checkDataAccess", "response", internallog.HTTPResponse(res, b))
8821 return ret, nil
8822 }
8823
8824 type ProjectsLocationsDatasetsConsentStoresCreateCall struct {
8825 s *Service
8826 parent string
8827 consentstore *ConsentStore
8828 urlParams_ gensupport.URLParams
8829 ctx_ context.Context
8830 header_ http.Header
8831 }
8832
8833 // Create: Creates a new consent store in the parent dataset. Attempting to
8834 // create a consent store with the same ID as an existing store fails with an
8835 // ALREADY_EXISTS error.
8836 //
8837 // - parent: The name of the dataset this consent store belongs to.
8838 func (r *ProjectsLocationsDatasetsConsentStoresService) Create(parent string, consentstore *ConsentStore) *ProjectsLocationsDatasetsConsentStoresCreateCall {
8839 c := &ProjectsLocationsDatasetsConsentStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8840 c.parent = parent
8841 c.consentstore = consentstore
8842 return c
8843 }
8844
8845 // ConsentStoreId sets the optional parameter "consentStoreId": Required. The
8846 // ID of the consent store to create. The string must match the following
8847 // regex: `[\p{L}\p{N}_\-\.]{1,256}`. Cannot be changed after creation.
8848 func (c *ProjectsLocationsDatasetsConsentStoresCreateCall) ConsentStoreId(consentStoreId string) *ProjectsLocationsDatasetsConsentStoresCreateCall {
8849 c.urlParams_.Set("consentStoreId", consentStoreId)
8850 return c
8851 }
8852
8853 // Fields allows partial responses to be retrieved. See
8854 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8855 // details.
8856 func (c *ProjectsLocationsDatasetsConsentStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresCreateCall {
8857 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8858 return c
8859 }
8860
8861 // Context sets the context to be used in this call's Do method.
8862 func (c *ProjectsLocationsDatasetsConsentStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresCreateCall {
8863 c.ctx_ = ctx
8864 return c
8865 }
8866
8867 // Header returns a http.Header that can be modified by the caller to add
8868 // headers to the request.
8869 func (c *ProjectsLocationsDatasetsConsentStoresCreateCall) Header() http.Header {
8870 if c.header_ == nil {
8871 c.header_ = make(http.Header)
8872 }
8873 return c.header_
8874 }
8875
8876 func (c *ProjectsLocationsDatasetsConsentStoresCreateCall) doRequest(alt string) (*http.Response, error) {
8877 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8878 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.consentstore)
8879 if err != nil {
8880 return nil, err
8881 }
8882 c.urlParams_.Set("alt", alt)
8883 c.urlParams_.Set("prettyPrint", "false")
8884 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/consentStores")
8885 urls += "?" + c.urlParams_.Encode()
8886 req, err := http.NewRequest("POST", urls, body)
8887 if err != nil {
8888 return nil, err
8889 }
8890 req.Header = reqHeaders
8891 googleapi.Expand(req.URL, map[string]string{
8892 "parent": c.parent,
8893 })
8894 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.create", "request", internallog.HTTPRequest(req, body.Bytes()))
8895 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8896 }
8897
8898 // Do executes the "healthcare.projects.locations.datasets.consentStores.create" call.
8899 // Any non-2xx status code is an error. Response headers are in either
8900 // *ConsentStore.ServerResponse.Header or (if a response was returned at all)
8901 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8902 // whether the returned error was because http.StatusNotModified was returned.
8903 func (c *ProjectsLocationsDatasetsConsentStoresCreateCall) Do(opts ...googleapi.CallOption) (*ConsentStore, error) {
8904 gensupport.SetOptions(c.urlParams_, opts...)
8905 res, err := c.doRequest("json")
8906 if res != nil && res.StatusCode == http.StatusNotModified {
8907 if res.Body != nil {
8908 res.Body.Close()
8909 }
8910 return nil, gensupport.WrapError(&googleapi.Error{
8911 Code: res.StatusCode,
8912 Header: res.Header,
8913 })
8914 }
8915 if err != nil {
8916 return nil, err
8917 }
8918 defer googleapi.CloseBody(res)
8919 if err := googleapi.CheckResponse(res); err != nil {
8920 return nil, gensupport.WrapError(err)
8921 }
8922 ret := &ConsentStore{
8923 ServerResponse: googleapi.ServerResponse{
8924 Header: res.Header,
8925 HTTPStatusCode: res.StatusCode,
8926 },
8927 }
8928 target := &ret
8929 b, err := gensupport.DecodeResponseBytes(target, res)
8930 if err != nil {
8931 return nil, err
8932 }
8933 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.create", "response", internallog.HTTPResponse(res, b))
8934 return ret, nil
8935 }
8936
8937 type ProjectsLocationsDatasetsConsentStoresDeleteCall struct {
8938 s *Service
8939 name string
8940 urlParams_ gensupport.URLParams
8941 ctx_ context.Context
8942 header_ http.Header
8943 }
8944
8945 // Delete: Deletes the specified consent store and removes all the consent
8946 // store's data.
8947 //
8948 // - name: The resource name of the consent store to delete.
8949 func (r *ProjectsLocationsDatasetsConsentStoresService) Delete(name string) *ProjectsLocationsDatasetsConsentStoresDeleteCall {
8950 c := &ProjectsLocationsDatasetsConsentStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8951 c.name = name
8952 return c
8953 }
8954
8955 // Fields allows partial responses to be retrieved. See
8956 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8957 // details.
8958 func (c *ProjectsLocationsDatasetsConsentStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresDeleteCall {
8959 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8960 return c
8961 }
8962
8963 // Context sets the context to be used in this call's Do method.
8964 func (c *ProjectsLocationsDatasetsConsentStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresDeleteCall {
8965 c.ctx_ = ctx
8966 return c
8967 }
8968
8969 // Header returns a http.Header that can be modified by the caller to add
8970 // headers to the request.
8971 func (c *ProjectsLocationsDatasetsConsentStoresDeleteCall) Header() http.Header {
8972 if c.header_ == nil {
8973 c.header_ = make(http.Header)
8974 }
8975 return c.header_
8976 }
8977
8978 func (c *ProjectsLocationsDatasetsConsentStoresDeleteCall) doRequest(alt string) (*http.Response, error) {
8979 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8980 c.urlParams_.Set("alt", alt)
8981 c.urlParams_.Set("prettyPrint", "false")
8982 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
8983 urls += "?" + c.urlParams_.Encode()
8984 req, err := http.NewRequest("DELETE", urls, nil)
8985 if err != nil {
8986 return nil, err
8987 }
8988 req.Header = reqHeaders
8989 googleapi.Expand(req.URL, map[string]string{
8990 "name": c.name,
8991 })
8992 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.delete", "request", internallog.HTTPRequest(req, nil))
8993 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8994 }
8995
8996 // Do executes the "healthcare.projects.locations.datasets.consentStores.delete" call.
8997 // Any non-2xx status code is an error. Response headers are in either
8998 // *Empty.ServerResponse.Header or (if a response was returned at all) in
8999 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9000 // whether the returned error was because http.StatusNotModified was returned.
9001 func (c *ProjectsLocationsDatasetsConsentStoresDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
9002 gensupport.SetOptions(c.urlParams_, opts...)
9003 res, err := c.doRequest("json")
9004 if res != nil && res.StatusCode == http.StatusNotModified {
9005 if res.Body != nil {
9006 res.Body.Close()
9007 }
9008 return nil, gensupport.WrapError(&googleapi.Error{
9009 Code: res.StatusCode,
9010 Header: res.Header,
9011 })
9012 }
9013 if err != nil {
9014 return nil, err
9015 }
9016 defer googleapi.CloseBody(res)
9017 if err := googleapi.CheckResponse(res); err != nil {
9018 return nil, gensupport.WrapError(err)
9019 }
9020 ret := &Empty{
9021 ServerResponse: googleapi.ServerResponse{
9022 Header: res.Header,
9023 HTTPStatusCode: res.StatusCode,
9024 },
9025 }
9026 target := &ret
9027 b, err := gensupport.DecodeResponseBytes(target, res)
9028 if err != nil {
9029 return nil, err
9030 }
9031 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.delete", "response", internallog.HTTPResponse(res, b))
9032 return ret, nil
9033 }
9034
9035 type ProjectsLocationsDatasetsConsentStoresEvaluateUserConsentsCall struct {
9036 s *Service
9037 consentStore string
9038 evaluateuserconsentsrequest *EvaluateUserConsentsRequest
9039 urlParams_ gensupport.URLParams
9040 ctx_ context.Context
9041 header_ http.Header
9042 }
9043
9044 // EvaluateUserConsents: Evaluates the user's Consents for all matching User
9045 // data mappings. Note: User data mappings are indexed asynchronously, which
9046 // can cause a slight delay between the time mappings are created or updated
9047 // and when they are included in EvaluateUserConsents results.
9048 //
9049 // - consentStore: Name of the consent store to retrieve User data mappings
9050 // from.
9051 func (r *ProjectsLocationsDatasetsConsentStoresService) EvaluateUserConsents(consentStore string, evaluateuserconsentsrequest *EvaluateUserConsentsRequest) *ProjectsLocationsDatasetsConsentStoresEvaluateUserConsentsCall {
9052 c := &ProjectsLocationsDatasetsConsentStoresEvaluateUserConsentsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9053 c.consentStore = consentStore
9054 c.evaluateuserconsentsrequest = evaluateuserconsentsrequest
9055 return c
9056 }
9057
9058 // Fields allows partial responses to be retrieved. See
9059 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9060 // details.
9061 func (c *ProjectsLocationsDatasetsConsentStoresEvaluateUserConsentsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresEvaluateUserConsentsCall {
9062 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9063 return c
9064 }
9065
9066 // Context sets the context to be used in this call's Do method.
9067 func (c *ProjectsLocationsDatasetsConsentStoresEvaluateUserConsentsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresEvaluateUserConsentsCall {
9068 c.ctx_ = ctx
9069 return c
9070 }
9071
9072 // Header returns a http.Header that can be modified by the caller to add
9073 // headers to the request.
9074 func (c *ProjectsLocationsDatasetsConsentStoresEvaluateUserConsentsCall) Header() http.Header {
9075 if c.header_ == nil {
9076 c.header_ = make(http.Header)
9077 }
9078 return c.header_
9079 }
9080
9081 func (c *ProjectsLocationsDatasetsConsentStoresEvaluateUserConsentsCall) doRequest(alt string) (*http.Response, error) {
9082 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9083 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.evaluateuserconsentsrequest)
9084 if err != nil {
9085 return nil, err
9086 }
9087 c.urlParams_.Set("alt", alt)
9088 c.urlParams_.Set("prettyPrint", "false")
9089 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+consentStore}:evaluateUserConsents")
9090 urls += "?" + c.urlParams_.Encode()
9091 req, err := http.NewRequest("POST", urls, body)
9092 if err != nil {
9093 return nil, err
9094 }
9095 req.Header = reqHeaders
9096 googleapi.Expand(req.URL, map[string]string{
9097 "consentStore": c.consentStore,
9098 })
9099 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.evaluateUserConsents", "request", internallog.HTTPRequest(req, body.Bytes()))
9100 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9101 }
9102
9103 // Do executes the "healthcare.projects.locations.datasets.consentStores.evaluateUserConsents" call.
9104 // Any non-2xx status code is an error. Response headers are in either
9105 // *EvaluateUserConsentsResponse.ServerResponse.Header or (if a response was
9106 // returned at all) in error.(*googleapi.Error).Header. Use
9107 // googleapi.IsNotModified to check whether the returned error was because
9108 // http.StatusNotModified was returned.
9109 func (c *ProjectsLocationsDatasetsConsentStoresEvaluateUserConsentsCall) Do(opts ...googleapi.CallOption) (*EvaluateUserConsentsResponse, error) {
9110 gensupport.SetOptions(c.urlParams_, opts...)
9111 res, err := c.doRequest("json")
9112 if res != nil && res.StatusCode == http.StatusNotModified {
9113 if res.Body != nil {
9114 res.Body.Close()
9115 }
9116 return nil, gensupport.WrapError(&googleapi.Error{
9117 Code: res.StatusCode,
9118 Header: res.Header,
9119 })
9120 }
9121 if err != nil {
9122 return nil, err
9123 }
9124 defer googleapi.CloseBody(res)
9125 if err := googleapi.CheckResponse(res); err != nil {
9126 return nil, gensupport.WrapError(err)
9127 }
9128 ret := &EvaluateUserConsentsResponse{
9129 ServerResponse: googleapi.ServerResponse{
9130 Header: res.Header,
9131 HTTPStatusCode: res.StatusCode,
9132 },
9133 }
9134 target := &ret
9135 b, err := gensupport.DecodeResponseBytes(target, res)
9136 if err != nil {
9137 return nil, err
9138 }
9139 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.evaluateUserConsents", "response", internallog.HTTPResponse(res, b))
9140 return ret, nil
9141 }
9142
9143 // Pages invokes f for each page of results.
9144 // A non-nil error returned from f will halt the iteration.
9145 // The provided context supersedes any context provided to the Context method.
9146 func (c *ProjectsLocationsDatasetsConsentStoresEvaluateUserConsentsCall) Pages(ctx context.Context, f func(*EvaluateUserConsentsResponse) error) error {
9147 c.ctx_ = ctx
9148 defer func(pt string) { c.evaluateuserconsentsrequest.PageToken = pt }(c.evaluateuserconsentsrequest.PageToken)
9149 for {
9150 x, err := c.Do()
9151 if err != nil {
9152 return err
9153 }
9154 if err := f(x); err != nil {
9155 return err
9156 }
9157 if x.NextPageToken == "" {
9158 return nil
9159 }
9160 c.evaluateuserconsentsrequest.PageToken = x.NextPageToken
9161 }
9162 }
9163
9164 type ProjectsLocationsDatasetsConsentStoresGetCall struct {
9165 s *Service
9166 name string
9167 urlParams_ gensupport.URLParams
9168 ifNoneMatch_ string
9169 ctx_ context.Context
9170 header_ http.Header
9171 }
9172
9173 // Get: Gets the specified consent store.
9174 //
9175 // - name: The resource name of the consent store to get.
9176 func (r *ProjectsLocationsDatasetsConsentStoresService) Get(name string) *ProjectsLocationsDatasetsConsentStoresGetCall {
9177 c := &ProjectsLocationsDatasetsConsentStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9178 c.name = name
9179 return c
9180 }
9181
9182 // Fields allows partial responses to be retrieved. See
9183 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9184 // details.
9185 func (c *ProjectsLocationsDatasetsConsentStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresGetCall {
9186 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9187 return c
9188 }
9189
9190 // IfNoneMatch sets an optional parameter which makes the operation fail if the
9191 // object's ETag matches the given value. This is useful for getting updates
9192 // only after the object has changed since the last request.
9193 func (c *ProjectsLocationsDatasetsConsentStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsConsentStoresGetCall {
9194 c.ifNoneMatch_ = entityTag
9195 return c
9196 }
9197
9198 // Context sets the context to be used in this call's Do method.
9199 func (c *ProjectsLocationsDatasetsConsentStoresGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresGetCall {
9200 c.ctx_ = ctx
9201 return c
9202 }
9203
9204 // Header returns a http.Header that can be modified by the caller to add
9205 // headers to the request.
9206 func (c *ProjectsLocationsDatasetsConsentStoresGetCall) Header() http.Header {
9207 if c.header_ == nil {
9208 c.header_ = make(http.Header)
9209 }
9210 return c.header_
9211 }
9212
9213 func (c *ProjectsLocationsDatasetsConsentStoresGetCall) doRequest(alt string) (*http.Response, error) {
9214 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9215 if c.ifNoneMatch_ != "" {
9216 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9217 }
9218 c.urlParams_.Set("alt", alt)
9219 c.urlParams_.Set("prettyPrint", "false")
9220 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
9221 urls += "?" + c.urlParams_.Encode()
9222 req, err := http.NewRequest("GET", urls, nil)
9223 if err != nil {
9224 return nil, err
9225 }
9226 req.Header = reqHeaders
9227 googleapi.Expand(req.URL, map[string]string{
9228 "name": c.name,
9229 })
9230 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.get", "request", internallog.HTTPRequest(req, nil))
9231 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9232 }
9233
9234 // Do executes the "healthcare.projects.locations.datasets.consentStores.get" call.
9235 // Any non-2xx status code is an error. Response headers are in either
9236 // *ConsentStore.ServerResponse.Header or (if a response was returned at all)
9237 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9238 // whether the returned error was because http.StatusNotModified was returned.
9239 func (c *ProjectsLocationsDatasetsConsentStoresGetCall) Do(opts ...googleapi.CallOption) (*ConsentStore, error) {
9240 gensupport.SetOptions(c.urlParams_, opts...)
9241 res, err := c.doRequest("json")
9242 if res != nil && res.StatusCode == http.StatusNotModified {
9243 if res.Body != nil {
9244 res.Body.Close()
9245 }
9246 return nil, gensupport.WrapError(&googleapi.Error{
9247 Code: res.StatusCode,
9248 Header: res.Header,
9249 })
9250 }
9251 if err != nil {
9252 return nil, err
9253 }
9254 defer googleapi.CloseBody(res)
9255 if err := googleapi.CheckResponse(res); err != nil {
9256 return nil, gensupport.WrapError(err)
9257 }
9258 ret := &ConsentStore{
9259 ServerResponse: googleapi.ServerResponse{
9260 Header: res.Header,
9261 HTTPStatusCode: res.StatusCode,
9262 },
9263 }
9264 target := &ret
9265 b, err := gensupport.DecodeResponseBytes(target, res)
9266 if err != nil {
9267 return nil, err
9268 }
9269 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.get", "response", internallog.HTTPResponse(res, b))
9270 return ret, nil
9271 }
9272
9273 type ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall struct {
9274 s *Service
9275 resource string
9276 urlParams_ gensupport.URLParams
9277 ifNoneMatch_ string
9278 ctx_ context.Context
9279 header_ http.Header
9280 }
9281
9282 // GetIamPolicy: Gets the access control policy for a resource. Returns an
9283 // empty policy if the resource exists and does not have a policy set.
9284 //
9285 // - resource: REQUIRED: The resource for which the policy is being requested.
9286 // See Resource names (https://cloud.google.com/apis/design/resource_names)
9287 // for the appropriate value for this field.
9288 func (r *ProjectsLocationsDatasetsConsentStoresService) GetIamPolicy(resource string) *ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall {
9289 c := &ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9290 c.resource = resource
9291 return c
9292 }
9293
9294 // OptionsRequestedPolicyVersion sets the optional parameter
9295 // "options.requestedPolicyVersion": The maximum policy version that will be
9296 // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
9297 // an invalid value will be rejected. Requests for policies with any
9298 // conditional role bindings must specify version 3. Policies with no
9299 // conditional role bindings may specify any valid value or leave the field
9300 // unset. The policy in the response might use the policy version that you
9301 // specified, or it might use a lower policy version. For example, if you
9302 // specify version 3, but the policy has no conditional role bindings, the
9303 // response uses version 1. To learn which resources support conditions in
9304 // their IAM policies, see the IAM documentation
9305 // (https://cloud.google.com/iam/help/conditions/resource-policies).
9306 func (c *ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall {
9307 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
9308 return c
9309 }
9310
9311 // Fields allows partial responses to be retrieved. See
9312 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9313 // details.
9314 func (c *ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall {
9315 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9316 return c
9317 }
9318
9319 // IfNoneMatch sets an optional parameter which makes the operation fail if the
9320 // object's ETag matches the given value. This is useful for getting updates
9321 // only after the object has changed since the last request.
9322 func (c *ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall {
9323 c.ifNoneMatch_ = entityTag
9324 return c
9325 }
9326
9327 // Context sets the context to be used in this call's Do method.
9328 func (c *ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall {
9329 c.ctx_ = ctx
9330 return c
9331 }
9332
9333 // Header returns a http.Header that can be modified by the caller to add
9334 // headers to the request.
9335 func (c *ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall) Header() http.Header {
9336 if c.header_ == nil {
9337 c.header_ = make(http.Header)
9338 }
9339 return c.header_
9340 }
9341
9342 func (c *ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
9343 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9344 if c.ifNoneMatch_ != "" {
9345 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9346 }
9347 c.urlParams_.Set("alt", alt)
9348 c.urlParams_.Set("prettyPrint", "false")
9349 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy")
9350 urls += "?" + c.urlParams_.Encode()
9351 req, err := http.NewRequest("GET", urls, nil)
9352 if err != nil {
9353 return nil, err
9354 }
9355 req.Header = reqHeaders
9356 googleapi.Expand(req.URL, map[string]string{
9357 "resource": c.resource,
9358 })
9359 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.getIamPolicy", "request", internallog.HTTPRequest(req, nil))
9360 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9361 }
9362
9363 // Do executes the "healthcare.projects.locations.datasets.consentStores.getIamPolicy" call.
9364 // Any non-2xx status code is an error. Response headers are in either
9365 // *Policy.ServerResponse.Header or (if a response was returned at all) in
9366 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9367 // whether the returned error was because http.StatusNotModified was returned.
9368 func (c *ProjectsLocationsDatasetsConsentStoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
9369 gensupport.SetOptions(c.urlParams_, opts...)
9370 res, err := c.doRequest("json")
9371 if res != nil && res.StatusCode == http.StatusNotModified {
9372 if res.Body != nil {
9373 res.Body.Close()
9374 }
9375 return nil, gensupport.WrapError(&googleapi.Error{
9376 Code: res.StatusCode,
9377 Header: res.Header,
9378 })
9379 }
9380 if err != nil {
9381 return nil, err
9382 }
9383 defer googleapi.CloseBody(res)
9384 if err := googleapi.CheckResponse(res); err != nil {
9385 return nil, gensupport.WrapError(err)
9386 }
9387 ret := &Policy{
9388 ServerResponse: googleapi.ServerResponse{
9389 Header: res.Header,
9390 HTTPStatusCode: res.StatusCode,
9391 },
9392 }
9393 target := &ret
9394 b, err := gensupport.DecodeResponseBytes(target, res)
9395 if err != nil {
9396 return nil, err
9397 }
9398 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.getIamPolicy", "response", internallog.HTTPResponse(res, b))
9399 return ret, nil
9400 }
9401
9402 type ProjectsLocationsDatasetsConsentStoresListCall struct {
9403 s *Service
9404 parent string
9405 urlParams_ gensupport.URLParams
9406 ifNoneMatch_ string
9407 ctx_ context.Context
9408 header_ http.Header
9409 }
9410
9411 // List: Lists the consent stores in the specified dataset.
9412 //
9413 // - parent: Name of the dataset.
9414 func (r *ProjectsLocationsDatasetsConsentStoresService) List(parent string) *ProjectsLocationsDatasetsConsentStoresListCall {
9415 c := &ProjectsLocationsDatasetsConsentStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9416 c.parent = parent
9417 return c
9418 }
9419
9420 // Filter sets the optional parameter "filter": Restricts the stores returned
9421 // to those matching a filter. The following syntax is available: * A string
9422 // field value can be written as text inside quotation marks, for example
9423 // "query text". The only valid relational operation for text fields is
9424 // equality (`=`), where text is searched within the field, rather than having
9425 // the field be equal to the text. For example, "Comment = great" returns
9426 // messages with `great` in the comment field. * A number field value can be
9427 // written as an integer, a decimal, or an exponential. The valid relational
9428 // operators for number fields are the equality operator (`=`), along with the
9429 // less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that there is
9430 // no inequality (`!=`) operator. You can prepend the `NOT` operator to an
9431 // expression to negate it. * A date field value must be written in
9432 // `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format.
9433 // Leading zeros are required for one-digit months and days. The valid
9434 // relational operators for date fields are the equality operator (`=`) , along
9435 // with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that
9436 // there is no inequality (`!=`) operator. You can prepend the `NOT` operator
9437 // to an expression to negate it. * Multiple field query expressions can be
9438 // combined in one query by adding `AND` or `OR` operators between the
9439 // expressions. If a boolean operator appears within a quoted string, it is not
9440 // treated as special, it's just another part of the character string to be
9441 // matched. You can prepend the `NOT` operator to an expression to negate it.
9442 // Only filtering on labels is supported. For example,
9443 // `filter=labels.key=value`.
9444 func (c *ProjectsLocationsDatasetsConsentStoresListCall) Filter(filter string) *ProjectsLocationsDatasetsConsentStoresListCall {
9445 c.urlParams_.Set("filter", filter)
9446 return c
9447 }
9448
9449 // PageSize sets the optional parameter "pageSize": Limit on the number of
9450 // consent stores to return in a single response. If not specified, 100 is
9451 // used. May not be larger than 1000.
9452 func (c *ProjectsLocationsDatasetsConsentStoresListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsConsentStoresListCall {
9453 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9454 return c
9455 }
9456
9457 // PageToken sets the optional parameter "pageToken": Token to retrieve the
9458 // next page of results, or empty to get the first page.
9459 func (c *ProjectsLocationsDatasetsConsentStoresListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsConsentStoresListCall {
9460 c.urlParams_.Set("pageToken", pageToken)
9461 return c
9462 }
9463
9464 // Fields allows partial responses to be retrieved. See
9465 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9466 // details.
9467 func (c *ProjectsLocationsDatasetsConsentStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresListCall {
9468 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9469 return c
9470 }
9471
9472 // IfNoneMatch sets an optional parameter which makes the operation fail if the
9473 // object's ETag matches the given value. This is useful for getting updates
9474 // only after the object has changed since the last request.
9475 func (c *ProjectsLocationsDatasetsConsentStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsConsentStoresListCall {
9476 c.ifNoneMatch_ = entityTag
9477 return c
9478 }
9479
9480 // Context sets the context to be used in this call's Do method.
9481 func (c *ProjectsLocationsDatasetsConsentStoresListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresListCall {
9482 c.ctx_ = ctx
9483 return c
9484 }
9485
9486 // Header returns a http.Header that can be modified by the caller to add
9487 // headers to the request.
9488 func (c *ProjectsLocationsDatasetsConsentStoresListCall) Header() http.Header {
9489 if c.header_ == nil {
9490 c.header_ = make(http.Header)
9491 }
9492 return c.header_
9493 }
9494
9495 func (c *ProjectsLocationsDatasetsConsentStoresListCall) doRequest(alt string) (*http.Response, error) {
9496 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9497 if c.ifNoneMatch_ != "" {
9498 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9499 }
9500 c.urlParams_.Set("alt", alt)
9501 c.urlParams_.Set("prettyPrint", "false")
9502 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/consentStores")
9503 urls += "?" + c.urlParams_.Encode()
9504 req, err := http.NewRequest("GET", urls, nil)
9505 if err != nil {
9506 return nil, err
9507 }
9508 req.Header = reqHeaders
9509 googleapi.Expand(req.URL, map[string]string{
9510 "parent": c.parent,
9511 })
9512 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.list", "request", internallog.HTTPRequest(req, nil))
9513 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9514 }
9515
9516 // Do executes the "healthcare.projects.locations.datasets.consentStores.list" call.
9517 // Any non-2xx status code is an error. Response headers are in either
9518 // *ListConsentStoresResponse.ServerResponse.Header or (if a response was
9519 // returned at all) in error.(*googleapi.Error).Header. Use
9520 // googleapi.IsNotModified to check whether the returned error was because
9521 // http.StatusNotModified was returned.
9522 func (c *ProjectsLocationsDatasetsConsentStoresListCall) Do(opts ...googleapi.CallOption) (*ListConsentStoresResponse, error) {
9523 gensupport.SetOptions(c.urlParams_, opts...)
9524 res, err := c.doRequest("json")
9525 if res != nil && res.StatusCode == http.StatusNotModified {
9526 if res.Body != nil {
9527 res.Body.Close()
9528 }
9529 return nil, gensupport.WrapError(&googleapi.Error{
9530 Code: res.StatusCode,
9531 Header: res.Header,
9532 })
9533 }
9534 if err != nil {
9535 return nil, err
9536 }
9537 defer googleapi.CloseBody(res)
9538 if err := googleapi.CheckResponse(res); err != nil {
9539 return nil, gensupport.WrapError(err)
9540 }
9541 ret := &ListConsentStoresResponse{
9542 ServerResponse: googleapi.ServerResponse{
9543 Header: res.Header,
9544 HTTPStatusCode: res.StatusCode,
9545 },
9546 }
9547 target := &ret
9548 b, err := gensupport.DecodeResponseBytes(target, res)
9549 if err != nil {
9550 return nil, err
9551 }
9552 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.list", "response", internallog.HTTPResponse(res, b))
9553 return ret, nil
9554 }
9555
9556 // Pages invokes f for each page of results.
9557 // A non-nil error returned from f will halt the iteration.
9558 // The provided context supersedes any context provided to the Context method.
9559 func (c *ProjectsLocationsDatasetsConsentStoresListCall) Pages(ctx context.Context, f func(*ListConsentStoresResponse) error) error {
9560 c.ctx_ = ctx
9561 defer c.PageToken(c.urlParams_.Get("pageToken"))
9562 for {
9563 x, err := c.Do()
9564 if err != nil {
9565 return err
9566 }
9567 if err := f(x); err != nil {
9568 return err
9569 }
9570 if x.NextPageToken == "" {
9571 return nil
9572 }
9573 c.PageToken(x.NextPageToken)
9574 }
9575 }
9576
9577 type ProjectsLocationsDatasetsConsentStoresPatchCall struct {
9578 s *Service
9579 name string
9580 consentstore *ConsentStore
9581 urlParams_ gensupport.URLParams
9582 ctx_ context.Context
9583 header_ http.Header
9584 }
9585
9586 // Patch: Updates the specified consent store.
9587 //
9588 // - name: Resource name of the consent store, of the form
9589 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consen
9590 // tStores/{consent_store_id}`. Cannot be changed after creation.
9591 func (r *ProjectsLocationsDatasetsConsentStoresService) Patch(name string, consentstore *ConsentStore) *ProjectsLocationsDatasetsConsentStoresPatchCall {
9592 c := &ProjectsLocationsDatasetsConsentStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9593 c.name = name
9594 c.consentstore = consentstore
9595 return c
9596 }
9597
9598 // UpdateMask sets the optional parameter "updateMask": Required. The update
9599 // mask that applies to the resource. For the `FieldMask` definition, see
9600 // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
9601 // Only the `labels`, `default_consent_ttl`, and
9602 // `enable_consent_create_on_update` fields are allowed to be updated.
9603 func (c *ProjectsLocationsDatasetsConsentStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsConsentStoresPatchCall {
9604 c.urlParams_.Set("updateMask", updateMask)
9605 return c
9606 }
9607
9608 // Fields allows partial responses to be retrieved. See
9609 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9610 // details.
9611 func (c *ProjectsLocationsDatasetsConsentStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresPatchCall {
9612 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9613 return c
9614 }
9615
9616 // Context sets the context to be used in this call's Do method.
9617 func (c *ProjectsLocationsDatasetsConsentStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresPatchCall {
9618 c.ctx_ = ctx
9619 return c
9620 }
9621
9622 // Header returns a http.Header that can be modified by the caller to add
9623 // headers to the request.
9624 func (c *ProjectsLocationsDatasetsConsentStoresPatchCall) Header() http.Header {
9625 if c.header_ == nil {
9626 c.header_ = make(http.Header)
9627 }
9628 return c.header_
9629 }
9630
9631 func (c *ProjectsLocationsDatasetsConsentStoresPatchCall) doRequest(alt string) (*http.Response, error) {
9632 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9633 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.consentstore)
9634 if err != nil {
9635 return nil, err
9636 }
9637 c.urlParams_.Set("alt", alt)
9638 c.urlParams_.Set("prettyPrint", "false")
9639 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
9640 urls += "?" + c.urlParams_.Encode()
9641 req, err := http.NewRequest("PATCH", urls, body)
9642 if err != nil {
9643 return nil, err
9644 }
9645 req.Header = reqHeaders
9646 googleapi.Expand(req.URL, map[string]string{
9647 "name": c.name,
9648 })
9649 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
9650 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9651 }
9652
9653 // Do executes the "healthcare.projects.locations.datasets.consentStores.patch" call.
9654 // Any non-2xx status code is an error. Response headers are in either
9655 // *ConsentStore.ServerResponse.Header or (if a response was returned at all)
9656 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9657 // whether the returned error was because http.StatusNotModified was returned.
9658 func (c *ProjectsLocationsDatasetsConsentStoresPatchCall) Do(opts ...googleapi.CallOption) (*ConsentStore, error) {
9659 gensupport.SetOptions(c.urlParams_, opts...)
9660 res, err := c.doRequest("json")
9661 if res != nil && res.StatusCode == http.StatusNotModified {
9662 if res.Body != nil {
9663 res.Body.Close()
9664 }
9665 return nil, gensupport.WrapError(&googleapi.Error{
9666 Code: res.StatusCode,
9667 Header: res.Header,
9668 })
9669 }
9670 if err != nil {
9671 return nil, err
9672 }
9673 defer googleapi.CloseBody(res)
9674 if err := googleapi.CheckResponse(res); err != nil {
9675 return nil, gensupport.WrapError(err)
9676 }
9677 ret := &ConsentStore{
9678 ServerResponse: googleapi.ServerResponse{
9679 Header: res.Header,
9680 HTTPStatusCode: res.StatusCode,
9681 },
9682 }
9683 target := &ret
9684 b, err := gensupport.DecodeResponseBytes(target, res)
9685 if err != nil {
9686 return nil, err
9687 }
9688 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.patch", "response", internallog.HTTPResponse(res, b))
9689 return ret, nil
9690 }
9691
9692 type ProjectsLocationsDatasetsConsentStoresQueryAccessibleDataCall struct {
9693 s *Service
9694 consentStore string
9695 queryaccessibledatarequest *QueryAccessibleDataRequest
9696 urlParams_ gensupport.URLParams
9697 ctx_ context.Context
9698 header_ http.Header
9699 }
9700
9701 // QueryAccessibleData: Queries all data_ids that are consented for a specified
9702 // use in the given consent store and writes them to a specified destination.
9703 // The returned Operation includes a progress counter for the number of User
9704 // data mappings processed. If the request is successful, a detailed response
9705 // is returned of type QueryAccessibleDataResponse, contained in the response
9706 // field when the operation finishes. The metadata field type is
9707 // OperationMetadata. Errors are logged to Cloud Logging (see Viewing error
9708 // logs in Cloud Logging
9709 // (https://cloud.google.com/healthcare/docs/how-tos/logging)). For example,
9710 // the following sample log entry shows a `failed to evaluate consent policy`
9711 // error that occurred during a QueryAccessibleData call to consent store
9712 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentS
9713 // tores/{consent_store_id}`. ```json jsonPayload: { @type:
9714 // "type.googleapis.com/google.cloud.healthcare.logging.QueryAccessibleDataLogEn
9715 // try" error: { code: 9 message: "failed to evaluate consent policy" }
9716 // resourceName:
9717 // "projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentS
9718 // tores/{consent_store_id}/consents/{consent_id}" } logName:
9719 // "projects/{project_id}/logs/healthcare.googleapis.com%2Fquery_accessible_data
9720 // " operation: { id:
9721 // "projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/operatio
9722 // ns/{operation_id}" producer: "healthcare.googleapis.com/QueryAccessibleData"
9723 // } receiveTimestamp: "TIMESTAMP" resource: { labels: { consent_store_id:
9724 // "{consent_store_id}" dataset_id: "{dataset_id}" location: "{location_id}"
9725 // project_id: "{project_id}" } type: "healthcare_consent_store" } severity:
9726 // "ERROR" timestamp: "TIMESTAMP" ```
9727 //
9728 // - consentStore: Name of the consent store to retrieve User data mappings
9729 // from.
9730 func (r *ProjectsLocationsDatasetsConsentStoresService) QueryAccessibleData(consentStore string, queryaccessibledatarequest *QueryAccessibleDataRequest) *ProjectsLocationsDatasetsConsentStoresQueryAccessibleDataCall {
9731 c := &ProjectsLocationsDatasetsConsentStoresQueryAccessibleDataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9732 c.consentStore = consentStore
9733 c.queryaccessibledatarequest = queryaccessibledatarequest
9734 return c
9735 }
9736
9737 // Fields allows partial responses to be retrieved. See
9738 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9739 // details.
9740 func (c *ProjectsLocationsDatasetsConsentStoresQueryAccessibleDataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresQueryAccessibleDataCall {
9741 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9742 return c
9743 }
9744
9745 // Context sets the context to be used in this call's Do method.
9746 func (c *ProjectsLocationsDatasetsConsentStoresQueryAccessibleDataCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresQueryAccessibleDataCall {
9747 c.ctx_ = ctx
9748 return c
9749 }
9750
9751 // Header returns a http.Header that can be modified by the caller to add
9752 // headers to the request.
9753 func (c *ProjectsLocationsDatasetsConsentStoresQueryAccessibleDataCall) Header() http.Header {
9754 if c.header_ == nil {
9755 c.header_ = make(http.Header)
9756 }
9757 return c.header_
9758 }
9759
9760 func (c *ProjectsLocationsDatasetsConsentStoresQueryAccessibleDataCall) doRequest(alt string) (*http.Response, error) {
9761 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9762 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.queryaccessibledatarequest)
9763 if err != nil {
9764 return nil, err
9765 }
9766 c.urlParams_.Set("alt", alt)
9767 c.urlParams_.Set("prettyPrint", "false")
9768 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+consentStore}:queryAccessibleData")
9769 urls += "?" + c.urlParams_.Encode()
9770 req, err := http.NewRequest("POST", urls, body)
9771 if err != nil {
9772 return nil, err
9773 }
9774 req.Header = reqHeaders
9775 googleapi.Expand(req.URL, map[string]string{
9776 "consentStore": c.consentStore,
9777 })
9778 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.queryAccessibleData", "request", internallog.HTTPRequest(req, body.Bytes()))
9779 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9780 }
9781
9782 // Do executes the "healthcare.projects.locations.datasets.consentStores.queryAccessibleData" call.
9783 // Any non-2xx status code is an error. Response headers are in either
9784 // *Operation.ServerResponse.Header or (if a response was returned at all) in
9785 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9786 // whether the returned error was because http.StatusNotModified was returned.
9787 func (c *ProjectsLocationsDatasetsConsentStoresQueryAccessibleDataCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9788 gensupport.SetOptions(c.urlParams_, opts...)
9789 res, err := c.doRequest("json")
9790 if res != nil && res.StatusCode == http.StatusNotModified {
9791 if res.Body != nil {
9792 res.Body.Close()
9793 }
9794 return nil, gensupport.WrapError(&googleapi.Error{
9795 Code: res.StatusCode,
9796 Header: res.Header,
9797 })
9798 }
9799 if err != nil {
9800 return nil, err
9801 }
9802 defer googleapi.CloseBody(res)
9803 if err := googleapi.CheckResponse(res); err != nil {
9804 return nil, gensupport.WrapError(err)
9805 }
9806 ret := &Operation{
9807 ServerResponse: googleapi.ServerResponse{
9808 Header: res.Header,
9809 HTTPStatusCode: res.StatusCode,
9810 },
9811 }
9812 target := &ret
9813 b, err := gensupport.DecodeResponseBytes(target, res)
9814 if err != nil {
9815 return nil, err
9816 }
9817 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.queryAccessibleData", "response", internallog.HTTPResponse(res, b))
9818 return ret, nil
9819 }
9820
9821 type ProjectsLocationsDatasetsConsentStoresSetIamPolicyCall struct {
9822 s *Service
9823 resource string
9824 setiampolicyrequest *SetIamPolicyRequest
9825 urlParams_ gensupport.URLParams
9826 ctx_ context.Context
9827 header_ http.Header
9828 }
9829
9830 // SetIamPolicy: Sets the access control policy on the specified resource.
9831 // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
9832 // and `PERMISSION_DENIED` errors.
9833 //
9834 // - resource: REQUIRED: The resource for which the policy is being specified.
9835 // See Resource names (https://cloud.google.com/apis/design/resource_names)
9836 // for the appropriate value for this field.
9837 func (r *ProjectsLocationsDatasetsConsentStoresService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsConsentStoresSetIamPolicyCall {
9838 c := &ProjectsLocationsDatasetsConsentStoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9839 c.resource = resource
9840 c.setiampolicyrequest = setiampolicyrequest
9841 return c
9842 }
9843
9844 // Fields allows partial responses to be retrieved. See
9845 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9846 // details.
9847 func (c *ProjectsLocationsDatasetsConsentStoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresSetIamPolicyCall {
9848 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9849 return c
9850 }
9851
9852 // Context sets the context to be used in this call's Do method.
9853 func (c *ProjectsLocationsDatasetsConsentStoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresSetIamPolicyCall {
9854 c.ctx_ = ctx
9855 return c
9856 }
9857
9858 // Header returns a http.Header that can be modified by the caller to add
9859 // headers to the request.
9860 func (c *ProjectsLocationsDatasetsConsentStoresSetIamPolicyCall) Header() http.Header {
9861 if c.header_ == nil {
9862 c.header_ = make(http.Header)
9863 }
9864 return c.header_
9865 }
9866
9867 func (c *ProjectsLocationsDatasetsConsentStoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
9868 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9869 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest)
9870 if err != nil {
9871 return nil, err
9872 }
9873 c.urlParams_.Set("alt", alt)
9874 c.urlParams_.Set("prettyPrint", "false")
9875 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy")
9876 urls += "?" + c.urlParams_.Encode()
9877 req, err := http.NewRequest("POST", urls, body)
9878 if err != nil {
9879 return nil, err
9880 }
9881 req.Header = reqHeaders
9882 googleapi.Expand(req.URL, map[string]string{
9883 "resource": c.resource,
9884 })
9885 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes()))
9886 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9887 }
9888
9889 // Do executes the "healthcare.projects.locations.datasets.consentStores.setIamPolicy" call.
9890 // Any non-2xx status code is an error. Response headers are in either
9891 // *Policy.ServerResponse.Header or (if a response was returned at all) in
9892 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9893 // whether the returned error was because http.StatusNotModified was returned.
9894 func (c *ProjectsLocationsDatasetsConsentStoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
9895 gensupport.SetOptions(c.urlParams_, opts...)
9896 res, err := c.doRequest("json")
9897 if res != nil && res.StatusCode == http.StatusNotModified {
9898 if res.Body != nil {
9899 res.Body.Close()
9900 }
9901 return nil, gensupport.WrapError(&googleapi.Error{
9902 Code: res.StatusCode,
9903 Header: res.Header,
9904 })
9905 }
9906 if err != nil {
9907 return nil, err
9908 }
9909 defer googleapi.CloseBody(res)
9910 if err := googleapi.CheckResponse(res); err != nil {
9911 return nil, gensupport.WrapError(err)
9912 }
9913 ret := &Policy{
9914 ServerResponse: googleapi.ServerResponse{
9915 Header: res.Header,
9916 HTTPStatusCode: res.StatusCode,
9917 },
9918 }
9919 target := &ret
9920 b, err := gensupport.DecodeResponseBytes(target, res)
9921 if err != nil {
9922 return nil, err
9923 }
9924 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.setIamPolicy", "response", internallog.HTTPResponse(res, b))
9925 return ret, nil
9926 }
9927
9928 type ProjectsLocationsDatasetsConsentStoresTestIamPermissionsCall struct {
9929 s *Service
9930 resource string
9931 testiampermissionsrequest *TestIamPermissionsRequest
9932 urlParams_ gensupport.URLParams
9933 ctx_ context.Context
9934 header_ http.Header
9935 }
9936
9937 // TestIamPermissions: Returns permissions that a caller has on the specified
9938 // resource. If the resource does not exist, this will return an empty set of
9939 // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
9940 // used for building permission-aware UIs and command-line tools, not for
9941 // authorization checking. This operation may "fail open" without warning.
9942 //
9943 // - resource: REQUIRED: The resource for which the policy detail is being
9944 // requested. See Resource names
9945 // (https://cloud.google.com/apis/design/resource_names) for the appropriate
9946 // value for this field.
9947 func (r *ProjectsLocationsDatasetsConsentStoresService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsConsentStoresTestIamPermissionsCall {
9948 c := &ProjectsLocationsDatasetsConsentStoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9949 c.resource = resource
9950 c.testiampermissionsrequest = testiampermissionsrequest
9951 return c
9952 }
9953
9954 // Fields allows partial responses to be retrieved. See
9955 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9956 // details.
9957 func (c *ProjectsLocationsDatasetsConsentStoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresTestIamPermissionsCall {
9958 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9959 return c
9960 }
9961
9962 // Context sets the context to be used in this call's Do method.
9963 func (c *ProjectsLocationsDatasetsConsentStoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresTestIamPermissionsCall {
9964 c.ctx_ = ctx
9965 return c
9966 }
9967
9968 // Header returns a http.Header that can be modified by the caller to add
9969 // headers to the request.
9970 func (c *ProjectsLocationsDatasetsConsentStoresTestIamPermissionsCall) Header() http.Header {
9971 if c.header_ == nil {
9972 c.header_ = make(http.Header)
9973 }
9974 return c.header_
9975 }
9976
9977 func (c *ProjectsLocationsDatasetsConsentStoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
9978 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9979 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest)
9980 if err != nil {
9981 return nil, err
9982 }
9983 c.urlParams_.Set("alt", alt)
9984 c.urlParams_.Set("prettyPrint", "false")
9985 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions")
9986 urls += "?" + c.urlParams_.Encode()
9987 req, err := http.NewRequest("POST", urls, body)
9988 if err != nil {
9989 return nil, err
9990 }
9991 req.Header = reqHeaders
9992 googleapi.Expand(req.URL, map[string]string{
9993 "resource": c.resource,
9994 })
9995 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes()))
9996 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9997 }
9998
9999 // Do executes the "healthcare.projects.locations.datasets.consentStores.testIamPermissions" call.
10000 // Any non-2xx status code is an error. Response headers are in either
10001 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
10002 // returned at all) in error.(*googleapi.Error).Header. Use
10003 // googleapi.IsNotModified to check whether the returned error was because
10004 // http.StatusNotModified was returned.
10005 func (c *ProjectsLocationsDatasetsConsentStoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
10006 gensupport.SetOptions(c.urlParams_, opts...)
10007 res, err := c.doRequest("json")
10008 if res != nil && res.StatusCode == http.StatusNotModified {
10009 if res.Body != nil {
10010 res.Body.Close()
10011 }
10012 return nil, gensupport.WrapError(&googleapi.Error{
10013 Code: res.StatusCode,
10014 Header: res.Header,
10015 })
10016 }
10017 if err != nil {
10018 return nil, err
10019 }
10020 defer googleapi.CloseBody(res)
10021 if err := googleapi.CheckResponse(res); err != nil {
10022 return nil, gensupport.WrapError(err)
10023 }
10024 ret := &TestIamPermissionsResponse{
10025 ServerResponse: googleapi.ServerResponse{
10026 Header: res.Header,
10027 HTTPStatusCode: res.StatusCode,
10028 },
10029 }
10030 target := &ret
10031 b, err := gensupport.DecodeResponseBytes(target, res)
10032 if err != nil {
10033 return nil, err
10034 }
10035 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.testIamPermissions", "response", internallog.HTTPResponse(res, b))
10036 return ret, nil
10037 }
10038
10039 type ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsCreateCall struct {
10040 s *Service
10041 parent string
10042 attributedefinition *AttributeDefinition
10043 urlParams_ gensupport.URLParams
10044 ctx_ context.Context
10045 header_ http.Header
10046 }
10047
10048 // Create: Creates a new Attribute definition in the parent consent store.
10049 //
10050 // - parent: The name of the consent store that this Attribute definition
10051 // belongs to.
10052 func (r *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsService) Create(parent string, attributedefinition *AttributeDefinition) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsCreateCall {
10053 c := &ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10054 c.parent = parent
10055 c.attributedefinition = attributedefinition
10056 return c
10057 }
10058
10059 // AttributeDefinitionId sets the optional parameter "attributeDefinitionId":
10060 // Required. The ID of the Attribute definition to create. The string must
10061 // match the following regex: `_a-zA-Z{0,255}` and must not be a reserved
10062 // keyword within the Common Expression Language as listed on
10063 // https://github.com/google/cel-spec/blob/master/doc/langdef.md.
10064 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsCreateCall) AttributeDefinitionId(attributeDefinitionId string) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsCreateCall {
10065 c.urlParams_.Set("attributeDefinitionId", attributeDefinitionId)
10066 return c
10067 }
10068
10069 // Fields allows partial responses to be retrieved. See
10070 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10071 // details.
10072 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsCreateCall {
10073 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10074 return c
10075 }
10076
10077 // Context sets the context to be used in this call's Do method.
10078 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsCreateCall {
10079 c.ctx_ = ctx
10080 return c
10081 }
10082
10083 // Header returns a http.Header that can be modified by the caller to add
10084 // headers to the request.
10085 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsCreateCall) Header() http.Header {
10086 if c.header_ == nil {
10087 c.header_ = make(http.Header)
10088 }
10089 return c.header_
10090 }
10091
10092 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsCreateCall) doRequest(alt string) (*http.Response, error) {
10093 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10094 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.attributedefinition)
10095 if err != nil {
10096 return nil, err
10097 }
10098 c.urlParams_.Set("alt", alt)
10099 c.urlParams_.Set("prettyPrint", "false")
10100 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/attributeDefinitions")
10101 urls += "?" + c.urlParams_.Encode()
10102 req, err := http.NewRequest("POST", urls, body)
10103 if err != nil {
10104 return nil, err
10105 }
10106 req.Header = reqHeaders
10107 googleapi.Expand(req.URL, map[string]string{
10108 "parent": c.parent,
10109 })
10110 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.create", "request", internallog.HTTPRequest(req, body.Bytes()))
10111 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10112 }
10113
10114 // Do executes the "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.create" call.
10115 // Any non-2xx status code is an error. Response headers are in either
10116 // *AttributeDefinition.ServerResponse.Header or (if a response was returned at
10117 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10118 // check whether the returned error was because http.StatusNotModified was
10119 // returned.
10120 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsCreateCall) Do(opts ...googleapi.CallOption) (*AttributeDefinition, error) {
10121 gensupport.SetOptions(c.urlParams_, opts...)
10122 res, err := c.doRequest("json")
10123 if res != nil && res.StatusCode == http.StatusNotModified {
10124 if res.Body != nil {
10125 res.Body.Close()
10126 }
10127 return nil, gensupport.WrapError(&googleapi.Error{
10128 Code: res.StatusCode,
10129 Header: res.Header,
10130 })
10131 }
10132 if err != nil {
10133 return nil, err
10134 }
10135 defer googleapi.CloseBody(res)
10136 if err := googleapi.CheckResponse(res); err != nil {
10137 return nil, gensupport.WrapError(err)
10138 }
10139 ret := &AttributeDefinition{
10140 ServerResponse: googleapi.ServerResponse{
10141 Header: res.Header,
10142 HTTPStatusCode: res.StatusCode,
10143 },
10144 }
10145 target := &ret
10146 b, err := gensupport.DecodeResponseBytes(target, res)
10147 if err != nil {
10148 return nil, err
10149 }
10150 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.create", "response", internallog.HTTPResponse(res, b))
10151 return ret, nil
10152 }
10153
10154 type ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsDeleteCall struct {
10155 s *Service
10156 name string
10157 urlParams_ gensupport.URLParams
10158 ctx_ context.Context
10159 header_ http.Header
10160 }
10161
10162 // Delete: Deletes the specified Attribute definition. Fails if the Attribute
10163 // definition is referenced by any User data mapping, or the latest revision of
10164 // any Consent.
10165 //
10166 // - name: The resource name of the Attribute definition to delete. To preserve
10167 // referential integrity, Attribute definitions referenced by a User data
10168 // mapping or the latest revision of a Consent cannot be deleted.
10169 func (r *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsService) Delete(name string) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsDeleteCall {
10170 c := &ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10171 c.name = name
10172 return c
10173 }
10174
10175 // Fields allows partial responses to be retrieved. See
10176 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10177 // details.
10178 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsDeleteCall {
10179 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10180 return c
10181 }
10182
10183 // Context sets the context to be used in this call's Do method.
10184 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsDeleteCall {
10185 c.ctx_ = ctx
10186 return c
10187 }
10188
10189 // Header returns a http.Header that can be modified by the caller to add
10190 // headers to the request.
10191 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsDeleteCall) Header() http.Header {
10192 if c.header_ == nil {
10193 c.header_ = make(http.Header)
10194 }
10195 return c.header_
10196 }
10197
10198 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsDeleteCall) doRequest(alt string) (*http.Response, error) {
10199 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10200 c.urlParams_.Set("alt", alt)
10201 c.urlParams_.Set("prettyPrint", "false")
10202 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
10203 urls += "?" + c.urlParams_.Encode()
10204 req, err := http.NewRequest("DELETE", urls, nil)
10205 if err != nil {
10206 return nil, err
10207 }
10208 req.Header = reqHeaders
10209 googleapi.Expand(req.URL, map[string]string{
10210 "name": c.name,
10211 })
10212 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.delete", "request", internallog.HTTPRequest(req, nil))
10213 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10214 }
10215
10216 // Do executes the "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.delete" call.
10217 // Any non-2xx status code is an error. Response headers are in either
10218 // *Empty.ServerResponse.Header or (if a response was returned at all) in
10219 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10220 // whether the returned error was because http.StatusNotModified was returned.
10221 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
10222 gensupport.SetOptions(c.urlParams_, opts...)
10223 res, err := c.doRequest("json")
10224 if res != nil && res.StatusCode == http.StatusNotModified {
10225 if res.Body != nil {
10226 res.Body.Close()
10227 }
10228 return nil, gensupport.WrapError(&googleapi.Error{
10229 Code: res.StatusCode,
10230 Header: res.Header,
10231 })
10232 }
10233 if err != nil {
10234 return nil, err
10235 }
10236 defer googleapi.CloseBody(res)
10237 if err := googleapi.CheckResponse(res); err != nil {
10238 return nil, gensupport.WrapError(err)
10239 }
10240 ret := &Empty{
10241 ServerResponse: googleapi.ServerResponse{
10242 Header: res.Header,
10243 HTTPStatusCode: res.StatusCode,
10244 },
10245 }
10246 target := &ret
10247 b, err := gensupport.DecodeResponseBytes(target, res)
10248 if err != nil {
10249 return nil, err
10250 }
10251 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.delete", "response", internallog.HTTPResponse(res, b))
10252 return ret, nil
10253 }
10254
10255 type ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsGetCall struct {
10256 s *Service
10257 name string
10258 urlParams_ gensupport.URLParams
10259 ifNoneMatch_ string
10260 ctx_ context.Context
10261 header_ http.Header
10262 }
10263
10264 // Get: Gets the specified Attribute definition.
10265 //
10266 // - name: The resource name of the Attribute definition to get.
10267 func (r *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsService) Get(name string) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsGetCall {
10268 c := &ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10269 c.name = name
10270 return c
10271 }
10272
10273 // Fields allows partial responses to be retrieved. See
10274 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10275 // details.
10276 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsGetCall {
10277 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10278 return c
10279 }
10280
10281 // IfNoneMatch sets an optional parameter which makes the operation fail if the
10282 // object's ETag matches the given value. This is useful for getting updates
10283 // only after the object has changed since the last request.
10284 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsGetCall {
10285 c.ifNoneMatch_ = entityTag
10286 return c
10287 }
10288
10289 // Context sets the context to be used in this call's Do method.
10290 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsGetCall {
10291 c.ctx_ = ctx
10292 return c
10293 }
10294
10295 // Header returns a http.Header that can be modified by the caller to add
10296 // headers to the request.
10297 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsGetCall) Header() http.Header {
10298 if c.header_ == nil {
10299 c.header_ = make(http.Header)
10300 }
10301 return c.header_
10302 }
10303
10304 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsGetCall) doRequest(alt string) (*http.Response, error) {
10305 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10306 if c.ifNoneMatch_ != "" {
10307 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10308 }
10309 c.urlParams_.Set("alt", alt)
10310 c.urlParams_.Set("prettyPrint", "false")
10311 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
10312 urls += "?" + c.urlParams_.Encode()
10313 req, err := http.NewRequest("GET", urls, nil)
10314 if err != nil {
10315 return nil, err
10316 }
10317 req.Header = reqHeaders
10318 googleapi.Expand(req.URL, map[string]string{
10319 "name": c.name,
10320 })
10321 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.get", "request", internallog.HTTPRequest(req, nil))
10322 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10323 }
10324
10325 // Do executes the "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.get" call.
10326 // Any non-2xx status code is an error. Response headers are in either
10327 // *AttributeDefinition.ServerResponse.Header or (if a response was returned at
10328 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10329 // check whether the returned error was because http.StatusNotModified was
10330 // returned.
10331 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsGetCall) Do(opts ...googleapi.CallOption) (*AttributeDefinition, error) {
10332 gensupport.SetOptions(c.urlParams_, opts...)
10333 res, err := c.doRequest("json")
10334 if res != nil && res.StatusCode == http.StatusNotModified {
10335 if res.Body != nil {
10336 res.Body.Close()
10337 }
10338 return nil, gensupport.WrapError(&googleapi.Error{
10339 Code: res.StatusCode,
10340 Header: res.Header,
10341 })
10342 }
10343 if err != nil {
10344 return nil, err
10345 }
10346 defer googleapi.CloseBody(res)
10347 if err := googleapi.CheckResponse(res); err != nil {
10348 return nil, gensupport.WrapError(err)
10349 }
10350 ret := &AttributeDefinition{
10351 ServerResponse: googleapi.ServerResponse{
10352 Header: res.Header,
10353 HTTPStatusCode: res.StatusCode,
10354 },
10355 }
10356 target := &ret
10357 b, err := gensupport.DecodeResponseBytes(target, res)
10358 if err != nil {
10359 return nil, err
10360 }
10361 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.get", "response", internallog.HTTPResponse(res, b))
10362 return ret, nil
10363 }
10364
10365 type ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall struct {
10366 s *Service
10367 parent string
10368 urlParams_ gensupport.URLParams
10369 ifNoneMatch_ string
10370 ctx_ context.Context
10371 header_ http.Header
10372 }
10373
10374 // List: Lists the Attribute definitions in the specified consent store.
10375 //
10376 // - parent: Name of the consent store to retrieve Attribute definitions from.
10377 func (r *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsService) List(parent string) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall {
10378 c := &ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10379 c.parent = parent
10380 return c
10381 }
10382
10383 // Filter sets the optional parameter "filter": Restricts the attributes
10384 // returned to those matching a filter. The following syntax is available: * A
10385 // string field value can be written as text inside quotation marks, for
10386 // example "query text". The only valid relational operation for text fields
10387 // is equality (`=`), where text is searched within the field, rather than
10388 // having the field be equal to the text. For example, "Comment = great"
10389 // returns messages with `great` in the comment field. * A number field value
10390 // can be written as an integer, a decimal, or an exponential. The valid
10391 // relational operators for number fields are the equality operator (`=`),
10392 // along with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note
10393 // that there is no inequality (`!=`) operator. You can prepend the `NOT`
10394 // operator to an expression to negate it. * A date field value must be written
10395 // in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format.
10396 // Leading zeros are required for one-digit months and days. The valid
10397 // relational operators for date fields are the equality operator (`=`) , along
10398 // with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that
10399 // there is no inequality (`!=`) operator. You can prepend the `NOT` operator
10400 // to an expression to negate it. * Multiple field query expressions can be
10401 // combined in one query by adding `AND` or `OR` operators between the
10402 // expressions. If a boolean operator appears within a quoted string, it is not
10403 // treated as special, it's just another part of the character string to be
10404 // matched. You can prepend the `NOT` operator to an expression to negate it.
10405 // The only field available for filtering is `category`. For example,
10406 // `filter=category=\"REQUEST\".
10407 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall) Filter(filter string) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall {
10408 c.urlParams_.Set("filter", filter)
10409 return c
10410 }
10411
10412 // PageSize sets the optional parameter "pageSize": Limit on the number of
10413 // Attribute definitions to return in a single response. If not specified, 100
10414 // is used. May not be larger than 1000.
10415 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall {
10416 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
10417 return c
10418 }
10419
10420 // PageToken sets the optional parameter "pageToken": Token to retrieve the
10421 // next page of results or empty to get the first page.
10422 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall {
10423 c.urlParams_.Set("pageToken", pageToken)
10424 return c
10425 }
10426
10427 // Fields allows partial responses to be retrieved. See
10428 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10429 // details.
10430 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall {
10431 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10432 return c
10433 }
10434
10435 // IfNoneMatch sets an optional parameter which makes the operation fail if the
10436 // object's ETag matches the given value. This is useful for getting updates
10437 // only after the object has changed since the last request.
10438 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall {
10439 c.ifNoneMatch_ = entityTag
10440 return c
10441 }
10442
10443 // Context sets the context to be used in this call's Do method.
10444 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall {
10445 c.ctx_ = ctx
10446 return c
10447 }
10448
10449 // Header returns a http.Header that can be modified by the caller to add
10450 // headers to the request.
10451 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall) Header() http.Header {
10452 if c.header_ == nil {
10453 c.header_ = make(http.Header)
10454 }
10455 return c.header_
10456 }
10457
10458 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall) doRequest(alt string) (*http.Response, error) {
10459 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10460 if c.ifNoneMatch_ != "" {
10461 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10462 }
10463 c.urlParams_.Set("alt", alt)
10464 c.urlParams_.Set("prettyPrint", "false")
10465 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/attributeDefinitions")
10466 urls += "?" + c.urlParams_.Encode()
10467 req, err := http.NewRequest("GET", urls, nil)
10468 if err != nil {
10469 return nil, err
10470 }
10471 req.Header = reqHeaders
10472 googleapi.Expand(req.URL, map[string]string{
10473 "parent": c.parent,
10474 })
10475 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.list", "request", internallog.HTTPRequest(req, nil))
10476 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10477 }
10478
10479 // Do executes the "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.list" call.
10480 // Any non-2xx status code is an error. Response headers are in either
10481 // *ListAttributeDefinitionsResponse.ServerResponse.Header or (if a response
10482 // was returned at all) in error.(*googleapi.Error).Header. Use
10483 // googleapi.IsNotModified to check whether the returned error was because
10484 // http.StatusNotModified was returned.
10485 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall) Do(opts ...googleapi.CallOption) (*ListAttributeDefinitionsResponse, error) {
10486 gensupport.SetOptions(c.urlParams_, opts...)
10487 res, err := c.doRequest("json")
10488 if res != nil && res.StatusCode == http.StatusNotModified {
10489 if res.Body != nil {
10490 res.Body.Close()
10491 }
10492 return nil, gensupport.WrapError(&googleapi.Error{
10493 Code: res.StatusCode,
10494 Header: res.Header,
10495 })
10496 }
10497 if err != nil {
10498 return nil, err
10499 }
10500 defer googleapi.CloseBody(res)
10501 if err := googleapi.CheckResponse(res); err != nil {
10502 return nil, gensupport.WrapError(err)
10503 }
10504 ret := &ListAttributeDefinitionsResponse{
10505 ServerResponse: googleapi.ServerResponse{
10506 Header: res.Header,
10507 HTTPStatusCode: res.StatusCode,
10508 },
10509 }
10510 target := &ret
10511 b, err := gensupport.DecodeResponseBytes(target, res)
10512 if err != nil {
10513 return nil, err
10514 }
10515 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.list", "response", internallog.HTTPResponse(res, b))
10516 return ret, nil
10517 }
10518
10519 // Pages invokes f for each page of results.
10520 // A non-nil error returned from f will halt the iteration.
10521 // The provided context supersedes any context provided to the Context method.
10522 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsListCall) Pages(ctx context.Context, f func(*ListAttributeDefinitionsResponse) error) error {
10523 c.ctx_ = ctx
10524 defer c.PageToken(c.urlParams_.Get("pageToken"))
10525 for {
10526 x, err := c.Do()
10527 if err != nil {
10528 return err
10529 }
10530 if err := f(x); err != nil {
10531 return err
10532 }
10533 if x.NextPageToken == "" {
10534 return nil
10535 }
10536 c.PageToken(x.NextPageToken)
10537 }
10538 }
10539
10540 type ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsPatchCall struct {
10541 s *Service
10542 name string
10543 attributedefinition *AttributeDefinition
10544 urlParams_ gensupport.URLParams
10545 ctx_ context.Context
10546 header_ http.Header
10547 }
10548
10549 // Patch: Updates the specified Attribute definition.
10550 //
10551 // - name: Identifier. Resource name of the Attribute definition, of the form
10552 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consen
10553 // tStores/{consent_store_id}/attributeDefinitions/{attribute_definition_id}`.
10554 // Cannot be changed after creation.
10555 func (r *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsService) Patch(name string, attributedefinition *AttributeDefinition) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsPatchCall {
10556 c := &ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10557 c.name = name
10558 c.attributedefinition = attributedefinition
10559 return c
10560 }
10561
10562 // UpdateMask sets the optional parameter "updateMask": Required. The update
10563 // mask that applies to the resource. For the `FieldMask` definition, see
10564 // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
10565 // Only the `description`, `allowed_values`, `consent_default_values` and
10566 // `data_mapping_default_value` fields can be updated. The updated
10567 // `allowed_values` must contain all values from the previous `allowed_values`.
10568 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsPatchCall {
10569 c.urlParams_.Set("updateMask", updateMask)
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 *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsPatchCall {
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 *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsPatchCall {
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 *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsPatchCall) Header() http.Header {
10590 if c.header_ == nil {
10591 c.header_ = make(http.Header)
10592 }
10593 return c.header_
10594 }
10595
10596 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsPatchCall) doRequest(alt string) (*http.Response, error) {
10597 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10598 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.attributedefinition)
10599 if err != nil {
10600 return nil, err
10601 }
10602 c.urlParams_.Set("alt", alt)
10603 c.urlParams_.Set("prettyPrint", "false")
10604 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
10605 urls += "?" + c.urlParams_.Encode()
10606 req, err := http.NewRequest("PATCH", urls, body)
10607 if err != nil {
10608 return nil, err
10609 }
10610 req.Header = reqHeaders
10611 googleapi.Expand(req.URL, map[string]string{
10612 "name": c.name,
10613 })
10614 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
10615 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10616 }
10617
10618 // Do executes the "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.patch" call.
10619 // Any non-2xx status code is an error. Response headers are in either
10620 // *AttributeDefinition.ServerResponse.Header or (if a response was returned at
10621 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10622 // check whether the returned error was because http.StatusNotModified was
10623 // returned.
10624 func (c *ProjectsLocationsDatasetsConsentStoresAttributeDefinitionsPatchCall) Do(opts ...googleapi.CallOption) (*AttributeDefinition, error) {
10625 gensupport.SetOptions(c.urlParams_, opts...)
10626 res, err := c.doRequest("json")
10627 if res != nil && res.StatusCode == http.StatusNotModified {
10628 if res.Body != nil {
10629 res.Body.Close()
10630 }
10631 return nil, gensupport.WrapError(&googleapi.Error{
10632 Code: res.StatusCode,
10633 Header: res.Header,
10634 })
10635 }
10636 if err != nil {
10637 return nil, err
10638 }
10639 defer googleapi.CloseBody(res)
10640 if err := googleapi.CheckResponse(res); err != nil {
10641 return nil, gensupport.WrapError(err)
10642 }
10643 ret := &AttributeDefinition{
10644 ServerResponse: googleapi.ServerResponse{
10645 Header: res.Header,
10646 HTTPStatusCode: res.StatusCode,
10647 },
10648 }
10649 target := &ret
10650 b, err := gensupport.DecodeResponseBytes(target, res)
10651 if err != nil {
10652 return nil, err
10653 }
10654 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.attributeDefinitions.patch", "response", internallog.HTTPResponse(res, b))
10655 return ret, nil
10656 }
10657
10658 type ProjectsLocationsDatasetsConsentStoresConsentArtifactsCreateCall struct {
10659 s *Service
10660 parent string
10661 consentartifact *ConsentArtifact
10662 urlParams_ gensupport.URLParams
10663 ctx_ context.Context
10664 header_ http.Header
10665 }
10666
10667 // Create: Creates a new Consent artifact in the parent consent store.
10668 //
10669 // - parent: The name of the consent store this Consent artifact belongs to.
10670 func (r *ProjectsLocationsDatasetsConsentStoresConsentArtifactsService) Create(parent string, consentartifact *ConsentArtifact) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsCreateCall {
10671 c := &ProjectsLocationsDatasetsConsentStoresConsentArtifactsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10672 c.parent = parent
10673 c.consentartifact = consentartifact
10674 return c
10675 }
10676
10677 // Fields allows partial responses to be retrieved. See
10678 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10679 // details.
10680 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsCreateCall {
10681 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10682 return c
10683 }
10684
10685 // Context sets the context to be used in this call's Do method.
10686 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsCreateCall {
10687 c.ctx_ = ctx
10688 return c
10689 }
10690
10691 // Header returns a http.Header that can be modified by the caller to add
10692 // headers to the request.
10693 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsCreateCall) Header() http.Header {
10694 if c.header_ == nil {
10695 c.header_ = make(http.Header)
10696 }
10697 return c.header_
10698 }
10699
10700 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsCreateCall) doRequest(alt string) (*http.Response, error) {
10701 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10702 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.consentartifact)
10703 if err != nil {
10704 return nil, err
10705 }
10706 c.urlParams_.Set("alt", alt)
10707 c.urlParams_.Set("prettyPrint", "false")
10708 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/consentArtifacts")
10709 urls += "?" + c.urlParams_.Encode()
10710 req, err := http.NewRequest("POST", urls, body)
10711 if err != nil {
10712 return nil, err
10713 }
10714 req.Header = reqHeaders
10715 googleapi.Expand(req.URL, map[string]string{
10716 "parent": c.parent,
10717 })
10718 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consentArtifacts.create", "request", internallog.HTTPRequest(req, body.Bytes()))
10719 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10720 }
10721
10722 // Do executes the "healthcare.projects.locations.datasets.consentStores.consentArtifacts.create" call.
10723 // Any non-2xx status code is an error. Response headers are in either
10724 // *ConsentArtifact.ServerResponse.Header or (if a response was returned at
10725 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10726 // check whether the returned error was because http.StatusNotModified was
10727 // returned.
10728 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsCreateCall) Do(opts ...googleapi.CallOption) (*ConsentArtifact, error) {
10729 gensupport.SetOptions(c.urlParams_, opts...)
10730 res, err := c.doRequest("json")
10731 if res != nil && res.StatusCode == http.StatusNotModified {
10732 if res.Body != nil {
10733 res.Body.Close()
10734 }
10735 return nil, gensupport.WrapError(&googleapi.Error{
10736 Code: res.StatusCode,
10737 Header: res.Header,
10738 })
10739 }
10740 if err != nil {
10741 return nil, err
10742 }
10743 defer googleapi.CloseBody(res)
10744 if err := googleapi.CheckResponse(res); err != nil {
10745 return nil, gensupport.WrapError(err)
10746 }
10747 ret := &ConsentArtifact{
10748 ServerResponse: googleapi.ServerResponse{
10749 Header: res.Header,
10750 HTTPStatusCode: res.StatusCode,
10751 },
10752 }
10753 target := &ret
10754 b, err := gensupport.DecodeResponseBytes(target, res)
10755 if err != nil {
10756 return nil, err
10757 }
10758 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consentArtifacts.create", "response", internallog.HTTPResponse(res, b))
10759 return ret, nil
10760 }
10761
10762 type ProjectsLocationsDatasetsConsentStoresConsentArtifactsDeleteCall struct {
10763 s *Service
10764 name string
10765 urlParams_ gensupport.URLParams
10766 ctx_ context.Context
10767 header_ http.Header
10768 }
10769
10770 // Delete: Deletes the specified Consent artifact. Fails if the artifact is
10771 // referenced by the latest revision of any Consent.
10772 //
10773 // - name: The resource name of the Consent artifact to delete. To preserve
10774 // referential integrity, Consent artifacts referenced by the latest revision
10775 // of a Consent cannot be deleted.
10776 func (r *ProjectsLocationsDatasetsConsentStoresConsentArtifactsService) Delete(name string) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsDeleteCall {
10777 c := &ProjectsLocationsDatasetsConsentStoresConsentArtifactsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10778 c.name = name
10779 return c
10780 }
10781
10782 // Fields allows partial responses to be retrieved. See
10783 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10784 // details.
10785 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsDeleteCall {
10786 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10787 return c
10788 }
10789
10790 // Context sets the context to be used in this call's Do method.
10791 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsDeleteCall {
10792 c.ctx_ = ctx
10793 return c
10794 }
10795
10796 // Header returns a http.Header that can be modified by the caller to add
10797 // headers to the request.
10798 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsDeleteCall) Header() http.Header {
10799 if c.header_ == nil {
10800 c.header_ = make(http.Header)
10801 }
10802 return c.header_
10803 }
10804
10805 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsDeleteCall) doRequest(alt string) (*http.Response, error) {
10806 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10807 c.urlParams_.Set("alt", alt)
10808 c.urlParams_.Set("prettyPrint", "false")
10809 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
10810 urls += "?" + c.urlParams_.Encode()
10811 req, err := http.NewRequest("DELETE", urls, nil)
10812 if err != nil {
10813 return nil, err
10814 }
10815 req.Header = reqHeaders
10816 googleapi.Expand(req.URL, map[string]string{
10817 "name": c.name,
10818 })
10819 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consentArtifacts.delete", "request", internallog.HTTPRequest(req, nil))
10820 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10821 }
10822
10823 // Do executes the "healthcare.projects.locations.datasets.consentStores.consentArtifacts.delete" call.
10824 // Any non-2xx status code is an error. Response headers are in either
10825 // *Empty.ServerResponse.Header or (if a response was returned at all) in
10826 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10827 // whether the returned error was because http.StatusNotModified was returned.
10828 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
10829 gensupport.SetOptions(c.urlParams_, opts...)
10830 res, err := c.doRequest("json")
10831 if res != nil && res.StatusCode == http.StatusNotModified {
10832 if res.Body != nil {
10833 res.Body.Close()
10834 }
10835 return nil, gensupport.WrapError(&googleapi.Error{
10836 Code: res.StatusCode,
10837 Header: res.Header,
10838 })
10839 }
10840 if err != nil {
10841 return nil, err
10842 }
10843 defer googleapi.CloseBody(res)
10844 if err := googleapi.CheckResponse(res); err != nil {
10845 return nil, gensupport.WrapError(err)
10846 }
10847 ret := &Empty{
10848 ServerResponse: googleapi.ServerResponse{
10849 Header: res.Header,
10850 HTTPStatusCode: res.StatusCode,
10851 },
10852 }
10853 target := &ret
10854 b, err := gensupport.DecodeResponseBytes(target, res)
10855 if err != nil {
10856 return nil, err
10857 }
10858 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consentArtifacts.delete", "response", internallog.HTTPResponse(res, b))
10859 return ret, nil
10860 }
10861
10862 type ProjectsLocationsDatasetsConsentStoresConsentArtifactsGetCall struct {
10863 s *Service
10864 name string
10865 urlParams_ gensupport.URLParams
10866 ifNoneMatch_ string
10867 ctx_ context.Context
10868 header_ http.Header
10869 }
10870
10871 // Get: Gets the specified Consent artifact.
10872 //
10873 // - name: The resource name of the Consent artifact to retrieve.
10874 func (r *ProjectsLocationsDatasetsConsentStoresConsentArtifactsService) Get(name string) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsGetCall {
10875 c := &ProjectsLocationsDatasetsConsentStoresConsentArtifactsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10876 c.name = name
10877 return c
10878 }
10879
10880 // Fields allows partial responses to be retrieved. See
10881 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10882 // details.
10883 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsGetCall {
10884 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10885 return c
10886 }
10887
10888 // IfNoneMatch sets an optional parameter which makes the operation fail if the
10889 // object's ETag matches the given value. This is useful for getting updates
10890 // only after the object has changed since the last request.
10891 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsGetCall {
10892 c.ifNoneMatch_ = entityTag
10893 return c
10894 }
10895
10896 // Context sets the context to be used in this call's Do method.
10897 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsGetCall {
10898 c.ctx_ = ctx
10899 return c
10900 }
10901
10902 // Header returns a http.Header that can be modified by the caller to add
10903 // headers to the request.
10904 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsGetCall) Header() http.Header {
10905 if c.header_ == nil {
10906 c.header_ = make(http.Header)
10907 }
10908 return c.header_
10909 }
10910
10911 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsGetCall) doRequest(alt string) (*http.Response, error) {
10912 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10913 if c.ifNoneMatch_ != "" {
10914 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10915 }
10916 c.urlParams_.Set("alt", alt)
10917 c.urlParams_.Set("prettyPrint", "false")
10918 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
10919 urls += "?" + c.urlParams_.Encode()
10920 req, err := http.NewRequest("GET", urls, nil)
10921 if err != nil {
10922 return nil, err
10923 }
10924 req.Header = reqHeaders
10925 googleapi.Expand(req.URL, map[string]string{
10926 "name": c.name,
10927 })
10928 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consentArtifacts.get", "request", internallog.HTTPRequest(req, nil))
10929 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10930 }
10931
10932 // Do executes the "healthcare.projects.locations.datasets.consentStores.consentArtifacts.get" call.
10933 // Any non-2xx status code is an error. Response headers are in either
10934 // *ConsentArtifact.ServerResponse.Header or (if a response was returned at
10935 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10936 // check whether the returned error was because http.StatusNotModified was
10937 // returned.
10938 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsGetCall) Do(opts ...googleapi.CallOption) (*ConsentArtifact, error) {
10939 gensupport.SetOptions(c.urlParams_, opts...)
10940 res, err := c.doRequest("json")
10941 if res != nil && res.StatusCode == http.StatusNotModified {
10942 if res.Body != nil {
10943 res.Body.Close()
10944 }
10945 return nil, gensupport.WrapError(&googleapi.Error{
10946 Code: res.StatusCode,
10947 Header: res.Header,
10948 })
10949 }
10950 if err != nil {
10951 return nil, err
10952 }
10953 defer googleapi.CloseBody(res)
10954 if err := googleapi.CheckResponse(res); err != nil {
10955 return nil, gensupport.WrapError(err)
10956 }
10957 ret := &ConsentArtifact{
10958 ServerResponse: googleapi.ServerResponse{
10959 Header: res.Header,
10960 HTTPStatusCode: res.StatusCode,
10961 },
10962 }
10963 target := &ret
10964 b, err := gensupport.DecodeResponseBytes(target, res)
10965 if err != nil {
10966 return nil, err
10967 }
10968 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consentArtifacts.get", "response", internallog.HTTPResponse(res, b))
10969 return ret, nil
10970 }
10971
10972 type ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall struct {
10973 s *Service
10974 parent string
10975 urlParams_ gensupport.URLParams
10976 ifNoneMatch_ string
10977 ctx_ context.Context
10978 header_ http.Header
10979 }
10980
10981 // List: Lists the Consent artifacts in the specified consent store.
10982 //
10983 // - parent: Name of the consent store to retrieve consent artifacts from.
10984 func (r *ProjectsLocationsDatasetsConsentStoresConsentArtifactsService) List(parent string) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall {
10985 c := &ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10986 c.parent = parent
10987 return c
10988 }
10989
10990 // Filter sets the optional parameter "filter": Restricts the artifacts
10991 // returned to those matching a filter. The following syntax is available: * A
10992 // string field value can be written as text inside quotation marks, for
10993 // example "query text". The only valid relational operation for text fields
10994 // is equality (`=`), where text is searched within the field, rather than
10995 // having the field be equal to the text. For example, "Comment = great"
10996 // returns messages with `great` in the comment field. * A number field value
10997 // can be written as an integer, a decimal, or an exponential. The valid
10998 // relational operators for number fields are the equality operator (`=`),
10999 // along with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note
11000 // that there is no inequality (`!=`) operator. You can prepend the `NOT`
11001 // operator to an expression to negate it. * A date field value must be written
11002 // in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format.
11003 // Leading zeros are required for one-digit months and days. The valid
11004 // relational operators for date fields are the equality operator (`=`) , along
11005 // with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that
11006 // there is no inequality (`!=`) operator. You can prepend the `NOT` operator
11007 // to an expression to negate it. * Multiple field query expressions can be
11008 // combined in one query by adding `AND` or `OR` operators between the
11009 // expressions. If a boolean operator appears within a quoted string, it is not
11010 // treated as special, it's just another part of the character string to be
11011 // matched. You can prepend the `NOT` operator to an expression to negate it.
11012 // The fields available for filtering are: - user_id. For example,
11013 // `filter=user_id=\"user123\". - consent_content_version - metadata. For
11014 // example, `filter=Metadata(\"testkey\")=\"value\" or
11015 // `filter=HasMetadata(\"testkey\")`.
11016 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall) Filter(filter string) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall {
11017 c.urlParams_.Set("filter", filter)
11018 return c
11019 }
11020
11021 // PageSize sets the optional parameter "pageSize": Limit on the number of
11022 // consent artifacts to return in a single response. If not specified, 100 is
11023 // used. May not be larger than 1000.
11024 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall {
11025 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
11026 return c
11027 }
11028
11029 // PageToken sets the optional parameter "pageToken": The next_page_token value
11030 // returned from the previous List request, if any.
11031 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall {
11032 c.urlParams_.Set("pageToken", pageToken)
11033 return c
11034 }
11035
11036 // Fields allows partial responses to be retrieved. See
11037 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11038 // details.
11039 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall {
11040 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11041 return c
11042 }
11043
11044 // IfNoneMatch sets an optional parameter which makes the operation fail if the
11045 // object's ETag matches the given value. This is useful for getting updates
11046 // only after the object has changed since the last request.
11047 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall {
11048 c.ifNoneMatch_ = entityTag
11049 return c
11050 }
11051
11052 // Context sets the context to be used in this call's Do method.
11053 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall {
11054 c.ctx_ = ctx
11055 return c
11056 }
11057
11058 // Header returns a http.Header that can be modified by the caller to add
11059 // headers to the request.
11060 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall) Header() http.Header {
11061 if c.header_ == nil {
11062 c.header_ = make(http.Header)
11063 }
11064 return c.header_
11065 }
11066
11067 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall) doRequest(alt string) (*http.Response, error) {
11068 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11069 if c.ifNoneMatch_ != "" {
11070 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11071 }
11072 c.urlParams_.Set("alt", alt)
11073 c.urlParams_.Set("prettyPrint", "false")
11074 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/consentArtifacts")
11075 urls += "?" + c.urlParams_.Encode()
11076 req, err := http.NewRequest("GET", urls, nil)
11077 if err != nil {
11078 return nil, err
11079 }
11080 req.Header = reqHeaders
11081 googleapi.Expand(req.URL, map[string]string{
11082 "parent": c.parent,
11083 })
11084 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consentArtifacts.list", "request", internallog.HTTPRequest(req, nil))
11085 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11086 }
11087
11088 // Do executes the "healthcare.projects.locations.datasets.consentStores.consentArtifacts.list" call.
11089 // Any non-2xx status code is an error. Response headers are in either
11090 // *ListConsentArtifactsResponse.ServerResponse.Header or (if a response was
11091 // returned at all) in error.(*googleapi.Error).Header. Use
11092 // googleapi.IsNotModified to check whether the returned error was because
11093 // http.StatusNotModified was returned.
11094 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall) Do(opts ...googleapi.CallOption) (*ListConsentArtifactsResponse, error) {
11095 gensupport.SetOptions(c.urlParams_, opts...)
11096 res, err := c.doRequest("json")
11097 if res != nil && res.StatusCode == http.StatusNotModified {
11098 if res.Body != nil {
11099 res.Body.Close()
11100 }
11101 return nil, gensupport.WrapError(&googleapi.Error{
11102 Code: res.StatusCode,
11103 Header: res.Header,
11104 })
11105 }
11106 if err != nil {
11107 return nil, err
11108 }
11109 defer googleapi.CloseBody(res)
11110 if err := googleapi.CheckResponse(res); err != nil {
11111 return nil, gensupport.WrapError(err)
11112 }
11113 ret := &ListConsentArtifactsResponse{
11114 ServerResponse: googleapi.ServerResponse{
11115 Header: res.Header,
11116 HTTPStatusCode: res.StatusCode,
11117 },
11118 }
11119 target := &ret
11120 b, err := gensupport.DecodeResponseBytes(target, res)
11121 if err != nil {
11122 return nil, err
11123 }
11124 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consentArtifacts.list", "response", internallog.HTTPResponse(res, b))
11125 return ret, nil
11126 }
11127
11128 // Pages invokes f for each page of results.
11129 // A non-nil error returned from f will halt the iteration.
11130 // The provided context supersedes any context provided to the Context method.
11131 func (c *ProjectsLocationsDatasetsConsentStoresConsentArtifactsListCall) Pages(ctx context.Context, f func(*ListConsentArtifactsResponse) error) error {
11132 c.ctx_ = ctx
11133 defer c.PageToken(c.urlParams_.Get("pageToken"))
11134 for {
11135 x, err := c.Do()
11136 if err != nil {
11137 return err
11138 }
11139 if err := f(x); err != nil {
11140 return err
11141 }
11142 if x.NextPageToken == "" {
11143 return nil
11144 }
11145 c.PageToken(x.NextPageToken)
11146 }
11147 }
11148
11149 type ProjectsLocationsDatasetsConsentStoresConsentsActivateCall struct {
11150 s *Service
11151 name string
11152 activateconsentrequest *ActivateConsentRequest
11153 urlParams_ gensupport.URLParams
11154 ctx_ context.Context
11155 header_ http.Header
11156 }
11157
11158 // Activate: Activates the latest revision of the specified Consent by
11159 // committing a new revision with `state` updated to `ACTIVE`. If the latest
11160 // revision of the specified Consent is in the `ACTIVE` state, no new revision
11161 // is committed. A FAILED_PRECONDITION error occurs if the latest revision of
11162 // the specified consent is in the `REJECTED` or `REVOKED` state.
11163 //
11164 // - name: The resource name of the Consent to activate, of the form
11165 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consen
11166 // tStores/{consent_store_id}/consents/{consent_id}`. An INVALID_ARGUMENT
11167 // error occurs if `revision_id` is specified in the name.
11168 func (r *ProjectsLocationsDatasetsConsentStoresConsentsService) Activate(name string, activateconsentrequest *ActivateConsentRequest) *ProjectsLocationsDatasetsConsentStoresConsentsActivateCall {
11169 c := &ProjectsLocationsDatasetsConsentStoresConsentsActivateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11170 c.name = name
11171 c.activateconsentrequest = activateconsentrequest
11172 return c
11173 }
11174
11175 // Fields allows partial responses to be retrieved. See
11176 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11177 // details.
11178 func (c *ProjectsLocationsDatasetsConsentStoresConsentsActivateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentsActivateCall {
11179 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11180 return c
11181 }
11182
11183 // Context sets the context to be used in this call's Do method.
11184 func (c *ProjectsLocationsDatasetsConsentStoresConsentsActivateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentsActivateCall {
11185 c.ctx_ = ctx
11186 return c
11187 }
11188
11189 // Header returns a http.Header that can be modified by the caller to add
11190 // headers to the request.
11191 func (c *ProjectsLocationsDatasetsConsentStoresConsentsActivateCall) Header() http.Header {
11192 if c.header_ == nil {
11193 c.header_ = make(http.Header)
11194 }
11195 return c.header_
11196 }
11197
11198 func (c *ProjectsLocationsDatasetsConsentStoresConsentsActivateCall) doRequest(alt string) (*http.Response, error) {
11199 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11200 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.activateconsentrequest)
11201 if err != nil {
11202 return nil, err
11203 }
11204 c.urlParams_.Set("alt", alt)
11205 c.urlParams_.Set("prettyPrint", "false")
11206 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:activate")
11207 urls += "?" + c.urlParams_.Encode()
11208 req, err := http.NewRequest("POST", urls, body)
11209 if err != nil {
11210 return nil, err
11211 }
11212 req.Header = reqHeaders
11213 googleapi.Expand(req.URL, map[string]string{
11214 "name": c.name,
11215 })
11216 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.activate", "request", internallog.HTTPRequest(req, body.Bytes()))
11217 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11218 }
11219
11220 // Do executes the "healthcare.projects.locations.datasets.consentStores.consents.activate" call.
11221 // Any non-2xx status code is an error. Response headers are in either
11222 // *Consent.ServerResponse.Header or (if a response was returned at all) in
11223 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11224 // whether the returned error was because http.StatusNotModified was returned.
11225 func (c *ProjectsLocationsDatasetsConsentStoresConsentsActivateCall) Do(opts ...googleapi.CallOption) (*Consent, error) {
11226 gensupport.SetOptions(c.urlParams_, opts...)
11227 res, err := c.doRequest("json")
11228 if res != nil && res.StatusCode == http.StatusNotModified {
11229 if res.Body != nil {
11230 res.Body.Close()
11231 }
11232 return nil, gensupport.WrapError(&googleapi.Error{
11233 Code: res.StatusCode,
11234 Header: res.Header,
11235 })
11236 }
11237 if err != nil {
11238 return nil, err
11239 }
11240 defer googleapi.CloseBody(res)
11241 if err := googleapi.CheckResponse(res); err != nil {
11242 return nil, gensupport.WrapError(err)
11243 }
11244 ret := &Consent{
11245 ServerResponse: googleapi.ServerResponse{
11246 Header: res.Header,
11247 HTTPStatusCode: res.StatusCode,
11248 },
11249 }
11250 target := &ret
11251 b, err := gensupport.DecodeResponseBytes(target, res)
11252 if err != nil {
11253 return nil, err
11254 }
11255 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.activate", "response", internallog.HTTPResponse(res, b))
11256 return ret, nil
11257 }
11258
11259 type ProjectsLocationsDatasetsConsentStoresConsentsCreateCall struct {
11260 s *Service
11261 parent string
11262 consent *Consent
11263 urlParams_ gensupport.URLParams
11264 ctx_ context.Context
11265 header_ http.Header
11266 }
11267
11268 // Create: Creates a new Consent in the parent consent store.
11269 //
11270 // - parent: Name of the consent store.
11271 func (r *ProjectsLocationsDatasetsConsentStoresConsentsService) Create(parent string, consent *Consent) *ProjectsLocationsDatasetsConsentStoresConsentsCreateCall {
11272 c := &ProjectsLocationsDatasetsConsentStoresConsentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11273 c.parent = parent
11274 c.consent = consent
11275 return c
11276 }
11277
11278 // Fields allows partial responses to be retrieved. See
11279 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11280 // details.
11281 func (c *ProjectsLocationsDatasetsConsentStoresConsentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentsCreateCall {
11282 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11283 return c
11284 }
11285
11286 // Context sets the context to be used in this call's Do method.
11287 func (c *ProjectsLocationsDatasetsConsentStoresConsentsCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentsCreateCall {
11288 c.ctx_ = ctx
11289 return c
11290 }
11291
11292 // Header returns a http.Header that can be modified by the caller to add
11293 // headers to the request.
11294 func (c *ProjectsLocationsDatasetsConsentStoresConsentsCreateCall) Header() http.Header {
11295 if c.header_ == nil {
11296 c.header_ = make(http.Header)
11297 }
11298 return c.header_
11299 }
11300
11301 func (c *ProjectsLocationsDatasetsConsentStoresConsentsCreateCall) doRequest(alt string) (*http.Response, error) {
11302 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11303 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.consent)
11304 if err != nil {
11305 return nil, err
11306 }
11307 c.urlParams_.Set("alt", alt)
11308 c.urlParams_.Set("prettyPrint", "false")
11309 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/consents")
11310 urls += "?" + c.urlParams_.Encode()
11311 req, err := http.NewRequest("POST", urls, body)
11312 if err != nil {
11313 return nil, err
11314 }
11315 req.Header = reqHeaders
11316 googleapi.Expand(req.URL, map[string]string{
11317 "parent": c.parent,
11318 })
11319 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.create", "request", internallog.HTTPRequest(req, body.Bytes()))
11320 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11321 }
11322
11323 // Do executes the "healthcare.projects.locations.datasets.consentStores.consents.create" call.
11324 // Any non-2xx status code is an error. Response headers are in either
11325 // *Consent.ServerResponse.Header or (if a response was returned at all) in
11326 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11327 // whether the returned error was because http.StatusNotModified was returned.
11328 func (c *ProjectsLocationsDatasetsConsentStoresConsentsCreateCall) Do(opts ...googleapi.CallOption) (*Consent, error) {
11329 gensupport.SetOptions(c.urlParams_, opts...)
11330 res, err := c.doRequest("json")
11331 if res != nil && res.StatusCode == http.StatusNotModified {
11332 if res.Body != nil {
11333 res.Body.Close()
11334 }
11335 return nil, gensupport.WrapError(&googleapi.Error{
11336 Code: res.StatusCode,
11337 Header: res.Header,
11338 })
11339 }
11340 if err != nil {
11341 return nil, err
11342 }
11343 defer googleapi.CloseBody(res)
11344 if err := googleapi.CheckResponse(res); err != nil {
11345 return nil, gensupport.WrapError(err)
11346 }
11347 ret := &Consent{
11348 ServerResponse: googleapi.ServerResponse{
11349 Header: res.Header,
11350 HTTPStatusCode: res.StatusCode,
11351 },
11352 }
11353 target := &ret
11354 b, err := gensupport.DecodeResponseBytes(target, res)
11355 if err != nil {
11356 return nil, err
11357 }
11358 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.create", "response", internallog.HTTPResponse(res, b))
11359 return ret, nil
11360 }
11361
11362 type ProjectsLocationsDatasetsConsentStoresConsentsDeleteCall struct {
11363 s *Service
11364 name string
11365 urlParams_ gensupport.URLParams
11366 ctx_ context.Context
11367 header_ http.Header
11368 }
11369
11370 // Delete: Deletes the Consent and its revisions. To keep a record of the
11371 // Consent but mark it inactive, see [RevokeConsent]. To delete a revision of a
11372 // Consent, see [DeleteConsentRevision]. This operation does not delete the
11373 // related Consent artifact.
11374 //
11375 // - name: The resource name of the Consent to delete, of the form
11376 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consen
11377 // tStores/{consent_store_id}/consents/{consent_id}`. An INVALID_ARGUMENT
11378 // error occurs if `revision_id` is specified in the name.
11379 func (r *ProjectsLocationsDatasetsConsentStoresConsentsService) Delete(name string) *ProjectsLocationsDatasetsConsentStoresConsentsDeleteCall {
11380 c := &ProjectsLocationsDatasetsConsentStoresConsentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11381 c.name = name
11382 return c
11383 }
11384
11385 // Fields allows partial responses to be retrieved. See
11386 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11387 // details.
11388 func (c *ProjectsLocationsDatasetsConsentStoresConsentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentsDeleteCall {
11389 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11390 return c
11391 }
11392
11393 // Context sets the context to be used in this call's Do method.
11394 func (c *ProjectsLocationsDatasetsConsentStoresConsentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentsDeleteCall {
11395 c.ctx_ = ctx
11396 return c
11397 }
11398
11399 // Header returns a http.Header that can be modified by the caller to add
11400 // headers to the request.
11401 func (c *ProjectsLocationsDatasetsConsentStoresConsentsDeleteCall) Header() http.Header {
11402 if c.header_ == nil {
11403 c.header_ = make(http.Header)
11404 }
11405 return c.header_
11406 }
11407
11408 func (c *ProjectsLocationsDatasetsConsentStoresConsentsDeleteCall) doRequest(alt string) (*http.Response, error) {
11409 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11410 c.urlParams_.Set("alt", alt)
11411 c.urlParams_.Set("prettyPrint", "false")
11412 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
11413 urls += "?" + c.urlParams_.Encode()
11414 req, err := http.NewRequest("DELETE", urls, nil)
11415 if err != nil {
11416 return nil, err
11417 }
11418 req.Header = reqHeaders
11419 googleapi.Expand(req.URL, map[string]string{
11420 "name": c.name,
11421 })
11422 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.delete", "request", internallog.HTTPRequest(req, nil))
11423 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11424 }
11425
11426 // Do executes the "healthcare.projects.locations.datasets.consentStores.consents.delete" call.
11427 // Any non-2xx status code is an error. Response headers are in either
11428 // *Empty.ServerResponse.Header or (if a response was returned at all) in
11429 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11430 // whether the returned error was because http.StatusNotModified was returned.
11431 func (c *ProjectsLocationsDatasetsConsentStoresConsentsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
11432 gensupport.SetOptions(c.urlParams_, opts...)
11433 res, err := c.doRequest("json")
11434 if res != nil && res.StatusCode == http.StatusNotModified {
11435 if res.Body != nil {
11436 res.Body.Close()
11437 }
11438 return nil, gensupport.WrapError(&googleapi.Error{
11439 Code: res.StatusCode,
11440 Header: res.Header,
11441 })
11442 }
11443 if err != nil {
11444 return nil, err
11445 }
11446 defer googleapi.CloseBody(res)
11447 if err := googleapi.CheckResponse(res); err != nil {
11448 return nil, gensupport.WrapError(err)
11449 }
11450 ret := &Empty{
11451 ServerResponse: googleapi.ServerResponse{
11452 Header: res.Header,
11453 HTTPStatusCode: res.StatusCode,
11454 },
11455 }
11456 target := &ret
11457 b, err := gensupport.DecodeResponseBytes(target, res)
11458 if err != nil {
11459 return nil, err
11460 }
11461 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.delete", "response", internallog.HTTPResponse(res, b))
11462 return ret, nil
11463 }
11464
11465 type ProjectsLocationsDatasetsConsentStoresConsentsDeleteRevisionCall struct {
11466 s *Service
11467 name string
11468 urlParams_ gensupport.URLParams
11469 ctx_ context.Context
11470 header_ http.Header
11471 }
11472
11473 // DeleteRevision: Deletes the specified revision of a Consent. An
11474 // INVALID_ARGUMENT error occurs if the specified revision is the latest
11475 // revision.
11476 //
11477 // - name: The resource name of the Consent revision to delete, of the form
11478 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consen
11479 // tStores/{consent_store_id}/consents/{consent_id}@{revision_id}`. An
11480 // INVALID_ARGUMENT error occurs if `revision_id` is not specified in the
11481 // name.
11482 func (r *ProjectsLocationsDatasetsConsentStoresConsentsService) DeleteRevision(name string) *ProjectsLocationsDatasetsConsentStoresConsentsDeleteRevisionCall {
11483 c := &ProjectsLocationsDatasetsConsentStoresConsentsDeleteRevisionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11484 c.name = name
11485 return c
11486 }
11487
11488 // Fields allows partial responses to be retrieved. See
11489 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11490 // details.
11491 func (c *ProjectsLocationsDatasetsConsentStoresConsentsDeleteRevisionCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentsDeleteRevisionCall {
11492 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11493 return c
11494 }
11495
11496 // Context sets the context to be used in this call's Do method.
11497 func (c *ProjectsLocationsDatasetsConsentStoresConsentsDeleteRevisionCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentsDeleteRevisionCall {
11498 c.ctx_ = ctx
11499 return c
11500 }
11501
11502 // Header returns a http.Header that can be modified by the caller to add
11503 // headers to the request.
11504 func (c *ProjectsLocationsDatasetsConsentStoresConsentsDeleteRevisionCall) Header() http.Header {
11505 if c.header_ == nil {
11506 c.header_ = make(http.Header)
11507 }
11508 return c.header_
11509 }
11510
11511 func (c *ProjectsLocationsDatasetsConsentStoresConsentsDeleteRevisionCall) doRequest(alt string) (*http.Response, error) {
11512 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11513 c.urlParams_.Set("alt", alt)
11514 c.urlParams_.Set("prettyPrint", "false")
11515 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:deleteRevision")
11516 urls += "?" + c.urlParams_.Encode()
11517 req, err := http.NewRequest("DELETE", urls, nil)
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.deleteRevision", "request", internallog.HTTPRequest(req, nil))
11526 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11527 }
11528
11529 // Do executes the "healthcare.projects.locations.datasets.consentStores.consents.deleteRevision" call.
11530 // Any non-2xx status code is an error. Response headers are in either
11531 // *Empty.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 *ProjectsLocationsDatasetsConsentStoresConsentsDeleteRevisionCall) Do(opts ...googleapi.CallOption) (*Empty, 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 := &Empty{
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.deleteRevision", "response", internallog.HTTPResponse(res, b))
11565 return ret, nil
11566 }
11567
11568 type ProjectsLocationsDatasetsConsentStoresConsentsGetCall struct {
11569 s *Service
11570 name string
11571 urlParams_ gensupport.URLParams
11572 ifNoneMatch_ string
11573 ctx_ context.Context
11574 header_ http.Header
11575 }
11576
11577 // Get: Gets the specified revision of a Consent, or the latest revision if
11578 // `revision_id` is not specified in the resource name.
11579 //
11580 // - name: The resource name of the Consent to retrieve, of the form
11581 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consen
11582 // tStores/{consent_store_id}/consents/{consent_id}`. In order to retrieve a
11583 // previous revision of the Consent, also provide the revision ID:
11584 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consen
11585 // tStores/{consent_store_id}/consents/{consent_id}@{revision_id}`.
11586 func (r *ProjectsLocationsDatasetsConsentStoresConsentsService) Get(name string) *ProjectsLocationsDatasetsConsentStoresConsentsGetCall {
11587 c := &ProjectsLocationsDatasetsConsentStoresConsentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11588 c.name = name
11589 return c
11590 }
11591
11592 // Fields allows partial responses to be retrieved. See
11593 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11594 // details.
11595 func (c *ProjectsLocationsDatasetsConsentStoresConsentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentsGetCall {
11596 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11597 return c
11598 }
11599
11600 // IfNoneMatch sets an optional parameter which makes the operation fail if the
11601 // object's ETag matches the given value. This is useful for getting updates
11602 // only after the object has changed since the last request.
11603 func (c *ProjectsLocationsDatasetsConsentStoresConsentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsConsentStoresConsentsGetCall {
11604 c.ifNoneMatch_ = entityTag
11605 return c
11606 }
11607
11608 // Context sets the context to be used in this call's Do method.
11609 func (c *ProjectsLocationsDatasetsConsentStoresConsentsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentsGetCall {
11610 c.ctx_ = ctx
11611 return c
11612 }
11613
11614 // Header returns a http.Header that can be modified by the caller to add
11615 // headers to the request.
11616 func (c *ProjectsLocationsDatasetsConsentStoresConsentsGetCall) Header() http.Header {
11617 if c.header_ == nil {
11618 c.header_ = make(http.Header)
11619 }
11620 return c.header_
11621 }
11622
11623 func (c *ProjectsLocationsDatasetsConsentStoresConsentsGetCall) doRequest(alt string) (*http.Response, error) {
11624 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11625 if c.ifNoneMatch_ != "" {
11626 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11627 }
11628 c.urlParams_.Set("alt", alt)
11629 c.urlParams_.Set("prettyPrint", "false")
11630 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
11631 urls += "?" + c.urlParams_.Encode()
11632 req, err := http.NewRequest("GET", urls, nil)
11633 if err != nil {
11634 return nil, err
11635 }
11636 req.Header = reqHeaders
11637 googleapi.Expand(req.URL, map[string]string{
11638 "name": c.name,
11639 })
11640 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.get", "request", internallog.HTTPRequest(req, nil))
11641 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11642 }
11643
11644 // Do executes the "healthcare.projects.locations.datasets.consentStores.consents.get" call.
11645 // Any non-2xx status code is an error. Response headers are in either
11646 // *Consent.ServerResponse.Header or (if a response was returned at all) in
11647 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11648 // whether the returned error was because http.StatusNotModified was returned.
11649 func (c *ProjectsLocationsDatasetsConsentStoresConsentsGetCall) Do(opts ...googleapi.CallOption) (*Consent, error) {
11650 gensupport.SetOptions(c.urlParams_, opts...)
11651 res, err := c.doRequest("json")
11652 if res != nil && res.StatusCode == http.StatusNotModified {
11653 if res.Body != nil {
11654 res.Body.Close()
11655 }
11656 return nil, gensupport.WrapError(&googleapi.Error{
11657 Code: res.StatusCode,
11658 Header: res.Header,
11659 })
11660 }
11661 if err != nil {
11662 return nil, err
11663 }
11664 defer googleapi.CloseBody(res)
11665 if err := googleapi.CheckResponse(res); err != nil {
11666 return nil, gensupport.WrapError(err)
11667 }
11668 ret := &Consent{
11669 ServerResponse: googleapi.ServerResponse{
11670 Header: res.Header,
11671 HTTPStatusCode: res.StatusCode,
11672 },
11673 }
11674 target := &ret
11675 b, err := gensupport.DecodeResponseBytes(target, res)
11676 if err != nil {
11677 return nil, err
11678 }
11679 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.get", "response", internallog.HTTPResponse(res, b))
11680 return ret, nil
11681 }
11682
11683 type ProjectsLocationsDatasetsConsentStoresConsentsListCall struct {
11684 s *Service
11685 parent string
11686 urlParams_ gensupport.URLParams
11687 ifNoneMatch_ string
11688 ctx_ context.Context
11689 header_ http.Header
11690 }
11691
11692 // List: Lists the Consent in the given consent store, returning each Consent's
11693 // latest revision.
11694 //
11695 // - parent: Name of the consent store to retrieve Consents from.
11696 func (r *ProjectsLocationsDatasetsConsentStoresConsentsService) List(parent string) *ProjectsLocationsDatasetsConsentStoresConsentsListCall {
11697 c := &ProjectsLocationsDatasetsConsentStoresConsentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11698 c.parent = parent
11699 return c
11700 }
11701
11702 // Filter sets the optional parameter "filter": Restricts the consents returned
11703 // to those matching a filter. The following syntax is available: * A string
11704 // field value can be written as text inside quotation marks, for example
11705 // "query text". The only valid relational operation for text fields is
11706 // equality (`=`), where text is searched within the field, rather than having
11707 // the field be equal to the text. For example, "Comment = great" returns
11708 // messages with `great` in the comment field. * A number field value can be
11709 // written as an integer, a decimal, or an exponential. The valid relational
11710 // operators for number fields are the equality operator (`=`), along with the
11711 // less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that there is
11712 // no inequality (`!=`) operator. You can prepend the `NOT` operator to an
11713 // expression to negate it. * A date field value must be written in
11714 // `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format.
11715 // Leading zeros are required for one-digit months and days. The valid
11716 // relational operators for date fields are the equality operator (`=`) , along
11717 // with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that
11718 // there is no inequality (`!=`) operator. You can prepend the `NOT` operator
11719 // to an expression to negate it. * Multiple field query expressions can be
11720 // combined in one query by adding `AND` or `OR` operators between the
11721 // expressions. If a boolean operator appears within a quoted string, it is not
11722 // treated as special, it's just another part of the character string to be
11723 // matched. You can prepend the `NOT` operator to an expression to negate it.
11724 // The fields available for filtering are: - user_id. For example,
11725 // `filter='user_id="user123"'`. - consent_artifact - state -
11726 // revision_create_time - metadata. For example,
11727 // `filter=Metadata(\"testkey\")=\"value\" or
11728 // `filter=HasMetadata(\"testkey\")`.
11729 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListCall) Filter(filter string) *ProjectsLocationsDatasetsConsentStoresConsentsListCall {
11730 c.urlParams_.Set("filter", filter)
11731 return c
11732 }
11733
11734 // PageSize sets the optional parameter "pageSize": Limit on the number of
11735 // Consents to return in a single response. If not specified, 100 is used. May
11736 // not be larger than 1000.
11737 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsConsentStoresConsentsListCall {
11738 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
11739 return c
11740 }
11741
11742 // PageToken sets the optional parameter "pageToken": The next_page_token value
11743 // returned from the previous List request, if any.
11744 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsConsentStoresConsentsListCall {
11745 c.urlParams_.Set("pageToken", pageToken)
11746 return c
11747 }
11748
11749 // Fields allows partial responses to be retrieved. See
11750 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11751 // details.
11752 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentsListCall {
11753 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11754 return c
11755 }
11756
11757 // IfNoneMatch sets an optional parameter which makes the operation fail if the
11758 // object's ETag matches the given value. This is useful for getting updates
11759 // only after the object has changed since the last request.
11760 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsConsentStoresConsentsListCall {
11761 c.ifNoneMatch_ = entityTag
11762 return c
11763 }
11764
11765 // Context sets the context to be used in this call's Do method.
11766 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentsListCall {
11767 c.ctx_ = ctx
11768 return c
11769 }
11770
11771 // Header returns a http.Header that can be modified by the caller to add
11772 // headers to the request.
11773 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListCall) Header() http.Header {
11774 if c.header_ == nil {
11775 c.header_ = make(http.Header)
11776 }
11777 return c.header_
11778 }
11779
11780 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListCall) doRequest(alt string) (*http.Response, error) {
11781 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11782 if c.ifNoneMatch_ != "" {
11783 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11784 }
11785 c.urlParams_.Set("alt", alt)
11786 c.urlParams_.Set("prettyPrint", "false")
11787 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/consents")
11788 urls += "?" + c.urlParams_.Encode()
11789 req, err := http.NewRequest("GET", urls, nil)
11790 if err != nil {
11791 return nil, err
11792 }
11793 req.Header = reqHeaders
11794 googleapi.Expand(req.URL, map[string]string{
11795 "parent": c.parent,
11796 })
11797 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.list", "request", internallog.HTTPRequest(req, nil))
11798 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11799 }
11800
11801 // Do executes the "healthcare.projects.locations.datasets.consentStores.consents.list" call.
11802 // Any non-2xx status code is an error. Response headers are in either
11803 // *ListConsentsResponse.ServerResponse.Header or (if a response was returned
11804 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11805 // check whether the returned error was because http.StatusNotModified was
11806 // returned.
11807 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListCall) Do(opts ...googleapi.CallOption) (*ListConsentsResponse, error) {
11808 gensupport.SetOptions(c.urlParams_, opts...)
11809 res, err := c.doRequest("json")
11810 if res != nil && res.StatusCode == http.StatusNotModified {
11811 if res.Body != nil {
11812 res.Body.Close()
11813 }
11814 return nil, gensupport.WrapError(&googleapi.Error{
11815 Code: res.StatusCode,
11816 Header: res.Header,
11817 })
11818 }
11819 if err != nil {
11820 return nil, err
11821 }
11822 defer googleapi.CloseBody(res)
11823 if err := googleapi.CheckResponse(res); err != nil {
11824 return nil, gensupport.WrapError(err)
11825 }
11826 ret := &ListConsentsResponse{
11827 ServerResponse: googleapi.ServerResponse{
11828 Header: res.Header,
11829 HTTPStatusCode: res.StatusCode,
11830 },
11831 }
11832 target := &ret
11833 b, err := gensupport.DecodeResponseBytes(target, res)
11834 if err != nil {
11835 return nil, err
11836 }
11837 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.list", "response", internallog.HTTPResponse(res, b))
11838 return ret, nil
11839 }
11840
11841 // Pages invokes f for each page of results.
11842 // A non-nil error returned from f will halt the iteration.
11843 // The provided context supersedes any context provided to the Context method.
11844 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListCall) Pages(ctx context.Context, f func(*ListConsentsResponse) error) error {
11845 c.ctx_ = ctx
11846 defer c.PageToken(c.urlParams_.Get("pageToken"))
11847 for {
11848 x, err := c.Do()
11849 if err != nil {
11850 return err
11851 }
11852 if err := f(x); err != nil {
11853 return err
11854 }
11855 if x.NextPageToken == "" {
11856 return nil
11857 }
11858 c.PageToken(x.NextPageToken)
11859 }
11860 }
11861
11862 type ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall struct {
11863 s *Service
11864 name string
11865 urlParams_ gensupport.URLParams
11866 ifNoneMatch_ string
11867 ctx_ context.Context
11868 header_ http.Header
11869 }
11870
11871 // ListRevisions: Lists the revisions of the specified Consent in reverse
11872 // chronological order.
11873 //
11874 // - name: The resource name of the Consent to retrieve revisions for.
11875 func (r *ProjectsLocationsDatasetsConsentStoresConsentsService) ListRevisions(name string) *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall {
11876 c := &ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11877 c.name = name
11878 return c
11879 }
11880
11881 // Filter sets the optional parameter "filter": Restricts the revisions
11882 // returned to those matching a filter. The following syntax is available: * A
11883 // string field value can be written as text inside quotation marks, for
11884 // example "query text". The only valid relational operation for text fields
11885 // is equality (`=`), where text is searched within the field, rather than
11886 // having the field be equal to the text. For example, "Comment = great"
11887 // returns messages with `great` in the comment field. * A number field value
11888 // can be written as an integer, a decimal, or an exponential. The valid
11889 // relational operators for number fields are the equality operator (`=`),
11890 // along with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note
11891 // that there is no inequality (`!=`) operator. You can prepend the `NOT`
11892 // operator to an expression to negate it. * A date field value must be written
11893 // in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format.
11894 // Leading zeros are required for one-digit months and days. The valid
11895 // relational operators for date fields are the equality operator (`=`) , along
11896 // with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that
11897 // there is no inequality (`!=`) operator. You can prepend the `NOT` operator
11898 // to an expression to negate it. * Multiple field query expressions can be
11899 // combined in one query by adding `AND` or `OR` operators between the
11900 // expressions. If a boolean operator appears within a quoted string, it is not
11901 // treated as special, it's just another part of the character string to be
11902 // matched. You can prepend the `NOT` operator to an expression to negate it.
11903 // Fields/functions available for filtering are: - user_id. For example,
11904 // `filter='user_id="user123"'`. - consent_artifact - state -
11905 // revision_create_time - metadata. For example,
11906 // `filter=Metadata(\"testkey\")=\"value\" or
11907 // `filter=HasMetadata(\"testkey\")`.
11908 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall) Filter(filter string) *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall {
11909 c.urlParams_.Set("filter", filter)
11910 return c
11911 }
11912
11913 // PageSize sets the optional parameter "pageSize": Limit on the number of
11914 // revisions to return in a single response. If not specified, 100 is used. May
11915 // not be larger than 1000.
11916 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall {
11917 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
11918 return c
11919 }
11920
11921 // PageToken sets the optional parameter "pageToken": Token to retrieve the
11922 // next page of results or empty if there are no more results in the list.
11923 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall) PageToken(pageToken string) *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall {
11924 c.urlParams_.Set("pageToken", pageToken)
11925 return c
11926 }
11927
11928 // Fields allows partial responses to be retrieved. See
11929 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11930 // details.
11931 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall {
11932 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11933 return c
11934 }
11935
11936 // IfNoneMatch sets an optional parameter which makes the operation fail if the
11937 // object's ETag matches the given value. This is useful for getting updates
11938 // only after the object has changed since the last request.
11939 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall {
11940 c.ifNoneMatch_ = entityTag
11941 return c
11942 }
11943
11944 // Context sets the context to be used in this call's Do method.
11945 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall {
11946 c.ctx_ = ctx
11947 return c
11948 }
11949
11950 // Header returns a http.Header that can be modified by the caller to add
11951 // headers to the request.
11952 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall) Header() http.Header {
11953 if c.header_ == nil {
11954 c.header_ = make(http.Header)
11955 }
11956 return c.header_
11957 }
11958
11959 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall) doRequest(alt string) (*http.Response, error) {
11960 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11961 if c.ifNoneMatch_ != "" {
11962 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11963 }
11964 c.urlParams_.Set("alt", alt)
11965 c.urlParams_.Set("prettyPrint", "false")
11966 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:listRevisions")
11967 urls += "?" + c.urlParams_.Encode()
11968 req, err := http.NewRequest("GET", urls, nil)
11969 if err != nil {
11970 return nil, err
11971 }
11972 req.Header = reqHeaders
11973 googleapi.Expand(req.URL, map[string]string{
11974 "name": c.name,
11975 })
11976 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.listRevisions", "request", internallog.HTTPRequest(req, nil))
11977 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11978 }
11979
11980 // Do executes the "healthcare.projects.locations.datasets.consentStores.consents.listRevisions" call.
11981 // Any non-2xx status code is an error. Response headers are in either
11982 // *ListConsentRevisionsResponse.ServerResponse.Header or (if a response was
11983 // returned at all) in error.(*googleapi.Error).Header. Use
11984 // googleapi.IsNotModified to check whether the returned error was because
11985 // http.StatusNotModified was returned.
11986 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall) Do(opts ...googleapi.CallOption) (*ListConsentRevisionsResponse, error) {
11987 gensupport.SetOptions(c.urlParams_, opts...)
11988 res, err := c.doRequest("json")
11989 if res != nil && res.StatusCode == http.StatusNotModified {
11990 if res.Body != nil {
11991 res.Body.Close()
11992 }
11993 return nil, gensupport.WrapError(&googleapi.Error{
11994 Code: res.StatusCode,
11995 Header: res.Header,
11996 })
11997 }
11998 if err != nil {
11999 return nil, err
12000 }
12001 defer googleapi.CloseBody(res)
12002 if err := googleapi.CheckResponse(res); err != nil {
12003 return nil, gensupport.WrapError(err)
12004 }
12005 ret := &ListConsentRevisionsResponse{
12006 ServerResponse: googleapi.ServerResponse{
12007 Header: res.Header,
12008 HTTPStatusCode: res.StatusCode,
12009 },
12010 }
12011 target := &ret
12012 b, err := gensupport.DecodeResponseBytes(target, res)
12013 if err != nil {
12014 return nil, err
12015 }
12016 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.listRevisions", "response", internallog.HTTPResponse(res, b))
12017 return ret, nil
12018 }
12019
12020 // Pages invokes f for each page of results.
12021 // A non-nil error returned from f will halt the iteration.
12022 // The provided context supersedes any context provided to the Context method.
12023 func (c *ProjectsLocationsDatasetsConsentStoresConsentsListRevisionsCall) Pages(ctx context.Context, f func(*ListConsentRevisionsResponse) error) error {
12024 c.ctx_ = ctx
12025 defer c.PageToken(c.urlParams_.Get("pageToken"))
12026 for {
12027 x, err := c.Do()
12028 if err != nil {
12029 return err
12030 }
12031 if err := f(x); err != nil {
12032 return err
12033 }
12034 if x.NextPageToken == "" {
12035 return nil
12036 }
12037 c.PageToken(x.NextPageToken)
12038 }
12039 }
12040
12041 type ProjectsLocationsDatasetsConsentStoresConsentsPatchCall struct {
12042 s *Service
12043 name string
12044 consent *Consent
12045 urlParams_ gensupport.URLParams
12046 ctx_ context.Context
12047 header_ http.Header
12048 }
12049
12050 // Patch: Updates the latest revision of the specified Consent by committing a
12051 // new revision with the changes. A FAILED_PRECONDITION error occurs if the
12052 // latest revision of the specified Consent is in the `REJECTED` or `REVOKED`
12053 // state.
12054 //
12055 // - name: Identifier. Resource name of the Consent, of the form
12056 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consen
12057 // tStores/{consent_store_id}/consents/{consent_id}`. Cannot be changed after
12058 // creation.
12059 func (r *ProjectsLocationsDatasetsConsentStoresConsentsService) Patch(name string, consent *Consent) *ProjectsLocationsDatasetsConsentStoresConsentsPatchCall {
12060 c := &ProjectsLocationsDatasetsConsentStoresConsentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12061 c.name = name
12062 c.consent = consent
12063 return c
12064 }
12065
12066 // UpdateMask sets the optional parameter "updateMask": Required. The update
12067 // mask to apply to the resource. For the `FieldMask` definition, see
12068 // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
12069 // Only the `user_id`, `policies`, `consent_artifact`, and `metadata` fields
12070 // can be updated.
12071 func (c *ProjectsLocationsDatasetsConsentStoresConsentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsConsentStoresConsentsPatchCall {
12072 c.urlParams_.Set("updateMask", updateMask)
12073 return c
12074 }
12075
12076 // Fields allows partial responses to be retrieved. See
12077 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12078 // details.
12079 func (c *ProjectsLocationsDatasetsConsentStoresConsentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentsPatchCall {
12080 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12081 return c
12082 }
12083
12084 // Context sets the context to be used in this call's Do method.
12085 func (c *ProjectsLocationsDatasetsConsentStoresConsentsPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentsPatchCall {
12086 c.ctx_ = ctx
12087 return c
12088 }
12089
12090 // Header returns a http.Header that can be modified by the caller to add
12091 // headers to the request.
12092 func (c *ProjectsLocationsDatasetsConsentStoresConsentsPatchCall) Header() http.Header {
12093 if c.header_ == nil {
12094 c.header_ = make(http.Header)
12095 }
12096 return c.header_
12097 }
12098
12099 func (c *ProjectsLocationsDatasetsConsentStoresConsentsPatchCall) doRequest(alt string) (*http.Response, error) {
12100 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12101 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.consent)
12102 if err != nil {
12103 return nil, err
12104 }
12105 c.urlParams_.Set("alt", alt)
12106 c.urlParams_.Set("prettyPrint", "false")
12107 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
12108 urls += "?" + c.urlParams_.Encode()
12109 req, err := http.NewRequest("PATCH", urls, body)
12110 if err != nil {
12111 return nil, err
12112 }
12113 req.Header = reqHeaders
12114 googleapi.Expand(req.URL, map[string]string{
12115 "name": c.name,
12116 })
12117 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
12118 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12119 }
12120
12121 // Do executes the "healthcare.projects.locations.datasets.consentStores.consents.patch" call.
12122 // Any non-2xx status code is an error. Response headers are in either
12123 // *Consent.ServerResponse.Header or (if a response was returned at all) in
12124 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12125 // whether the returned error was because http.StatusNotModified was returned.
12126 func (c *ProjectsLocationsDatasetsConsentStoresConsentsPatchCall) Do(opts ...googleapi.CallOption) (*Consent, error) {
12127 gensupport.SetOptions(c.urlParams_, opts...)
12128 res, err := c.doRequest("json")
12129 if res != nil && res.StatusCode == http.StatusNotModified {
12130 if res.Body != nil {
12131 res.Body.Close()
12132 }
12133 return nil, gensupport.WrapError(&googleapi.Error{
12134 Code: res.StatusCode,
12135 Header: res.Header,
12136 })
12137 }
12138 if err != nil {
12139 return nil, err
12140 }
12141 defer googleapi.CloseBody(res)
12142 if err := googleapi.CheckResponse(res); err != nil {
12143 return nil, gensupport.WrapError(err)
12144 }
12145 ret := &Consent{
12146 ServerResponse: googleapi.ServerResponse{
12147 Header: res.Header,
12148 HTTPStatusCode: res.StatusCode,
12149 },
12150 }
12151 target := &ret
12152 b, err := gensupport.DecodeResponseBytes(target, res)
12153 if err != nil {
12154 return nil, err
12155 }
12156 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.patch", "response", internallog.HTTPResponse(res, b))
12157 return ret, nil
12158 }
12159
12160 type ProjectsLocationsDatasetsConsentStoresConsentsRejectCall struct {
12161 s *Service
12162 name string
12163 rejectconsentrequest *RejectConsentRequest
12164 urlParams_ gensupport.URLParams
12165 ctx_ context.Context
12166 header_ http.Header
12167 }
12168
12169 // Reject: Rejects the latest revision of the specified Consent by committing a
12170 // new revision with `state` updated to `REJECTED`. If the latest revision of
12171 // the specified Consent is in the `REJECTED` state, no new revision is
12172 // committed. A FAILED_PRECONDITION error occurs if the latest revision of the
12173 // specified Consent is in the `ACTIVE` or `REVOKED` state.
12174 //
12175 // - name: The resource name of the Consent to reject, of the form
12176 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consen
12177 // tStores/{consent_store_id}/consents/{consent_id}`. An INVALID_ARGUMENT
12178 // error occurs if `revision_id` is specified in the name.
12179 func (r *ProjectsLocationsDatasetsConsentStoresConsentsService) Reject(name string, rejectconsentrequest *RejectConsentRequest) *ProjectsLocationsDatasetsConsentStoresConsentsRejectCall {
12180 c := &ProjectsLocationsDatasetsConsentStoresConsentsRejectCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12181 c.name = name
12182 c.rejectconsentrequest = rejectconsentrequest
12183 return c
12184 }
12185
12186 // Fields allows partial responses to be retrieved. See
12187 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12188 // details.
12189 func (c *ProjectsLocationsDatasetsConsentStoresConsentsRejectCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentsRejectCall {
12190 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12191 return c
12192 }
12193
12194 // Context sets the context to be used in this call's Do method.
12195 func (c *ProjectsLocationsDatasetsConsentStoresConsentsRejectCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentsRejectCall {
12196 c.ctx_ = ctx
12197 return c
12198 }
12199
12200 // Header returns a http.Header that can be modified by the caller to add
12201 // headers to the request.
12202 func (c *ProjectsLocationsDatasetsConsentStoresConsentsRejectCall) Header() http.Header {
12203 if c.header_ == nil {
12204 c.header_ = make(http.Header)
12205 }
12206 return c.header_
12207 }
12208
12209 func (c *ProjectsLocationsDatasetsConsentStoresConsentsRejectCall) doRequest(alt string) (*http.Response, error) {
12210 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12211 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.rejectconsentrequest)
12212 if err != nil {
12213 return nil, err
12214 }
12215 c.urlParams_.Set("alt", alt)
12216 c.urlParams_.Set("prettyPrint", "false")
12217 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:reject")
12218 urls += "?" + c.urlParams_.Encode()
12219 req, err := http.NewRequest("POST", urls, body)
12220 if err != nil {
12221 return nil, err
12222 }
12223 req.Header = reqHeaders
12224 googleapi.Expand(req.URL, map[string]string{
12225 "name": c.name,
12226 })
12227 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.reject", "request", internallog.HTTPRequest(req, body.Bytes()))
12228 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12229 }
12230
12231 // Do executes the "healthcare.projects.locations.datasets.consentStores.consents.reject" call.
12232 // Any non-2xx status code is an error. Response headers are in either
12233 // *Consent.ServerResponse.Header or (if a response was returned at all) in
12234 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12235 // whether the returned error was because http.StatusNotModified was returned.
12236 func (c *ProjectsLocationsDatasetsConsentStoresConsentsRejectCall) Do(opts ...googleapi.CallOption) (*Consent, error) {
12237 gensupport.SetOptions(c.urlParams_, opts...)
12238 res, err := c.doRequest("json")
12239 if res != nil && res.StatusCode == http.StatusNotModified {
12240 if res.Body != nil {
12241 res.Body.Close()
12242 }
12243 return nil, gensupport.WrapError(&googleapi.Error{
12244 Code: res.StatusCode,
12245 Header: res.Header,
12246 })
12247 }
12248 if err != nil {
12249 return nil, err
12250 }
12251 defer googleapi.CloseBody(res)
12252 if err := googleapi.CheckResponse(res); err != nil {
12253 return nil, gensupport.WrapError(err)
12254 }
12255 ret := &Consent{
12256 ServerResponse: googleapi.ServerResponse{
12257 Header: res.Header,
12258 HTTPStatusCode: res.StatusCode,
12259 },
12260 }
12261 target := &ret
12262 b, err := gensupport.DecodeResponseBytes(target, res)
12263 if err != nil {
12264 return nil, err
12265 }
12266 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.reject", "response", internallog.HTTPResponse(res, b))
12267 return ret, nil
12268 }
12269
12270 type ProjectsLocationsDatasetsConsentStoresConsentsRevokeCall struct {
12271 s *Service
12272 name string
12273 revokeconsentrequest *RevokeConsentRequest
12274 urlParams_ gensupport.URLParams
12275 ctx_ context.Context
12276 header_ http.Header
12277 }
12278
12279 // Revoke: Revokes the latest revision of the specified Consent by committing a
12280 // new revision with `state` updated to `REVOKED`. If the latest revision of
12281 // the specified Consent is in the `REVOKED` state, no new revision is
12282 // committed. A FAILED_PRECONDITION error occurs if the latest revision of the
12283 // given consent is in `DRAFT` or `REJECTED` state.
12284 //
12285 // - name: The resource name of the Consent to revoke, of the form
12286 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consen
12287 // tStores/{consent_store_id}/consents/{consent_id}`. An INVALID_ARGUMENT
12288 // error occurs if `revision_id` is specified in the name.
12289 func (r *ProjectsLocationsDatasetsConsentStoresConsentsService) Revoke(name string, revokeconsentrequest *RevokeConsentRequest) *ProjectsLocationsDatasetsConsentStoresConsentsRevokeCall {
12290 c := &ProjectsLocationsDatasetsConsentStoresConsentsRevokeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12291 c.name = name
12292 c.revokeconsentrequest = revokeconsentrequest
12293 return c
12294 }
12295
12296 // Fields allows partial responses to be retrieved. See
12297 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12298 // details.
12299 func (c *ProjectsLocationsDatasetsConsentStoresConsentsRevokeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresConsentsRevokeCall {
12300 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12301 return c
12302 }
12303
12304 // Context sets the context to be used in this call's Do method.
12305 func (c *ProjectsLocationsDatasetsConsentStoresConsentsRevokeCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresConsentsRevokeCall {
12306 c.ctx_ = ctx
12307 return c
12308 }
12309
12310 // Header returns a http.Header that can be modified by the caller to add
12311 // headers to the request.
12312 func (c *ProjectsLocationsDatasetsConsentStoresConsentsRevokeCall) Header() http.Header {
12313 if c.header_ == nil {
12314 c.header_ = make(http.Header)
12315 }
12316 return c.header_
12317 }
12318
12319 func (c *ProjectsLocationsDatasetsConsentStoresConsentsRevokeCall) doRequest(alt string) (*http.Response, error) {
12320 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12321 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.revokeconsentrequest)
12322 if err != nil {
12323 return nil, err
12324 }
12325 c.urlParams_.Set("alt", alt)
12326 c.urlParams_.Set("prettyPrint", "false")
12327 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:revoke")
12328 urls += "?" + c.urlParams_.Encode()
12329 req, err := http.NewRequest("POST", urls, body)
12330 if err != nil {
12331 return nil, err
12332 }
12333 req.Header = reqHeaders
12334 googleapi.Expand(req.URL, map[string]string{
12335 "name": c.name,
12336 })
12337 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.revoke", "request", internallog.HTTPRequest(req, body.Bytes()))
12338 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12339 }
12340
12341 // Do executes the "healthcare.projects.locations.datasets.consentStores.consents.revoke" call.
12342 // Any non-2xx status code is an error. Response headers are in either
12343 // *Consent.ServerResponse.Header or (if a response was returned at all) in
12344 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12345 // whether the returned error was because http.StatusNotModified was returned.
12346 func (c *ProjectsLocationsDatasetsConsentStoresConsentsRevokeCall) Do(opts ...googleapi.CallOption) (*Consent, error) {
12347 gensupport.SetOptions(c.urlParams_, opts...)
12348 res, err := c.doRequest("json")
12349 if res != nil && res.StatusCode == http.StatusNotModified {
12350 if res.Body != nil {
12351 res.Body.Close()
12352 }
12353 return nil, gensupport.WrapError(&googleapi.Error{
12354 Code: res.StatusCode,
12355 Header: res.Header,
12356 })
12357 }
12358 if err != nil {
12359 return nil, err
12360 }
12361 defer googleapi.CloseBody(res)
12362 if err := googleapi.CheckResponse(res); err != nil {
12363 return nil, gensupport.WrapError(err)
12364 }
12365 ret := &Consent{
12366 ServerResponse: googleapi.ServerResponse{
12367 Header: res.Header,
12368 HTTPStatusCode: res.StatusCode,
12369 },
12370 }
12371 target := &ret
12372 b, err := gensupport.DecodeResponseBytes(target, res)
12373 if err != nil {
12374 return nil, err
12375 }
12376 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.consents.revoke", "response", internallog.HTTPResponse(res, b))
12377 return ret, nil
12378 }
12379
12380 type ProjectsLocationsDatasetsConsentStoresUserDataMappingsArchiveCall struct {
12381 s *Service
12382 name string
12383 archiveuserdatamappingrequest *ArchiveUserDataMappingRequest
12384 urlParams_ gensupport.URLParams
12385 ctx_ context.Context
12386 header_ http.Header
12387 }
12388
12389 // Archive: Archives the specified User data mapping.
12390 //
12391 // - name: The resource name of the User data mapping to archive.
12392 func (r *ProjectsLocationsDatasetsConsentStoresUserDataMappingsService) Archive(name string, archiveuserdatamappingrequest *ArchiveUserDataMappingRequest) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsArchiveCall {
12393 c := &ProjectsLocationsDatasetsConsentStoresUserDataMappingsArchiveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12394 c.name = name
12395 c.archiveuserdatamappingrequest = archiveuserdatamappingrequest
12396 return c
12397 }
12398
12399 // Fields allows partial responses to be retrieved. See
12400 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12401 // details.
12402 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsArchiveCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsArchiveCall {
12403 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12404 return c
12405 }
12406
12407 // Context sets the context to be used in this call's Do method.
12408 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsArchiveCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsArchiveCall {
12409 c.ctx_ = ctx
12410 return c
12411 }
12412
12413 // Header returns a http.Header that can be modified by the caller to add
12414 // headers to the request.
12415 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsArchiveCall) Header() http.Header {
12416 if c.header_ == nil {
12417 c.header_ = make(http.Header)
12418 }
12419 return c.header_
12420 }
12421
12422 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsArchiveCall) doRequest(alt string) (*http.Response, error) {
12423 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12424 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.archiveuserdatamappingrequest)
12425 if err != nil {
12426 return nil, err
12427 }
12428 c.urlParams_.Set("alt", alt)
12429 c.urlParams_.Set("prettyPrint", "false")
12430 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:archive")
12431 urls += "?" + c.urlParams_.Encode()
12432 req, err := http.NewRequest("POST", urls, body)
12433 if err != nil {
12434 return nil, err
12435 }
12436 req.Header = reqHeaders
12437 googleapi.Expand(req.URL, map[string]string{
12438 "name": c.name,
12439 })
12440 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.userDataMappings.archive", "request", internallog.HTTPRequest(req, body.Bytes()))
12441 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12442 }
12443
12444 // Do executes the "healthcare.projects.locations.datasets.consentStores.userDataMappings.archive" call.
12445 // Any non-2xx status code is an error. Response headers are in either
12446 // *ArchiveUserDataMappingResponse.ServerResponse.Header or (if a response was
12447 // returned at all) in error.(*googleapi.Error).Header. Use
12448 // googleapi.IsNotModified to check whether the returned error was because
12449 // http.StatusNotModified was returned.
12450 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsArchiveCall) Do(opts ...googleapi.CallOption) (*ArchiveUserDataMappingResponse, error) {
12451 gensupport.SetOptions(c.urlParams_, opts...)
12452 res, err := c.doRequest("json")
12453 if res != nil && res.StatusCode == http.StatusNotModified {
12454 if res.Body != nil {
12455 res.Body.Close()
12456 }
12457 return nil, gensupport.WrapError(&googleapi.Error{
12458 Code: res.StatusCode,
12459 Header: res.Header,
12460 })
12461 }
12462 if err != nil {
12463 return nil, err
12464 }
12465 defer googleapi.CloseBody(res)
12466 if err := googleapi.CheckResponse(res); err != nil {
12467 return nil, gensupport.WrapError(err)
12468 }
12469 ret := &ArchiveUserDataMappingResponse{
12470 ServerResponse: googleapi.ServerResponse{
12471 Header: res.Header,
12472 HTTPStatusCode: res.StatusCode,
12473 },
12474 }
12475 target := &ret
12476 b, err := gensupport.DecodeResponseBytes(target, res)
12477 if err != nil {
12478 return nil, err
12479 }
12480 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.userDataMappings.archive", "response", internallog.HTTPResponse(res, b))
12481 return ret, nil
12482 }
12483
12484 type ProjectsLocationsDatasetsConsentStoresUserDataMappingsCreateCall struct {
12485 s *Service
12486 parent string
12487 userdatamapping *UserDataMapping
12488 urlParams_ gensupport.URLParams
12489 ctx_ context.Context
12490 header_ http.Header
12491 }
12492
12493 // Create: Creates a new User data mapping in the parent consent store.
12494 //
12495 // - parent: Name of the consent store.
12496 func (r *ProjectsLocationsDatasetsConsentStoresUserDataMappingsService) Create(parent string, userdatamapping *UserDataMapping) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsCreateCall {
12497 c := &ProjectsLocationsDatasetsConsentStoresUserDataMappingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12498 c.parent = parent
12499 c.userdatamapping = userdatamapping
12500 return c
12501 }
12502
12503 // Fields allows partial responses to be retrieved. See
12504 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12505 // details.
12506 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsCreateCall {
12507 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12508 return c
12509 }
12510
12511 // Context sets the context to be used in this call's Do method.
12512 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsCreateCall {
12513 c.ctx_ = ctx
12514 return c
12515 }
12516
12517 // Header returns a http.Header that can be modified by the caller to add
12518 // headers to the request.
12519 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsCreateCall) Header() http.Header {
12520 if c.header_ == nil {
12521 c.header_ = make(http.Header)
12522 }
12523 return c.header_
12524 }
12525
12526 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsCreateCall) doRequest(alt string) (*http.Response, error) {
12527 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12528 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.userdatamapping)
12529 if err != nil {
12530 return nil, err
12531 }
12532 c.urlParams_.Set("alt", alt)
12533 c.urlParams_.Set("prettyPrint", "false")
12534 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/userDataMappings")
12535 urls += "?" + c.urlParams_.Encode()
12536 req, err := http.NewRequest("POST", urls, body)
12537 if err != nil {
12538 return nil, err
12539 }
12540 req.Header = reqHeaders
12541 googleapi.Expand(req.URL, map[string]string{
12542 "parent": c.parent,
12543 })
12544 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.userDataMappings.create", "request", internallog.HTTPRequest(req, body.Bytes()))
12545 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12546 }
12547
12548 // Do executes the "healthcare.projects.locations.datasets.consentStores.userDataMappings.create" call.
12549 // Any non-2xx status code is an error. Response headers are in either
12550 // *UserDataMapping.ServerResponse.Header or (if a response was returned at
12551 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
12552 // check whether the returned error was because http.StatusNotModified was
12553 // returned.
12554 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsCreateCall) Do(opts ...googleapi.CallOption) (*UserDataMapping, error) {
12555 gensupport.SetOptions(c.urlParams_, opts...)
12556 res, err := c.doRequest("json")
12557 if res != nil && res.StatusCode == http.StatusNotModified {
12558 if res.Body != nil {
12559 res.Body.Close()
12560 }
12561 return nil, gensupport.WrapError(&googleapi.Error{
12562 Code: res.StatusCode,
12563 Header: res.Header,
12564 })
12565 }
12566 if err != nil {
12567 return nil, err
12568 }
12569 defer googleapi.CloseBody(res)
12570 if err := googleapi.CheckResponse(res); err != nil {
12571 return nil, gensupport.WrapError(err)
12572 }
12573 ret := &UserDataMapping{
12574 ServerResponse: googleapi.ServerResponse{
12575 Header: res.Header,
12576 HTTPStatusCode: res.StatusCode,
12577 },
12578 }
12579 target := &ret
12580 b, err := gensupport.DecodeResponseBytes(target, res)
12581 if err != nil {
12582 return nil, err
12583 }
12584 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.userDataMappings.create", "response", internallog.HTTPResponse(res, b))
12585 return ret, nil
12586 }
12587
12588 type ProjectsLocationsDatasetsConsentStoresUserDataMappingsDeleteCall struct {
12589 s *Service
12590 name string
12591 urlParams_ gensupport.URLParams
12592 ctx_ context.Context
12593 header_ http.Header
12594 }
12595
12596 // Delete: Deletes the specified User data mapping.
12597 //
12598 // - name: The resource name of the User data mapping to delete.
12599 func (r *ProjectsLocationsDatasetsConsentStoresUserDataMappingsService) Delete(name string) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsDeleteCall {
12600 c := &ProjectsLocationsDatasetsConsentStoresUserDataMappingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12601 c.name = name
12602 return c
12603 }
12604
12605 // Fields allows partial responses to be retrieved. See
12606 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12607 // details.
12608 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsDeleteCall {
12609 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12610 return c
12611 }
12612
12613 // Context sets the context to be used in this call's Do method.
12614 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsDeleteCall {
12615 c.ctx_ = ctx
12616 return c
12617 }
12618
12619 // Header returns a http.Header that can be modified by the caller to add
12620 // headers to the request.
12621 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsDeleteCall) Header() http.Header {
12622 if c.header_ == nil {
12623 c.header_ = make(http.Header)
12624 }
12625 return c.header_
12626 }
12627
12628 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsDeleteCall) doRequest(alt string) (*http.Response, error) {
12629 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12630 c.urlParams_.Set("alt", alt)
12631 c.urlParams_.Set("prettyPrint", "false")
12632 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
12633 urls += "?" + c.urlParams_.Encode()
12634 req, err := http.NewRequest("DELETE", urls, nil)
12635 if err != nil {
12636 return nil, err
12637 }
12638 req.Header = reqHeaders
12639 googleapi.Expand(req.URL, map[string]string{
12640 "name": c.name,
12641 })
12642 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.userDataMappings.delete", "request", internallog.HTTPRequest(req, nil))
12643 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12644 }
12645
12646 // Do executes the "healthcare.projects.locations.datasets.consentStores.userDataMappings.delete" call.
12647 // Any non-2xx status code is an error. Response headers are in either
12648 // *Empty.ServerResponse.Header or (if a response was returned at all) in
12649 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12650 // whether the returned error was because http.StatusNotModified was returned.
12651 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
12652 gensupport.SetOptions(c.urlParams_, opts...)
12653 res, err := c.doRequest("json")
12654 if res != nil && res.StatusCode == http.StatusNotModified {
12655 if res.Body != nil {
12656 res.Body.Close()
12657 }
12658 return nil, gensupport.WrapError(&googleapi.Error{
12659 Code: res.StatusCode,
12660 Header: res.Header,
12661 })
12662 }
12663 if err != nil {
12664 return nil, err
12665 }
12666 defer googleapi.CloseBody(res)
12667 if err := googleapi.CheckResponse(res); err != nil {
12668 return nil, gensupport.WrapError(err)
12669 }
12670 ret := &Empty{
12671 ServerResponse: googleapi.ServerResponse{
12672 Header: res.Header,
12673 HTTPStatusCode: res.StatusCode,
12674 },
12675 }
12676 target := &ret
12677 b, err := gensupport.DecodeResponseBytes(target, res)
12678 if err != nil {
12679 return nil, err
12680 }
12681 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.userDataMappings.delete", "response", internallog.HTTPResponse(res, b))
12682 return ret, nil
12683 }
12684
12685 type ProjectsLocationsDatasetsConsentStoresUserDataMappingsGetCall struct {
12686 s *Service
12687 name string
12688 urlParams_ gensupport.URLParams
12689 ifNoneMatch_ string
12690 ctx_ context.Context
12691 header_ http.Header
12692 }
12693
12694 // Get: Gets the specified User data mapping.
12695 //
12696 // - name: The resource name of the User data mapping to retrieve.
12697 func (r *ProjectsLocationsDatasetsConsentStoresUserDataMappingsService) Get(name string) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsGetCall {
12698 c := &ProjectsLocationsDatasetsConsentStoresUserDataMappingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12699 c.name = name
12700 return c
12701 }
12702
12703 // Fields allows partial responses to be retrieved. See
12704 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12705 // details.
12706 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsGetCall {
12707 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12708 return c
12709 }
12710
12711 // IfNoneMatch sets an optional parameter which makes the operation fail if the
12712 // object's ETag matches the given value. This is useful for getting updates
12713 // only after the object has changed since the last request.
12714 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsGetCall {
12715 c.ifNoneMatch_ = entityTag
12716 return c
12717 }
12718
12719 // Context sets the context to be used in this call's Do method.
12720 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsGetCall {
12721 c.ctx_ = ctx
12722 return c
12723 }
12724
12725 // Header returns a http.Header that can be modified by the caller to add
12726 // headers to the request.
12727 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsGetCall) Header() http.Header {
12728 if c.header_ == nil {
12729 c.header_ = make(http.Header)
12730 }
12731 return c.header_
12732 }
12733
12734 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsGetCall) doRequest(alt string) (*http.Response, error) {
12735 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12736 if c.ifNoneMatch_ != "" {
12737 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12738 }
12739 c.urlParams_.Set("alt", alt)
12740 c.urlParams_.Set("prettyPrint", "false")
12741 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
12742 urls += "?" + c.urlParams_.Encode()
12743 req, err := http.NewRequest("GET", urls, nil)
12744 if err != nil {
12745 return nil, err
12746 }
12747 req.Header = reqHeaders
12748 googleapi.Expand(req.URL, map[string]string{
12749 "name": c.name,
12750 })
12751 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.userDataMappings.get", "request", internallog.HTTPRequest(req, nil))
12752 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12753 }
12754
12755 // Do executes the "healthcare.projects.locations.datasets.consentStores.userDataMappings.get" call.
12756 // Any non-2xx status code is an error. Response headers are in either
12757 // *UserDataMapping.ServerResponse.Header or (if a response was returned at
12758 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
12759 // check whether the returned error was because http.StatusNotModified was
12760 // returned.
12761 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsGetCall) Do(opts ...googleapi.CallOption) (*UserDataMapping, error) {
12762 gensupport.SetOptions(c.urlParams_, opts...)
12763 res, err := c.doRequest("json")
12764 if res != nil && res.StatusCode == http.StatusNotModified {
12765 if res.Body != nil {
12766 res.Body.Close()
12767 }
12768 return nil, gensupport.WrapError(&googleapi.Error{
12769 Code: res.StatusCode,
12770 Header: res.Header,
12771 })
12772 }
12773 if err != nil {
12774 return nil, err
12775 }
12776 defer googleapi.CloseBody(res)
12777 if err := googleapi.CheckResponse(res); err != nil {
12778 return nil, gensupport.WrapError(err)
12779 }
12780 ret := &UserDataMapping{
12781 ServerResponse: googleapi.ServerResponse{
12782 Header: res.Header,
12783 HTTPStatusCode: res.StatusCode,
12784 },
12785 }
12786 target := &ret
12787 b, err := gensupport.DecodeResponseBytes(target, res)
12788 if err != nil {
12789 return nil, err
12790 }
12791 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.userDataMappings.get", "response", internallog.HTTPResponse(res, b))
12792 return ret, nil
12793 }
12794
12795 type ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall struct {
12796 s *Service
12797 parent string
12798 urlParams_ gensupport.URLParams
12799 ifNoneMatch_ string
12800 ctx_ context.Context
12801 header_ http.Header
12802 }
12803
12804 // List: Lists the User data mappings in the specified consent store.
12805 //
12806 // - parent: Name of the consent store to retrieve User data mappings from.
12807 func (r *ProjectsLocationsDatasetsConsentStoresUserDataMappingsService) List(parent string) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall {
12808 c := &ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12809 c.parent = parent
12810 return c
12811 }
12812
12813 // Filter sets the optional parameter "filter": Restricts the user data
12814 // mappings returned to those matching a filter. The following syntax is
12815 // available: * A string field value can be written as text inside quotation
12816 // marks, for example "query text". The only valid relational operation for
12817 // text fields is equality (`=`), where text is searched within the field,
12818 // rather than having the field be equal to the text. For example, "Comment =
12819 // great" returns messages with `great` in the comment field. * A number field
12820 // value can be written as an integer, a decimal, or an exponential. The valid
12821 // relational operators for number fields are the equality operator (`=`),
12822 // along with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note
12823 // that there is no inequality (`!=`) operator. You can prepend the `NOT`
12824 // operator to an expression to negate it. * A date field value must be written
12825 // in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format.
12826 // Leading zeros are required for one-digit months and days. The valid
12827 // relational operators for date fields are the equality operator (`=`) , along
12828 // with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that
12829 // there is no inequality (`!=`) operator. You can prepend the `NOT` operator
12830 // to an expression to negate it. * Multiple field query expressions can be
12831 // combined in one query by adding `AND` or `OR` operators between the
12832 // expressions. If a boolean operator appears within a quoted string, it is not
12833 // treated as special, it's just another part of the character string to be
12834 // matched. You can prepend the `NOT` operator to an expression to negate it.
12835 // The fields available for filtering are: - data_id - user_id. For example,
12836 // `filter=user_id=\"user123\". - archived - archive_time
12837 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall) Filter(filter string) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall {
12838 c.urlParams_.Set("filter", filter)
12839 return c
12840 }
12841
12842 // PageSize sets the optional parameter "pageSize": Limit on the number of User
12843 // data mappings to return in a single response. If not specified, 100 is used.
12844 // May not be larger than 1000.
12845 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall {
12846 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
12847 return c
12848 }
12849
12850 // PageToken sets the optional parameter "pageToken": Token to retrieve the
12851 // next page of results, or empty to get the first page.
12852 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall {
12853 c.urlParams_.Set("pageToken", pageToken)
12854 return c
12855 }
12856
12857 // Fields allows partial responses to be retrieved. See
12858 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12859 // details.
12860 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall {
12861 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12862 return c
12863 }
12864
12865 // IfNoneMatch sets an optional parameter which makes the operation fail if the
12866 // object's ETag matches the given value. This is useful for getting updates
12867 // only after the object has changed since the last request.
12868 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall {
12869 c.ifNoneMatch_ = entityTag
12870 return c
12871 }
12872
12873 // Context sets the context to be used in this call's Do method.
12874 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall {
12875 c.ctx_ = ctx
12876 return c
12877 }
12878
12879 // Header returns a http.Header that can be modified by the caller to add
12880 // headers to the request.
12881 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall) Header() http.Header {
12882 if c.header_ == nil {
12883 c.header_ = make(http.Header)
12884 }
12885 return c.header_
12886 }
12887
12888 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall) doRequest(alt string) (*http.Response, error) {
12889 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12890 if c.ifNoneMatch_ != "" {
12891 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12892 }
12893 c.urlParams_.Set("alt", alt)
12894 c.urlParams_.Set("prettyPrint", "false")
12895 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/userDataMappings")
12896 urls += "?" + c.urlParams_.Encode()
12897 req, err := http.NewRequest("GET", urls, nil)
12898 if err != nil {
12899 return nil, err
12900 }
12901 req.Header = reqHeaders
12902 googleapi.Expand(req.URL, map[string]string{
12903 "parent": c.parent,
12904 })
12905 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.userDataMappings.list", "request", internallog.HTTPRequest(req, nil))
12906 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12907 }
12908
12909 // Do executes the "healthcare.projects.locations.datasets.consentStores.userDataMappings.list" call.
12910 // Any non-2xx status code is an error. Response headers are in either
12911 // *ListUserDataMappingsResponse.ServerResponse.Header or (if a response was
12912 // returned at all) in error.(*googleapi.Error).Header. Use
12913 // googleapi.IsNotModified to check whether the returned error was because
12914 // http.StatusNotModified was returned.
12915 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall) Do(opts ...googleapi.CallOption) (*ListUserDataMappingsResponse, error) {
12916 gensupport.SetOptions(c.urlParams_, opts...)
12917 res, err := c.doRequest("json")
12918 if res != nil && res.StatusCode == http.StatusNotModified {
12919 if res.Body != nil {
12920 res.Body.Close()
12921 }
12922 return nil, gensupport.WrapError(&googleapi.Error{
12923 Code: res.StatusCode,
12924 Header: res.Header,
12925 })
12926 }
12927 if err != nil {
12928 return nil, err
12929 }
12930 defer googleapi.CloseBody(res)
12931 if err := googleapi.CheckResponse(res); err != nil {
12932 return nil, gensupport.WrapError(err)
12933 }
12934 ret := &ListUserDataMappingsResponse{
12935 ServerResponse: googleapi.ServerResponse{
12936 Header: res.Header,
12937 HTTPStatusCode: res.StatusCode,
12938 },
12939 }
12940 target := &ret
12941 b, err := gensupport.DecodeResponseBytes(target, res)
12942 if err != nil {
12943 return nil, err
12944 }
12945 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.userDataMappings.list", "response", internallog.HTTPResponse(res, b))
12946 return ret, nil
12947 }
12948
12949 // Pages invokes f for each page of results.
12950 // A non-nil error returned from f will halt the iteration.
12951 // The provided context supersedes any context provided to the Context method.
12952 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsListCall) Pages(ctx context.Context, f func(*ListUserDataMappingsResponse) error) error {
12953 c.ctx_ = ctx
12954 defer c.PageToken(c.urlParams_.Get("pageToken"))
12955 for {
12956 x, err := c.Do()
12957 if err != nil {
12958 return err
12959 }
12960 if err := f(x); err != nil {
12961 return err
12962 }
12963 if x.NextPageToken == "" {
12964 return nil
12965 }
12966 c.PageToken(x.NextPageToken)
12967 }
12968 }
12969
12970 type ProjectsLocationsDatasetsConsentStoresUserDataMappingsPatchCall struct {
12971 s *Service
12972 name string
12973 userdatamapping *UserDataMapping
12974 urlParams_ gensupport.URLParams
12975 ctx_ context.Context
12976 header_ http.Header
12977 }
12978
12979 // Patch: Updates the specified User data mapping.
12980 //
12981 // - name: Resource name of the User data mapping, of the form
12982 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consen
12983 // tStores/{consent_store_id}/userDataMappings/{user_data_mapping_id}`.
12984 func (r *ProjectsLocationsDatasetsConsentStoresUserDataMappingsService) Patch(name string, userdatamapping *UserDataMapping) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsPatchCall {
12985 c := &ProjectsLocationsDatasetsConsentStoresUserDataMappingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12986 c.name = name
12987 c.userdatamapping = userdatamapping
12988 return c
12989 }
12990
12991 // UpdateMask sets the optional parameter "updateMask": Required. The update
12992 // mask that applies to the resource. For the `FieldMask` definition, see
12993 // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
12994 // Only the `data_id`, `user_id` and `resource_attributes` fields can be
12995 // updated.
12996 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsPatchCall {
12997 c.urlParams_.Set("updateMask", updateMask)
12998 return c
12999 }
13000
13001 // Fields allows partial responses to be retrieved. See
13002 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13003 // details.
13004 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsPatchCall {
13005 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13006 return c
13007 }
13008
13009 // Context sets the context to be used in this call's Do method.
13010 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsConsentStoresUserDataMappingsPatchCall {
13011 c.ctx_ = ctx
13012 return c
13013 }
13014
13015 // Header returns a http.Header that can be modified by the caller to add
13016 // headers to the request.
13017 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsPatchCall) Header() http.Header {
13018 if c.header_ == nil {
13019 c.header_ = make(http.Header)
13020 }
13021 return c.header_
13022 }
13023
13024 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsPatchCall) doRequest(alt string) (*http.Response, error) {
13025 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13026 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.userdatamapping)
13027 if err != nil {
13028 return nil, err
13029 }
13030 c.urlParams_.Set("alt", alt)
13031 c.urlParams_.Set("prettyPrint", "false")
13032 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
13033 urls += "?" + c.urlParams_.Encode()
13034 req, err := http.NewRequest("PATCH", urls, body)
13035 if err != nil {
13036 return nil, err
13037 }
13038 req.Header = reqHeaders
13039 googleapi.Expand(req.URL, map[string]string{
13040 "name": c.name,
13041 })
13042 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.userDataMappings.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
13043 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13044 }
13045
13046 // Do executes the "healthcare.projects.locations.datasets.consentStores.userDataMappings.patch" call.
13047 // Any non-2xx status code is an error. Response headers are in either
13048 // *UserDataMapping.ServerResponse.Header or (if a response was returned at
13049 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
13050 // check whether the returned error was because http.StatusNotModified was
13051 // returned.
13052 func (c *ProjectsLocationsDatasetsConsentStoresUserDataMappingsPatchCall) Do(opts ...googleapi.CallOption) (*UserDataMapping, error) {
13053 gensupport.SetOptions(c.urlParams_, opts...)
13054 res, err := c.doRequest("json")
13055 if res != nil && res.StatusCode == http.StatusNotModified {
13056 if res.Body != nil {
13057 res.Body.Close()
13058 }
13059 return nil, gensupport.WrapError(&googleapi.Error{
13060 Code: res.StatusCode,
13061 Header: res.Header,
13062 })
13063 }
13064 if err != nil {
13065 return nil, err
13066 }
13067 defer googleapi.CloseBody(res)
13068 if err := googleapi.CheckResponse(res); err != nil {
13069 return nil, gensupport.WrapError(err)
13070 }
13071 ret := &UserDataMapping{
13072 ServerResponse: googleapi.ServerResponse{
13073 Header: res.Header,
13074 HTTPStatusCode: res.StatusCode,
13075 },
13076 }
13077 target := &ret
13078 b, err := gensupport.DecodeResponseBytes(target, res)
13079 if err != nil {
13080 return nil, err
13081 }
13082 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.consentStores.userDataMappings.patch", "response", internallog.HTTPResponse(res, b))
13083 return ret, nil
13084 }
13085
13086 type ProjectsLocationsDatasetsDataMapperWorkspacesGetIamPolicyCall struct {
13087 s *Service
13088 resource string
13089 urlParams_ gensupport.URLParams
13090 ifNoneMatch_ string
13091 ctx_ context.Context
13092 header_ http.Header
13093 }
13094
13095 // GetIamPolicy: Gets the access control policy for a resource. Returns an
13096 // empty policy if the resource exists and does not have a policy set.
13097 //
13098 // - resource: REQUIRED: The resource for which the policy is being requested.
13099 // See Resource names (https://cloud.google.com/apis/design/resource_names)
13100 // for the appropriate value for this field.
13101 func (r *ProjectsLocationsDatasetsDataMapperWorkspacesService) GetIamPolicy(resource string) *ProjectsLocationsDatasetsDataMapperWorkspacesGetIamPolicyCall {
13102 c := &ProjectsLocationsDatasetsDataMapperWorkspacesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13103 c.resource = resource
13104 return c
13105 }
13106
13107 // OptionsRequestedPolicyVersion sets the optional parameter
13108 // "options.requestedPolicyVersion": The maximum policy version that will be
13109 // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
13110 // an invalid value will be rejected. Requests for policies with any
13111 // conditional role bindings must specify version 3. Policies with no
13112 // conditional role bindings may specify any valid value or leave the field
13113 // unset. The policy in the response might use the policy version that you
13114 // specified, or it might use a lower policy version. For example, if you
13115 // specify version 3, but the policy has no conditional role bindings, the
13116 // response uses version 1. To learn which resources support conditions in
13117 // their IAM policies, see the IAM documentation
13118 // (https://cloud.google.com/iam/help/conditions/resource-policies).
13119 func (c *ProjectsLocationsDatasetsDataMapperWorkspacesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDatasetsDataMapperWorkspacesGetIamPolicyCall {
13120 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
13121 return c
13122 }
13123
13124 // Fields allows partial responses to be retrieved. See
13125 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13126 // details.
13127 func (c *ProjectsLocationsDatasetsDataMapperWorkspacesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataMapperWorkspacesGetIamPolicyCall {
13128 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13129 return c
13130 }
13131
13132 // IfNoneMatch sets an optional parameter which makes the operation fail if the
13133 // object's ETag matches the given value. This is useful for getting updates
13134 // only after the object has changed since the last request.
13135 func (c *ProjectsLocationsDatasetsDataMapperWorkspacesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDataMapperWorkspacesGetIamPolicyCall {
13136 c.ifNoneMatch_ = entityTag
13137 return c
13138 }
13139
13140 // Context sets the context to be used in this call's Do method.
13141 func (c *ProjectsLocationsDatasetsDataMapperWorkspacesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataMapperWorkspacesGetIamPolicyCall {
13142 c.ctx_ = ctx
13143 return c
13144 }
13145
13146 // Header returns a http.Header that can be modified by the caller to add
13147 // headers to the request.
13148 func (c *ProjectsLocationsDatasetsDataMapperWorkspacesGetIamPolicyCall) Header() http.Header {
13149 if c.header_ == nil {
13150 c.header_ = make(http.Header)
13151 }
13152 return c.header_
13153 }
13154
13155 func (c *ProjectsLocationsDatasetsDataMapperWorkspacesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
13156 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13157 if c.ifNoneMatch_ != "" {
13158 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13159 }
13160 c.urlParams_.Set("alt", alt)
13161 c.urlParams_.Set("prettyPrint", "false")
13162 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy")
13163 urls += "?" + c.urlParams_.Encode()
13164 req, err := http.NewRequest("GET", urls, nil)
13165 if err != nil {
13166 return nil, err
13167 }
13168 req.Header = reqHeaders
13169 googleapi.Expand(req.URL, map[string]string{
13170 "resource": c.resource,
13171 })
13172 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dataMapperWorkspaces.getIamPolicy", "request", internallog.HTTPRequest(req, nil))
13173 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13174 }
13175
13176 // Do executes the "healthcare.projects.locations.datasets.dataMapperWorkspaces.getIamPolicy" call.
13177 // Any non-2xx status code is an error. Response headers are in either
13178 // *Policy.ServerResponse.Header or (if a response was returned at all) in
13179 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13180 // whether the returned error was because http.StatusNotModified was returned.
13181 func (c *ProjectsLocationsDatasetsDataMapperWorkspacesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
13182 gensupport.SetOptions(c.urlParams_, opts...)
13183 res, err := c.doRequest("json")
13184 if res != nil && res.StatusCode == http.StatusNotModified {
13185 if res.Body != nil {
13186 res.Body.Close()
13187 }
13188 return nil, gensupport.WrapError(&googleapi.Error{
13189 Code: res.StatusCode,
13190 Header: res.Header,
13191 })
13192 }
13193 if err != nil {
13194 return nil, err
13195 }
13196 defer googleapi.CloseBody(res)
13197 if err := googleapi.CheckResponse(res); err != nil {
13198 return nil, gensupport.WrapError(err)
13199 }
13200 ret := &Policy{
13201 ServerResponse: googleapi.ServerResponse{
13202 Header: res.Header,
13203 HTTPStatusCode: res.StatusCode,
13204 },
13205 }
13206 target := &ret
13207 b, err := gensupport.DecodeResponseBytes(target, res)
13208 if err != nil {
13209 return nil, err
13210 }
13211 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dataMapperWorkspaces.getIamPolicy", "response", internallog.HTTPResponse(res, b))
13212 return ret, nil
13213 }
13214
13215 type ProjectsLocationsDatasetsDataMapperWorkspacesSetIamPolicyCall struct {
13216 s *Service
13217 resource string
13218 setiampolicyrequest *SetIamPolicyRequest
13219 urlParams_ gensupport.URLParams
13220 ctx_ context.Context
13221 header_ http.Header
13222 }
13223
13224 // SetIamPolicy: Sets the access control policy on the specified resource.
13225 // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
13226 // and `PERMISSION_DENIED` errors.
13227 //
13228 // - resource: REQUIRED: The resource for which the policy is being specified.
13229 // See Resource names (https://cloud.google.com/apis/design/resource_names)
13230 // for the appropriate value for this field.
13231 func (r *ProjectsLocationsDatasetsDataMapperWorkspacesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsDataMapperWorkspacesSetIamPolicyCall {
13232 c := &ProjectsLocationsDatasetsDataMapperWorkspacesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13233 c.resource = resource
13234 c.setiampolicyrequest = setiampolicyrequest
13235 return c
13236 }
13237
13238 // Fields allows partial responses to be retrieved. See
13239 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13240 // details.
13241 func (c *ProjectsLocationsDatasetsDataMapperWorkspacesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataMapperWorkspacesSetIamPolicyCall {
13242 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13243 return c
13244 }
13245
13246 // Context sets the context to be used in this call's Do method.
13247 func (c *ProjectsLocationsDatasetsDataMapperWorkspacesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataMapperWorkspacesSetIamPolicyCall {
13248 c.ctx_ = ctx
13249 return c
13250 }
13251
13252 // Header returns a http.Header that can be modified by the caller to add
13253 // headers to the request.
13254 func (c *ProjectsLocationsDatasetsDataMapperWorkspacesSetIamPolicyCall) Header() http.Header {
13255 if c.header_ == nil {
13256 c.header_ = make(http.Header)
13257 }
13258 return c.header_
13259 }
13260
13261 func (c *ProjectsLocationsDatasetsDataMapperWorkspacesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
13262 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13263 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest)
13264 if err != nil {
13265 return nil, err
13266 }
13267 c.urlParams_.Set("alt", alt)
13268 c.urlParams_.Set("prettyPrint", "false")
13269 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy")
13270 urls += "?" + c.urlParams_.Encode()
13271 req, err := http.NewRequest("POST", urls, body)
13272 if err != nil {
13273 return nil, err
13274 }
13275 req.Header = reqHeaders
13276 googleapi.Expand(req.URL, map[string]string{
13277 "resource": c.resource,
13278 })
13279 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dataMapperWorkspaces.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes()))
13280 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13281 }
13282
13283 // Do executes the "healthcare.projects.locations.datasets.dataMapperWorkspaces.setIamPolicy" call.
13284 // Any non-2xx status code is an error. Response headers are in either
13285 // *Policy.ServerResponse.Header or (if a response was returned at all) in
13286 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13287 // whether the returned error was because http.StatusNotModified was returned.
13288 func (c *ProjectsLocationsDatasetsDataMapperWorkspacesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
13289 gensupport.SetOptions(c.urlParams_, opts...)
13290 res, err := c.doRequest("json")
13291 if res != nil && res.StatusCode == http.StatusNotModified {
13292 if res.Body != nil {
13293 res.Body.Close()
13294 }
13295 return nil, gensupport.WrapError(&googleapi.Error{
13296 Code: res.StatusCode,
13297 Header: res.Header,
13298 })
13299 }
13300 if err != nil {
13301 return nil, err
13302 }
13303 defer googleapi.CloseBody(res)
13304 if err := googleapi.CheckResponse(res); err != nil {
13305 return nil, gensupport.WrapError(err)
13306 }
13307 ret := &Policy{
13308 ServerResponse: googleapi.ServerResponse{
13309 Header: res.Header,
13310 HTTPStatusCode: res.StatusCode,
13311 },
13312 }
13313 target := &ret
13314 b, err := gensupport.DecodeResponseBytes(target, res)
13315 if err != nil {
13316 return nil, err
13317 }
13318 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dataMapperWorkspaces.setIamPolicy", "response", internallog.HTTPResponse(res, b))
13319 return ret, nil
13320 }
13321
13322 type ProjectsLocationsDatasetsDataMapperWorkspacesTestIamPermissionsCall struct {
13323 s *Service
13324 resource string
13325 testiampermissionsrequest *TestIamPermissionsRequest
13326 urlParams_ gensupport.URLParams
13327 ctx_ context.Context
13328 header_ http.Header
13329 }
13330
13331 // TestIamPermissions: Returns permissions that a caller has on the specified
13332 // resource. If the resource does not exist, this will return an empty set of
13333 // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
13334 // used for building permission-aware UIs and command-line tools, not for
13335 // authorization checking. This operation may "fail open" without warning.
13336 //
13337 // - resource: REQUIRED: The resource for which the policy detail is being
13338 // requested. See Resource names
13339 // (https://cloud.google.com/apis/design/resource_names) for the appropriate
13340 // value for this field.
13341 func (r *ProjectsLocationsDatasetsDataMapperWorkspacesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsDataMapperWorkspacesTestIamPermissionsCall {
13342 c := &ProjectsLocationsDatasetsDataMapperWorkspacesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13343 c.resource = resource
13344 c.testiampermissionsrequest = testiampermissionsrequest
13345 return c
13346 }
13347
13348 // Fields allows partial responses to be retrieved. See
13349 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13350 // details.
13351 func (c *ProjectsLocationsDatasetsDataMapperWorkspacesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataMapperWorkspacesTestIamPermissionsCall {
13352 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13353 return c
13354 }
13355
13356 // Context sets the context to be used in this call's Do method.
13357 func (c *ProjectsLocationsDatasetsDataMapperWorkspacesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataMapperWorkspacesTestIamPermissionsCall {
13358 c.ctx_ = ctx
13359 return c
13360 }
13361
13362 // Header returns a http.Header that can be modified by the caller to add
13363 // headers to the request.
13364 func (c *ProjectsLocationsDatasetsDataMapperWorkspacesTestIamPermissionsCall) Header() http.Header {
13365 if c.header_ == nil {
13366 c.header_ = make(http.Header)
13367 }
13368 return c.header_
13369 }
13370
13371 func (c *ProjectsLocationsDatasetsDataMapperWorkspacesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
13372 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13373 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest)
13374 if err != nil {
13375 return nil, err
13376 }
13377 c.urlParams_.Set("alt", alt)
13378 c.urlParams_.Set("prettyPrint", "false")
13379 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions")
13380 urls += "?" + c.urlParams_.Encode()
13381 req, err := http.NewRequest("POST", urls, body)
13382 if err != nil {
13383 return nil, err
13384 }
13385 req.Header = reqHeaders
13386 googleapi.Expand(req.URL, map[string]string{
13387 "resource": c.resource,
13388 })
13389 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dataMapperWorkspaces.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes()))
13390 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13391 }
13392
13393 // Do executes the "healthcare.projects.locations.datasets.dataMapperWorkspaces.testIamPermissions" call.
13394 // Any non-2xx status code is an error. Response headers are in either
13395 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
13396 // returned at all) in error.(*googleapi.Error).Header. Use
13397 // googleapi.IsNotModified to check whether the returned error was because
13398 // http.StatusNotModified was returned.
13399 func (c *ProjectsLocationsDatasetsDataMapperWorkspacesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
13400 gensupport.SetOptions(c.urlParams_, opts...)
13401 res, err := c.doRequest("json")
13402 if res != nil && res.StatusCode == http.StatusNotModified {
13403 if res.Body != nil {
13404 res.Body.Close()
13405 }
13406 return nil, gensupport.WrapError(&googleapi.Error{
13407 Code: res.StatusCode,
13408 Header: res.Header,
13409 })
13410 }
13411 if err != nil {
13412 return nil, err
13413 }
13414 defer googleapi.CloseBody(res)
13415 if err := googleapi.CheckResponse(res); err != nil {
13416 return nil, gensupport.WrapError(err)
13417 }
13418 ret := &TestIamPermissionsResponse{
13419 ServerResponse: googleapi.ServerResponse{
13420 Header: res.Header,
13421 HTTPStatusCode: res.StatusCode,
13422 },
13423 }
13424 target := &ret
13425 b, err := gensupport.DecodeResponseBytes(target, res)
13426 if err != nil {
13427 return nil, err
13428 }
13429 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dataMapperWorkspaces.testIamPermissions", "response", internallog.HTTPResponse(res, b))
13430 return ret, nil
13431 }
13432
13433 type ProjectsLocationsDatasetsDicomStoresCreateCall struct {
13434 s *Service
13435 parent string
13436 dicomstore *DicomStore
13437 urlParams_ gensupport.URLParams
13438 ctx_ context.Context
13439 header_ http.Header
13440 }
13441
13442 // Create: Creates a new DICOM store within the parent dataset.
13443 //
13444 // - parent: The name of the dataset this DICOM store belongs to.
13445 func (r *ProjectsLocationsDatasetsDicomStoresService) Create(parent string, dicomstore *DicomStore) *ProjectsLocationsDatasetsDicomStoresCreateCall {
13446 c := &ProjectsLocationsDatasetsDicomStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13447 c.parent = parent
13448 c.dicomstore = dicomstore
13449 return c
13450 }
13451
13452 // DicomStoreId sets the optional parameter "dicomStoreId": Required. The ID of
13453 // the DICOM store that is being created. Any string value up to 256 characters
13454 // in length.
13455 func (c *ProjectsLocationsDatasetsDicomStoresCreateCall) DicomStoreId(dicomStoreId string) *ProjectsLocationsDatasetsDicomStoresCreateCall {
13456 c.urlParams_.Set("dicomStoreId", dicomStoreId)
13457 return c
13458 }
13459
13460 // Fields allows partial responses to be retrieved. See
13461 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13462 // details.
13463 func (c *ProjectsLocationsDatasetsDicomStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresCreateCall {
13464 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13465 return c
13466 }
13467
13468 // Context sets the context to be used in this call's Do method.
13469 func (c *ProjectsLocationsDatasetsDicomStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresCreateCall {
13470 c.ctx_ = ctx
13471 return c
13472 }
13473
13474 // Header returns a http.Header that can be modified by the caller to add
13475 // headers to the request.
13476 func (c *ProjectsLocationsDatasetsDicomStoresCreateCall) Header() http.Header {
13477 if c.header_ == nil {
13478 c.header_ = make(http.Header)
13479 }
13480 return c.header_
13481 }
13482
13483 func (c *ProjectsLocationsDatasetsDicomStoresCreateCall) doRequest(alt string) (*http.Response, error) {
13484 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13485 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.dicomstore)
13486 if err != nil {
13487 return nil, err
13488 }
13489 c.urlParams_.Set("alt", alt)
13490 c.urlParams_.Set("prettyPrint", "false")
13491 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/dicomStores")
13492 urls += "?" + c.urlParams_.Encode()
13493 req, err := http.NewRequest("POST", urls, body)
13494 if err != nil {
13495 return nil, err
13496 }
13497 req.Header = reqHeaders
13498 googleapi.Expand(req.URL, map[string]string{
13499 "parent": c.parent,
13500 })
13501 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.create", "request", internallog.HTTPRequest(req, body.Bytes()))
13502 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13503 }
13504
13505 // Do executes the "healthcare.projects.locations.datasets.dicomStores.create" call.
13506 // Any non-2xx status code is an error. Response headers are in either
13507 // *DicomStore.ServerResponse.Header or (if a response was returned at all) in
13508 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13509 // whether the returned error was because http.StatusNotModified was returned.
13510 func (c *ProjectsLocationsDatasetsDicomStoresCreateCall) Do(opts ...googleapi.CallOption) (*DicomStore, error) {
13511 gensupport.SetOptions(c.urlParams_, opts...)
13512 res, err := c.doRequest("json")
13513 if res != nil && res.StatusCode == http.StatusNotModified {
13514 if res.Body != nil {
13515 res.Body.Close()
13516 }
13517 return nil, gensupport.WrapError(&googleapi.Error{
13518 Code: res.StatusCode,
13519 Header: res.Header,
13520 })
13521 }
13522 if err != nil {
13523 return nil, err
13524 }
13525 defer googleapi.CloseBody(res)
13526 if err := googleapi.CheckResponse(res); err != nil {
13527 return nil, gensupport.WrapError(err)
13528 }
13529 ret := &DicomStore{
13530 ServerResponse: googleapi.ServerResponse{
13531 Header: res.Header,
13532 HTTPStatusCode: res.StatusCode,
13533 },
13534 }
13535 target := &ret
13536 b, err := gensupport.DecodeResponseBytes(target, res)
13537 if err != nil {
13538 return nil, err
13539 }
13540 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.create", "response", internallog.HTTPResponse(res, b))
13541 return ret, nil
13542 }
13543
13544 type ProjectsLocationsDatasetsDicomStoresDeidentifyCall struct {
13545 s *Service
13546 sourceStore string
13547 deidentifydicomstorerequest *DeidentifyDicomStoreRequest
13548 urlParams_ gensupport.URLParams
13549 ctx_ context.Context
13550 header_ http.Header
13551 }
13552
13553 // Deidentify: De-identifies data from the source store and writes it to the
13554 // destination store. The metadata field type is OperationMetadata. If the
13555 // request is successful, the response field type is
13556 // DeidentifyDicomStoreSummary. The LRO result may still be successful if
13557 // de-identification fails for some DICOM instances. The output DICOM store
13558 // will not contain these failed resources. The number of resources processed
13559 // are tracked in Operation.metadata. Error details are logged to Cloud
13560 // Logging. For more information, see Viewing error logs in Cloud Logging
13561 // (https://cloud.google.com/healthcare/docs/how-tos/logging).
13562 //
13563 // - sourceStore: Source DICOM store resource name. For example,
13564 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
13565 // tores/{dicom_store_id}`.
13566 func (r *ProjectsLocationsDatasetsDicomStoresService) Deidentify(sourceStore string, deidentifydicomstorerequest *DeidentifyDicomStoreRequest) *ProjectsLocationsDatasetsDicomStoresDeidentifyCall {
13567 c := &ProjectsLocationsDatasetsDicomStoresDeidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13568 c.sourceStore = sourceStore
13569 c.deidentifydicomstorerequest = deidentifydicomstorerequest
13570 return c
13571 }
13572
13573 // Fields allows partial responses to be retrieved. See
13574 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13575 // details.
13576 func (c *ProjectsLocationsDatasetsDicomStoresDeidentifyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDeidentifyCall {
13577 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13578 return c
13579 }
13580
13581 // Context sets the context to be used in this call's Do method.
13582 func (c *ProjectsLocationsDatasetsDicomStoresDeidentifyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDeidentifyCall {
13583 c.ctx_ = ctx
13584 return c
13585 }
13586
13587 // Header returns a http.Header that can be modified by the caller to add
13588 // headers to the request.
13589 func (c *ProjectsLocationsDatasetsDicomStoresDeidentifyCall) Header() http.Header {
13590 if c.header_ == nil {
13591 c.header_ = make(http.Header)
13592 }
13593 return c.header_
13594 }
13595
13596 func (c *ProjectsLocationsDatasetsDicomStoresDeidentifyCall) doRequest(alt string) (*http.Response, error) {
13597 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13598 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.deidentifydicomstorerequest)
13599 if err != nil {
13600 return nil, err
13601 }
13602 c.urlParams_.Set("alt", alt)
13603 c.urlParams_.Set("prettyPrint", "false")
13604 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+sourceStore}:deidentify")
13605 urls += "?" + c.urlParams_.Encode()
13606 req, err := http.NewRequest("POST", urls, body)
13607 if err != nil {
13608 return nil, err
13609 }
13610 req.Header = reqHeaders
13611 googleapi.Expand(req.URL, map[string]string{
13612 "sourceStore": c.sourceStore,
13613 })
13614 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.deidentify", "request", internallog.HTTPRequest(req, body.Bytes()))
13615 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13616 }
13617
13618 // Do executes the "healthcare.projects.locations.datasets.dicomStores.deidentify" call.
13619 // Any non-2xx status code is an error. Response headers are in either
13620 // *Operation.ServerResponse.Header or (if a response was returned at all) in
13621 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13622 // whether the returned error was because http.StatusNotModified was returned.
13623 func (c *ProjectsLocationsDatasetsDicomStoresDeidentifyCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
13624 gensupport.SetOptions(c.urlParams_, opts...)
13625 res, err := c.doRequest("json")
13626 if res != nil && res.StatusCode == http.StatusNotModified {
13627 if res.Body != nil {
13628 res.Body.Close()
13629 }
13630 return nil, gensupport.WrapError(&googleapi.Error{
13631 Code: res.StatusCode,
13632 Header: res.Header,
13633 })
13634 }
13635 if err != nil {
13636 return nil, err
13637 }
13638 defer googleapi.CloseBody(res)
13639 if err := googleapi.CheckResponse(res); err != nil {
13640 return nil, gensupport.WrapError(err)
13641 }
13642 ret := &Operation{
13643 ServerResponse: googleapi.ServerResponse{
13644 Header: res.Header,
13645 HTTPStatusCode: res.StatusCode,
13646 },
13647 }
13648 target := &ret
13649 b, err := gensupport.DecodeResponseBytes(target, res)
13650 if err != nil {
13651 return nil, err
13652 }
13653 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.deidentify", "response", internallog.HTTPResponse(res, b))
13654 return ret, nil
13655 }
13656
13657 type ProjectsLocationsDatasetsDicomStoresDeleteCall struct {
13658 s *Service
13659 name string
13660 urlParams_ gensupport.URLParams
13661 ctx_ context.Context
13662 header_ http.Header
13663 }
13664
13665 // Delete: Deletes the specified DICOM store and removes all images that are
13666 // contained within it.
13667 //
13668 // - name: The resource name of the DICOM store to delete.
13669 func (r *ProjectsLocationsDatasetsDicomStoresService) Delete(name string) *ProjectsLocationsDatasetsDicomStoresDeleteCall {
13670 c := &ProjectsLocationsDatasetsDicomStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13671 c.name = name
13672 return c
13673 }
13674
13675 // Fields allows partial responses to be retrieved. See
13676 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13677 // details.
13678 func (c *ProjectsLocationsDatasetsDicomStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDeleteCall {
13679 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13680 return c
13681 }
13682
13683 // Context sets the context to be used in this call's Do method.
13684 func (c *ProjectsLocationsDatasetsDicomStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDeleteCall {
13685 c.ctx_ = ctx
13686 return c
13687 }
13688
13689 // Header returns a http.Header that can be modified by the caller to add
13690 // headers to the request.
13691 func (c *ProjectsLocationsDatasetsDicomStoresDeleteCall) Header() http.Header {
13692 if c.header_ == nil {
13693 c.header_ = make(http.Header)
13694 }
13695 return c.header_
13696 }
13697
13698 func (c *ProjectsLocationsDatasetsDicomStoresDeleteCall) doRequest(alt string) (*http.Response, error) {
13699 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13700 c.urlParams_.Set("alt", alt)
13701 c.urlParams_.Set("prettyPrint", "false")
13702 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
13703 urls += "?" + c.urlParams_.Encode()
13704 req, err := http.NewRequest("DELETE", urls, nil)
13705 if err != nil {
13706 return nil, err
13707 }
13708 req.Header = reqHeaders
13709 googleapi.Expand(req.URL, map[string]string{
13710 "name": c.name,
13711 })
13712 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.delete", "request", internallog.HTTPRequest(req, nil))
13713 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13714 }
13715
13716 // Do executes the "healthcare.projects.locations.datasets.dicomStores.delete" call.
13717 // Any non-2xx status code is an error. Response headers are in either
13718 // *Empty.ServerResponse.Header or (if a response was returned at all) in
13719 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13720 // whether the returned error was because http.StatusNotModified was returned.
13721 func (c *ProjectsLocationsDatasetsDicomStoresDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
13722 gensupport.SetOptions(c.urlParams_, opts...)
13723 res, err := c.doRequest("json")
13724 if res != nil && res.StatusCode == http.StatusNotModified {
13725 if res.Body != nil {
13726 res.Body.Close()
13727 }
13728 return nil, gensupport.WrapError(&googleapi.Error{
13729 Code: res.StatusCode,
13730 Header: res.Header,
13731 })
13732 }
13733 if err != nil {
13734 return nil, err
13735 }
13736 defer googleapi.CloseBody(res)
13737 if err := googleapi.CheckResponse(res); err != nil {
13738 return nil, gensupport.WrapError(err)
13739 }
13740 ret := &Empty{
13741 ServerResponse: googleapi.ServerResponse{
13742 Header: res.Header,
13743 HTTPStatusCode: res.StatusCode,
13744 },
13745 }
13746 target := &ret
13747 b, err := gensupport.DecodeResponseBytes(target, res)
13748 if err != nil {
13749 return nil, err
13750 }
13751 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.delete", "response", internallog.HTTPResponse(res, b))
13752 return ret, nil
13753 }
13754
13755 type ProjectsLocationsDatasetsDicomStoresExportCall struct {
13756 s *Service
13757 name string
13758 exportdicomdatarequest *ExportDicomDataRequest
13759 urlParams_ gensupport.URLParams
13760 ctx_ context.Context
13761 header_ http.Header
13762 }
13763
13764 // Export: Exports data to the specified destination by copying it from the
13765 // DICOM store. Errors are also logged to Cloud Logging. For more information,
13766 // see Viewing errors in Cloud Logging
13767 // (https://cloud.google.com/healthcare/docs/how-tos/logging). The metadata
13768 // field type is OperationMetadata.
13769 //
13770 // - name: The DICOM store resource name from which to export the data. For
13771 // example,
13772 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
13773 // tores/{dicom_store_id}`.
13774 func (r *ProjectsLocationsDatasetsDicomStoresService) Export(name string, exportdicomdatarequest *ExportDicomDataRequest) *ProjectsLocationsDatasetsDicomStoresExportCall {
13775 c := &ProjectsLocationsDatasetsDicomStoresExportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13776 c.name = name
13777 c.exportdicomdatarequest = exportdicomdatarequest
13778 return c
13779 }
13780
13781 // Fields allows partial responses to be retrieved. See
13782 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13783 // details.
13784 func (c *ProjectsLocationsDatasetsDicomStoresExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresExportCall {
13785 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13786 return c
13787 }
13788
13789 // Context sets the context to be used in this call's Do method.
13790 func (c *ProjectsLocationsDatasetsDicomStoresExportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresExportCall {
13791 c.ctx_ = ctx
13792 return c
13793 }
13794
13795 // Header returns a http.Header that can be modified by the caller to add
13796 // headers to the request.
13797 func (c *ProjectsLocationsDatasetsDicomStoresExportCall) Header() http.Header {
13798 if c.header_ == nil {
13799 c.header_ = make(http.Header)
13800 }
13801 return c.header_
13802 }
13803
13804 func (c *ProjectsLocationsDatasetsDicomStoresExportCall) doRequest(alt string) (*http.Response, error) {
13805 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13806 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.exportdicomdatarequest)
13807 if err != nil {
13808 return nil, err
13809 }
13810 c.urlParams_.Set("alt", alt)
13811 c.urlParams_.Set("prettyPrint", "false")
13812 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:export")
13813 urls += "?" + c.urlParams_.Encode()
13814 req, err := http.NewRequest("POST", urls, body)
13815 if err != nil {
13816 return nil, err
13817 }
13818 req.Header = reqHeaders
13819 googleapi.Expand(req.URL, map[string]string{
13820 "name": c.name,
13821 })
13822 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.export", "request", internallog.HTTPRequest(req, body.Bytes()))
13823 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13824 }
13825
13826 // Do executes the "healthcare.projects.locations.datasets.dicomStores.export" call.
13827 // Any non-2xx status code is an error. Response headers are in either
13828 // *Operation.ServerResponse.Header or (if a response was returned at all) in
13829 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13830 // whether the returned error was because http.StatusNotModified was returned.
13831 func (c *ProjectsLocationsDatasetsDicomStoresExportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
13832 gensupport.SetOptions(c.urlParams_, opts...)
13833 res, err := c.doRequest("json")
13834 if res != nil && res.StatusCode == http.StatusNotModified {
13835 if res.Body != nil {
13836 res.Body.Close()
13837 }
13838 return nil, gensupport.WrapError(&googleapi.Error{
13839 Code: res.StatusCode,
13840 Header: res.Header,
13841 })
13842 }
13843 if err != nil {
13844 return nil, err
13845 }
13846 defer googleapi.CloseBody(res)
13847 if err := googleapi.CheckResponse(res); err != nil {
13848 return nil, gensupport.WrapError(err)
13849 }
13850 ret := &Operation{
13851 ServerResponse: googleapi.ServerResponse{
13852 Header: res.Header,
13853 HTTPStatusCode: res.StatusCode,
13854 },
13855 }
13856 target := &ret
13857 b, err := gensupport.DecodeResponseBytes(target, res)
13858 if err != nil {
13859 return nil, err
13860 }
13861 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.export", "response", internallog.HTTPResponse(res, b))
13862 return ret, nil
13863 }
13864
13865 type ProjectsLocationsDatasetsDicomStoresGetCall struct {
13866 s *Service
13867 name string
13868 urlParams_ gensupport.URLParams
13869 ifNoneMatch_ string
13870 ctx_ context.Context
13871 header_ http.Header
13872 }
13873
13874 // Get: Gets the specified DICOM store.
13875 //
13876 // - name: The resource name of the DICOM store to get.
13877 func (r *ProjectsLocationsDatasetsDicomStoresService) Get(name string) *ProjectsLocationsDatasetsDicomStoresGetCall {
13878 c := &ProjectsLocationsDatasetsDicomStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13879 c.name = name
13880 return c
13881 }
13882
13883 // Fields allows partial responses to be retrieved. See
13884 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13885 // details.
13886 func (c *ProjectsLocationsDatasetsDicomStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresGetCall {
13887 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13888 return c
13889 }
13890
13891 // IfNoneMatch sets an optional parameter which makes the operation fail if the
13892 // object's ETag matches the given value. This is useful for getting updates
13893 // only after the object has changed since the last request.
13894 func (c *ProjectsLocationsDatasetsDicomStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresGetCall {
13895 c.ifNoneMatch_ = entityTag
13896 return c
13897 }
13898
13899 // Context sets the context to be used in this call's Do method.
13900 func (c *ProjectsLocationsDatasetsDicomStoresGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresGetCall {
13901 c.ctx_ = ctx
13902 return c
13903 }
13904
13905 // Header returns a http.Header that can be modified by the caller to add
13906 // headers to the request.
13907 func (c *ProjectsLocationsDatasetsDicomStoresGetCall) Header() http.Header {
13908 if c.header_ == nil {
13909 c.header_ = make(http.Header)
13910 }
13911 return c.header_
13912 }
13913
13914 func (c *ProjectsLocationsDatasetsDicomStoresGetCall) doRequest(alt string) (*http.Response, error) {
13915 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13916 if c.ifNoneMatch_ != "" {
13917 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13918 }
13919 c.urlParams_.Set("alt", alt)
13920 c.urlParams_.Set("prettyPrint", "false")
13921 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
13922 urls += "?" + c.urlParams_.Encode()
13923 req, err := http.NewRequest("GET", urls, nil)
13924 if err != nil {
13925 return nil, err
13926 }
13927 req.Header = reqHeaders
13928 googleapi.Expand(req.URL, map[string]string{
13929 "name": c.name,
13930 })
13931 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.get", "request", internallog.HTTPRequest(req, nil))
13932 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13933 }
13934
13935 // Do executes the "healthcare.projects.locations.datasets.dicomStores.get" call.
13936 // Any non-2xx status code is an error. Response headers are in either
13937 // *DicomStore.ServerResponse.Header or (if a response was returned at all) in
13938 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13939 // whether the returned error was because http.StatusNotModified was returned.
13940 func (c *ProjectsLocationsDatasetsDicomStoresGetCall) Do(opts ...googleapi.CallOption) (*DicomStore, error) {
13941 gensupport.SetOptions(c.urlParams_, opts...)
13942 res, err := c.doRequest("json")
13943 if res != nil && res.StatusCode == http.StatusNotModified {
13944 if res.Body != nil {
13945 res.Body.Close()
13946 }
13947 return nil, gensupport.WrapError(&googleapi.Error{
13948 Code: res.StatusCode,
13949 Header: res.Header,
13950 })
13951 }
13952 if err != nil {
13953 return nil, err
13954 }
13955 defer googleapi.CloseBody(res)
13956 if err := googleapi.CheckResponse(res); err != nil {
13957 return nil, gensupport.WrapError(err)
13958 }
13959 ret := &DicomStore{
13960 ServerResponse: googleapi.ServerResponse{
13961 Header: res.Header,
13962 HTTPStatusCode: res.StatusCode,
13963 },
13964 }
13965 target := &ret
13966 b, err := gensupport.DecodeResponseBytes(target, res)
13967 if err != nil {
13968 return nil, err
13969 }
13970 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.get", "response", internallog.HTTPResponse(res, b))
13971 return ret, nil
13972 }
13973
13974 type ProjectsLocationsDatasetsDicomStoresGetDICOMStoreMetricsCall struct {
13975 s *Service
13976 name string
13977 urlParams_ gensupport.URLParams
13978 ifNoneMatch_ string
13979 ctx_ context.Context
13980 header_ http.Header
13981 }
13982
13983 // GetDICOMStoreMetrics: Gets metrics associated with the DICOM store.
13984 //
13985 // - name: The resource name of the DICOM store to get metrics for.
13986 func (r *ProjectsLocationsDatasetsDicomStoresService) GetDICOMStoreMetrics(name string) *ProjectsLocationsDatasetsDicomStoresGetDICOMStoreMetricsCall {
13987 c := &ProjectsLocationsDatasetsDicomStoresGetDICOMStoreMetricsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13988 c.name = name
13989 return c
13990 }
13991
13992 // Fields allows partial responses to be retrieved. See
13993 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13994 // details.
13995 func (c *ProjectsLocationsDatasetsDicomStoresGetDICOMStoreMetricsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresGetDICOMStoreMetricsCall {
13996 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13997 return c
13998 }
13999
14000 // IfNoneMatch sets an optional parameter which makes the operation fail if the
14001 // object's ETag matches the given value. This is useful for getting updates
14002 // only after the object has changed since the last request.
14003 func (c *ProjectsLocationsDatasetsDicomStoresGetDICOMStoreMetricsCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresGetDICOMStoreMetricsCall {
14004 c.ifNoneMatch_ = entityTag
14005 return c
14006 }
14007
14008 // Context sets the context to be used in this call's Do method.
14009 func (c *ProjectsLocationsDatasetsDicomStoresGetDICOMStoreMetricsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresGetDICOMStoreMetricsCall {
14010 c.ctx_ = ctx
14011 return c
14012 }
14013
14014 // Header returns a http.Header that can be modified by the caller to add
14015 // headers to the request.
14016 func (c *ProjectsLocationsDatasetsDicomStoresGetDICOMStoreMetricsCall) Header() http.Header {
14017 if c.header_ == nil {
14018 c.header_ = make(http.Header)
14019 }
14020 return c.header_
14021 }
14022
14023 func (c *ProjectsLocationsDatasetsDicomStoresGetDICOMStoreMetricsCall) doRequest(alt string) (*http.Response, error) {
14024 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14025 if c.ifNoneMatch_ != "" {
14026 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14027 }
14028 c.urlParams_.Set("alt", alt)
14029 c.urlParams_.Set("prettyPrint", "false")
14030 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:getDICOMStoreMetrics")
14031 urls += "?" + c.urlParams_.Encode()
14032 req, err := http.NewRequest("GET", urls, nil)
14033 if err != nil {
14034 return nil, err
14035 }
14036 req.Header = reqHeaders
14037 googleapi.Expand(req.URL, map[string]string{
14038 "name": c.name,
14039 })
14040 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.getDICOMStoreMetrics", "request", internallog.HTTPRequest(req, nil))
14041 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14042 }
14043
14044 // Do executes the "healthcare.projects.locations.datasets.dicomStores.getDICOMStoreMetrics" call.
14045 // Any non-2xx status code is an error. Response headers are in either
14046 // *DicomStoreMetrics.ServerResponse.Header or (if a response was returned at
14047 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
14048 // check whether the returned error was because http.StatusNotModified was
14049 // returned.
14050 func (c *ProjectsLocationsDatasetsDicomStoresGetDICOMStoreMetricsCall) Do(opts ...googleapi.CallOption) (*DicomStoreMetrics, error) {
14051 gensupport.SetOptions(c.urlParams_, opts...)
14052 res, err := c.doRequest("json")
14053 if res != nil && res.StatusCode == http.StatusNotModified {
14054 if res.Body != nil {
14055 res.Body.Close()
14056 }
14057 return nil, gensupport.WrapError(&googleapi.Error{
14058 Code: res.StatusCode,
14059 Header: res.Header,
14060 })
14061 }
14062 if err != nil {
14063 return nil, err
14064 }
14065 defer googleapi.CloseBody(res)
14066 if err := googleapi.CheckResponse(res); err != nil {
14067 return nil, gensupport.WrapError(err)
14068 }
14069 ret := &DicomStoreMetrics{
14070 ServerResponse: googleapi.ServerResponse{
14071 Header: res.Header,
14072 HTTPStatusCode: res.StatusCode,
14073 },
14074 }
14075 target := &ret
14076 b, err := gensupport.DecodeResponseBytes(target, res)
14077 if err != nil {
14078 return nil, err
14079 }
14080 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.getDICOMStoreMetrics", "response", internallog.HTTPResponse(res, b))
14081 return ret, nil
14082 }
14083
14084 type ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall struct {
14085 s *Service
14086 resource string
14087 urlParams_ gensupport.URLParams
14088 ifNoneMatch_ string
14089 ctx_ context.Context
14090 header_ http.Header
14091 }
14092
14093 // GetIamPolicy: Gets the access control policy for a resource. Returns an
14094 // empty policy if the resource exists and does not have a policy set.
14095 //
14096 // - resource: REQUIRED: The resource for which the policy is being requested.
14097 // See Resource names (https://cloud.google.com/apis/design/resource_names)
14098 // for the appropriate value for this field.
14099 func (r *ProjectsLocationsDatasetsDicomStoresService) GetIamPolicy(resource string) *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall {
14100 c := &ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14101 c.resource = resource
14102 return c
14103 }
14104
14105 // OptionsRequestedPolicyVersion sets the optional parameter
14106 // "options.requestedPolicyVersion": The maximum policy version that will be
14107 // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
14108 // an invalid value will be rejected. Requests for policies with any
14109 // conditional role bindings must specify version 3. Policies with no
14110 // conditional role bindings may specify any valid value or leave the field
14111 // unset. The policy in the response might use the policy version that you
14112 // specified, or it might use a lower policy version. For example, if you
14113 // specify version 3, but the policy has no conditional role bindings, the
14114 // response uses version 1. To learn which resources support conditions in
14115 // their IAM policies, see the IAM documentation
14116 // (https://cloud.google.com/iam/help/conditions/resource-policies).
14117 func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall {
14118 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
14119 return c
14120 }
14121
14122 // Fields allows partial responses to be retrieved. See
14123 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14124 // details.
14125 func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall {
14126 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14127 return c
14128 }
14129
14130 // IfNoneMatch sets an optional parameter which makes the operation fail if the
14131 // object's ETag matches the given value. This is useful for getting updates
14132 // only after the object has changed since the last request.
14133 func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall {
14134 c.ifNoneMatch_ = entityTag
14135 return c
14136 }
14137
14138 // Context sets the context to be used in this call's Do method.
14139 func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall {
14140 c.ctx_ = ctx
14141 return c
14142 }
14143
14144 // Header returns a http.Header that can be modified by the caller to add
14145 // headers to the request.
14146 func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) Header() http.Header {
14147 if c.header_ == nil {
14148 c.header_ = make(http.Header)
14149 }
14150 return c.header_
14151 }
14152
14153 func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
14154 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14155 if c.ifNoneMatch_ != "" {
14156 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14157 }
14158 c.urlParams_.Set("alt", alt)
14159 c.urlParams_.Set("prettyPrint", "false")
14160 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy")
14161 urls += "?" + c.urlParams_.Encode()
14162 req, err := http.NewRequest("GET", urls, nil)
14163 if err != nil {
14164 return nil, err
14165 }
14166 req.Header = reqHeaders
14167 googleapi.Expand(req.URL, map[string]string{
14168 "resource": c.resource,
14169 })
14170 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.getIamPolicy", "request", internallog.HTTPRequest(req, nil))
14171 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14172 }
14173
14174 // Do executes the "healthcare.projects.locations.datasets.dicomStores.getIamPolicy" call.
14175 // Any non-2xx status code is an error. Response headers are in either
14176 // *Policy.ServerResponse.Header or (if a response was returned at all) in
14177 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14178 // whether the returned error was because http.StatusNotModified was returned.
14179 func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
14180 gensupport.SetOptions(c.urlParams_, opts...)
14181 res, err := c.doRequest("json")
14182 if res != nil && res.StatusCode == http.StatusNotModified {
14183 if res.Body != nil {
14184 res.Body.Close()
14185 }
14186 return nil, gensupport.WrapError(&googleapi.Error{
14187 Code: res.StatusCode,
14188 Header: res.Header,
14189 })
14190 }
14191 if err != nil {
14192 return nil, err
14193 }
14194 defer googleapi.CloseBody(res)
14195 if err := googleapi.CheckResponse(res); err != nil {
14196 return nil, gensupport.WrapError(err)
14197 }
14198 ret := &Policy{
14199 ServerResponse: googleapi.ServerResponse{
14200 Header: res.Header,
14201 HTTPStatusCode: res.StatusCode,
14202 },
14203 }
14204 target := &ret
14205 b, err := gensupport.DecodeResponseBytes(target, res)
14206 if err != nil {
14207 return nil, err
14208 }
14209 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.getIamPolicy", "response", internallog.HTTPResponse(res, b))
14210 return ret, nil
14211 }
14212
14213 type ProjectsLocationsDatasetsDicomStoresImportCall struct {
14214 s *Service
14215 name string
14216 importdicomdatarequest *ImportDicomDataRequest
14217 urlParams_ gensupport.URLParams
14218 ctx_ context.Context
14219 header_ http.Header
14220 }
14221
14222 // Import: Imports data into the DICOM store by copying it from the specified
14223 // source. Errors are logged to Cloud Logging. For more information, see
14224 // Viewing error logs in Cloud Logging
14225 // (https://cloud.google.com/healthcare/docs/how-tos/logging). The metadata
14226 // field type is OperationMetadata.
14227 //
14228 // - name: The name of the DICOM store resource into which the data is
14229 // imported. For example,
14230 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
14231 // tores/{dicom_store_id}`.
14232 func (r *ProjectsLocationsDatasetsDicomStoresService) Import(name string, importdicomdatarequest *ImportDicomDataRequest) *ProjectsLocationsDatasetsDicomStoresImportCall {
14233 c := &ProjectsLocationsDatasetsDicomStoresImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14234 c.name = name
14235 c.importdicomdatarequest = importdicomdatarequest
14236 return c
14237 }
14238
14239 // Fields allows partial responses to be retrieved. See
14240 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14241 // details.
14242 func (c *ProjectsLocationsDatasetsDicomStoresImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresImportCall {
14243 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14244 return c
14245 }
14246
14247 // Context sets the context to be used in this call's Do method.
14248 func (c *ProjectsLocationsDatasetsDicomStoresImportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresImportCall {
14249 c.ctx_ = ctx
14250 return c
14251 }
14252
14253 // Header returns a http.Header that can be modified by the caller to add
14254 // headers to the request.
14255 func (c *ProjectsLocationsDatasetsDicomStoresImportCall) Header() http.Header {
14256 if c.header_ == nil {
14257 c.header_ = make(http.Header)
14258 }
14259 return c.header_
14260 }
14261
14262 func (c *ProjectsLocationsDatasetsDicomStoresImportCall) doRequest(alt string) (*http.Response, error) {
14263 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14264 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.importdicomdatarequest)
14265 if err != nil {
14266 return nil, err
14267 }
14268 c.urlParams_.Set("alt", alt)
14269 c.urlParams_.Set("prettyPrint", "false")
14270 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:import")
14271 urls += "?" + c.urlParams_.Encode()
14272 req, err := http.NewRequest("POST", urls, body)
14273 if err != nil {
14274 return nil, err
14275 }
14276 req.Header = reqHeaders
14277 googleapi.Expand(req.URL, map[string]string{
14278 "name": c.name,
14279 })
14280 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.import", "request", internallog.HTTPRequest(req, body.Bytes()))
14281 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14282 }
14283
14284 // Do executes the "healthcare.projects.locations.datasets.dicomStores.import" call.
14285 // Any non-2xx status code is an error. Response headers are in either
14286 // *Operation.ServerResponse.Header or (if a response was returned at all) in
14287 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14288 // whether the returned error was because http.StatusNotModified was returned.
14289 func (c *ProjectsLocationsDatasetsDicomStoresImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
14290 gensupport.SetOptions(c.urlParams_, opts...)
14291 res, err := c.doRequest("json")
14292 if res != nil && res.StatusCode == http.StatusNotModified {
14293 if res.Body != nil {
14294 res.Body.Close()
14295 }
14296 return nil, gensupport.WrapError(&googleapi.Error{
14297 Code: res.StatusCode,
14298 Header: res.Header,
14299 })
14300 }
14301 if err != nil {
14302 return nil, err
14303 }
14304 defer googleapi.CloseBody(res)
14305 if err := googleapi.CheckResponse(res); err != nil {
14306 return nil, gensupport.WrapError(err)
14307 }
14308 ret := &Operation{
14309 ServerResponse: googleapi.ServerResponse{
14310 Header: res.Header,
14311 HTTPStatusCode: res.StatusCode,
14312 },
14313 }
14314 target := &ret
14315 b, err := gensupport.DecodeResponseBytes(target, res)
14316 if err != nil {
14317 return nil, err
14318 }
14319 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.import", "response", internallog.HTTPResponse(res, b))
14320 return ret, nil
14321 }
14322
14323 type ProjectsLocationsDatasetsDicomStoresListCall struct {
14324 s *Service
14325 parent string
14326 urlParams_ gensupport.URLParams
14327 ifNoneMatch_ string
14328 ctx_ context.Context
14329 header_ http.Header
14330 }
14331
14332 // List: Lists the DICOM stores in the given dataset.
14333 //
14334 // - parent: Name of the dataset.
14335 func (r *ProjectsLocationsDatasetsDicomStoresService) List(parent string) *ProjectsLocationsDatasetsDicomStoresListCall {
14336 c := &ProjectsLocationsDatasetsDicomStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14337 c.parent = parent
14338 return c
14339 }
14340
14341 // Filter sets the optional parameter "filter": Restricts stores returned to
14342 // those matching a filter. The following syntax is available: * A string field
14343 // value can be written as text inside quotation marks, for example "query
14344 // text". The only valid relational operation for text fields is equality
14345 // (`=`), where text is searched within the field, rather than having the field
14346 // be equal to the text. For example, "Comment = great" returns messages with
14347 // `great` in the comment field. * A number field value can be written as an
14348 // integer, a decimal, or an exponential. The valid relational operators for
14349 // number fields are the equality operator (`=`), along with the less
14350 // than/greater than operators (`<`, `<=`, `>`, `>=`). Note that there is no
14351 // inequality (`!=`) operator. You can prepend the `NOT` operator to an
14352 // expression to negate it. * A date field value must be written in
14353 // `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format.
14354 // Leading zeros are required for one-digit months and days. The valid
14355 // relational operators for date fields are the equality operator (`=`) , along
14356 // with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that
14357 // there is no inequality (`!=`) operator. You can prepend the `NOT` operator
14358 // to an expression to negate it. * Multiple field query expressions can be
14359 // combined in one query by adding `AND` or `OR` operators between the
14360 // expressions. If a boolean operator appears within a quoted string, it is not
14361 // treated as special, it's just another part of the character string to be
14362 // matched. You can prepend the `NOT` operator to an expression to negate it.
14363 // Only filtering on labels is supported. For example, `labels.key=value`.
14364 func (c *ProjectsLocationsDatasetsDicomStoresListCall) Filter(filter string) *ProjectsLocationsDatasetsDicomStoresListCall {
14365 c.urlParams_.Set("filter", filter)
14366 return c
14367 }
14368
14369 // PageSize sets the optional parameter "pageSize": Limit on the number of
14370 // DICOM stores to return in a single response. If not specified, 100 is used.
14371 // May not be larger than 1000.
14372 func (c *ProjectsLocationsDatasetsDicomStoresListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsDicomStoresListCall {
14373 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
14374 return c
14375 }
14376
14377 // PageToken sets the optional parameter "pageToken": The next_page_token value
14378 // returned from the previous List request, if any.
14379 func (c *ProjectsLocationsDatasetsDicomStoresListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsDicomStoresListCall {
14380 c.urlParams_.Set("pageToken", pageToken)
14381 return c
14382 }
14383
14384 // Fields allows partial responses to be retrieved. See
14385 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14386 // details.
14387 func (c *ProjectsLocationsDatasetsDicomStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresListCall {
14388 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14389 return c
14390 }
14391
14392 // IfNoneMatch sets an optional parameter which makes the operation fail if the
14393 // object's ETag matches the given value. This is useful for getting updates
14394 // only after the object has changed since the last request.
14395 func (c *ProjectsLocationsDatasetsDicomStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresListCall {
14396 c.ifNoneMatch_ = entityTag
14397 return c
14398 }
14399
14400 // Context sets the context to be used in this call's Do method.
14401 func (c *ProjectsLocationsDatasetsDicomStoresListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresListCall {
14402 c.ctx_ = ctx
14403 return c
14404 }
14405
14406 // Header returns a http.Header that can be modified by the caller to add
14407 // headers to the request.
14408 func (c *ProjectsLocationsDatasetsDicomStoresListCall) Header() http.Header {
14409 if c.header_ == nil {
14410 c.header_ = make(http.Header)
14411 }
14412 return c.header_
14413 }
14414
14415 func (c *ProjectsLocationsDatasetsDicomStoresListCall) doRequest(alt string) (*http.Response, error) {
14416 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14417 if c.ifNoneMatch_ != "" {
14418 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14419 }
14420 c.urlParams_.Set("alt", alt)
14421 c.urlParams_.Set("prettyPrint", "false")
14422 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/dicomStores")
14423 urls += "?" + c.urlParams_.Encode()
14424 req, err := http.NewRequest("GET", urls, nil)
14425 if err != nil {
14426 return nil, err
14427 }
14428 req.Header = reqHeaders
14429 googleapi.Expand(req.URL, map[string]string{
14430 "parent": c.parent,
14431 })
14432 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.list", "request", internallog.HTTPRequest(req, nil))
14433 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14434 }
14435
14436 // Do executes the "healthcare.projects.locations.datasets.dicomStores.list" call.
14437 // Any non-2xx status code is an error. Response headers are in either
14438 // *ListDicomStoresResponse.ServerResponse.Header or (if a response was
14439 // returned at all) in error.(*googleapi.Error).Header. Use
14440 // googleapi.IsNotModified to check whether the returned error was because
14441 // http.StatusNotModified was returned.
14442 func (c *ProjectsLocationsDatasetsDicomStoresListCall) Do(opts ...googleapi.CallOption) (*ListDicomStoresResponse, error) {
14443 gensupport.SetOptions(c.urlParams_, opts...)
14444 res, err := c.doRequest("json")
14445 if res != nil && res.StatusCode == http.StatusNotModified {
14446 if res.Body != nil {
14447 res.Body.Close()
14448 }
14449 return nil, gensupport.WrapError(&googleapi.Error{
14450 Code: res.StatusCode,
14451 Header: res.Header,
14452 })
14453 }
14454 if err != nil {
14455 return nil, err
14456 }
14457 defer googleapi.CloseBody(res)
14458 if err := googleapi.CheckResponse(res); err != nil {
14459 return nil, gensupport.WrapError(err)
14460 }
14461 ret := &ListDicomStoresResponse{
14462 ServerResponse: googleapi.ServerResponse{
14463 Header: res.Header,
14464 HTTPStatusCode: res.StatusCode,
14465 },
14466 }
14467 target := &ret
14468 b, err := gensupport.DecodeResponseBytes(target, res)
14469 if err != nil {
14470 return nil, err
14471 }
14472 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.list", "response", internallog.HTTPResponse(res, b))
14473 return ret, nil
14474 }
14475
14476 // Pages invokes f for each page of results.
14477 // A non-nil error returned from f will halt the iteration.
14478 // The provided context supersedes any context provided to the Context method.
14479 func (c *ProjectsLocationsDatasetsDicomStoresListCall) Pages(ctx context.Context, f func(*ListDicomStoresResponse) error) error {
14480 c.ctx_ = ctx
14481 defer c.PageToken(c.urlParams_.Get("pageToken"))
14482 for {
14483 x, err := c.Do()
14484 if err != nil {
14485 return err
14486 }
14487 if err := f(x); err != nil {
14488 return err
14489 }
14490 if x.NextPageToken == "" {
14491 return nil
14492 }
14493 c.PageToken(x.NextPageToken)
14494 }
14495 }
14496
14497 type ProjectsLocationsDatasetsDicomStoresPatchCall struct {
14498 s *Service
14499 name string
14500 dicomstore *DicomStore
14501 urlParams_ gensupport.URLParams
14502 ctx_ context.Context
14503 header_ http.Header
14504 }
14505
14506 // Patch: Updates the specified DICOM store.
14507 //
14508 // - name: Identifier. Resource name of the DICOM store, of the form
14509 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
14510 // tores/{dicom_store_id}`.
14511 func (r *ProjectsLocationsDatasetsDicomStoresService) Patch(name string, dicomstore *DicomStore) *ProjectsLocationsDatasetsDicomStoresPatchCall {
14512 c := &ProjectsLocationsDatasetsDicomStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14513 c.name = name
14514 c.dicomstore = dicomstore
14515 return c
14516 }
14517
14518 // UpdateMask sets the optional parameter "updateMask": The update mask applies
14519 // to the resource. For the `FieldMask` definition, see
14520 // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
14521 func (c *ProjectsLocationsDatasetsDicomStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsDicomStoresPatchCall {
14522 c.urlParams_.Set("updateMask", updateMask)
14523 return c
14524 }
14525
14526 // Fields allows partial responses to be retrieved. See
14527 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14528 // details.
14529 func (c *ProjectsLocationsDatasetsDicomStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresPatchCall {
14530 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14531 return c
14532 }
14533
14534 // Context sets the context to be used in this call's Do method.
14535 func (c *ProjectsLocationsDatasetsDicomStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresPatchCall {
14536 c.ctx_ = ctx
14537 return c
14538 }
14539
14540 // Header returns a http.Header that can be modified by the caller to add
14541 // headers to the request.
14542 func (c *ProjectsLocationsDatasetsDicomStoresPatchCall) Header() http.Header {
14543 if c.header_ == nil {
14544 c.header_ = make(http.Header)
14545 }
14546 return c.header_
14547 }
14548
14549 func (c *ProjectsLocationsDatasetsDicomStoresPatchCall) doRequest(alt string) (*http.Response, error) {
14550 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14551 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.dicomstore)
14552 if err != nil {
14553 return nil, err
14554 }
14555 c.urlParams_.Set("alt", alt)
14556 c.urlParams_.Set("prettyPrint", "false")
14557 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
14558 urls += "?" + c.urlParams_.Encode()
14559 req, err := http.NewRequest("PATCH", urls, body)
14560 if err != nil {
14561 return nil, err
14562 }
14563 req.Header = reqHeaders
14564 googleapi.Expand(req.URL, map[string]string{
14565 "name": c.name,
14566 })
14567 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
14568 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14569 }
14570
14571 // Do executes the "healthcare.projects.locations.datasets.dicomStores.patch" call.
14572 // Any non-2xx status code is an error. Response headers are in either
14573 // *DicomStore.ServerResponse.Header or (if a response was returned at all) in
14574 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14575 // whether the returned error was because http.StatusNotModified was returned.
14576 func (c *ProjectsLocationsDatasetsDicomStoresPatchCall) Do(opts ...googleapi.CallOption) (*DicomStore, error) {
14577 gensupport.SetOptions(c.urlParams_, opts...)
14578 res, err := c.doRequest("json")
14579 if res != nil && res.StatusCode == http.StatusNotModified {
14580 if res.Body != nil {
14581 res.Body.Close()
14582 }
14583 return nil, gensupport.WrapError(&googleapi.Error{
14584 Code: res.StatusCode,
14585 Header: res.Header,
14586 })
14587 }
14588 if err != nil {
14589 return nil, err
14590 }
14591 defer googleapi.CloseBody(res)
14592 if err := googleapi.CheckResponse(res); err != nil {
14593 return nil, gensupport.WrapError(err)
14594 }
14595 ret := &DicomStore{
14596 ServerResponse: googleapi.ServerResponse{
14597 Header: res.Header,
14598 HTTPStatusCode: res.StatusCode,
14599 },
14600 }
14601 target := &ret
14602 b, err := gensupport.DecodeResponseBytes(target, res)
14603 if err != nil {
14604 return nil, err
14605 }
14606 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.patch", "response", internallog.HTTPResponse(res, b))
14607 return ret, nil
14608 }
14609
14610 type ProjectsLocationsDatasetsDicomStoresSearchForInstancesCall struct {
14611 s *Service
14612 parent string
14613 dicomWebPath string
14614 urlParams_ gensupport.URLParams
14615 ifNoneMatch_ string
14616 ctx_ context.Context
14617 header_ http.Header
14618 }
14619
14620 // SearchForInstances: SearchForInstances returns a list of matching instances.
14621 // See RetrieveTransaction
14622 // (https://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4).
14623 // For details on the implementation of SearchForInstances, see Search
14624 // transaction
14625 // (https://cloud.google.com/healthcare/docs/dicom#search_transaction) in the
14626 // Cloud Healthcare API conformance statement. For samples that show how to
14627 // call SearchForInstances, see Search for DICOM data
14628 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#search-dicom).
14629 //
14630 // - dicomWebPath: The path of the SearchForInstancesRequest DICOMweb request.
14631 // For example, `instances`,
14632 // `studies/{study_uid}/series/{series_uid}/instances`, or
14633 // `studies/{study_uid}/instances`.
14634 // - parent: The name of the DICOM store that is being accessed. For example,
14635 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
14636 // tores/{dicom_store_id}`.
14637 func (r *ProjectsLocationsDatasetsDicomStoresService) SearchForInstances(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresSearchForInstancesCall {
14638 c := &ProjectsLocationsDatasetsDicomStoresSearchForInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14639 c.parent = parent
14640 c.dicomWebPath = dicomWebPath
14641 return c
14642 }
14643
14644 // Fields allows partial responses to be retrieved. See
14645 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14646 // details.
14647 func (c *ProjectsLocationsDatasetsDicomStoresSearchForInstancesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresSearchForInstancesCall {
14648 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14649 return c
14650 }
14651
14652 // IfNoneMatch sets an optional parameter which makes the operation fail if the
14653 // object's ETag matches the given value. This is useful for getting updates
14654 // only after the object has changed since the last request.
14655 func (c *ProjectsLocationsDatasetsDicomStoresSearchForInstancesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresSearchForInstancesCall {
14656 c.ifNoneMatch_ = entityTag
14657 return c
14658 }
14659
14660 // Context sets the context to be used in this call's Do method.
14661 func (c *ProjectsLocationsDatasetsDicomStoresSearchForInstancesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresSearchForInstancesCall {
14662 c.ctx_ = ctx
14663 return c
14664 }
14665
14666 // Header returns a http.Header that can be modified by the caller to add
14667 // headers to the request.
14668 func (c *ProjectsLocationsDatasetsDicomStoresSearchForInstancesCall) Header() http.Header {
14669 if c.header_ == nil {
14670 c.header_ = make(http.Header)
14671 }
14672 return c.header_
14673 }
14674
14675 func (c *ProjectsLocationsDatasetsDicomStoresSearchForInstancesCall) doRequest(alt string) (*http.Response, error) {
14676 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14677 if c.ifNoneMatch_ != "" {
14678 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14679 }
14680 c.urlParams_.Set("alt", alt)
14681 c.urlParams_.Set("prettyPrint", "false")
14682 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/dicomWeb/{+dicomWebPath}")
14683 urls += "?" + c.urlParams_.Encode()
14684 req, err := http.NewRequest("GET", urls, nil)
14685 if err != nil {
14686 return nil, err
14687 }
14688 req.Header = reqHeaders
14689 googleapi.Expand(req.URL, map[string]string{
14690 "parent": c.parent,
14691 "dicomWebPath": c.dicomWebPath,
14692 })
14693 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.searchForInstances", "request", internallog.HTTPRequest(req, nil))
14694 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14695 }
14696
14697 // Do executes the "healthcare.projects.locations.datasets.dicomStores.searchForInstances" call.
14698 func (c *ProjectsLocationsDatasetsDicomStoresSearchForInstancesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
14699 gensupport.SetOptions(c.urlParams_, opts...)
14700 return c.doRequest("")
14701 }
14702
14703 type ProjectsLocationsDatasetsDicomStoresSearchForSeriesCall struct {
14704 s *Service
14705 parent string
14706 dicomWebPath string
14707 urlParams_ gensupport.URLParams
14708 ifNoneMatch_ string
14709 ctx_ context.Context
14710 header_ http.Header
14711 }
14712
14713 // SearchForSeries: SearchForSeries returns a list of matching series. See
14714 // RetrieveTransaction
14715 // (https://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4).
14716 // For details on the implementation of SearchForSeries, see Search transaction
14717 // (https://cloud.google.com/healthcare/docs/dicom#search_transaction) in the
14718 // Cloud Healthcare API conformance statement. For samples that show how to
14719 // call SearchForSeries, see Search for DICOM data
14720 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#search-dicom).
14721 //
14722 // - dicomWebPath: The path of the SearchForSeries DICOMweb request. For
14723 // example, `series` or `studies/{study_uid}/series`.
14724 // - parent: The name of the DICOM store that is being accessed. For example,
14725 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
14726 // tores/{dicom_store_id}`.
14727 func (r *ProjectsLocationsDatasetsDicomStoresService) SearchForSeries(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresSearchForSeriesCall {
14728 c := &ProjectsLocationsDatasetsDicomStoresSearchForSeriesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14729 c.parent = parent
14730 c.dicomWebPath = dicomWebPath
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 *ProjectsLocationsDatasetsDicomStoresSearchForSeriesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresSearchForSeriesCall {
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 *ProjectsLocationsDatasetsDicomStoresSearchForSeriesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresSearchForSeriesCall {
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 *ProjectsLocationsDatasetsDicomStoresSearchForSeriesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresSearchForSeriesCall {
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 *ProjectsLocationsDatasetsDicomStoresSearchForSeriesCall) Header() http.Header {
14759 if c.header_ == nil {
14760 c.header_ = make(http.Header)
14761 }
14762 return c.header_
14763 }
14764
14765 func (c *ProjectsLocationsDatasetsDicomStoresSearchForSeriesCall) 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, "v1beta1/{+parent}/dicomWeb/{+dicomWebPath}")
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 "parent": c.parent,
14781 "dicomWebPath": c.dicomWebPath,
14782 })
14783 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.searchForSeries", "request", internallog.HTTPRequest(req, nil))
14784 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14785 }
14786
14787 // Do executes the "healthcare.projects.locations.datasets.dicomStores.searchForSeries" call.
14788 func (c *ProjectsLocationsDatasetsDicomStoresSearchForSeriesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
14789 gensupport.SetOptions(c.urlParams_, opts...)
14790 return c.doRequest("")
14791 }
14792
14793 type ProjectsLocationsDatasetsDicomStoresSearchForStudiesCall struct {
14794 s *Service
14795 parent string
14796 dicomWebPath string
14797 urlParams_ gensupport.URLParams
14798 ifNoneMatch_ string
14799 ctx_ context.Context
14800 header_ http.Header
14801 }
14802
14803 // SearchForStudies: SearchForStudies returns a list of matching studies. See
14804 // RetrieveTransaction
14805 // (https://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4).
14806 // For details on the implementation of SearchForStudies, see Search
14807 // transaction
14808 // (https://cloud.google.com/healthcare/docs/dicom#search_transaction) in the
14809 // Cloud Healthcare API conformance statement. For samples that show how to
14810 // call SearchForStudies, see Search for DICOM data
14811 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#search-dicom).
14812 //
14813 // - dicomWebPath: The path of the SearchForStudies DICOMweb request. For
14814 // example, `studies`.
14815 // - parent: The name of the DICOM store that is being accessed. For example,
14816 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
14817 // tores/{dicom_store_id}`.
14818 func (r *ProjectsLocationsDatasetsDicomStoresService) SearchForStudies(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresSearchForStudiesCall {
14819 c := &ProjectsLocationsDatasetsDicomStoresSearchForStudiesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14820 c.parent = parent
14821 c.dicomWebPath = dicomWebPath
14822 return c
14823 }
14824
14825 // Fields allows partial responses to be retrieved. See
14826 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14827 // details.
14828 func (c *ProjectsLocationsDatasetsDicomStoresSearchForStudiesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresSearchForStudiesCall {
14829 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14830 return c
14831 }
14832
14833 // IfNoneMatch sets an optional parameter which makes the operation fail if the
14834 // object's ETag matches the given value. This is useful for getting updates
14835 // only after the object has changed since the last request.
14836 func (c *ProjectsLocationsDatasetsDicomStoresSearchForStudiesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresSearchForStudiesCall {
14837 c.ifNoneMatch_ = entityTag
14838 return c
14839 }
14840
14841 // Context sets the context to be used in this call's Do method.
14842 func (c *ProjectsLocationsDatasetsDicomStoresSearchForStudiesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresSearchForStudiesCall {
14843 c.ctx_ = ctx
14844 return c
14845 }
14846
14847 // Header returns a http.Header that can be modified by the caller to add
14848 // headers to the request.
14849 func (c *ProjectsLocationsDatasetsDicomStoresSearchForStudiesCall) Header() http.Header {
14850 if c.header_ == nil {
14851 c.header_ = make(http.Header)
14852 }
14853 return c.header_
14854 }
14855
14856 func (c *ProjectsLocationsDatasetsDicomStoresSearchForStudiesCall) doRequest(alt string) (*http.Response, error) {
14857 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14858 if c.ifNoneMatch_ != "" {
14859 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14860 }
14861 c.urlParams_.Set("alt", alt)
14862 c.urlParams_.Set("prettyPrint", "false")
14863 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/dicomWeb/{+dicomWebPath}")
14864 urls += "?" + c.urlParams_.Encode()
14865 req, err := http.NewRequest("GET", urls, nil)
14866 if err != nil {
14867 return nil, err
14868 }
14869 req.Header = reqHeaders
14870 googleapi.Expand(req.URL, map[string]string{
14871 "parent": c.parent,
14872 "dicomWebPath": c.dicomWebPath,
14873 })
14874 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.searchForStudies", "request", internallog.HTTPRequest(req, nil))
14875 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14876 }
14877
14878 // Do executes the "healthcare.projects.locations.datasets.dicomStores.searchForStudies" call.
14879 func (c *ProjectsLocationsDatasetsDicomStoresSearchForStudiesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
14880 gensupport.SetOptions(c.urlParams_, opts...)
14881 return c.doRequest("")
14882 }
14883
14884 type ProjectsLocationsDatasetsDicomStoresSetBlobStorageSettingsCall struct {
14885 s *Service
14886 resource string
14887 setblobstoragesettingsrequest *SetBlobStorageSettingsRequest
14888 urlParams_ gensupport.URLParams
14889 ctx_ context.Context
14890 header_ http.Header
14891 }
14892
14893 // SetBlobStorageSettings: SetBlobStorageSettings sets the blob storage
14894 // settings of the specified resources.
14895 //
14896 // - resource: The path of the resource to update the blob storage settings in
14897 // the format of
14898 // `projects/{projectID}/locations/{locationID}/datasets/{datasetID}/dicomStor
14899 // es/{dicomStoreID}/dicomWeb/studies/{studyUID}`,
14900 // `projects/{projectID}/locations/{locationID}/datasets/{datasetID}/dicomStor
14901 // es/{dicomStoreID}/dicomWeb/studies/{studyUID}/series/{seriesUID}/`, or
14902 // `projects/{projectID}/locations/{locationID}/datasets/{datasetID}/dicomStor
14903 // es/{dicomStoreID}/dicomWeb/studies/{studyUID}/series/{seriesUID}/instances/
14904 // {instanceUID}`. If `filter_config` is specified, set the value of
14905 // `resource` to the resource name of a DICOM store in the format
14906 // `projects/{projectID}/locations/{locationID}/datasets/{datasetID}/dicomStor
14907 // es/{dicomStoreID}`.
14908 func (r *ProjectsLocationsDatasetsDicomStoresService) SetBlobStorageSettings(resource string, setblobstoragesettingsrequest *SetBlobStorageSettingsRequest) *ProjectsLocationsDatasetsDicomStoresSetBlobStorageSettingsCall {
14909 c := &ProjectsLocationsDatasetsDicomStoresSetBlobStorageSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14910 c.resource = resource
14911 c.setblobstoragesettingsrequest = setblobstoragesettingsrequest
14912 return c
14913 }
14914
14915 // Fields allows partial responses to be retrieved. See
14916 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14917 // details.
14918 func (c *ProjectsLocationsDatasetsDicomStoresSetBlobStorageSettingsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresSetBlobStorageSettingsCall {
14919 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14920 return c
14921 }
14922
14923 // Context sets the context to be used in this call's Do method.
14924 func (c *ProjectsLocationsDatasetsDicomStoresSetBlobStorageSettingsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresSetBlobStorageSettingsCall {
14925 c.ctx_ = ctx
14926 return c
14927 }
14928
14929 // Header returns a http.Header that can be modified by the caller to add
14930 // headers to the request.
14931 func (c *ProjectsLocationsDatasetsDicomStoresSetBlobStorageSettingsCall) Header() http.Header {
14932 if c.header_ == nil {
14933 c.header_ = make(http.Header)
14934 }
14935 return c.header_
14936 }
14937
14938 func (c *ProjectsLocationsDatasetsDicomStoresSetBlobStorageSettingsCall) doRequest(alt string) (*http.Response, error) {
14939 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14940 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setblobstoragesettingsrequest)
14941 if err != nil {
14942 return nil, err
14943 }
14944 c.urlParams_.Set("alt", alt)
14945 c.urlParams_.Set("prettyPrint", "false")
14946 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setBlobStorageSettings")
14947 urls += "?" + c.urlParams_.Encode()
14948 req, err := http.NewRequest("POST", urls, body)
14949 if err != nil {
14950 return nil, err
14951 }
14952 req.Header = reqHeaders
14953 googleapi.Expand(req.URL, map[string]string{
14954 "resource": c.resource,
14955 })
14956 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.setBlobStorageSettings", "request", internallog.HTTPRequest(req, body.Bytes()))
14957 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14958 }
14959
14960 // Do executes the "healthcare.projects.locations.datasets.dicomStores.setBlobStorageSettings" call.
14961 // Any non-2xx status code is an error. Response headers are in either
14962 // *Operation.ServerResponse.Header or (if a response was returned at all) in
14963 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14964 // whether the returned error was because http.StatusNotModified was returned.
14965 func (c *ProjectsLocationsDatasetsDicomStoresSetBlobStorageSettingsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
14966 gensupport.SetOptions(c.urlParams_, opts...)
14967 res, err := c.doRequest("json")
14968 if res != nil && res.StatusCode == http.StatusNotModified {
14969 if res.Body != nil {
14970 res.Body.Close()
14971 }
14972 return nil, gensupport.WrapError(&googleapi.Error{
14973 Code: res.StatusCode,
14974 Header: res.Header,
14975 })
14976 }
14977 if err != nil {
14978 return nil, err
14979 }
14980 defer googleapi.CloseBody(res)
14981 if err := googleapi.CheckResponse(res); err != nil {
14982 return nil, gensupport.WrapError(err)
14983 }
14984 ret := &Operation{
14985 ServerResponse: googleapi.ServerResponse{
14986 Header: res.Header,
14987 HTTPStatusCode: res.StatusCode,
14988 },
14989 }
14990 target := &ret
14991 b, err := gensupport.DecodeResponseBytes(target, res)
14992 if err != nil {
14993 return nil, err
14994 }
14995 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.setBlobStorageSettings", "response", internallog.HTTPResponse(res, b))
14996 return ret, nil
14997 }
14998
14999 type ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall struct {
15000 s *Service
15001 resource string
15002 setiampolicyrequest *SetIamPolicyRequest
15003 urlParams_ gensupport.URLParams
15004 ctx_ context.Context
15005 header_ http.Header
15006 }
15007
15008 // SetIamPolicy: Sets the access control policy on the specified resource.
15009 // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
15010 // and `PERMISSION_DENIED` errors.
15011 //
15012 // - resource: REQUIRED: The resource for which the policy is being specified.
15013 // See Resource names (https://cloud.google.com/apis/design/resource_names)
15014 // for the appropriate value for this field.
15015 func (r *ProjectsLocationsDatasetsDicomStoresService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall {
15016 c := &ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15017 c.resource = resource
15018 c.setiampolicyrequest = setiampolicyrequest
15019 return c
15020 }
15021
15022 // Fields allows partial responses to be retrieved. See
15023 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15024 // details.
15025 func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall {
15026 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15027 return c
15028 }
15029
15030 // Context sets the context to be used in this call's Do method.
15031 func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall {
15032 c.ctx_ = ctx
15033 return c
15034 }
15035
15036 // Header returns a http.Header that can be modified by the caller to add
15037 // headers to the request.
15038 func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) Header() http.Header {
15039 if c.header_ == nil {
15040 c.header_ = make(http.Header)
15041 }
15042 return c.header_
15043 }
15044
15045 func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
15046 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15047 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest)
15048 if err != nil {
15049 return nil, err
15050 }
15051 c.urlParams_.Set("alt", alt)
15052 c.urlParams_.Set("prettyPrint", "false")
15053 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy")
15054 urls += "?" + c.urlParams_.Encode()
15055 req, err := http.NewRequest("POST", urls, body)
15056 if err != nil {
15057 return nil, err
15058 }
15059 req.Header = reqHeaders
15060 googleapi.Expand(req.URL, map[string]string{
15061 "resource": c.resource,
15062 })
15063 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes()))
15064 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15065 }
15066
15067 // Do executes the "healthcare.projects.locations.datasets.dicomStores.setIamPolicy" call.
15068 // Any non-2xx status code is an error. Response headers are in either
15069 // *Policy.ServerResponse.Header or (if a response was returned at all) in
15070 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15071 // whether the returned error was because http.StatusNotModified was returned.
15072 func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
15073 gensupport.SetOptions(c.urlParams_, opts...)
15074 res, err := c.doRequest("json")
15075 if res != nil && res.StatusCode == http.StatusNotModified {
15076 if res.Body != nil {
15077 res.Body.Close()
15078 }
15079 return nil, gensupport.WrapError(&googleapi.Error{
15080 Code: res.StatusCode,
15081 Header: res.Header,
15082 })
15083 }
15084 if err != nil {
15085 return nil, err
15086 }
15087 defer googleapi.CloseBody(res)
15088 if err := googleapi.CheckResponse(res); err != nil {
15089 return nil, gensupport.WrapError(err)
15090 }
15091 ret := &Policy{
15092 ServerResponse: googleapi.ServerResponse{
15093 Header: res.Header,
15094 HTTPStatusCode: res.StatusCode,
15095 },
15096 }
15097 target := &ret
15098 b, err := gensupport.DecodeResponseBytes(target, res)
15099 if err != nil {
15100 return nil, err
15101 }
15102 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.setIamPolicy", "response", internallog.HTTPResponse(res, b))
15103 return ret, nil
15104 }
15105
15106 type ProjectsLocationsDatasetsDicomStoresStoreInstancesCall struct {
15107 s *Service
15108 parent string
15109 dicomWebPath string
15110 body_ io.Reader
15111 urlParams_ gensupport.URLParams
15112 ctx_ context.Context
15113 header_ http.Header
15114 }
15115
15116 // StoreInstances: StoreInstances stores DICOM instances associated with study
15117 // instance unique identifiers (SUID). See Store Transaction
15118 // (https://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.5).
15119 // For details on the implementation of StoreInstances, see Store transaction
15120 // (https://cloud.google.com/healthcare/docs/dicom#store_transaction) in the
15121 // Cloud Healthcare API conformance statement. For samples that show how to
15122 // call StoreInstances, see Store DICOM data
15123 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#store-dicom).
15124 //
15125 // - dicomWebPath: The path of the StoreInstances DICOMweb request. For
15126 // example, `studies/[{study_uid}]`. Note that the `study_uid` is optional.
15127 // - parent: The name of the DICOM store that is being accessed. For example,
15128 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
15129 // tores/{dicom_store_id}`.
15130 func (r *ProjectsLocationsDatasetsDicomStoresService) StoreInstances(parent string, dicomWebPath string, body_ io.Reader) *ProjectsLocationsDatasetsDicomStoresStoreInstancesCall {
15131 c := &ProjectsLocationsDatasetsDicomStoresStoreInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15132 c.parent = parent
15133 c.dicomWebPath = dicomWebPath
15134 c.body_ = body_
15135 return c
15136 }
15137
15138 // Fields allows partial responses to be retrieved. See
15139 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15140 // details.
15141 func (c *ProjectsLocationsDatasetsDicomStoresStoreInstancesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStoreInstancesCall {
15142 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15143 return c
15144 }
15145
15146 // Context sets the context to be used in this call's Do method.
15147 func (c *ProjectsLocationsDatasetsDicomStoresStoreInstancesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStoreInstancesCall {
15148 c.ctx_ = ctx
15149 return c
15150 }
15151
15152 // Header returns a http.Header that can be modified by the caller to add
15153 // headers to the request.
15154 func (c *ProjectsLocationsDatasetsDicomStoresStoreInstancesCall) Header() http.Header {
15155 if c.header_ == nil {
15156 c.header_ = make(http.Header)
15157 }
15158 return c.header_
15159 }
15160
15161 func (c *ProjectsLocationsDatasetsDicomStoresStoreInstancesCall) doRequest(alt string) (*http.Response, error) {
15162 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15163 body := bytes.NewBuffer(nil)
15164 _, err := body.ReadFrom(c.body_)
15165 if err != nil {
15166 return nil, err
15167 }
15168 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/dicomWeb/{+dicomWebPath}")
15169 urls += "?" + c.urlParams_.Encode()
15170 req, err := http.NewRequest("POST", urls, body)
15171 if err != nil {
15172 return nil, err
15173 }
15174 req.Header = reqHeaders
15175 googleapi.Expand(req.URL, map[string]string{
15176 "parent": c.parent,
15177 "dicomWebPath": c.dicomWebPath,
15178 })
15179 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.storeInstances", "request", internallog.HTTPRequest(req, body.Bytes()))
15180 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15181 }
15182
15183 // Do executes the "healthcare.projects.locations.datasets.dicomStores.storeInstances" call.
15184 func (c *ProjectsLocationsDatasetsDicomStoresStoreInstancesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
15185 gensupport.SetOptions(c.urlParams_, opts...)
15186 return c.doRequest("")
15187 }
15188
15189 type ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall struct {
15190 s *Service
15191 resource string
15192 testiampermissionsrequest *TestIamPermissionsRequest
15193 urlParams_ gensupport.URLParams
15194 ctx_ context.Context
15195 header_ http.Header
15196 }
15197
15198 // TestIamPermissions: Returns permissions that a caller has on the specified
15199 // resource. If the resource does not exist, this will return an empty set of
15200 // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
15201 // used for building permission-aware UIs and command-line tools, not for
15202 // authorization checking. This operation may "fail open" without warning.
15203 //
15204 // - resource: REQUIRED: The resource for which the policy detail is being
15205 // requested. See Resource names
15206 // (https://cloud.google.com/apis/design/resource_names) for the appropriate
15207 // value for this field.
15208 func (r *ProjectsLocationsDatasetsDicomStoresService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall {
15209 c := &ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15210 c.resource = resource
15211 c.testiampermissionsrequest = testiampermissionsrequest
15212 return c
15213 }
15214
15215 // Fields allows partial responses to be retrieved. See
15216 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15217 // details.
15218 func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall {
15219 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15220 return c
15221 }
15222
15223 // Context sets the context to be used in this call's Do method.
15224 func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall {
15225 c.ctx_ = ctx
15226 return c
15227 }
15228
15229 // Header returns a http.Header that can be modified by the caller to add
15230 // headers to the request.
15231 func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) Header() http.Header {
15232 if c.header_ == nil {
15233 c.header_ = make(http.Header)
15234 }
15235 return c.header_
15236 }
15237
15238 func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
15239 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15240 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest)
15241 if err != nil {
15242 return nil, err
15243 }
15244 c.urlParams_.Set("alt", alt)
15245 c.urlParams_.Set("prettyPrint", "false")
15246 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions")
15247 urls += "?" + c.urlParams_.Encode()
15248 req, err := http.NewRequest("POST", urls, body)
15249 if err != nil {
15250 return nil, err
15251 }
15252 req.Header = reqHeaders
15253 googleapi.Expand(req.URL, map[string]string{
15254 "resource": c.resource,
15255 })
15256 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes()))
15257 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15258 }
15259
15260 // Do executes the "healthcare.projects.locations.datasets.dicomStores.testIamPermissions" call.
15261 // Any non-2xx status code is an error. Response headers are in either
15262 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
15263 // returned at all) in error.(*googleapi.Error).Header. Use
15264 // googleapi.IsNotModified to check whether the returned error was because
15265 // http.StatusNotModified was returned.
15266 func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
15267 gensupport.SetOptions(c.urlParams_, opts...)
15268 res, err := c.doRequest("json")
15269 if res != nil && res.StatusCode == http.StatusNotModified {
15270 if res.Body != nil {
15271 res.Body.Close()
15272 }
15273 return nil, gensupport.WrapError(&googleapi.Error{
15274 Code: res.StatusCode,
15275 Header: res.Header,
15276 })
15277 }
15278 if err != nil {
15279 return nil, err
15280 }
15281 defer googleapi.CloseBody(res)
15282 if err := googleapi.CheckResponse(res); err != nil {
15283 return nil, gensupport.WrapError(err)
15284 }
15285 ret := &TestIamPermissionsResponse{
15286 ServerResponse: googleapi.ServerResponse{
15287 Header: res.Header,
15288 HTTPStatusCode: res.StatusCode,
15289 },
15290 }
15291 target := &ret
15292 b, err := gensupport.DecodeResponseBytes(target, res)
15293 if err != nil {
15294 return nil, err
15295 }
15296 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.testIamPermissions", "response", internallog.HTTPResponse(res, b))
15297 return ret, nil
15298 }
15299
15300 type ProjectsLocationsDatasetsDicomStoresUpdateInstancesCall struct {
15301 s *Service
15302 parent string
15303 dicomWebPath string
15304 body_ io.Reader
15305 urlParams_ gensupport.URLParams
15306 ctx_ context.Context
15307 header_ http.Header
15308 }
15309
15310 // UpdateInstances: UpdateInstances updates DICOM instances associated with
15311 // study instance unique identifiers (SUID).
15312 //
15313 // - dicomWebPath: The path of the UpdateInstances DICOMweb request. For
15314 // example, `studies/[{study_uid}]`. Note that the `study_uid` is optional.
15315 // - parent: The name of the DICOM store that is being accessed. For example,
15316 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
15317 // tores/{dicom_store_id}`.
15318 func (r *ProjectsLocationsDatasetsDicomStoresService) UpdateInstances(parent string, dicomWebPath string, body_ io.Reader) *ProjectsLocationsDatasetsDicomStoresUpdateInstancesCall {
15319 c := &ProjectsLocationsDatasetsDicomStoresUpdateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15320 c.parent = parent
15321 c.dicomWebPath = dicomWebPath
15322 c.body_ = body_
15323 return c
15324 }
15325
15326 // Fields allows partial responses to be retrieved. See
15327 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15328 // details.
15329 func (c *ProjectsLocationsDatasetsDicomStoresUpdateInstancesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresUpdateInstancesCall {
15330 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15331 return c
15332 }
15333
15334 // Context sets the context to be used in this call's Do method.
15335 func (c *ProjectsLocationsDatasetsDicomStoresUpdateInstancesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresUpdateInstancesCall {
15336 c.ctx_ = ctx
15337 return c
15338 }
15339
15340 // Header returns a http.Header that can be modified by the caller to add
15341 // headers to the request.
15342 func (c *ProjectsLocationsDatasetsDicomStoresUpdateInstancesCall) Header() http.Header {
15343 if c.header_ == nil {
15344 c.header_ = make(http.Header)
15345 }
15346 return c.header_
15347 }
15348
15349 func (c *ProjectsLocationsDatasetsDicomStoresUpdateInstancesCall) doRequest(alt string) (*http.Response, error) {
15350 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15351 body := bytes.NewBuffer(nil)
15352 _, err := body.ReadFrom(c.body_)
15353 if err != nil {
15354 return nil, err
15355 }
15356 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/dicomWeb/{+dicomWebPath}")
15357 urls += "?" + c.urlParams_.Encode()
15358 req, err := http.NewRequest("PUT", urls, body)
15359 if err != nil {
15360 return nil, err
15361 }
15362 req.Header = reqHeaders
15363 googleapi.Expand(req.URL, map[string]string{
15364 "parent": c.parent,
15365 "dicomWebPath": c.dicomWebPath,
15366 })
15367 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.updateInstances", "request", internallog.HTTPRequest(req, body.Bytes()))
15368 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15369 }
15370
15371 // Do executes the "healthcare.projects.locations.datasets.dicomStores.updateInstances" call.
15372 func (c *ProjectsLocationsDatasetsDicomStoresUpdateInstancesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
15373 gensupport.SetOptions(c.urlParams_, opts...)
15374 return c.doRequest("")
15375 }
15376
15377 type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesGetStudyMetricsCall struct {
15378 s *Service
15379 study string
15380 urlParams_ gensupport.URLParams
15381 ifNoneMatch_ string
15382 ctx_ context.Context
15383 header_ http.Header
15384 }
15385
15386 // GetStudyMetrics: GetStudyMetrics returns metrics for a study.
15387 //
15388 // - study: The study resource path. For example,
15389 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
15390 // tores/{dicom_store_id}/dicomWeb/studies/{study_uid}`.
15391 func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesService) GetStudyMetrics(study string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesGetStudyMetricsCall {
15392 c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesGetStudyMetricsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15393 c.study = study
15394 return c
15395 }
15396
15397 // Fields allows partial responses to be retrieved. See
15398 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15399 // details.
15400 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesGetStudyMetricsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesGetStudyMetricsCall {
15401 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15402 return c
15403 }
15404
15405 // IfNoneMatch sets an optional parameter which makes the operation fail if the
15406 // object's ETag matches the given value. This is useful for getting updates
15407 // only after the object has changed since the last request.
15408 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesGetStudyMetricsCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesGetStudyMetricsCall {
15409 c.ifNoneMatch_ = entityTag
15410 return c
15411 }
15412
15413 // Context sets the context to be used in this call's Do method.
15414 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesGetStudyMetricsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesGetStudyMetricsCall {
15415 c.ctx_ = ctx
15416 return c
15417 }
15418
15419 // Header returns a http.Header that can be modified by the caller to add
15420 // headers to the request.
15421 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesGetStudyMetricsCall) Header() http.Header {
15422 if c.header_ == nil {
15423 c.header_ = make(http.Header)
15424 }
15425 return c.header_
15426 }
15427
15428 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesGetStudyMetricsCall) doRequest(alt string) (*http.Response, error) {
15429 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15430 if c.ifNoneMatch_ != "" {
15431 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15432 }
15433 c.urlParams_.Set("alt", alt)
15434 c.urlParams_.Set("prettyPrint", "false")
15435 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+study}:getStudyMetrics")
15436 urls += "?" + c.urlParams_.Encode()
15437 req, err := http.NewRequest("GET", urls, nil)
15438 if err != nil {
15439 return nil, err
15440 }
15441 req.Header = reqHeaders
15442 googleapi.Expand(req.URL, map[string]string{
15443 "study": c.study,
15444 })
15445 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.getStudyMetrics", "request", internallog.HTTPRequest(req, nil))
15446 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15447 }
15448
15449 // Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.getStudyMetrics" call.
15450 // Any non-2xx status code is an error. Response headers are in either
15451 // *StudyMetrics.ServerResponse.Header or (if a response was returned at all)
15452 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15453 // whether the returned error was because http.StatusNotModified was returned.
15454 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesGetStudyMetricsCall) Do(opts ...googleapi.CallOption) (*StudyMetrics, error) {
15455 gensupport.SetOptions(c.urlParams_, opts...)
15456 res, err := c.doRequest("json")
15457 if res != nil && res.StatusCode == http.StatusNotModified {
15458 if res.Body != nil {
15459 res.Body.Close()
15460 }
15461 return nil, gensupport.WrapError(&googleapi.Error{
15462 Code: res.StatusCode,
15463 Header: res.Header,
15464 })
15465 }
15466 if err != nil {
15467 return nil, err
15468 }
15469 defer googleapi.CloseBody(res)
15470 if err := googleapi.CheckResponse(res); err != nil {
15471 return nil, gensupport.WrapError(err)
15472 }
15473 ret := &StudyMetrics{
15474 ServerResponse: googleapi.ServerResponse{
15475 Header: res.Header,
15476 HTTPStatusCode: res.StatusCode,
15477 },
15478 }
15479 target := &ret
15480 b, err := gensupport.DecodeResponseBytes(target, res)
15481 if err != nil {
15482 return nil, err
15483 }
15484 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.getStudyMetrics", "response", internallog.HTTPResponse(res, b))
15485 return ret, nil
15486 }
15487
15488 type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSetBlobStorageSettingsCall struct {
15489 s *Service
15490 resource string
15491 setblobstoragesettingsrequest *SetBlobStorageSettingsRequest
15492 urlParams_ gensupport.URLParams
15493 ctx_ context.Context
15494 header_ http.Header
15495 }
15496
15497 // SetBlobStorageSettings: SetBlobStorageSettings sets the blob storage
15498 // settings of the specified resources.
15499 //
15500 // - resource: The path of the resource to update the blob storage settings in
15501 // the format of
15502 // `projects/{projectID}/locations/{locationID}/datasets/{datasetID}/dicomStor
15503 // es/{dicomStoreID}/dicomWeb/studies/{studyUID}`,
15504 // `projects/{projectID}/locations/{locationID}/datasets/{datasetID}/dicomStor
15505 // es/{dicomStoreID}/dicomWeb/studies/{studyUID}/series/{seriesUID}/`, or
15506 // `projects/{projectID}/locations/{locationID}/datasets/{datasetID}/dicomStor
15507 // es/{dicomStoreID}/dicomWeb/studies/{studyUID}/series/{seriesUID}/instances/
15508 // {instanceUID}`. If `filter_config` is specified, set the value of
15509 // `resource` to the resource name of a DICOM store in the format
15510 // `projects/{projectID}/locations/{locationID}/datasets/{datasetID}/dicomStor
15511 // es/{dicomStoreID}`.
15512 func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesService) SetBlobStorageSettings(resource string, setblobstoragesettingsrequest *SetBlobStorageSettingsRequest) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSetBlobStorageSettingsCall {
15513 c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSetBlobStorageSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15514 c.resource = resource
15515 c.setblobstoragesettingsrequest = setblobstoragesettingsrequest
15516 return c
15517 }
15518
15519 // Fields allows partial responses to be retrieved. See
15520 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15521 // details.
15522 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSetBlobStorageSettingsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSetBlobStorageSettingsCall {
15523 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15524 return c
15525 }
15526
15527 // Context sets the context to be used in this call's Do method.
15528 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSetBlobStorageSettingsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSetBlobStorageSettingsCall {
15529 c.ctx_ = ctx
15530 return c
15531 }
15532
15533 // Header returns a http.Header that can be modified by the caller to add
15534 // headers to the request.
15535 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSetBlobStorageSettingsCall) Header() http.Header {
15536 if c.header_ == nil {
15537 c.header_ = make(http.Header)
15538 }
15539 return c.header_
15540 }
15541
15542 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSetBlobStorageSettingsCall) doRequest(alt string) (*http.Response, error) {
15543 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15544 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setblobstoragesettingsrequest)
15545 if err != nil {
15546 return nil, err
15547 }
15548 c.urlParams_.Set("alt", alt)
15549 c.urlParams_.Set("prettyPrint", "false")
15550 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setBlobStorageSettings")
15551 urls += "?" + c.urlParams_.Encode()
15552 req, err := http.NewRequest("POST", urls, body)
15553 if err != nil {
15554 return nil, err
15555 }
15556 req.Header = reqHeaders
15557 googleapi.Expand(req.URL, map[string]string{
15558 "resource": c.resource,
15559 })
15560 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()))
15561 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15562 }
15563
15564 // Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.setBlobStorageSettings" call.
15565 // Any non-2xx status code is an error. Response headers are in either
15566 // *Operation.ServerResponse.Header or (if a response was returned at all) in
15567 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15568 // whether the returned error was because http.StatusNotModified was returned.
15569 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSetBlobStorageSettingsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
15570 gensupport.SetOptions(c.urlParams_, opts...)
15571 res, err := c.doRequest("json")
15572 if res != nil && res.StatusCode == http.StatusNotModified {
15573 if res.Body != nil {
15574 res.Body.Close()
15575 }
15576 return nil, gensupport.WrapError(&googleapi.Error{
15577 Code: res.StatusCode,
15578 Header: res.Header,
15579 })
15580 }
15581 if err != nil {
15582 return nil, err
15583 }
15584 defer googleapi.CloseBody(res)
15585 if err := googleapi.CheckResponse(res); err != nil {
15586 return nil, gensupport.WrapError(err)
15587 }
15588 ret := &Operation{
15589 ServerResponse: googleapi.ServerResponse{
15590 Header: res.Header,
15591 HTTPStatusCode: res.StatusCode,
15592 },
15593 }
15594 target := &ret
15595 b, err := gensupport.DecodeResponseBytes(target, res)
15596 if err != nil {
15597 return nil, err
15598 }
15599 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.setBlobStorageSettings", "response", internallog.HTTPResponse(res, b))
15600 return ret, nil
15601 }
15602
15603 type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesGetSeriesMetricsCall struct {
15604 s *Service
15605 series string
15606 urlParams_ gensupport.URLParams
15607 ifNoneMatch_ string
15608 ctx_ context.Context
15609 header_ http.Header
15610 }
15611
15612 // GetSeriesMetrics: GetSeriesMetrics returns metrics for a series.
15613 //
15614 // - series: The series resource path. For example,
15615 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
15616 // tores/{dicom_store_id}/dicomWeb/studies/{study_uid}/series/{series_uid}`.
15617 func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesService) GetSeriesMetrics(series string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesGetSeriesMetricsCall {
15618 c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesGetSeriesMetricsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15619 c.series = series
15620 return c
15621 }
15622
15623 // Fields allows partial responses to be retrieved. See
15624 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15625 // details.
15626 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesGetSeriesMetricsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesGetSeriesMetricsCall {
15627 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15628 return c
15629 }
15630
15631 // IfNoneMatch sets an optional parameter which makes the operation fail if the
15632 // object's ETag matches the given value. This is useful for getting updates
15633 // only after the object has changed since the last request.
15634 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesGetSeriesMetricsCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesGetSeriesMetricsCall {
15635 c.ifNoneMatch_ = entityTag
15636 return c
15637 }
15638
15639 // Context sets the context to be used in this call's Do method.
15640 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesGetSeriesMetricsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesGetSeriesMetricsCall {
15641 c.ctx_ = ctx
15642 return c
15643 }
15644
15645 // Header returns a http.Header that can be modified by the caller to add
15646 // headers to the request.
15647 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesGetSeriesMetricsCall) Header() http.Header {
15648 if c.header_ == nil {
15649 c.header_ = make(http.Header)
15650 }
15651 return c.header_
15652 }
15653
15654 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesGetSeriesMetricsCall) doRequest(alt string) (*http.Response, error) {
15655 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15656 if c.ifNoneMatch_ != "" {
15657 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15658 }
15659 c.urlParams_.Set("alt", alt)
15660 c.urlParams_.Set("prettyPrint", "false")
15661 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+series}:getSeriesMetrics")
15662 urls += "?" + c.urlParams_.Encode()
15663 req, err := http.NewRequest("GET", urls, nil)
15664 if err != nil {
15665 return nil, err
15666 }
15667 req.Header = reqHeaders
15668 googleapi.Expand(req.URL, map[string]string{
15669 "series": c.series,
15670 })
15671 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))
15672 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15673 }
15674
15675 // Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.getSeriesMetrics" call.
15676 // Any non-2xx status code is an error. Response headers are in either
15677 // *SeriesMetrics.ServerResponse.Header or (if a response was returned at all)
15678 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15679 // whether the returned error was because http.StatusNotModified was returned.
15680 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesGetSeriesMetricsCall) Do(opts ...googleapi.CallOption) (*SeriesMetrics, error) {
15681 gensupport.SetOptions(c.urlParams_, opts...)
15682 res, err := c.doRequest("json")
15683 if res != nil && res.StatusCode == http.StatusNotModified {
15684 if res.Body != nil {
15685 res.Body.Close()
15686 }
15687 return nil, gensupport.WrapError(&googleapi.Error{
15688 Code: res.StatusCode,
15689 Header: res.Header,
15690 })
15691 }
15692 if err != nil {
15693 return nil, err
15694 }
15695 defer googleapi.CloseBody(res)
15696 if err := googleapi.CheckResponse(res); err != nil {
15697 return nil, gensupport.WrapError(err)
15698 }
15699 ret := &SeriesMetrics{
15700 ServerResponse: googleapi.ServerResponse{
15701 Header: res.Header,
15702 HTTPStatusCode: res.StatusCode,
15703 },
15704 }
15705 target := &ret
15706 b, err := gensupport.DecodeResponseBytes(target, res)
15707 if err != nil {
15708 return nil, err
15709 }
15710 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))
15711 return ret, nil
15712 }
15713
15714 type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesGetStorageInfoCall struct {
15715 s *Service
15716 resource string
15717 urlParams_ gensupport.URLParams
15718 ifNoneMatch_ string
15719 ctx_ context.Context
15720 header_ http.Header
15721 }
15722
15723 // GetStorageInfo: GetStorageInfo returns the storage info of the specified
15724 // resource.
15725 //
15726 // - resource: The path of the instance to return storage info for, in the
15727 // form:
15728 // `projects/{projectID}/locations/{locationID}/datasets/{datasetID}/dicomStor
15729 // es/{dicomStoreID}/dicomWeb/studies/{studyUID}/series/{seriesUID}/instances/
15730 // {instanceUID}`.
15731 func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesService) GetStorageInfo(resource string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesGetStorageInfoCall {
15732 c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesGetStorageInfoCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15733 c.resource = resource
15734 return c
15735 }
15736
15737 // Fields allows partial responses to be retrieved. See
15738 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15739 // details.
15740 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesGetStorageInfoCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesGetStorageInfoCall {
15741 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15742 return c
15743 }
15744
15745 // IfNoneMatch sets an optional parameter which makes the operation fail if the
15746 // object's ETag matches the given value. This is useful for getting updates
15747 // only after the object has changed since the last request.
15748 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesGetStorageInfoCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesGetStorageInfoCall {
15749 c.ifNoneMatch_ = entityTag
15750 return c
15751 }
15752
15753 // Context sets the context to be used in this call's Do method.
15754 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesGetStorageInfoCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesGetStorageInfoCall {
15755 c.ctx_ = ctx
15756 return c
15757 }
15758
15759 // Header returns a http.Header that can be modified by the caller to add
15760 // headers to the request.
15761 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesGetStorageInfoCall) Header() http.Header {
15762 if c.header_ == nil {
15763 c.header_ = make(http.Header)
15764 }
15765 return c.header_
15766 }
15767
15768 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesGetStorageInfoCall) doRequest(alt string) (*http.Response, error) {
15769 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15770 if c.ifNoneMatch_ != "" {
15771 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15772 }
15773 c.urlParams_.Set("alt", alt)
15774 c.urlParams_.Set("prettyPrint", "false")
15775 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getStorageInfo")
15776 urls += "?" + c.urlParams_.Encode()
15777 req, err := http.NewRequest("GET", urls, nil)
15778 if err != nil {
15779 return nil, err
15780 }
15781 req.Header = reqHeaders
15782 googleapi.Expand(req.URL, map[string]string{
15783 "resource": c.resource,
15784 })
15785 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))
15786 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15787 }
15788
15789 // Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.getStorageInfo" call.
15790 // Any non-2xx status code is an error. Response headers are in either
15791 // *StorageInfo.ServerResponse.Header or (if a response was returned at all) in
15792 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15793 // whether the returned error was because http.StatusNotModified was returned.
15794 func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesGetStorageInfoCall) Do(opts ...googleapi.CallOption) (*StorageInfo, error) {
15795 gensupport.SetOptions(c.urlParams_, opts...)
15796 res, err := c.doRequest("json")
15797 if res != nil && res.StatusCode == http.StatusNotModified {
15798 if res.Body != nil {
15799 res.Body.Close()
15800 }
15801 return nil, gensupport.WrapError(&googleapi.Error{
15802 Code: res.StatusCode,
15803 Header: res.Header,
15804 })
15805 }
15806 if err != nil {
15807 return nil, err
15808 }
15809 defer googleapi.CloseBody(res)
15810 if err := googleapi.CheckResponse(res); err != nil {
15811 return nil, gensupport.WrapError(err)
15812 }
15813 ret := &StorageInfo{
15814 ServerResponse: googleapi.ServerResponse{
15815 Header: res.Header,
15816 HTTPStatusCode: res.StatusCode,
15817 },
15818 }
15819 target := &ret
15820 b, err := gensupport.DecodeResponseBytes(target, res)
15821 if err != nil {
15822 return nil, err
15823 }
15824 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))
15825 return ret, nil
15826 }
15827
15828 type ProjectsLocationsDatasetsDicomStoresStudiesDeleteCall struct {
15829 s *Service
15830 parent string
15831 dicomWebPath string
15832 urlParams_ gensupport.URLParams
15833 ctx_ context.Context
15834 header_ http.Header
15835 }
15836
15837 // Delete: DeleteStudy deletes all instances within the given study using a
15838 // long running operation. The method returns an Operation which will be marked
15839 // successful when the deletion is complete. Warning: Instances cannot be
15840 // inserted into a study that is being deleted by an operation until the
15841 // operation completes. For samples that show how to call DeleteStudy, see
15842 // Delete a study, series, or instance
15843 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#delete-dicom).
15844 //
15845 // - dicomWebPath: The path of the DeleteStudy request. For example,
15846 // `studies/{study_uid}`.
15847 // - parent: .
15848 func (r *ProjectsLocationsDatasetsDicomStoresStudiesService) Delete(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesDeleteCall {
15849 c := &ProjectsLocationsDatasetsDicomStoresStudiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15850 c.parent = parent
15851 c.dicomWebPath = dicomWebPath
15852 return c
15853 }
15854
15855 // Fields allows partial responses to be retrieved. See
15856 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15857 // details.
15858 func (c *ProjectsLocationsDatasetsDicomStoresStudiesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesDeleteCall {
15859 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15860 return c
15861 }
15862
15863 // Context sets the context to be used in this call's Do method.
15864 func (c *ProjectsLocationsDatasetsDicomStoresStudiesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesDeleteCall {
15865 c.ctx_ = ctx
15866 return c
15867 }
15868
15869 // Header returns a http.Header that can be modified by the caller to add
15870 // headers to the request.
15871 func (c *ProjectsLocationsDatasetsDicomStoresStudiesDeleteCall) Header() http.Header {
15872 if c.header_ == nil {
15873 c.header_ = make(http.Header)
15874 }
15875 return c.header_
15876 }
15877
15878 func (c *ProjectsLocationsDatasetsDicomStoresStudiesDeleteCall) doRequest(alt string) (*http.Response, error) {
15879 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15880 c.urlParams_.Set("alt", alt)
15881 c.urlParams_.Set("prettyPrint", "false")
15882 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/dicomWeb/{+dicomWebPath}")
15883 urls += "?" + c.urlParams_.Encode()
15884 req, err := http.NewRequest("DELETE", urls, nil)
15885 if err != nil {
15886 return nil, err
15887 }
15888 req.Header = reqHeaders
15889 googleapi.Expand(req.URL, map[string]string{
15890 "parent": c.parent,
15891 "dicomWebPath": c.dicomWebPath,
15892 })
15893 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.studies.delete", "request", internallog.HTTPRequest(req, nil))
15894 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15895 }
15896
15897 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.delete" call.
15898 // Any non-2xx status code is an error. Response headers are in either
15899 // *Operation.ServerResponse.Header or (if a response was returned at all) in
15900 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15901 // whether the returned error was because http.StatusNotModified was returned.
15902 func (c *ProjectsLocationsDatasetsDicomStoresStudiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
15903 gensupport.SetOptions(c.urlParams_, opts...)
15904 res, err := c.doRequest("json")
15905 if res != nil && res.StatusCode == http.StatusNotModified {
15906 if res.Body != nil {
15907 res.Body.Close()
15908 }
15909 return nil, gensupport.WrapError(&googleapi.Error{
15910 Code: res.StatusCode,
15911 Header: res.Header,
15912 })
15913 }
15914 if err != nil {
15915 return nil, err
15916 }
15917 defer googleapi.CloseBody(res)
15918 if err := googleapi.CheckResponse(res); err != nil {
15919 return nil, gensupport.WrapError(err)
15920 }
15921 ret := &Operation{
15922 ServerResponse: googleapi.ServerResponse{
15923 Header: res.Header,
15924 HTTPStatusCode: res.StatusCode,
15925 },
15926 }
15927 target := &ret
15928 b, err := gensupport.DecodeResponseBytes(target, res)
15929 if err != nil {
15930 return nil, err
15931 }
15932 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.studies.delete", "response", internallog.HTTPResponse(res, b))
15933 return ret, nil
15934 }
15935
15936 type ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall struct {
15937 s *Service
15938 parent string
15939 dicomWebPath string
15940 urlParams_ gensupport.URLParams
15941 ifNoneMatch_ string
15942 ctx_ context.Context
15943 header_ http.Header
15944 }
15945
15946 // RetrieveMetadata: RetrieveStudyMetadata returns instance associated with the
15947 // given study presented as metadata. See RetrieveTransaction
15948 // (https://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4).
15949 // For details on the implementation of RetrieveStudyMetadata, see Metadata
15950 // resources
15951 // (https://cloud.google.com/healthcare/docs/dicom#metadata_resources) in the
15952 // Cloud Healthcare API conformance statement. For samples that show how to
15953 // call RetrieveStudyMetadata, see Retrieve metadata
15954 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieve-metadata).
15955 //
15956 // - dicomWebPath: The path of the RetrieveStudyMetadata DICOMweb request. For
15957 // example, `studies/{study_uid}/metadata`.
15958 // - parent: The name of the DICOM store that is being accessed. For example,
15959 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
15960 // tores/{dicom_store_id}`.
15961 func (r *ProjectsLocationsDatasetsDicomStoresStudiesService) RetrieveMetadata(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall {
15962 c := &ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15963 c.parent = parent
15964 c.dicomWebPath = dicomWebPath
15965 return c
15966 }
15967
15968 // Fields allows partial responses to be retrieved. See
15969 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15970 // details.
15971 func (c *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall {
15972 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15973 return c
15974 }
15975
15976 // IfNoneMatch sets an optional parameter which makes the operation fail if the
15977 // object's ETag matches the given value. This is useful for getting updates
15978 // only after the object has changed since the last request.
15979 func (c *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall {
15980 c.ifNoneMatch_ = entityTag
15981 return c
15982 }
15983
15984 // Context sets the context to be used in this call's Do method.
15985 func (c *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall {
15986 c.ctx_ = ctx
15987 return c
15988 }
15989
15990 // Header returns a http.Header that can be modified by the caller to add
15991 // headers to the request.
15992 func (c *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall) Header() http.Header {
15993 if c.header_ == nil {
15994 c.header_ = make(http.Header)
15995 }
15996 return c.header_
15997 }
15998
15999 func (c *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall) doRequest(alt string) (*http.Response, error) {
16000 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16001 if c.ifNoneMatch_ != "" {
16002 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16003 }
16004 c.urlParams_.Set("alt", alt)
16005 c.urlParams_.Set("prettyPrint", "false")
16006 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/dicomWeb/{+dicomWebPath}")
16007 urls += "?" + c.urlParams_.Encode()
16008 req, err := http.NewRequest("GET", urls, nil)
16009 if err != nil {
16010 return nil, err
16011 }
16012 req.Header = reqHeaders
16013 googleapi.Expand(req.URL, map[string]string{
16014 "parent": c.parent,
16015 "dicomWebPath": c.dicomWebPath,
16016 })
16017 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.studies.retrieveMetadata", "request", internallog.HTTPRequest(req, nil))
16018 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16019 }
16020
16021 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.retrieveMetadata" call.
16022 func (c *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveMetadataCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
16023 gensupport.SetOptions(c.urlParams_, opts...)
16024 return c.doRequest("")
16025 }
16026
16027 type ProjectsLocationsDatasetsDicomStoresStudiesRetrieveStudyCall struct {
16028 s *Service
16029 parent string
16030 dicomWebPath string
16031 urlParams_ gensupport.URLParams
16032 ifNoneMatch_ string
16033 ctx_ context.Context
16034 header_ http.Header
16035 }
16036
16037 // RetrieveStudy: RetrieveStudy returns all instances within the given study.
16038 // See RetrieveTransaction
16039 // (https://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4).
16040 // For details on the implementation of RetrieveStudy, see DICOM
16041 // study/series/instances
16042 // (https://cloud.google.com/healthcare/docs/dicom#dicom_studyseriesinstances)
16043 // in the Cloud Healthcare API conformance statement. For samples that show how
16044 // to call RetrieveStudy, see Retrieve DICOM data
16045 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieve-dicom).
16046 //
16047 // - dicomWebPath: The path of the RetrieveStudy DICOMweb request. For example,
16048 // `studies/{study_uid}`.
16049 // - parent: The name of the DICOM store that is being accessed. For example,
16050 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
16051 // tores/{dicom_store_id}`.
16052 func (r *ProjectsLocationsDatasetsDicomStoresStudiesService) RetrieveStudy(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveStudyCall {
16053 c := &ProjectsLocationsDatasetsDicomStoresStudiesRetrieveStudyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16054 c.parent = parent
16055 c.dicomWebPath = dicomWebPath
16056 return c
16057 }
16058
16059 // Fields allows partial responses to be retrieved. See
16060 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
16061 // details.
16062 func (c *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveStudyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveStudyCall {
16063 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16064 return c
16065 }
16066
16067 // IfNoneMatch sets an optional parameter which makes the operation fail if the
16068 // object's ETag matches the given value. This is useful for getting updates
16069 // only after the object has changed since the last request.
16070 func (c *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveStudyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveStudyCall {
16071 c.ifNoneMatch_ = entityTag
16072 return c
16073 }
16074
16075 // Context sets the context to be used in this call's Do method.
16076 func (c *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveStudyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveStudyCall {
16077 c.ctx_ = ctx
16078 return c
16079 }
16080
16081 // Header returns a http.Header that can be modified by the caller to add
16082 // headers to the request.
16083 func (c *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveStudyCall) Header() http.Header {
16084 if c.header_ == nil {
16085 c.header_ = make(http.Header)
16086 }
16087 return c.header_
16088 }
16089
16090 func (c *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveStudyCall) doRequest(alt string) (*http.Response, error) {
16091 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16092 if c.ifNoneMatch_ != "" {
16093 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16094 }
16095 c.urlParams_.Set("alt", alt)
16096 c.urlParams_.Set("prettyPrint", "false")
16097 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/dicomWeb/{+dicomWebPath}")
16098 urls += "?" + c.urlParams_.Encode()
16099 req, err := http.NewRequest("GET", urls, nil)
16100 if err != nil {
16101 return nil, err
16102 }
16103 req.Header = reqHeaders
16104 googleapi.Expand(req.URL, map[string]string{
16105 "parent": c.parent,
16106 "dicomWebPath": c.dicomWebPath,
16107 })
16108 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.studies.retrieveStudy", "request", internallog.HTTPRequest(req, nil))
16109 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16110 }
16111
16112 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.retrieveStudy" call.
16113 func (c *ProjectsLocationsDatasetsDicomStoresStudiesRetrieveStudyCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
16114 gensupport.SetOptions(c.urlParams_, opts...)
16115 return c.doRequest("")
16116 }
16117
16118 type ProjectsLocationsDatasetsDicomStoresStudiesSearchForInstancesCall struct {
16119 s *Service
16120 parent string
16121 dicomWebPath string
16122 urlParams_ gensupport.URLParams
16123 ifNoneMatch_ string
16124 ctx_ context.Context
16125 header_ http.Header
16126 }
16127
16128 // SearchForInstances: SearchForInstances returns a list of matching instances.
16129 // See RetrieveTransaction
16130 // (https://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4).
16131 // For details on the implementation of SearchForInstances, see Search
16132 // transaction
16133 // (https://cloud.google.com/healthcare/docs/dicom#search_transaction) in the
16134 // Cloud Healthcare API conformance statement. For samples that show how to
16135 // call SearchForInstances, see Search for DICOM data
16136 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#search-dicom).
16137 //
16138 // - dicomWebPath: The path of the SearchForInstancesRequest DICOMweb request.
16139 // For example, `instances`,
16140 // `studies/{study_uid}/series/{series_uid}/instances`, or
16141 // `studies/{study_uid}/instances`.
16142 // - parent: The name of the DICOM store that is being accessed. For example,
16143 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
16144 // tores/{dicom_store_id}`.
16145 func (r *ProjectsLocationsDatasetsDicomStoresStudiesService) SearchForInstances(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSearchForInstancesCall {
16146 c := &ProjectsLocationsDatasetsDicomStoresStudiesSearchForInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16147 c.parent = parent
16148 c.dicomWebPath = dicomWebPath
16149 return c
16150 }
16151
16152 // Fields allows partial responses to be retrieved. See
16153 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
16154 // details.
16155 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSearchForInstancesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSearchForInstancesCall {
16156 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16157 return c
16158 }
16159
16160 // IfNoneMatch sets an optional parameter which makes the operation fail if the
16161 // object's ETag matches the given value. This is useful for getting updates
16162 // only after the object has changed since the last request.
16163 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSearchForInstancesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesSearchForInstancesCall {
16164 c.ifNoneMatch_ = entityTag
16165 return c
16166 }
16167
16168 // Context sets the context to be used in this call's Do method.
16169 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSearchForInstancesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSearchForInstancesCall {
16170 c.ctx_ = ctx
16171 return c
16172 }
16173
16174 // Header returns a http.Header that can be modified by the caller to add
16175 // headers to the request.
16176 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSearchForInstancesCall) Header() http.Header {
16177 if c.header_ == nil {
16178 c.header_ = make(http.Header)
16179 }
16180 return c.header_
16181 }
16182
16183 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSearchForInstancesCall) doRequest(alt string) (*http.Response, error) {
16184 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16185 if c.ifNoneMatch_ != "" {
16186 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16187 }
16188 c.urlParams_.Set("alt", alt)
16189 c.urlParams_.Set("prettyPrint", "false")
16190 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/dicomWeb/{+dicomWebPath}")
16191 urls += "?" + c.urlParams_.Encode()
16192 req, err := http.NewRequest("GET", urls, nil)
16193 if err != nil {
16194 return nil, err
16195 }
16196 req.Header = reqHeaders
16197 googleapi.Expand(req.URL, map[string]string{
16198 "parent": c.parent,
16199 "dicomWebPath": c.dicomWebPath,
16200 })
16201 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.studies.searchForInstances", "request", internallog.HTTPRequest(req, nil))
16202 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16203 }
16204
16205 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.searchForInstances" call.
16206 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSearchForInstancesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
16207 gensupport.SetOptions(c.urlParams_, opts...)
16208 return c.doRequest("")
16209 }
16210
16211 type ProjectsLocationsDatasetsDicomStoresStudiesSearchForSeriesCall struct {
16212 s *Service
16213 parent string
16214 dicomWebPath string
16215 urlParams_ gensupport.URLParams
16216 ifNoneMatch_ string
16217 ctx_ context.Context
16218 header_ http.Header
16219 }
16220
16221 // SearchForSeries: SearchForSeries returns a list of matching series. See
16222 // RetrieveTransaction
16223 // (https://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4).
16224 // For details on the implementation of SearchForSeries, see Search transaction
16225 // (https://cloud.google.com/healthcare/docs/dicom#search_transaction) in the
16226 // Cloud Healthcare API conformance statement. For samples that show how to
16227 // call SearchForSeries, see Search for DICOM data
16228 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#search-dicom).
16229 //
16230 // - dicomWebPath: The path of the SearchForSeries DICOMweb request. For
16231 // example, `series` or `studies/{study_uid}/series`.
16232 // - parent: The name of the DICOM store that is being accessed. For example,
16233 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
16234 // tores/{dicom_store_id}`.
16235 func (r *ProjectsLocationsDatasetsDicomStoresStudiesService) SearchForSeries(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSearchForSeriesCall {
16236 c := &ProjectsLocationsDatasetsDicomStoresStudiesSearchForSeriesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16237 c.parent = parent
16238 c.dicomWebPath = dicomWebPath
16239 return c
16240 }
16241
16242 // Fields allows partial responses to be retrieved. See
16243 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
16244 // details.
16245 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSearchForSeriesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSearchForSeriesCall {
16246 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16247 return c
16248 }
16249
16250 // IfNoneMatch sets an optional parameter which makes the operation fail if the
16251 // object's ETag matches the given value. This is useful for getting updates
16252 // only after the object has changed since the last request.
16253 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSearchForSeriesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesSearchForSeriesCall {
16254 c.ifNoneMatch_ = entityTag
16255 return c
16256 }
16257
16258 // Context sets the context to be used in this call's Do method.
16259 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSearchForSeriesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSearchForSeriesCall {
16260 c.ctx_ = ctx
16261 return c
16262 }
16263
16264 // Header returns a http.Header that can be modified by the caller to add
16265 // headers to the request.
16266 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSearchForSeriesCall) Header() http.Header {
16267 if c.header_ == nil {
16268 c.header_ = make(http.Header)
16269 }
16270 return c.header_
16271 }
16272
16273 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSearchForSeriesCall) doRequest(alt string) (*http.Response, error) {
16274 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16275 if c.ifNoneMatch_ != "" {
16276 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16277 }
16278 c.urlParams_.Set("alt", alt)
16279 c.urlParams_.Set("prettyPrint", "false")
16280 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/dicomWeb/{+dicomWebPath}")
16281 urls += "?" + c.urlParams_.Encode()
16282 req, err := http.NewRequest("GET", urls, nil)
16283 if err != nil {
16284 return nil, err
16285 }
16286 req.Header = reqHeaders
16287 googleapi.Expand(req.URL, map[string]string{
16288 "parent": c.parent,
16289 "dicomWebPath": c.dicomWebPath,
16290 })
16291 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.studies.searchForSeries", "request", internallog.HTTPRequest(req, nil))
16292 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16293 }
16294
16295 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.searchForSeries" call.
16296 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSearchForSeriesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
16297 gensupport.SetOptions(c.urlParams_, opts...)
16298 return c.doRequest("")
16299 }
16300
16301 type ProjectsLocationsDatasetsDicomStoresStudiesStoreInstancesCall struct {
16302 s *Service
16303 parent string
16304 dicomWebPath string
16305 body_ io.Reader
16306 urlParams_ gensupport.URLParams
16307 ctx_ context.Context
16308 header_ http.Header
16309 }
16310
16311 // StoreInstances: StoreInstances stores DICOM instances associated with study
16312 // instance unique identifiers (SUID). See Store Transaction
16313 // (https://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.5).
16314 // For details on the implementation of StoreInstances, see Store transaction
16315 // (https://cloud.google.com/healthcare/docs/dicom#store_transaction) in the
16316 // Cloud Healthcare API conformance statement. For samples that show how to
16317 // call StoreInstances, see Store DICOM data
16318 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#store-dicom).
16319 //
16320 // - dicomWebPath: The path of the StoreInstances DICOMweb request. For
16321 // example, `studies/[{study_uid}]`. Note that the `study_uid` is optional.
16322 // - parent: The name of the DICOM store that is being accessed. For example,
16323 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
16324 // tores/{dicom_store_id}`.
16325 func (r *ProjectsLocationsDatasetsDicomStoresStudiesService) StoreInstances(parent string, dicomWebPath string, body_ io.Reader) *ProjectsLocationsDatasetsDicomStoresStudiesStoreInstancesCall {
16326 c := &ProjectsLocationsDatasetsDicomStoresStudiesStoreInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16327 c.parent = parent
16328 c.dicomWebPath = dicomWebPath
16329 c.body_ = body_
16330 return c
16331 }
16332
16333 // Fields allows partial responses to be retrieved. See
16334 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
16335 // details.
16336 func (c *ProjectsLocationsDatasetsDicomStoresStudiesStoreInstancesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesStoreInstancesCall {
16337 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16338 return c
16339 }
16340
16341 // Context sets the context to be used in this call's Do method.
16342 func (c *ProjectsLocationsDatasetsDicomStoresStudiesStoreInstancesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesStoreInstancesCall {
16343 c.ctx_ = ctx
16344 return c
16345 }
16346
16347 // Header returns a http.Header that can be modified by the caller to add
16348 // headers to the request.
16349 func (c *ProjectsLocationsDatasetsDicomStoresStudiesStoreInstancesCall) Header() http.Header {
16350 if c.header_ == nil {
16351 c.header_ = make(http.Header)
16352 }
16353 return c.header_
16354 }
16355
16356 func (c *ProjectsLocationsDatasetsDicomStoresStudiesStoreInstancesCall) doRequest(alt string) (*http.Response, error) {
16357 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16358 body := bytes.NewBuffer(nil)
16359 _, err := body.ReadFrom(c.body_)
16360 if err != nil {
16361 return nil, err
16362 }
16363 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/dicomWeb/{+dicomWebPath}")
16364 urls += "?" + c.urlParams_.Encode()
16365 req, err := http.NewRequest("POST", urls, body)
16366 if err != nil {
16367 return nil, err
16368 }
16369 req.Header = reqHeaders
16370 googleapi.Expand(req.URL, map[string]string{
16371 "parent": c.parent,
16372 "dicomWebPath": c.dicomWebPath,
16373 })
16374 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.studies.storeInstances", "request", internallog.HTTPRequest(req, body.Bytes()))
16375 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16376 }
16377
16378 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.storeInstances" call.
16379 func (c *ProjectsLocationsDatasetsDicomStoresStudiesStoreInstancesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
16380 gensupport.SetOptions(c.urlParams_, opts...)
16381 return c.doRequest("")
16382 }
16383
16384 type ProjectsLocationsDatasetsDicomStoresStudiesUpdateInstancesCall struct {
16385 s *Service
16386 parent string
16387 dicomWebPath string
16388 body_ io.Reader
16389 urlParams_ gensupport.URLParams
16390 ctx_ context.Context
16391 header_ http.Header
16392 }
16393
16394 // UpdateInstances: UpdateInstances updates DICOM instances associated with
16395 // study instance unique identifiers (SUID).
16396 //
16397 // - dicomWebPath: The path of the UpdateInstances DICOMweb request. For
16398 // example, `studies/[{study_uid}]`. Note that the `study_uid` is optional.
16399 // - parent: The name of the DICOM store that is being accessed. For example,
16400 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
16401 // tores/{dicom_store_id}`.
16402 func (r *ProjectsLocationsDatasetsDicomStoresStudiesService) UpdateInstances(parent string, dicomWebPath string, body_ io.Reader) *ProjectsLocationsDatasetsDicomStoresStudiesUpdateInstancesCall {
16403 c := &ProjectsLocationsDatasetsDicomStoresStudiesUpdateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16404 c.parent = parent
16405 c.dicomWebPath = dicomWebPath
16406 c.body_ = body_
16407 return c
16408 }
16409
16410 // Fields allows partial responses to be retrieved. See
16411 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
16412 // details.
16413 func (c *ProjectsLocationsDatasetsDicomStoresStudiesUpdateInstancesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesUpdateInstancesCall {
16414 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16415 return c
16416 }
16417
16418 // Context sets the context to be used in this call's Do method.
16419 func (c *ProjectsLocationsDatasetsDicomStoresStudiesUpdateInstancesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesUpdateInstancesCall {
16420 c.ctx_ = ctx
16421 return c
16422 }
16423
16424 // Header returns a http.Header that can be modified by the caller to add
16425 // headers to the request.
16426 func (c *ProjectsLocationsDatasetsDicomStoresStudiesUpdateInstancesCall) Header() http.Header {
16427 if c.header_ == nil {
16428 c.header_ = make(http.Header)
16429 }
16430 return c.header_
16431 }
16432
16433 func (c *ProjectsLocationsDatasetsDicomStoresStudiesUpdateInstancesCall) doRequest(alt string) (*http.Response, error) {
16434 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16435 body := bytes.NewBuffer(nil)
16436 _, err := body.ReadFrom(c.body_)
16437 if err != nil {
16438 return nil, err
16439 }
16440 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/dicomWeb/{+dicomWebPath}")
16441 urls += "?" + c.urlParams_.Encode()
16442 req, err := http.NewRequest("PUT", urls, body)
16443 if err != nil {
16444 return nil, err
16445 }
16446 req.Header = reqHeaders
16447 googleapi.Expand(req.URL, map[string]string{
16448 "parent": c.parent,
16449 "dicomWebPath": c.dicomWebPath,
16450 })
16451 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.studies.updateInstances", "request", internallog.HTTPRequest(req, body.Bytes()))
16452 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16453 }
16454
16455 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.updateInstances" call.
16456 func (c *ProjectsLocationsDatasetsDicomStoresStudiesUpdateInstancesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
16457 gensupport.SetOptions(c.urlParams_, opts...)
16458 return c.doRequest("")
16459 }
16460
16461 type ProjectsLocationsDatasetsDicomStoresStudiesUpdateMetadataCall struct {
16462 s *Service
16463 parent string
16464 dicomWebPath string
16465 body_ io.Reader
16466 urlParams_ gensupport.URLParams
16467 ctx_ context.Context
16468 header_ http.Header
16469 }
16470
16471 // UpdateMetadata: UpdateStudyMetadata modifies the metadata of all instances
16472 // in the given study. The request body must contain a JSON Patch document
16473 // specifying the updates to be applied to the metadata of all instances within
16474 // the study.
16475 //
16476 // - dicomWebPath: The path of the UpdateStudyMetadata request (for example,
16477 // `studies/{study_uid}`).
16478 // - parent: The name of the DICOM store that is being accessed (for example,
16479 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
16480 // tores/{dicom_store_id}`).
16481 func (r *ProjectsLocationsDatasetsDicomStoresStudiesService) UpdateMetadata(parent string, dicomWebPath string, body_ io.Reader) *ProjectsLocationsDatasetsDicomStoresStudiesUpdateMetadataCall {
16482 c := &ProjectsLocationsDatasetsDicomStoresStudiesUpdateMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16483 c.parent = parent
16484 c.dicomWebPath = dicomWebPath
16485 c.body_ = body_
16486 return c
16487 }
16488
16489 // Fields allows partial responses to be retrieved. See
16490 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
16491 // details.
16492 func (c *ProjectsLocationsDatasetsDicomStoresStudiesUpdateMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesUpdateMetadataCall {
16493 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16494 return c
16495 }
16496
16497 // Context sets the context to be used in this call's Do method.
16498 func (c *ProjectsLocationsDatasetsDicomStoresStudiesUpdateMetadataCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesUpdateMetadataCall {
16499 c.ctx_ = ctx
16500 return c
16501 }
16502
16503 // Header returns a http.Header that can be modified by the caller to add
16504 // headers to the request.
16505 func (c *ProjectsLocationsDatasetsDicomStoresStudiesUpdateMetadataCall) Header() http.Header {
16506 if c.header_ == nil {
16507 c.header_ = make(http.Header)
16508 }
16509 return c.header_
16510 }
16511
16512 func (c *ProjectsLocationsDatasetsDicomStoresStudiesUpdateMetadataCall) doRequest(alt string) (*http.Response, error) {
16513 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16514 body := bytes.NewBuffer(nil)
16515 _, err := body.ReadFrom(c.body_)
16516 if err != nil {
16517 return nil, err
16518 }
16519 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/dicomWeb/{+dicomWebPath}/metadata")
16520 urls += "?" + c.urlParams_.Encode()
16521 req, err := http.NewRequest("PATCH", urls, body)
16522 if err != nil {
16523 return nil, err
16524 }
16525 req.Header = reqHeaders
16526 googleapi.Expand(req.URL, map[string]string{
16527 "parent": c.parent,
16528 "dicomWebPath": c.dicomWebPath,
16529 })
16530 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.studies.updateMetadata", "request", internallog.HTTPRequest(req, body.Bytes()))
16531 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16532 }
16533
16534 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.updateMetadata" call.
16535 func (c *ProjectsLocationsDatasetsDicomStoresStudiesUpdateMetadataCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
16536 gensupport.SetOptions(c.urlParams_, opts...)
16537 return c.doRequest("")
16538 }
16539
16540 type ProjectsLocationsDatasetsDicomStoresStudiesSeriesDeleteCall struct {
16541 s *Service
16542 parent string
16543 dicomWebPath string
16544 urlParams_ gensupport.URLParams
16545 ctx_ context.Context
16546 header_ http.Header
16547 }
16548
16549 // Delete: DeleteSeries deletes all instances within the given study and series
16550 // using a long running operation. The method returns an Operation which will
16551 // be marked successful when the deletion is complete. Warning: Instances
16552 // cannot be inserted into a series that is being deleted by an operation until
16553 // the operation completes. For samples that show how to call DeleteSeries, see
16554 // Delete a study, series, or instance
16555 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#delete-dicom).
16556 //
16557 // - dicomWebPath: The path of the DeleteSeries request. For example,
16558 // `studies/{study_uid}/series/{series_uid}`.
16559 // - parent: The name of the DICOM store that is being accessed. For example,
16560 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
16561 // tores/{dicom_store_id}`.
16562 func (r *ProjectsLocationsDatasetsDicomStoresStudiesSeriesService) Delete(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesDeleteCall {
16563 c := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16564 c.parent = parent
16565 c.dicomWebPath = dicomWebPath
16566 return c
16567 }
16568
16569 // Fields allows partial responses to be retrieved. See
16570 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
16571 // details.
16572 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesDeleteCall {
16573 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16574 return c
16575 }
16576
16577 // Context sets the context to be used in this call's Do method.
16578 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesDeleteCall {
16579 c.ctx_ = ctx
16580 return c
16581 }
16582
16583 // Header returns a http.Header that can be modified by the caller to add
16584 // headers to the request.
16585 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesDeleteCall) Header() http.Header {
16586 if c.header_ == nil {
16587 c.header_ = make(http.Header)
16588 }
16589 return c.header_
16590 }
16591
16592 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesDeleteCall) doRequest(alt string) (*http.Response, error) {
16593 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16594 c.urlParams_.Set("alt", alt)
16595 c.urlParams_.Set("prettyPrint", "false")
16596 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/dicomWeb/{+dicomWebPath}")
16597 urls += "?" + c.urlParams_.Encode()
16598 req, err := http.NewRequest("DELETE", urls, nil)
16599 if err != nil {
16600 return nil, err
16601 }
16602 req.Header = reqHeaders
16603 googleapi.Expand(req.URL, map[string]string{
16604 "parent": c.parent,
16605 "dicomWebPath": c.dicomWebPath,
16606 })
16607 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.studies.series.delete", "request", internallog.HTTPRequest(req, nil))
16608 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16609 }
16610
16611 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.series.delete" call.
16612 // Any non-2xx status code is an error. Response headers are in either
16613 // *Operation.ServerResponse.Header or (if a response was returned at all) in
16614 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
16615 // whether the returned error was because http.StatusNotModified was returned.
16616 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
16617 gensupport.SetOptions(c.urlParams_, opts...)
16618 res, err := c.doRequest("json")
16619 if res != nil && res.StatusCode == http.StatusNotModified {
16620 if res.Body != nil {
16621 res.Body.Close()
16622 }
16623 return nil, gensupport.WrapError(&googleapi.Error{
16624 Code: res.StatusCode,
16625 Header: res.Header,
16626 })
16627 }
16628 if err != nil {
16629 return nil, err
16630 }
16631 defer googleapi.CloseBody(res)
16632 if err := googleapi.CheckResponse(res); err != nil {
16633 return nil, gensupport.WrapError(err)
16634 }
16635 ret := &Operation{
16636 ServerResponse: googleapi.ServerResponse{
16637 Header: res.Header,
16638 HTTPStatusCode: res.StatusCode,
16639 },
16640 }
16641 target := &ret
16642 b, err := gensupport.DecodeResponseBytes(target, res)
16643 if err != nil {
16644 return nil, err
16645 }
16646 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.studies.series.delete", "response", internallog.HTTPResponse(res, b))
16647 return ret, nil
16648 }
16649
16650 type ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall struct {
16651 s *Service
16652 parent string
16653 dicomWebPath string
16654 urlParams_ gensupport.URLParams
16655 ifNoneMatch_ string
16656 ctx_ context.Context
16657 header_ http.Header
16658 }
16659
16660 // RetrieveMetadata: RetrieveSeriesMetadata returns instance associated with
16661 // the given study and series, presented as metadata. See RetrieveTransaction
16662 // (https://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4).
16663 // For details on the implementation of RetrieveSeriesMetadata, see Metadata
16664 // resources
16665 // (https://cloud.google.com/healthcare/docs/dicom#metadata_resources) in the
16666 // Cloud Healthcare API conformance statement. For samples that show how to
16667 // call RetrieveSeriesMetadata, see Retrieve metadata
16668 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieve-metadata).
16669 //
16670 // - dicomWebPath: The path of the RetrieveSeriesMetadata DICOMweb request. For
16671 // example, `studies/{study_uid}/series/{series_uid}/metadata`.
16672 // - parent: The name of the DICOM store that is being accessed. For example,
16673 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
16674 // tores/{dicom_store_id}`.
16675 func (r *ProjectsLocationsDatasetsDicomStoresStudiesSeriesService) RetrieveMetadata(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall {
16676 c := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16677 c.parent = parent
16678 c.dicomWebPath = dicomWebPath
16679 return c
16680 }
16681
16682 // Fields allows partial responses to be retrieved. See
16683 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
16684 // details.
16685 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall {
16686 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16687 return c
16688 }
16689
16690 // IfNoneMatch sets an optional parameter which makes the operation fail if the
16691 // object's ETag matches the given value. This is useful for getting updates
16692 // only after the object has changed since the last request.
16693 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall {
16694 c.ifNoneMatch_ = entityTag
16695 return c
16696 }
16697
16698 // Context sets the context to be used in this call's Do method.
16699 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall {
16700 c.ctx_ = ctx
16701 return c
16702 }
16703
16704 // Header returns a http.Header that can be modified by the caller to add
16705 // headers to the request.
16706 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall) Header() http.Header {
16707 if c.header_ == nil {
16708 c.header_ = make(http.Header)
16709 }
16710 return c.header_
16711 }
16712
16713 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall) doRequest(alt string) (*http.Response, error) {
16714 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16715 if c.ifNoneMatch_ != "" {
16716 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16717 }
16718 c.urlParams_.Set("alt", alt)
16719 c.urlParams_.Set("prettyPrint", "false")
16720 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/dicomWeb/{+dicomWebPath}")
16721 urls += "?" + c.urlParams_.Encode()
16722 req, err := http.NewRequest("GET", urls, nil)
16723 if err != nil {
16724 return nil, err
16725 }
16726 req.Header = reqHeaders
16727 googleapi.Expand(req.URL, map[string]string{
16728 "parent": c.parent,
16729 "dicomWebPath": c.dicomWebPath,
16730 })
16731 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.studies.series.retrieveMetadata", "request", internallog.HTTPRequest(req, nil))
16732 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16733 }
16734
16735 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.series.retrieveMetadata" call.
16736 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveMetadataCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
16737 gensupport.SetOptions(c.urlParams_, opts...)
16738 return c.doRequest("")
16739 }
16740
16741 type ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveSeriesCall struct {
16742 s *Service
16743 parent string
16744 dicomWebPath string
16745 urlParams_ gensupport.URLParams
16746 ifNoneMatch_ string
16747 ctx_ context.Context
16748 header_ http.Header
16749 }
16750
16751 // RetrieveSeries: RetrieveSeries returns all instances within the given study
16752 // and series. See RetrieveTransaction
16753 // (https://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4).
16754 // For details on the implementation of RetrieveSeries, see DICOM
16755 // study/series/instances
16756 // (https://cloud.google.com/healthcare/docs/dicom#dicom_studyseriesinstances)
16757 // in the Cloud Healthcare API conformance statement. For samples that show how
16758 // to call RetrieveSeries, see Retrieve DICOM data
16759 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieve-dicom).
16760 //
16761 // - dicomWebPath: The path of the RetrieveSeries DICOMweb request. For
16762 // example, `studies/{study_uid}/series/{series_uid}`.
16763 // - parent: The name of the DICOM store that is being accessed. For example,
16764 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
16765 // tores/{dicom_store_id}`.
16766 func (r *ProjectsLocationsDatasetsDicomStoresStudiesSeriesService) RetrieveSeries(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveSeriesCall {
16767 c := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveSeriesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16768 c.parent = parent
16769 c.dicomWebPath = dicomWebPath
16770 return c
16771 }
16772
16773 // Fields allows partial responses to be retrieved. See
16774 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
16775 // details.
16776 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveSeriesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveSeriesCall {
16777 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16778 return c
16779 }
16780
16781 // IfNoneMatch sets an optional parameter which makes the operation fail if the
16782 // object's ETag matches the given value. This is useful for getting updates
16783 // only after the object has changed since the last request.
16784 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveSeriesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveSeriesCall {
16785 c.ifNoneMatch_ = entityTag
16786 return c
16787 }
16788
16789 // Context sets the context to be used in this call's Do method.
16790 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveSeriesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveSeriesCall {
16791 c.ctx_ = ctx
16792 return c
16793 }
16794
16795 // Header returns a http.Header that can be modified by the caller to add
16796 // headers to the request.
16797 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveSeriesCall) Header() http.Header {
16798 if c.header_ == nil {
16799 c.header_ = make(http.Header)
16800 }
16801 return c.header_
16802 }
16803
16804 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveSeriesCall) doRequest(alt string) (*http.Response, error) {
16805 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16806 if c.ifNoneMatch_ != "" {
16807 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16808 }
16809 c.urlParams_.Set("alt", alt)
16810 c.urlParams_.Set("prettyPrint", "false")
16811 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/dicomWeb/{+dicomWebPath}")
16812 urls += "?" + c.urlParams_.Encode()
16813 req, err := http.NewRequest("GET", urls, nil)
16814 if err != nil {
16815 return nil, err
16816 }
16817 req.Header = reqHeaders
16818 googleapi.Expand(req.URL, map[string]string{
16819 "parent": c.parent,
16820 "dicomWebPath": c.dicomWebPath,
16821 })
16822 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.studies.series.retrieveSeries", "request", internallog.HTTPRequest(req, nil))
16823 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16824 }
16825
16826 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.series.retrieveSeries" call.
16827 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesRetrieveSeriesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
16828 gensupport.SetOptions(c.urlParams_, opts...)
16829 return c.doRequest("")
16830 }
16831
16832 type ProjectsLocationsDatasetsDicomStoresStudiesSeriesSearchForInstancesCall struct {
16833 s *Service
16834 parent string
16835 dicomWebPath string
16836 urlParams_ gensupport.URLParams
16837 ifNoneMatch_ string
16838 ctx_ context.Context
16839 header_ http.Header
16840 }
16841
16842 // SearchForInstances: SearchForInstances returns a list of matching instances.
16843 // See RetrieveTransaction
16844 // (https://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4).
16845 // For details on the implementation of SearchForInstances, see Search
16846 // transaction
16847 // (https://cloud.google.com/healthcare/docs/dicom#search_transaction) in the
16848 // Cloud Healthcare API conformance statement. For samples that show how to
16849 // call SearchForInstances, see Search for DICOM data
16850 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#search-dicom).
16851 //
16852 // - dicomWebPath: The path of the SearchForInstancesRequest DICOMweb request.
16853 // For example, `instances`,
16854 // `studies/{study_uid}/series/{series_uid}/instances`, or
16855 // `studies/{study_uid}/instances`.
16856 // - parent: The name of the DICOM store that is being accessed. For example,
16857 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
16858 // tores/{dicom_store_id}`.
16859 func (r *ProjectsLocationsDatasetsDicomStoresStudiesSeriesService) SearchForInstances(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesSearchForInstancesCall {
16860 c := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesSearchForInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16861 c.parent = parent
16862 c.dicomWebPath = dicomWebPath
16863 return c
16864 }
16865
16866 // Fields allows partial responses to be retrieved. See
16867 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
16868 // details.
16869 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesSearchForInstancesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesSearchForInstancesCall {
16870 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16871 return c
16872 }
16873
16874 // IfNoneMatch sets an optional parameter which makes the operation fail if the
16875 // object's ETag matches the given value. This is useful for getting updates
16876 // only after the object has changed since the last request.
16877 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesSearchForInstancesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesSearchForInstancesCall {
16878 c.ifNoneMatch_ = entityTag
16879 return c
16880 }
16881
16882 // Context sets the context to be used in this call's Do method.
16883 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesSearchForInstancesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesSearchForInstancesCall {
16884 c.ctx_ = ctx
16885 return c
16886 }
16887
16888 // Header returns a http.Header that can be modified by the caller to add
16889 // headers to the request.
16890 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesSearchForInstancesCall) Header() http.Header {
16891 if c.header_ == nil {
16892 c.header_ = make(http.Header)
16893 }
16894 return c.header_
16895 }
16896
16897 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesSearchForInstancesCall) doRequest(alt string) (*http.Response, error) {
16898 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16899 if c.ifNoneMatch_ != "" {
16900 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16901 }
16902 c.urlParams_.Set("alt", alt)
16903 c.urlParams_.Set("prettyPrint", "false")
16904 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/dicomWeb/{+dicomWebPath}")
16905 urls += "?" + c.urlParams_.Encode()
16906 req, err := http.NewRequest("GET", urls, nil)
16907 if err != nil {
16908 return nil, err
16909 }
16910 req.Header = reqHeaders
16911 googleapi.Expand(req.URL, map[string]string{
16912 "parent": c.parent,
16913 "dicomWebPath": c.dicomWebPath,
16914 })
16915 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.studies.series.searchForInstances", "request", internallog.HTTPRequest(req, nil))
16916 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16917 }
16918
16919 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.series.searchForInstances" call.
16920 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesSearchForInstancesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
16921 gensupport.SetOptions(c.urlParams_, opts...)
16922 return c.doRequest("")
16923 }
16924
16925 type ProjectsLocationsDatasetsDicomStoresStudiesSeriesUpdateMetadataCall struct {
16926 s *Service
16927 parent string
16928 dicomWebPath string
16929 body_ io.Reader
16930 urlParams_ gensupport.URLParams
16931 ctx_ context.Context
16932 header_ http.Header
16933 }
16934
16935 // UpdateMetadata: UpdateSeriesMetadata modifies the metadata of all instances
16936 // in the given series. The request body must contain a JSON Patch document
16937 // specifying the updates to be applied to the metadata of all instances within
16938 // the series.
16939 //
16940 // - dicomWebPath: The path of the UpdateSeriesMetadata request (for example,
16941 // `studies/{study_uid}/series/{series_uid}`).
16942 // - parent: The name of the DICOM store that is being accessed (for example,
16943 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
16944 // tores/{dicom_store_id}`).
16945 func (r *ProjectsLocationsDatasetsDicomStoresStudiesSeriesService) UpdateMetadata(parent string, dicomWebPath string, body_ io.Reader) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesUpdateMetadataCall {
16946 c := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesUpdateMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16947 c.parent = parent
16948 c.dicomWebPath = dicomWebPath
16949 c.body_ = body_
16950 return c
16951 }
16952
16953 // Fields allows partial responses to be retrieved. See
16954 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
16955 // details.
16956 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesUpdateMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesUpdateMetadataCall {
16957 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16958 return c
16959 }
16960
16961 // Context sets the context to be used in this call's Do method.
16962 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesUpdateMetadataCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesUpdateMetadataCall {
16963 c.ctx_ = ctx
16964 return c
16965 }
16966
16967 // Header returns a http.Header that can be modified by the caller to add
16968 // headers to the request.
16969 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesUpdateMetadataCall) Header() http.Header {
16970 if c.header_ == nil {
16971 c.header_ = make(http.Header)
16972 }
16973 return c.header_
16974 }
16975
16976 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesUpdateMetadataCall) doRequest(alt string) (*http.Response, error) {
16977 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16978 body := bytes.NewBuffer(nil)
16979 _, err := body.ReadFrom(c.body_)
16980 if err != nil {
16981 return nil, err
16982 }
16983 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/dicomWeb/{+dicomWebPath}/metadata")
16984 urls += "?" + c.urlParams_.Encode()
16985 req, err := http.NewRequest("PATCH", urls, body)
16986 if err != nil {
16987 return nil, err
16988 }
16989 req.Header = reqHeaders
16990 googleapi.Expand(req.URL, map[string]string{
16991 "parent": c.parent,
16992 "dicomWebPath": c.dicomWebPath,
16993 })
16994 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.studies.series.updateMetadata", "request", internallog.HTTPRequest(req, body.Bytes()))
16995 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16996 }
16997
16998 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.series.updateMetadata" call.
16999 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesUpdateMetadataCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
17000 gensupport.SetOptions(c.urlParams_, opts...)
17001 return c.doRequest("")
17002 }
17003
17004 type ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesDeleteCall struct {
17005 s *Service
17006 parent string
17007 dicomWebPath string
17008 urlParams_ gensupport.URLParams
17009 ctx_ context.Context
17010 header_ http.Header
17011 }
17012
17013 // Delete: DeleteInstance deletes an instance associated with the given study,
17014 // series, and SOP Instance UID. Delete requests are equivalent to the GET
17015 // requests specified in the Retrieve transaction. Study and series search
17016 // results can take a few seconds to be updated after an instance is deleted
17017 // using DeleteInstance. For samples that show how to call DeleteInstance, see
17018 // Delete a study, series, or instance
17019 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#delete-dicom).
17020 //
17021 // - dicomWebPath: The path of the DeleteInstance request. For example,
17022 // `studies/{study_uid}/series/{series_uid}/instances/{instance_uid}`.
17023 // - parent: The name of the DICOM store that is being accessed. For example,
17024 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
17025 // tores/{dicom_store_id}`.
17026 func (r *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesService) Delete(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesDeleteCall {
17027 c := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17028 c.parent = parent
17029 c.dicomWebPath = dicomWebPath
17030 return c
17031 }
17032
17033 // Fields allows partial responses to be retrieved. See
17034 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
17035 // details.
17036 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesDeleteCall {
17037 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17038 return c
17039 }
17040
17041 // Context sets the context to be used in this call's Do method.
17042 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesDeleteCall {
17043 c.ctx_ = ctx
17044 return c
17045 }
17046
17047 // Header returns a http.Header that can be modified by the caller to add
17048 // headers to the request.
17049 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesDeleteCall) Header() http.Header {
17050 if c.header_ == nil {
17051 c.header_ = make(http.Header)
17052 }
17053 return c.header_
17054 }
17055
17056 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
17057 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17058 c.urlParams_.Set("alt", alt)
17059 c.urlParams_.Set("prettyPrint", "false")
17060 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/dicomWeb/{+dicomWebPath}")
17061 urls += "?" + c.urlParams_.Encode()
17062 req, err := http.NewRequest("DELETE", urls, nil)
17063 if err != nil {
17064 return nil, err
17065 }
17066 req.Header = reqHeaders
17067 googleapi.Expand(req.URL, map[string]string{
17068 "parent": c.parent,
17069 "dicomWebPath": c.dicomWebPath,
17070 })
17071 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))
17072 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17073 }
17074
17075 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.delete" call.
17076 // Any non-2xx status code is an error. Response headers are in either
17077 // *Empty.ServerResponse.Header or (if a response was returned at all) in
17078 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17079 // whether the returned error was because http.StatusNotModified was returned.
17080 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
17081 gensupport.SetOptions(c.urlParams_, opts...)
17082 res, err := c.doRequest("json")
17083 if res != nil && res.StatusCode == http.StatusNotModified {
17084 if res.Body != nil {
17085 res.Body.Close()
17086 }
17087 return nil, gensupport.WrapError(&googleapi.Error{
17088 Code: res.StatusCode,
17089 Header: res.Header,
17090 })
17091 }
17092 if err != nil {
17093 return nil, err
17094 }
17095 defer googleapi.CloseBody(res)
17096 if err := googleapi.CheckResponse(res); err != nil {
17097 return nil, gensupport.WrapError(err)
17098 }
17099 ret := &Empty{
17100 ServerResponse: googleapi.ServerResponse{
17101 Header: res.Header,
17102 HTTPStatusCode: res.StatusCode,
17103 },
17104 }
17105 target := &ret
17106 b, err := gensupport.DecodeResponseBytes(target, res)
17107 if err != nil {
17108 return nil, err
17109 }
17110 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))
17111 return ret, nil
17112 }
17113
17114 type ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveInstanceCall struct {
17115 s *Service
17116 parent string
17117 dicomWebPath string
17118 urlParams_ gensupport.URLParams
17119 ifNoneMatch_ string
17120 ctx_ context.Context
17121 header_ http.Header
17122 }
17123
17124 // RetrieveInstance: RetrieveInstance returns instance associated with the
17125 // given study, series, and SOP Instance UID. See RetrieveTransaction
17126 // (https://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4).
17127 // For details on the implementation of RetrieveInstance, see DICOM
17128 // study/series/instances
17129 // (https://cloud.google.com/healthcare/docs/dicom#dicom_studyseriesinstances)
17130 // and DICOM instances
17131 // (https://cloud.google.com/healthcare/docs/dicom#dicom_instances) in the
17132 // Cloud Healthcare API conformance statement. For samples that show how to
17133 // call RetrieveInstance, see Retrieve an instance
17134 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieve-instance).
17135 //
17136 // - dicomWebPath: The path of the RetrieveInstance DICOMweb request. For
17137 // example,
17138 // `studies/{study_uid}/series/{series_uid}/instances/{instance_uid}`.
17139 // - parent: The name of the DICOM store that is being accessed. For example,
17140 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
17141 // tores/{dicom_store_id}`.
17142 func (r *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesService) RetrieveInstance(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveInstanceCall {
17143 c := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17144 c.parent = parent
17145 c.dicomWebPath = dicomWebPath
17146 return c
17147 }
17148
17149 // Fields allows partial responses to be retrieved. See
17150 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
17151 // details.
17152 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveInstanceCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveInstanceCall {
17153 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17154 return c
17155 }
17156
17157 // IfNoneMatch sets an optional parameter which makes the operation fail if the
17158 // object's ETag matches the given value. This is useful for getting updates
17159 // only after the object has changed since the last request.
17160 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveInstanceCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveInstanceCall {
17161 c.ifNoneMatch_ = entityTag
17162 return c
17163 }
17164
17165 // Context sets the context to be used in this call's Do method.
17166 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveInstanceCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveInstanceCall {
17167 c.ctx_ = ctx
17168 return c
17169 }
17170
17171 // Header returns a http.Header that can be modified by the caller to add
17172 // headers to the request.
17173 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveInstanceCall) Header() http.Header {
17174 if c.header_ == nil {
17175 c.header_ = make(http.Header)
17176 }
17177 return c.header_
17178 }
17179
17180 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveInstanceCall) doRequest(alt string) (*http.Response, error) {
17181 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17182 if c.ifNoneMatch_ != "" {
17183 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17184 }
17185 c.urlParams_.Set("alt", alt)
17186 c.urlParams_.Set("prettyPrint", "false")
17187 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/dicomWeb/{+dicomWebPath}")
17188 urls += "?" + c.urlParams_.Encode()
17189 req, err := http.NewRequest("GET", urls, nil)
17190 if err != nil {
17191 return nil, err
17192 }
17193 req.Header = reqHeaders
17194 googleapi.Expand(req.URL, map[string]string{
17195 "parent": c.parent,
17196 "dicomWebPath": c.dicomWebPath,
17197 })
17198 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))
17199 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17200 }
17201
17202 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.retrieveInstance" call.
17203 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveInstanceCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
17204 gensupport.SetOptions(c.urlParams_, opts...)
17205 return c.doRequest("")
17206 }
17207
17208 type ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataCall struct {
17209 s *Service
17210 parent string
17211 dicomWebPath string
17212 urlParams_ gensupport.URLParams
17213 ifNoneMatch_ string
17214 ctx_ context.Context
17215 header_ http.Header
17216 }
17217
17218 // RetrieveMetadata: RetrieveInstanceMetadata returns instance associated with
17219 // the given study, series, and SOP Instance UID presented as metadata. See
17220 // RetrieveTransaction
17221 // (https://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4).
17222 // For details on the implementation of RetrieveInstanceMetadata, see Metadata
17223 // resources
17224 // (https://cloud.google.com/healthcare/docs/dicom#metadata_resources) in the
17225 // Cloud Healthcare API conformance statement. For samples that show how to
17226 // call RetrieveInstanceMetadata, see Retrieve metadata
17227 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieve-metadata).
17228 //
17229 // - dicomWebPath: The path of the RetrieveInstanceMetadata DICOMweb request.
17230 // For example,
17231 // `studies/{study_uid}/series/{series_uid}/instances/{instance_uid}/metadata`
17232 // .
17233 // - parent: The name of the DICOM store that is being accessed. For example,
17234 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
17235 // tores/{dicom_store_id}`.
17236 func (r *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesService) RetrieveMetadata(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataCall {
17237 c := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17238 c.parent = parent
17239 c.dicomWebPath = dicomWebPath
17240 return c
17241 }
17242
17243 // Fields allows partial responses to be retrieved. See
17244 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
17245 // details.
17246 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataCall {
17247 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17248 return c
17249 }
17250
17251 // IfNoneMatch sets an optional parameter which makes the operation fail if the
17252 // object's ETag matches the given value. This is useful for getting updates
17253 // only after the object has changed since the last request.
17254 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataCall {
17255 c.ifNoneMatch_ = entityTag
17256 return c
17257 }
17258
17259 // Context sets the context to be used in this call's Do method.
17260 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataCall {
17261 c.ctx_ = ctx
17262 return c
17263 }
17264
17265 // Header returns a http.Header that can be modified by the caller to add
17266 // headers to the request.
17267 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataCall) Header() http.Header {
17268 if c.header_ == nil {
17269 c.header_ = make(http.Header)
17270 }
17271 return c.header_
17272 }
17273
17274 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataCall) doRequest(alt string) (*http.Response, error) {
17275 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17276 if c.ifNoneMatch_ != "" {
17277 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17278 }
17279 c.urlParams_.Set("alt", alt)
17280 c.urlParams_.Set("prettyPrint", "false")
17281 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/dicomWeb/{+dicomWebPath}")
17282 urls += "?" + c.urlParams_.Encode()
17283 req, err := http.NewRequest("GET", urls, nil)
17284 if err != nil {
17285 return nil, err
17286 }
17287 req.Header = reqHeaders
17288 googleapi.Expand(req.URL, map[string]string{
17289 "parent": c.parent,
17290 "dicomWebPath": c.dicomWebPath,
17291 })
17292 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))
17293 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17294 }
17295
17296 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.retrieveMetadata" call.
17297 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveMetadataCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
17298 gensupport.SetOptions(c.urlParams_, opts...)
17299 return c.doRequest("")
17300 }
17301
17302 type ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall struct {
17303 s *Service
17304 parent string
17305 dicomWebPath string
17306 urlParams_ gensupport.URLParams
17307 ifNoneMatch_ string
17308 ctx_ context.Context
17309 header_ http.Header
17310 }
17311
17312 // RetrieveRendered: RetrieveRenderedInstance returns instance associated with
17313 // the given study, series, and SOP Instance UID in an acceptable Rendered
17314 // Media Type. See RetrieveTransaction
17315 // (https://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4).
17316 // For details on the implementation of RetrieveRenderedInstance, see Rendered
17317 // resources
17318 // (https://cloud.google.com/healthcare/docs/dicom#rendered_resources) in the
17319 // Cloud Healthcare API conformance statement. For samples that show how to
17320 // call RetrieveRenderedInstance, see Retrieve consumer image formats
17321 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieve-consumer).
17322 //
17323 // - dicomWebPath: The path of the RetrieveRenderedInstance DICOMweb request.
17324 // For example,
17325 // `studies/{study_uid}/series/{series_uid}/instances/{instance_uid}/rendered`
17326 // .
17327 // - parent: The name of the DICOM store that is being accessed. For example,
17328 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
17329 // tores/{dicom_store_id}`.
17330 func (r *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesService) RetrieveRendered(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall {
17331 c := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17332 c.parent = parent
17333 c.dicomWebPath = dicomWebPath
17334 return c
17335 }
17336
17337 // Viewport sets the optional parameter "viewport": The viewport setting to use
17338 // as specified in
17339 // https://dicom.nema.org/medical/dicom/current/output/chtml/part18/sect_8.3.5.html#sect_8.3.5.1.3
17340 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall) Viewport(viewport string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall {
17341 c.urlParams_.Set("viewport", viewport)
17342 return c
17343 }
17344
17345 // Fields allows partial responses to be retrieved. See
17346 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
17347 // details.
17348 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall {
17349 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17350 return c
17351 }
17352
17353 // IfNoneMatch sets an optional parameter which makes the operation fail if the
17354 // object's ETag matches the given value. This is useful for getting updates
17355 // only after the object has changed since the last request.
17356 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall {
17357 c.ifNoneMatch_ = entityTag
17358 return c
17359 }
17360
17361 // Context sets the context to be used in this call's Do method.
17362 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall {
17363 c.ctx_ = ctx
17364 return c
17365 }
17366
17367 // Header returns a http.Header that can be modified by the caller to add
17368 // headers to the request.
17369 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall) Header() http.Header {
17370 if c.header_ == nil {
17371 c.header_ = make(http.Header)
17372 }
17373 return c.header_
17374 }
17375
17376 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall) doRequest(alt string) (*http.Response, error) {
17377 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17378 if c.ifNoneMatch_ != "" {
17379 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17380 }
17381 c.urlParams_.Set("alt", alt)
17382 c.urlParams_.Set("prettyPrint", "false")
17383 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/dicomWeb/{+dicomWebPath}")
17384 urls += "?" + c.urlParams_.Encode()
17385 req, err := http.NewRequest("GET", urls, nil)
17386 if err != nil {
17387 return nil, err
17388 }
17389 req.Header = reqHeaders
17390 googleapi.Expand(req.URL, map[string]string{
17391 "parent": c.parent,
17392 "dicomWebPath": c.dicomWebPath,
17393 })
17394 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))
17395 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17396 }
17397
17398 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.retrieveRendered" call.
17399 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesRetrieveRenderedCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
17400 gensupport.SetOptions(c.urlParams_, opts...)
17401 return c.doRequest("")
17402 }
17403
17404 type ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesUpdateMetadataCall struct {
17405 s *Service
17406 parent string
17407 dicomWebPath string
17408 body_ io.Reader
17409 urlParams_ gensupport.URLParams
17410 ctx_ context.Context
17411 header_ http.Header
17412 }
17413
17414 // UpdateMetadata: UpdateInstanceMetadata modifies the metadata of a single
17415 // instance. The request body must contain a JSON Patch document specifying the
17416 // updates to be applied to the metadata of the instance.
17417 //
17418 // - dicomWebPath: The path of the UpdateInstanceMetadata request (for example,
17419 // `studies/{study_uid}/series/{series_uid}/instances/{instance_uid}`).
17420 // - parent: The name of the DICOM store that is being accessed (for example,
17421 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
17422 // tores/{dicom_store_id}`).
17423 func (r *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesService) UpdateMetadata(parent string, dicomWebPath string, body_ io.Reader) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesUpdateMetadataCall {
17424 c := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesUpdateMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17425 c.parent = parent
17426 c.dicomWebPath = dicomWebPath
17427 c.body_ = body_
17428 return c
17429 }
17430
17431 // Fields allows partial responses to be retrieved. See
17432 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
17433 // details.
17434 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesUpdateMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesUpdateMetadataCall {
17435 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17436 return c
17437 }
17438
17439 // Context sets the context to be used in this call's Do method.
17440 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesUpdateMetadataCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesUpdateMetadataCall {
17441 c.ctx_ = ctx
17442 return c
17443 }
17444
17445 // Header returns a http.Header that can be modified by the caller to add
17446 // headers to the request.
17447 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesUpdateMetadataCall) Header() http.Header {
17448 if c.header_ == nil {
17449 c.header_ = make(http.Header)
17450 }
17451 return c.header_
17452 }
17453
17454 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesUpdateMetadataCall) doRequest(alt string) (*http.Response, error) {
17455 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17456 body := bytes.NewBuffer(nil)
17457 _, err := body.ReadFrom(c.body_)
17458 if err != nil {
17459 return nil, err
17460 }
17461 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/dicomWeb/{+dicomWebPath}/metadata")
17462 urls += "?" + c.urlParams_.Encode()
17463 req, err := http.NewRequest("PATCH", urls, body)
17464 if err != nil {
17465 return nil, err
17466 }
17467 req.Header = reqHeaders
17468 googleapi.Expand(req.URL, map[string]string{
17469 "parent": c.parent,
17470 "dicomWebPath": c.dicomWebPath,
17471 })
17472 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.updateMetadata", "request", internallog.HTTPRequest(req, body.Bytes()))
17473 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17474 }
17475
17476 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.updateMetadata" call.
17477 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesUpdateMetadataCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
17478 gensupport.SetOptions(c.urlParams_, opts...)
17479 return c.doRequest("")
17480 }
17481
17482 type ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesBulkdataRetrieveBulkdataCall struct {
17483 s *Service
17484 parent string
17485 dicomWebPath string
17486 urlParams_ gensupport.URLParams
17487 ifNoneMatch_ string
17488 ctx_ context.Context
17489 header_ http.Header
17490 }
17491
17492 // RetrieveBulkdata: Returns uncompressed, unencoded bytes representing the
17493 // referenced bulkdata tag from an instance. See Retrieve Transaction
17494 // (https://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4).
17495 // For details on the implementation of RetrieveBulkdata, see Bulkdata
17496 // resources
17497 // (https://cloud.google.com/healthcare/docs/dicom#bulkdata-resources) in the
17498 // Cloud Healthcare API conformance statement. For samples that show how to
17499 // call RetrieveBulkdata, see Retrieve bulkdata
17500 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieve-bulkdata).
17501 //
17502 // - dicomWebPath: The path for the `RetrieveBulkdata` DICOMweb request. For
17503 // example,
17504 // `studies/{study_uid}/series/{series_uid}/instances/{instance_uid}/bukdata/{
17505 // bulkdata_uri}`.
17506 // - parent: The name of the DICOM store that is being accessed. For example,
17507 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
17508 // tores/{dicom_store_id}`.
17509 func (r *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesBulkdataService) RetrieveBulkdata(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesBulkdataRetrieveBulkdataCall {
17510 c := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesBulkdataRetrieveBulkdataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17511 c.parent = parent
17512 c.dicomWebPath = dicomWebPath
17513 return c
17514 }
17515
17516 // Fields allows partial responses to be retrieved. See
17517 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
17518 // details.
17519 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesBulkdataRetrieveBulkdataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesBulkdataRetrieveBulkdataCall {
17520 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17521 return c
17522 }
17523
17524 // IfNoneMatch sets an optional parameter which makes the operation fail if the
17525 // object's ETag matches the given value. This is useful for getting updates
17526 // only after the object has changed since the last request.
17527 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesBulkdataRetrieveBulkdataCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesBulkdataRetrieveBulkdataCall {
17528 c.ifNoneMatch_ = entityTag
17529 return c
17530 }
17531
17532 // Context sets the context to be used in this call's Do method.
17533 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesBulkdataRetrieveBulkdataCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesBulkdataRetrieveBulkdataCall {
17534 c.ctx_ = ctx
17535 return c
17536 }
17537
17538 // Header returns a http.Header that can be modified by the caller to add
17539 // headers to the request.
17540 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesBulkdataRetrieveBulkdataCall) Header() http.Header {
17541 if c.header_ == nil {
17542 c.header_ = make(http.Header)
17543 }
17544 return c.header_
17545 }
17546
17547 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesBulkdataRetrieveBulkdataCall) doRequest(alt string) (*http.Response, error) {
17548 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17549 if c.ifNoneMatch_ != "" {
17550 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17551 }
17552 c.urlParams_.Set("alt", alt)
17553 c.urlParams_.Set("prettyPrint", "false")
17554 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/dicomWeb/{+dicomWebPath}")
17555 urls += "?" + c.urlParams_.Encode()
17556 req, err := http.NewRequest("GET", urls, nil)
17557 if err != nil {
17558 return nil, err
17559 }
17560 req.Header = reqHeaders
17561 googleapi.Expand(req.URL, map[string]string{
17562 "parent": c.parent,
17563 "dicomWebPath": c.dicomWebPath,
17564 })
17565 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))
17566 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17567 }
17568
17569 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.bulkdata.retrieveBulkdata" call.
17570 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesBulkdataRetrieveBulkdataCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
17571 gensupport.SetOptions(c.urlParams_, opts...)
17572 return c.doRequest("")
17573 }
17574
17575 type ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveFramesCall struct {
17576 s *Service
17577 parent string
17578 dicomWebPath string
17579 urlParams_ gensupport.URLParams
17580 ifNoneMatch_ string
17581 ctx_ context.Context
17582 header_ http.Header
17583 }
17584
17585 // RetrieveFrames: RetrieveFrames returns instances associated with the given
17586 // study, series, SOP Instance UID and frame numbers. See RetrieveTransaction
17587 // (https://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4).
17588 // For details on the implementation of RetrieveFrames, see DICOM frames
17589 // (https://cloud.google.com/healthcare/docs/dicom#dicom_frames) in the Cloud
17590 // Healthcare API conformance statement. For samples that show how to call
17591 // RetrieveFrames, see Retrieve DICOM data
17592 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieve-dicom).
17593 //
17594 // - dicomWebPath: The path of the RetrieveFrames DICOMweb request. For
17595 // example,
17596 // `studies/{study_uid}/series/{series_uid}/instances/{instance_uid}/frames/{f
17597 // rame_list}`.
17598 // - parent: The name of the DICOM store that is being accessed. For example,
17599 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
17600 // tores/{dicom_store_id}`.
17601 func (r *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesService) RetrieveFrames(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveFramesCall {
17602 c := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveFramesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17603 c.parent = parent
17604 c.dicomWebPath = dicomWebPath
17605 return c
17606 }
17607
17608 // Fields allows partial responses to be retrieved. See
17609 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
17610 // details.
17611 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveFramesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveFramesCall {
17612 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17613 return c
17614 }
17615
17616 // IfNoneMatch sets an optional parameter which makes the operation fail if the
17617 // object's ETag matches the given value. This is useful for getting updates
17618 // only after the object has changed since the last request.
17619 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveFramesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveFramesCall {
17620 c.ifNoneMatch_ = entityTag
17621 return c
17622 }
17623
17624 // Context sets the context to be used in this call's Do method.
17625 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveFramesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveFramesCall {
17626 c.ctx_ = ctx
17627 return c
17628 }
17629
17630 // Header returns a http.Header that can be modified by the caller to add
17631 // headers to the request.
17632 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveFramesCall) Header() http.Header {
17633 if c.header_ == nil {
17634 c.header_ = make(http.Header)
17635 }
17636 return c.header_
17637 }
17638
17639 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveFramesCall) doRequest(alt string) (*http.Response, error) {
17640 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17641 if c.ifNoneMatch_ != "" {
17642 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17643 }
17644 c.urlParams_.Set("alt", alt)
17645 c.urlParams_.Set("prettyPrint", "false")
17646 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/dicomWeb/{+dicomWebPath}")
17647 urls += "?" + c.urlParams_.Encode()
17648 req, err := http.NewRequest("GET", urls, nil)
17649 if err != nil {
17650 return nil, err
17651 }
17652 req.Header = reqHeaders
17653 googleapi.Expand(req.URL, map[string]string{
17654 "parent": c.parent,
17655 "dicomWebPath": c.dicomWebPath,
17656 })
17657 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))
17658 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17659 }
17660
17661 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.frames.retrieveFrames" call.
17662 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveFramesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
17663 gensupport.SetOptions(c.urlParams_, opts...)
17664 return c.doRequest("")
17665 }
17666
17667 type ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall struct {
17668 s *Service
17669 parent string
17670 dicomWebPath string
17671 urlParams_ gensupport.URLParams
17672 ifNoneMatch_ string
17673 ctx_ context.Context
17674 header_ http.Header
17675 }
17676
17677 // RetrieveRendered: RetrieveRenderedFrames returns instances associated with
17678 // the given study, series, SOP Instance UID and frame numbers in an acceptable
17679 // Rendered Media Type. See RetrieveTransaction
17680 // (https://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.4).
17681 // For details on the implementation of RetrieveRenderedFrames, see Rendered
17682 // resources
17683 // (https://cloud.google.com/healthcare/docs/dicom#rendered_resources) in the
17684 // Cloud Healthcare API conformance statement. For samples that show how to
17685 // call RetrieveRenderedFrames, see Retrieve consumer image formats
17686 // (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieve-consumer).
17687 //
17688 // - dicomWebPath: The path of the RetrieveRenderedFrames DICOMweb request. For
17689 // example,
17690 // `studies/{study_uid}/series/{series_uid}/instances/{instance_uid}/frames/{f
17691 // rame_list}/rendered`.
17692 // - parent: The name of the DICOM store that is being accessed. For example,
17693 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomS
17694 // tores/{dicom_store_id}`.
17695 func (r *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesService) RetrieveRendered(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall {
17696 c := &ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17697 c.parent = parent
17698 c.dicomWebPath = dicomWebPath
17699 return c
17700 }
17701
17702 // Viewport sets the optional parameter "viewport": The viewport setting to use
17703 // as specified in
17704 // https://dicom.nema.org/medical/dicom/current/output/chtml/part18/sect_8.3.5.html#sect_8.3.5.1.3
17705 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall) Viewport(viewport string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall {
17706 c.urlParams_.Set("viewport", viewport)
17707 return c
17708 }
17709
17710 // Fields allows partial responses to be retrieved. See
17711 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
17712 // details.
17713 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall {
17714 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17715 return c
17716 }
17717
17718 // IfNoneMatch sets an optional parameter which makes the operation fail if the
17719 // object's ETag matches the given value. This is useful for getting updates
17720 // only after the object has changed since the last request.
17721 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall {
17722 c.ifNoneMatch_ = entityTag
17723 return c
17724 }
17725
17726 // Context sets the context to be used in this call's Do method.
17727 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall {
17728 c.ctx_ = ctx
17729 return c
17730 }
17731
17732 // Header returns a http.Header that can be modified by the caller to add
17733 // headers to the request.
17734 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall) Header() http.Header {
17735 if c.header_ == nil {
17736 c.header_ = make(http.Header)
17737 }
17738 return c.header_
17739 }
17740
17741 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall) doRequest(alt string) (*http.Response, error) {
17742 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17743 if c.ifNoneMatch_ != "" {
17744 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17745 }
17746 c.urlParams_.Set("alt", alt)
17747 c.urlParams_.Set("prettyPrint", "false")
17748 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/dicomWeb/{+dicomWebPath}")
17749 urls += "?" + c.urlParams_.Encode()
17750 req, err := http.NewRequest("GET", urls, nil)
17751 if err != nil {
17752 return nil, err
17753 }
17754 req.Header = reqHeaders
17755 googleapi.Expand(req.URL, map[string]string{
17756 "parent": c.parent,
17757 "dicomWebPath": c.dicomWebPath,
17758 })
17759 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))
17760 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17761 }
17762
17763 // Do executes the "healthcare.projects.locations.datasets.dicomStores.studies.series.instances.frames.retrieveRendered" call.
17764 func (c *ProjectsLocationsDatasetsDicomStoresStudiesSeriesInstancesFramesRetrieveRenderedCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
17765 gensupport.SetOptions(c.urlParams_, opts...)
17766 return c.doRequest("")
17767 }
17768
17769 type ProjectsLocationsDatasetsFhirStoresApplyAdminConsentsCall struct {
17770 s *Service
17771 name string
17772 applyadminconsentsrequest *ApplyAdminConsentsRequest
17773 urlParams_ gensupport.URLParams
17774 ctx_ context.Context
17775 header_ http.Header
17776 }
17777
17778 // ApplyAdminConsents: Applies the admin Consent resources for the FHIR store
17779 // and reindexes the underlying resources in the FHIR store according to the
17780 // aggregate consents. This method also updates the
17781 // `consent_config.enforced_admin_consents` field of the FhirStore unless
17782 // `validate_only=true` in ApplyAdminConsentsRequest. Any admin Consent
17783 // resource change after this operation execution (including deletion) requires
17784 // you to call ApplyAdminConsents again for the change to take effect. This
17785 // method returns an Operation that can be used to track the progress of the
17786 // resources that were reindexed, by calling GetOperation. Upon completion, the
17787 // ApplyAdminConsentsResponse additionally contains the number of resources
17788 // that were reindexed. If at least one Consent resource contains an error or
17789 // fails be be enforced for any reason, the method returns an error instead of
17790 // an Operation. No resources will be reindexed and the
17791 // `consent_config.enforced_admin_consents` field will be unchanged. To enforce
17792 // a consent check for data access, `consent_config.access_enforced` must be
17793 // set to true for the FhirStore. FHIR Consent is not supported in DSTU2 or R5.
17794 //
17795 // - name: The name of the FHIR store to enforce, in the format
17796 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirSt
17797 // ores/{fhir_store_id}`.
17798 func (r *ProjectsLocationsDatasetsFhirStoresService) ApplyAdminConsents(name string, applyadminconsentsrequest *ApplyAdminConsentsRequest) *ProjectsLocationsDatasetsFhirStoresApplyAdminConsentsCall {
17799 c := &ProjectsLocationsDatasetsFhirStoresApplyAdminConsentsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17800 c.name = name
17801 c.applyadminconsentsrequest = applyadminconsentsrequest
17802 return c
17803 }
17804
17805 // Fields allows partial responses to be retrieved. See
17806 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
17807 // details.
17808 func (c *ProjectsLocationsDatasetsFhirStoresApplyAdminConsentsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresApplyAdminConsentsCall {
17809 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17810 return c
17811 }
17812
17813 // Context sets the context to be used in this call's Do method.
17814 func (c *ProjectsLocationsDatasetsFhirStoresApplyAdminConsentsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresApplyAdminConsentsCall {
17815 c.ctx_ = ctx
17816 return c
17817 }
17818
17819 // Header returns a http.Header that can be modified by the caller to add
17820 // headers to the request.
17821 func (c *ProjectsLocationsDatasetsFhirStoresApplyAdminConsentsCall) Header() http.Header {
17822 if c.header_ == nil {
17823 c.header_ = make(http.Header)
17824 }
17825 return c.header_
17826 }
17827
17828 func (c *ProjectsLocationsDatasetsFhirStoresApplyAdminConsentsCall) doRequest(alt string) (*http.Response, error) {
17829 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
17830 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.applyadminconsentsrequest)
17831 if err != nil {
17832 return nil, err
17833 }
17834 c.urlParams_.Set("alt", alt)
17835 c.urlParams_.Set("prettyPrint", "false")
17836 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:applyAdminConsents")
17837 urls += "?" + c.urlParams_.Encode()
17838 req, err := http.NewRequest("POST", urls, body)
17839 if err != nil {
17840 return nil, err
17841 }
17842 req.Header = reqHeaders
17843 googleapi.Expand(req.URL, map[string]string{
17844 "name": c.name,
17845 })
17846 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.applyAdminConsents", "request", internallog.HTTPRequest(req, body.Bytes()))
17847 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17848 }
17849
17850 // Do executes the "healthcare.projects.locations.datasets.fhirStores.applyAdminConsents" call.
17851 // Any non-2xx status code is an error. Response headers are in either
17852 // *Operation.ServerResponse.Header or (if a response was returned at all) in
17853 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17854 // whether the returned error was because http.StatusNotModified was returned.
17855 func (c *ProjectsLocationsDatasetsFhirStoresApplyAdminConsentsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
17856 gensupport.SetOptions(c.urlParams_, opts...)
17857 res, err := c.doRequest("json")
17858 if res != nil && res.StatusCode == http.StatusNotModified {
17859 if res.Body != nil {
17860 res.Body.Close()
17861 }
17862 return nil, gensupport.WrapError(&googleapi.Error{
17863 Code: res.StatusCode,
17864 Header: res.Header,
17865 })
17866 }
17867 if err != nil {
17868 return nil, err
17869 }
17870 defer googleapi.CloseBody(res)
17871 if err := googleapi.CheckResponse(res); err != nil {
17872 return nil, gensupport.WrapError(err)
17873 }
17874 ret := &Operation{
17875 ServerResponse: googleapi.ServerResponse{
17876 Header: res.Header,
17877 HTTPStatusCode: res.StatusCode,
17878 },
17879 }
17880 target := &ret
17881 b, err := gensupport.DecodeResponseBytes(target, res)
17882 if err != nil {
17883 return nil, err
17884 }
17885 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.applyAdminConsents", "response", internallog.HTTPResponse(res, b))
17886 return ret, nil
17887 }
17888
17889 type ProjectsLocationsDatasetsFhirStoresApplyConsentsCall struct {
17890 s *Service
17891 name string
17892 applyconsentsrequest *ApplyConsentsRequest
17893 urlParams_ gensupport.URLParams
17894 ctx_ context.Context
17895 header_ http.Header
17896 }
17897
17898 // ApplyConsents: Apply the Consent resources for the FHIR store and reindex
17899 // the underlying resources in the FHIR store according to the aggregate
17900 // consent. The aggregate consent of the patient in scope in this request
17901 // replaces any previous call of this method. Any Consent resource change after
17902 // this operation execution (including deletion) requires you to call
17903 // ApplyConsents again to have effect. This method returns an Operation that
17904 // can be used to track the progress of the consent resources that were
17905 // processed by calling GetOperation. Upon completion, the
17906 // ApplyConsentsResponse additionally contains the number of resources that was
17907 // reindexed. Errors are logged to Cloud Logging (see Viewing error logs in
17908 // Cloud Logging (https://cloud.google.com/healthcare/docs/how-tos/logging)).
17909 // To enforce consent check for data access, `consent_config.access_enforced`
17910 // must be set to true for the FhirStore. FHIR Consent is not supported in
17911 // DSTU2 or R5.
17912 //
17913 // - name: The name of the FHIR store to enforce, in the format
17914 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirSt
17915 // ores/{fhir_store_id}`.
17916 func (r *ProjectsLocationsDatasetsFhirStoresService) ApplyConsents(name string, applyconsentsrequest *ApplyConsentsRequest) *ProjectsLocationsDatasetsFhirStoresApplyConsentsCall {
17917 c := &ProjectsLocationsDatasetsFhirStoresApplyConsentsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17918 c.name = name
17919 c.applyconsentsrequest = applyconsentsrequest
17920 return c
17921 }
17922
17923 // Fields allows partial responses to be retrieved. See
17924 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
17925 // details.
17926 func (c *ProjectsLocationsDatasetsFhirStoresApplyConsentsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresApplyConsentsCall {
17927 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17928 return c
17929 }
17930
17931 // Context sets the context to be used in this call's Do method.
17932 func (c *ProjectsLocationsDatasetsFhirStoresApplyConsentsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresApplyConsentsCall {
17933 c.ctx_ = ctx
17934 return c
17935 }
17936
17937 // Header returns a http.Header that can be modified by the caller to add
17938 // headers to the request.
17939 func (c *ProjectsLocationsDatasetsFhirStoresApplyConsentsCall) Header() http.Header {
17940 if c.header_ == nil {
17941 c.header_ = make(http.Header)
17942 }
17943 return c.header_
17944 }
17945
17946 func (c *ProjectsLocationsDatasetsFhirStoresApplyConsentsCall) doRequest(alt string) (*http.Response, error) {
17947 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
17948 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.applyconsentsrequest)
17949 if err != nil {
17950 return nil, err
17951 }
17952 c.urlParams_.Set("alt", alt)
17953 c.urlParams_.Set("prettyPrint", "false")
17954 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:applyConsents")
17955 urls += "?" + c.urlParams_.Encode()
17956 req, err := http.NewRequest("POST", urls, body)
17957 if err != nil {
17958 return nil, err
17959 }
17960 req.Header = reqHeaders
17961 googleapi.Expand(req.URL, map[string]string{
17962 "name": c.name,
17963 })
17964 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.applyConsents", "request", internallog.HTTPRequest(req, body.Bytes()))
17965 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17966 }
17967
17968 // Do executes the "healthcare.projects.locations.datasets.fhirStores.applyConsents" call.
17969 // Any non-2xx status code is an error. Response headers are in either
17970 // *Operation.ServerResponse.Header or (if a response was returned at all) in
17971 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17972 // whether the returned error was because http.StatusNotModified was returned.
17973 func (c *ProjectsLocationsDatasetsFhirStoresApplyConsentsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
17974 gensupport.SetOptions(c.urlParams_, opts...)
17975 res, err := c.doRequest("json")
17976 if res != nil && res.StatusCode == http.StatusNotModified {
17977 if res.Body != nil {
17978 res.Body.Close()
17979 }
17980 return nil, gensupport.WrapError(&googleapi.Error{
17981 Code: res.StatusCode,
17982 Header: res.Header,
17983 })
17984 }
17985 if err != nil {
17986 return nil, err
17987 }
17988 defer googleapi.CloseBody(res)
17989 if err := googleapi.CheckResponse(res); err != nil {
17990 return nil, gensupport.WrapError(err)
17991 }
17992 ret := &Operation{
17993 ServerResponse: googleapi.ServerResponse{
17994 Header: res.Header,
17995 HTTPStatusCode: res.StatusCode,
17996 },
17997 }
17998 target := &ret
17999 b, err := gensupport.DecodeResponseBytes(target, res)
18000 if err != nil {
18001 return nil, err
18002 }
18003 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.applyConsents", "response", internallog.HTTPResponse(res, b))
18004 return ret, nil
18005 }
18006
18007 type ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall struct {
18008 s *Service
18009 name string
18010 urlParams_ gensupport.URLParams
18011 ifNoneMatch_ string
18012 ctx_ context.Context
18013 header_ http.Header
18014 }
18015
18016 // BulkExportGroup: Bulk exports a Group resource and resources in the member
18017 // field, including related resources for each Patient member. The export for
18018 // each Patient is identical to a GetPatientEverything request. Implements the
18019 // FHIR implementation guide $export group of patients
18020 // (https://build.fhir.org/ig/HL7/bulk-data/export.html#endpoint---group-of-patients).
18021 // The following headers must be set in the request: * `Accept`: specifies the
18022 // format of the `OperationOutcome` response. Only `application/fhir+json` is
18023 // supported. * `Prefer`: specifies whether the response is immediate or
18024 // asynchronous. Must be to `respond-async` because only asynchronous responses
18025 // are supported. Specify the destination for the server to write result files
18026 // by setting the Cloud Storage location bulk_export_gcs_destination on the
18027 // FHIR store. URI of an existing Cloud Storage directory where the server
18028 // writes result files, in the format
18029 // gs://{bucket-id}/{path/to/destination/dir}. If there is no trailing slash,
18030 // the service appends one when composing the object path. The user is
18031 // responsible for creating the Cloud Storage bucket referenced. Supports the
18032 // following query parameters: * `_type`: string of comma-delimited FHIR
18033 // resource types. If provided, only resources of the specified type(s) are
18034 // exported. * `_since`: if provided, only resources updated after the
18035 // specified time are exported. * `_outputFormat`: optional, specify ndjson to
18036 // export data in NDJSON format. Exported file names use the format:
18037 // {export_id}_{resource_type}.ndjson. * `organizeOutputBy`: resource type to
18038 // organize the output by. Required and must be set to `Patient`. When
18039 // specified, output files are organized by instances of the specified resource
18040 // type, including the resource, referenced resources, and resources that
18041 // contain references to that resource. On success, the `Content-Location`
18042 // header of response is set to a URL that you can use to query the status of
18043 // the export. The URL is in the format
18044 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStor
18045 // es/{fhir_store_id}/operations/{export_id}`. See get-fhir-operation-status
18046 // for more information. Errors generated by the FHIR store contain a
18047 // JSON-encoded `OperationOutcome` resource describing the reason for the
18048 // error.
18049 //
18050 // - name: Name of the `Group` resource that is exported, in format
18051 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirSt
18052 // ores/{fhir_store_id}/fhir/Group/{group_id}`.
18053 func (r *ProjectsLocationsDatasetsFhirStoresService) BulkExportGroup(name string) *ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall {
18054 c := &ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18055 c.name = name
18056 return c
18057 }
18058
18059 // Since sets the optional parameter "_since": If provided, only resources
18060 // updated after this time are exported. The time uses the format
18061 // YYYY-MM-DDThh:mm:ss.sss+zz:zz. For example, `2015-02-07T13:28:17.239+02:00`
18062 // or `2017-01-01T00:00:00Z`. The time must be specified to the second and
18063 // include a time zone.
18064 func (c *ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall) Since(Since string) *ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall {
18065 c.urlParams_.Set("_since", Since)
18066 return c
18067 }
18068
18069 // Type sets the optional parameter "_type": String of comma-delimited FHIR
18070 // resource types. If provided, only resources of the specified resource
18071 // type(s) are exported.
18072 func (c *ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall) Type(Type string) *ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall {
18073 c.urlParams_.Set("_type", Type)
18074 return c
18075 }
18076
18077 // OrganizeOutputBy sets the optional parameter "organizeOutputBy": Required.
18078 // The FHIR resource type used to organize exported resources. Only supports
18079 // "Patient". When organized by Patient resource, output files are grouped as
18080 // follows: * Patient file(s) containing the Patient resources. Each Patient is
18081 // sequentially followed by all resources the Patient references, and all
18082 // resources that reference the Patient (equivalent to a GetPatientEverything
18083 // request). * Individual files grouped by resource type for resources in the
18084 // Group's member field and the Group resource itself. Resources may be
18085 // duplicated across multiple Patients. For example, if two Patient resources
18086 // reference the same Organization resource, it will appear twice, once after
18087 // each Patient. The Group resource from the request does not appear in the
18088 // Patient files.
18089 func (c *ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall) OrganizeOutputBy(organizeOutputBy string) *ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall {
18090 c.urlParams_.Set("organizeOutputBy", organizeOutputBy)
18091 return c
18092 }
18093
18094 // OutputFormat sets the optional parameter "outputFormat": Output format of
18095 // the export. This field is optional and only `application/fhir+ndjson` is
18096 // supported.
18097 func (c *ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall) OutputFormat(outputFormat string) *ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall {
18098 c.urlParams_.Set("outputFormat", outputFormat)
18099 return c
18100 }
18101
18102 // Fields allows partial responses to be retrieved. See
18103 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
18104 // details.
18105 func (c *ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall {
18106 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18107 return c
18108 }
18109
18110 // IfNoneMatch sets an optional parameter which makes the operation fail if the
18111 // object's ETag matches the given value. This is useful for getting updates
18112 // only after the object has changed since the last request.
18113 func (c *ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall {
18114 c.ifNoneMatch_ = entityTag
18115 return c
18116 }
18117
18118 // Context sets the context to be used in this call's Do method.
18119 func (c *ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall {
18120 c.ctx_ = ctx
18121 return c
18122 }
18123
18124 // Header returns a http.Header that can be modified by the caller to add
18125 // headers to the request.
18126 func (c *ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall) Header() http.Header {
18127 if c.header_ == nil {
18128 c.header_ = make(http.Header)
18129 }
18130 return c.header_
18131 }
18132
18133 func (c *ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall) doRequest(alt string) (*http.Response, error) {
18134 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
18135 if c.ifNoneMatch_ != "" {
18136 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18137 }
18138 c.urlParams_.Set("alt", alt)
18139 c.urlParams_.Set("prettyPrint", "false")
18140 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/$export")
18141 urls += "?" + c.urlParams_.Encode()
18142 req, err := http.NewRequest("GET", urls, nil)
18143 if err != nil {
18144 return nil, err
18145 }
18146 req.Header = reqHeaders
18147 googleapi.Expand(req.URL, map[string]string{
18148 "name": c.name,
18149 })
18150 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.bulk-export-group", "request", internallog.HTTPRequest(req, nil))
18151 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18152 }
18153
18154 // Do executes the "healthcare.projects.locations.datasets.fhirStores.bulk-export-group" call.
18155 func (c *ProjectsLocationsDatasetsFhirStoresBulkExportGroupCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
18156 gensupport.SetOptions(c.urlParams_, opts...)
18157 return c.doRequest("")
18158 }
18159
18160 type ProjectsLocationsDatasetsFhirStoresBulkDeleteCall struct {
18161 s *Service
18162 name string
18163 bulkdeleteresourcesrequest *BulkDeleteResourcesRequest
18164 urlParams_ gensupport.URLParams
18165 ctx_ context.Context
18166 header_ http.Header
18167 }
18168
18169 // BulkDelete: Bulk deletes the FHIR resources from the given FHIR store. This
18170 // method returns an Operation that can be used to track the progress of the
18171 // deletion by calling GetOperation. The success and secondary_success counters
18172 // correspond to the deleted current version and historical versions,
18173 // respectively.
18174 //
18175 // - name: The name of the FHIR store to bulk delete resources from, in the
18176 // format of
18177 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirSt
18178 // ores/{fhir_store_id}`.
18179 func (r *ProjectsLocationsDatasetsFhirStoresService) BulkDelete(name string, bulkdeleteresourcesrequest *BulkDeleteResourcesRequest) *ProjectsLocationsDatasetsFhirStoresBulkDeleteCall {
18180 c := &ProjectsLocationsDatasetsFhirStoresBulkDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18181 c.name = name
18182 c.bulkdeleteresourcesrequest = bulkdeleteresourcesrequest
18183 return c
18184 }
18185
18186 // Fields allows partial responses to be retrieved. See
18187 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
18188 // details.
18189 func (c *ProjectsLocationsDatasetsFhirStoresBulkDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresBulkDeleteCall {
18190 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18191 return c
18192 }
18193
18194 // Context sets the context to be used in this call's Do method.
18195 func (c *ProjectsLocationsDatasetsFhirStoresBulkDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresBulkDeleteCall {
18196 c.ctx_ = ctx
18197 return c
18198 }
18199
18200 // Header returns a http.Header that can be modified by the caller to add
18201 // headers to the request.
18202 func (c *ProjectsLocationsDatasetsFhirStoresBulkDeleteCall) Header() http.Header {
18203 if c.header_ == nil {
18204 c.header_ = make(http.Header)
18205 }
18206 return c.header_
18207 }
18208
18209 func (c *ProjectsLocationsDatasetsFhirStoresBulkDeleteCall) doRequest(alt string) (*http.Response, error) {
18210 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
18211 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.bulkdeleteresourcesrequest)
18212 if err != nil {
18213 return nil, err
18214 }
18215 c.urlParams_.Set("alt", alt)
18216 c.urlParams_.Set("prettyPrint", "false")
18217 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:bulkDelete")
18218 urls += "?" + c.urlParams_.Encode()
18219 req, err := http.NewRequest("POST", urls, body)
18220 if err != nil {
18221 return nil, err
18222 }
18223 req.Header = reqHeaders
18224 googleapi.Expand(req.URL, map[string]string{
18225 "name": c.name,
18226 })
18227 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.bulkDelete", "request", internallog.HTTPRequest(req, body.Bytes()))
18228 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18229 }
18230
18231 // Do executes the "healthcare.projects.locations.datasets.fhirStores.bulkDelete" call.
18232 // Any non-2xx status code is an error. Response headers are in either
18233 // *Operation.ServerResponse.Header or (if a response was returned at all) in
18234 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
18235 // whether the returned error was because http.StatusNotModified was returned.
18236 func (c *ProjectsLocationsDatasetsFhirStoresBulkDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
18237 gensupport.SetOptions(c.urlParams_, opts...)
18238 res, err := c.doRequest("json")
18239 if res != nil && res.StatusCode == http.StatusNotModified {
18240 if res.Body != nil {
18241 res.Body.Close()
18242 }
18243 return nil, gensupport.WrapError(&googleapi.Error{
18244 Code: res.StatusCode,
18245 Header: res.Header,
18246 })
18247 }
18248 if err != nil {
18249 return nil, err
18250 }
18251 defer googleapi.CloseBody(res)
18252 if err := googleapi.CheckResponse(res); err != nil {
18253 return nil, gensupport.WrapError(err)
18254 }
18255 ret := &Operation{
18256 ServerResponse: googleapi.ServerResponse{
18257 Header: res.Header,
18258 HTTPStatusCode: res.StatusCode,
18259 },
18260 }
18261 target := &ret
18262 b, err := gensupport.DecodeResponseBytes(target, res)
18263 if err != nil {
18264 return nil, err
18265 }
18266 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.bulkDelete", "response", internallog.HTTPResponse(res, b))
18267 return ret, nil
18268 }
18269
18270 type ProjectsLocationsDatasetsFhirStoresConfigureSearchCall struct {
18271 s *Service
18272 name string
18273 configuresearchrequest *ConfigureSearchRequest
18274 urlParams_ gensupport.URLParams
18275 ctx_ context.Context
18276 header_ http.Header
18277 }
18278
18279 // ConfigureSearch: Configure the search parameters for the FHIR store and
18280 // reindex resources in the FHIR store according to the defined search
18281 // parameters. The search parameters provided in this request will replace any
18282 // previous search configuration. The target SearchParameter resources need to
18283 // exist in the store before calling ConfigureSearch, otherwise an error will
18284 // occur. This method returns an Operation that can be used to track the
18285 // progress of the reindexing by calling GetOperation.
18286 //
18287 // - name: The name of the FHIR store to configure, in the format
18288 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirSt
18289 // ores/{fhir_store_id}`.
18290 func (r *ProjectsLocationsDatasetsFhirStoresService) ConfigureSearch(name string, configuresearchrequest *ConfigureSearchRequest) *ProjectsLocationsDatasetsFhirStoresConfigureSearchCall {
18291 c := &ProjectsLocationsDatasetsFhirStoresConfigureSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18292 c.name = name
18293 c.configuresearchrequest = configuresearchrequest
18294 return c
18295 }
18296
18297 // Fields allows partial responses to be retrieved. See
18298 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
18299 // details.
18300 func (c *ProjectsLocationsDatasetsFhirStoresConfigureSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresConfigureSearchCall {
18301 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18302 return c
18303 }
18304
18305 // Context sets the context to be used in this call's Do method.
18306 func (c *ProjectsLocationsDatasetsFhirStoresConfigureSearchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresConfigureSearchCall {
18307 c.ctx_ = ctx
18308 return c
18309 }
18310
18311 // Header returns a http.Header that can be modified by the caller to add
18312 // headers to the request.
18313 func (c *ProjectsLocationsDatasetsFhirStoresConfigureSearchCall) Header() http.Header {
18314 if c.header_ == nil {
18315 c.header_ = make(http.Header)
18316 }
18317 return c.header_
18318 }
18319
18320 func (c *ProjectsLocationsDatasetsFhirStoresConfigureSearchCall) doRequest(alt string) (*http.Response, error) {
18321 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
18322 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.configuresearchrequest)
18323 if err != nil {
18324 return nil, err
18325 }
18326 c.urlParams_.Set("alt", alt)
18327 c.urlParams_.Set("prettyPrint", "false")
18328 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:configureSearch")
18329 urls += "?" + c.urlParams_.Encode()
18330 req, err := http.NewRequest("POST", urls, body)
18331 if err != nil {
18332 return nil, err
18333 }
18334 req.Header = reqHeaders
18335 googleapi.Expand(req.URL, map[string]string{
18336 "name": c.name,
18337 })
18338 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.configureSearch", "request", internallog.HTTPRequest(req, body.Bytes()))
18339 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18340 }
18341
18342 // Do executes the "healthcare.projects.locations.datasets.fhirStores.configureSearch" call.
18343 // Any non-2xx status code is an error. Response headers are in either
18344 // *Operation.ServerResponse.Header or (if a response was returned at all) in
18345 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
18346 // whether the returned error was because http.StatusNotModified was returned.
18347 func (c *ProjectsLocationsDatasetsFhirStoresConfigureSearchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
18348 gensupport.SetOptions(c.urlParams_, opts...)
18349 res, err := c.doRequest("json")
18350 if res != nil && res.StatusCode == http.StatusNotModified {
18351 if res.Body != nil {
18352 res.Body.Close()
18353 }
18354 return nil, gensupport.WrapError(&googleapi.Error{
18355 Code: res.StatusCode,
18356 Header: res.Header,
18357 })
18358 }
18359 if err != nil {
18360 return nil, err
18361 }
18362 defer googleapi.CloseBody(res)
18363 if err := googleapi.CheckResponse(res); err != nil {
18364 return nil, gensupport.WrapError(err)
18365 }
18366 ret := &Operation{
18367 ServerResponse: googleapi.ServerResponse{
18368 Header: res.Header,
18369 HTTPStatusCode: res.StatusCode,
18370 },
18371 }
18372 target := &ret
18373 b, err := gensupport.DecodeResponseBytes(target, res)
18374 if err != nil {
18375 return nil, err
18376 }
18377 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.configureSearch", "response", internallog.HTTPResponse(res, b))
18378 return ret, nil
18379 }
18380
18381 type ProjectsLocationsDatasetsFhirStoresCreateCall struct {
18382 s *Service
18383 parent string
18384 fhirstore *FhirStore
18385 urlParams_ gensupport.URLParams
18386 ctx_ context.Context
18387 header_ http.Header
18388 }
18389
18390 // Create: Creates a new FHIR store within the parent dataset.
18391 //
18392 // - parent: The name of the dataset this FHIR store belongs to.
18393 func (r *ProjectsLocationsDatasetsFhirStoresService) Create(parent string, fhirstore *FhirStore) *ProjectsLocationsDatasetsFhirStoresCreateCall {
18394 c := &ProjectsLocationsDatasetsFhirStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18395 c.parent = parent
18396 c.fhirstore = fhirstore
18397 return c
18398 }
18399
18400 // FhirStoreId sets the optional parameter "fhirStoreId": Required. The ID of
18401 // the FHIR store that is being created. The string must match the following
18402 // regex: `[\p{L}\p{N}_\-\.]{1,256}`.
18403 func (c *ProjectsLocationsDatasetsFhirStoresCreateCall) FhirStoreId(fhirStoreId string) *ProjectsLocationsDatasetsFhirStoresCreateCall {
18404 c.urlParams_.Set("fhirStoreId", fhirStoreId)
18405 return c
18406 }
18407
18408 // Fields allows partial responses to be retrieved. See
18409 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
18410 // details.
18411 func (c *ProjectsLocationsDatasetsFhirStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresCreateCall {
18412 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18413 return c
18414 }
18415
18416 // Context sets the context to be used in this call's Do method.
18417 func (c *ProjectsLocationsDatasetsFhirStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresCreateCall {
18418 c.ctx_ = ctx
18419 return c
18420 }
18421
18422 // Header returns a http.Header that can be modified by the caller to add
18423 // headers to the request.
18424 func (c *ProjectsLocationsDatasetsFhirStoresCreateCall) Header() http.Header {
18425 if c.header_ == nil {
18426 c.header_ = make(http.Header)
18427 }
18428 return c.header_
18429 }
18430
18431 func (c *ProjectsLocationsDatasetsFhirStoresCreateCall) doRequest(alt string) (*http.Response, error) {
18432 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
18433 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.fhirstore)
18434 if err != nil {
18435 return nil, err
18436 }
18437 c.urlParams_.Set("alt", alt)
18438 c.urlParams_.Set("prettyPrint", "false")
18439 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/fhirStores")
18440 urls += "?" + c.urlParams_.Encode()
18441 req, err := http.NewRequest("POST", urls, body)
18442 if err != nil {
18443 return nil, err
18444 }
18445 req.Header = reqHeaders
18446 googleapi.Expand(req.URL, map[string]string{
18447 "parent": c.parent,
18448 })
18449 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.create", "request", internallog.HTTPRequest(req, body.Bytes()))
18450 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18451 }
18452
18453 // Do executes the "healthcare.projects.locations.datasets.fhirStores.create" call.
18454 // Any non-2xx status code is an error. Response headers are in either
18455 // *FhirStore.ServerResponse.Header or (if a response was returned at all) in
18456 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
18457 // whether the returned error was because http.StatusNotModified was returned.
18458 func (c *ProjectsLocationsDatasetsFhirStoresCreateCall) Do(opts ...googleapi.CallOption) (*FhirStore, error) {
18459 gensupport.SetOptions(c.urlParams_, opts...)
18460 res, err := c.doRequest("json")
18461 if res != nil && res.StatusCode == http.StatusNotModified {
18462 if res.Body != nil {
18463 res.Body.Close()
18464 }
18465 return nil, gensupport.WrapError(&googleapi.Error{
18466 Code: res.StatusCode,
18467 Header: res.Header,
18468 })
18469 }
18470 if err != nil {
18471 return nil, err
18472 }
18473 defer googleapi.CloseBody(res)
18474 if err := googleapi.CheckResponse(res); err != nil {
18475 return nil, gensupport.WrapError(err)
18476 }
18477 ret := &FhirStore{
18478 ServerResponse: googleapi.ServerResponse{
18479 Header: res.Header,
18480 HTTPStatusCode: res.StatusCode,
18481 },
18482 }
18483 target := &ret
18484 b, err := gensupport.DecodeResponseBytes(target, res)
18485 if err != nil {
18486 return nil, err
18487 }
18488 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.create", "response", internallog.HTTPResponse(res, b))
18489 return ret, nil
18490 }
18491
18492 type ProjectsLocationsDatasetsFhirStoresDeidentifyCall struct {
18493 s *Service
18494 sourceStore string
18495 deidentifyfhirstorerequest *DeidentifyFhirStoreRequest
18496 urlParams_ gensupport.URLParams
18497 ctx_ context.Context
18498 header_ http.Header
18499 }
18500
18501 // Deidentify: De-identifies data from the source store and writes it to the
18502 // destination store. The metadata field type is OperationMetadata. If the
18503 // request is successful, the response field type is
18504 // DeidentifyFhirStoreSummary. The number of resources processed are tracked in
18505 // Operation.metadata. Error details are logged to Cloud Logging. For more
18506 // information, see Viewing error logs in Cloud Logging
18507 // (https://cloud.google.com/healthcare/docs/how-tos/logging).
18508 //
18509 // - sourceStore: Source FHIR store resource name. For example,
18510 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirSt
18511 // ores/{fhir_store_id}`. R5 stores are not supported.
18512 func (r *ProjectsLocationsDatasetsFhirStoresService) Deidentify(sourceStore string, deidentifyfhirstorerequest *DeidentifyFhirStoreRequest) *ProjectsLocationsDatasetsFhirStoresDeidentifyCall {
18513 c := &ProjectsLocationsDatasetsFhirStoresDeidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18514 c.sourceStore = sourceStore
18515 c.deidentifyfhirstorerequest = deidentifyfhirstorerequest
18516 return c
18517 }
18518
18519 // Fields allows partial responses to be retrieved. See
18520 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
18521 // details.
18522 func (c *ProjectsLocationsDatasetsFhirStoresDeidentifyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresDeidentifyCall {
18523 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18524 return c
18525 }
18526
18527 // Context sets the context to be used in this call's Do method.
18528 func (c *ProjectsLocationsDatasetsFhirStoresDeidentifyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresDeidentifyCall {
18529 c.ctx_ = ctx
18530 return c
18531 }
18532
18533 // Header returns a http.Header that can be modified by the caller to add
18534 // headers to the request.
18535 func (c *ProjectsLocationsDatasetsFhirStoresDeidentifyCall) Header() http.Header {
18536 if c.header_ == nil {
18537 c.header_ = make(http.Header)
18538 }
18539 return c.header_
18540 }
18541
18542 func (c *ProjectsLocationsDatasetsFhirStoresDeidentifyCall) doRequest(alt string) (*http.Response, error) {
18543 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
18544 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.deidentifyfhirstorerequest)
18545 if err != nil {
18546 return nil, err
18547 }
18548 c.urlParams_.Set("alt", alt)
18549 c.urlParams_.Set("prettyPrint", "false")
18550 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+sourceStore}:deidentify")
18551 urls += "?" + c.urlParams_.Encode()
18552 req, err := http.NewRequest("POST", urls, body)
18553 if err != nil {
18554 return nil, err
18555 }
18556 req.Header = reqHeaders
18557 googleapi.Expand(req.URL, map[string]string{
18558 "sourceStore": c.sourceStore,
18559 })
18560 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.deidentify", "request", internallog.HTTPRequest(req, body.Bytes()))
18561 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18562 }
18563
18564 // Do executes the "healthcare.projects.locations.datasets.fhirStores.deidentify" call.
18565 // Any non-2xx status code is an error. Response headers are in either
18566 // *Operation.ServerResponse.Header or (if a response was returned at all) in
18567 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
18568 // whether the returned error was because http.StatusNotModified was returned.
18569 func (c *ProjectsLocationsDatasetsFhirStoresDeidentifyCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
18570 gensupport.SetOptions(c.urlParams_, opts...)
18571 res, err := c.doRequest("json")
18572 if res != nil && res.StatusCode == http.StatusNotModified {
18573 if res.Body != nil {
18574 res.Body.Close()
18575 }
18576 return nil, gensupport.WrapError(&googleapi.Error{
18577 Code: res.StatusCode,
18578 Header: res.Header,
18579 })
18580 }
18581 if err != nil {
18582 return nil, err
18583 }
18584 defer googleapi.CloseBody(res)
18585 if err := googleapi.CheckResponse(res); err != nil {
18586 return nil, gensupport.WrapError(err)
18587 }
18588 ret := &Operation{
18589 ServerResponse: googleapi.ServerResponse{
18590 Header: res.Header,
18591 HTTPStatusCode: res.StatusCode,
18592 },
18593 }
18594 target := &ret
18595 b, err := gensupport.DecodeResponseBytes(target, res)
18596 if err != nil {
18597 return nil, err
18598 }
18599 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.deidentify", "response", internallog.HTTPResponse(res, b))
18600 return ret, nil
18601 }
18602
18603 type ProjectsLocationsDatasetsFhirStoresDeleteCall struct {
18604 s *Service
18605 name string
18606 urlParams_ gensupport.URLParams
18607 ctx_ context.Context
18608 header_ http.Header
18609 }
18610
18611 // Delete: Deletes the specified FHIR store and removes all resources within
18612 // it.
18613 //
18614 // - name: The resource name of the FHIR store to delete.
18615 func (r *ProjectsLocationsDatasetsFhirStoresService) Delete(name string) *ProjectsLocationsDatasetsFhirStoresDeleteCall {
18616 c := &ProjectsLocationsDatasetsFhirStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18617 c.name = name
18618 return c
18619 }
18620
18621 // Fields allows partial responses to be retrieved. See
18622 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
18623 // details.
18624 func (c *ProjectsLocationsDatasetsFhirStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresDeleteCall {
18625 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18626 return c
18627 }
18628
18629 // Context sets the context to be used in this call's Do method.
18630 func (c *ProjectsLocationsDatasetsFhirStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresDeleteCall {
18631 c.ctx_ = ctx
18632 return c
18633 }
18634
18635 // Header returns a http.Header that can be modified by the caller to add
18636 // headers to the request.
18637 func (c *ProjectsLocationsDatasetsFhirStoresDeleteCall) Header() http.Header {
18638 if c.header_ == nil {
18639 c.header_ = make(http.Header)
18640 }
18641 return c.header_
18642 }
18643
18644 func (c *ProjectsLocationsDatasetsFhirStoresDeleteCall) doRequest(alt string) (*http.Response, error) {
18645 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
18646 c.urlParams_.Set("alt", alt)
18647 c.urlParams_.Set("prettyPrint", "false")
18648 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
18649 urls += "?" + c.urlParams_.Encode()
18650 req, err := http.NewRequest("DELETE", urls, nil)
18651 if err != nil {
18652 return nil, err
18653 }
18654 req.Header = reqHeaders
18655 googleapi.Expand(req.URL, map[string]string{
18656 "name": c.name,
18657 })
18658 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.delete", "request", internallog.HTTPRequest(req, nil))
18659 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18660 }
18661
18662 // Do executes the "healthcare.projects.locations.datasets.fhirStores.delete" call.
18663 // Any non-2xx status code is an error. Response headers are in either
18664 // *Empty.ServerResponse.Header or (if a response was returned at all) in
18665 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
18666 // whether the returned error was because http.StatusNotModified was returned.
18667 func (c *ProjectsLocationsDatasetsFhirStoresDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
18668 gensupport.SetOptions(c.urlParams_, opts...)
18669 res, err := c.doRequest("json")
18670 if res != nil && res.StatusCode == http.StatusNotModified {
18671 if res.Body != nil {
18672 res.Body.Close()
18673 }
18674 return nil, gensupport.WrapError(&googleapi.Error{
18675 Code: res.StatusCode,
18676 Header: res.Header,
18677 })
18678 }
18679 if err != nil {
18680 return nil, err
18681 }
18682 defer googleapi.CloseBody(res)
18683 if err := googleapi.CheckResponse(res); err != nil {
18684 return nil, gensupport.WrapError(err)
18685 }
18686 ret := &Empty{
18687 ServerResponse: googleapi.ServerResponse{
18688 Header: res.Header,
18689 HTTPStatusCode: res.StatusCode,
18690 },
18691 }
18692 target := &ret
18693 b, err := gensupport.DecodeResponseBytes(target, res)
18694 if err != nil {
18695 return nil, err
18696 }
18697 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.delete", "response", internallog.HTTPResponse(res, b))
18698 return ret, nil
18699 }
18700
18701 type ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall struct {
18702 s *Service
18703 name string
18704 urlParams_ gensupport.URLParams
18705 ifNoneMatch_ string
18706 ctx_ context.Context
18707 header_ http.Header
18708 }
18709
18710 // ExplainDataAccess: Explains all the permitted/denied actor, purpose and
18711 // environment for a given resource. FHIR Consent is not supported in DSTU2 or
18712 // R5.
18713 //
18714 // - name: The name of the FHIR store to enforce, in the format
18715 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirSt
18716 // ores/{fhir_store_id}`.
18717 func (r *ProjectsLocationsDatasetsFhirStoresService) ExplainDataAccess(name string) *ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall {
18718 c := &ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18719 c.name = name
18720 return c
18721 }
18722
18723 // ResourceId sets the optional parameter "resourceId": Required. The ID
18724 // (`{resourceType}/{id}`) of the resource to explain data access on.
18725 func (c *ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall) ResourceId(resourceId string) *ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall {
18726 c.urlParams_.Set("resourceId", resourceId)
18727 return c
18728 }
18729
18730 // Fields allows partial responses to be retrieved. See
18731 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
18732 // details.
18733 func (c *ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall {
18734 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18735 return c
18736 }
18737
18738 // IfNoneMatch sets an optional parameter which makes the operation fail if the
18739 // object's ETag matches the given value. This is useful for getting updates
18740 // only after the object has changed since the last request.
18741 func (c *ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall {
18742 c.ifNoneMatch_ = entityTag
18743 return c
18744 }
18745
18746 // Context sets the context to be used in this call's Do method.
18747 func (c *ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall {
18748 c.ctx_ = ctx
18749 return c
18750 }
18751
18752 // Header returns a http.Header that can be modified by the caller to add
18753 // headers to the request.
18754 func (c *ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall) Header() http.Header {
18755 if c.header_ == nil {
18756 c.header_ = make(http.Header)
18757 }
18758 return c.header_
18759 }
18760
18761 func (c *ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall) doRequest(alt string) (*http.Response, error) {
18762 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
18763 if c.ifNoneMatch_ != "" {
18764 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18765 }
18766 c.urlParams_.Set("alt", alt)
18767 c.urlParams_.Set("prettyPrint", "false")
18768 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:explainDataAccess")
18769 urls += "?" + c.urlParams_.Encode()
18770 req, err := http.NewRequest("GET", urls, nil)
18771 if err != nil {
18772 return nil, err
18773 }
18774 req.Header = reqHeaders
18775 googleapi.Expand(req.URL, map[string]string{
18776 "name": c.name,
18777 })
18778 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.explainDataAccess", "request", internallog.HTTPRequest(req, nil))
18779 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18780 }
18781
18782 // Do executes the "healthcare.projects.locations.datasets.fhirStores.explainDataAccess" call.
18783 // Any non-2xx status code is an error. Response headers are in either
18784 // *ExplainDataAccessResponse.ServerResponse.Header or (if a response was
18785 // returned at all) in error.(*googleapi.Error).Header. Use
18786 // googleapi.IsNotModified to check whether the returned error was because
18787 // http.StatusNotModified was returned.
18788 func (c *ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall) Do(opts ...googleapi.CallOption) (*ExplainDataAccessResponse, error) {
18789 gensupport.SetOptions(c.urlParams_, opts...)
18790 res, err := c.doRequest("json")
18791 if res != nil && res.StatusCode == http.StatusNotModified {
18792 if res.Body != nil {
18793 res.Body.Close()
18794 }
18795 return nil, gensupport.WrapError(&googleapi.Error{
18796 Code: res.StatusCode,
18797 Header: res.Header,
18798 })
18799 }
18800 if err != nil {
18801 return nil, err
18802 }
18803 defer googleapi.CloseBody(res)
18804 if err := googleapi.CheckResponse(res); err != nil {
18805 return nil, gensupport.WrapError(err)
18806 }
18807 ret := &ExplainDataAccessResponse{
18808 ServerResponse: googleapi.ServerResponse{
18809 Header: res.Header,
18810 HTTPStatusCode: res.StatusCode,
18811 },
18812 }
18813 target := &ret
18814 b, err := gensupport.DecodeResponseBytes(target, res)
18815 if err != nil {
18816 return nil, err
18817 }
18818 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.explainDataAccess", "response", internallog.HTTPResponse(res, b))
18819 return ret, nil
18820 }
18821
18822 type ProjectsLocationsDatasetsFhirStoresExportCall struct {
18823 s *Service
18824 name string
18825 exportresourcesrequest *ExportResourcesRequest
18826 urlParams_ gensupport.URLParams
18827 ctx_ context.Context
18828 header_ http.Header
18829 }
18830
18831 // Export: Export resources from the FHIR store to the specified destination.
18832 // This method returns an Operation that can be used to track the status of the
18833 // export by calling GetOperation. To improve performance, it is recommended to
18834 // make the `type` filter as specific as possible, including only the resource
18835 // types that are absolutely needed. This minimizes the size of the initial
18836 // dataset to be processed and is the most effective way to improve
18837 // performance. While post-filters like `_since` are useful for refining
18838 // results, they do not speed up the initial data retrieval phase, which is
18839 // primarily governed by the `type` filter. Immediate fatal errors appear in
18840 // the error field, errors are also logged to Cloud Logging (see Viewing error
18841 // logs in Cloud Logging
18842 // (https://cloud.google.com/healthcare/docs/how-tos/logging)). Otherwise, when
18843 // the operation finishes, a detailed response of type ExportResourcesResponse
18844 // is returned in the response field. The metadata field type for this
18845 // operation is OperationMetadata.
18846 //
18847 // - name: The name of the FHIR store to export resource from, in the format of
18848 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirSt
18849 // ores/{fhir_store_id}`.
18850 func (r *ProjectsLocationsDatasetsFhirStoresService) Export(name string, exportresourcesrequest *ExportResourcesRequest) *ProjectsLocationsDatasetsFhirStoresExportCall {
18851 c := &ProjectsLocationsDatasetsFhirStoresExportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18852 c.name = name
18853 c.exportresourcesrequest = exportresourcesrequest
18854 return c
18855 }
18856
18857 // Fields allows partial responses to be retrieved. See
18858 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
18859 // details.
18860 func (c *ProjectsLocationsDatasetsFhirStoresExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresExportCall {
18861 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18862 return c
18863 }
18864
18865 // Context sets the context to be used in this call's Do method.
18866 func (c *ProjectsLocationsDatasetsFhirStoresExportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresExportCall {
18867 c.ctx_ = ctx
18868 return c
18869 }
18870
18871 // Header returns a http.Header that can be modified by the caller to add
18872 // headers to the request.
18873 func (c *ProjectsLocationsDatasetsFhirStoresExportCall) Header() http.Header {
18874 if c.header_ == nil {
18875 c.header_ = make(http.Header)
18876 }
18877 return c.header_
18878 }
18879
18880 func (c *ProjectsLocationsDatasetsFhirStoresExportCall) doRequest(alt string) (*http.Response, error) {
18881 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
18882 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.exportresourcesrequest)
18883 if err != nil {
18884 return nil, err
18885 }
18886 c.urlParams_.Set("alt", alt)
18887 c.urlParams_.Set("prettyPrint", "false")
18888 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:export")
18889 urls += "?" + c.urlParams_.Encode()
18890 req, err := http.NewRequest("POST", urls, body)
18891 if err != nil {
18892 return nil, err
18893 }
18894 req.Header = reqHeaders
18895 googleapi.Expand(req.URL, map[string]string{
18896 "name": c.name,
18897 })
18898 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.export", "request", internallog.HTTPRequest(req, body.Bytes()))
18899 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18900 }
18901
18902 // Do executes the "healthcare.projects.locations.datasets.fhirStores.export" call.
18903 // Any non-2xx status code is an error. Response headers are in either
18904 // *Operation.ServerResponse.Header or (if a response was returned at all) in
18905 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
18906 // whether the returned error was because http.StatusNotModified was returned.
18907 func (c *ProjectsLocationsDatasetsFhirStoresExportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
18908 gensupport.SetOptions(c.urlParams_, opts...)
18909 res, err := c.doRequest("json")
18910 if res != nil && res.StatusCode == http.StatusNotModified {
18911 if res.Body != nil {
18912 res.Body.Close()
18913 }
18914 return nil, gensupport.WrapError(&googleapi.Error{
18915 Code: res.StatusCode,
18916 Header: res.Header,
18917 })
18918 }
18919 if err != nil {
18920 return nil, err
18921 }
18922 defer googleapi.CloseBody(res)
18923 if err := googleapi.CheckResponse(res); err != nil {
18924 return nil, gensupport.WrapError(err)
18925 }
18926 ret := &Operation{
18927 ServerResponse: googleapi.ServerResponse{
18928 Header: res.Header,
18929 HTTPStatusCode: res.StatusCode,
18930 },
18931 }
18932 target := &ret
18933 b, err := gensupport.DecodeResponseBytes(target, res)
18934 if err != nil {
18935 return nil, err
18936 }
18937 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.export", "response", internallog.HTTPResponse(res, b))
18938 return ret, nil
18939 }
18940
18941 type ProjectsLocationsDatasetsFhirStoresExportHistoryCall struct {
18942 s *Service
18943 name string
18944 exportresourceshistoryrequest *ExportResourcesHistoryRequest
18945 urlParams_ gensupport.URLParams
18946 ctx_ context.Context
18947 header_ http.Header
18948 }
18949
18950 // ExportHistory: Export resources including historical versions from the FHIR
18951 // store to the specified destination. The exported resource, along with
18952 // previous versions, will be exported in one or more FHIR history bundles.
18953 // This method returns an Operation that can be used to track the status of the
18954 // export by calling GetOperation. Immediate fatal errors appear in the error
18955 // field, errors are also logged to Cloud Logging (see Viewing error logs in
18956 // Cloud Logging (https://cloud.google.com/healthcare/docs/how-tos/logging)).
18957 // Otherwise, when the operation finishes, a detailed response of type
18958 // ExportResourcesResponse is returned in the response field. The metadata
18959 // field type for this operation is OperationMetadata.
18960 //
18961 // - name: The name of the FHIR store to export resource from, in the format
18962 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirSt
18963 // ores/{fhir_store_id}`.
18964 func (r *ProjectsLocationsDatasetsFhirStoresService) ExportHistory(name string, exportresourceshistoryrequest *ExportResourcesHistoryRequest) *ProjectsLocationsDatasetsFhirStoresExportHistoryCall {
18965 c := &ProjectsLocationsDatasetsFhirStoresExportHistoryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18966 c.name = name
18967 c.exportresourceshistoryrequest = exportresourceshistoryrequest
18968 return c
18969 }
18970
18971 // Fields allows partial responses to be retrieved. See
18972 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
18973 // details.
18974 func (c *ProjectsLocationsDatasetsFhirStoresExportHistoryCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresExportHistoryCall {
18975 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18976 return c
18977 }
18978
18979 // Context sets the context to be used in this call's Do method.
18980 func (c *ProjectsLocationsDatasetsFhirStoresExportHistoryCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresExportHistoryCall {
18981 c.ctx_ = ctx
18982 return c
18983 }
18984
18985 // Header returns a http.Header that can be modified by the caller to add
18986 // headers to the request.
18987 func (c *ProjectsLocationsDatasetsFhirStoresExportHistoryCall) Header() http.Header {
18988 if c.header_ == nil {
18989 c.header_ = make(http.Header)
18990 }
18991 return c.header_
18992 }
18993
18994 func (c *ProjectsLocationsDatasetsFhirStoresExportHistoryCall) doRequest(alt string) (*http.Response, error) {
18995 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
18996 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.exportresourceshistoryrequest)
18997 if err != nil {
18998 return nil, err
18999 }
19000 c.urlParams_.Set("alt", alt)
19001 c.urlParams_.Set("prettyPrint", "false")
19002 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:exportHistory")
19003 urls += "?" + c.urlParams_.Encode()
19004 req, err := http.NewRequest("POST", urls, body)
19005 if err != nil {
19006 return nil, err
19007 }
19008 req.Header = reqHeaders
19009 googleapi.Expand(req.URL, map[string]string{
19010 "name": c.name,
19011 })
19012 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.exportHistory", "request", internallog.HTTPRequest(req, body.Bytes()))
19013 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19014 }
19015
19016 // Do executes the "healthcare.projects.locations.datasets.fhirStores.exportHistory" call.
19017 // Any non-2xx status code is an error. Response headers are in either
19018 // *Operation.ServerResponse.Header or (if a response was returned at all) in
19019 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
19020 // whether the returned error was because http.StatusNotModified was returned.
19021 func (c *ProjectsLocationsDatasetsFhirStoresExportHistoryCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
19022 gensupport.SetOptions(c.urlParams_, opts...)
19023 res, err := c.doRequest("json")
19024 if res != nil && res.StatusCode == http.StatusNotModified {
19025 if res.Body != nil {
19026 res.Body.Close()
19027 }
19028 return nil, gensupport.WrapError(&googleapi.Error{
19029 Code: res.StatusCode,
19030 Header: res.Header,
19031 })
19032 }
19033 if err != nil {
19034 return nil, err
19035 }
19036 defer googleapi.CloseBody(res)
19037 if err := googleapi.CheckResponse(res); err != nil {
19038 return nil, gensupport.WrapError(err)
19039 }
19040 ret := &Operation{
19041 ServerResponse: googleapi.ServerResponse{
19042 Header: res.Header,
19043 HTTPStatusCode: res.StatusCode,
19044 },
19045 }
19046 target := &ret
19047 b, err := gensupport.DecodeResponseBytes(target, res)
19048 if err != nil {
19049 return nil, err
19050 }
19051 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.exportHistory", "response", internallog.HTTPResponse(res, b))
19052 return ret, nil
19053 }
19054
19055 type ProjectsLocationsDatasetsFhirStoresGetCall struct {
19056 s *Service
19057 name string
19058 urlParams_ gensupport.URLParams
19059 ifNoneMatch_ string
19060 ctx_ context.Context
19061 header_ http.Header
19062 }
19063
19064 // Get: Gets the configuration of the specified FHIR store.
19065 //
19066 // - name: The resource name of the FHIR store to get.
19067 func (r *ProjectsLocationsDatasetsFhirStoresService) Get(name string) *ProjectsLocationsDatasetsFhirStoresGetCall {
19068 c := &ProjectsLocationsDatasetsFhirStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19069 c.name = name
19070 return c
19071 }
19072
19073 // Fields allows partial responses to be retrieved. See
19074 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
19075 // details.
19076 func (c *ProjectsLocationsDatasetsFhirStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresGetCall {
19077 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19078 return c
19079 }
19080
19081 // IfNoneMatch sets an optional parameter which makes the operation fail if the
19082 // object's ETag matches the given value. This is useful for getting updates
19083 // only after the object has changed since the last request.
19084 func (c *ProjectsLocationsDatasetsFhirStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresGetCall {
19085 c.ifNoneMatch_ = entityTag
19086 return c
19087 }
19088
19089 // Context sets the context to be used in this call's Do method.
19090 func (c *ProjectsLocationsDatasetsFhirStoresGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresGetCall {
19091 c.ctx_ = ctx
19092 return c
19093 }
19094
19095 // Header returns a http.Header that can be modified by the caller to add
19096 // headers to the request.
19097 func (c *ProjectsLocationsDatasetsFhirStoresGetCall) Header() http.Header {
19098 if c.header_ == nil {
19099 c.header_ = make(http.Header)
19100 }
19101 return c.header_
19102 }
19103
19104 func (c *ProjectsLocationsDatasetsFhirStoresGetCall) doRequest(alt string) (*http.Response, error) {
19105 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19106 if c.ifNoneMatch_ != "" {
19107 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19108 }
19109 c.urlParams_.Set("alt", alt)
19110 c.urlParams_.Set("prettyPrint", "false")
19111 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
19112 urls += "?" + c.urlParams_.Encode()
19113 req, err := http.NewRequest("GET", urls, nil)
19114 if err != nil {
19115 return nil, err
19116 }
19117 req.Header = reqHeaders
19118 googleapi.Expand(req.URL, map[string]string{
19119 "name": c.name,
19120 })
19121 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.get", "request", internallog.HTTPRequest(req, nil))
19122 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19123 }
19124
19125 // Do executes the "healthcare.projects.locations.datasets.fhirStores.get" call.
19126 // Any non-2xx status code is an error. Response headers are in either
19127 // *FhirStore.ServerResponse.Header or (if a response was returned at all) in
19128 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
19129 // whether the returned error was because http.StatusNotModified was returned.
19130 func (c *ProjectsLocationsDatasetsFhirStoresGetCall) Do(opts ...googleapi.CallOption) (*FhirStore, error) {
19131 gensupport.SetOptions(c.urlParams_, opts...)
19132 res, err := c.doRequest("json")
19133 if res != nil && res.StatusCode == http.StatusNotModified {
19134 if res.Body != nil {
19135 res.Body.Close()
19136 }
19137 return nil, gensupport.WrapError(&googleapi.Error{
19138 Code: res.StatusCode,
19139 Header: res.Header,
19140 })
19141 }
19142 if err != nil {
19143 return nil, err
19144 }
19145 defer googleapi.CloseBody(res)
19146 if err := googleapi.CheckResponse(res); err != nil {
19147 return nil, gensupport.WrapError(err)
19148 }
19149 ret := &FhirStore{
19150 ServerResponse: googleapi.ServerResponse{
19151 Header: res.Header,
19152 HTTPStatusCode: res.StatusCode,
19153 },
19154 }
19155 target := &ret
19156 b, err := gensupport.DecodeResponseBytes(target, res)
19157 if err != nil {
19158 return nil, err
19159 }
19160 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.get", "response", internallog.HTTPResponse(res, b))
19161 return ret, nil
19162 }
19163
19164 type ProjectsLocationsDatasetsFhirStoresGetFHIRStoreMetricsCall struct {
19165 s *Service
19166 name string
19167 urlParams_ gensupport.URLParams
19168 ifNoneMatch_ string
19169 ctx_ context.Context
19170 header_ http.Header
19171 }
19172
19173 // GetFHIRStoreMetrics: Gets metrics associated with the FHIR store.
19174 //
19175 // - name: The resource name of the FHIR store to get metrics for.
19176 func (r *ProjectsLocationsDatasetsFhirStoresService) GetFHIRStoreMetrics(name string) *ProjectsLocationsDatasetsFhirStoresGetFHIRStoreMetricsCall {
19177 c := &ProjectsLocationsDatasetsFhirStoresGetFHIRStoreMetricsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19178 c.name = name
19179 return c
19180 }
19181
19182 // Fields allows partial responses to be retrieved. See
19183 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
19184 // details.
19185 func (c *ProjectsLocationsDatasetsFhirStoresGetFHIRStoreMetricsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresGetFHIRStoreMetricsCall {
19186 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19187 return c
19188 }
19189
19190 // IfNoneMatch sets an optional parameter which makes the operation fail if the
19191 // object's ETag matches the given value. This is useful for getting updates
19192 // only after the object has changed since the last request.
19193 func (c *ProjectsLocationsDatasetsFhirStoresGetFHIRStoreMetricsCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresGetFHIRStoreMetricsCall {
19194 c.ifNoneMatch_ = entityTag
19195 return c
19196 }
19197
19198 // Context sets the context to be used in this call's Do method.
19199 func (c *ProjectsLocationsDatasetsFhirStoresGetFHIRStoreMetricsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresGetFHIRStoreMetricsCall {
19200 c.ctx_ = ctx
19201 return c
19202 }
19203
19204 // Header returns a http.Header that can be modified by the caller to add
19205 // headers to the request.
19206 func (c *ProjectsLocationsDatasetsFhirStoresGetFHIRStoreMetricsCall) Header() http.Header {
19207 if c.header_ == nil {
19208 c.header_ = make(http.Header)
19209 }
19210 return c.header_
19211 }
19212
19213 func (c *ProjectsLocationsDatasetsFhirStoresGetFHIRStoreMetricsCall) doRequest(alt string) (*http.Response, error) {
19214 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19215 if c.ifNoneMatch_ != "" {
19216 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19217 }
19218 c.urlParams_.Set("alt", alt)
19219 c.urlParams_.Set("prettyPrint", "false")
19220 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:getFHIRStoreMetrics")
19221 urls += "?" + c.urlParams_.Encode()
19222 req, err := http.NewRequest("GET", urls, nil)
19223 if err != nil {
19224 return nil, err
19225 }
19226 req.Header = reqHeaders
19227 googleapi.Expand(req.URL, map[string]string{
19228 "name": c.name,
19229 })
19230 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.getFHIRStoreMetrics", "request", internallog.HTTPRequest(req, nil))
19231 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19232 }
19233
19234 // Do executes the "healthcare.projects.locations.datasets.fhirStores.getFHIRStoreMetrics" call.
19235 // Any non-2xx status code is an error. Response headers are in either
19236 // *FhirStoreMetrics.ServerResponse.Header or (if a response was returned at
19237 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
19238 // check whether the returned error was because http.StatusNotModified was
19239 // returned.
19240 func (c *ProjectsLocationsDatasetsFhirStoresGetFHIRStoreMetricsCall) Do(opts ...googleapi.CallOption) (*FhirStoreMetrics, error) {
19241 gensupport.SetOptions(c.urlParams_, opts...)
19242 res, err := c.doRequest("json")
19243 if res != nil && res.StatusCode == http.StatusNotModified {
19244 if res.Body != nil {
19245 res.Body.Close()
19246 }
19247 return nil, gensupport.WrapError(&googleapi.Error{
19248 Code: res.StatusCode,
19249 Header: res.Header,
19250 })
19251 }
19252 if err != nil {
19253 return nil, err
19254 }
19255 defer googleapi.CloseBody(res)
19256 if err := googleapi.CheckResponse(res); err != nil {
19257 return nil, gensupport.WrapError(err)
19258 }
19259 ret := &FhirStoreMetrics{
19260 ServerResponse: googleapi.ServerResponse{
19261 Header: res.Header,
19262 HTTPStatusCode: res.StatusCode,
19263 },
19264 }
19265 target := &ret
19266 b, err := gensupport.DecodeResponseBytes(target, res)
19267 if err != nil {
19268 return nil, err
19269 }
19270 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.getFHIRStoreMetrics", "response", internallog.HTTPResponse(res, b))
19271 return ret, nil
19272 }
19273
19274 type ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall struct {
19275 s *Service
19276 resource string
19277 urlParams_ gensupport.URLParams
19278 ifNoneMatch_ string
19279 ctx_ context.Context
19280 header_ http.Header
19281 }
19282
19283 // GetIamPolicy: Gets the access control policy for a resource. Returns an
19284 // empty policy if the resource exists and does not have a policy set.
19285 //
19286 // - resource: REQUIRED: The resource for which the policy is being requested.
19287 // See Resource names (https://cloud.google.com/apis/design/resource_names)
19288 // for the appropriate value for this field.
19289 func (r *ProjectsLocationsDatasetsFhirStoresService) GetIamPolicy(resource string) *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall {
19290 c := &ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19291 c.resource = resource
19292 return c
19293 }
19294
19295 // OptionsRequestedPolicyVersion sets the optional parameter
19296 // "options.requestedPolicyVersion": The maximum policy version that will be
19297 // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
19298 // an invalid value will be rejected. Requests for policies with any
19299 // conditional role bindings must specify version 3. Policies with no
19300 // conditional role bindings may specify any valid value or leave the field
19301 // unset. The policy in the response might use the policy version that you
19302 // specified, or it might use a lower policy version. For example, if you
19303 // specify version 3, but the policy has no conditional role bindings, the
19304 // response uses version 1. To learn which resources support conditions in
19305 // their IAM policies, see the IAM documentation
19306 // (https://cloud.google.com/iam/help/conditions/resource-policies).
19307 func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall {
19308 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
19309 return c
19310 }
19311
19312 // Fields allows partial responses to be retrieved. See
19313 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
19314 // details.
19315 func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall {
19316 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19317 return c
19318 }
19319
19320 // IfNoneMatch sets an optional parameter which makes the operation fail if the
19321 // object's ETag matches the given value. This is useful for getting updates
19322 // only after the object has changed since the last request.
19323 func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall {
19324 c.ifNoneMatch_ = entityTag
19325 return c
19326 }
19327
19328 // Context sets the context to be used in this call's Do method.
19329 func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall {
19330 c.ctx_ = ctx
19331 return c
19332 }
19333
19334 // Header returns a http.Header that can be modified by the caller to add
19335 // headers to the request.
19336 func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) Header() http.Header {
19337 if c.header_ == nil {
19338 c.header_ = make(http.Header)
19339 }
19340 return c.header_
19341 }
19342
19343 func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
19344 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19345 if c.ifNoneMatch_ != "" {
19346 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19347 }
19348 c.urlParams_.Set("alt", alt)
19349 c.urlParams_.Set("prettyPrint", "false")
19350 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy")
19351 urls += "?" + c.urlParams_.Encode()
19352 req, err := http.NewRequest("GET", urls, nil)
19353 if err != nil {
19354 return nil, err
19355 }
19356 req.Header = reqHeaders
19357 googleapi.Expand(req.URL, map[string]string{
19358 "resource": c.resource,
19359 })
19360 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.getIamPolicy", "request", internallog.HTTPRequest(req, nil))
19361 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19362 }
19363
19364 // Do executes the "healthcare.projects.locations.datasets.fhirStores.getIamPolicy" call.
19365 // Any non-2xx status code is an error. Response headers are in either
19366 // *Policy.ServerResponse.Header or (if a response was returned at all) in
19367 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
19368 // whether the returned error was because http.StatusNotModified was returned.
19369 func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
19370 gensupport.SetOptions(c.urlParams_, opts...)
19371 res, err := c.doRequest("json")
19372 if res != nil && res.StatusCode == http.StatusNotModified {
19373 if res.Body != nil {
19374 res.Body.Close()
19375 }
19376 return nil, gensupport.WrapError(&googleapi.Error{
19377 Code: res.StatusCode,
19378 Header: res.Header,
19379 })
19380 }
19381 if err != nil {
19382 return nil, err
19383 }
19384 defer googleapi.CloseBody(res)
19385 if err := googleapi.CheckResponse(res); err != nil {
19386 return nil, gensupport.WrapError(err)
19387 }
19388 ret := &Policy{
19389 ServerResponse: googleapi.ServerResponse{
19390 Header: res.Header,
19391 HTTPStatusCode: res.StatusCode,
19392 },
19393 }
19394 target := &ret
19395 b, err := gensupport.DecodeResponseBytes(target, res)
19396 if err != nil {
19397 return nil, err
19398 }
19399 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.getIamPolicy", "response", internallog.HTTPResponse(res, b))
19400 return ret, nil
19401 }
19402
19403 type ProjectsLocationsDatasetsFhirStoresImportCall struct {
19404 s *Service
19405 name string
19406 importresourcesrequest *ImportResourcesRequest
19407 urlParams_ gensupport.URLParams
19408 ctx_ context.Context
19409 header_ http.Header
19410 }
19411
19412 // Import: Import resources to the FHIR store by loading data from the
19413 // specified sources. This method is optimized to load large quantities of data
19414 // using import semantics that ignore some FHIR store configuration options and
19415 // are not suitable for all use cases. It is primarily intended to load data
19416 // into an empty FHIR store that is not being used by other clients. In cases
19417 // where this method is not appropriate, consider using ExecuteBundle to load
19418 // data. Every resource in the input must contain a client-supplied ID. Each
19419 // resource is stored using the supplied ID regardless of the
19420 // enable_update_create setting on the FHIR store. It is strongly advised not
19421 // to include or encode any sensitive data such as patient identifiers in
19422 // client-specified resource IDs. Those IDs are part of the FHIR resource path
19423 // recorded in Cloud Audit Logs and Cloud Pub/Sub notifications. Those IDs can
19424 // also be contained in reference fields within other resources. The import
19425 // process does not enforce referential integrity, regardless of the
19426 // disable_referential_integrity setting on the FHIR store. This allows the
19427 // import of resources with arbitrary interdependencies without considering
19428 // grouping or ordering, but if the input data contains invalid references or
19429 // if some resources fail to be imported, the FHIR store might be left in a
19430 // state that violates referential integrity. The import process does not
19431 // trigger Pub/Sub notification or BigQuery streaming update, regardless of how
19432 // those are configured on the FHIR store. If a resource with the specified ID
19433 // already exists, the most recent version of the resource is overwritten
19434 // without creating a new historical version, regardless of the
19435 // disable_resource_versioning setting on the FHIR store. If transient failures
19436 // occur during the import, it is possible that successfully imported resources
19437 // will be overwritten more than once. The import operation is idempotent
19438 // unless the input data contains multiple valid resources with the same ID but
19439 // different contents. In that case, after the import completes, the store
19440 // contains exactly one resource with that ID but there is no ordering
19441 // guarantee on which version of the contents it will have. The operation
19442 // result counters do not count duplicate IDs as an error and count one success
19443 // for each resource in the input, which might result in a success count larger
19444 // than the number of resources in the FHIR store. This often occurs when
19445 // importing data organized in bundles produced by Patient-everything where
19446 // each bundle contains its own copy of a resource such as Practitioner that
19447 // might be referred to by many patients. If some resources fail to import, for
19448 // example due to parsing errors, successfully imported resources are not
19449 // rolled back. The location and format of the input data are specified by the
19450 // parameters in ImportResourcesRequest. Note that if no format is specified,
19451 // this method assumes the `BUNDLE` format. When using the `BUNDLE` format this
19452 // method ignores the `Bundle.type` field, except that `history` bundles are
19453 // rejected, and does not apply any of the bundle processing semantics for
19454 // batch or transaction bundles. Unlike in ExecuteBundle, transaction bundles
19455 // are not executed as a single transaction and bundle-internal references are
19456 // not rewritten. The bundle is treated as a collection of resources to be
19457 // written as provided in `Bundle.entry.resource`, ignoring
19458 // `Bundle.entry.request`. As an example, this allows the import of `searchset`
19459 // bundles produced by a FHIR search or Patient-everything operation. This
19460 // method returns an Operation that can be used to track the status of the
19461 // import by calling GetOperation. Immediate fatal errors appear in the error
19462 // field, errors are also logged to Cloud Logging (see Viewing error logs in
19463 // Cloud Logging (https://cloud.google.com/healthcare/docs/how-tos/logging)).
19464 // Otherwise, when the operation finishes, a detailed response of type
19465 // ImportResourcesResponse is returned in the response field. The metadata
19466 // field type for this operation is OperationMetadata.
19467 //
19468 // - name: The name of the FHIR store to import FHIR resources to, in the
19469 // format of
19470 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirSt
19471 // ores/{fhir_store_id}`.
19472 func (r *ProjectsLocationsDatasetsFhirStoresService) Import(name string, importresourcesrequest *ImportResourcesRequest) *ProjectsLocationsDatasetsFhirStoresImportCall {
19473 c := &ProjectsLocationsDatasetsFhirStoresImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19474 c.name = name
19475 c.importresourcesrequest = importresourcesrequest
19476 return c
19477 }
19478
19479 // Fields allows partial responses to be retrieved. See
19480 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
19481 // details.
19482 func (c *ProjectsLocationsDatasetsFhirStoresImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresImportCall {
19483 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19484 return c
19485 }
19486
19487 // Context sets the context to be used in this call's Do method.
19488 func (c *ProjectsLocationsDatasetsFhirStoresImportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresImportCall {
19489 c.ctx_ = ctx
19490 return c
19491 }
19492
19493 // Header returns a http.Header that can be modified by the caller to add
19494 // headers to the request.
19495 func (c *ProjectsLocationsDatasetsFhirStoresImportCall) Header() http.Header {
19496 if c.header_ == nil {
19497 c.header_ = make(http.Header)
19498 }
19499 return c.header_
19500 }
19501
19502 func (c *ProjectsLocationsDatasetsFhirStoresImportCall) doRequest(alt string) (*http.Response, error) {
19503 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
19504 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.importresourcesrequest)
19505 if err != nil {
19506 return nil, err
19507 }
19508 c.urlParams_.Set("alt", alt)
19509 c.urlParams_.Set("prettyPrint", "false")
19510 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:import")
19511 urls += "?" + c.urlParams_.Encode()
19512 req, err := http.NewRequest("POST", urls, body)
19513 if err != nil {
19514 return nil, err
19515 }
19516 req.Header = reqHeaders
19517 googleapi.Expand(req.URL, map[string]string{
19518 "name": c.name,
19519 })
19520 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.import", "request", internallog.HTTPRequest(req, body.Bytes()))
19521 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19522 }
19523
19524 // Do executes the "healthcare.projects.locations.datasets.fhirStores.import" call.
19525 // Any non-2xx status code is an error. Response headers are in either
19526 // *Operation.ServerResponse.Header or (if a response was returned at all) in
19527 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
19528 // whether the returned error was because http.StatusNotModified was returned.
19529 func (c *ProjectsLocationsDatasetsFhirStoresImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
19530 gensupport.SetOptions(c.urlParams_, opts...)
19531 res, err := c.doRequest("json")
19532 if res != nil && res.StatusCode == http.StatusNotModified {
19533 if res.Body != nil {
19534 res.Body.Close()
19535 }
19536 return nil, gensupport.WrapError(&googleapi.Error{
19537 Code: res.StatusCode,
19538 Header: res.Header,
19539 })
19540 }
19541 if err != nil {
19542 return nil, err
19543 }
19544 defer googleapi.CloseBody(res)
19545 if err := googleapi.CheckResponse(res); err != nil {
19546 return nil, gensupport.WrapError(err)
19547 }
19548 ret := &Operation{
19549 ServerResponse: googleapi.ServerResponse{
19550 Header: res.Header,
19551 HTTPStatusCode: res.StatusCode,
19552 },
19553 }
19554 target := &ret
19555 b, err := gensupport.DecodeResponseBytes(target, res)
19556 if err != nil {
19557 return nil, err
19558 }
19559 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.import", "response", internallog.HTTPResponse(res, b))
19560 return ret, nil
19561 }
19562
19563 type ProjectsLocationsDatasetsFhirStoresImportHistoryCall struct {
19564 s *Service
19565 name string
19566 importresourceshistoryrequest *ImportResourcesHistoryRequest
19567 urlParams_ gensupport.URLParams
19568 ctx_ context.Context
19569 header_ http.Header
19570 }
19571
19572 // ImportHistory: Import resource historical versions from Cloud Storage source
19573 // to destination fhir store. The exported resource, along with previous
19574 // versions, will be exported in one or more FHIR history bundles. This method
19575 // returns an Operation that can be used to track the status of the import by
19576 // calling GetOperation. Immediate fatal errors appear in the error field,
19577 // errors are also logged to Cloud Logging (see Viewing error logs in Cloud
19578 // Logging (https://cloud.google.com/healthcare/docs/how-tos/logging)).
19579 // Otherwise, when the operation finishes, a detailed response of type
19580 // ImportResourcesResponse is returned in the response field. The metadata
19581 // field type for this operation is OperationMetadata.
19582 //
19583 // - name: The name of the FHIR store to import FHIR resources to, in the
19584 // format of
19585 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirSt
19586 // ores/{fhir_store_id}`.
19587 func (r *ProjectsLocationsDatasetsFhirStoresService) ImportHistory(name string, importresourceshistoryrequest *ImportResourcesHistoryRequest) *ProjectsLocationsDatasetsFhirStoresImportHistoryCall {
19588 c := &ProjectsLocationsDatasetsFhirStoresImportHistoryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19589 c.name = name
19590 c.importresourceshistoryrequest = importresourceshistoryrequest
19591 return c
19592 }
19593
19594 // Fields allows partial responses to be retrieved. See
19595 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
19596 // details.
19597 func (c *ProjectsLocationsDatasetsFhirStoresImportHistoryCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresImportHistoryCall {
19598 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19599 return c
19600 }
19601
19602 // Context sets the context to be used in this call's Do method.
19603 func (c *ProjectsLocationsDatasetsFhirStoresImportHistoryCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresImportHistoryCall {
19604 c.ctx_ = ctx
19605 return c
19606 }
19607
19608 // Header returns a http.Header that can be modified by the caller to add
19609 // headers to the request.
19610 func (c *ProjectsLocationsDatasetsFhirStoresImportHistoryCall) Header() http.Header {
19611 if c.header_ == nil {
19612 c.header_ = make(http.Header)
19613 }
19614 return c.header_
19615 }
19616
19617 func (c *ProjectsLocationsDatasetsFhirStoresImportHistoryCall) doRequest(alt string) (*http.Response, error) {
19618 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
19619 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.importresourceshistoryrequest)
19620 if err != nil {
19621 return nil, err
19622 }
19623 c.urlParams_.Set("alt", alt)
19624 c.urlParams_.Set("prettyPrint", "false")
19625 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:importHistory")
19626 urls += "?" + c.urlParams_.Encode()
19627 req, err := http.NewRequest("POST", urls, body)
19628 if err != nil {
19629 return nil, err
19630 }
19631 req.Header = reqHeaders
19632 googleapi.Expand(req.URL, map[string]string{
19633 "name": c.name,
19634 })
19635 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.importHistory", "request", internallog.HTTPRequest(req, body.Bytes()))
19636 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19637 }
19638
19639 // Do executes the "healthcare.projects.locations.datasets.fhirStores.importHistory" call.
19640 // Any non-2xx status code is an error. Response headers are in either
19641 // *Operation.ServerResponse.Header or (if a response was returned at all) in
19642 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
19643 // whether the returned error was because http.StatusNotModified was returned.
19644 func (c *ProjectsLocationsDatasetsFhirStoresImportHistoryCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
19645 gensupport.SetOptions(c.urlParams_, opts...)
19646 res, err := c.doRequest("json")
19647 if res != nil && res.StatusCode == http.StatusNotModified {
19648 if res.Body != nil {
19649 res.Body.Close()
19650 }
19651 return nil, gensupport.WrapError(&googleapi.Error{
19652 Code: res.StatusCode,
19653 Header: res.Header,
19654 })
19655 }
19656 if err != nil {
19657 return nil, err
19658 }
19659 defer googleapi.CloseBody(res)
19660 if err := googleapi.CheckResponse(res); err != nil {
19661 return nil, gensupport.WrapError(err)
19662 }
19663 ret := &Operation{
19664 ServerResponse: googleapi.ServerResponse{
19665 Header: res.Header,
19666 HTTPStatusCode: res.StatusCode,
19667 },
19668 }
19669 target := &ret
19670 b, err := gensupport.DecodeResponseBytes(target, res)
19671 if err != nil {
19672 return nil, err
19673 }
19674 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.importHistory", "response", internallog.HTTPResponse(res, b))
19675 return ret, nil
19676 }
19677
19678 type ProjectsLocationsDatasetsFhirStoresListCall struct {
19679 s *Service
19680 parent string
19681 urlParams_ gensupport.URLParams
19682 ifNoneMatch_ string
19683 ctx_ context.Context
19684 header_ http.Header
19685 }
19686
19687 // List: Lists the FHIR stores in the given dataset.
19688 //
19689 // - parent: Name of the dataset.
19690 func (r *ProjectsLocationsDatasetsFhirStoresService) List(parent string) *ProjectsLocationsDatasetsFhirStoresListCall {
19691 c := &ProjectsLocationsDatasetsFhirStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19692 c.parent = parent
19693 return c
19694 }
19695
19696 // Filter sets the optional parameter "filter": Restricts stores returned to
19697 // those matching a filter. The following syntax is available: * A string field
19698 // value can be written as text inside quotation marks, for example "query
19699 // text". The only valid relational operation for text fields is equality
19700 // (`=`), where text is searched within the field, rather than having the field
19701 // be equal to the text. For example, "Comment = great" returns messages with
19702 // `great` in the comment field. * A number field value can be written as an
19703 // integer, a decimal, or an exponential. The valid relational operators for
19704 // number fields are the equality operator (`=`), along with the less
19705 // than/greater than operators (`<`, `<=`, `>`, `>=`). Note that there is no
19706 // inequality (`!=`) operator. You can prepend the `NOT` operator to an
19707 // expression to negate it. * A date field value must be written in
19708 // `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format.
19709 // Leading zeros are required for one-digit months and days. The valid
19710 // relational operators for date fields are the equality operator (`=`) , along
19711 // with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that
19712 // there is no inequality (`!=`) operator. You can prepend the `NOT` operator
19713 // to an expression to negate it. * Multiple field query expressions can be
19714 // combined in one query by adding `AND` or `OR` operators between the
19715 // expressions. If a boolean operator appears within a quoted string, it is not
19716 // treated as special, it's just another part of the character string to be
19717 // matched. You can prepend the `NOT` operator to an expression to negate it.
19718 // Only filtering on labels is supported, for example `labels.key=value`.
19719 func (c *ProjectsLocationsDatasetsFhirStoresListCall) Filter(filter string) *ProjectsLocationsDatasetsFhirStoresListCall {
19720 c.urlParams_.Set("filter", filter)
19721 return c
19722 }
19723
19724 // PageSize sets the optional parameter "pageSize": Limit on the number of FHIR
19725 // stores to return in a single response. If not specified, 100 is used. May
19726 // not be larger than 1000.
19727 func (c *ProjectsLocationsDatasetsFhirStoresListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsFhirStoresListCall {
19728 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
19729 return c
19730 }
19731
19732 // PageToken sets the optional parameter "pageToken": The next_page_token value
19733 // returned from the previous List request, if any.
19734 func (c *ProjectsLocationsDatasetsFhirStoresListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsFhirStoresListCall {
19735 c.urlParams_.Set("pageToken", pageToken)
19736 return c
19737 }
19738
19739 // Fields allows partial responses to be retrieved. See
19740 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
19741 // details.
19742 func (c *ProjectsLocationsDatasetsFhirStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresListCall {
19743 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19744 return c
19745 }
19746
19747 // IfNoneMatch sets an optional parameter which makes the operation fail if the
19748 // object's ETag matches the given value. This is useful for getting updates
19749 // only after the object has changed since the last request.
19750 func (c *ProjectsLocationsDatasetsFhirStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresListCall {
19751 c.ifNoneMatch_ = entityTag
19752 return c
19753 }
19754
19755 // Context sets the context to be used in this call's Do method.
19756 func (c *ProjectsLocationsDatasetsFhirStoresListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresListCall {
19757 c.ctx_ = ctx
19758 return c
19759 }
19760
19761 // Header returns a http.Header that can be modified by the caller to add
19762 // headers to the request.
19763 func (c *ProjectsLocationsDatasetsFhirStoresListCall) Header() http.Header {
19764 if c.header_ == nil {
19765 c.header_ = make(http.Header)
19766 }
19767 return c.header_
19768 }
19769
19770 func (c *ProjectsLocationsDatasetsFhirStoresListCall) doRequest(alt string) (*http.Response, error) {
19771 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19772 if c.ifNoneMatch_ != "" {
19773 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19774 }
19775 c.urlParams_.Set("alt", alt)
19776 c.urlParams_.Set("prettyPrint", "false")
19777 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/fhirStores")
19778 urls += "?" + c.urlParams_.Encode()
19779 req, err := http.NewRequest("GET", urls, nil)
19780 if err != nil {
19781 return nil, err
19782 }
19783 req.Header = reqHeaders
19784 googleapi.Expand(req.URL, map[string]string{
19785 "parent": c.parent,
19786 })
19787 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.list", "request", internallog.HTTPRequest(req, nil))
19788 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19789 }
19790
19791 // Do executes the "healthcare.projects.locations.datasets.fhirStores.list" call.
19792 // Any non-2xx status code is an error. Response headers are in either
19793 // *ListFhirStoresResponse.ServerResponse.Header or (if a response was returned
19794 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
19795 // check whether the returned error was because http.StatusNotModified was
19796 // returned.
19797 func (c *ProjectsLocationsDatasetsFhirStoresListCall) Do(opts ...googleapi.CallOption) (*ListFhirStoresResponse, error) {
19798 gensupport.SetOptions(c.urlParams_, opts...)
19799 res, err := c.doRequest("json")
19800 if res != nil && res.StatusCode == http.StatusNotModified {
19801 if res.Body != nil {
19802 res.Body.Close()
19803 }
19804 return nil, gensupport.WrapError(&googleapi.Error{
19805 Code: res.StatusCode,
19806 Header: res.Header,
19807 })
19808 }
19809 if err != nil {
19810 return nil, err
19811 }
19812 defer googleapi.CloseBody(res)
19813 if err := googleapi.CheckResponse(res); err != nil {
19814 return nil, gensupport.WrapError(err)
19815 }
19816 ret := &ListFhirStoresResponse{
19817 ServerResponse: googleapi.ServerResponse{
19818 Header: res.Header,
19819 HTTPStatusCode: res.StatusCode,
19820 },
19821 }
19822 target := &ret
19823 b, err := gensupport.DecodeResponseBytes(target, res)
19824 if err != nil {
19825 return nil, err
19826 }
19827 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.list", "response", internallog.HTTPResponse(res, b))
19828 return ret, nil
19829 }
19830
19831 // Pages invokes f for each page of results.
19832 // A non-nil error returned from f will halt the iteration.
19833 // The provided context supersedes any context provided to the Context method.
19834 func (c *ProjectsLocationsDatasetsFhirStoresListCall) Pages(ctx context.Context, f func(*ListFhirStoresResponse) error) error {
19835 c.ctx_ = ctx
19836 defer c.PageToken(c.urlParams_.Get("pageToken"))
19837 for {
19838 x, err := c.Do()
19839 if err != nil {
19840 return err
19841 }
19842 if err := f(x); err != nil {
19843 return err
19844 }
19845 if x.NextPageToken == "" {
19846 return nil
19847 }
19848 c.PageToken(x.NextPageToken)
19849 }
19850 }
19851
19852 type ProjectsLocationsDatasetsFhirStoresPatchCall struct {
19853 s *Service
19854 name string
19855 fhirstore *FhirStore
19856 urlParams_ gensupport.URLParams
19857 ctx_ context.Context
19858 header_ http.Header
19859 }
19860
19861 // Patch: Updates the configuration of the specified FHIR store.
19862 //
19863 // - name: Output only. Identifier. Resource name of the FHIR store, of the
19864 // form
19865 // `projects/{project_id}/locations/{location}/datasets/{dataset_id}/fhirStore
19866 // s/{fhir_store_id}`.
19867 func (r *ProjectsLocationsDatasetsFhirStoresService) Patch(name string, fhirstore *FhirStore) *ProjectsLocationsDatasetsFhirStoresPatchCall {
19868 c := &ProjectsLocationsDatasetsFhirStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19869 c.name = name
19870 c.fhirstore = fhirstore
19871 return c
19872 }
19873
19874 // UpdateMask sets the optional parameter "updateMask": Required. The update
19875 // mask applies to the resource. For the `FieldMask` definition, see
19876 // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
19877 func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsFhirStoresPatchCall {
19878 c.urlParams_.Set("updateMask", updateMask)
19879 return c
19880 }
19881
19882 // Fields allows partial responses to be retrieved. See
19883 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
19884 // details.
19885 func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresPatchCall {
19886 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19887 return c
19888 }
19889
19890 // Context sets the context to be used in this call's Do method.
19891 func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresPatchCall {
19892 c.ctx_ = ctx
19893 return c
19894 }
19895
19896 // Header returns a http.Header that can be modified by the caller to add
19897 // headers to the request.
19898 func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) Header() http.Header {
19899 if c.header_ == nil {
19900 c.header_ = make(http.Header)
19901 }
19902 return c.header_
19903 }
19904
19905 func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) doRequest(alt string) (*http.Response, error) {
19906 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
19907 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.fhirstore)
19908 if err != nil {
19909 return nil, err
19910 }
19911 c.urlParams_.Set("alt", alt)
19912 c.urlParams_.Set("prettyPrint", "false")
19913 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
19914 urls += "?" + c.urlParams_.Encode()
19915 req, err := http.NewRequest("PATCH", urls, body)
19916 if err != nil {
19917 return nil, err
19918 }
19919 req.Header = reqHeaders
19920 googleapi.Expand(req.URL, map[string]string{
19921 "name": c.name,
19922 })
19923 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
19924 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19925 }
19926
19927 // Do executes the "healthcare.projects.locations.datasets.fhirStores.patch" call.
19928 // Any non-2xx status code is an error. Response headers are in either
19929 // *FhirStore.ServerResponse.Header or (if a response was returned at all) in
19930 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
19931 // whether the returned error was because http.StatusNotModified was returned.
19932 func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) Do(opts ...googleapi.CallOption) (*FhirStore, error) {
19933 gensupport.SetOptions(c.urlParams_, opts...)
19934 res, err := c.doRequest("json")
19935 if res != nil && res.StatusCode == http.StatusNotModified {
19936 if res.Body != nil {
19937 res.Body.Close()
19938 }
19939 return nil, gensupport.WrapError(&googleapi.Error{
19940 Code: res.StatusCode,
19941 Header: res.Header,
19942 })
19943 }
19944 if err != nil {
19945 return nil, err
19946 }
19947 defer googleapi.CloseBody(res)
19948 if err := googleapi.CheckResponse(res); err != nil {
19949 return nil, gensupport.WrapError(err)
19950 }
19951 ret := &FhirStore{
19952 ServerResponse: googleapi.ServerResponse{
19953 Header: res.Header,
19954 HTTPStatusCode: res.StatusCode,
19955 },
19956 }
19957 target := &ret
19958 b, err := gensupport.DecodeResponseBytes(target, res)
19959 if err != nil {
19960 return nil, err
19961 }
19962 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.patch", "response", internallog.HTTPResponse(res, b))
19963 return ret, nil
19964 }
19965
19966 type ProjectsLocationsDatasetsFhirStoresRollbackCall struct {
19967 s *Service
19968 name string
19969 rollbackfhirresourcesrequest *RollbackFhirResourcesRequest
19970 urlParams_ gensupport.URLParams
19971 ctx_ context.Context
19972 header_ http.Header
19973 }
19974
19975 // Rollback: Rolls back resources from the FHIR store to the specified time.
19976 // This method returns an Operation that can be used to track the status of the
19977 // rollback by calling GetOperation. Immediate fatal errors appear in the error
19978 // field, errors are also logged to Cloud Logging (see Viewing error logs in
19979 // Cloud Logging (https://cloud.google.com/healthcare/docs/how-tos/logging)).
19980 // Otherwise, when the operation finishes, a detailed response of type
19981 // RollbackFhirResourcesResponse is returned in the response field. The
19982 // metadata field type for this operation is OperationMetadata.
19983 //
19984 // - name: The name of the FHIR store to rollback, in the format of
19985 // "projects/{project_id}/locations/{location_id}/datasets/{dataset_id}
19986 // /fhirStores/{fhir_store_id}".
19987 func (r *ProjectsLocationsDatasetsFhirStoresService) Rollback(name string, rollbackfhirresourcesrequest *RollbackFhirResourcesRequest) *ProjectsLocationsDatasetsFhirStoresRollbackCall {
19988 c := &ProjectsLocationsDatasetsFhirStoresRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19989 c.name = name
19990 c.rollbackfhirresourcesrequest = rollbackfhirresourcesrequest
19991 return c
19992 }
19993
19994 // Fields allows partial responses to be retrieved. See
19995 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
19996 // details.
19997 func (c *ProjectsLocationsDatasetsFhirStoresRollbackCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresRollbackCall {
19998 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19999 return c
20000 }
20001
20002 // Context sets the context to be used in this call's Do method.
20003 func (c *ProjectsLocationsDatasetsFhirStoresRollbackCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresRollbackCall {
20004 c.ctx_ = ctx
20005 return c
20006 }
20007
20008 // Header returns a http.Header that can be modified by the caller to add
20009 // headers to the request.
20010 func (c *ProjectsLocationsDatasetsFhirStoresRollbackCall) Header() http.Header {
20011 if c.header_ == nil {
20012 c.header_ = make(http.Header)
20013 }
20014 return c.header_
20015 }
20016
20017 func (c *ProjectsLocationsDatasetsFhirStoresRollbackCall) doRequest(alt string) (*http.Response, error) {
20018 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
20019 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.rollbackfhirresourcesrequest)
20020 if err != nil {
20021 return nil, err
20022 }
20023 c.urlParams_.Set("alt", alt)
20024 c.urlParams_.Set("prettyPrint", "false")
20025 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:rollback")
20026 urls += "?" + c.urlParams_.Encode()
20027 req, err := http.NewRequest("POST", urls, body)
20028 if err != nil {
20029 return nil, err
20030 }
20031 req.Header = reqHeaders
20032 googleapi.Expand(req.URL, map[string]string{
20033 "name": c.name,
20034 })
20035 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.rollback", "request", internallog.HTTPRequest(req, body.Bytes()))
20036 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20037 }
20038
20039 // Do executes the "healthcare.projects.locations.datasets.fhirStores.rollback" call.
20040 // Any non-2xx status code is an error. Response headers are in either
20041 // *Operation.ServerResponse.Header or (if a response was returned at all) in
20042 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
20043 // whether the returned error was because http.StatusNotModified was returned.
20044 func (c *ProjectsLocationsDatasetsFhirStoresRollbackCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
20045 gensupport.SetOptions(c.urlParams_, opts...)
20046 res, err := c.doRequest("json")
20047 if res != nil && res.StatusCode == http.StatusNotModified {
20048 if res.Body != nil {
20049 res.Body.Close()
20050 }
20051 return nil, gensupport.WrapError(&googleapi.Error{
20052 Code: res.StatusCode,
20053 Header: res.Header,
20054 })
20055 }
20056 if err != nil {
20057 return nil, err
20058 }
20059 defer googleapi.CloseBody(res)
20060 if err := googleapi.CheckResponse(res); err != nil {
20061 return nil, gensupport.WrapError(err)
20062 }
20063 ret := &Operation{
20064 ServerResponse: googleapi.ServerResponse{
20065 Header: res.Header,
20066 HTTPStatusCode: res.StatusCode,
20067 },
20068 }
20069 target := &ret
20070 b, err := gensupport.DecodeResponseBytes(target, res)
20071 if err != nil {
20072 return nil, err
20073 }
20074 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.rollback", "response", internallog.HTTPResponse(res, b))
20075 return ret, nil
20076 }
20077
20078 type ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall struct {
20079 s *Service
20080 resource string
20081 setiampolicyrequest *SetIamPolicyRequest
20082 urlParams_ gensupport.URLParams
20083 ctx_ context.Context
20084 header_ http.Header
20085 }
20086
20087 // SetIamPolicy: Sets the access control policy on the specified resource.
20088 // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
20089 // and `PERMISSION_DENIED` errors.
20090 //
20091 // - resource: REQUIRED: The resource for which the policy is being specified.
20092 // See Resource names (https://cloud.google.com/apis/design/resource_names)
20093 // for the appropriate value for this field.
20094 func (r *ProjectsLocationsDatasetsFhirStoresService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall {
20095 c := &ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20096 c.resource = resource
20097 c.setiampolicyrequest = setiampolicyrequest
20098 return c
20099 }
20100
20101 // Fields allows partial responses to be retrieved. See
20102 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
20103 // details.
20104 func (c *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall {
20105 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20106 return c
20107 }
20108
20109 // Context sets the context to be used in this call's Do method.
20110 func (c *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall {
20111 c.ctx_ = ctx
20112 return c
20113 }
20114
20115 // Header returns a http.Header that can be modified by the caller to add
20116 // headers to the request.
20117 func (c *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall) Header() http.Header {
20118 if c.header_ == nil {
20119 c.header_ = make(http.Header)
20120 }
20121 return c.header_
20122 }
20123
20124 func (c *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
20125 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
20126 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest)
20127 if err != nil {
20128 return nil, err
20129 }
20130 c.urlParams_.Set("alt", alt)
20131 c.urlParams_.Set("prettyPrint", "false")
20132 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy")
20133 urls += "?" + c.urlParams_.Encode()
20134 req, err := http.NewRequest("POST", urls, body)
20135 if err != nil {
20136 return nil, err
20137 }
20138 req.Header = reqHeaders
20139 googleapi.Expand(req.URL, map[string]string{
20140 "resource": c.resource,
20141 })
20142 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes()))
20143 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20144 }
20145
20146 // Do executes the "healthcare.projects.locations.datasets.fhirStores.setIamPolicy" call.
20147 // Any non-2xx status code is an error. Response headers are in either
20148 // *Policy.ServerResponse.Header or (if a response was returned at all) in
20149 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
20150 // whether the returned error was because http.StatusNotModified was returned.
20151 func (c *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
20152 gensupport.SetOptions(c.urlParams_, opts...)
20153 res, err := c.doRequest("json")
20154 if res != nil && res.StatusCode == http.StatusNotModified {
20155 if res.Body != nil {
20156 res.Body.Close()
20157 }
20158 return nil, gensupport.WrapError(&googleapi.Error{
20159 Code: res.StatusCode,
20160 Header: res.Header,
20161 })
20162 }
20163 if err != nil {
20164 return nil, err
20165 }
20166 defer googleapi.CloseBody(res)
20167 if err := googleapi.CheckResponse(res); err != nil {
20168 return nil, gensupport.WrapError(err)
20169 }
20170 ret := &Policy{
20171 ServerResponse: googleapi.ServerResponse{
20172 Header: res.Header,
20173 HTTPStatusCode: res.StatusCode,
20174 },
20175 }
20176 target := &ret
20177 b, err := gensupport.DecodeResponseBytes(target, res)
20178 if err != nil {
20179 return nil, err
20180 }
20181 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.setIamPolicy", "response", internallog.HTTPResponse(res, b))
20182 return ret, nil
20183 }
20184
20185 type ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall struct {
20186 s *Service
20187 resource string
20188 testiampermissionsrequest *TestIamPermissionsRequest
20189 urlParams_ gensupport.URLParams
20190 ctx_ context.Context
20191 header_ http.Header
20192 }
20193
20194 // TestIamPermissions: Returns permissions that a caller has on the specified
20195 // resource. If the resource does not exist, this will return an empty set of
20196 // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
20197 // used for building permission-aware UIs and command-line tools, not for
20198 // authorization checking. This operation may "fail open" without warning.
20199 //
20200 // - resource: REQUIRED: The resource for which the policy detail is being
20201 // requested. See Resource names
20202 // (https://cloud.google.com/apis/design/resource_names) for the appropriate
20203 // value for this field.
20204 func (r *ProjectsLocationsDatasetsFhirStoresService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall {
20205 c := &ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20206 c.resource = resource
20207 c.testiampermissionsrequest = testiampermissionsrequest
20208 return c
20209 }
20210
20211 // Fields allows partial responses to be retrieved. See
20212 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
20213 // details.
20214 func (c *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall {
20215 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20216 return c
20217 }
20218
20219 // Context sets the context to be used in this call's Do method.
20220 func (c *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall {
20221 c.ctx_ = ctx
20222 return c
20223 }
20224
20225 // Header returns a http.Header that can be modified by the caller to add
20226 // headers to the request.
20227 func (c *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall) Header() http.Header {
20228 if c.header_ == nil {
20229 c.header_ = make(http.Header)
20230 }
20231 return c.header_
20232 }
20233
20234 func (c *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
20235 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
20236 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest)
20237 if err != nil {
20238 return nil, err
20239 }
20240 c.urlParams_.Set("alt", alt)
20241 c.urlParams_.Set("prettyPrint", "false")
20242 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions")
20243 urls += "?" + c.urlParams_.Encode()
20244 req, err := http.NewRequest("POST", urls, body)
20245 if err != nil {
20246 return nil, err
20247 }
20248 req.Header = reqHeaders
20249 googleapi.Expand(req.URL, map[string]string{
20250 "resource": c.resource,
20251 })
20252 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes()))
20253 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20254 }
20255
20256 // Do executes the "healthcare.projects.locations.datasets.fhirStores.testIamPermissions" call.
20257 // Any non-2xx status code is an error. Response headers are in either
20258 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
20259 // returned at all) in error.(*googleapi.Error).Header. Use
20260 // googleapi.IsNotModified to check whether the returned error was because
20261 // http.StatusNotModified was returned.
20262 func (c *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
20263 gensupport.SetOptions(c.urlParams_, opts...)
20264 res, err := c.doRequest("json")
20265 if res != nil && res.StatusCode == http.StatusNotModified {
20266 if res.Body != nil {
20267 res.Body.Close()
20268 }
20269 return nil, gensupport.WrapError(&googleapi.Error{
20270 Code: res.StatusCode,
20271 Header: res.Header,
20272 })
20273 }
20274 if err != nil {
20275 return nil, err
20276 }
20277 defer googleapi.CloseBody(res)
20278 if err := googleapi.CheckResponse(res); err != nil {
20279 return nil, gensupport.WrapError(err)
20280 }
20281 ret := &TestIamPermissionsResponse{
20282 ServerResponse: googleapi.ServerResponse{
20283 Header: res.Header,
20284 HTTPStatusCode: res.StatusCode,
20285 },
20286 }
20287 target := &ret
20288 b, err := gensupport.DecodeResponseBytes(target, res)
20289 if err != nil {
20290 return nil, err
20291 }
20292 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.testIamPermissions", "response", internallog.HTTPResponse(res, b))
20293 return ret, nil
20294 }
20295
20296 type ProjectsLocationsDatasetsFhirStoresFhirBinaryCreateCall struct {
20297 s *Service
20298 parent string
20299 body_ io.Reader
20300 urlParams_ gensupport.URLParams
20301 ctx_ context.Context
20302 header_ http.Header
20303 }
20304
20305 // BinaryCreate: Creates a FHIR Binary resource. This method can be used to
20306 // create a Binary resource either by using one of the accepted FHIR JSON
20307 // content types, or as a raw data stream. If a resource is created with this
20308 // method using the FHIR content type this method's behavior is the same as
20309 // `fhir.create`
20310 // (https://cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.fhirStores.fhir/create).
20311 // If a resource type other than Binary is used in the request it's treated in
20312 // the same way as non-FHIR data (e.g., images, zip archives, pdf files,
20313 // documents). When a non-FHIR content type is used in the request, a Binary
20314 // resource will be generated, and the uploaded data will be stored in the
20315 // `content` field (`DSTU2` and `STU3`), or the `data` field (`R4` and `R5`).
20316 // The Binary resource's `contentType` will be filled in using the value of the
20317 // `Content-Type` header, and the `securityContext` field (not present in
20318 // `DSTU2`) will be populated from the `X-Security-Context` header if it
20319 // exists. At this time `securityContext` has no special behavior in the Cloud
20320 // Healthcare API. Note: the limit on data ingested through this method is 1
20321 // GB. For best performance, use a non-FHIR data type instead of wrapping the
20322 // data in a Binary resource. Some of the Healthcare API features, such as
20323 // exporting to BigQuery
20324 // (https://cloud.google.com/healthcare-api/docs/how-tos/fhir-export-bigquery)
20325 // or Pub/Sub notifications
20326 // (https://cloud.google.com/healthcare-api/docs/fhir-pubsub#behavior_when_a_fhir_resource_is_too_large_or_traffic_is_high)
20327 // with full resource content, do not support Binary resources that are larger
20328 // than 10 MB. In these cases the resource's `data` field will be omitted.
20329 // Instead, the "http://hl7.org/fhir/StructureDefinition/data-absent-reason"
20330 // extension will be present to indicate that including the data is
20331 // `unsupported`. On success, an empty `201 Created` response is returned. The
20332 // newly created resource's ID and version are returned in the Location header.
20333 // Using `Prefer: representation=resource` is not allowed for this method. The
20334 // definition of the Binary REST API can be found at
20335 // https://hl7.org/fhir/binary.html#rest.
20336 //
20337 // - parent: The name of the FHIR store this resource belongs to.
20338 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) BinaryCreate(parent string, body_ io.Reader) *ProjectsLocationsDatasetsFhirStoresFhirBinaryCreateCall {
20339 c := &ProjectsLocationsDatasetsFhirStoresFhirBinaryCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20340 c.parent = parent
20341 c.body_ = body_
20342 return c
20343 }
20344
20345 // Fields allows partial responses to be retrieved. See
20346 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
20347 // details.
20348 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirBinaryCreateCall {
20349 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20350 return c
20351 }
20352
20353 // Context sets the context to be used in this call's Do method.
20354 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirBinaryCreateCall {
20355 c.ctx_ = ctx
20356 return c
20357 }
20358
20359 // Header returns a http.Header that can be modified by the caller to add
20360 // headers to the request.
20361 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryCreateCall) Header() http.Header {
20362 if c.header_ == nil {
20363 c.header_ = make(http.Header)
20364 }
20365 return c.header_
20366 }
20367
20368 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryCreateCall) doRequest(alt string) (*http.Response, error) {
20369 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
20370 body := bytes.NewBuffer(nil)
20371 _, err := body.ReadFrom(c.body_)
20372 if err != nil {
20373 return nil, err
20374 }
20375 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/fhir/Binary")
20376 urls += "?" + c.urlParams_.Encode()
20377 req, err := http.NewRequest("POST", urls, body)
20378 if err != nil {
20379 return nil, err
20380 }
20381 req.Header = reqHeaders
20382 googleapi.Expand(req.URL, map[string]string{
20383 "parent": c.parent,
20384 })
20385 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()))
20386 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20387 }
20388
20389 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.Binary-create" call.
20390 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryCreateCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
20391 gensupport.SetOptions(c.urlParams_, opts...)
20392 return c.doRequest("")
20393 }
20394
20395 type ProjectsLocationsDatasetsFhirStoresFhirBinaryReadCall struct {
20396 s *Service
20397 name string
20398 urlParams_ gensupport.URLParams
20399 ifNoneMatch_ string
20400 ctx_ context.Context
20401 header_ http.Header
20402 }
20403
20404 // BinaryRead: Gets the contents of a FHIR Binary resource. This method can be
20405 // used to retrieve a Binary resource either by using the FHIR JSON mimetype as
20406 // the value for the Accept header, or as a raw data stream. If the FHIR Accept
20407 // type is used this method will return a Binary resource with the data
20408 // base64-encoded, regardless of how the resource was created. The resource
20409 // data can be retrieved in base64-decoded form if the Accept type of the
20410 // request matches the value of the resource's `contentType` field. The
20411 // definition of the Binary REST API can be found at
20412 // https://hl7.org/fhir/binary.html#rest.
20413 //
20414 // - name: The name of the Binary resource to retrieve.
20415 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) BinaryRead(name string) *ProjectsLocationsDatasetsFhirStoresFhirBinaryReadCall {
20416 c := &ProjectsLocationsDatasetsFhirStoresFhirBinaryReadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20417 c.name = name
20418 return c
20419 }
20420
20421 // Fields allows partial responses to be retrieved. See
20422 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
20423 // details.
20424 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryReadCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirBinaryReadCall {
20425 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20426 return c
20427 }
20428
20429 // IfNoneMatch sets an optional parameter which makes the operation fail if the
20430 // object's ETag matches the given value. This is useful for getting updates
20431 // only after the object has changed since the last request.
20432 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryReadCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirBinaryReadCall {
20433 c.ifNoneMatch_ = entityTag
20434 return c
20435 }
20436
20437 // Context sets the context to be used in this call's Do method.
20438 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryReadCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirBinaryReadCall {
20439 c.ctx_ = ctx
20440 return c
20441 }
20442
20443 // Header returns a http.Header that can be modified by the caller to add
20444 // headers to the request.
20445 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryReadCall) Header() http.Header {
20446 if c.header_ == nil {
20447 c.header_ = make(http.Header)
20448 }
20449 return c.header_
20450 }
20451
20452 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryReadCall) doRequest(alt string) (*http.Response, error) {
20453 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
20454 if c.ifNoneMatch_ != "" {
20455 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20456 }
20457 c.urlParams_.Set("alt", alt)
20458 c.urlParams_.Set("prettyPrint", "false")
20459 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
20460 urls += "?" + c.urlParams_.Encode()
20461 req, err := http.NewRequest("GET", urls, nil)
20462 if err != nil {
20463 return nil, err
20464 }
20465 req.Header = reqHeaders
20466 googleapi.Expand(req.URL, map[string]string{
20467 "name": c.name,
20468 })
20469 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.Binary-read", "request", internallog.HTTPRequest(req, nil))
20470 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20471 }
20472
20473 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.Binary-read" call.
20474 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryReadCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
20475 gensupport.SetOptions(c.urlParams_, opts...)
20476 return c.doRequest("")
20477 }
20478
20479 type ProjectsLocationsDatasetsFhirStoresFhirBinaryUpdateCall struct {
20480 s *Service
20481 name string
20482 body_ io.Reader
20483 urlParams_ gensupport.URLParams
20484 ctx_ context.Context
20485 header_ http.Header
20486 }
20487
20488 // BinaryUpdate: Updates the entire contents of a Binary resource. If the
20489 // specified resource does not exist and the FHIR store has
20490 // enable_update_create set, creates the resource with the client-specified ID.
20491 // It is strongly advised not to include or encode any sensitive data such as
20492 // patient identifiers in client-specified resource IDs. Those IDs are part of
20493 // the FHIR resource path recorded in Cloud Audit Logs and Pub/Sub
20494 // notifications. Those IDs can also be contained in reference fields within
20495 // other resources. This method can be used to update a Binary resource either
20496 // by using one of the accepted FHIR JSON content types, or as a raw data
20497 // stream. If a resource is updated with this method using the FHIR content
20498 // type this method's behavior is the same as `update`. If a resource type
20499 // other than Binary is used in the request it will be treated in the same way
20500 // as non-FHIR data. When a non-FHIR content type is used in the request, a
20501 // Binary resource will be generated using the ID from the resource path, and
20502 // the uploaded data will be stored in the `content` field (`DSTU2` and
20503 // `STU3`), or the `data` field (`R4` and `R5`). The Binary resource's
20504 // `contentType` will be filled in using the value of the `Content-Type`
20505 // header, and the `securityContext` field (not present in `DSTU2`) will be
20506 // populated from the `X-Security-Context` header if it exists. At this time
20507 // `securityContext` has no special behavior in the Cloud Healthcare API. Note:
20508 // the limit on data ingested through this method is 2 GB. For best
20509 // performance, use a non-FHIR data type instead of wrapping the data in a
20510 // Binary resource. Some of the Healthcare API features, such as exporting to
20511 // BigQuery
20512 // (https://cloud.google.com/healthcare-api/docs/how-tos/fhir-export-bigquery)
20513 // or Pub/Sub notifications
20514 // (https://cloud.google.com/healthcare-api/docs/fhir-pubsub#behavior_when_a_fhir_resource_is_too_large_or_traffic_is_high)
20515 // with full resource content, do not support Binary resources that are larger
20516 // than 10 MB. In these cases the resource's `data` field will be omitted.
20517 // Instead, the "http://hl7.org/fhir/StructureDefinition/data-absent-reason"
20518 // extension will be present to indicate that including the data is
20519 // `unsupported`. On success, an empty 200 OK response will be returned, or a
20520 // 201 Created if the resource did not exit. The resource's ID and version are
20521 // returned in the Location header. Using `Prefer: representation=resource` is
20522 // not allowed for this method. The definition of the Binary REST API can be
20523 // found at https://hl7.org/fhir/binary.html#rest.
20524 //
20525 // - name: The name of the resource to update.
20526 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) BinaryUpdate(name string, body_ io.Reader) *ProjectsLocationsDatasetsFhirStoresFhirBinaryUpdateCall {
20527 c := &ProjectsLocationsDatasetsFhirStoresFhirBinaryUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20528 c.name = name
20529 c.body_ = body_
20530 return c
20531 }
20532
20533 // Fields allows partial responses to be retrieved. See
20534 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
20535 // details.
20536 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirBinaryUpdateCall {
20537 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20538 return c
20539 }
20540
20541 // Context sets the context to be used in this call's Do method.
20542 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryUpdateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirBinaryUpdateCall {
20543 c.ctx_ = ctx
20544 return c
20545 }
20546
20547 // Header returns a http.Header that can be modified by the caller to add
20548 // headers to the request.
20549 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryUpdateCall) Header() http.Header {
20550 if c.header_ == nil {
20551 c.header_ = make(http.Header)
20552 }
20553 return c.header_
20554 }
20555
20556 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryUpdateCall) doRequest(alt string) (*http.Response, error) {
20557 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
20558 body := bytes.NewBuffer(nil)
20559 _, err := body.ReadFrom(c.body_)
20560 if err != nil {
20561 return nil, err
20562 }
20563 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
20564 urls += "?" + c.urlParams_.Encode()
20565 req, err := http.NewRequest("PUT", urls, body)
20566 if err != nil {
20567 return nil, err
20568 }
20569 req.Header = reqHeaders
20570 googleapi.Expand(req.URL, map[string]string{
20571 "name": c.name,
20572 })
20573 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()))
20574 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20575 }
20576
20577 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.Binary-update" call.
20578 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryUpdateCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
20579 gensupport.SetOptions(c.urlParams_, opts...)
20580 return c.doRequest("")
20581 }
20582
20583 type ProjectsLocationsDatasetsFhirStoresFhirBinaryVreadCall struct {
20584 s *Service
20585 name string
20586 urlParams_ gensupport.URLParams
20587 ifNoneMatch_ string
20588 ctx_ context.Context
20589 header_ http.Header
20590 }
20591
20592 // BinaryVread: Gets the contents of a version (current or historical) of a
20593 // FHIR Binary resource by version ID. This method can be used to retrieve a
20594 // Binary resource version either by using the FHIR JSON mimetype as the value
20595 // for the Accept header, or as a raw data stream. If the FHIR Accept type is
20596 // used this method will return a Binary resource with the data base64-encoded,
20597 // regardless of how the resource version was created. The resource data can be
20598 // retrieved in base64-decoded form if the Accept type of the request matches
20599 // the value of the resource version's `contentType` field. The definition of
20600 // the Binary REST API can be found at https://hl7.org/fhir/binary.html#rest.
20601 //
20602 // - name: The name of the Binary resource version to retrieve.
20603 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) BinaryVread(name string) *ProjectsLocationsDatasetsFhirStoresFhirBinaryVreadCall {
20604 c := &ProjectsLocationsDatasetsFhirStoresFhirBinaryVreadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20605 c.name = name
20606 return c
20607 }
20608
20609 // Fields allows partial responses to be retrieved. See
20610 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
20611 // details.
20612 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryVreadCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirBinaryVreadCall {
20613 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20614 return c
20615 }
20616
20617 // IfNoneMatch sets an optional parameter which makes the operation fail if the
20618 // object's ETag matches the given value. This is useful for getting updates
20619 // only after the object has changed since the last request.
20620 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryVreadCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirBinaryVreadCall {
20621 c.ifNoneMatch_ = entityTag
20622 return c
20623 }
20624
20625 // Context sets the context to be used in this call's Do method.
20626 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryVreadCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirBinaryVreadCall {
20627 c.ctx_ = ctx
20628 return c
20629 }
20630
20631 // Header returns a http.Header that can be modified by the caller to add
20632 // headers to the request.
20633 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryVreadCall) Header() http.Header {
20634 if c.header_ == nil {
20635 c.header_ = make(http.Header)
20636 }
20637 return c.header_
20638 }
20639
20640 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryVreadCall) doRequest(alt string) (*http.Response, error) {
20641 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
20642 if c.ifNoneMatch_ != "" {
20643 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20644 }
20645 c.urlParams_.Set("alt", alt)
20646 c.urlParams_.Set("prettyPrint", "false")
20647 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
20648 urls += "?" + c.urlParams_.Encode()
20649 req, err := http.NewRequest("GET", urls, nil)
20650 if err != nil {
20651 return nil, err
20652 }
20653 req.Header = reqHeaders
20654 googleapi.Expand(req.URL, map[string]string{
20655 "name": c.name,
20656 })
20657 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.Binary-vread", "request", internallog.HTTPRequest(req, nil))
20658 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20659 }
20660
20661 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.Binary-vread" call.
20662 func (c *ProjectsLocationsDatasetsFhirStoresFhirBinaryVreadCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
20663 gensupport.SetOptions(c.urlParams_, opts...)
20664 return c.doRequest("")
20665 }
20666
20667 type ProjectsLocationsDatasetsFhirStoresFhirConceptMapSearchTranslateCall struct {
20668 s *Service
20669 parent string
20670 urlParams_ gensupport.URLParams
20671 ifNoneMatch_ string
20672 ctx_ context.Context
20673 header_ http.Header
20674 }
20675
20676 // ConceptMapSearchTranslate: Translates a code from one value set to another
20677 // by searching for appropriate concept maps. Implements the FHIR standard
20678 // $translate operation (DSTU2
20679 // (https://www.hl7.org/fhir/DSTU2/operation-conceptmap-translate.html), STU3
20680 // (https://www.hl7.org/fhir/STU3/operation-conceptmap-translate.html), R4
20681 // (https://www.hl7.org/fhir/R4/operation-conceptmap-translate.html), R5
20682 // (https://www.hl7.org/fhir/R5/operation-conceptmap-translate.html)). On
20683 // success, the response body contains a JSON-encoded representation of a FHIR
20684 // Parameters resource, which includes the translation result. Errors generated
20685 // by the FHIR store contain a JSON-encoded `OperationOutcome` resource
20686 // describing the reason for the error. If the request cannot be mapped to a
20687 // valid API method on a FHIR store, a generic GCP error might be returned
20688 // instead.
20689 //
20690 // - parent: The name for the FHIR store containing the concept map(s) to use
20691 // for the translation.
20692 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) ConceptMapSearchTranslate(parent string) *ProjectsLocationsDatasetsFhirStoresFhirConceptMapSearchTranslateCall {
20693 c := &ProjectsLocationsDatasetsFhirStoresFhirConceptMapSearchTranslateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20694 c.parent = parent
20695 return c
20696 }
20697
20698 // Code sets the optional parameter "code": Required. The code to translate.
20699 func (c *ProjectsLocationsDatasetsFhirStoresFhirConceptMapSearchTranslateCall) Code(code string) *ProjectsLocationsDatasetsFhirStoresFhirConceptMapSearchTranslateCall {
20700 c.urlParams_.Set("code", code)
20701 return c
20702 }
20703
20704 // ConceptMapVersion sets the optional parameter "conceptMapVersion": The
20705 // version of the concept map to use. If unset, the most current version is
20706 // used.
20707 func (c *ProjectsLocationsDatasetsFhirStoresFhirConceptMapSearchTranslateCall) ConceptMapVersion(conceptMapVersion string) *ProjectsLocationsDatasetsFhirStoresFhirConceptMapSearchTranslateCall {
20708 c.urlParams_.Set("conceptMapVersion", conceptMapVersion)
20709 return c
20710 }
20711
20712 // Source sets the optional parameter "source": The source value set of the
20713 // concept map to be used. If unset, target is used to search for concept maps.
20714 func (c *ProjectsLocationsDatasetsFhirStoresFhirConceptMapSearchTranslateCall) Source(source string) *ProjectsLocationsDatasetsFhirStoresFhirConceptMapSearchTranslateCall {
20715 c.urlParams_.Set("source", source)
20716 return c
20717 }
20718
20719 // System sets the optional parameter "system": Required. The system for the
20720 // code to be translated.
20721 func (c *ProjectsLocationsDatasetsFhirStoresFhirConceptMapSearchTranslateCall) System(system string) *ProjectsLocationsDatasetsFhirStoresFhirConceptMapSearchTranslateCall {
20722 c.urlParams_.Set("system", system)
20723 return c
20724 }
20725
20726 // Target sets the optional parameter "target": The target value set of the
20727 // concept map to be used. If unset, source is used to search for concept maps.
20728 func (c *ProjectsLocationsDatasetsFhirStoresFhirConceptMapSearchTranslateCall) Target(target string) *ProjectsLocationsDatasetsFhirStoresFhirConceptMapSearchTranslateCall {
20729 c.urlParams_.Set("target", target)
20730 return c
20731 }
20732
20733 // Url sets the optional parameter "url": The canonical url of the concept map
20734 // to use. If unset, the source and target is used to search for concept maps.
20735 func (c *ProjectsLocationsDatasetsFhirStoresFhirConceptMapSearchTranslateCall) Url(url string) *ProjectsLocationsDatasetsFhirStoresFhirConceptMapSearchTranslateCall {
20736 c.urlParams_.Set("url", url)
20737 return c
20738 }
20739
20740 // Fields allows partial responses to be retrieved. See
20741 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
20742 // details.
20743 func (c *ProjectsLocationsDatasetsFhirStoresFhirConceptMapSearchTranslateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirConceptMapSearchTranslateCall {
20744 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20745 return c
20746 }
20747
20748 // IfNoneMatch sets an optional parameter which makes the operation fail if the
20749 // object's ETag matches the given value. This is useful for getting updates
20750 // only after the object has changed since the last request.
20751 func (c *ProjectsLocationsDatasetsFhirStoresFhirConceptMapSearchTranslateCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirConceptMapSearchTranslateCall {
20752 c.ifNoneMatch_ = entityTag
20753 return c
20754 }
20755
20756 // Context sets the context to be used in this call's Do method.
20757 func (c *ProjectsLocationsDatasetsFhirStoresFhirConceptMapSearchTranslateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirConceptMapSearchTranslateCall {
20758 c.ctx_ = ctx
20759 return c
20760 }
20761
20762 // Header returns a http.Header that can be modified by the caller to add
20763 // headers to the request.
20764 func (c *ProjectsLocationsDatasetsFhirStoresFhirConceptMapSearchTranslateCall) Header() http.Header {
20765 if c.header_ == nil {
20766 c.header_ = make(http.Header)
20767 }
20768 return c.header_
20769 }
20770
20771 func (c *ProjectsLocationsDatasetsFhirStoresFhirConceptMapSearchTranslateCall) doRequest(alt string) (*http.Response, error) {
20772 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
20773 if c.ifNoneMatch_ != "" {
20774 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20775 }
20776 c.urlParams_.Set("alt", alt)
20777 c.urlParams_.Set("prettyPrint", "false")
20778 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/fhir/ConceptMap/$translate")
20779 urls += "?" + c.urlParams_.Encode()
20780 req, err := http.NewRequest("GET", urls, nil)
20781 if err != nil {
20782 return nil, err
20783 }
20784 req.Header = reqHeaders
20785 googleapi.Expand(req.URL, map[string]string{
20786 "parent": c.parent,
20787 })
20788 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.ConceptMap-search-translate", "request", internallog.HTTPRequest(req, nil))
20789 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20790 }
20791
20792 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.ConceptMap-search-translate" call.
20793 func (c *ProjectsLocationsDatasetsFhirStoresFhirConceptMapSearchTranslateCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
20794 gensupport.SetOptions(c.urlParams_, opts...)
20795 return c.doRequest("")
20796 }
20797
20798 type ProjectsLocationsDatasetsFhirStoresFhirConceptMapTranslateCall struct {
20799 s *Service
20800 name string
20801 urlParams_ gensupport.URLParams
20802 ifNoneMatch_ string
20803 ctx_ context.Context
20804 header_ http.Header
20805 }
20806
20807 // ConceptMapTranslate: Translates a code from one value set to another using a
20808 // concept map. You can provide your own concept maps to translate any code
20809 // system to another code system. Implements the FHIR standard $translate
20810 // operation (DSTU2
20811 // (https://www.hl7.org/fhir/DSTU2/operation-conceptmap-translate.html), STU3
20812 // (https://www.hl7.org/fhir/STU3/operation-conceptmap-translate.html), R4
20813 // (https://www.hl7.org/fhir/R4/operation-conceptmap-translate.html)), R5
20814 // (https://www.hl7.org/fhir/R5/operation-conceptmap-translate.html)). On
20815 // success, the response body contains a JSON-encoded representation of a FHIR
20816 // Parameters resource, which includes the translation result. Errors generated
20817 // by the FHIR store contain a JSON-encoded `OperationOutcome` resource
20818 // describing the reason for the error. If the request cannot be mapped to a
20819 // valid API method on a FHIR store, a generic GCP error might be returned
20820 // instead.
20821 //
20822 // - name: The URL for the concept map to use for the translation.
20823 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) ConceptMapTranslate(name string) *ProjectsLocationsDatasetsFhirStoresFhirConceptMapTranslateCall {
20824 c := &ProjectsLocationsDatasetsFhirStoresFhirConceptMapTranslateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20825 c.name = name
20826 return c
20827 }
20828
20829 // Code sets the optional parameter "code": Required. The code to translate.
20830 func (c *ProjectsLocationsDatasetsFhirStoresFhirConceptMapTranslateCall) Code(code string) *ProjectsLocationsDatasetsFhirStoresFhirConceptMapTranslateCall {
20831 c.urlParams_.Set("code", code)
20832 return c
20833 }
20834
20835 // ConceptMapVersion sets the optional parameter "conceptMapVersion": The
20836 // version of the concept map to use. If unset, the most current version is
20837 // used.
20838 func (c *ProjectsLocationsDatasetsFhirStoresFhirConceptMapTranslateCall) ConceptMapVersion(conceptMapVersion string) *ProjectsLocationsDatasetsFhirStoresFhirConceptMapTranslateCall {
20839 c.urlParams_.Set("conceptMapVersion", conceptMapVersion)
20840 return c
20841 }
20842
20843 // System sets the optional parameter "system": Required. The system for the
20844 // code to be translated.
20845 func (c *ProjectsLocationsDatasetsFhirStoresFhirConceptMapTranslateCall) System(system string) *ProjectsLocationsDatasetsFhirStoresFhirConceptMapTranslateCall {
20846 c.urlParams_.Set("system", system)
20847 return c
20848 }
20849
20850 // Fields allows partial responses to be retrieved. See
20851 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
20852 // details.
20853 func (c *ProjectsLocationsDatasetsFhirStoresFhirConceptMapTranslateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirConceptMapTranslateCall {
20854 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20855 return c
20856 }
20857
20858 // IfNoneMatch sets an optional parameter which makes the operation fail if the
20859 // object's ETag matches the given value. This is useful for getting updates
20860 // only after the object has changed since the last request.
20861 func (c *ProjectsLocationsDatasetsFhirStoresFhirConceptMapTranslateCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirConceptMapTranslateCall {
20862 c.ifNoneMatch_ = entityTag
20863 return c
20864 }
20865
20866 // Context sets the context to be used in this call's Do method.
20867 func (c *ProjectsLocationsDatasetsFhirStoresFhirConceptMapTranslateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirConceptMapTranslateCall {
20868 c.ctx_ = ctx
20869 return c
20870 }
20871
20872 // Header returns a http.Header that can be modified by the caller to add
20873 // headers to the request.
20874 func (c *ProjectsLocationsDatasetsFhirStoresFhirConceptMapTranslateCall) Header() http.Header {
20875 if c.header_ == nil {
20876 c.header_ = make(http.Header)
20877 }
20878 return c.header_
20879 }
20880
20881 func (c *ProjectsLocationsDatasetsFhirStoresFhirConceptMapTranslateCall) doRequest(alt string) (*http.Response, error) {
20882 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
20883 if c.ifNoneMatch_ != "" {
20884 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20885 }
20886 c.urlParams_.Set("alt", alt)
20887 c.urlParams_.Set("prettyPrint", "false")
20888 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/$translate")
20889 urls += "?" + c.urlParams_.Encode()
20890 req, err := http.NewRequest("GET", urls, nil)
20891 if err != nil {
20892 return nil, err
20893 }
20894 req.Header = reqHeaders
20895 googleapi.Expand(req.URL, map[string]string{
20896 "name": c.name,
20897 })
20898 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.ConceptMap-translate", "request", internallog.HTTPRequest(req, nil))
20899 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20900 }
20901
20902 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.ConceptMap-translate" call.
20903 func (c *ProjectsLocationsDatasetsFhirStoresFhirConceptMapTranslateCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
20904 gensupport.SetOptions(c.urlParams_, opts...)
20905 return c.doRequest("")
20906 }
20907
20908 type ProjectsLocationsDatasetsFhirStoresFhirConsentEnforcementStatusCall struct {
20909 s *Service
20910 name string
20911 urlParams_ gensupport.URLParams
20912 ifNoneMatch_ string
20913 ctx_ context.Context
20914 header_ http.Header
20915 }
20916
20917 // ConsentEnforcementStatus: Returns the consent enforcement status of a single
20918 // consent resource. On success, the response body contains a JSON-encoded
20919 // representation of a `Parameters` (http://hl7.org/fhir/parameters.html) FHIR
20920 // resource, containing the current enforcement status. Does not support DSTU2.
20921 //
20922 // - name: The name of the consent resource to find enforcement status, in the
20923 // format
20924 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirSt
20925 // ores/{fhir_store_id}/fhir/Consent/{consent_id}`.
20926 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) ConsentEnforcementStatus(name string) *ProjectsLocationsDatasetsFhirStoresFhirConsentEnforcementStatusCall {
20927 c := &ProjectsLocationsDatasetsFhirStoresFhirConsentEnforcementStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20928 c.name = name
20929 return c
20930 }
20931
20932 // Fields allows partial responses to be retrieved. See
20933 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
20934 // details.
20935 func (c *ProjectsLocationsDatasetsFhirStoresFhirConsentEnforcementStatusCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirConsentEnforcementStatusCall {
20936 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20937 return c
20938 }
20939
20940 // IfNoneMatch sets an optional parameter which makes the operation fail if the
20941 // object's ETag matches the given value. This is useful for getting updates
20942 // only after the object has changed since the last request.
20943 func (c *ProjectsLocationsDatasetsFhirStoresFhirConsentEnforcementStatusCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirConsentEnforcementStatusCall {
20944 c.ifNoneMatch_ = entityTag
20945 return c
20946 }
20947
20948 // Context sets the context to be used in this call's Do method.
20949 func (c *ProjectsLocationsDatasetsFhirStoresFhirConsentEnforcementStatusCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirConsentEnforcementStatusCall {
20950 c.ctx_ = ctx
20951 return c
20952 }
20953
20954 // Header returns a http.Header that can be modified by the caller to add
20955 // headers to the request.
20956 func (c *ProjectsLocationsDatasetsFhirStoresFhirConsentEnforcementStatusCall) Header() http.Header {
20957 if c.header_ == nil {
20958 c.header_ = make(http.Header)
20959 }
20960 return c.header_
20961 }
20962
20963 func (c *ProjectsLocationsDatasetsFhirStoresFhirConsentEnforcementStatusCall) doRequest(alt string) (*http.Response, error) {
20964 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
20965 if c.ifNoneMatch_ != "" {
20966 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20967 }
20968 c.urlParams_.Set("alt", alt)
20969 c.urlParams_.Set("prettyPrint", "false")
20970 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/$consent-enforcement-status")
20971 urls += "?" + c.urlParams_.Encode()
20972 req, err := http.NewRequest("GET", urls, nil)
20973 if err != nil {
20974 return nil, err
20975 }
20976 req.Header = reqHeaders
20977 googleapi.Expand(req.URL, map[string]string{
20978 "name": c.name,
20979 })
20980 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))
20981 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20982 }
20983
20984 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.Consent-enforcement-status" call.
20985 func (c *ProjectsLocationsDatasetsFhirStoresFhirConsentEnforcementStatusCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
20986 gensupport.SetOptions(c.urlParams_, opts...)
20987 return c.doRequest("")
20988 }
20989
20990 type ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall struct {
20991 s *Service
20992 name string
20993 urlParams_ gensupport.URLParams
20994 ifNoneMatch_ string
20995 ctx_ context.Context
20996 header_ http.Header
20997 }
20998
20999 // EncounterEverything: Retrieves an Encounter resource and resources related
21000 // to that Encounter. Implements the FHIR extended operation
21001 // Encounter-everything (DSTU2
21002 // (https://hl7.org/fhir/DSTU2/encounter-operations.html#everything), STU3
21003 // (https://hl7.org/fhir/STU3/encounter-operations.html#everything), R4
21004 // (https://hl7.org/fhir/R4/encounter-operation-everything.html), or R5
21005 // (https://hl7.org/fhir/R5/encounter-operation-everything.html)). On success,
21006 // the response body contains a JSON-encoded representation of a `Bundle`
21007 // resource of type `searchset`, containing the results of the operation.
21008 // Errors generated by the FHIR store contain a JSON-encoded `OperationOutcome`
21009 // resource describing the reason for the error. If the request cannot be
21010 // mapped to a valid API method on a FHIR store, a generic GCP error might be
21011 // returned instead. The resources in scope for the response are: * The
21012 // Encounter resource itself. * All the resources directly referenced by the
21013 // Encounter resource, including attachments and binaries. * Resources directly
21014 // referencing the Encounter resource that meet the inclusion criteria. The
21015 // inclusion criteria are based on the membership rules in the Encounter
21016 // Compartment definition (DSTU2
21017 // (http://hl7.org/fhir/DSTU2/compartment-encounter.html), STU3
21018 // (http://www.hl7.org/fhir/stu3/compartmentdefinition-encounter.html), R4
21019 // (http://hl7.org/fhir/R4/compartmentdefinition-encounter.html), R5
21020 // (http://hl7.org/fhir/R5/compartmentdefinition-encounter.html)), which
21021 // details the eligible resource types and referencing search parameters. *
21022 // Resources referencing to the Encounter resource through the
21023 // "http://hl7.org/fhir/StructureDefinition/encounter-associatedEncounter"
21024 // extension.
21025 //
21026 // - name: Name of the Encounter resource for which the information is
21027 // required.
21028 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) EncounterEverything(name string) *ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall {
21029 c := &ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21030 c.name = name
21031 return c
21032 }
21033
21034 // Count sets the optional parameter "_count": Maximum number of resources in a
21035 // page. If not specified, 100 is used. May not be larger than 1000.
21036 func (c *ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall) Count(Count int64) *ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall {
21037 c.urlParams_.Set("_count", fmt.Sprint(Count))
21038 return c
21039 }
21040
21041 // PageToken sets the optional parameter "_page_token": Used to retrieve the
21042 // next or previous page of results when using pagination. Set `_page_token` to
21043 // the value of _page_token set in next or previous page links' url. Next and
21044 // previous page are returned in the response bundle's links field, where
21045 // `link.relation` is "previous" or "next". Omit `_page_token` if no previous
21046 // request has been made.
21047 func (c *ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall) PageToken(PageToken string) *ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall {
21048 c.urlParams_.Set("_page_token", PageToken)
21049 return c
21050 }
21051
21052 // Since sets the optional parameter "_since": If provided, only resources
21053 // updated after this time are returned. The time uses the format
21054 // YYYY-MM-DDThh:mm:ss.sss+zz:zz. For example, `2015-02-07T13:28:17.239+02:00`
21055 // or `2017-01-01T00:00:00Z`. The time must be specified to the second and
21056 // include a time zone.
21057 func (c *ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall) Since(Since string) *ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall {
21058 c.urlParams_.Set("_since", Since)
21059 return c
21060 }
21061
21062 // Type sets the optional parameter "_type": String of comma-delimited FHIR
21063 // resource types. If provided, only resources of the specified resource
21064 // type(s) are returned. Specifying multiple `_type` parameters isn't
21065 // supported. For example, the result of `_type=Observation&_type=Encounter` is
21066 // undefined. Use `_type=Observation,Encounter` instead.
21067 func (c *ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall) Type(Type string) *ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall {
21068 c.urlParams_.Set("_type", Type)
21069 return c
21070 }
21071
21072 // Fields allows partial responses to be retrieved. See
21073 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
21074 // details.
21075 func (c *ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall {
21076 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21077 return c
21078 }
21079
21080 // IfNoneMatch sets an optional parameter which makes the operation fail if the
21081 // object's ETag matches the given value. This is useful for getting updates
21082 // only after the object has changed since the last request.
21083 func (c *ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall {
21084 c.ifNoneMatch_ = entityTag
21085 return c
21086 }
21087
21088 // Context sets the context to be used in this call's Do method.
21089 func (c *ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall {
21090 c.ctx_ = ctx
21091 return c
21092 }
21093
21094 // Header returns a http.Header that can be modified by the caller to add
21095 // headers to the request.
21096 func (c *ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall) Header() http.Header {
21097 if c.header_ == nil {
21098 c.header_ = make(http.Header)
21099 }
21100 return c.header_
21101 }
21102
21103 func (c *ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall) doRequest(alt string) (*http.Response, error) {
21104 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
21105 if c.ifNoneMatch_ != "" {
21106 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21107 }
21108 c.urlParams_.Set("alt", alt)
21109 c.urlParams_.Set("prettyPrint", "false")
21110 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/$everything")
21111 urls += "?" + c.urlParams_.Encode()
21112 req, err := http.NewRequest("GET", urls, nil)
21113 if err != nil {
21114 return nil, err
21115 }
21116 req.Header = reqHeaders
21117 googleapi.Expand(req.URL, map[string]string{
21118 "name": c.name,
21119 })
21120 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.Encounter-everything", "request", internallog.HTTPRequest(req, nil))
21121 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21122 }
21123
21124 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.Encounter-everything" call.
21125 func (c *ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
21126 gensupport.SetOptions(c.urlParams_, opts...)
21127 return c.doRequest("")
21128 }
21129
21130 type ProjectsLocationsDatasetsFhirStoresFhirObservationLastnCall struct {
21131 s *Service
21132 parent string
21133 urlParams_ gensupport.URLParams
21134 ifNoneMatch_ string
21135 ctx_ context.Context
21136 header_ http.Header
21137 }
21138
21139 // ObservationLastn: Retrieves the N most recent `Observation` resources for a
21140 // subject matching search criteria specified as query parameters, grouped by
21141 // `Observation.code`, sorted from most recent to oldest. Implements the FHIR
21142 // extended operation Observation-lastn (STU3
21143 // (https://hl7.org/fhir/STU3/observation-operations.html#lastn), R4
21144 // (https://hl7.org/fhir/R4/observation-operation-lastn.html), R5
21145 // (https://hl7.org/fhir/R5/observation-operation-lastn.html)). DSTU2 doesn't
21146 // define the Observation-lastn method, but the server supports it the same way
21147 // it supports STU3. Search terms are provided as query parameters following
21148 // the same pattern as the search method. The following search parameters must
21149 // be provided: - `subject` or `patient` to specify a subject for the
21150 // Observation. - `code`, `category` or any of the composite parameters that
21151 // include `code`. Any other valid Observation search parameters can also be
21152 // provided. This operation accepts an additional query parameter `max`, which
21153 // specifies N, the maximum number of Observations to return from each group,
21154 // with a default of 1. Searches with over 1000 results are rejected. Results
21155 // are counted before grouping and limiting the results with `max`. To stay
21156 // within the limit, constrain these searches using Observation search
21157 // parameters such as `_lastUpdated` or `date`. On success, the response body
21158 // contains a JSON-encoded representation of a `Bundle` resource of type
21159 // `searchset`, containing the results of the operation. Errors generated by
21160 // the FHIR store contain a JSON-encoded `OperationOutcome` resource describing
21161 // the reason for the error. If the request cannot be mapped to a valid API
21162 // method on a FHIR store, a generic GCP error might be returned instead.
21163 //
21164 // - parent: Name of the FHIR store to retrieve resources from.
21165 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) ObservationLastn(parent string) *ProjectsLocationsDatasetsFhirStoresFhirObservationLastnCall {
21166 c := &ProjectsLocationsDatasetsFhirStoresFhirObservationLastnCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21167 c.parent = parent
21168 return c
21169 }
21170
21171 // Fields allows partial responses to be retrieved. See
21172 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
21173 // details.
21174 func (c *ProjectsLocationsDatasetsFhirStoresFhirObservationLastnCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirObservationLastnCall {
21175 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21176 return c
21177 }
21178
21179 // IfNoneMatch sets an optional parameter which makes the operation fail if the
21180 // object's ETag matches the given value. This is useful for getting updates
21181 // only after the object has changed since the last request.
21182 func (c *ProjectsLocationsDatasetsFhirStoresFhirObservationLastnCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirObservationLastnCall {
21183 c.ifNoneMatch_ = entityTag
21184 return c
21185 }
21186
21187 // Context sets the context to be used in this call's Do method.
21188 func (c *ProjectsLocationsDatasetsFhirStoresFhirObservationLastnCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirObservationLastnCall {
21189 c.ctx_ = ctx
21190 return c
21191 }
21192
21193 // Header returns a http.Header that can be modified by the caller to add
21194 // headers to the request.
21195 func (c *ProjectsLocationsDatasetsFhirStoresFhirObservationLastnCall) Header() http.Header {
21196 if c.header_ == nil {
21197 c.header_ = make(http.Header)
21198 }
21199 return c.header_
21200 }
21201
21202 func (c *ProjectsLocationsDatasetsFhirStoresFhirObservationLastnCall) doRequest(alt string) (*http.Response, error) {
21203 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
21204 if c.ifNoneMatch_ != "" {
21205 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21206 }
21207 c.urlParams_.Set("alt", alt)
21208 c.urlParams_.Set("prettyPrint", "false")
21209 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/fhir/Observation/$lastn")
21210 urls += "?" + c.urlParams_.Encode()
21211 req, err := http.NewRequest("GET", urls, nil)
21212 if err != nil {
21213 return nil, err
21214 }
21215 req.Header = reqHeaders
21216 googleapi.Expand(req.URL, map[string]string{
21217 "parent": c.parent,
21218 })
21219 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.Observation-lastn", "request", internallog.HTTPRequest(req, nil))
21220 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21221 }
21222
21223 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.Observation-lastn" call.
21224 func (c *ProjectsLocationsDatasetsFhirStoresFhirObservationLastnCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
21225 gensupport.SetOptions(c.urlParams_, opts...)
21226 return c.doRequest("")
21227 }
21228
21229 type ProjectsLocationsDatasetsFhirStoresFhirPatientConsentEnforcementStatusCall struct {
21230 s *Service
21231 name string
21232 urlParams_ gensupport.URLParams
21233 ifNoneMatch_ string
21234 ctx_ context.Context
21235 header_ http.Header
21236 }
21237
21238 // PatientConsentEnforcementStatus: Returns the consent enforcement status of
21239 // all consent resources for a patient. On success, the response body contains
21240 // a JSON-encoded representation of a bundle of `Parameters`
21241 // (http://hl7.org/fhir/parameters.html) FHIR resources, containing the current
21242 // enforcement status for each consent resource of the patient. Does not
21243 // support DSTU2.
21244 //
21245 // - name: The name of the patient to find enforcement statuses, in the format
21246 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirSt
21247 // ores/{fhir_store_id}/fhir/Patient/{patient_id}`.
21248 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) PatientConsentEnforcementStatus(name string) *ProjectsLocationsDatasetsFhirStoresFhirPatientConsentEnforcementStatusCall {
21249 c := &ProjectsLocationsDatasetsFhirStoresFhirPatientConsentEnforcementStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21250 c.name = name
21251 return c
21252 }
21253
21254 // Count sets the optional parameter "_count": The maximum number of results on
21255 // a page. If not specified, 100 is used. May not be larger than 1000.
21256 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientConsentEnforcementStatusCall) Count(Count int64) *ProjectsLocationsDatasetsFhirStoresFhirPatientConsentEnforcementStatusCall {
21257 c.urlParams_.Set("_count", fmt.Sprint(Count))
21258 return c
21259 }
21260
21261 // PageToken sets the optional parameter "_page_token": Used to retrieve the
21262 // first, previous, next, or last page of consent enforcement statuses when
21263 // using pagination. Value should be set to the value of `_page_token` set in
21264 // next or previous page links' URLs. Next and previous page are returned in
21265 // the response bundle's links field, where `link.relation` is "previous" or
21266 // "next". Omit `_page_token` if no previous request has been made.
21267 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientConsentEnforcementStatusCall) PageToken(PageToken string) *ProjectsLocationsDatasetsFhirStoresFhirPatientConsentEnforcementStatusCall {
21268 c.urlParams_.Set("_page_token", PageToken)
21269 return c
21270 }
21271
21272 // Fields allows partial responses to be retrieved. See
21273 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
21274 // details.
21275 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientConsentEnforcementStatusCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirPatientConsentEnforcementStatusCall {
21276 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21277 return c
21278 }
21279
21280 // IfNoneMatch sets an optional parameter which makes the operation fail if the
21281 // object's ETag matches the given value. This is useful for getting updates
21282 // only after the object has changed since the last request.
21283 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientConsentEnforcementStatusCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirPatientConsentEnforcementStatusCall {
21284 c.ifNoneMatch_ = entityTag
21285 return c
21286 }
21287
21288 // Context sets the context to be used in this call's Do method.
21289 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientConsentEnforcementStatusCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirPatientConsentEnforcementStatusCall {
21290 c.ctx_ = ctx
21291 return c
21292 }
21293
21294 // Header returns a http.Header that can be modified by the caller to add
21295 // headers to the request.
21296 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientConsentEnforcementStatusCall) Header() http.Header {
21297 if c.header_ == nil {
21298 c.header_ = make(http.Header)
21299 }
21300 return c.header_
21301 }
21302
21303 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientConsentEnforcementStatusCall) doRequest(alt string) (*http.Response, error) {
21304 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
21305 if c.ifNoneMatch_ != "" {
21306 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21307 }
21308 c.urlParams_.Set("alt", alt)
21309 c.urlParams_.Set("prettyPrint", "false")
21310 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/$consent-enforcement-status")
21311 urls += "?" + c.urlParams_.Encode()
21312 req, err := http.NewRequest("GET", urls, nil)
21313 if err != nil {
21314 return nil, err
21315 }
21316 req.Header = reqHeaders
21317 googleapi.Expand(req.URL, map[string]string{
21318 "name": c.name,
21319 })
21320 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))
21321 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21322 }
21323
21324 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.Patient-consent-enforcement-status" call.
21325 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientConsentEnforcementStatusCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
21326 gensupport.SetOptions(c.urlParams_, opts...)
21327 return c.doRequest("")
21328 }
21329
21330 type ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall struct {
21331 s *Service
21332 name string
21333 urlParams_ gensupport.URLParams
21334 ifNoneMatch_ string
21335 ctx_ context.Context
21336 header_ http.Header
21337 }
21338
21339 // PatientEverything: Retrieves a Patient resource and resources related to
21340 // that patient. Implements the FHIR extended operation Patient-everything
21341 // (DSTU2 (https://hl7.org/fhir/DSTU2/patient-operations.html#everything), STU3
21342 // (https://hl7.org/fhir/STU3/patient-operations.html#everything), R4
21343 // (https://hl7.org/fhir/R4/patient-operation-everything.html), R5
21344 // (https://hl7.org/fhir/R5/patient-operation-everything.html)). On success,
21345 // the response body contains a JSON-encoded representation of a `Bundle`
21346 // resource of type `searchset`, containing the results of the operation.
21347 // Errors generated by the FHIR store contain a JSON-encoded `OperationOutcome`
21348 // resource describing the reason for the error. If the request cannot be
21349 // mapped to a valid API method on a FHIR store, a generic GCP error might be
21350 // returned instead. The resources in scope for the response are: * The patient
21351 // resource itself. * All the resources directly referenced by the patient
21352 // resource. * Resources directly referencing the patient resource that meet
21353 // the inclusion criteria. The inclusion criteria are based on the membership
21354 // rules in the patient compartment definition (DSTU2
21355 // (https://hl7.org/fhir/DSTU2/compartment-patient.html), STU3
21356 // (http://www.hl7.org/fhir/stu3/compartmentdefinition-patient.html), R4
21357 // (https://hl7.org/fhir/R4/compartmentdefinition-patient.html), R5
21358 // (http://hl7.org/fhir/R5/compartmentdefinition-patient.html)), which details
21359 // the eligible resource types and referencing search parameters. For samples
21360 // that show how to call `Patient-everything`, see Getting all patient
21361 // compartment resources
21362 // (https://cloud.google.com/healthcare/docs/how-tos/fhir-resources#getting_all_patient_compartment_resources).
21363 //
21364 // - name: Name of the `Patient` resource for which the information is
21365 // required.
21366 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) PatientEverything(name string) *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall {
21367 c := &ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21368 c.name = name
21369 return c
21370 }
21371
21372 // Count sets the optional parameter "_count": Maximum number of resources in a
21373 // page. If not specified, 100 is used. May not be larger than 1000.
21374 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) Count(Count int64) *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall {
21375 c.urlParams_.Set("_count", fmt.Sprint(Count))
21376 return c
21377 }
21378
21379 // PageToken sets the optional parameter "_page_token": Used to retrieve the
21380 // next or previous page of results when using pagination. Set `_page_token` to
21381 // the value of _page_token set in next or previous page links' url. Next and
21382 // previous page are returned in the response bundle's links field, where
21383 // `link.relation` is "previous" or "next". Omit `_page_token` if no previous
21384 // request has been made.
21385 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) PageToken(PageToken string) *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall {
21386 c.urlParams_.Set("_page_token", PageToken)
21387 return c
21388 }
21389
21390 // Since sets the optional parameter "_since": If provided, only resources
21391 // updated after this time are returned. The time uses the format
21392 // YYYY-MM-DDThh:mm:ss.sss+zz:zz. For example, `2015-02-07T13:28:17.239+02:00`
21393 // or `2017-01-01T00:00:00Z`. The time must be specified to the second and
21394 // include a time zone.
21395 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) Since(Since string) *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall {
21396 c.urlParams_.Set("_since", Since)
21397 return c
21398 }
21399
21400 // Type sets the optional parameter "_type": String of comma-delimited FHIR
21401 // resource types. If provided, only resources of the specified resource
21402 // type(s) are returned. Specifying multiple `_type` parameters isn't
21403 // supported. For example, the result of `_type=Observation&_type=Encounter` is
21404 // undefined. Use `_type=Observation,Encounter` instead.
21405 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) Type(Type string) *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall {
21406 c.urlParams_.Set("_type", Type)
21407 return c
21408 }
21409
21410 // End sets the optional parameter "end": The response includes records prior
21411 // to the end date. The date uses the format YYYY-MM-DD. If no end date is
21412 // provided, all records subsequent to the start date are in scope.
21413 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) End(end string) *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall {
21414 c.urlParams_.Set("end", end)
21415 return c
21416 }
21417
21418 // Start sets the optional parameter "start": The response includes records
21419 // subsequent to the start date. The date uses the format YYYY-MM-DD. If no
21420 // start date is provided, all records prior to the end date are in scope.
21421 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) Start(start string) *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall {
21422 c.urlParams_.Set("start", start)
21423 return c
21424 }
21425
21426 // Fields allows partial responses to be retrieved. See
21427 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
21428 // details.
21429 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall {
21430 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21431 return c
21432 }
21433
21434 // IfNoneMatch sets an optional parameter which makes the operation fail if the
21435 // object's ETag matches the given value. This is useful for getting updates
21436 // only after the object has changed since the last request.
21437 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall {
21438 c.ifNoneMatch_ = entityTag
21439 return c
21440 }
21441
21442 // Context sets the context to be used in this call's Do method.
21443 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall {
21444 c.ctx_ = ctx
21445 return c
21446 }
21447
21448 // Header returns a http.Header that can be modified by the caller to add
21449 // headers to the request.
21450 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) Header() http.Header {
21451 if c.header_ == nil {
21452 c.header_ = make(http.Header)
21453 }
21454 return c.header_
21455 }
21456
21457 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) doRequest(alt string) (*http.Response, error) {
21458 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
21459 if c.ifNoneMatch_ != "" {
21460 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21461 }
21462 c.urlParams_.Set("alt", alt)
21463 c.urlParams_.Set("prettyPrint", "false")
21464 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/$everything")
21465 urls += "?" + c.urlParams_.Encode()
21466 req, err := http.NewRequest("GET", urls, nil)
21467 if err != nil {
21468 return nil, err
21469 }
21470 req.Header = reqHeaders
21471 googleapi.Expand(req.URL, map[string]string{
21472 "name": c.name,
21473 })
21474 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.Patient-everything", "request", internallog.HTTPRequest(req, nil))
21475 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21476 }
21477
21478 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.Patient-everything" call.
21479 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientEverythingCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
21480 gensupport.SetOptions(c.urlParams_, opts...)
21481 return c.doRequest("")
21482 }
21483
21484 type ProjectsLocationsDatasetsFhirStoresFhirResourceIncomingReferencesCall struct {
21485 s *Service
21486 parent string
21487 urlParams_ gensupport.URLParams
21488 ifNoneMatch_ string
21489 ctx_ context.Context
21490 header_ http.Header
21491 }
21492
21493 // ResourceIncomingReferences: Lists all the resources that directly refer to
21494 // the given target FHIR resource. Can also support the case when the target
21495 // resource doesn't exist, for example, if the target has been deleted. On
21496 // success, the response body contains a Bundle with type `searchset`, where
21497 // each entry in the Bundle contains the full content of the resource. If the
21498 // operation fails, an `OperationOutcome` is returned describing the failure.
21499 // If the request cannot be mapped to a valid API method on a FHIR store, a
21500 // generic Google Cloud error might be returned instead.
21501 //
21502 // - parent: The name of the FHIR store that holds the target resource.
21503 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) ResourceIncomingReferences(parent string) *ProjectsLocationsDatasetsFhirStoresFhirResourceIncomingReferencesCall {
21504 c := &ProjectsLocationsDatasetsFhirStoresFhirResourceIncomingReferencesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21505 c.parent = parent
21506 return c
21507 }
21508
21509 // Count sets the optional parameter "_count": Maximum number of resources in a
21510 // page. If not specified, 100 is used. May not be larger than 1000.
21511 func (c *ProjectsLocationsDatasetsFhirStoresFhirResourceIncomingReferencesCall) Count(Count int64) *ProjectsLocationsDatasetsFhirStoresFhirResourceIncomingReferencesCall {
21512 c.urlParams_.Set("_count", fmt.Sprint(Count))
21513 return c
21514 }
21515
21516 // PageToken sets the optional parameter "_page_token": Used to retrieve the
21517 // next page of results when using pagination. Set `_page_token` to the value
21518 // of _page_token set in next page links' url. Next page are returned in the
21519 // response bundle's links field, where `link.relation` is "next". Omit
21520 // `_page_token` if no previous request has been made.
21521 func (c *ProjectsLocationsDatasetsFhirStoresFhirResourceIncomingReferencesCall) PageToken(PageToken string) *ProjectsLocationsDatasetsFhirStoresFhirResourceIncomingReferencesCall {
21522 c.urlParams_.Set("_page_token", PageToken)
21523 return c
21524 }
21525
21526 // Summary sets the optional parameter "_summary": Used to simplify the
21527 // representation of the returned resources. `_summary=text` returns only the
21528 // `text`, `id`, and `meta` top-level fields. `_summary=data` removes the
21529 // `text` field and returns all other fields. `_summary=false` returns all
21530 // parts of the resource(s). Either not providing this parameter or providing
21531 // an empty value to this parameter also returns all parts of the resource(s).
21532 func (c *ProjectsLocationsDatasetsFhirStoresFhirResourceIncomingReferencesCall) Summary(Summary string) *ProjectsLocationsDatasetsFhirStoresFhirResourceIncomingReferencesCall {
21533 c.urlParams_.Set("_summary", Summary)
21534 return c
21535 }
21536
21537 // Type sets the optional parameter "_type": String of comma-delimited FHIR
21538 // resource types. If provided, only resources of the specified resource
21539 // type(s) are returned. If not provided or an empty value is provided, no
21540 // filter on the returned resource type(s) is applied.
21541 func (c *ProjectsLocationsDatasetsFhirStoresFhirResourceIncomingReferencesCall) Type(Type string) *ProjectsLocationsDatasetsFhirStoresFhirResourceIncomingReferencesCall {
21542 c.urlParams_.Set("_type", Type)
21543 return c
21544 }
21545
21546 // Target sets the optional parameter "target": Required. The target whose
21547 // incoming references are requested. This param is required and must not be
21548 // empty. It uses the format "ResourceType/ResourceID", for example,
21549 // target=ResourceType/ResourceID.
21550 func (c *ProjectsLocationsDatasetsFhirStoresFhirResourceIncomingReferencesCall) Target(target string) *ProjectsLocationsDatasetsFhirStoresFhirResourceIncomingReferencesCall {
21551 c.urlParams_.Set("target", target)
21552 return c
21553 }
21554
21555 // Fields allows partial responses to be retrieved. See
21556 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
21557 // details.
21558 func (c *ProjectsLocationsDatasetsFhirStoresFhirResourceIncomingReferencesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirResourceIncomingReferencesCall {
21559 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21560 return c
21561 }
21562
21563 // IfNoneMatch sets an optional parameter which makes the operation fail if the
21564 // object's ETag matches the given value. This is useful for getting updates
21565 // only after the object has changed since the last request.
21566 func (c *ProjectsLocationsDatasetsFhirStoresFhirResourceIncomingReferencesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirResourceIncomingReferencesCall {
21567 c.ifNoneMatch_ = entityTag
21568 return c
21569 }
21570
21571 // Context sets the context to be used in this call's Do method.
21572 func (c *ProjectsLocationsDatasetsFhirStoresFhirResourceIncomingReferencesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirResourceIncomingReferencesCall {
21573 c.ctx_ = ctx
21574 return c
21575 }
21576
21577 // Header returns a http.Header that can be modified by the caller to add
21578 // headers to the request.
21579 func (c *ProjectsLocationsDatasetsFhirStoresFhirResourceIncomingReferencesCall) Header() http.Header {
21580 if c.header_ == nil {
21581 c.header_ = make(http.Header)
21582 }
21583 return c.header_
21584 }
21585
21586 func (c *ProjectsLocationsDatasetsFhirStoresFhirResourceIncomingReferencesCall) doRequest(alt string) (*http.Response, error) {
21587 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
21588 if c.ifNoneMatch_ != "" {
21589 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21590 }
21591 c.urlParams_.Set("alt", alt)
21592 c.urlParams_.Set("prettyPrint", "false")
21593 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/fhir/$references")
21594 urls += "?" + c.urlParams_.Encode()
21595 req, err := http.NewRequest("GET", urls, nil)
21596 if err != nil {
21597 return nil, err
21598 }
21599 req.Header = reqHeaders
21600 googleapi.Expand(req.URL, map[string]string{
21601 "parent": c.parent,
21602 })
21603 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.Resource-incoming-references", "request", internallog.HTTPRequest(req, nil))
21604 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21605 }
21606
21607 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.Resource-incoming-references" call.
21608 func (c *ProjectsLocationsDatasetsFhirStoresFhirResourceIncomingReferencesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
21609 gensupport.SetOptions(c.urlParams_, opts...)
21610 return c.doRequest("")
21611 }
21612
21613 type ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall struct {
21614 s *Service
21615 name string
21616 urlParams_ gensupport.URLParams
21617 ctx_ context.Context
21618 header_ http.Header
21619 }
21620
21621 // ResourcePurge: Deletes all the historical versions of a resource (excluding
21622 // the current version) from the FHIR store. To remove all versions of a
21623 // resource, first delete the current version and then call this method. This
21624 // is not a FHIR standard operation. For samples that show how to call
21625 // `Resource-purge`, see Deleting historical versions of a FHIR resource
21626 // (https://cloud.google.com/healthcare/docs/how-tos/fhir-resources#deleting_historical_versions_of_a_fhir_resource).
21627 //
21628 // - name: The name of the resource to purge.
21629 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) ResourcePurge(name string) *ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall {
21630 c := &ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21631 c.name = name
21632 return c
21633 }
21634
21635 // Fields allows partial responses to be retrieved. See
21636 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
21637 // details.
21638 func (c *ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall {
21639 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21640 return c
21641 }
21642
21643 // Context sets the context to be used in this call's Do method.
21644 func (c *ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall {
21645 c.ctx_ = ctx
21646 return c
21647 }
21648
21649 // Header returns a http.Header that can be modified by the caller to add
21650 // headers to the request.
21651 func (c *ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall) Header() http.Header {
21652 if c.header_ == nil {
21653 c.header_ = make(http.Header)
21654 }
21655 return c.header_
21656 }
21657
21658 func (c *ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall) doRequest(alt string) (*http.Response, error) {
21659 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
21660 c.urlParams_.Set("alt", alt)
21661 c.urlParams_.Set("prettyPrint", "false")
21662 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/$purge")
21663 urls += "?" + c.urlParams_.Encode()
21664 req, err := http.NewRequest("DELETE", urls, nil)
21665 if err != nil {
21666 return nil, err
21667 }
21668 req.Header = reqHeaders
21669 googleapi.Expand(req.URL, map[string]string{
21670 "name": c.name,
21671 })
21672 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.Resource-purge", "request", internallog.HTTPRequest(req, nil))
21673 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21674 }
21675
21676 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.Resource-purge" call.
21677 // Any non-2xx status code is an error. Response headers are in either
21678 // *Empty.ServerResponse.Header or (if a response was returned at all) in
21679 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
21680 // whether the returned error was because http.StatusNotModified was returned.
21681 func (c *ProjectsLocationsDatasetsFhirStoresFhirResourcePurgeCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
21682 gensupport.SetOptions(c.urlParams_, opts...)
21683 res, err := c.doRequest("json")
21684 if res != nil && res.StatusCode == http.StatusNotModified {
21685 if res.Body != nil {
21686 res.Body.Close()
21687 }
21688 return nil, gensupport.WrapError(&googleapi.Error{
21689 Code: res.StatusCode,
21690 Header: res.Header,
21691 })
21692 }
21693 if err != nil {
21694 return nil, err
21695 }
21696 defer googleapi.CloseBody(res)
21697 if err := googleapi.CheckResponse(res); err != nil {
21698 return nil, gensupport.WrapError(err)
21699 }
21700 ret := &Empty{
21701 ServerResponse: googleapi.ServerResponse{
21702 Header: res.Header,
21703 HTTPStatusCode: res.StatusCode,
21704 },
21705 }
21706 target := &ret
21707 b, err := gensupport.DecodeResponseBytes(target, res)
21708 if err != nil {
21709 return nil, err
21710 }
21711 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.Resource-purge", "response", internallog.HTTPResponse(res, b))
21712 return ret, nil
21713 }
21714
21715 type ProjectsLocationsDatasetsFhirStoresFhirResourceValidateCall struct {
21716 s *Service
21717 parent string
21718 type_ string
21719 body_ io.Reader
21720 urlParams_ gensupport.URLParams
21721 ctx_ context.Context
21722 header_ http.Header
21723 }
21724
21725 // ResourceValidate: Validates an input FHIR resource's conformance to its
21726 // profiles and the profiles configured on the FHIR store. Implements the FHIR
21727 // extended operation $validate (DSTU2
21728 // (https://hl7.org/fhir/DSTU2/resource-operations.html#validate), STU3
21729 // (https://hl7.org/fhir/STU3/resource-operations.html#validate), R4
21730 // (https://hl7.org/fhir/R4/resource-operation-validate.html), or R5
21731 // (https://hl7.org/fhir/R5/resource-operation-validate.html)). The request
21732 // body must contain a JSON-encoded FHIR resource, and the request headers must
21733 // contain `Content-Type: application/fhir+json`. The `Parameters` input syntax
21734 // is not supported. The `profile` query parameter can be used to request that
21735 // the resource only be validated against a specific profile. If a profile with
21736 // the given URL cannot be found in the FHIR store then an error is returned.
21737 // Errors generated by validation contain a JSON-encoded `OperationOutcome`
21738 // resource describing the reason for the error. If the request cannot be
21739 // mapped to a valid API method on a FHIR store, a generic GCP error might be
21740 // returned instead.
21741 //
21742 // - parent: The name of the FHIR store that holds the profiles being used for
21743 // validation.
21744 // - type: The FHIR resource type of the resource being validated. For a
21745 // complete list, see the FHIR Resource Index (DSTU2
21746 // (https://hl7.org/fhir/DSTU2/resourcelist.html), STU3
21747 // (https://hl7.org/fhir/STU3/resourcelist.html), R4
21748 // (https://hl7.org/fhir/R4/resourcelist.html), or R5
21749 // (https://hl7.org/fhir/R5/resourcelist.html)). Must match the resource type
21750 // in the provided content.
21751 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) ResourceValidate(parent string, type_ string, body_ io.Reader) *ProjectsLocationsDatasetsFhirStoresFhirResourceValidateCall {
21752 c := &ProjectsLocationsDatasetsFhirStoresFhirResourceValidateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21753 c.parent = parent
21754 c.type_ = type_
21755 c.body_ = body_
21756 return c
21757 }
21758
21759 // Profile sets the optional parameter "profile": The canonical URL of a
21760 // profile that this resource should be validated against. For example, to
21761 // validate a Patient resource against the US Core Patient profile this
21762 // parameter would be
21763 // `http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient`. A
21764 // StructureDefinition with this canonical URL must exist in the FHIR store.
21765 func (c *ProjectsLocationsDatasetsFhirStoresFhirResourceValidateCall) Profile(profile string) *ProjectsLocationsDatasetsFhirStoresFhirResourceValidateCall {
21766 c.urlParams_.Set("profile", profile)
21767 return c
21768 }
21769
21770 // Fields allows partial responses to be retrieved. See
21771 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
21772 // details.
21773 func (c *ProjectsLocationsDatasetsFhirStoresFhirResourceValidateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirResourceValidateCall {
21774 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21775 return c
21776 }
21777
21778 // Context sets the context to be used in this call's Do method.
21779 func (c *ProjectsLocationsDatasetsFhirStoresFhirResourceValidateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirResourceValidateCall {
21780 c.ctx_ = ctx
21781 return c
21782 }
21783
21784 // Header returns a http.Header that can be modified by the caller to add
21785 // headers to the request.
21786 func (c *ProjectsLocationsDatasetsFhirStoresFhirResourceValidateCall) Header() http.Header {
21787 if c.header_ == nil {
21788 c.header_ = make(http.Header)
21789 }
21790 return c.header_
21791 }
21792
21793 func (c *ProjectsLocationsDatasetsFhirStoresFhirResourceValidateCall) doRequest(alt string) (*http.Response, error) {
21794 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
21795 body := bytes.NewBuffer(nil)
21796 _, err := body.ReadFrom(c.body_)
21797 if err != nil {
21798 return nil, err
21799 }
21800 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/fhir/{+type}/$validate")
21801 urls += "?" + c.urlParams_.Encode()
21802 req, err := http.NewRequest("POST", urls, body)
21803 if err != nil {
21804 return nil, err
21805 }
21806 req.Header = reqHeaders
21807 googleapi.Expand(req.URL, map[string]string{
21808 "parent": c.parent,
21809 "type": c.type_,
21810 })
21811 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()))
21812 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21813 }
21814
21815 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.Resource-validate" call.
21816 func (c *ProjectsLocationsDatasetsFhirStoresFhirResourceValidateCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
21817 gensupport.SetOptions(c.urlParams_, opts...)
21818 return c.doRequest("")
21819 }
21820
21821 type ProjectsLocationsDatasetsFhirStoresFhirBulkExportCall struct {
21822 s *Service
21823 name string
21824 urlParams_ gensupport.URLParams
21825 ifNoneMatch_ string
21826 ctx_ context.Context
21827 header_ http.Header
21828 }
21829
21830 // BulkExport: Bulk exports all resources from the FHIR store to the specified
21831 // destination. Implements the FHIR implementation guide system level $export
21832 // (https://build.fhir.org/ig/HL7/bulk-data/export.html#endpoint---system-level-export).
21833 // The following headers must be set in the request: * `Accept`: specifies the
21834 // format of the `OperationOutcome` response. Only `application/fhir+json` is
21835 // supported. * `Prefer`: specifies whether the response is immediate or
21836 // asynchronous. Must be to `respond-async` because only asynchronous responses
21837 // are supported. Specify the destination for the server to write result files
21838 // by setting the Cloud Storage location bulk_export_gcs_destination on the
21839 // FHIR store. URI of an existing Cloud Storage directory where the server
21840 // writes result files, in the format
21841 // gs://{bucket-id}/{path/to/destination/dir}. If there is no trailing slash,
21842 // the service appends one when composing the object path. The user is
21843 // responsible for creating the Cloud Storage bucket referenced. Supports the
21844 // following query parameters: * `_type`: string of comma-delimited FHIR
21845 // resource types. If provided, only the resources of the specified type(s) are
21846 // exported. * `_since`: if provided, only the resources that are updated after
21847 // the specified time are exported. * `_outputFormat`: optional, specify ndjson
21848 // to export data in NDJSON format. Exported file names use the format:
21849 // {export_id}_{resource_type}.ndjson. On success, the `Content-Location`
21850 // header of the response is set to a URL that the user can use to query the
21851 // status of the export. The URL is in the format:
21852 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStor
21853 // es/{fhir_store_id}/operations/{export_id}`. See get-fhir-operation-status
21854 // for more information. Errors generated by the FHIR store contain a
21855 // JSON-encoded `OperationOutcome` resource describing the reason for the
21856 // error.
21857 //
21858 // - name: The name of the FHIR store to export resources from, in the format
21859 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirSt
21860 // ores/{fhir_store_id}`.
21861 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) BulkExport(name string) *ProjectsLocationsDatasetsFhirStoresFhirBulkExportCall {
21862 c := &ProjectsLocationsDatasetsFhirStoresFhirBulkExportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21863 c.name = name
21864 return c
21865 }
21866
21867 // Since sets the optional parameter "_since": If provided, only resources
21868 // updated after this time are exported. The time uses the format
21869 // YYYY-MM-DDThh:mm:ss.sss+zz:zz. For example, `2015-02-07T13:28:17.239+02:00`
21870 // or `2017-01-01T00:00:00Z`. The time must be specified to the second and
21871 // include a time zone.
21872 func (c *ProjectsLocationsDatasetsFhirStoresFhirBulkExportCall) Since(Since string) *ProjectsLocationsDatasetsFhirStoresFhirBulkExportCall {
21873 c.urlParams_.Set("_since", Since)
21874 return c
21875 }
21876
21877 // Type sets the optional parameter "_type": String of comma-delimited FHIR
21878 // resource types. If provided, only resources of the specified resource
21879 // type(s) are exported.
21880 func (c *ProjectsLocationsDatasetsFhirStoresFhirBulkExportCall) Type(Type string) *ProjectsLocationsDatasetsFhirStoresFhirBulkExportCall {
21881 c.urlParams_.Set("_type", Type)
21882 return c
21883 }
21884
21885 // OutputFormat sets the optional parameter "outputFormat": Output format of
21886 // the export. This field is optional and only `application/fhir+ndjson` is
21887 // supported.
21888 func (c *ProjectsLocationsDatasetsFhirStoresFhirBulkExportCall) OutputFormat(outputFormat string) *ProjectsLocationsDatasetsFhirStoresFhirBulkExportCall {
21889 c.urlParams_.Set("outputFormat", outputFormat)
21890 return c
21891 }
21892
21893 // Fields allows partial responses to be retrieved. See
21894 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
21895 // details.
21896 func (c *ProjectsLocationsDatasetsFhirStoresFhirBulkExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirBulkExportCall {
21897 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21898 return c
21899 }
21900
21901 // IfNoneMatch sets an optional parameter which makes the operation fail if the
21902 // object's ETag matches the given value. This is useful for getting updates
21903 // only after the object has changed since the last request.
21904 func (c *ProjectsLocationsDatasetsFhirStoresFhirBulkExportCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirBulkExportCall {
21905 c.ifNoneMatch_ = entityTag
21906 return c
21907 }
21908
21909 // Context sets the context to be used in this call's Do method.
21910 func (c *ProjectsLocationsDatasetsFhirStoresFhirBulkExportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirBulkExportCall {
21911 c.ctx_ = ctx
21912 return c
21913 }
21914
21915 // Header returns a http.Header that can be modified by the caller to add
21916 // headers to the request.
21917 func (c *ProjectsLocationsDatasetsFhirStoresFhirBulkExportCall) Header() http.Header {
21918 if c.header_ == nil {
21919 c.header_ = make(http.Header)
21920 }
21921 return c.header_
21922 }
21923
21924 func (c *ProjectsLocationsDatasetsFhirStoresFhirBulkExportCall) doRequest(alt string) (*http.Response, error) {
21925 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
21926 if c.ifNoneMatch_ != "" {
21927 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21928 }
21929 c.urlParams_.Set("alt", alt)
21930 c.urlParams_.Set("prettyPrint", "false")
21931 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/fhir/$export")
21932 urls += "?" + c.urlParams_.Encode()
21933 req, err := http.NewRequest("GET", urls, nil)
21934 if err != nil {
21935 return nil, err
21936 }
21937 req.Header = reqHeaders
21938 googleapi.Expand(req.URL, map[string]string{
21939 "name": c.name,
21940 })
21941 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.bulk-export", "request", internallog.HTTPRequest(req, nil))
21942 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21943 }
21944
21945 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.bulk-export" call.
21946 func (c *ProjectsLocationsDatasetsFhirStoresFhirBulkExportCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
21947 gensupport.SetOptions(c.urlParams_, opts...)
21948 return c.doRequest("")
21949 }
21950
21951 type ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall struct {
21952 s *Service
21953 name string
21954 urlParams_ gensupport.URLParams
21955 ifNoneMatch_ string
21956 ctx_ context.Context
21957 header_ http.Header
21958 }
21959
21960 // Capabilities: Gets the FHIR capability statement (STU3
21961 // (https://hl7.org/fhir/STU3/capabilitystatement.html), R4
21962 // (https://hl7.org/fhir/R4/capabilitystatement.html), R5
21963 // (https://hl7.org/fhir/R5/capabilitystatement.html)), or the conformance
21964 // statement (https://hl7.org/fhir/DSTU2/conformance.html) in the DSTU2 case
21965 // for the store, which contains a description of functionality supported by
21966 // the server. Implements the FHIR standard capabilities interaction (STU3
21967 // (https://hl7.org/fhir/STU3/http.html#capabilities), R4
21968 // (https://hl7.org/fhir/R4/http.html#capabilities), R5
21969 // (https://hl7.org/fhir/R5/http.html#capabilities)), or the conformance
21970 // interaction (https://hl7.org/fhir/DSTU2/http.html#conformance) in the DSTU2
21971 // case. On success, the response body contains a JSON-encoded representation
21972 // of a `CapabilityStatement` resource.
21973 //
21974 // - name: Name of the FHIR store to retrieve the capabilities for.
21975 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Capabilities(name string) *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall {
21976 c := &ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21977 c.name = name
21978 return c
21979 }
21980
21981 // Fields allows partial responses to be retrieved. See
21982 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
21983 // details.
21984 func (c *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall {
21985 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21986 return c
21987 }
21988
21989 // IfNoneMatch sets an optional parameter which makes the operation fail if the
21990 // object's ETag matches the given value. This is useful for getting updates
21991 // only after the object has changed since the last request.
21992 func (c *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall {
21993 c.ifNoneMatch_ = entityTag
21994 return c
21995 }
21996
21997 // Context sets the context to be used in this call's Do method.
21998 func (c *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall {
21999 c.ctx_ = ctx
22000 return c
22001 }
22002
22003 // Header returns a http.Header that can be modified by the caller to add
22004 // headers to the request.
22005 func (c *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall) Header() http.Header {
22006 if c.header_ == nil {
22007 c.header_ = make(http.Header)
22008 }
22009 return c.header_
22010 }
22011
22012 func (c *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall) doRequest(alt string) (*http.Response, error) {
22013 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
22014 if c.ifNoneMatch_ != "" {
22015 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22016 }
22017 c.urlParams_.Set("alt", alt)
22018 c.urlParams_.Set("prettyPrint", "false")
22019 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/fhir/metadata")
22020 urls += "?" + c.urlParams_.Encode()
22021 req, err := http.NewRequest("GET", urls, nil)
22022 if err != nil {
22023 return nil, err
22024 }
22025 req.Header = reqHeaders
22026 googleapi.Expand(req.URL, map[string]string{
22027 "name": c.name,
22028 })
22029 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.capabilities", "request", internallog.HTTPRequest(req, nil))
22030 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22031 }
22032
22033 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.capabilities" call.
22034 func (c *ProjectsLocationsDatasetsFhirStoresFhirCapabilitiesCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
22035 gensupport.SetOptions(c.urlParams_, opts...)
22036 return c.doRequest("")
22037 }
22038
22039 type ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteCall struct {
22040 s *Service
22041 parent string
22042 type_ string
22043 urlParams_ gensupport.URLParams
22044 ctx_ context.Context
22045 header_ http.Header
22046 }
22047
22048 // ConditionalDelete: Deletes FHIR resources that match a search query.
22049 // Implements the FHIR standard conditional delete interaction (DSTU2
22050 // (https://hl7.org/fhir/DSTU2/http.html#2.1.0.12.1), STU3
22051 // (https://hl7.org/fhir/STU3/http.html#2.21.0.13.1), R4
22052 // (https://hl7.org/fhir/R4/http.html#3.1.0.7.1), R5
22053 // (https://hl7.org/fhir/R5/http.html#3.1.0.7.1)). If multiple resources match,
22054 // all matching resources are deleted. Search terms are provided as query
22055 // parameters following the same pattern as the search method. Not all FHIR
22056 // resources that match the search query might be deleted because, by default,
22057 // a maximum of 100 FHIR resources can be deleted. The number of FHIR resources
22058 // that can be deleted depends on the page size of the returned resources,
22059 // which you can control using the `_count` query parameter. Even when using
22060 // `_count`, you can delete a maximum 1,000 FHIR resources per each call of
22061 // `conditionalDelete`. Note: Unless resource versioning is disabled by setting
22062 // the disable_resource_versioning flag on the FHIR store, the deleted
22063 // resources are moved to a history repository that can still be retrieved
22064 // through vread and related methods, unless they are removed by the purge
22065 // method. This method requires the`healthcare.fhirStores.searchResources` and
22066 // `healthcare.fhirResources.delete` permissions on the parent FHIR store. For
22067 // samples that show how to call `conditionalDelete`, see Conditionally
22068 // deleting a FHIR resource
22069 // (https://cloud.google.com/healthcare/docs/how-tos/fhir-resources#conditionally_deleting_a_fhir_resource).
22070 //
22071 // - parent: The name of the FHIR store this resource belongs to.
22072 // - type: The FHIR resource type to delete, such as Patient or Observation.
22073 // For a complete list, see the FHIR Resource Index (DSTU2
22074 // (https://hl7.org/fhir/DSTU2/resourcelist.html), STU3
22075 // (https://hl7.org/fhir/STU3/resourcelist.html), R4
22076 // (https://hl7.org/fhir/R4/resourcelist.html), R5
22077 // (https://hl7.org/fhir/R5/resourcelist.html)).
22078 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) ConditionalDelete(parent string, type_ string) *ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteCall {
22079 c := &ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22080 c.parent = parent
22081 c.type_ = type_
22082 return c
22083 }
22084
22085 // Fields allows partial responses to be retrieved. See
22086 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
22087 // details.
22088 func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteCall {
22089 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22090 return c
22091 }
22092
22093 // Context sets the context to be used in this call's Do method.
22094 func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteCall {
22095 c.ctx_ = ctx
22096 return c
22097 }
22098
22099 // Header returns a http.Header that can be modified by the caller to add
22100 // headers to the request.
22101 func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteCall) Header() http.Header {
22102 if c.header_ == nil {
22103 c.header_ = make(http.Header)
22104 }
22105 return c.header_
22106 }
22107
22108 func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteCall) doRequest(alt string) (*http.Response, error) {
22109 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
22110 c.urlParams_.Set("alt", alt)
22111 c.urlParams_.Set("prettyPrint", "false")
22112 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/fhir/{+type}")
22113 urls += "?" + c.urlParams_.Encode()
22114 req, err := http.NewRequest("DELETE", urls, nil)
22115 if err != nil {
22116 return nil, err
22117 }
22118 req.Header = reqHeaders
22119 googleapi.Expand(req.URL, map[string]string{
22120 "parent": c.parent,
22121 "type": c.type_,
22122 })
22123 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.conditionalDelete", "request", internallog.HTTPRequest(req, nil))
22124 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22125 }
22126
22127 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.conditionalDelete" call.
22128 // Any non-2xx status code is an error. Response headers are in either
22129 // *Empty.ServerResponse.Header or (if a response was returned at all) in
22130 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
22131 // whether the returned error was because http.StatusNotModified was returned.
22132 func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
22133 gensupport.SetOptions(c.urlParams_, opts...)
22134 res, err := c.doRequest("json")
22135 if res != nil && res.StatusCode == http.StatusNotModified {
22136 if res.Body != nil {
22137 res.Body.Close()
22138 }
22139 return nil, gensupport.WrapError(&googleapi.Error{
22140 Code: res.StatusCode,
22141 Header: res.Header,
22142 })
22143 }
22144 if err != nil {
22145 return nil, err
22146 }
22147 defer googleapi.CloseBody(res)
22148 if err := googleapi.CheckResponse(res); err != nil {
22149 return nil, gensupport.WrapError(err)
22150 }
22151 ret := &Empty{
22152 ServerResponse: googleapi.ServerResponse{
22153 Header: res.Header,
22154 HTTPStatusCode: res.StatusCode,
22155 },
22156 }
22157 target := &ret
22158 b, err := gensupport.DecodeResponseBytes(target, res)
22159 if err != nil {
22160 return nil, err
22161 }
22162 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.conditionalDelete", "response", internallog.HTTPResponse(res, b))
22163 return ret, nil
22164 }
22165
22166 type ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchCall struct {
22167 s *Service
22168 parent string
22169 type_ string
22170 body_ io.Reader
22171 urlParams_ gensupport.URLParams
22172 ctx_ context.Context
22173 header_ http.Header
22174 }
22175
22176 // ConditionalPatch: If a resource is found based on the search criteria
22177 // specified in the query parameters, updates part of that resource by applying
22178 // the operations specified in a JSON Patch (http://jsonpatch.com/) document.
22179 // Implements the FHIR standard conditional patch interaction (STU3
22180 // (https://hl7.org/fhir/STU3/http.html#patch), R4
22181 // (https://hl7.org/fhir/R4/http.html#patch), R5
22182 // (https://hl7.org/fhir/R5/http.html#patch)). DSTU2 doesn't define a
22183 // conditional patch method, but the server supports it in the same way it
22184 // supports STU3. Search terms are provided as query parameters following the
22185 // same pattern as the search method. If the search criteria identify more than
22186 // one match, the request returns a `412 Precondition Failed` error. If the
22187 // search criteria doesn't identify any matches, the request returns a `404 Not
22188 // Found` error. The request body must contain a JSON Patch document, and the
22189 // request headers must contain `Content-Type: application/json-patch+json`. On
22190 // success, the response body contains a JSON-encoded representation of the
22191 // updated resource, including the server-assigned version ID. Errors generated
22192 // by the FHIR store contain a JSON-encoded `OperationOutcome` resource
22193 // describing the reason for the error. If the request cannot be mapped to a
22194 // valid API method on a FHIR store, a generic GCP error might be returned
22195 // instead. This method requires the`healthcare.fhirStores.searchResources`
22196 // permission on the parent FHIR store and the `healthcare.fhirResources.patch`
22197 // permission on the requested FHIR store resource. For samples that show how
22198 // to call `conditionalPatch`, see Conditionally patching a FHIR resource
22199 // (https://cloud.google.com/healthcare/docs/how-tos/fhir-resources#conditionally_patching_a_fhir_resource).
22200 //
22201 // - parent: The name of the FHIR store this resource belongs to.
22202 // - type: The FHIR resource type to update, such as Patient or Observation.
22203 // For a complete list, see the FHIR Resource Index (DSTU2
22204 // (https://hl7.org/fhir/DSTU2/resourcelist.html), STU3
22205 // (https://hl7.org/fhir/STU3/resourcelist.html), R4
22206 // (https://hl7.org/fhir/R4/resourcelist.html), R5
22207 // (https://hl7.org/fhir/R5/resourcelist.html)).
22208 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) ConditionalPatch(parent string, type_ string, body_ io.Reader) *ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchCall {
22209 c := &ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22210 c.parent = parent
22211 c.type_ = type_
22212 c.body_ = body_
22213 return c
22214 }
22215
22216 // Fields allows partial responses to be retrieved. See
22217 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
22218 // details.
22219 func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchCall {
22220 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22221 return c
22222 }
22223
22224 // Context sets the context to be used in this call's Do method.
22225 func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchCall {
22226 c.ctx_ = ctx
22227 return c
22228 }
22229
22230 // Header returns a http.Header that can be modified by the caller to add
22231 // headers to the request.
22232 func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchCall) Header() http.Header {
22233 if c.header_ == nil {
22234 c.header_ = make(http.Header)
22235 }
22236 return c.header_
22237 }
22238
22239 func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchCall) doRequest(alt string) (*http.Response, error) {
22240 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
22241 body := bytes.NewBuffer(nil)
22242 _, err := body.ReadFrom(c.body_)
22243 if err != nil {
22244 return nil, err
22245 }
22246 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/fhir/{+type}")
22247 urls += "?" + c.urlParams_.Encode()
22248 req, err := http.NewRequest("PATCH", urls, body)
22249 if err != nil {
22250 return nil, err
22251 }
22252 req.Header = reqHeaders
22253 googleapi.Expand(req.URL, map[string]string{
22254 "parent": c.parent,
22255 "type": c.type_,
22256 })
22257 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.conditionalPatch", "request", internallog.HTTPRequest(req, body.Bytes()))
22258 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22259 }
22260
22261 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.conditionalPatch" call.
22262 func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
22263 gensupport.SetOptions(c.urlParams_, opts...)
22264 return c.doRequest("")
22265 }
22266
22267 type ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateCall struct {
22268 s *Service
22269 parent string
22270 type_ string
22271 body_ io.Reader
22272 urlParams_ gensupport.URLParams
22273 ctx_ context.Context
22274 header_ http.Header
22275 }
22276
22277 // ConditionalUpdate: If a resource is found based on the search criteria
22278 // specified in the query parameters, updates the entire contents of that
22279 // resource. Implements the FHIR standard conditional update interaction (DSTU2
22280 // (https://hl7.org/fhir/DSTU2/http.html#2.1.0.10.2), STU3
22281 // (https://hl7.org/fhir/STU3/http.html#cond-update), R4
22282 // (https://hl7.org/fhir/R4/http.html#cond-update), R5
22283 // (https://hl7.org/fhir/R5/http.html#cond-update)). Search terms are provided
22284 // as query parameters following the same pattern as the search method. If the
22285 // search criteria identify more than one match, the request returns a `412
22286 // Precondition Failed` error. If the search criteria identify zero matches,
22287 // and the supplied resource body contains an `id`, and the FHIR store has
22288 // enable_update_create set, creates the resource with the client-specified ID.
22289 // It is strongly advised not to include or encode any sensitive data such as
22290 // patient identifiers in client-specified resource IDs. Those IDs are part of
22291 // the FHIR resource path recorded in Cloud Audit Logs and Pub/Sub
22292 // notifications. Those IDs can also be contained in reference fields within
22293 // other resources. If the search criteria identify zero matches, and the
22294 // supplied resource body does not contain an `id`, the resource is created
22295 // with a server-assigned ID as per the create method. The request body must
22296 // contain a JSON-encoded FHIR resource, and the request headers must contain
22297 // `Content-Type: application/fhir+json`. On success, the response body
22298 // contains a JSON-encoded representation of the updated resource, including
22299 // the server-assigned version ID. Errors generated by the FHIR store contain a
22300 // JSON-encoded `OperationOutcome` resource describing the reason for the
22301 // error. If the request cannot be mapped to a valid API method on a FHIR
22302 // store, a generic GCP error might be returned instead. This method requires
22303 // the`healthcare.fhirStores.searchResources` and
22304 // `healthcare.fhirResources.update` permissions on the parent FHIR store. For
22305 // samples that show how to call `conditionalUpdate`, see Conditionally
22306 // updating a FHIR resource
22307 // (https://cloud.google.com/healthcare/docs/how-tos/fhir-resources#conditionally_updating_a_fhir_resource).
22308 //
22309 // - parent: The name of the FHIR store this resource belongs to.
22310 // - type: The FHIR resource type to update, such as Patient or Observation.
22311 // For a complete list, see the FHIR Resource Index (DSTU2
22312 // (https://hl7.org/fhir/DSTU2/resourcelist.html), STU3
22313 // (https://hl7.org/fhir/STU3/resourcelist.html), R4
22314 // (https://hl7.org/fhir/R4/resourcelist.html), R5
22315 // (https://hl7.org/fhir/R5/resourcelist.html)). Must match the resource type
22316 // in the provided content.
22317 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) ConditionalUpdate(parent string, type_ string, body_ io.Reader) *ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateCall {
22318 c := &ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22319 c.parent = parent
22320 c.type_ = type_
22321 c.body_ = body_
22322 return c
22323 }
22324
22325 // Fields allows partial responses to be retrieved. See
22326 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
22327 // details.
22328 func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateCall {
22329 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22330 return c
22331 }
22332
22333 // Context sets the context to be used in this call's Do method.
22334 func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateCall {
22335 c.ctx_ = ctx
22336 return c
22337 }
22338
22339 // Header returns a http.Header that can be modified by the caller to add
22340 // headers to the request.
22341 func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateCall) Header() http.Header {
22342 if c.header_ == nil {
22343 c.header_ = make(http.Header)
22344 }
22345 return c.header_
22346 }
22347
22348 func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateCall) doRequest(alt string) (*http.Response, error) {
22349 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
22350 body := bytes.NewBuffer(nil)
22351 _, err := body.ReadFrom(c.body_)
22352 if err != nil {
22353 return nil, err
22354 }
22355 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/fhir/{+type}")
22356 urls += "?" + c.urlParams_.Encode()
22357 req, err := http.NewRequest("PUT", urls, body)
22358 if err != nil {
22359 return nil, err
22360 }
22361 req.Header = reqHeaders
22362 googleapi.Expand(req.URL, map[string]string{
22363 "parent": c.parent,
22364 "type": c.type_,
22365 })
22366 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.conditionalUpdate", "request", internallog.HTTPRequest(req, body.Bytes()))
22367 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22368 }
22369
22370 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.conditionalUpdate" call.
22371 func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
22372 gensupport.SetOptions(c.urlParams_, opts...)
22373 return c.doRequest("")
22374 }
22375
22376 type ProjectsLocationsDatasetsFhirStoresFhirCreateCall struct {
22377 s *Service
22378 parent string
22379 type_ string
22380 body_ io.Reader
22381 urlParams_ gensupport.URLParams
22382 ctx_ context.Context
22383 header_ http.Header
22384 }
22385
22386 // Create: Creates a FHIR resource. Implements the FHIR standard create
22387 // interaction (DSTU2 (https://hl7.org/fhir/DSTU2/http.html#create), STU3
22388 // (https://hl7.org/fhir/STU3/http.html#create), R4
22389 // (https://hl7.org/fhir/R4/http.html#create)), R5
22390 // (https://hl7.org/fhir/R5/http.html#create)), which creates a new resource
22391 // with a server-assigned resource ID. Also supports the FHIR standard
22392 // conditional create interaction (DSTU2
22393 // (https://hl7.org/fhir/DSTU2/http.html#ccreate), STU3
22394 // (https://hl7.org/fhir/STU3/http.html#ccreate), R4
22395 // (https://hl7.org/fhir/R4/http.html#ccreate)), R5
22396 // (https://hl7.org/fhir/R5/http.html#ccreate)), specified by supplying an
22397 // `If-None-Exist` header containing a FHIR search query. If no resources match
22398 // this search query, the server processes the create operation as normal. The
22399 // request body must contain a JSON-encoded FHIR resource, and the request
22400 // headers must contain `Content-Type: application/fhir+json`. On success, the
22401 // response body contains a JSON-encoded representation of the resource as it
22402 // was created on the server, including the server-assigned resource ID and
22403 // version ID. Errors generated by the FHIR store contain a JSON-encoded
22404 // `OperationOutcome` resource describing the reason for the error. If the
22405 // request cannot be mapped to a valid API method on a FHIR store, a generic
22406 // GCP error might be returned instead. For samples that show how to call
22407 // `create`, see Creating a FHIR resource
22408 // (https://cloud.google.com/healthcare/docs/how-tos/fhir-resources#creating_a_fhir_resource).
22409 //
22410 // - parent: The name of the FHIR store this resource belongs to.
22411 // - type: The FHIR resource type to create, such as Patient or Observation.
22412 // For a complete list, see the FHIR Resource Index (DSTU2
22413 // (https://hl7.org/fhir/DSTU2/resourcelist.html), STU3
22414 // (https://hl7.org/fhir/STU3/resourcelist.html), R4
22415 // (https://hl7.org/fhir/R4/resourcelist.html), R5
22416 // (https://hl7.org/fhir/R5/resourcelist.html)). Must match the resource type
22417 // in the provided content.
22418 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Create(parent string, type_ string, body_ io.Reader) *ProjectsLocationsDatasetsFhirStoresFhirCreateCall {
22419 c := &ProjectsLocationsDatasetsFhirStoresFhirCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22420 c.parent = parent
22421 c.type_ = type_
22422 c.body_ = body_
22423 return c
22424 }
22425
22426 // Fields allows partial responses to be retrieved. See
22427 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
22428 // details.
22429 func (c *ProjectsLocationsDatasetsFhirStoresFhirCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirCreateCall {
22430 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22431 return c
22432 }
22433
22434 // Context sets the context to be used in this call's Do method.
22435 func (c *ProjectsLocationsDatasetsFhirStoresFhirCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirCreateCall {
22436 c.ctx_ = ctx
22437 return c
22438 }
22439
22440 // Header returns a http.Header that can be modified by the caller to add
22441 // headers to the request.
22442 func (c *ProjectsLocationsDatasetsFhirStoresFhirCreateCall) Header() http.Header {
22443 if c.header_ == nil {
22444 c.header_ = make(http.Header)
22445 }
22446 return c.header_
22447 }
22448
22449 func (c *ProjectsLocationsDatasetsFhirStoresFhirCreateCall) doRequest(alt string) (*http.Response, error) {
22450 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
22451 body := bytes.NewBuffer(nil)
22452 _, err := body.ReadFrom(c.body_)
22453 if err != nil {
22454 return nil, err
22455 }
22456 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/fhir/{+type}")
22457 urls += "?" + c.urlParams_.Encode()
22458 req, err := http.NewRequest("POST", urls, body)
22459 if err != nil {
22460 return nil, err
22461 }
22462 req.Header = reqHeaders
22463 googleapi.Expand(req.URL, map[string]string{
22464 "parent": c.parent,
22465 "type": c.type_,
22466 })
22467 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.create", "request", internallog.HTTPRequest(req, body.Bytes()))
22468 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22469 }
22470
22471 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.create" call.
22472 func (c *ProjectsLocationsDatasetsFhirStoresFhirCreateCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
22473 gensupport.SetOptions(c.urlParams_, opts...)
22474 return c.doRequest("")
22475 }
22476
22477 type ProjectsLocationsDatasetsFhirStoresFhirDeleteCall struct {
22478 s *Service
22479 name string
22480 urlParams_ gensupport.URLParams
22481 ctx_ context.Context
22482 header_ http.Header
22483 }
22484
22485 // Delete: Deletes a FHIR resource. Implements the FHIR standard delete
22486 // interaction (DSTU2 (https://hl7.org/fhir/DSTU2/http.html#delete), STU3
22487 // (https://hl7.org/fhir/STU3/http.html#delete), R4
22488 // (https://hl7.org/fhir/R4/http.html#delete), R5
22489 // (https://hl7.org/fhir/R5/http.html#delete)). Note: Unless resource
22490 // versioning is disabled by setting the disable_resource_versioning flag on
22491 // the FHIR store, the deleted resources are moved to a history repository that
22492 // can still be retrieved through vread and related methods, unless they are
22493 // removed by the purge method. For samples that show how to call `delete`, see
22494 // Deleting a FHIR resource
22495 // (https://cloud.google.com/healthcare/docs/how-tos/fhir-resources#deleting_a_fhir_resource).
22496 //
22497 // - name: The name of the resource to delete.
22498 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Delete(name string) *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall {
22499 c := &ProjectsLocationsDatasetsFhirStoresFhirDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22500 c.name = name
22501 return c
22502 }
22503
22504 // Fields allows partial responses to be retrieved. See
22505 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
22506 // details.
22507 func (c *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall {
22508 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22509 return c
22510 }
22511
22512 // Context sets the context to be used in this call's Do method.
22513 func (c *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall {
22514 c.ctx_ = ctx
22515 return c
22516 }
22517
22518 // Header returns a http.Header that can be modified by the caller to add
22519 // headers to the request.
22520 func (c *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall) Header() http.Header {
22521 if c.header_ == nil {
22522 c.header_ = make(http.Header)
22523 }
22524 return c.header_
22525 }
22526
22527 func (c *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall) doRequest(alt string) (*http.Response, error) {
22528 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
22529 c.urlParams_.Set("alt", alt)
22530 c.urlParams_.Set("prettyPrint", "false")
22531 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
22532 urls += "?" + c.urlParams_.Encode()
22533 req, err := http.NewRequest("DELETE", urls, nil)
22534 if err != nil {
22535 return nil, err
22536 }
22537 req.Header = reqHeaders
22538 googleapi.Expand(req.URL, map[string]string{
22539 "name": c.name,
22540 })
22541 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.delete", "request", internallog.HTTPRequest(req, nil))
22542 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22543 }
22544
22545 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.delete" call.
22546 func (c *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
22547 gensupport.SetOptions(c.urlParams_, opts...)
22548 return c.doRequest("")
22549 }
22550
22551 type ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall struct {
22552 s *Service
22553 parent string
22554 body_ io.Reader
22555 urlParams_ gensupport.URLParams
22556 ctx_ context.Context
22557 header_ http.Header
22558 }
22559
22560 // ExecuteBundle: Executes all the requests in the given Bundle. Implements the
22561 // FHIR standard batch/transaction interaction and history operations. (DSTU2
22562 // (https://hl7.org/fhir/DSTU2/http.html#transaction), STU3
22563 // (https://hl7.org/fhir/STU3/http.html#transaction), R4
22564 // (https://hl7.org/fhir/R4/http.html#transaction), R5
22565 // (https://hl7.org/fhir/R5/http.html#transaction)). Supports all interactions
22566 // within a bundle, except search. This method accepts Bundles of type `batch`,
22567 // `transaction` and `history`, processing `batch` and `transaction` bundles
22568 // according to the batch processing rules (DSTU2
22569 // (https://hl7.org/fhir/DSTU2/http.html#2.1.0.16.1), STU3
22570 // (https://hl7.org/fhir/STU3/http.html#2.21.0.17.1), R4
22571 // (https://hl7.org/fhir/R4/http.html#brules), R5
22572 // (https://hl7.org/fhir/R5/http.html#brules)) and transaction processing rules
22573 // (DSTU2 (https://hl7.org/fhir/DSTU2/http.html#2.1.0.16.2), STU3
22574 // (https://hl7.org/fhir/STU3/http.html#2.21.0.17.2), R4
22575 // (https://hl7.org/fhir/R4/http.html#trules), R5
22576 // (https://hl7.org/fhir/R5/http.html#trules)). The request body must contain a
22577 // JSON-encoded FHIR `Bundle` resource, and the request headers must contain
22578 // `Content-Type: application/fhir+json`. For a batch bundle or a successful
22579 // transaction, the response body contains a JSON-encoded representation of a
22580 // `Bundle` resource of type `batch-response` or `transaction-response`
22581 // containing one entry for each entry in the request, with the outcome of
22582 // processing the entry. In the case of an error for a `transaction` or
22583 // `history` bundle, the response body contains a JSON-encoded
22584 // `OperationOutcome` resource describing the reason for the error. If the
22585 // request cannot be mapped to a valid API method on a FHIR store, a generic
22586 // GCP error might be returned instead. This method checks permissions for each
22587 // request in the bundle. The `executeBundle` permission is required to call
22588 // this method, but you must also grant sufficient permissions to execute the
22589 // individual requests in the bundle. For example, if the bundle contains a
22590 // request to create a FHIR resource, the caller must also have been granted
22591 // the `healthcare.fhirResources.create` permission. `history` bundles also
22592 // check the `import` permission. You can use audit logs to view the
22593 // permissions for `executeBundle` and each request in the bundle. For more
22594 // information, see Viewing Cloud Audit logs
22595 // (https://cloud.google.com/healthcare-api/docs/how-tos/audit-logging). For
22596 // samples that show how to call `executeBundle`, see Managing FHIR resources
22597 // using FHIR bundles
22598 // (https://cloud.google.com/healthcare/docs/how-tos/fhir-bundles).
22599 //
22600 // - parent: Name of the FHIR store in which this bundle will be executed.
22601 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) ExecuteBundle(parent string, body_ io.Reader) *ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall {
22602 c := &ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22603 c.parent = parent
22604 c.body_ = body_
22605 return c
22606 }
22607
22608 // Fields allows partial responses to be retrieved. See
22609 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
22610 // details.
22611 func (c *ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall {
22612 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22613 return c
22614 }
22615
22616 // Context sets the context to be used in this call's Do method.
22617 func (c *ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall {
22618 c.ctx_ = ctx
22619 return c
22620 }
22621
22622 // Header returns a http.Header that can be modified by the caller to add
22623 // headers to the request.
22624 func (c *ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall) Header() http.Header {
22625 if c.header_ == nil {
22626 c.header_ = make(http.Header)
22627 }
22628 return c.header_
22629 }
22630
22631 func (c *ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall) doRequest(alt string) (*http.Response, error) {
22632 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
22633 body := bytes.NewBuffer(nil)
22634 _, err := body.ReadFrom(c.body_)
22635 if err != nil {
22636 return nil, err
22637 }
22638 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/fhir")
22639 urls += "?" + c.urlParams_.Encode()
22640 req, err := http.NewRequest("POST", urls, body)
22641 if err != nil {
22642 return nil, err
22643 }
22644 req.Header = reqHeaders
22645 googleapi.Expand(req.URL, map[string]string{
22646 "parent": c.parent,
22647 })
22648 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.executeBundle", "request", internallog.HTTPRequest(req, body.Bytes()))
22649 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22650 }
22651
22652 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.executeBundle" call.
22653 func (c *ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
22654 gensupport.SetOptions(c.urlParams_, opts...)
22655 return c.doRequest("")
22656 }
22657
22658 type ProjectsLocationsDatasetsFhirStoresFhirHistoryCall struct {
22659 s *Service
22660 name string
22661 urlParams_ gensupport.URLParams
22662 ifNoneMatch_ string
22663 ctx_ context.Context
22664 header_ http.Header
22665 }
22666
22667 // History: Lists all the versions of a resource (including the current version
22668 // and deleted versions) from the FHIR store. Implements the per-resource form
22669 // of the FHIR standard history interaction (DSTU2
22670 // (https://hl7.org/fhir/DSTU2/http.html#history), STU3
22671 // (https://hl7.org/fhir/STU3/http.html#history), R4
22672 // (https://hl7.org/fhir/R4/http.html#history), R5
22673 // (https://hl7.org/fhir/R5/http.html#history)). On success, the response body
22674 // contains a JSON-encoded representation of a `Bundle` resource of type
22675 // `history`, containing the version history sorted from most recent to oldest
22676 // versions. Errors generated by the FHIR store contain a JSON-encoded
22677 // `OperationOutcome` resource describing the reason for the error. If the
22678 // request cannot be mapped to a valid API method on a FHIR store, a generic
22679 // GCP error might be returned instead. For samples that show how to call
22680 // `history`, see Listing FHIR resource versions
22681 // (https://cloud.google.com/healthcare/docs/how-tos/fhir-resources#listing_fhir_resource_versions).
22682 //
22683 // - name: The name of the resource to retrieve.
22684 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) History(name string) *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall {
22685 c := &ProjectsLocationsDatasetsFhirStoresFhirHistoryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22686 c.name = name
22687 return c
22688 }
22689
22690 // At sets the optional parameter "_at": Only include resource versions that
22691 // were current at some point during the time period specified in the date time
22692 // value. The date parameter format is yyyy-mm-ddThh:mm:ss[Z|(+|-)hh:mm]
22693 // Clients may specify any of the following: * An entire year: `_at=2019` * An
22694 // entire month: `_at=2019-01` * A specific day: `_at=2019-01-20` * A specific
22695 // second: `_at=2018-12-31T23:59:58Z`
22696 func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) At(At string) *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall {
22697 c.urlParams_.Set("_at", At)
22698 return c
22699 }
22700
22701 // Count sets the optional parameter "_count": The maximum number of search
22702 // results on a page. If not specified, 100 is used. May not be larger than
22703 // 1000.
22704 func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) Count(Count int64) *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall {
22705 c.urlParams_.Set("_count", fmt.Sprint(Count))
22706 return c
22707 }
22708
22709 // PageToken sets the optional parameter "_page_token": Used to retrieve the
22710 // first, previous, next, or last page of resource versions when using
22711 // pagination. Value should be set to the value of `_page_token` set in next or
22712 // previous page links' URLs. Next and previous page are returned in the
22713 // response bundle's links field, where `link.relation` is "previous" or
22714 // "next". Omit `_page_token` if no previous request has been made.
22715 func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) PageToken(PageToken string) *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall {
22716 c.urlParams_.Set("_page_token", PageToken)
22717 return c
22718 }
22719
22720 // Since sets the optional parameter "_since": Only include resource versions
22721 // that were created at or after the given instant in time. The instant in time
22722 // uses the format YYYY-MM-DDThh:mm:ss.sss+zz:zz (for example
22723 // 2015-02-07T13:28:17.239+02:00 or 2017-01-01T00:00:00Z). The time must be
22724 // specified to the second and include a time zone.
22725 func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) Since(Since string) *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall {
22726 c.urlParams_.Set("_since", Since)
22727 return c
22728 }
22729
22730 // Fields allows partial responses to be retrieved. See
22731 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
22732 // details.
22733 func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall {
22734 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22735 return c
22736 }
22737
22738 // IfNoneMatch sets an optional parameter which makes the operation fail if the
22739 // object's ETag matches the given value. This is useful for getting updates
22740 // only after the object has changed since the last request.
22741 func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall {
22742 c.ifNoneMatch_ = entityTag
22743 return c
22744 }
22745
22746 // Context sets the context to be used in this call's Do method.
22747 func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall {
22748 c.ctx_ = ctx
22749 return c
22750 }
22751
22752 // Header returns a http.Header that can be modified by the caller to add
22753 // headers to the request.
22754 func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) Header() http.Header {
22755 if c.header_ == nil {
22756 c.header_ = make(http.Header)
22757 }
22758 return c.header_
22759 }
22760
22761 func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) doRequest(alt string) (*http.Response, error) {
22762 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
22763 if c.ifNoneMatch_ != "" {
22764 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22765 }
22766 c.urlParams_.Set("alt", alt)
22767 c.urlParams_.Set("prettyPrint", "false")
22768 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/_history")
22769 urls += "?" + c.urlParams_.Encode()
22770 req, err := http.NewRequest("GET", urls, nil)
22771 if err != nil {
22772 return nil, err
22773 }
22774 req.Header = reqHeaders
22775 googleapi.Expand(req.URL, map[string]string{
22776 "name": c.name,
22777 })
22778 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.history", "request", internallog.HTTPRequest(req, nil))
22779 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22780 }
22781
22782 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.history" call.
22783 func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
22784 gensupport.SetOptions(c.urlParams_, opts...)
22785 return c.doRequest("")
22786 }
22787
22788 type ProjectsLocationsDatasetsFhirStoresFhirPatchCall struct {
22789 s *Service
22790 name string
22791 body_ io.Reader
22792 urlParams_ gensupport.URLParams
22793 ctx_ context.Context
22794 header_ http.Header
22795 }
22796
22797 // Patch: Updates part of an existing resource by applying the operations
22798 // specified in a JSON Patch (http://jsonpatch.com/) document. Implements the
22799 // FHIR standard patch interaction (STU3
22800 // (https://hl7.org/fhir/STU3/http.html#patch), R4
22801 // (https://hl7.org/fhir/R4/http.html#patch), R5
22802 // (https://hl7.org/fhir/R5/http.html#patch)). DSTU2 doesn't define a patch
22803 // method, but the server supports it in the same way it supports STU3. The
22804 // request body must contain a JSON Patch document, and the request headers
22805 // must contain `Content-Type: application/json-patch+json`. On success, the
22806 // response body contains a JSON-encoded representation of the updated
22807 // resource, including the server-assigned version ID. Errors generated by the
22808 // FHIR store contain a JSON-encoded `OperationOutcome` resource describing the
22809 // reason for the error. If the request cannot be mapped to a valid API method
22810 // on a FHIR store, a generic GCP error might be returned instead. For samples
22811 // that show how to call `patch`, see Patching a FHIR resource
22812 // (https://cloud.google.com/healthcare/docs/how-tos/fhir-resources#patching_a_fhir_resource).
22813 //
22814 // - name: The name of the resource to update.
22815 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Patch(name string, body_ io.Reader) *ProjectsLocationsDatasetsFhirStoresFhirPatchCall {
22816 c := &ProjectsLocationsDatasetsFhirStoresFhirPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22817 c.name = name
22818 c.body_ = body_
22819 return c
22820 }
22821
22822 // Fields allows partial responses to be retrieved. See
22823 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
22824 // details.
22825 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirPatchCall {
22826 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22827 return c
22828 }
22829
22830 // Context sets the context to be used in this call's Do method.
22831 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirPatchCall {
22832 c.ctx_ = ctx
22833 return c
22834 }
22835
22836 // Header returns a http.Header that can be modified by the caller to add
22837 // headers to the request.
22838 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatchCall) Header() http.Header {
22839 if c.header_ == nil {
22840 c.header_ = make(http.Header)
22841 }
22842 return c.header_
22843 }
22844
22845 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatchCall) doRequest(alt string) (*http.Response, error) {
22846 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
22847 body := bytes.NewBuffer(nil)
22848 _, err := body.ReadFrom(c.body_)
22849 if err != nil {
22850 return nil, err
22851 }
22852 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
22853 urls += "?" + c.urlParams_.Encode()
22854 req, err := http.NewRequest("PATCH", urls, body)
22855 if err != nil {
22856 return nil, err
22857 }
22858 req.Header = reqHeaders
22859 googleapi.Expand(req.URL, map[string]string{
22860 "name": c.name,
22861 })
22862 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
22863 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22864 }
22865
22866 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.patch" call.
22867 func (c *ProjectsLocationsDatasetsFhirStoresFhirPatchCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
22868 gensupport.SetOptions(c.urlParams_, opts...)
22869 return c.doRequest("")
22870 }
22871
22872 type ProjectsLocationsDatasetsFhirStoresFhirReadCall struct {
22873 s *Service
22874 name string
22875 urlParams_ gensupport.URLParams
22876 ifNoneMatch_ string
22877 ctx_ context.Context
22878 header_ http.Header
22879 }
22880
22881 // Read: Gets the contents of a FHIR resource. Implements the FHIR standard
22882 // read interaction (DSTU2 (https://hl7.org/fhir/DSTU2/http.html#read), STU3
22883 // (https://hl7.org/fhir/STU3/http.html#read), R4
22884 // (https://hl7.org/fhir/R4/http.html#read)), R5
22885 // (https://hl7.org/fhir/R5/http.html#read)). Also supports the FHIR standard
22886 // conditional read interaction (DSTU2
22887 // (https://hl7.org/fhir/DSTU2/http.html#cread), STU3
22888 // (https://hl7.org/fhir/STU3/http.html#cread), R4
22889 // (https://hl7.org/fhir/R4/http.html#cread)), R5
22890 // (https://hl7.org/fhir/R5/http.html#cread)) specified by supplying an
22891 // `If-Modified-Since` header with a date/time value or an `If-None-Match`
22892 // header with an ETag value. On success, the response body contains a
22893 // JSON-encoded representation of the resource. Errors generated by the FHIR
22894 // store contain a JSON-encoded `OperationOutcome` resource describing the
22895 // reason for the error. If the request cannot be mapped to a valid API method
22896 // on a FHIR store, a generic GCP error might be returned instead. For samples
22897 // that show how to call `read`, see Getting a FHIR resource
22898 // (https://cloud.google.com/healthcare/docs/how-tos/fhir-resources#getting_a_fhir_resource).
22899 //
22900 // - name: The name of the resource to retrieve.
22901 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Read(name string) *ProjectsLocationsDatasetsFhirStoresFhirReadCall {
22902 c := &ProjectsLocationsDatasetsFhirStoresFhirReadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22903 c.name = name
22904 return c
22905 }
22906
22907 // Fields allows partial responses to be retrieved. See
22908 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
22909 // details.
22910 func (c *ProjectsLocationsDatasetsFhirStoresFhirReadCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirReadCall {
22911 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22912 return c
22913 }
22914
22915 // IfNoneMatch sets an optional parameter which makes the operation fail if the
22916 // object's ETag matches the given value. This is useful for getting updates
22917 // only after the object has changed since the last request.
22918 func (c *ProjectsLocationsDatasetsFhirStoresFhirReadCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirReadCall {
22919 c.ifNoneMatch_ = entityTag
22920 return c
22921 }
22922
22923 // Context sets the context to be used in this call's Do method.
22924 func (c *ProjectsLocationsDatasetsFhirStoresFhirReadCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirReadCall {
22925 c.ctx_ = ctx
22926 return c
22927 }
22928
22929 // Header returns a http.Header that can be modified by the caller to add
22930 // headers to the request.
22931 func (c *ProjectsLocationsDatasetsFhirStoresFhirReadCall) Header() http.Header {
22932 if c.header_ == nil {
22933 c.header_ = make(http.Header)
22934 }
22935 return c.header_
22936 }
22937
22938 func (c *ProjectsLocationsDatasetsFhirStoresFhirReadCall) doRequest(alt string) (*http.Response, error) {
22939 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
22940 if c.ifNoneMatch_ != "" {
22941 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22942 }
22943 c.urlParams_.Set("alt", alt)
22944 c.urlParams_.Set("prettyPrint", "false")
22945 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
22946 urls += "?" + c.urlParams_.Encode()
22947 req, err := http.NewRequest("GET", urls, nil)
22948 if err != nil {
22949 return nil, err
22950 }
22951 req.Header = reqHeaders
22952 googleapi.Expand(req.URL, map[string]string{
22953 "name": c.name,
22954 })
22955 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.read", "request", internallog.HTTPRequest(req, nil))
22956 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22957 }
22958
22959 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.read" call.
22960 func (c *ProjectsLocationsDatasetsFhirStoresFhirReadCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
22961 gensupport.SetOptions(c.urlParams_, opts...)
22962 return c.doRequest("")
22963 }
22964
22965 type ProjectsLocationsDatasetsFhirStoresFhirSearchCall struct {
22966 s *Service
22967 parent string
22968 body_ io.Reader
22969 urlParams_ gensupport.URLParams
22970 ctx_ context.Context
22971 header_ http.Header
22972 }
22973
22974 // Search: Searches for resources in the given FHIR store according to criteria
22975 // specified as query parameters. Implements the FHIR standard search
22976 // interaction (DSTU2 (https://hl7.org/fhir/DSTU2/http.html#search), STU3
22977 // (https://hl7.org/fhir/STU3/http.html#search), R4
22978 // (https://hl7.org/fhir/R4/http.html#search), R5
22979 // (https://hl7.org/fhir/R5/http.html#search)) using the search semantics
22980 // described in the FHIR Search specification (DSTU2
22981 // (https://hl7.org/fhir/DSTU2/search.html), STU3
22982 // (https://hl7.org/fhir/STU3/search.html), R4
22983 // (https://hl7.org/fhir/R4/search.html), R5
22984 // (https://hl7.org/fhir/R5/search.html)). Supports four methods of search
22985 // defined by the specification: * `GET [base]?[parameters]` to search across
22986 // all resources. * `GET [base]/[type]?[parameters]` to search resources of a
22987 // specified type. * `POST [base]/_search?[parameters]` as an alternate form
22988 // having the same semantics as the `GET` method across all resources. * `POST
22989 // [base]/[type]/_search?[parameters]` as an alternate form having the same
22990 // semantics as the `GET` method for the specified type. The `GET` and `POST`
22991 // methods do not support compartment searches. The `POST` method does not
22992 // support `application/x-www-form-urlencoded` search parameters. On success,
22993 // the response body contains a JSON-encoded representation of a `Bundle`
22994 // resource of type `searchset`, containing the results of the search. Errors
22995 // generated by the FHIR store contain a JSON-encoded `OperationOutcome`
22996 // resource describing the reason for the error. If the request cannot be
22997 // mapped to a valid API method on a FHIR store, a generic GCP error might be
22998 // returned instead. The server's capability statement, retrieved through
22999 // capabilities, indicates what search parameters are supported on each FHIR
23000 // resource. A list of all search parameters defined by the specification can
23001 // be found in the FHIR Search Parameter Registry (STU3
23002 // (https://hl7.org/fhir/STU3/searchparameter-registry.html), R4
23003 // (https://hl7.org/fhir/R4/searchparameter-registry.html), R5
23004 // (https://hl7.org/fhir/R5/searchparameter-registry.html)). FHIR search
23005 // parameters for DSTU2 can be found on each resource's definition page.
23006 // Supported search modifiers: `:missing`, `:exact`, `:contains`, `:text`,
23007 // `:in`, `:not-in`, `:above`, `:below`, `:[type]`, `:not`, and `recurse`
23008 // (DSTU2 and STU3) or `:iterate` (R4 and R5). Supported search result
23009 // parameters: `_sort`, `_count`, `_include`, `_revinclude`, `_summary=text`,
23010 // `_summary=data`, and `_elements`. The maximum number of search results
23011 // returned defaults to 100, which can be overridden by the `_count` parameter
23012 // up to a maximum limit of 1000. The server might return fewer resources than
23013 // requested to prevent excessively large responses. If there are additional
23014 // results, the returned `Bundle` contains a link of `relation` "next", which
23015 // has a `_page_token` parameter for an opaque pagination token that can be
23016 // used to retrieve the next page. Resources with a total size larger than 5MB
23017 // or a field count larger than 50,000 might not be fully searchable as the
23018 // server might trim its generated search index in those cases. Note: FHIR
23019 // resources are indexed asynchronously, so there might be a slight delay
23020 // between the time a resource is created or changed, and the time when the
23021 // change reflects in search results. The only exception is resource identifier
23022 // data, which is indexed synchronously as a special index. As a result,
23023 // searching using resource identifier is not subject to indexing delay. To use
23024 // the special synchronous index, the search term for identifier should be in
23025 // the pattern `identifier=[system]|[value]` or `identifier=[value]`, and any
23026 // of the following search result parameters can be used: * `_count` *
23027 // `_include` * `_revinclude` * `_summary` * `_elements` If your query contains
23028 // any other search parameters, the standard asynchronous index will be used
23029 // instead. Note that searching against the special index is optimized for
23030 // resolving a small number of matches. The search isn't optimized if your
23031 // identifier search criteria matches a large number (i.e. more than 2,000) of
23032 // resources. For a search query that will match a large number of resources,
23033 // you can avoiding using the special synchronous index by including an
23034 // additional `_sort` parameter in your query. Use `_sort=-_lastUpdated` if you
23035 // want to keep the default sorting order. For samples and detailed
23036 // information, see Searching for FHIR resources
23037 // (https://cloud.google.com/healthcare/docs/how-tos/fhir-search) and Advanced
23038 // FHIR search features
23039 // (https://cloud.google.com/healthcare/docs/how-tos/fhir-advanced-search).
23040 //
23041 // - parent: Name of the FHIR store to retrieve resources from.
23042 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Search(parent string, body_ io.Reader) *ProjectsLocationsDatasetsFhirStoresFhirSearchCall {
23043 c := &ProjectsLocationsDatasetsFhirStoresFhirSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23044 c.parent = parent
23045 c.body_ = body_
23046 return c
23047 }
23048
23049 // ResourceType sets the optional parameter "resourceType": The FHIR resource
23050 // type to search, such as Patient or Observation. For a complete list, see the
23051 // FHIR Resource Index (DSTU2 (https://hl7.org/fhir/DSTU2/resourcelist.html),
23052 // STU3 (https://hl7.org/fhir/STU3/resourcelist.html), R4
23053 // (https://hl7.org/fhir/R4/resourcelist.html), R5
23054 // (https://hl7.org/fhir/R5/resourcelist.html)).
23055 func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchCall) ResourceType(resourceType string) *ProjectsLocationsDatasetsFhirStoresFhirSearchCall {
23056 c.urlParams_.Set("resourceType", resourceType)
23057 return c
23058 }
23059
23060 // Fields allows partial responses to be retrieved. See
23061 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
23062 // details.
23063 func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirSearchCall {
23064 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23065 return c
23066 }
23067
23068 // Context sets the context to be used in this call's Do method.
23069 func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirSearchCall {
23070 c.ctx_ = ctx
23071 return c
23072 }
23073
23074 // Header returns a http.Header that can be modified by the caller to add
23075 // headers to the request.
23076 func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchCall) Header() http.Header {
23077 if c.header_ == nil {
23078 c.header_ = make(http.Header)
23079 }
23080 return c.header_
23081 }
23082
23083 func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchCall) doRequest(alt string) (*http.Response, error) {
23084 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
23085 body := bytes.NewBuffer(nil)
23086 _, err := body.ReadFrom(c.body_)
23087 if err != nil {
23088 return nil, err
23089 }
23090 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/fhir/_search")
23091 urls += "?" + c.urlParams_.Encode()
23092 req, err := http.NewRequest("POST", urls, body)
23093 if err != nil {
23094 return nil, err
23095 }
23096 req.Header = reqHeaders
23097 googleapi.Expand(req.URL, map[string]string{
23098 "parent": c.parent,
23099 })
23100 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.search", "request", internallog.HTTPRequest(req, body.Bytes()))
23101 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23102 }
23103
23104 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.search" call.
23105 func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
23106 gensupport.SetOptions(c.urlParams_, opts...)
23107 return c.doRequest("")
23108 }
23109
23110 type ProjectsLocationsDatasetsFhirStoresFhirSearchTypeCall struct {
23111 s *Service
23112 parent string
23113 resourceType string
23114 body_ io.Reader
23115 urlParams_ gensupport.URLParams
23116 ctx_ context.Context
23117 header_ http.Header
23118 }
23119
23120 // SearchType: Searches for resources in the given FHIR store according to
23121 // criteria specified as query parameters. Implements the FHIR standard search
23122 // interaction (DSTU2 (https://hl7.org/fhir/DSTU2/http.html#search), STU3
23123 // (https://hl7.org/fhir/STU3/http.html#search), R4
23124 // (https://hl7.org/fhir/R4/http.html#search), R5
23125 // (https://hl7.org/fhir/R5/http.html#search)) using the search semantics
23126 // described in the FHIR Search specification (DSTU2
23127 // (https://hl7.org/fhir/DSTU2/search.html), STU3
23128 // (https://hl7.org/fhir/STU3/search.html), R4
23129 // (https://hl7.org/fhir/R4/search.html), R5
23130 // (https://hl7.org/fhir/R5/search.html)). Supports four methods of search
23131 // defined by the specification: * `GET [base]?[parameters]` to search across
23132 // all resources. * `GET [base]/[type]?[parameters]` to search resources of a
23133 // specified type. * `POST [base]/_search?[parameters]` as an alternate form
23134 // having the same semantics as the `GET` method across all resources. * `POST
23135 // [base]/[type]/_search?[parameters]` as an alternate form having the same
23136 // semantics as the `GET` method for the specified type. The `GET` and `POST`
23137 // methods do not support compartment searches. The `POST` method does not
23138 // support `application/x-www-form-urlencoded` search parameters. On success,
23139 // the response body contains a JSON-encoded representation of a `Bundle`
23140 // resource of type `searchset`, containing the results of the search. Errors
23141 // generated by the FHIR store contain a JSON-encoded `OperationOutcome`
23142 // resource describing the reason for the error. If the request cannot be
23143 // mapped to a valid API method on a FHIR store, a generic GCP error might be
23144 // returned instead. The server's capability statement, retrieved through
23145 // capabilities, indicates what search parameters are supported on each FHIR
23146 // resource. A list of all search parameters defined by the specification can
23147 // be found in the FHIR Search Parameter Registry (STU3
23148 // (https://hl7.org/fhir/STU3/searchparameter-registry.html), R4
23149 // (https://hl7.org/fhir/R4/searchparameter-registry.html), R5
23150 // (https://hl7.org/fhir/R5/searchparameter-registry.html)). FHIR search
23151 // parameters for DSTU2 can be found on each resource's definition page.
23152 // Supported search modifiers: `:missing`, `:exact`, `:contains`, `:text`,
23153 // `:in`, `:not-in`, `:above`, `:below`, `:[type]`, `:not`, and `recurse`
23154 // (DSTU2 and STU3) or `:iterate` (R4 and R5). Supported search result
23155 // parameters: `_sort`, `_count`, `_include`, `_revinclude`, `_summary=text`,
23156 // `_summary=data`, and `_elements`. The maximum number of search results
23157 // returned defaults to 100, which can be overridden by the `_count` parameter
23158 // up to a maximum limit of 1000. The server might return fewer resources than
23159 // requested to prevent excessively large responses. If there are additional
23160 // results, the returned `Bundle` contains a link of `relation` "next", which
23161 // has a `_page_token` parameter for an opaque pagination token that can be
23162 // used to retrieve the next page. Resources with a total size larger than 5MB
23163 // or a field count larger than 50,000 might not be fully searchable as the
23164 // server might trim its generated search index in those cases. Note: FHIR
23165 // resources are indexed asynchronously, so there might be a slight delay
23166 // between the time a resource is created or changed, and the time when the
23167 // change reflects in search results. The only exception is resource identifier
23168 // data, which is indexed synchronously as a special index. As a result,
23169 // searching using resource identifier is not subject to indexing delay. To use
23170 // the special synchronous index, the search term for identifier should be in
23171 // the pattern `identifier=[system]|[value]` or `identifier=[value]`, and any
23172 // of the following search result parameters can be used: * `_count` *
23173 // `_include` * `_revinclude` * `_summary` * `_elements` If your query contains
23174 // any other search parameters, the standard asynchronous index will be used
23175 // instead. Note that searching against the special index is optimized for
23176 // resolving a small number of matches. The search isn't optimized if your
23177 // identifier search criteria matches a large number (i.e. more than 2,000) of
23178 // resources. For a search query that will match a large number of resources,
23179 // you can avoiding using the special synchronous index by including an
23180 // additional `_sort` parameter in your query. Use `_sort=-_lastUpdated` if you
23181 // want to keep the default sorting order. For samples and detailed
23182 // information, see Searching for FHIR resources
23183 // (https://cloud.google.com/healthcare/docs/how-tos/fhir-search) and Advanced
23184 // FHIR search features
23185 // (https://cloud.google.com/healthcare/docs/how-tos/fhir-advanced-search).
23186 //
23187 // - parent: Name of the FHIR store to retrieve resources from.
23188 // - resourceType: Optional. The FHIR resource type to search, such as Patient
23189 // or Observation. For a complete list, see the FHIR Resource Index (DSTU2
23190 // (https://hl7.org/fhir/DSTU2/resourcelist.html), STU3
23191 // (https://hl7.org/fhir/STU3/resourcelist.html), R4
23192 // (https://hl7.org/fhir/R4/resourcelist.html), R5
23193 // (https://hl7.org/fhir/R5/resourcelist.html)).
23194 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) SearchType(parent string, resourceType string, body_ io.Reader) *ProjectsLocationsDatasetsFhirStoresFhirSearchTypeCall {
23195 c := &ProjectsLocationsDatasetsFhirStoresFhirSearchTypeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23196 c.parent = parent
23197 c.resourceType = resourceType
23198 c.body_ = body_
23199 return c
23200 }
23201
23202 // Fields allows partial responses to be retrieved. See
23203 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
23204 // details.
23205 func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchTypeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirSearchTypeCall {
23206 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23207 return c
23208 }
23209
23210 // Context sets the context to be used in this call's Do method.
23211 func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchTypeCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirSearchTypeCall {
23212 c.ctx_ = ctx
23213 return c
23214 }
23215
23216 // Header returns a http.Header that can be modified by the caller to add
23217 // headers to the request.
23218 func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchTypeCall) Header() http.Header {
23219 if c.header_ == nil {
23220 c.header_ = make(http.Header)
23221 }
23222 return c.header_
23223 }
23224
23225 func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchTypeCall) doRequest(alt string) (*http.Response, error) {
23226 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
23227 body := bytes.NewBuffer(nil)
23228 _, err := body.ReadFrom(c.body_)
23229 if err != nil {
23230 return nil, err
23231 }
23232 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/fhir/{resourceType}/_search")
23233 urls += "?" + c.urlParams_.Encode()
23234 req, err := http.NewRequest("POST", urls, body)
23235 if err != nil {
23236 return nil, err
23237 }
23238 req.Header = reqHeaders
23239 googleapi.Expand(req.URL, map[string]string{
23240 "parent": c.parent,
23241 "resourceType": c.resourceType,
23242 })
23243 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()))
23244 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23245 }
23246
23247 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.search-type" call.
23248 func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchTypeCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
23249 gensupport.SetOptions(c.urlParams_, opts...)
23250 return c.doRequest("")
23251 }
23252
23253 type ProjectsLocationsDatasetsFhirStoresFhirUpdateCall struct {
23254 s *Service
23255 name string
23256 body_ io.Reader
23257 urlParams_ gensupport.URLParams
23258 ctx_ context.Context
23259 header_ http.Header
23260 }
23261
23262 // Update: Updates the entire contents of a resource. Implements the FHIR
23263 // standard update interaction (DSTU2
23264 // (https://hl7.org/fhir/DSTU2/http.html#update), STU3
23265 // (https://hl7.org/fhir/STU3/http.html#update), R4
23266 // (https://hl7.org/fhir/R4/http.html#update), R5
23267 // (https://hl7.org/fhir/R5/http.html#update)). If the specified resource does
23268 // not exist and the FHIR store has enable_update_create set, creates the
23269 // resource with the client-specified ID. It is strongly advised not to include
23270 // or encode any sensitive data such as patient identifiers in client-specified
23271 // resource IDs. Those IDs are part of the FHIR resource path recorded in Cloud
23272 // Audit Logs and Pub/Sub notifications. Those IDs can also be contained in
23273 // reference fields within other resources. The request body must contain a
23274 // JSON-encoded FHIR resource, and the request headers must contain
23275 // `Content-Type: application/fhir+json`. The resource must contain an `id`
23276 // element having an identical value to the ID in the REST path of the request.
23277 // On success, the response body contains a JSON-encoded representation of the
23278 // updated resource, including the server-assigned version ID. Errors generated
23279 // by the FHIR store contain a JSON-encoded `OperationOutcome` resource
23280 // describing the reason for the error. If the request cannot be mapped to a
23281 // valid API method on a FHIR store, a generic GCP error might be returned
23282 // instead. The conditional update interaction If-None-Match is supported,
23283 // including the wildcard behaviour, as defined by the R5 spec. This
23284 // functionality is supported in R4 and R5. For samples that show how to call
23285 // `update`, see Updating a FHIR resource
23286 // (https://cloud.google.com/healthcare/docs/how-tos/fhir-resources#updating_a_fhir_resource).
23287 //
23288 // - name: The name of the resource to update.
23289 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Update(name string, body_ io.Reader) *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall {
23290 c := &ProjectsLocationsDatasetsFhirStoresFhirUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23291 c.name = name
23292 c.body_ = body_
23293 return c
23294 }
23295
23296 // Fields allows partial responses to be retrieved. See
23297 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
23298 // details.
23299 func (c *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall {
23300 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23301 return c
23302 }
23303
23304 // Context sets the context to be used in this call's Do method.
23305 func (c *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall {
23306 c.ctx_ = ctx
23307 return c
23308 }
23309
23310 // Header returns a http.Header that can be modified by the caller to add
23311 // headers to the request.
23312 func (c *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall) Header() http.Header {
23313 if c.header_ == nil {
23314 c.header_ = make(http.Header)
23315 }
23316 return c.header_
23317 }
23318
23319 func (c *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall) doRequest(alt string) (*http.Response, error) {
23320 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
23321 body := bytes.NewBuffer(nil)
23322 _, err := body.ReadFrom(c.body_)
23323 if err != nil {
23324 return nil, err
23325 }
23326 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
23327 urls += "?" + c.urlParams_.Encode()
23328 req, err := http.NewRequest("PUT", urls, body)
23329 if err != nil {
23330 return nil, err
23331 }
23332 req.Header = reqHeaders
23333 googleapi.Expand(req.URL, map[string]string{
23334 "name": c.name,
23335 })
23336 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.update", "request", internallog.HTTPRequest(req, body.Bytes()))
23337 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23338 }
23339
23340 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.update" call.
23341 func (c *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
23342 gensupport.SetOptions(c.urlParams_, opts...)
23343 return c.doRequest("")
23344 }
23345
23346 type ProjectsLocationsDatasetsFhirStoresFhirVreadCall struct {
23347 s *Service
23348 name string
23349 urlParams_ gensupport.URLParams
23350 ifNoneMatch_ string
23351 ctx_ context.Context
23352 header_ http.Header
23353 }
23354
23355 // Vread: Gets the contents of a version (current or historical) of a FHIR
23356 // resource by version ID. Implements the FHIR standard vread interaction
23357 // (DSTU2 (https://hl7.org/fhir/DSTU2/http.html#vread), STU3
23358 // (https://hl7.org/fhir/STU3/http.html#vread), R4
23359 // (https://hl7.org/fhir/R4/http.html#vread), R5
23360 // (https://hl7.org/fhir/R5/http.html#vread)). On success, the response body
23361 // contains a JSON-encoded representation of the resource. Errors generated by
23362 // the FHIR store contain a JSON-encoded `OperationOutcome` resource describing
23363 // the reason for the error. If the request cannot be mapped to a valid API
23364 // method on a FHIR store, a generic GCP error might be returned instead. For
23365 // samples that show how to call `vread`, see Retrieving a FHIR resource
23366 // version
23367 // (https://cloud.google.com/healthcare/docs/how-tos/fhir-resources#retrieving_a_fhir_resource_version).
23368 //
23369 // - name: The name of the resource version to retrieve.
23370 func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Vread(name string) *ProjectsLocationsDatasetsFhirStoresFhirVreadCall {
23371 c := &ProjectsLocationsDatasetsFhirStoresFhirVreadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23372 c.name = name
23373 return c
23374 }
23375
23376 // Fields allows partial responses to be retrieved. See
23377 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
23378 // details.
23379 func (c *ProjectsLocationsDatasetsFhirStoresFhirVreadCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirVreadCall {
23380 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23381 return c
23382 }
23383
23384 // IfNoneMatch sets an optional parameter which makes the operation fail if the
23385 // object's ETag matches the given value. This is useful for getting updates
23386 // only after the object has changed since the last request.
23387 func (c *ProjectsLocationsDatasetsFhirStoresFhirVreadCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirVreadCall {
23388 c.ifNoneMatch_ = entityTag
23389 return c
23390 }
23391
23392 // Context sets the context to be used in this call's Do method.
23393 func (c *ProjectsLocationsDatasetsFhirStoresFhirVreadCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirVreadCall {
23394 c.ctx_ = ctx
23395 return c
23396 }
23397
23398 // Header returns a http.Header that can be modified by the caller to add
23399 // headers to the request.
23400 func (c *ProjectsLocationsDatasetsFhirStoresFhirVreadCall) Header() http.Header {
23401 if c.header_ == nil {
23402 c.header_ = make(http.Header)
23403 }
23404 return c.header_
23405 }
23406
23407 func (c *ProjectsLocationsDatasetsFhirStoresFhirVreadCall) doRequest(alt string) (*http.Response, error) {
23408 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
23409 if c.ifNoneMatch_ != "" {
23410 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23411 }
23412 c.urlParams_.Set("alt", alt)
23413 c.urlParams_.Set("prettyPrint", "false")
23414 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
23415 urls += "?" + c.urlParams_.Encode()
23416 req, err := http.NewRequest("GET", urls, nil)
23417 if err != nil {
23418 return nil, err
23419 }
23420 req.Header = reqHeaders
23421 googleapi.Expand(req.URL, map[string]string{
23422 "name": c.name,
23423 })
23424 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.fhirStores.fhir.vread", "request", internallog.HTTPRequest(req, nil))
23425 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23426 }
23427
23428 // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.vread" call.
23429 func (c *ProjectsLocationsDatasetsFhirStoresFhirVreadCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
23430 gensupport.SetOptions(c.urlParams_, opts...)
23431 return c.doRequest("")
23432 }
23433
23434 type ProjectsLocationsDatasetsFhirStoresOperationsDeleteFhirOperationCall struct {
23435 s *Service
23436 name string
23437 urlParams_ gensupport.URLParams
23438 ctx_ context.Context
23439 header_ http.Header
23440 }
23441
23442 // DeleteFhirOperation: Deletes operations as defined in the FHIR
23443 // specification. Implements the FHIR implementation guide bulk data delete
23444 // request
23445 // (https://build.fhir.org/ig/HL7/bulk-data/export.html#bulk-data-delete-request).
23446 // Returns success if the operation was successfully cancelled. If the
23447 // operation is complete, or has already been cancelled, returns an error
23448 // response.
23449 //
23450 // - name: Name of the operation to be deleted, in the format
23451 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirSt
23452 // ores/{fhir_store_id}/operations/{operation_id}`.
23453 func (r *ProjectsLocationsDatasetsFhirStoresOperationsService) DeleteFhirOperation(name string) *ProjectsLocationsDatasetsFhirStoresOperationsDeleteFhirOperationCall {
23454 c := &ProjectsLocationsDatasetsFhirStoresOperationsDeleteFhirOperationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23455 c.name = name
23456 return c
23457 }
23458
23459 // Fields allows partial responses to be retrieved. See
23460 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
23461 // details.
23462 func (c *ProjectsLocationsDatasetsFhirStoresOperationsDeleteFhirOperationCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresOperationsDeleteFhirOperationCall {
23463 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23464 return c
23465 }
23466
23467 // Context sets the context to be used in this call's Do method.
23468 func (c *ProjectsLocationsDatasetsFhirStoresOperationsDeleteFhirOperationCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresOperationsDeleteFhirOperationCall {
23469 c.ctx_ = ctx
23470 return c
23471 }
23472
23473 // Header returns a http.Header that can be modified by the caller to add
23474 // headers to the request.
23475 func (c *ProjectsLocationsDatasetsFhirStoresOperationsDeleteFhirOperationCall) Header() http.Header {
23476 if c.header_ == nil {
23477 c.header_ = make(http.Header)
23478 }
23479 return c.header_
23480 }
23481
23482 func (c *ProjectsLocationsDatasetsFhirStoresOperationsDeleteFhirOperationCall) doRequest(alt string) (*http.Response, error) {
23483 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
23484 c.urlParams_.Set("alt", alt)
23485 c.urlParams_.Set("prettyPrint", "false")
23486 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
23487 urls += "?" + c.urlParams_.Encode()
23488 req, err := http.NewRequest("DELETE", urls, nil)
23489 if err != nil {
23490 return nil, err
23491 }
23492 req.Header = reqHeaders
23493 googleapi.Expand(req.URL, map[string]string{
23494 "name": c.name,
23495 })
23496 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))
23497 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23498 }
23499
23500 // Do executes the "healthcare.projects.locations.datasets.fhirStores.operations.delete-fhir-operation" call.
23501 func (c *ProjectsLocationsDatasetsFhirStoresOperationsDeleteFhirOperationCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
23502 gensupport.SetOptions(c.urlParams_, opts...)
23503 return c.doRequest("")
23504 }
23505
23506 type ProjectsLocationsDatasetsFhirStoresOperationsGetFhirOperationStatusCall struct {
23507 s *Service
23508 name string
23509 urlParams_ gensupport.URLParams
23510 ifNoneMatch_ string
23511 ctx_ context.Context
23512 header_ http.Header
23513 }
23514
23515 // GetFhirOperationStatus: Gets the status of operations as defined in the FHIR
23516 // specification. Implements the FHIR implementation guide bulk data status
23517 // request
23518 // (https://build.fhir.org/ig/HL7/bulk-data/export.html#bulk-data-status-request).
23519 // Operations can have one of these states: * in-progress: response status code
23520 // is `202` and `X-Progress` header is set to `in progress`. * complete:
23521 // response status code is `200` and the body is a JSON-encoded operation
23522 // response as defined by the spec. For a bulk export, this response is defined
23523 // in
23524 // https://build.fhir.org/ig/HL7/bulk-data/export.html#response---complete-status.
23525 // * error: response status code is `5XX`, and the body is a JSON-encoded
23526 // `OperationOutcome` resource describing the reason for the error.
23527 //
23528 // - name: Name of the operation to query, in the format
23529 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirSt
23530 // ores/{fhir_store_id}/operations/{operation_id}`.
23531 func (r *ProjectsLocationsDatasetsFhirStoresOperationsService) GetFhirOperationStatus(name string) *ProjectsLocationsDatasetsFhirStoresOperationsGetFhirOperationStatusCall {
23532 c := &ProjectsLocationsDatasetsFhirStoresOperationsGetFhirOperationStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23533 c.name = name
23534 return c
23535 }
23536
23537 // Fields allows partial responses to be retrieved. See
23538 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
23539 // details.
23540 func (c *ProjectsLocationsDatasetsFhirStoresOperationsGetFhirOperationStatusCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresOperationsGetFhirOperationStatusCall {
23541 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23542 return c
23543 }
23544
23545 // IfNoneMatch sets an optional parameter which makes the operation fail if the
23546 // object's ETag matches the given value. This is useful for getting updates
23547 // only after the object has changed since the last request.
23548 func (c *ProjectsLocationsDatasetsFhirStoresOperationsGetFhirOperationStatusCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresOperationsGetFhirOperationStatusCall {
23549 c.ifNoneMatch_ = entityTag
23550 return c
23551 }
23552
23553 // Context sets the context to be used in this call's Do method.
23554 func (c *ProjectsLocationsDatasetsFhirStoresOperationsGetFhirOperationStatusCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresOperationsGetFhirOperationStatusCall {
23555 c.ctx_ = ctx
23556 return c
23557 }
23558
23559 // Header returns a http.Header that can be modified by the caller to add
23560 // headers to the request.
23561 func (c *ProjectsLocationsDatasetsFhirStoresOperationsGetFhirOperationStatusCall) Header() http.Header {
23562 if c.header_ == nil {
23563 c.header_ = make(http.Header)
23564 }
23565 return c.header_
23566 }
23567
23568 func (c *ProjectsLocationsDatasetsFhirStoresOperationsGetFhirOperationStatusCall) doRequest(alt string) (*http.Response, error) {
23569 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
23570 if c.ifNoneMatch_ != "" {
23571 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23572 }
23573 c.urlParams_.Set("alt", alt)
23574 c.urlParams_.Set("prettyPrint", "false")
23575 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
23576 urls += "?" + c.urlParams_.Encode()
23577 req, err := http.NewRequest("GET", urls, nil)
23578 if err != nil {
23579 return nil, err
23580 }
23581 req.Header = reqHeaders
23582 googleapi.Expand(req.URL, map[string]string{
23583 "name": c.name,
23584 })
23585 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))
23586 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23587 }
23588
23589 // Do executes the "healthcare.projects.locations.datasets.fhirStores.operations.get-fhir-operation-status" call.
23590 func (c *ProjectsLocationsDatasetsFhirStoresOperationsGetFhirOperationStatusCall) Do(opts ...googleapi.CallOption) (*http.Response, error) {
23591 gensupport.SetOptions(c.urlParams_, opts...)
23592 return c.doRequest("")
23593 }
23594
23595 type ProjectsLocationsDatasetsHl7V2StoresCreateCall struct {
23596 s *Service
23597 parent string
23598 hl7v2store *Hl7V2Store
23599 urlParams_ gensupport.URLParams
23600 ctx_ context.Context
23601 header_ http.Header
23602 }
23603
23604 // Create: Creates a new HL7v2 store within the parent dataset.
23605 //
23606 // - parent: The name of the dataset this HL7v2 store belongs to.
23607 func (r *ProjectsLocationsDatasetsHl7V2StoresService) Create(parent string, hl7v2store *Hl7V2Store) *ProjectsLocationsDatasetsHl7V2StoresCreateCall {
23608 c := &ProjectsLocationsDatasetsHl7V2StoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23609 c.parent = parent
23610 c.hl7v2store = hl7v2store
23611 return c
23612 }
23613
23614 // Hl7V2StoreId sets the optional parameter "hl7V2StoreId": Required. The ID of
23615 // the HL7v2 store that is being created. The string must match the following
23616 // regex: `[\p{L}\p{N}_\-\.]{1,256}`.
23617 func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) Hl7V2StoreId(hl7V2StoreId string) *ProjectsLocationsDatasetsHl7V2StoresCreateCall {
23618 c.urlParams_.Set("hl7V2StoreId", hl7V2StoreId)
23619 return c
23620 }
23621
23622 // Fields allows partial responses to be retrieved. See
23623 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
23624 // details.
23625 func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresCreateCall {
23626 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23627 return c
23628 }
23629
23630 // Context sets the context to be used in this call's Do method.
23631 func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresCreateCall {
23632 c.ctx_ = ctx
23633 return c
23634 }
23635
23636 // Header returns a http.Header that can be modified by the caller to add
23637 // headers to the request.
23638 func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) Header() http.Header {
23639 if c.header_ == nil {
23640 c.header_ = make(http.Header)
23641 }
23642 return c.header_
23643 }
23644
23645 func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) doRequest(alt string) (*http.Response, error) {
23646 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
23647 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.hl7v2store)
23648 if err != nil {
23649 return nil, err
23650 }
23651 c.urlParams_.Set("alt", alt)
23652 c.urlParams_.Set("prettyPrint", "false")
23653 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/hl7V2Stores")
23654 urls += "?" + c.urlParams_.Encode()
23655 req, err := http.NewRequest("POST", urls, body)
23656 if err != nil {
23657 return nil, err
23658 }
23659 req.Header = reqHeaders
23660 googleapi.Expand(req.URL, map[string]string{
23661 "parent": c.parent,
23662 })
23663 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.create", "request", internallog.HTTPRequest(req, body.Bytes()))
23664 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23665 }
23666
23667 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.create" call.
23668 // Any non-2xx status code is an error. Response headers are in either
23669 // *Hl7V2Store.ServerResponse.Header or (if a response was returned at all) in
23670 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
23671 // whether the returned error was because http.StatusNotModified was returned.
23672 func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) Do(opts ...googleapi.CallOption) (*Hl7V2Store, error) {
23673 gensupport.SetOptions(c.urlParams_, opts...)
23674 res, err := c.doRequest("json")
23675 if res != nil && res.StatusCode == http.StatusNotModified {
23676 if res.Body != nil {
23677 res.Body.Close()
23678 }
23679 return nil, gensupport.WrapError(&googleapi.Error{
23680 Code: res.StatusCode,
23681 Header: res.Header,
23682 })
23683 }
23684 if err != nil {
23685 return nil, err
23686 }
23687 defer googleapi.CloseBody(res)
23688 if err := googleapi.CheckResponse(res); err != nil {
23689 return nil, gensupport.WrapError(err)
23690 }
23691 ret := &Hl7V2Store{
23692 ServerResponse: googleapi.ServerResponse{
23693 Header: res.Header,
23694 HTTPStatusCode: res.StatusCode,
23695 },
23696 }
23697 target := &ret
23698 b, err := gensupport.DecodeResponseBytes(target, res)
23699 if err != nil {
23700 return nil, err
23701 }
23702 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.create", "response", internallog.HTTPResponse(res, b))
23703 return ret, nil
23704 }
23705
23706 type ProjectsLocationsDatasetsHl7V2StoresDeleteCall struct {
23707 s *Service
23708 name string
23709 urlParams_ gensupport.URLParams
23710 ctx_ context.Context
23711 header_ http.Header
23712 }
23713
23714 // Delete: Deletes the specified HL7v2 store and removes all messages that it
23715 // contains.
23716 //
23717 // - name: The resource name of the HL7v2 store to delete.
23718 func (r *ProjectsLocationsDatasetsHl7V2StoresService) Delete(name string) *ProjectsLocationsDatasetsHl7V2StoresDeleteCall {
23719 c := &ProjectsLocationsDatasetsHl7V2StoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23720 c.name = name
23721 return c
23722 }
23723
23724 // Fields allows partial responses to be retrieved. See
23725 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
23726 // details.
23727 func (c *ProjectsLocationsDatasetsHl7V2StoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresDeleteCall {
23728 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23729 return c
23730 }
23731
23732 // Context sets the context to be used in this call's Do method.
23733 func (c *ProjectsLocationsDatasetsHl7V2StoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresDeleteCall {
23734 c.ctx_ = ctx
23735 return c
23736 }
23737
23738 // Header returns a http.Header that can be modified by the caller to add
23739 // headers to the request.
23740 func (c *ProjectsLocationsDatasetsHl7V2StoresDeleteCall) Header() http.Header {
23741 if c.header_ == nil {
23742 c.header_ = make(http.Header)
23743 }
23744 return c.header_
23745 }
23746
23747 func (c *ProjectsLocationsDatasetsHl7V2StoresDeleteCall) doRequest(alt string) (*http.Response, error) {
23748 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
23749 c.urlParams_.Set("alt", alt)
23750 c.urlParams_.Set("prettyPrint", "false")
23751 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
23752 urls += "?" + c.urlParams_.Encode()
23753 req, err := http.NewRequest("DELETE", urls, nil)
23754 if err != nil {
23755 return nil, err
23756 }
23757 req.Header = reqHeaders
23758 googleapi.Expand(req.URL, map[string]string{
23759 "name": c.name,
23760 })
23761 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.delete", "request", internallog.HTTPRequest(req, nil))
23762 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23763 }
23764
23765 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.delete" call.
23766 // Any non-2xx status code is an error. Response headers are in either
23767 // *Empty.ServerResponse.Header or (if a response was returned at all) in
23768 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
23769 // whether the returned error was because http.StatusNotModified was returned.
23770 func (c *ProjectsLocationsDatasetsHl7V2StoresDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
23771 gensupport.SetOptions(c.urlParams_, opts...)
23772 res, err := c.doRequest("json")
23773 if res != nil && res.StatusCode == http.StatusNotModified {
23774 if res.Body != nil {
23775 res.Body.Close()
23776 }
23777 return nil, gensupport.WrapError(&googleapi.Error{
23778 Code: res.StatusCode,
23779 Header: res.Header,
23780 })
23781 }
23782 if err != nil {
23783 return nil, err
23784 }
23785 defer googleapi.CloseBody(res)
23786 if err := googleapi.CheckResponse(res); err != nil {
23787 return nil, gensupport.WrapError(err)
23788 }
23789 ret := &Empty{
23790 ServerResponse: googleapi.ServerResponse{
23791 Header: res.Header,
23792 HTTPStatusCode: res.StatusCode,
23793 },
23794 }
23795 target := &ret
23796 b, err := gensupport.DecodeResponseBytes(target, res)
23797 if err != nil {
23798 return nil, err
23799 }
23800 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.delete", "response", internallog.HTTPResponse(res, b))
23801 return ret, nil
23802 }
23803
23804 type ProjectsLocationsDatasetsHl7V2StoresExportCall struct {
23805 s *Service
23806 name string
23807 exportmessagesrequest *ExportMessagesRequest
23808 urlParams_ gensupport.URLParams
23809 ctx_ context.Context
23810 header_ http.Header
23811 }
23812
23813 // Export: Exports the messages to a destination. To filter messages to be
23814 // exported, define a filter using the start and end time, relative to the
23815 // message generation time (MSH.7). This API returns an Operation that can be
23816 // used to track the status of the job by calling GetOperation. Immediate fatal
23817 // errors appear in the error field. Otherwise, when the operation finishes, a
23818 // detailed response of type ExportMessagesResponse is returned in the response
23819 // field. The metadata field type for this operation is OperationMetadata.
23820 //
23821 // - name: The name of the source HL7v2 store, in the format
23822 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7v2S
23823 // tores/{hl7v2_store_id}`.
23824 func (r *ProjectsLocationsDatasetsHl7V2StoresService) Export(name string, exportmessagesrequest *ExportMessagesRequest) *ProjectsLocationsDatasetsHl7V2StoresExportCall {
23825 c := &ProjectsLocationsDatasetsHl7V2StoresExportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23826 c.name = name
23827 c.exportmessagesrequest = exportmessagesrequest
23828 return c
23829 }
23830
23831 // Fields allows partial responses to be retrieved. See
23832 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
23833 // details.
23834 func (c *ProjectsLocationsDatasetsHl7V2StoresExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresExportCall {
23835 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23836 return c
23837 }
23838
23839 // Context sets the context to be used in this call's Do method.
23840 func (c *ProjectsLocationsDatasetsHl7V2StoresExportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresExportCall {
23841 c.ctx_ = ctx
23842 return c
23843 }
23844
23845 // Header returns a http.Header that can be modified by the caller to add
23846 // headers to the request.
23847 func (c *ProjectsLocationsDatasetsHl7V2StoresExportCall) Header() http.Header {
23848 if c.header_ == nil {
23849 c.header_ = make(http.Header)
23850 }
23851 return c.header_
23852 }
23853
23854 func (c *ProjectsLocationsDatasetsHl7V2StoresExportCall) doRequest(alt string) (*http.Response, error) {
23855 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
23856 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.exportmessagesrequest)
23857 if err != nil {
23858 return nil, err
23859 }
23860 c.urlParams_.Set("alt", alt)
23861 c.urlParams_.Set("prettyPrint", "false")
23862 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:export")
23863 urls += "?" + c.urlParams_.Encode()
23864 req, err := http.NewRequest("POST", urls, body)
23865 if err != nil {
23866 return nil, err
23867 }
23868 req.Header = reqHeaders
23869 googleapi.Expand(req.URL, map[string]string{
23870 "name": c.name,
23871 })
23872 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.export", "request", internallog.HTTPRequest(req, body.Bytes()))
23873 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23874 }
23875
23876 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.export" call.
23877 // Any non-2xx status code is an error. Response headers are in either
23878 // *Operation.ServerResponse.Header or (if a response was returned at all) in
23879 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
23880 // whether the returned error was because http.StatusNotModified was returned.
23881 func (c *ProjectsLocationsDatasetsHl7V2StoresExportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
23882 gensupport.SetOptions(c.urlParams_, opts...)
23883 res, err := c.doRequest("json")
23884 if res != nil && res.StatusCode == http.StatusNotModified {
23885 if res.Body != nil {
23886 res.Body.Close()
23887 }
23888 return nil, gensupport.WrapError(&googleapi.Error{
23889 Code: res.StatusCode,
23890 Header: res.Header,
23891 })
23892 }
23893 if err != nil {
23894 return nil, err
23895 }
23896 defer googleapi.CloseBody(res)
23897 if err := googleapi.CheckResponse(res); err != nil {
23898 return nil, gensupport.WrapError(err)
23899 }
23900 ret := &Operation{
23901 ServerResponse: googleapi.ServerResponse{
23902 Header: res.Header,
23903 HTTPStatusCode: res.StatusCode,
23904 },
23905 }
23906 target := &ret
23907 b, err := gensupport.DecodeResponseBytes(target, res)
23908 if err != nil {
23909 return nil, err
23910 }
23911 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.export", "response", internallog.HTTPResponse(res, b))
23912 return ret, nil
23913 }
23914
23915 type ProjectsLocationsDatasetsHl7V2StoresGetCall struct {
23916 s *Service
23917 name string
23918 urlParams_ gensupport.URLParams
23919 ifNoneMatch_ string
23920 ctx_ context.Context
23921 header_ http.Header
23922 }
23923
23924 // Get: Gets the specified HL7v2 store.
23925 //
23926 // - name: The resource name of the HL7v2 store to get.
23927 func (r *ProjectsLocationsDatasetsHl7V2StoresService) Get(name string) *ProjectsLocationsDatasetsHl7V2StoresGetCall {
23928 c := &ProjectsLocationsDatasetsHl7V2StoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23929 c.name = name
23930 return c
23931 }
23932
23933 // Fields allows partial responses to be retrieved. See
23934 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
23935 // details.
23936 func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresGetCall {
23937 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23938 return c
23939 }
23940
23941 // IfNoneMatch sets an optional parameter which makes the operation fail if the
23942 // object's ETag matches the given value. This is useful for getting updates
23943 // only after the object has changed since the last request.
23944 func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsHl7V2StoresGetCall {
23945 c.ifNoneMatch_ = entityTag
23946 return c
23947 }
23948
23949 // Context sets the context to be used in this call's Do method.
23950 func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresGetCall {
23951 c.ctx_ = ctx
23952 return c
23953 }
23954
23955 // Header returns a http.Header that can be modified by the caller to add
23956 // headers to the request.
23957 func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) Header() http.Header {
23958 if c.header_ == nil {
23959 c.header_ = make(http.Header)
23960 }
23961 return c.header_
23962 }
23963
23964 func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) doRequest(alt string) (*http.Response, error) {
23965 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
23966 if c.ifNoneMatch_ != "" {
23967 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23968 }
23969 c.urlParams_.Set("alt", alt)
23970 c.urlParams_.Set("prettyPrint", "false")
23971 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
23972 urls += "?" + c.urlParams_.Encode()
23973 req, err := http.NewRequest("GET", urls, nil)
23974 if err != nil {
23975 return nil, err
23976 }
23977 req.Header = reqHeaders
23978 googleapi.Expand(req.URL, map[string]string{
23979 "name": c.name,
23980 })
23981 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.get", "request", internallog.HTTPRequest(req, nil))
23982 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23983 }
23984
23985 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.get" call.
23986 // Any non-2xx status code is an error. Response headers are in either
23987 // *Hl7V2Store.ServerResponse.Header or (if a response was returned at all) in
23988 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
23989 // whether the returned error was because http.StatusNotModified was returned.
23990 func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) Do(opts ...googleapi.CallOption) (*Hl7V2Store, error) {
23991 gensupport.SetOptions(c.urlParams_, opts...)
23992 res, err := c.doRequest("json")
23993 if res != nil && res.StatusCode == http.StatusNotModified {
23994 if res.Body != nil {
23995 res.Body.Close()
23996 }
23997 return nil, gensupport.WrapError(&googleapi.Error{
23998 Code: res.StatusCode,
23999 Header: res.Header,
24000 })
24001 }
24002 if err != nil {
24003 return nil, err
24004 }
24005 defer googleapi.CloseBody(res)
24006 if err := googleapi.CheckResponse(res); err != nil {
24007 return nil, gensupport.WrapError(err)
24008 }
24009 ret := &Hl7V2Store{
24010 ServerResponse: googleapi.ServerResponse{
24011 Header: res.Header,
24012 HTTPStatusCode: res.StatusCode,
24013 },
24014 }
24015 target := &ret
24016 b, err := gensupport.DecodeResponseBytes(target, res)
24017 if err != nil {
24018 return nil, err
24019 }
24020 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.get", "response", internallog.HTTPResponse(res, b))
24021 return ret, nil
24022 }
24023
24024 type ProjectsLocationsDatasetsHl7V2StoresGetHL7v2StoreMetricsCall struct {
24025 s *Service
24026 name string
24027 urlParams_ gensupport.URLParams
24028 ifNoneMatch_ string
24029 ctx_ context.Context
24030 header_ http.Header
24031 }
24032
24033 // GetHL7v2StoreMetrics: Gets metrics associated with the HL7v2 store.
24034 //
24035 // - name: The resource name of the HL7v2 store to get metrics for, in the
24036 // format
24037 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2S
24038 // tores/{hl7v2_store_id}`.
24039 func (r *ProjectsLocationsDatasetsHl7V2StoresService) GetHL7v2StoreMetrics(name string) *ProjectsLocationsDatasetsHl7V2StoresGetHL7v2StoreMetricsCall {
24040 c := &ProjectsLocationsDatasetsHl7V2StoresGetHL7v2StoreMetricsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24041 c.name = name
24042 return c
24043 }
24044
24045 // Fields allows partial responses to be retrieved. See
24046 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
24047 // details.
24048 func (c *ProjectsLocationsDatasetsHl7V2StoresGetHL7v2StoreMetricsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresGetHL7v2StoreMetricsCall {
24049 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24050 return c
24051 }
24052
24053 // IfNoneMatch sets an optional parameter which makes the operation fail if the
24054 // object's ETag matches the given value. This is useful for getting updates
24055 // only after the object has changed since the last request.
24056 func (c *ProjectsLocationsDatasetsHl7V2StoresGetHL7v2StoreMetricsCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsHl7V2StoresGetHL7v2StoreMetricsCall {
24057 c.ifNoneMatch_ = entityTag
24058 return c
24059 }
24060
24061 // Context sets the context to be used in this call's Do method.
24062 func (c *ProjectsLocationsDatasetsHl7V2StoresGetHL7v2StoreMetricsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresGetHL7v2StoreMetricsCall {
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 *ProjectsLocationsDatasetsHl7V2StoresGetHL7v2StoreMetricsCall) Header() http.Header {
24070 if c.header_ == nil {
24071 c.header_ = make(http.Header)
24072 }
24073 return c.header_
24074 }
24075
24076 func (c *ProjectsLocationsDatasetsHl7V2StoresGetHL7v2StoreMetricsCall) doRequest(alt string) (*http.Response, error) {
24077 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
24078 if c.ifNoneMatch_ != "" {
24079 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24080 }
24081 c.urlParams_.Set("alt", alt)
24082 c.urlParams_.Set("prettyPrint", "false")
24083 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:getHL7v2StoreMetrics")
24084 urls += "?" + c.urlParams_.Encode()
24085 req, err := http.NewRequest("GET", urls, nil)
24086 if err != nil {
24087 return nil, err
24088 }
24089 req.Header = reqHeaders
24090 googleapi.Expand(req.URL, map[string]string{
24091 "name": c.name,
24092 })
24093 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.getHL7v2StoreMetrics", "request", internallog.HTTPRequest(req, nil))
24094 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24095 }
24096
24097 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.getHL7v2StoreMetrics" call.
24098 // Any non-2xx status code is an error. Response headers are in either
24099 // *Hl7V2StoreMetrics.ServerResponse.Header or (if a response was returned at
24100 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
24101 // check whether the returned error was because http.StatusNotModified was
24102 // returned.
24103 func (c *ProjectsLocationsDatasetsHl7V2StoresGetHL7v2StoreMetricsCall) Do(opts ...googleapi.CallOption) (*Hl7V2StoreMetrics, error) {
24104 gensupport.SetOptions(c.urlParams_, opts...)
24105 res, err := c.doRequest("json")
24106 if res != nil && res.StatusCode == http.StatusNotModified {
24107 if res.Body != nil {
24108 res.Body.Close()
24109 }
24110 return nil, gensupport.WrapError(&googleapi.Error{
24111 Code: res.StatusCode,
24112 Header: res.Header,
24113 })
24114 }
24115 if err != nil {
24116 return nil, err
24117 }
24118 defer googleapi.CloseBody(res)
24119 if err := googleapi.CheckResponse(res); err != nil {
24120 return nil, gensupport.WrapError(err)
24121 }
24122 ret := &Hl7V2StoreMetrics{
24123 ServerResponse: googleapi.ServerResponse{
24124 Header: res.Header,
24125 HTTPStatusCode: res.StatusCode,
24126 },
24127 }
24128 target := &ret
24129 b, err := gensupport.DecodeResponseBytes(target, res)
24130 if err != nil {
24131 return nil, err
24132 }
24133 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.getHL7v2StoreMetrics", "response", internallog.HTTPResponse(res, b))
24134 return ret, nil
24135 }
24136
24137 type ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall struct {
24138 s *Service
24139 resource string
24140 urlParams_ gensupport.URLParams
24141 ifNoneMatch_ string
24142 ctx_ context.Context
24143 header_ http.Header
24144 }
24145
24146 // GetIamPolicy: Gets the access control policy for a resource. Returns an
24147 // empty policy if the resource exists and does not have a policy set.
24148 //
24149 // - resource: REQUIRED: The resource for which the policy is being requested.
24150 // See Resource names (https://cloud.google.com/apis/design/resource_names)
24151 // for the appropriate value for this field.
24152 func (r *ProjectsLocationsDatasetsHl7V2StoresService) GetIamPolicy(resource string) *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall {
24153 c := &ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24154 c.resource = resource
24155 return c
24156 }
24157
24158 // OptionsRequestedPolicyVersion sets the optional parameter
24159 // "options.requestedPolicyVersion": The maximum policy version that will be
24160 // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
24161 // an invalid value will be rejected. Requests for policies with any
24162 // conditional role bindings must specify version 3. Policies with no
24163 // conditional role bindings may specify any valid value or leave the field
24164 // unset. The policy in the response might use the policy version that you
24165 // specified, or it might use a lower policy version. For example, if you
24166 // specify version 3, but the policy has no conditional role bindings, the
24167 // response uses version 1. To learn which resources support conditions in
24168 // their IAM policies, see the IAM documentation
24169 // (https://cloud.google.com/iam/help/conditions/resource-policies).
24170 func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall {
24171 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
24172 return c
24173 }
24174
24175 // Fields allows partial responses to be retrieved. See
24176 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
24177 // details.
24178 func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall {
24179 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24180 return c
24181 }
24182
24183 // IfNoneMatch sets an optional parameter which makes the operation fail if the
24184 // object's ETag matches the given value. This is useful for getting updates
24185 // only after the object has changed since the last request.
24186 func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall {
24187 c.ifNoneMatch_ = entityTag
24188 return c
24189 }
24190
24191 // Context sets the context to be used in this call's Do method.
24192 func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall {
24193 c.ctx_ = ctx
24194 return c
24195 }
24196
24197 // Header returns a http.Header that can be modified by the caller to add
24198 // headers to the request.
24199 func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) Header() http.Header {
24200 if c.header_ == nil {
24201 c.header_ = make(http.Header)
24202 }
24203 return c.header_
24204 }
24205
24206 func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
24207 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
24208 if c.ifNoneMatch_ != "" {
24209 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24210 }
24211 c.urlParams_.Set("alt", alt)
24212 c.urlParams_.Set("prettyPrint", "false")
24213 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy")
24214 urls += "?" + c.urlParams_.Encode()
24215 req, err := http.NewRequest("GET", urls, nil)
24216 if err != nil {
24217 return nil, err
24218 }
24219 req.Header = reqHeaders
24220 googleapi.Expand(req.URL, map[string]string{
24221 "resource": c.resource,
24222 })
24223 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.getIamPolicy", "request", internallog.HTTPRequest(req, nil))
24224 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24225 }
24226
24227 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.getIamPolicy" call.
24228 // Any non-2xx status code is an error. Response headers are in either
24229 // *Policy.ServerResponse.Header or (if a response was returned at all) in
24230 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
24231 // whether the returned error was because http.StatusNotModified was returned.
24232 func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
24233 gensupport.SetOptions(c.urlParams_, opts...)
24234 res, err := c.doRequest("json")
24235 if res != nil && res.StatusCode == http.StatusNotModified {
24236 if res.Body != nil {
24237 res.Body.Close()
24238 }
24239 return nil, gensupport.WrapError(&googleapi.Error{
24240 Code: res.StatusCode,
24241 Header: res.Header,
24242 })
24243 }
24244 if err != nil {
24245 return nil, err
24246 }
24247 defer googleapi.CloseBody(res)
24248 if err := googleapi.CheckResponse(res); err != nil {
24249 return nil, gensupport.WrapError(err)
24250 }
24251 ret := &Policy{
24252 ServerResponse: googleapi.ServerResponse{
24253 Header: res.Header,
24254 HTTPStatusCode: res.StatusCode,
24255 },
24256 }
24257 target := &ret
24258 b, err := gensupport.DecodeResponseBytes(target, res)
24259 if err != nil {
24260 return nil, err
24261 }
24262 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.getIamPolicy", "response", internallog.HTTPResponse(res, b))
24263 return ret, nil
24264 }
24265
24266 type ProjectsLocationsDatasetsHl7V2StoresImportCall struct {
24267 s *Service
24268 name string
24269 importmessagesrequest *ImportMessagesRequest
24270 urlParams_ gensupport.URLParams
24271 ctx_ context.Context
24272 header_ http.Header
24273 }
24274
24275 // Import: Import messages to the HL7v2 store by loading data from the
24276 // specified sources. This method is optimized to load large quantities of data
24277 // using import semantics that ignore some HL7v2 store configuration options
24278 // and are not suitable for all use cases. It is primarily intended to load
24279 // data into an empty HL7v2 store that is not being used by other clients. An
24280 // existing message will be overwritten if a duplicate message is imported. A
24281 // duplicate message is a message with the same raw bytes as a message that
24282 // already exists in this HL7v2 store. When a message is overwritten, its
24283 // labels will also be overwritten. The import operation is idempotent unless
24284 // the input data contains multiple valid messages with the same raw bytes but
24285 // different labels. In that case, after the import completes, the store
24286 // contains exactly one message with those raw bytes but there is no ordering
24287 // guarantee on which version of the labels it has. The operation result
24288 // counters do not count duplicated raw bytes as an error and count one success
24289 // for each message in the input, which might result in a success count larger
24290 // than the number of messages in the HL7v2 store. If some messages fail to
24291 // import, for example due to parsing errors, successfully imported messages
24292 // are not rolled back. This method returns an Operation that can be used to
24293 // track the status of the import by calling GetOperation. Immediate fatal
24294 // errors appear in the error field, errors are also logged to Cloud Logging
24295 // (see Viewing error logs in Cloud Logging
24296 // (https://cloud.google.com/healthcare/docs/how-tos/logging)). Otherwise, when
24297 // the operation finishes, a response of type ImportMessagesResponse is
24298 // returned in the response field. The metadata field type for this operation
24299 // is OperationMetadata.
24300 //
24301 // - name: The name of the target HL7v2 store, in the format
24302 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7v2S
24303 // tores/{hl7v2_store_id}`.
24304 func (r *ProjectsLocationsDatasetsHl7V2StoresService) Import(name string, importmessagesrequest *ImportMessagesRequest) *ProjectsLocationsDatasetsHl7V2StoresImportCall {
24305 c := &ProjectsLocationsDatasetsHl7V2StoresImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24306 c.name = name
24307 c.importmessagesrequest = importmessagesrequest
24308 return c
24309 }
24310
24311 // Fields allows partial responses to be retrieved. See
24312 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
24313 // details.
24314 func (c *ProjectsLocationsDatasetsHl7V2StoresImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresImportCall {
24315 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24316 return c
24317 }
24318
24319 // Context sets the context to be used in this call's Do method.
24320 func (c *ProjectsLocationsDatasetsHl7V2StoresImportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresImportCall {
24321 c.ctx_ = ctx
24322 return c
24323 }
24324
24325 // Header returns a http.Header that can be modified by the caller to add
24326 // headers to the request.
24327 func (c *ProjectsLocationsDatasetsHl7V2StoresImportCall) Header() http.Header {
24328 if c.header_ == nil {
24329 c.header_ = make(http.Header)
24330 }
24331 return c.header_
24332 }
24333
24334 func (c *ProjectsLocationsDatasetsHl7V2StoresImportCall) doRequest(alt string) (*http.Response, error) {
24335 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
24336 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.importmessagesrequest)
24337 if err != nil {
24338 return nil, err
24339 }
24340 c.urlParams_.Set("alt", alt)
24341 c.urlParams_.Set("prettyPrint", "false")
24342 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:import")
24343 urls += "?" + c.urlParams_.Encode()
24344 req, err := http.NewRequest("POST", urls, body)
24345 if err != nil {
24346 return nil, err
24347 }
24348 req.Header = reqHeaders
24349 googleapi.Expand(req.URL, map[string]string{
24350 "name": c.name,
24351 })
24352 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.import", "request", internallog.HTTPRequest(req, body.Bytes()))
24353 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24354 }
24355
24356 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.import" call.
24357 // Any non-2xx status code is an error. Response headers are in either
24358 // *Operation.ServerResponse.Header or (if a response was returned at all) in
24359 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
24360 // whether the returned error was because http.StatusNotModified was returned.
24361 func (c *ProjectsLocationsDatasetsHl7V2StoresImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
24362 gensupport.SetOptions(c.urlParams_, opts...)
24363 res, err := c.doRequest("json")
24364 if res != nil && res.StatusCode == http.StatusNotModified {
24365 if res.Body != nil {
24366 res.Body.Close()
24367 }
24368 return nil, gensupport.WrapError(&googleapi.Error{
24369 Code: res.StatusCode,
24370 Header: res.Header,
24371 })
24372 }
24373 if err != nil {
24374 return nil, err
24375 }
24376 defer googleapi.CloseBody(res)
24377 if err := googleapi.CheckResponse(res); err != nil {
24378 return nil, gensupport.WrapError(err)
24379 }
24380 ret := &Operation{
24381 ServerResponse: googleapi.ServerResponse{
24382 Header: res.Header,
24383 HTTPStatusCode: res.StatusCode,
24384 },
24385 }
24386 target := &ret
24387 b, err := gensupport.DecodeResponseBytes(target, res)
24388 if err != nil {
24389 return nil, err
24390 }
24391 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.import", "response", internallog.HTTPResponse(res, b))
24392 return ret, nil
24393 }
24394
24395 type ProjectsLocationsDatasetsHl7V2StoresListCall struct {
24396 s *Service
24397 parent string
24398 urlParams_ gensupport.URLParams
24399 ifNoneMatch_ string
24400 ctx_ context.Context
24401 header_ http.Header
24402 }
24403
24404 // List: Lists the HL7v2 stores in the given dataset.
24405 //
24406 // - parent: Name of the dataset.
24407 func (r *ProjectsLocationsDatasetsHl7V2StoresService) List(parent string) *ProjectsLocationsDatasetsHl7V2StoresListCall {
24408 c := &ProjectsLocationsDatasetsHl7V2StoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24409 c.parent = parent
24410 return c
24411 }
24412
24413 // Filter sets the optional parameter "filter": Restricts stores returned to
24414 // those matching a filter. The following syntax is available: * A string field
24415 // value can be written as text inside quotation marks, for example "query
24416 // text". The only valid relational operation for text fields is equality
24417 // (`=`), where text is searched within the field, rather than having the field
24418 // be equal to the text. For example, "Comment = great" returns messages with
24419 // `great` in the comment field. * A number field value can be written as an
24420 // integer, a decimal, or an exponential. The valid relational operators for
24421 // number fields are the equality operator (`=`), along with the less
24422 // than/greater than operators (`<`, `<=`, `>`, `>=`). Note that there is no
24423 // inequality (`!=`) operator. You can prepend the `NOT` operator to an
24424 // expression to negate it. * A date field value must be written in
24425 // `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format.
24426 // Leading zeros are required for one-digit months and days. The valid
24427 // relational operators for date fields are the equality operator (`=`) , along
24428 // with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that
24429 // there is no inequality (`!=`) operator. You can prepend the `NOT` operator
24430 // to an expression to negate it. * Multiple field query expressions can be
24431 // combined in one query by adding `AND` or `OR` operators between the
24432 // expressions. If a boolean operator appears within a quoted string, it is not
24433 // treated as special, it's just another part of the character string to be
24434 // matched. You can prepend the `NOT` operator to an expression to negate it.
24435 // Only filtering on labels is supported. For example, `labels.key=value`.
24436 func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Filter(filter string) *ProjectsLocationsDatasetsHl7V2StoresListCall {
24437 c.urlParams_.Set("filter", filter)
24438 return c
24439 }
24440
24441 // PageSize sets the optional parameter "pageSize": Limit on the number of
24442 // HL7v2 stores to return in a single response. If not specified, 100 is used.
24443 // May not be larger than 1000.
24444 func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsHl7V2StoresListCall {
24445 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
24446 return c
24447 }
24448
24449 // PageToken sets the optional parameter "pageToken": The next_page_token value
24450 // returned from the previous List request, if any.
24451 func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsHl7V2StoresListCall {
24452 c.urlParams_.Set("pageToken", pageToken)
24453 return c
24454 }
24455
24456 // Fields allows partial responses to be retrieved. See
24457 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
24458 // details.
24459 func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresListCall {
24460 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24461 return c
24462 }
24463
24464 // IfNoneMatch sets an optional parameter which makes the operation fail if the
24465 // object's ETag matches the given value. This is useful for getting updates
24466 // only after the object has changed since the last request.
24467 func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsHl7V2StoresListCall {
24468 c.ifNoneMatch_ = entityTag
24469 return c
24470 }
24471
24472 // Context sets the context to be used in this call's Do method.
24473 func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresListCall {
24474 c.ctx_ = ctx
24475 return c
24476 }
24477
24478 // Header returns a http.Header that can be modified by the caller to add
24479 // headers to the request.
24480 func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Header() http.Header {
24481 if c.header_ == nil {
24482 c.header_ = make(http.Header)
24483 }
24484 return c.header_
24485 }
24486
24487 func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) doRequest(alt string) (*http.Response, error) {
24488 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
24489 if c.ifNoneMatch_ != "" {
24490 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24491 }
24492 c.urlParams_.Set("alt", alt)
24493 c.urlParams_.Set("prettyPrint", "false")
24494 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/hl7V2Stores")
24495 urls += "?" + c.urlParams_.Encode()
24496 req, err := http.NewRequest("GET", urls, nil)
24497 if err != nil {
24498 return nil, err
24499 }
24500 req.Header = reqHeaders
24501 googleapi.Expand(req.URL, map[string]string{
24502 "parent": c.parent,
24503 })
24504 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.list", "request", internallog.HTTPRequest(req, nil))
24505 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24506 }
24507
24508 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.list" call.
24509 // Any non-2xx status code is an error. Response headers are in either
24510 // *ListHl7V2StoresResponse.ServerResponse.Header or (if a response was
24511 // returned at all) in error.(*googleapi.Error).Header. Use
24512 // googleapi.IsNotModified to check whether the returned error was because
24513 // http.StatusNotModified was returned.
24514 func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Do(opts ...googleapi.CallOption) (*ListHl7V2StoresResponse, error) {
24515 gensupport.SetOptions(c.urlParams_, opts...)
24516 res, err := c.doRequest("json")
24517 if res != nil && res.StatusCode == http.StatusNotModified {
24518 if res.Body != nil {
24519 res.Body.Close()
24520 }
24521 return nil, gensupport.WrapError(&googleapi.Error{
24522 Code: res.StatusCode,
24523 Header: res.Header,
24524 })
24525 }
24526 if err != nil {
24527 return nil, err
24528 }
24529 defer googleapi.CloseBody(res)
24530 if err := googleapi.CheckResponse(res); err != nil {
24531 return nil, gensupport.WrapError(err)
24532 }
24533 ret := &ListHl7V2StoresResponse{
24534 ServerResponse: googleapi.ServerResponse{
24535 Header: res.Header,
24536 HTTPStatusCode: res.StatusCode,
24537 },
24538 }
24539 target := &ret
24540 b, err := gensupport.DecodeResponseBytes(target, res)
24541 if err != nil {
24542 return nil, err
24543 }
24544 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.list", "response", internallog.HTTPResponse(res, b))
24545 return ret, nil
24546 }
24547
24548 // Pages invokes f for each page of results.
24549 // A non-nil error returned from f will halt the iteration.
24550 // The provided context supersedes any context provided to the Context method.
24551 func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Pages(ctx context.Context, f func(*ListHl7V2StoresResponse) error) error {
24552 c.ctx_ = ctx
24553 defer c.PageToken(c.urlParams_.Get("pageToken"))
24554 for {
24555 x, err := c.Do()
24556 if err != nil {
24557 return err
24558 }
24559 if err := f(x); err != nil {
24560 return err
24561 }
24562 if x.NextPageToken == "" {
24563 return nil
24564 }
24565 c.PageToken(x.NextPageToken)
24566 }
24567 }
24568
24569 type ProjectsLocationsDatasetsHl7V2StoresPatchCall struct {
24570 s *Service
24571 name string
24572 hl7v2store *Hl7V2Store
24573 urlParams_ gensupport.URLParams
24574 ctx_ context.Context
24575 header_ http.Header
24576 }
24577
24578 // Patch: Updates the HL7v2 store.
24579 //
24580 // - name: Identifier. Resource name of the HL7v2 store, of the form
24581 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2S
24582 // tores/{hl7v2_store_id}`.
24583 func (r *ProjectsLocationsDatasetsHl7V2StoresService) Patch(name string, hl7v2store *Hl7V2Store) *ProjectsLocationsDatasetsHl7V2StoresPatchCall {
24584 c := &ProjectsLocationsDatasetsHl7V2StoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24585 c.name = name
24586 c.hl7v2store = hl7v2store
24587 return c
24588 }
24589
24590 // UpdateMask sets the optional parameter "updateMask": Required. The update
24591 // mask applies to the resource. For the `FieldMask` definition, see
24592 // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
24593 func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsHl7V2StoresPatchCall {
24594 c.urlParams_.Set("updateMask", updateMask)
24595 return c
24596 }
24597
24598 // Fields allows partial responses to be retrieved. See
24599 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
24600 // details.
24601 func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresPatchCall {
24602 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24603 return c
24604 }
24605
24606 // Context sets the context to be used in this call's Do method.
24607 func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresPatchCall {
24608 c.ctx_ = ctx
24609 return c
24610 }
24611
24612 // Header returns a http.Header that can be modified by the caller to add
24613 // headers to the request.
24614 func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) Header() http.Header {
24615 if c.header_ == nil {
24616 c.header_ = make(http.Header)
24617 }
24618 return c.header_
24619 }
24620
24621 func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) doRequest(alt string) (*http.Response, error) {
24622 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
24623 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.hl7v2store)
24624 if err != nil {
24625 return nil, err
24626 }
24627 c.urlParams_.Set("alt", alt)
24628 c.urlParams_.Set("prettyPrint", "false")
24629 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
24630 urls += "?" + c.urlParams_.Encode()
24631 req, err := http.NewRequest("PATCH", urls, body)
24632 if err != nil {
24633 return nil, err
24634 }
24635 req.Header = reqHeaders
24636 googleapi.Expand(req.URL, map[string]string{
24637 "name": c.name,
24638 })
24639 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
24640 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24641 }
24642
24643 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.patch" call.
24644 // Any non-2xx status code is an error. Response headers are in either
24645 // *Hl7V2Store.ServerResponse.Header or (if a response was returned at all) in
24646 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
24647 // whether the returned error was because http.StatusNotModified was returned.
24648 func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) Do(opts ...googleapi.CallOption) (*Hl7V2Store, error) {
24649 gensupport.SetOptions(c.urlParams_, opts...)
24650 res, err := c.doRequest("json")
24651 if res != nil && res.StatusCode == http.StatusNotModified {
24652 if res.Body != nil {
24653 res.Body.Close()
24654 }
24655 return nil, gensupport.WrapError(&googleapi.Error{
24656 Code: res.StatusCode,
24657 Header: res.Header,
24658 })
24659 }
24660 if err != nil {
24661 return nil, err
24662 }
24663 defer googleapi.CloseBody(res)
24664 if err := googleapi.CheckResponse(res); err != nil {
24665 return nil, gensupport.WrapError(err)
24666 }
24667 ret := &Hl7V2Store{
24668 ServerResponse: googleapi.ServerResponse{
24669 Header: res.Header,
24670 HTTPStatusCode: res.StatusCode,
24671 },
24672 }
24673 target := &ret
24674 b, err := gensupport.DecodeResponseBytes(target, res)
24675 if err != nil {
24676 return nil, err
24677 }
24678 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.patch", "response", internallog.HTTPResponse(res, b))
24679 return ret, nil
24680 }
24681
24682 type ProjectsLocationsDatasetsHl7V2StoresRollbackCall struct {
24683 s *Service
24684 name string
24685 rollbackhl7v2messagesrequest *RollbackHl7V2MessagesRequest
24686 urlParams_ gensupport.URLParams
24687 ctx_ context.Context
24688 header_ http.Header
24689 }
24690
24691 // Rollback: Rolls back messages from the HL7v2 store to the specified time.
24692 // This method returns an Operation that can be used to track the status of the
24693 // rollback by calling GetOperation. Immediate fatal errors appear in the error
24694 // field, errors are also logged to Cloud Logging (see Viewing error logs in
24695 // Cloud Logging (https://cloud.google.com/healthcare/docs/how-tos/logging)).
24696 // Otherwise, when the operation finishes, a detailed response of type
24697 // RollbackHl7V2MessagesResponse is returned in the response field. The
24698 // metadata field type for this operation is OperationMetadata.
24699 //
24700 // - name: The name of the HL7v2 store to rollback, in the format of
24701 // "projects/{project_id}/locations/{location_id}/datasets/{dataset_id}
24702 // /hl7V2Stores/{hl7v2_store_id}".
24703 func (r *ProjectsLocationsDatasetsHl7V2StoresService) Rollback(name string, rollbackhl7v2messagesrequest *RollbackHl7V2MessagesRequest) *ProjectsLocationsDatasetsHl7V2StoresRollbackCall {
24704 c := &ProjectsLocationsDatasetsHl7V2StoresRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24705 c.name = name
24706 c.rollbackhl7v2messagesrequest = rollbackhl7v2messagesrequest
24707 return c
24708 }
24709
24710 // Fields allows partial responses to be retrieved. See
24711 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
24712 // details.
24713 func (c *ProjectsLocationsDatasetsHl7V2StoresRollbackCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresRollbackCall {
24714 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24715 return c
24716 }
24717
24718 // Context sets the context to be used in this call's Do method.
24719 func (c *ProjectsLocationsDatasetsHl7V2StoresRollbackCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresRollbackCall {
24720 c.ctx_ = ctx
24721 return c
24722 }
24723
24724 // Header returns a http.Header that can be modified by the caller to add
24725 // headers to the request.
24726 func (c *ProjectsLocationsDatasetsHl7V2StoresRollbackCall) Header() http.Header {
24727 if c.header_ == nil {
24728 c.header_ = make(http.Header)
24729 }
24730 return c.header_
24731 }
24732
24733 func (c *ProjectsLocationsDatasetsHl7V2StoresRollbackCall) doRequest(alt string) (*http.Response, error) {
24734 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
24735 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.rollbackhl7v2messagesrequest)
24736 if err != nil {
24737 return nil, err
24738 }
24739 c.urlParams_.Set("alt", alt)
24740 c.urlParams_.Set("prettyPrint", "false")
24741 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:rollback")
24742 urls += "?" + c.urlParams_.Encode()
24743 req, err := http.NewRequest("POST", urls, body)
24744 if err != nil {
24745 return nil, err
24746 }
24747 req.Header = reqHeaders
24748 googleapi.Expand(req.URL, map[string]string{
24749 "name": c.name,
24750 })
24751 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.rollback", "request", internallog.HTTPRequest(req, body.Bytes()))
24752 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24753 }
24754
24755 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.rollback" call.
24756 // Any non-2xx status code is an error. Response headers are in either
24757 // *Operation.ServerResponse.Header or (if a response was returned at all) in
24758 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
24759 // whether the returned error was because http.StatusNotModified was returned.
24760 func (c *ProjectsLocationsDatasetsHl7V2StoresRollbackCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
24761 gensupport.SetOptions(c.urlParams_, opts...)
24762 res, err := c.doRequest("json")
24763 if res != nil && res.StatusCode == http.StatusNotModified {
24764 if res.Body != nil {
24765 res.Body.Close()
24766 }
24767 return nil, gensupport.WrapError(&googleapi.Error{
24768 Code: res.StatusCode,
24769 Header: res.Header,
24770 })
24771 }
24772 if err != nil {
24773 return nil, err
24774 }
24775 defer googleapi.CloseBody(res)
24776 if err := googleapi.CheckResponse(res); err != nil {
24777 return nil, gensupport.WrapError(err)
24778 }
24779 ret := &Operation{
24780 ServerResponse: googleapi.ServerResponse{
24781 Header: res.Header,
24782 HTTPStatusCode: res.StatusCode,
24783 },
24784 }
24785 target := &ret
24786 b, err := gensupport.DecodeResponseBytes(target, res)
24787 if err != nil {
24788 return nil, err
24789 }
24790 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.rollback", "response", internallog.HTTPResponse(res, b))
24791 return ret, nil
24792 }
24793
24794 type ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall struct {
24795 s *Service
24796 resource string
24797 setiampolicyrequest *SetIamPolicyRequest
24798 urlParams_ gensupport.URLParams
24799 ctx_ context.Context
24800 header_ http.Header
24801 }
24802
24803 // SetIamPolicy: Sets the access control policy on the specified resource.
24804 // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
24805 // and `PERMISSION_DENIED` errors.
24806 //
24807 // - resource: REQUIRED: The resource for which the policy is being specified.
24808 // See Resource names (https://cloud.google.com/apis/design/resource_names)
24809 // for the appropriate value for this field.
24810 func (r *ProjectsLocationsDatasetsHl7V2StoresService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall {
24811 c := &ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24812 c.resource = resource
24813 c.setiampolicyrequest = setiampolicyrequest
24814 return c
24815 }
24816
24817 // Fields allows partial responses to be retrieved. See
24818 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
24819 // details.
24820 func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall {
24821 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24822 return c
24823 }
24824
24825 // Context sets the context to be used in this call's Do method.
24826 func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall {
24827 c.ctx_ = ctx
24828 return c
24829 }
24830
24831 // Header returns a http.Header that can be modified by the caller to add
24832 // headers to the request.
24833 func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) Header() http.Header {
24834 if c.header_ == nil {
24835 c.header_ = make(http.Header)
24836 }
24837 return c.header_
24838 }
24839
24840 func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
24841 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
24842 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest)
24843 if err != nil {
24844 return nil, err
24845 }
24846 c.urlParams_.Set("alt", alt)
24847 c.urlParams_.Set("prettyPrint", "false")
24848 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy")
24849 urls += "?" + c.urlParams_.Encode()
24850 req, err := http.NewRequest("POST", urls, body)
24851 if err != nil {
24852 return nil, err
24853 }
24854 req.Header = reqHeaders
24855 googleapi.Expand(req.URL, map[string]string{
24856 "resource": c.resource,
24857 })
24858 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes()))
24859 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24860 }
24861
24862 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.setIamPolicy" call.
24863 // Any non-2xx status code is an error. Response headers are in either
24864 // *Policy.ServerResponse.Header or (if a response was returned at all) in
24865 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
24866 // whether the returned error was because http.StatusNotModified was returned.
24867 func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
24868 gensupport.SetOptions(c.urlParams_, opts...)
24869 res, err := c.doRequest("json")
24870 if res != nil && res.StatusCode == http.StatusNotModified {
24871 if res.Body != nil {
24872 res.Body.Close()
24873 }
24874 return nil, gensupport.WrapError(&googleapi.Error{
24875 Code: res.StatusCode,
24876 Header: res.Header,
24877 })
24878 }
24879 if err != nil {
24880 return nil, err
24881 }
24882 defer googleapi.CloseBody(res)
24883 if err := googleapi.CheckResponse(res); err != nil {
24884 return nil, gensupport.WrapError(err)
24885 }
24886 ret := &Policy{
24887 ServerResponse: googleapi.ServerResponse{
24888 Header: res.Header,
24889 HTTPStatusCode: res.StatusCode,
24890 },
24891 }
24892 target := &ret
24893 b, err := gensupport.DecodeResponseBytes(target, res)
24894 if err != nil {
24895 return nil, err
24896 }
24897 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.setIamPolicy", "response", internallog.HTTPResponse(res, b))
24898 return ret, nil
24899 }
24900
24901 type ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall struct {
24902 s *Service
24903 resource string
24904 testiampermissionsrequest *TestIamPermissionsRequest
24905 urlParams_ gensupport.URLParams
24906 ctx_ context.Context
24907 header_ http.Header
24908 }
24909
24910 // TestIamPermissions: Returns permissions that a caller has on the specified
24911 // resource. If the resource does not exist, this will return an empty set of
24912 // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
24913 // used for building permission-aware UIs and command-line tools, not for
24914 // authorization checking. This operation may "fail open" without warning.
24915 //
24916 // - resource: REQUIRED: The resource for which the policy detail is being
24917 // requested. See Resource names
24918 // (https://cloud.google.com/apis/design/resource_names) for the appropriate
24919 // value for this field.
24920 func (r *ProjectsLocationsDatasetsHl7V2StoresService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall {
24921 c := &ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24922 c.resource = resource
24923 c.testiampermissionsrequest = testiampermissionsrequest
24924 return c
24925 }
24926
24927 // Fields allows partial responses to be retrieved. See
24928 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
24929 // details.
24930 func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall {
24931 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24932 return c
24933 }
24934
24935 // Context sets the context to be used in this call's Do method.
24936 func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall {
24937 c.ctx_ = ctx
24938 return c
24939 }
24940
24941 // Header returns a http.Header that can be modified by the caller to add
24942 // headers to the request.
24943 func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) Header() http.Header {
24944 if c.header_ == nil {
24945 c.header_ = make(http.Header)
24946 }
24947 return c.header_
24948 }
24949
24950 func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
24951 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
24952 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest)
24953 if err != nil {
24954 return nil, err
24955 }
24956 c.urlParams_.Set("alt", alt)
24957 c.urlParams_.Set("prettyPrint", "false")
24958 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions")
24959 urls += "?" + c.urlParams_.Encode()
24960 req, err := http.NewRequest("POST", urls, body)
24961 if err != nil {
24962 return nil, err
24963 }
24964 req.Header = reqHeaders
24965 googleapi.Expand(req.URL, map[string]string{
24966 "resource": c.resource,
24967 })
24968 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes()))
24969 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24970 }
24971
24972 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.testIamPermissions" call.
24973 // Any non-2xx status code is an error. Response headers are in either
24974 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
24975 // returned at all) in error.(*googleapi.Error).Header. Use
24976 // googleapi.IsNotModified to check whether the returned error was because
24977 // http.StatusNotModified was returned.
24978 func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
24979 gensupport.SetOptions(c.urlParams_, opts...)
24980 res, err := c.doRequest("json")
24981 if res != nil && res.StatusCode == http.StatusNotModified {
24982 if res.Body != nil {
24983 res.Body.Close()
24984 }
24985 return nil, gensupport.WrapError(&googleapi.Error{
24986 Code: res.StatusCode,
24987 Header: res.Header,
24988 })
24989 }
24990 if err != nil {
24991 return nil, err
24992 }
24993 defer googleapi.CloseBody(res)
24994 if err := googleapi.CheckResponse(res); err != nil {
24995 return nil, gensupport.WrapError(err)
24996 }
24997 ret := &TestIamPermissionsResponse{
24998 ServerResponse: googleapi.ServerResponse{
24999 Header: res.Header,
25000 HTTPStatusCode: res.StatusCode,
25001 },
25002 }
25003 target := &ret
25004 b, err := gensupport.DecodeResponseBytes(target, res)
25005 if err != nil {
25006 return nil, err
25007 }
25008 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.testIamPermissions", "response", internallog.HTTPResponse(res, b))
25009 return ret, nil
25010 }
25011
25012 type ProjectsLocationsDatasetsHl7V2StoresMessagesBatchGetCall struct {
25013 s *Service
25014 parent string
25015 urlParams_ gensupport.URLParams
25016 ifNoneMatch_ string
25017 ctx_ context.Context
25018 header_ http.Header
25019 }
25020
25021 // BatchGet: Gets multiple messages in the given HL7v2 store.
25022 //
25023 // - parent: Name of the HL7v2 store to retrieve messages from, in the format:
25024 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7v2S
25025 // tores/{hl7v2_store_id}`.
25026 func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) BatchGet(parent string) *ProjectsLocationsDatasetsHl7V2StoresMessagesBatchGetCall {
25027 c := &ProjectsLocationsDatasetsHl7V2StoresMessagesBatchGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25028 c.parent = parent
25029 return c
25030 }
25031
25032 // Ids sets the optional parameter "ids": The resource id of the HL7v2 messages
25033 // to retrieve in the format: `{message_id}`, where the full resource name is
25034 // `{parent}/messages/{message_id}` A maximum of 100 messages can be retrieved
25035 // in a batch. All 'ids' have to be under parent.
25036 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesBatchGetCall) Ids(ids ...string) *ProjectsLocationsDatasetsHl7V2StoresMessagesBatchGetCall {
25037 c.urlParams_.SetMulti("ids", append([]string{}, ids...))
25038 return c
25039 }
25040
25041 // View sets the optional parameter "view": Specifies the parts of the Messages
25042 // resource to return in the response. When unspecified, equivalent to BASIC.
25043 //
25044 // Possible values:
25045 //
25046 // "MESSAGE_VIEW_UNSPECIFIED" - Not specified, equivalent to FULL for
25047 //
25048 // getMessage, equivalent to BASIC for listMessages.
25049 //
25050 // "RAW_ONLY" - Server responses include all the message fields except
25051 //
25052 // parsed_data, and schematized_data fields.
25053 //
25054 // "PARSED_ONLY" - Server responses include all the message fields except
25055 //
25056 // data and schematized_data fields.
25057 //
25058 // "FULL" - Server responses include all the message fields.
25059 // "SCHEMATIZED_ONLY" - Server responses include all the message fields
25060 //
25061 // except data and parsed_data fields.
25062 //
25063 // "BASIC" - Server responses include only the name field.
25064 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesBatchGetCall) View(view string) *ProjectsLocationsDatasetsHl7V2StoresMessagesBatchGetCall {
25065 c.urlParams_.Set("view", view)
25066 return c
25067 }
25068
25069 // Fields allows partial responses to be retrieved. See
25070 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
25071 // details.
25072 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesBatchGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesBatchGetCall {
25073 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25074 return c
25075 }
25076
25077 // IfNoneMatch sets an optional parameter which makes the operation fail if the
25078 // object's ETag matches the given value. This is useful for getting updates
25079 // only after the object has changed since the last request.
25080 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesBatchGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsHl7V2StoresMessagesBatchGetCall {
25081 c.ifNoneMatch_ = entityTag
25082 return c
25083 }
25084
25085 // Context sets the context to be used in this call's Do method.
25086 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesBatchGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesBatchGetCall {
25087 c.ctx_ = ctx
25088 return c
25089 }
25090
25091 // Header returns a http.Header that can be modified by the caller to add
25092 // headers to the request.
25093 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesBatchGetCall) Header() http.Header {
25094 if c.header_ == nil {
25095 c.header_ = make(http.Header)
25096 }
25097 return c.header_
25098 }
25099
25100 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesBatchGetCall) doRequest(alt string) (*http.Response, error) {
25101 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
25102 if c.ifNoneMatch_ != "" {
25103 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25104 }
25105 c.urlParams_.Set("alt", alt)
25106 c.urlParams_.Set("prettyPrint", "false")
25107 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/messages:batchGet")
25108 urls += "?" + c.urlParams_.Encode()
25109 req, err := http.NewRequest("GET", urls, nil)
25110 if err != nil {
25111 return nil, err
25112 }
25113 req.Header = reqHeaders
25114 googleapi.Expand(req.URL, map[string]string{
25115 "parent": c.parent,
25116 })
25117 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.messages.batchGet", "request", internallog.HTTPRequest(req, nil))
25118 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25119 }
25120
25121 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.batchGet" call.
25122 // Any non-2xx status code is an error. Response headers are in either
25123 // *BatchGetMessagesResponse.ServerResponse.Header or (if a response was
25124 // returned at all) in error.(*googleapi.Error).Header. Use
25125 // googleapi.IsNotModified to check whether the returned error was because
25126 // http.StatusNotModified was returned.
25127 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesBatchGetCall) Do(opts ...googleapi.CallOption) (*BatchGetMessagesResponse, error) {
25128 gensupport.SetOptions(c.urlParams_, opts...)
25129 res, err := c.doRequest("json")
25130 if res != nil && res.StatusCode == http.StatusNotModified {
25131 if res.Body != nil {
25132 res.Body.Close()
25133 }
25134 return nil, gensupport.WrapError(&googleapi.Error{
25135 Code: res.StatusCode,
25136 Header: res.Header,
25137 })
25138 }
25139 if err != nil {
25140 return nil, err
25141 }
25142 defer googleapi.CloseBody(res)
25143 if err := googleapi.CheckResponse(res); err != nil {
25144 return nil, gensupport.WrapError(err)
25145 }
25146 ret := &BatchGetMessagesResponse{
25147 ServerResponse: googleapi.ServerResponse{
25148 Header: res.Header,
25149 HTTPStatusCode: res.StatusCode,
25150 },
25151 }
25152 target := &ret
25153 b, err := gensupport.DecodeResponseBytes(target, res)
25154 if err != nil {
25155 return nil, err
25156 }
25157 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.messages.batchGet", "response", internallog.HTTPResponse(res, b))
25158 return ret, nil
25159 }
25160
25161 type ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall struct {
25162 s *Service
25163 parent string
25164 createmessagerequest *CreateMessageRequest
25165 urlParams_ gensupport.URLParams
25166 ctx_ context.Context
25167 header_ http.Header
25168 }
25169
25170 // Create: Parses and stores an HL7v2 message. This method triggers an
25171 // asynchronous notification to any Pub/Sub topic configured in
25172 // Hl7V2Store.Hl7V2NotificationConfig, if the filtering matches the message. If
25173 // an MLLP adapter is configured to listen to a Pub/Sub topic, the adapter
25174 // transmits the message when a notification is received.
25175 //
25176 // - parent: The name of the HL7v2 store this message belongs to.
25177 func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) Create(parent string, createmessagerequest *CreateMessageRequest) *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall {
25178 c := &ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25179 c.parent = parent
25180 c.createmessagerequest = createmessagerequest
25181 return c
25182 }
25183
25184 // Fields allows partial responses to be retrieved. See
25185 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
25186 // details.
25187 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall {
25188 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25189 return c
25190 }
25191
25192 // Context sets the context to be used in this call's Do method.
25193 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall {
25194 c.ctx_ = ctx
25195 return c
25196 }
25197
25198 // Header returns a http.Header that can be modified by the caller to add
25199 // headers to the request.
25200 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall) Header() http.Header {
25201 if c.header_ == nil {
25202 c.header_ = make(http.Header)
25203 }
25204 return c.header_
25205 }
25206
25207 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall) doRequest(alt string) (*http.Response, error) {
25208 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
25209 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.createmessagerequest)
25210 if err != nil {
25211 return nil, err
25212 }
25213 c.urlParams_.Set("alt", alt)
25214 c.urlParams_.Set("prettyPrint", "false")
25215 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/messages")
25216 urls += "?" + c.urlParams_.Encode()
25217 req, err := http.NewRequest("POST", urls, body)
25218 if err != nil {
25219 return nil, err
25220 }
25221 req.Header = reqHeaders
25222 googleapi.Expand(req.URL, map[string]string{
25223 "parent": c.parent,
25224 })
25225 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.messages.create", "request", internallog.HTTPRequest(req, body.Bytes()))
25226 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25227 }
25228
25229 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.create" call.
25230 // Any non-2xx status code is an error. Response headers are in either
25231 // *Message.ServerResponse.Header or (if a response was returned at all) in
25232 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
25233 // whether the returned error was because http.StatusNotModified was returned.
25234 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall) Do(opts ...googleapi.CallOption) (*Message, error) {
25235 gensupport.SetOptions(c.urlParams_, opts...)
25236 res, err := c.doRequest("json")
25237 if res != nil && res.StatusCode == http.StatusNotModified {
25238 if res.Body != nil {
25239 res.Body.Close()
25240 }
25241 return nil, gensupport.WrapError(&googleapi.Error{
25242 Code: res.StatusCode,
25243 Header: res.Header,
25244 })
25245 }
25246 if err != nil {
25247 return nil, err
25248 }
25249 defer googleapi.CloseBody(res)
25250 if err := googleapi.CheckResponse(res); err != nil {
25251 return nil, gensupport.WrapError(err)
25252 }
25253 ret := &Message{
25254 ServerResponse: googleapi.ServerResponse{
25255 Header: res.Header,
25256 HTTPStatusCode: res.StatusCode,
25257 },
25258 }
25259 target := &ret
25260 b, err := gensupport.DecodeResponseBytes(target, res)
25261 if err != nil {
25262 return nil, err
25263 }
25264 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.messages.create", "response", internallog.HTTPResponse(res, b))
25265 return ret, nil
25266 }
25267
25268 type ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall struct {
25269 s *Service
25270 name string
25271 urlParams_ gensupport.URLParams
25272 ctx_ context.Context
25273 header_ http.Header
25274 }
25275
25276 // Delete: Deletes an HL7v2 message.
25277 //
25278 // - name: The resource name of the HL7v2 message to delete.
25279 func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) Delete(name string) *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall {
25280 c := &ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25281 c.name = name
25282 return c
25283 }
25284
25285 // Fields allows partial responses to be retrieved. See
25286 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
25287 // details.
25288 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall {
25289 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25290 return c
25291 }
25292
25293 // Context sets the context to be used in this call's Do method.
25294 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall {
25295 c.ctx_ = ctx
25296 return c
25297 }
25298
25299 // Header returns a http.Header that can be modified by the caller to add
25300 // headers to the request.
25301 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall) Header() http.Header {
25302 if c.header_ == nil {
25303 c.header_ = make(http.Header)
25304 }
25305 return c.header_
25306 }
25307
25308 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall) doRequest(alt string) (*http.Response, error) {
25309 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
25310 c.urlParams_.Set("alt", alt)
25311 c.urlParams_.Set("prettyPrint", "false")
25312 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
25313 urls += "?" + c.urlParams_.Encode()
25314 req, err := http.NewRequest("DELETE", urls, nil)
25315 if err != nil {
25316 return nil, err
25317 }
25318 req.Header = reqHeaders
25319 googleapi.Expand(req.URL, map[string]string{
25320 "name": c.name,
25321 })
25322 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.messages.delete", "request", internallog.HTTPRequest(req, nil))
25323 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25324 }
25325
25326 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.delete" call.
25327 // Any non-2xx status code is an error. Response headers are in either
25328 // *Empty.ServerResponse.Header or (if a response was returned at all) in
25329 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
25330 // whether the returned error was because http.StatusNotModified was returned.
25331 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
25332 gensupport.SetOptions(c.urlParams_, opts...)
25333 res, err := c.doRequest("json")
25334 if res != nil && res.StatusCode == http.StatusNotModified {
25335 if res.Body != nil {
25336 res.Body.Close()
25337 }
25338 return nil, gensupport.WrapError(&googleapi.Error{
25339 Code: res.StatusCode,
25340 Header: res.Header,
25341 })
25342 }
25343 if err != nil {
25344 return nil, err
25345 }
25346 defer googleapi.CloseBody(res)
25347 if err := googleapi.CheckResponse(res); err != nil {
25348 return nil, gensupport.WrapError(err)
25349 }
25350 ret := &Empty{
25351 ServerResponse: googleapi.ServerResponse{
25352 Header: res.Header,
25353 HTTPStatusCode: res.StatusCode,
25354 },
25355 }
25356 target := &ret
25357 b, err := gensupport.DecodeResponseBytes(target, res)
25358 if err != nil {
25359 return nil, err
25360 }
25361 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.messages.delete", "response", internallog.HTTPResponse(res, b))
25362 return ret, nil
25363 }
25364
25365 type ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall struct {
25366 s *Service
25367 name string
25368 urlParams_ gensupport.URLParams
25369 ifNoneMatch_ string
25370 ctx_ context.Context
25371 header_ http.Header
25372 }
25373
25374 // Get: Gets an HL7v2 message.
25375 //
25376 // - name: The resource name of the HL7v2 message to retrieve.
25377 func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) Get(name string) *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall {
25378 c := &ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25379 c.name = name
25380 return c
25381 }
25382
25383 // View sets the optional parameter "view": Specifies which parts of the
25384 // Message resource to return in the response. When unspecified, equivalent to
25385 // FULL.
25386 //
25387 // Possible values:
25388 //
25389 // "MESSAGE_VIEW_UNSPECIFIED" - Not specified, equivalent to FULL for
25390 //
25391 // getMessage, equivalent to BASIC for listMessages.
25392 //
25393 // "RAW_ONLY" - Server responses include all the message fields except
25394 //
25395 // parsed_data, and schematized_data fields.
25396 //
25397 // "PARSED_ONLY" - Server responses include all the message fields except
25398 //
25399 // data and schematized_data fields.
25400 //
25401 // "FULL" - Server responses include all the message fields.
25402 // "SCHEMATIZED_ONLY" - Server responses include all the message fields
25403 //
25404 // except data and parsed_data fields.
25405 //
25406 // "BASIC" - Server responses include only the name field.
25407 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) View(view string) *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall {
25408 c.urlParams_.Set("view", view)
25409 return c
25410 }
25411
25412 // Fields allows partial responses to be retrieved. See
25413 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
25414 // details.
25415 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall {
25416 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25417 return c
25418 }
25419
25420 // IfNoneMatch sets an optional parameter which makes the operation fail if the
25421 // object's ETag matches the given value. This is useful for getting updates
25422 // only after the object has changed since the last request.
25423 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall {
25424 c.ifNoneMatch_ = entityTag
25425 return c
25426 }
25427
25428 // Context sets the context to be used in this call's Do method.
25429 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall {
25430 c.ctx_ = ctx
25431 return c
25432 }
25433
25434 // Header returns a http.Header that can be modified by the caller to add
25435 // headers to the request.
25436 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) Header() http.Header {
25437 if c.header_ == nil {
25438 c.header_ = make(http.Header)
25439 }
25440 return c.header_
25441 }
25442
25443 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) doRequest(alt string) (*http.Response, error) {
25444 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
25445 if c.ifNoneMatch_ != "" {
25446 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25447 }
25448 c.urlParams_.Set("alt", alt)
25449 c.urlParams_.Set("prettyPrint", "false")
25450 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
25451 urls += "?" + c.urlParams_.Encode()
25452 req, err := http.NewRequest("GET", urls, nil)
25453 if err != nil {
25454 return nil, err
25455 }
25456 req.Header = reqHeaders
25457 googleapi.Expand(req.URL, map[string]string{
25458 "name": c.name,
25459 })
25460 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.messages.get", "request", internallog.HTTPRequest(req, nil))
25461 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25462 }
25463
25464 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.get" call.
25465 // Any non-2xx status code is an error. Response headers are in either
25466 // *Message.ServerResponse.Header or (if a response was returned at all) in
25467 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
25468 // whether the returned error was because http.StatusNotModified was returned.
25469 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) Do(opts ...googleapi.CallOption) (*Message, error) {
25470 gensupport.SetOptions(c.urlParams_, opts...)
25471 res, err := c.doRequest("json")
25472 if res != nil && res.StatusCode == http.StatusNotModified {
25473 if res.Body != nil {
25474 res.Body.Close()
25475 }
25476 return nil, gensupport.WrapError(&googleapi.Error{
25477 Code: res.StatusCode,
25478 Header: res.Header,
25479 })
25480 }
25481 if err != nil {
25482 return nil, err
25483 }
25484 defer googleapi.CloseBody(res)
25485 if err := googleapi.CheckResponse(res); err != nil {
25486 return nil, gensupport.WrapError(err)
25487 }
25488 ret := &Message{
25489 ServerResponse: googleapi.ServerResponse{
25490 Header: res.Header,
25491 HTTPStatusCode: res.StatusCode,
25492 },
25493 }
25494 target := &ret
25495 b, err := gensupport.DecodeResponseBytes(target, res)
25496 if err != nil {
25497 return nil, err
25498 }
25499 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.messages.get", "response", internallog.HTTPResponse(res, b))
25500 return ret, nil
25501 }
25502
25503 type ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall struct {
25504 s *Service
25505 parent string
25506 ingestmessagerequest *IngestMessageRequest
25507 urlParams_ gensupport.URLParams
25508 ctx_ context.Context
25509 header_ http.Header
25510 }
25511
25512 // Ingest: Parses and stores an HL7v2 message. This method triggers an
25513 // asynchronous notification to any Pub/Sub topic configured in
25514 // Hl7V2Store.Hl7V2NotificationConfig, if the filtering matches the message. If
25515 // an MLLP adapter is configured to listen to a Pub/Sub topic, the adapter
25516 // transmits the message when a notification is received. If the method is
25517 // successful, it generates a response containing an HL7v2 acknowledgment
25518 // (`ACK`) message. If the method encounters an error, it returns a negative
25519 // acknowledgment (`NACK`) message. This behavior is suitable for replying to
25520 // HL7v2 interface systems that expect these acknowledgments.
25521 //
25522 // - parent: The name of the HL7v2 store this message belongs to.
25523 func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) Ingest(parent string, ingestmessagerequest *IngestMessageRequest) *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall {
25524 c := &ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25525 c.parent = parent
25526 c.ingestmessagerequest = ingestmessagerequest
25527 return c
25528 }
25529
25530 // Fields allows partial responses to be retrieved. See
25531 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
25532 // details.
25533 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall {
25534 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25535 return c
25536 }
25537
25538 // Context sets the context to be used in this call's Do method.
25539 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall {
25540 c.ctx_ = ctx
25541 return c
25542 }
25543
25544 // Header returns a http.Header that can be modified by the caller to add
25545 // headers to the request.
25546 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall) Header() http.Header {
25547 if c.header_ == nil {
25548 c.header_ = make(http.Header)
25549 }
25550 return c.header_
25551 }
25552
25553 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall) doRequest(alt string) (*http.Response, error) {
25554 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
25555 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.ingestmessagerequest)
25556 if err != nil {
25557 return nil, err
25558 }
25559 c.urlParams_.Set("alt", alt)
25560 c.urlParams_.Set("prettyPrint", "false")
25561 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/messages:ingest")
25562 urls += "?" + c.urlParams_.Encode()
25563 req, err := http.NewRequest("POST", urls, body)
25564 if err != nil {
25565 return nil, err
25566 }
25567 req.Header = reqHeaders
25568 googleapi.Expand(req.URL, map[string]string{
25569 "parent": c.parent,
25570 })
25571 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.messages.ingest", "request", internallog.HTTPRequest(req, body.Bytes()))
25572 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25573 }
25574
25575 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.ingest" call.
25576 // Any non-2xx status code is an error. Response headers are in either
25577 // *IngestMessageResponse.ServerResponse.Header or (if a response was returned
25578 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
25579 // check whether the returned error was because http.StatusNotModified was
25580 // returned.
25581 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall) Do(opts ...googleapi.CallOption) (*IngestMessageResponse, error) {
25582 gensupport.SetOptions(c.urlParams_, opts...)
25583 res, err := c.doRequest("json")
25584 if res != nil && res.StatusCode == http.StatusNotModified {
25585 if res.Body != nil {
25586 res.Body.Close()
25587 }
25588 return nil, gensupport.WrapError(&googleapi.Error{
25589 Code: res.StatusCode,
25590 Header: res.Header,
25591 })
25592 }
25593 if err != nil {
25594 return nil, err
25595 }
25596 defer googleapi.CloseBody(res)
25597 if err := googleapi.CheckResponse(res); err != nil {
25598 return nil, gensupport.WrapError(err)
25599 }
25600 ret := &IngestMessageResponse{
25601 ServerResponse: googleapi.ServerResponse{
25602 Header: res.Header,
25603 HTTPStatusCode: res.StatusCode,
25604 },
25605 }
25606 target := &ret
25607 b, err := gensupport.DecodeResponseBytes(target, res)
25608 if err != nil {
25609 return nil, err
25610 }
25611 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.messages.ingest", "response", internallog.HTTPResponse(res, b))
25612 return ret, nil
25613 }
25614
25615 type ProjectsLocationsDatasetsHl7V2StoresMessagesListCall struct {
25616 s *Service
25617 parent string
25618 urlParams_ gensupport.URLParams
25619 ifNoneMatch_ string
25620 ctx_ context.Context
25621 header_ http.Header
25622 }
25623
25624 // List: Lists all the messages in the given HL7v2 store with support for
25625 // filtering. Note: HL7v2 messages are indexed asynchronously, so there might
25626 // be a slight delay between the time a message is created and when it can be
25627 // found through a filter.
25628 //
25629 // - parent: Name of the HL7v2 store to retrieve messages from.
25630 func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) List(parent string) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall {
25631 c := &ProjectsLocationsDatasetsHl7V2StoresMessagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25632 c.parent = parent
25633 return c
25634 }
25635
25636 // Filter sets the optional parameter "filter": Restricts messages returned to
25637 // those matching a filter. The following syntax is available: * A string field
25638 // value can be written as text inside quotation marks, for example "query
25639 // text". The only valid relational operation for text fields is equality
25640 // (`=`), where text is searched within the field, rather than having the field
25641 // be equal to the text. For example, "Comment = great" returns messages with
25642 // `great` in the comment field. * A number field value can be written as an
25643 // integer, a decimal, or an exponential. The valid relational operators for
25644 // number fields are the equality operator (`=`), along with the less
25645 // than/greater than operators (`<`, `<=`, `>`, `>=`). Note that there is no
25646 // inequality (`!=`) operator. You can prepend the `NOT` operator to an
25647 // expression to negate it. * A date field value must be written in
25648 // `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format.
25649 // Leading zeros are required for one-digit months and days. The valid
25650 // relational operators for date fields are the equality operator (`=`) , along
25651 // with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that
25652 // there is no inequality (`!=`) operator. You can prepend the `NOT` operator
25653 // to an expression to negate it. * Multiple field query expressions can be
25654 // combined in one query by adding `AND` or `OR` operators between the
25655 // expressions. If a boolean operator appears within a quoted string, it is not
25656 // treated as special, it's just another part of the character string to be
25657 // matched. You can prepend the `NOT` operator to an expression to negate it.
25658 // Fields/functions available for filtering are: * `message_type`, from the
25659 // MSH-9.1 field. For example, `NOT message_type = "ADT". * `send_date` or
25660 // `sendDate`, the YYYY-MM-DD date the message was sent in the dataset's
25661 // time_zone, from the MSH-7 segment. For example, `send_date < "2017-01-02".
25662 // * `send_time`, the timestamp when the message was sent, using the RFC3339
25663 // time format for comparisons, from the MSH-7 segment. For example, `send_time
25664 // < "2017-01-02T00:00:00-05:00". * `create_time`, the timestamp when the
25665 // message was created in the HL7v2 store. Use the RFC3339 time format for
25666 // comparisons. For example, `create_time < "2017-01-02T00:00:00-05:00". *
25667 // `send_facility`, the care center that the message came from, from the MSH-4
25668 // segment. For example, `send_facility = "ABC". * `PatientId(value, type)`,
25669 // which matches if the message lists a patient having an ID of the given value
25670 // and type in the PID-2, PID-3, or PID-4 segments. For example,
25671 // `PatientId("123456", "MRN")`. * `labels.x`, a string value of the label with
25672 // key `x` as set using the Message.labels map. For example,
25673 // `labels."priority"="high". The operator `:*` can be used to assert the
25674 // existence of a label. For example, `labels."priority":*`.
25675 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Filter(filter string) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall {
25676 c.urlParams_.Set("filter", filter)
25677 return c
25678 }
25679
25680 // OrderBy sets the optional parameter "orderBy": Orders messages returned by
25681 // the specified order_by clause. Syntax:
25682 // https://cloud.google.com/apis/design/design_patterns#sorting_order Fields
25683 // available for ordering are: * `send_time`
25684 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) OrderBy(orderBy string) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall {
25685 c.urlParams_.Set("orderBy", orderBy)
25686 return c
25687 }
25688
25689 // PageSize sets the optional parameter "pageSize": Limit on the number of
25690 // messages to return in a single response. If not specified, 100 is used. May
25691 // not be larger than 1000.
25692 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall {
25693 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
25694 return c
25695 }
25696
25697 // PageToken sets the optional parameter "pageToken": The next_page_token value
25698 // returned from the previous List request, if any.
25699 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall {
25700 c.urlParams_.Set("pageToken", pageToken)
25701 return c
25702 }
25703
25704 // View sets the optional parameter "view": Specifies the parts of the Message
25705 // to return in the response. When unspecified, equivalent to BASIC. Setting
25706 // this to anything other than BASIC with a `page_size` larger than the default
25707 // can generate a large response, which impacts the performance of this method.
25708 //
25709 // Possible values:
25710 //
25711 // "MESSAGE_VIEW_UNSPECIFIED" - Not specified, equivalent to FULL for
25712 //
25713 // getMessage, equivalent to BASIC for listMessages.
25714 //
25715 // "RAW_ONLY" - Server responses include all the message fields except
25716 //
25717 // parsed_data, and schematized_data fields.
25718 //
25719 // "PARSED_ONLY" - Server responses include all the message fields except
25720 //
25721 // data and schematized_data fields.
25722 //
25723 // "FULL" - Server responses include all the message fields.
25724 // "SCHEMATIZED_ONLY" - Server responses include all the message fields
25725 //
25726 // except data and parsed_data fields.
25727 //
25728 // "BASIC" - Server responses include only the name field.
25729 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) View(view string) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall {
25730 c.urlParams_.Set("view", view)
25731 return c
25732 }
25733
25734 // Fields allows partial responses to be retrieved. See
25735 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
25736 // details.
25737 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall {
25738 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25739 return c
25740 }
25741
25742 // IfNoneMatch sets an optional parameter which makes the operation fail if the
25743 // object's ETag matches the given value. This is useful for getting updates
25744 // only after the object has changed since the last request.
25745 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall {
25746 c.ifNoneMatch_ = entityTag
25747 return c
25748 }
25749
25750 // Context sets the context to be used in this call's Do method.
25751 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall {
25752 c.ctx_ = ctx
25753 return c
25754 }
25755
25756 // Header returns a http.Header that can be modified by the caller to add
25757 // headers to the request.
25758 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Header() http.Header {
25759 if c.header_ == nil {
25760 c.header_ = make(http.Header)
25761 }
25762 return c.header_
25763 }
25764
25765 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) doRequest(alt string) (*http.Response, error) {
25766 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
25767 if c.ifNoneMatch_ != "" {
25768 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25769 }
25770 c.urlParams_.Set("alt", alt)
25771 c.urlParams_.Set("prettyPrint", "false")
25772 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/messages")
25773 urls += "?" + c.urlParams_.Encode()
25774 req, err := http.NewRequest("GET", urls, nil)
25775 if err != nil {
25776 return nil, err
25777 }
25778 req.Header = reqHeaders
25779 googleapi.Expand(req.URL, map[string]string{
25780 "parent": c.parent,
25781 })
25782 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.messages.list", "request", internallog.HTTPRequest(req, nil))
25783 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25784 }
25785
25786 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.list" call.
25787 // Any non-2xx status code is an error. Response headers are in either
25788 // *ListMessagesResponse.ServerResponse.Header or (if a response was returned
25789 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
25790 // check whether the returned error was because http.StatusNotModified was
25791 // returned.
25792 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Do(opts ...googleapi.CallOption) (*ListMessagesResponse, error) {
25793 gensupport.SetOptions(c.urlParams_, opts...)
25794 res, err := c.doRequest("json")
25795 if res != nil && res.StatusCode == http.StatusNotModified {
25796 if res.Body != nil {
25797 res.Body.Close()
25798 }
25799 return nil, gensupport.WrapError(&googleapi.Error{
25800 Code: res.StatusCode,
25801 Header: res.Header,
25802 })
25803 }
25804 if err != nil {
25805 return nil, err
25806 }
25807 defer googleapi.CloseBody(res)
25808 if err := googleapi.CheckResponse(res); err != nil {
25809 return nil, gensupport.WrapError(err)
25810 }
25811 ret := &ListMessagesResponse{
25812 ServerResponse: googleapi.ServerResponse{
25813 Header: res.Header,
25814 HTTPStatusCode: res.StatusCode,
25815 },
25816 }
25817 target := &ret
25818 b, err := gensupport.DecodeResponseBytes(target, res)
25819 if err != nil {
25820 return nil, err
25821 }
25822 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.messages.list", "response", internallog.HTTPResponse(res, b))
25823 return ret, nil
25824 }
25825
25826 // Pages invokes f for each page of results.
25827 // A non-nil error returned from f will halt the iteration.
25828 // The provided context supersedes any context provided to the Context method.
25829 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Pages(ctx context.Context, f func(*ListMessagesResponse) error) error {
25830 c.ctx_ = ctx
25831 defer c.PageToken(c.urlParams_.Get("pageToken"))
25832 for {
25833 x, err := c.Do()
25834 if err != nil {
25835 return err
25836 }
25837 if err := f(x); err != nil {
25838 return err
25839 }
25840 if x.NextPageToken == "" {
25841 return nil
25842 }
25843 c.PageToken(x.NextPageToken)
25844 }
25845 }
25846
25847 type ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall struct {
25848 s *Service
25849 name string
25850 message *Message
25851 urlParams_ gensupport.URLParams
25852 ctx_ context.Context
25853 header_ http.Header
25854 }
25855
25856 // Patch: Update the message. The contents of the message in Message.data and
25857 // data extracted from the contents such as Message.create_time can't be
25858 // altered. Only the Message.labels field is allowed to be updated. The labels
25859 // in the request are merged with the existing set of labels. Existing labels
25860 // with the same keys are updated.
25861 //
25862 // - name: Output only. Resource name of the Message, of the form
25863 // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2S
25864 // tores/{hl7_v2_store_id}/messages/{message_id}`. Assigned by the server.
25865 func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) Patch(name string, message *Message) *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall {
25866 c := &ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25867 c.name = name
25868 c.message = message
25869 return c
25870 }
25871
25872 // UpdateMask sets the optional parameter "updateMask": Required. The update
25873 // mask applies to the resource. For the `FieldMask` definition, see
25874 // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
25875 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall {
25876 c.urlParams_.Set("updateMask", updateMask)
25877 return c
25878 }
25879
25880 // Fields allows partial responses to be retrieved. See
25881 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
25882 // details.
25883 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall {
25884 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25885 return c
25886 }
25887
25888 // Context sets the context to be used in this call's Do method.
25889 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall {
25890 c.ctx_ = ctx
25891 return c
25892 }
25893
25894 // Header returns a http.Header that can be modified by the caller to add
25895 // headers to the request.
25896 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) Header() http.Header {
25897 if c.header_ == nil {
25898 c.header_ = make(http.Header)
25899 }
25900 return c.header_
25901 }
25902
25903 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) doRequest(alt string) (*http.Response, error) {
25904 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
25905 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.message)
25906 if err != nil {
25907 return nil, err
25908 }
25909 c.urlParams_.Set("alt", alt)
25910 c.urlParams_.Set("prettyPrint", "false")
25911 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
25912 urls += "?" + c.urlParams_.Encode()
25913 req, err := http.NewRequest("PATCH", urls, body)
25914 if err != nil {
25915 return nil, err
25916 }
25917 req.Header = reqHeaders
25918 googleapi.Expand(req.URL, map[string]string{
25919 "name": c.name,
25920 })
25921 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.messages.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
25922 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25923 }
25924
25925 // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.patch" call.
25926 // Any non-2xx status code is an error. Response headers are in either
25927 // *Message.ServerResponse.Header or (if a response was returned at all) in
25928 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
25929 // whether the returned error was because http.StatusNotModified was returned.
25930 func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) Do(opts ...googleapi.CallOption) (*Message, error) {
25931 gensupport.SetOptions(c.urlParams_, opts...)
25932 res, err := c.doRequest("json")
25933 if res != nil && res.StatusCode == http.StatusNotModified {
25934 if res.Body != nil {
25935 res.Body.Close()
25936 }
25937 return nil, gensupport.WrapError(&googleapi.Error{
25938 Code: res.StatusCode,
25939 Header: res.Header,
25940 })
25941 }
25942 if err != nil {
25943 return nil, err
25944 }
25945 defer googleapi.CloseBody(res)
25946 if err := googleapi.CheckResponse(res); err != nil {
25947 return nil, gensupport.WrapError(err)
25948 }
25949 ret := &Message{
25950 ServerResponse: googleapi.ServerResponse{
25951 Header: res.Header,
25952 HTTPStatusCode: res.StatusCode,
25953 },
25954 }
25955 target := &ret
25956 b, err := gensupport.DecodeResponseBytes(target, res)
25957 if err != nil {
25958 return nil, err
25959 }
25960 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.hl7V2Stores.messages.patch", "response", internallog.HTTPResponse(res, b))
25961 return ret, nil
25962 }
25963
25964 type ProjectsLocationsDatasetsOperationsCancelCall struct {
25965 s *Service
25966 name string
25967 canceloperationrequest *CancelOperationRequest
25968 urlParams_ gensupport.URLParams
25969 ctx_ context.Context
25970 header_ http.Header
25971 }
25972
25973 // Cancel: Starts asynchronous cancellation on a long-running operation. The
25974 // server makes a best effort to cancel the operation, but success is not
25975 // guaranteed. If the server doesn't support this method, it returns
25976 // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
25977 // other methods to check whether the cancellation succeeded or whether the
25978 // operation completed despite cancellation. On successful cancellation, the
25979 // operation is not deleted; instead, it becomes an operation with an
25980 // Operation.error value with a google.rpc.Status.code of `1`, corresponding to
25981 // `Code.CANCELLED`.
25982 //
25983 // - name: The name of the operation resource to be cancelled.
25984 func (r *ProjectsLocationsDatasetsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsDatasetsOperationsCancelCall {
25985 c := &ProjectsLocationsDatasetsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25986 c.name = name
25987 c.canceloperationrequest = canceloperationrequest
25988 return c
25989 }
25990
25991 // Fields allows partial responses to be retrieved. See
25992 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
25993 // details.
25994 func (c *ProjectsLocationsDatasetsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsCancelCall {
25995 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25996 return c
25997 }
25998
25999 // Context sets the context to be used in this call's Do method.
26000 func (c *ProjectsLocationsDatasetsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsCancelCall {
26001 c.ctx_ = ctx
26002 return c
26003 }
26004
26005 // Header returns a http.Header that can be modified by the caller to add
26006 // headers to the request.
26007 func (c *ProjectsLocationsDatasetsOperationsCancelCall) Header() http.Header {
26008 if c.header_ == nil {
26009 c.header_ = make(http.Header)
26010 }
26011 return c.header_
26012 }
26013
26014 func (c *ProjectsLocationsDatasetsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
26015 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
26016 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.canceloperationrequest)
26017 if err != nil {
26018 return nil, err
26019 }
26020 c.urlParams_.Set("alt", alt)
26021 c.urlParams_.Set("prettyPrint", "false")
26022 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:cancel")
26023 urls += "?" + c.urlParams_.Encode()
26024 req, err := http.NewRequest("POST", urls, body)
26025 if err != nil {
26026 return nil, err
26027 }
26028 req.Header = reqHeaders
26029 googleapi.Expand(req.URL, map[string]string{
26030 "name": c.name,
26031 })
26032 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.operations.cancel", "request", internallog.HTTPRequest(req, body.Bytes()))
26033 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26034 }
26035
26036 // Do executes the "healthcare.projects.locations.datasets.operations.cancel" call.
26037 // Any non-2xx status code is an error. Response headers are in either
26038 // *Empty.ServerResponse.Header or (if a response was returned at all) in
26039 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
26040 // whether the returned error was because http.StatusNotModified was returned.
26041 func (c *ProjectsLocationsDatasetsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
26042 gensupport.SetOptions(c.urlParams_, opts...)
26043 res, err := c.doRequest("json")
26044 if res != nil && res.StatusCode == http.StatusNotModified {
26045 if res.Body != nil {
26046 res.Body.Close()
26047 }
26048 return nil, gensupport.WrapError(&googleapi.Error{
26049 Code: res.StatusCode,
26050 Header: res.Header,
26051 })
26052 }
26053 if err != nil {
26054 return nil, err
26055 }
26056 defer googleapi.CloseBody(res)
26057 if err := googleapi.CheckResponse(res); err != nil {
26058 return nil, gensupport.WrapError(err)
26059 }
26060 ret := &Empty{
26061 ServerResponse: googleapi.ServerResponse{
26062 Header: res.Header,
26063 HTTPStatusCode: res.StatusCode,
26064 },
26065 }
26066 target := &ret
26067 b, err := gensupport.DecodeResponseBytes(target, res)
26068 if err != nil {
26069 return nil, err
26070 }
26071 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.operations.cancel", "response", internallog.HTTPResponse(res, b))
26072 return ret, nil
26073 }
26074
26075 type ProjectsLocationsDatasetsOperationsGetCall struct {
26076 s *Service
26077 name string
26078 urlParams_ gensupport.URLParams
26079 ifNoneMatch_ string
26080 ctx_ context.Context
26081 header_ http.Header
26082 }
26083
26084 // Get: Gets the latest state of a long-running operation. Clients can use this
26085 // method to poll the operation result at intervals as recommended by the API
26086 // service.
26087 //
26088 // - name: The name of the operation resource.
26089 func (r *ProjectsLocationsDatasetsOperationsService) Get(name string) *ProjectsLocationsDatasetsOperationsGetCall {
26090 c := &ProjectsLocationsDatasetsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26091 c.name = name
26092 return c
26093 }
26094
26095 // Fields allows partial responses to be retrieved. See
26096 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
26097 // details.
26098 func (c *ProjectsLocationsDatasetsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsGetCall {
26099 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26100 return c
26101 }
26102
26103 // IfNoneMatch sets an optional parameter which makes the operation fail if the
26104 // object's ETag matches the given value. This is useful for getting updates
26105 // only after the object has changed since the last request.
26106 func (c *ProjectsLocationsDatasetsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsOperationsGetCall {
26107 c.ifNoneMatch_ = entityTag
26108 return c
26109 }
26110
26111 // Context sets the context to be used in this call's Do method.
26112 func (c *ProjectsLocationsDatasetsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsGetCall {
26113 c.ctx_ = ctx
26114 return c
26115 }
26116
26117 // Header returns a http.Header that can be modified by the caller to add
26118 // headers to the request.
26119 func (c *ProjectsLocationsDatasetsOperationsGetCall) Header() http.Header {
26120 if c.header_ == nil {
26121 c.header_ = make(http.Header)
26122 }
26123 return c.header_
26124 }
26125
26126 func (c *ProjectsLocationsDatasetsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
26127 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
26128 if c.ifNoneMatch_ != "" {
26129 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26130 }
26131 c.urlParams_.Set("alt", alt)
26132 c.urlParams_.Set("prettyPrint", "false")
26133 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
26134 urls += "?" + c.urlParams_.Encode()
26135 req, err := http.NewRequest("GET", urls, nil)
26136 if err != nil {
26137 return nil, err
26138 }
26139 req.Header = reqHeaders
26140 googleapi.Expand(req.URL, map[string]string{
26141 "name": c.name,
26142 })
26143 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.operations.get", "request", internallog.HTTPRequest(req, nil))
26144 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26145 }
26146
26147 // Do executes the "healthcare.projects.locations.datasets.operations.get" call.
26148 // Any non-2xx status code is an error. Response headers are in either
26149 // *Operation.ServerResponse.Header or (if a response was returned at all) in
26150 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
26151 // whether the returned error was because http.StatusNotModified was returned.
26152 func (c *ProjectsLocationsDatasetsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
26153 gensupport.SetOptions(c.urlParams_, opts...)
26154 res, err := c.doRequest("json")
26155 if res != nil && res.StatusCode == http.StatusNotModified {
26156 if res.Body != nil {
26157 res.Body.Close()
26158 }
26159 return nil, gensupport.WrapError(&googleapi.Error{
26160 Code: res.StatusCode,
26161 Header: res.Header,
26162 })
26163 }
26164 if err != nil {
26165 return nil, err
26166 }
26167 defer googleapi.CloseBody(res)
26168 if err := googleapi.CheckResponse(res); err != nil {
26169 return nil, gensupport.WrapError(err)
26170 }
26171 ret := &Operation{
26172 ServerResponse: googleapi.ServerResponse{
26173 Header: res.Header,
26174 HTTPStatusCode: res.StatusCode,
26175 },
26176 }
26177 target := &ret
26178 b, err := gensupport.DecodeResponseBytes(target, res)
26179 if err != nil {
26180 return nil, err
26181 }
26182 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.operations.get", "response", internallog.HTTPResponse(res, b))
26183 return ret, nil
26184 }
26185
26186 type ProjectsLocationsDatasetsOperationsListCall struct {
26187 s *Service
26188 name string
26189 urlParams_ gensupport.URLParams
26190 ifNoneMatch_ string
26191 ctx_ context.Context
26192 header_ http.Header
26193 }
26194
26195 // List: Lists operations that match the specified filter in the request. If
26196 // the server doesn't support this method, it returns `UNIMPLEMENTED`.
26197 //
26198 // - name: The name of the operation's parent resource.
26199 func (r *ProjectsLocationsDatasetsOperationsService) List(name string) *ProjectsLocationsDatasetsOperationsListCall {
26200 c := &ProjectsLocationsDatasetsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26201 c.name = name
26202 return c
26203 }
26204
26205 // Filter sets the optional parameter "filter": The standard list filter.
26206 func (c *ProjectsLocationsDatasetsOperationsListCall) Filter(filter string) *ProjectsLocationsDatasetsOperationsListCall {
26207 c.urlParams_.Set("filter", filter)
26208 return c
26209 }
26210
26211 // PageSize sets the optional parameter "pageSize": The standard list page
26212 // size.
26213 func (c *ProjectsLocationsDatasetsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsOperationsListCall {
26214 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
26215 return c
26216 }
26217
26218 // PageToken sets the optional parameter "pageToken": The standard list page
26219 // token.
26220 func (c *ProjectsLocationsDatasetsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsOperationsListCall {
26221 c.urlParams_.Set("pageToken", pageToken)
26222 return c
26223 }
26224
26225 // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess":
26226 // When set to `true`, operations that are reachable are returned as normal,
26227 // and those that are unreachable are returned in the
26228 // ListOperationsResponse.unreachable field. This can only be `true` when
26229 // reading across collections. For example, when `parent` is set to
26230 // "projects/example/locations/-". This field is not supported by default and
26231 // will result in an `UNIMPLEMENTED` error if set unless explicitly documented
26232 // otherwise in service or product specific documentation.
26233 func (c *ProjectsLocationsDatasetsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsDatasetsOperationsListCall {
26234 c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess))
26235 return c
26236 }
26237
26238 // Fields allows partial responses to be retrieved. See
26239 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
26240 // details.
26241 func (c *ProjectsLocationsDatasetsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsListCall {
26242 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26243 return c
26244 }
26245
26246 // IfNoneMatch sets an optional parameter which makes the operation fail if the
26247 // object's ETag matches the given value. This is useful for getting updates
26248 // only after the object has changed since the last request.
26249 func (c *ProjectsLocationsDatasetsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsOperationsListCall {
26250 c.ifNoneMatch_ = entityTag
26251 return c
26252 }
26253
26254 // Context sets the context to be used in this call's Do method.
26255 func (c *ProjectsLocationsDatasetsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsListCall {
26256 c.ctx_ = ctx
26257 return c
26258 }
26259
26260 // Header returns a http.Header that can be modified by the caller to add
26261 // headers to the request.
26262 func (c *ProjectsLocationsDatasetsOperationsListCall) Header() http.Header {
26263 if c.header_ == nil {
26264 c.header_ = make(http.Header)
26265 }
26266 return c.header_
26267 }
26268
26269 func (c *ProjectsLocationsDatasetsOperationsListCall) doRequest(alt string) (*http.Response, error) {
26270 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
26271 if c.ifNoneMatch_ != "" {
26272 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26273 }
26274 c.urlParams_.Set("alt", alt)
26275 c.urlParams_.Set("prettyPrint", "false")
26276 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/operations")
26277 urls += "?" + c.urlParams_.Encode()
26278 req, err := http.NewRequest("GET", urls, nil)
26279 if err != nil {
26280 return nil, err
26281 }
26282 req.Header = reqHeaders
26283 googleapi.Expand(req.URL, map[string]string{
26284 "name": c.name,
26285 })
26286 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.operations.list", "request", internallog.HTTPRequest(req, nil))
26287 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26288 }
26289
26290 // Do executes the "healthcare.projects.locations.datasets.operations.list" call.
26291 // Any non-2xx status code is an error. Response headers are in either
26292 // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
26293 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
26294 // check whether the returned error was because http.StatusNotModified was
26295 // returned.
26296 func (c *ProjectsLocationsDatasetsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
26297 gensupport.SetOptions(c.urlParams_, opts...)
26298 res, err := c.doRequest("json")
26299 if res != nil && res.StatusCode == http.StatusNotModified {
26300 if res.Body != nil {
26301 res.Body.Close()
26302 }
26303 return nil, gensupport.WrapError(&googleapi.Error{
26304 Code: res.StatusCode,
26305 Header: res.Header,
26306 })
26307 }
26308 if err != nil {
26309 return nil, err
26310 }
26311 defer googleapi.CloseBody(res)
26312 if err := googleapi.CheckResponse(res); err != nil {
26313 return nil, gensupport.WrapError(err)
26314 }
26315 ret := &ListOperationsResponse{
26316 ServerResponse: googleapi.ServerResponse{
26317 Header: res.Header,
26318 HTTPStatusCode: res.StatusCode,
26319 },
26320 }
26321 target := &ret
26322 b, err := gensupport.DecodeResponseBytes(target, res)
26323 if err != nil {
26324 return nil, err
26325 }
26326 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.datasets.operations.list", "response", internallog.HTTPResponse(res, b))
26327 return ret, nil
26328 }
26329
26330 // Pages invokes f for each page of results.
26331 // A non-nil error returned from f will halt the iteration.
26332 // The provided context supersedes any context provided to the Context method.
26333 func (c *ProjectsLocationsDatasetsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
26334 c.ctx_ = ctx
26335 defer c.PageToken(c.urlParams_.Get("pageToken"))
26336 for {
26337 x, err := c.Do()
26338 if err != nil {
26339 return err
26340 }
26341 if err := f(x); err != nil {
26342 return err
26343 }
26344 if x.NextPageToken == "" {
26345 return nil
26346 }
26347 c.PageToken(x.NextPageToken)
26348 }
26349 }
26350
26351 type ProjectsLocationsServicesNlpAnalyzeEntitiesCall struct {
26352 s *Service
26353 nlpService string
26354 analyzeentitiesrequest *AnalyzeEntitiesRequest
26355 urlParams_ gensupport.URLParams
26356 ctx_ context.Context
26357 header_ http.Header
26358 }
26359
26360 // AnalyzeEntities: Analyze heathcare entity in a document. Its response
26361 // includes the recognized entity mentions and the relationships between them.
26362 // AnalyzeEntities uses context aware models to detect entities. This method
26363 // can only analyze documents written in English.
26364 //
26365 // - nlpService: The resource name of the service of the form:
26366 // "projects/{project_id}/locations/{location_id}/services/nlp".
26367 func (r *ProjectsLocationsServicesNlpService) AnalyzeEntities(nlpService string, analyzeentitiesrequest *AnalyzeEntitiesRequest) *ProjectsLocationsServicesNlpAnalyzeEntitiesCall {
26368 c := &ProjectsLocationsServicesNlpAnalyzeEntitiesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26369 c.nlpService = nlpService
26370 c.analyzeentitiesrequest = analyzeentitiesrequest
26371 return c
26372 }
26373
26374 // Fields allows partial responses to be retrieved. See
26375 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
26376 // details.
26377 func (c *ProjectsLocationsServicesNlpAnalyzeEntitiesCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesNlpAnalyzeEntitiesCall {
26378 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26379 return c
26380 }
26381
26382 // Context sets the context to be used in this call's Do method.
26383 func (c *ProjectsLocationsServicesNlpAnalyzeEntitiesCall) Context(ctx context.Context) *ProjectsLocationsServicesNlpAnalyzeEntitiesCall {
26384 c.ctx_ = ctx
26385 return c
26386 }
26387
26388 // Header returns a http.Header that can be modified by the caller to add
26389 // headers to the request.
26390 func (c *ProjectsLocationsServicesNlpAnalyzeEntitiesCall) Header() http.Header {
26391 if c.header_ == nil {
26392 c.header_ = make(http.Header)
26393 }
26394 return c.header_
26395 }
26396
26397 func (c *ProjectsLocationsServicesNlpAnalyzeEntitiesCall) doRequest(alt string) (*http.Response, error) {
26398 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
26399 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.analyzeentitiesrequest)
26400 if err != nil {
26401 return nil, err
26402 }
26403 c.urlParams_.Set("alt", alt)
26404 c.urlParams_.Set("prettyPrint", "false")
26405 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+nlpService}:analyzeEntities")
26406 urls += "?" + c.urlParams_.Encode()
26407 req, err := http.NewRequest("POST", urls, body)
26408 if err != nil {
26409 return nil, err
26410 }
26411 req.Header = reqHeaders
26412 googleapi.Expand(req.URL, map[string]string{
26413 "nlpService": c.nlpService,
26414 })
26415 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "healthcare.projects.locations.services.nlp.analyzeEntities", "request", internallog.HTTPRequest(req, body.Bytes()))
26416 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26417 }
26418
26419 // Do executes the "healthcare.projects.locations.services.nlp.analyzeEntities" call.
26420 // Any non-2xx status code is an error. Response headers are in either
26421 // *AnalyzeEntitiesResponse.ServerResponse.Header or (if a response was
26422 // returned at all) in error.(*googleapi.Error).Header. Use
26423 // googleapi.IsNotModified to check whether the returned error was because
26424 // http.StatusNotModified was returned.
26425 func (c *ProjectsLocationsServicesNlpAnalyzeEntitiesCall) Do(opts ...googleapi.CallOption) (*AnalyzeEntitiesResponse, error) {
26426 gensupport.SetOptions(c.urlParams_, opts...)
26427 res, err := c.doRequest("json")
26428 if res != nil && res.StatusCode == http.StatusNotModified {
26429 if res.Body != nil {
26430 res.Body.Close()
26431 }
26432 return nil, gensupport.WrapError(&googleapi.Error{
26433 Code: res.StatusCode,
26434 Header: res.Header,
26435 })
26436 }
26437 if err != nil {
26438 return nil, err
26439 }
26440 defer googleapi.CloseBody(res)
26441 if err := googleapi.CheckResponse(res); err != nil {
26442 return nil, gensupport.WrapError(err)
26443 }
26444 ret := &AnalyzeEntitiesResponse{
26445 ServerResponse: googleapi.ServerResponse{
26446 Header: res.Header,
26447 HTTPStatusCode: res.StatusCode,
26448 },
26449 }
26450 target := &ret
26451 b, err := gensupport.DecodeResponseBytes(target, res)
26452 if err != nil {
26453 return nil, err
26454 }
26455 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "healthcare.projects.locations.services.nlp.analyzeEntities", "response", internallog.HTTPResponse(res, b))
26456 return ret, nil
26457 }