/
classes.rb
5152 lines (4303 loc) · 216 KB
/
classes.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module HealthcareV1beta1
# Activates the latest revision of the specified Consent by committing a new
# revision with `state` updated to `ACTIVE`. If the latest revision of the given
# consent is in the `ACTIVE` state, no new revision is committed.
class ActivateConsentRequest
include Google::Apis::Core::Hashable
# Required. The resource name of the consent artifact that contains proof of the
# end user's consent, of the form `projects/`project_id`/locations/`location_id`/
# datasets/`dataset_id`/consentStores/`consent_store_id`/consentArtifacts/`
# consent_artifact_id``. If the draft consent had a consent artifact, this
# consent artifact overwrites it.
# Corresponds to the JSON property `consentArtifact`
# @return [String]
attr_accessor :consent_artifact
# Timestamp in UTC of when this consent is considered expired.
# Corresponds to the JSON property `expireTime`
# @return [String]
attr_accessor :expire_time
# The time to live for this consent from when it is marked as active.
# Corresponds to the JSON property `ttl`
# @return [String]
attr_accessor :ttl
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@consent_artifact = args[:consent_artifact] if args.key?(:consent_artifact)
@expire_time = args[:expire_time] if args.key?(:expire_time)
@ttl = args[:ttl] if args.key?(:ttl)
end
end
# The request to analyze healthcare entities in a document.
class AnalyzeEntitiesRequest
include Google::Apis::Core::Hashable
# document_content is a document to be annotated.
# Corresponds to the JSON property `documentContent`
# @return [String]
attr_accessor :document_content
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@document_content = args[:document_content] if args.key?(:document_content)
end
end
# Includes recognized entity mentions and relationships between them.
class AnalyzeEntitiesResponse
include Google::Apis::Core::Hashable
# The union of all the candidate entities that the entity_mentions in this
# response could link to. These are UMLS concepts or normalized mention content.
# Corresponds to the JSON property `entities`
# @return [Array<Google::Apis::HealthcareV1beta1::Entity>]
attr_accessor :entities
# entity_mentions contains all the annotated medical entities that were were
# mentioned in the provided document.
# Corresponds to the JSON property `entityMentions`
# @return [Array<Google::Apis::HealthcareV1beta1::EntityMention>]
attr_accessor :entity_mentions
# relationships contains all the binary relationships that were identified
# between entity mentions within the provided document.
# Corresponds to the JSON property `relationships`
# @return [Array<Google::Apis::HealthcareV1beta1::EntityMentionRelationship>]
attr_accessor :relationships
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@entities = args[:entities] if args.key?(:entities)
@entity_mentions = args[:entity_mentions] if args.key?(:entity_mentions)
@relationships = args[:relationships] if args.key?(:relationships)
end
end
# An annotation record.
class Annotation
include Google::Apis::Core::Hashable
# AnnotationSource holds the source information of the annotation.
# Corresponds to the JSON property `annotationSource`
# @return [Google::Apis::HealthcareV1beta1::AnnotationSource]
attr_accessor :annotation_source
# Additional information for this annotation record, such as annotator and
# verifier information or study campaign.
# Corresponds to the JSON property `customData`
# @return [Hash<String,String>]
attr_accessor :custom_data
# Image annotation.
# Corresponds to the JSON property `imageAnnotation`
# @return [Google::Apis::HealthcareV1beta1::ImageAnnotation]
attr_accessor :image_annotation
# Resource name of the Annotation, of the form `projects/`project_id`/locations/`
# location_id`/datasets/`dataset_id`/annotationStores/`annotation_store_id`/
# annotations/`annotation_id``.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Resource level annotation.
# Corresponds to the JSON property `resourceAnnotation`
# @return [Google::Apis::HealthcareV1beta1::ResourceAnnotation]
attr_accessor :resource_annotation
# A TextAnnotation specifies a text range that includes sensitive information.
# Corresponds to the JSON property `textAnnotation`
# @return [Google::Apis::HealthcareV1beta1::SensitiveTextAnnotation]
attr_accessor :text_annotation
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@annotation_source = args[:annotation_source] if args.key?(:annotation_source)
@custom_data = args[:custom_data] if args.key?(:custom_data)
@image_annotation = args[:image_annotation] if args.key?(:image_annotation)
@name = args[:name] if args.key?(:name)
@resource_annotation = args[:resource_annotation] if args.key?(:resource_annotation)
@text_annotation = args[:text_annotation] if args.key?(:text_annotation)
end
end
# Specifies how to store annotations during de-identification operation.
class AnnotationConfig
include Google::Apis::Core::Hashable
# The name of the annotation store, in the form `projects/`project_id`/locations/
# `location_id`/datasets/`dataset_id`/annotationStores/`annotation_store_id``). *
# The destination annotation store must be in the same project as the source
# data. De-identifying data across multiple projects is not supported. * The
# destination annotation store must exist when using DeidentifyDicomStore or
# DeidentifyFhirStore. DeidentifyDataset automatically creates the destination
# annotation store.
# Corresponds to the JSON property `annotationStoreName`
# @return [String]
attr_accessor :annotation_store_name
# If set to true, the sensitive texts are included in SensitiveTextAnnotation of
# Annotation.
# Corresponds to the JSON property `storeQuote`
# @return [Boolean]
attr_accessor :store_quote
alias_method :store_quote?, :store_quote
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@annotation_store_name = args[:annotation_store_name] if args.key?(:annotation_store_name)
@store_quote = args[:store_quote] if args.key?(:store_quote)
end
end
# AnnotationSource holds the source information of the annotation.
class AnnotationSource
include Google::Apis::Core::Hashable
# Cloud Healthcare API resource.
# Corresponds to the JSON property `cloudHealthcareSource`
# @return [Google::Apis::HealthcareV1beta1::CloudHealthcareSource]
attr_accessor :cloud_healthcare_source
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@cloud_healthcare_source = args[:cloud_healthcare_source] if args.key?(:cloud_healthcare_source)
end
end
# An Annotation store that can store annotation resources such as labels and
# tags for text, image and audio.
class AnnotationStore
include Google::Apis::Core::Hashable
# Optional. User-supplied key-value pairs used to organize Annotation stores.
# Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of
# maximum 128 bytes, and must conform to the following PCRE regular expression: \
# p`Ll`\p`Lo``0,62` Label values must be between 1 and 63 characters long, have
# a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE
# regular expression: [\p`Ll`\p`Lo`\p`N`_-]`0,63` No more than 64 labels can be
# associated with a given store.
# Corresponds to the JSON property `labels`
# @return [Hash<String,String>]
attr_accessor :labels
# Resource name of the Annotation store, of the form `projects/`project_id`/
# locations/`location_id`/datasets/`dataset_id`/annotationStores/`
# annotation_store_id``.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@labels = args[:labels] if args.key?(:labels)
@name = args[:name] if args.key?(:name)
end
end
# Archives the specified User data mapping.
class ArchiveUserDataMappingRequest
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# Archives the specified User data mapping.
class ArchiveUserDataMappingResponse
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# An attribute value for a consent or data mapping. Each Attribute must have a
# corresponding AttributeDefinition in the consent store that defines the
# default and allowed values.
class Attribute
include Google::Apis::Core::Hashable
# Indicates the name of an attribute defined at the consent store.
# Corresponds to the JSON property `attributeDefinitionId`
# @return [String]
attr_accessor :attribute_definition_id
# The value of the attribute. Must be an acceptable value as defined in the
# consent store. For example, if the consent store defines "data type" with
# acceptable values "questionnaire" and "step-count", when the attribute name is
# data type, this field must contain one of those values.
# Corresponds to the JSON property `values`
# @return [Array<String>]
attr_accessor :values
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@attribute_definition_id = args[:attribute_definition_id] if args.key?(:attribute_definition_id)
@values = args[:values] if args.key?(:values)
end
end
# A client-defined consent attribute.
class AttributeDefinition
include Google::Apis::Core::Hashable
# Required. Possible values for the attribute. The number of allowed values must
# not exceed 100. An empty list is invalid. The list can only be expanded after
# creation.
# Corresponds to the JSON property `allowedValues`
# @return [Array<String>]
attr_accessor :allowed_values
# Required. The category of the attribute. The value of this field cannot be
# changed after creation.
# Corresponds to the JSON property `category`
# @return [String]
attr_accessor :category
# Default values of the attribute in consents. If no default values are
# specified, it defaults to an empty value.
# Corresponds to the JSON property `consentDefaultValues`
# @return [Array<String>]
attr_accessor :consent_default_values
# Default value of the attribute in user data mappings. If no default value is
# specified, it defaults to an empty value. This field is only applicable to
# attributes of the category `RESOURCE`.
# Corresponds to the JSON property `dataMappingDefaultValue`
# @return [String]
attr_accessor :data_mapping_default_value
# A description of the attribute.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# Resource name of the attribute definition, of the form `projects/`project_id`/
# locations/`location_id`/datasets/`dataset_id`/consentStores/`consent_store_id`/
# attributeDefinitions/`attribute_definition_id``.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@allowed_values = args[:allowed_values] if args.key?(:allowed_values)
@category = args[:category] if args.key?(:category)
@consent_default_values = args[:consent_default_values] if args.key?(:consent_default_values)
@data_mapping_default_value = args[:data_mapping_default_value] if args.key?(:data_mapping_default_value)
@description = args[:description] if args.key?(:description)
@name = args[:name] if args.key?(:name)
end
end
# Specifies the audit configuration for a service. The configuration determines
# which permission types are logged, and what identities, if any, are exempted
# from logging. An AuditConfig must have one or more AuditLogConfigs. If there
# are AuditConfigs for both `allServices` and a specific service, the union of
# the two AuditConfigs is used for that service: the log_types specified in each
# AuditConfig are enabled, and the exempted_members in each AuditLogConfig are
# exempted. Example Policy with multiple AuditConfigs: ` "audit_configs": [ ` "
# service": "allServices", "audit_log_configs": [ ` "log_type": "DATA_READ", "
# exempted_members": [ "user:jose@example.com" ] `, ` "log_type": "DATA_WRITE" `,
# ` "log_type": "ADMIN_READ" ` ] `, ` "service": "sampleservice.googleapis.com",
# "audit_log_configs": [ ` "log_type": "DATA_READ" `, ` "log_type": "DATA_WRITE"
# , "exempted_members": [ "user:aliya@example.com" ] ` ] ` ] ` For sampleservice,
# this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also
# exempts jose@example.com from DATA_READ logging, and aliya@example.com from
# DATA_WRITE logging.
class AuditConfig
include Google::Apis::Core::Hashable
# The configuration for logging of each type of permission.
# Corresponds to the JSON property `auditLogConfigs`
# @return [Array<Google::Apis::HealthcareV1beta1::AuditLogConfig>]
attr_accessor :audit_log_configs
# Specifies a service that will be enabled for audit logging. For example, `
# storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special
# value that covers all services.
# Corresponds to the JSON property `service`
# @return [String]
attr_accessor :service
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs)
@service = args[:service] if args.key?(:service)
end
end
# Provides the configuration for logging a type of permissions. Example: ` "
# audit_log_configs": [ ` "log_type": "DATA_READ", "exempted_members": [ "user:
# jose@example.com" ] `, ` "log_type": "DATA_WRITE" ` ] ` This enables '
# DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from
# DATA_READ logging.
class AuditLogConfig
include Google::Apis::Core::Hashable
# Specifies the identities that do not cause logging for this type of permission.
# Follows the same format of Binding.members.
# Corresponds to the JSON property `exemptedMembers`
# @return [Array<String>]
attr_accessor :exempted_members
# The log type that this config enables.
# Corresponds to the JSON property `logType`
# @return [String]
attr_accessor :log_type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@exempted_members = args[:exempted_members] if args.key?(:exempted_members)
@log_type = args[:log_type] if args.key?(:log_type)
end
end
# Associates `members` with a `role`.
class Binding
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `bindingId`
# @return [String]
attr_accessor :binding_id
# Represents a textual expression in the Common Expression Language (CEL) syntax.
# CEL is a C-like expression language. The syntax and semantics of CEL are
# documented at https://github.com/google/cel-spec. Example (Comparison): title:
# "Summary size limit" description: "Determines if a summary is less than 100
# chars" expression: "document.summary.size() < 100" Example (Equality): title: "
# Requestor is owner" description: "Determines if requestor is the document
# owner" expression: "document.owner == request.auth.claims.email" Example (
# Logic): title: "Public documents" description: "Determine whether the document
# should be publicly visible" expression: "document.type != 'private' &&
# document.type != 'internal'" Example (Data Manipulation): title: "Notification
# string" description: "Create a notification string with a timestamp."
# expression: "'New message received at ' + string(document.create_time)" The
# exact variables and functions that may be referenced within an expression are
# determined by the service that evaluates it. See the service documentation for
# additional information.
# Corresponds to the JSON property `condition`
# @return [Google::Apis::HealthcareV1beta1::Expr]
attr_accessor :condition
# Specifies the identities requesting access for a Cloud Platform resource. `
# members` can have the following values: * `allUsers`: A special identifier
# that represents anyone who is on the internet; with or without a Google
# account. * `allAuthenticatedUsers`: A special identifier that represents
# anyone who is authenticated with a Google account or a service account. * `
# user:`emailid``: An email address that represents a specific Google account.
# For example, `alice@example.com` . * `serviceAccount:`emailid``: An email
# address that represents a service account. For example, `my-other-app@appspot.
# gserviceaccount.com`. * `group:`emailid``: An email address that represents a
# Google group. For example, `admins@example.com`. * `deleted:user:`emailid`?uid=
# `uniqueid``: An email address (plus unique identifier) representing a user
# that has been recently deleted. For example, `alice@example.com?uid=
# 123456789012345678901`. If the user is recovered, this value reverts to `user:`
# emailid`` and the recovered user retains the role in the binding. * `deleted:
# serviceAccount:`emailid`?uid=`uniqueid``: An email address (plus unique
# identifier) representing a service account that has been recently deleted. For
# example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
# If the service account is undeleted, this value reverts to `serviceAccount:`
# emailid`` and the undeleted service account retains the role in the binding. *
# `deleted:group:`emailid`?uid=`uniqueid``: An email address (plus unique
# identifier) representing a Google group that has been recently deleted. For
# example, `admins@example.com?uid=123456789012345678901`. If the group is
# recovered, this value reverts to `group:`emailid`` and the recovered group
# retains the role in the binding. * `domain:`domain``: The G Suite domain (
# primary) that represents all the users of that domain. For example, `google.
# com` or `example.com`.
# Corresponds to the JSON property `members`
# @return [Array<String>]
attr_accessor :members
# Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`
# , or `roles/owner`.
# Corresponds to the JSON property `role`
# @return [String]
attr_accessor :role
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@binding_id = args[:binding_id] if args.key?(:binding_id)
@condition = args[:condition] if args.key?(:condition)
@members = args[:members] if args.key?(:members)
@role = args[:role] if args.key?(:role)
end
end
# A bounding polygon for the detected image annotation.
class BoundingPoly
include Google::Apis::Core::Hashable
# A description of this polygon.
# Corresponds to the JSON property `label`
# @return [String]
attr_accessor :label
# List of the vertices of this polygon.
# Corresponds to the JSON property `vertices`
# @return [Array<Google::Apis::HealthcareV1beta1::Vertex>]
attr_accessor :vertices
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@label = args[:label] if args.key?(:label)
@vertices = args[:vertices] if args.key?(:vertices)
end
end
# The request message for Operations.CancelOperation.
class CancelOperationRequest
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# Mask a string by replacing its characters with a fixed character.
class CharacterMaskConfig
include Google::Apis::Core::Hashable
# Character to mask the sensitive values. If not supplied, defaults to "*".
# Corresponds to the JSON property `maskingCharacter`
# @return [String]
attr_accessor :masking_character
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@masking_character = args[:masking_character] if args.key?(:masking_character)
end
end
# Checks if a particular data_id of a User data mapping in the given Consent
# store is consented for a given use.
class CheckDataAccessRequest
include Google::Apis::Core::Hashable
# List of resource names of Consent resources.
# Corresponds to the JSON property `consentList`
# @return [Google::Apis::HealthcareV1beta1::ConsentList]
attr_accessor :consent_list
# The unique identifier of the data to check access for. It must exist in the
# given `consent_store`.
# Corresponds to the JSON property `dataId`
# @return [String]
attr_accessor :data_id
# The values of request attributes associated with this access request.
# Corresponds to the JSON property `requestAttributes`
# @return [Hash<String,String>]
attr_accessor :request_attributes
# The view for CheckDataAccessResponse.
# Corresponds to the JSON property `responseView`
# @return [String]
attr_accessor :response_view
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@consent_list = args[:consent_list] if args.key?(:consent_list)
@data_id = args[:data_id] if args.key?(:data_id)
@request_attributes = args[:request_attributes] if args.key?(:request_attributes)
@response_view = args[:response_view] if args.key?(:response_view)
end
end
# Checks if a particular data_id of a User data mapping in the given Consent
# store is consented for a given use.
class CheckDataAccessResponse
include Google::Apis::Core::Hashable
# The resource names of all evaluated Consents mapped to their evaluation.
# Corresponds to the JSON property `consentDetails`
# @return [Hash<String,Google::Apis::HealthcareV1beta1::ConsentEvaluation>]
attr_accessor :consent_details
# Whether the requested data is consented for the given use.
# Corresponds to the JSON property `consented`
# @return [Boolean]
attr_accessor :consented
alias_method :consented?, :consented
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@consent_details = args[:consent_details] if args.key?(:consent_details)
@consented = args[:consented] if args.key?(:consented)
end
end
# Cloud Healthcare API resource.
class CloudHealthcareSource
include Google::Apis::Core::Hashable
# Full path of a Cloud Healthcare API resource.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@name = args[:name] if args.key?(:name)
end
end
# Represents an end user's consent.
class Consent
include Google::Apis::Core::Hashable
# Required. The resource name of the consent artifact that contains proof of the
# end user's consent, of the form `projects/`project_id`/locations/`location_id`/
# datasets/`dataset_id`/consentStores/`consent_store_id`/consentArtifacts/`
# consent_artifact_id``.
# Corresponds to the JSON property `consentArtifact`
# @return [String]
attr_accessor :consent_artifact
# Timestamp in UTC of when this consent is considered expired.
# Corresponds to the JSON property `expireTime`
# @return [String]
attr_accessor :expire_time
# Resource name of the Consent, of the form `projects/`project_id`/locations/`
# location_id`/datasets/`dataset_id`/consentStores/`consent_store_id`/consents/`
# consent_id``.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Represents an end user's consent in terms of the resources that can be
# accessed and under what conditions.
# Corresponds to the JSON property `policies`
# @return [Array<Google::Apis::HealthcareV1beta1::GoogleCloudHealthcareV1beta1ConsentPolicy>]
attr_accessor :policies
# Output only. The timestamp that the revision was created.
# Corresponds to the JSON property `revisionCreateTime`
# @return [String]
attr_accessor :revision_create_time
# Output only. The revision ID of the consent. The format is an 8-character
# hexadecimal string. Refer to a specific revision of a Consent by appending `@`
# revision_id`` to the Consent's resource name.
# Corresponds to the JSON property `revisionId`
# @return [String]
attr_accessor :revision_id
# Indicates the current state of this consent.
# Corresponds to the JSON property `state`
# @return [String]
attr_accessor :state
# Input only. The time to live for this consent from when it is created.
# Corresponds to the JSON property `ttl`
# @return [String]
attr_accessor :ttl
# Required. User's UUID provided by the client.
# Corresponds to the JSON property `userId`
# @return [String]
attr_accessor :user_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@consent_artifact = args[:consent_artifact] if args.key?(:consent_artifact)
@expire_time = args[:expire_time] if args.key?(:expire_time)
@name = args[:name] if args.key?(:name)
@policies = args[:policies] if args.key?(:policies)
@revision_create_time = args[:revision_create_time] if args.key?(:revision_create_time)
@revision_id = args[:revision_id] if args.key?(:revision_id)
@state = args[:state] if args.key?(:state)
@ttl = args[:ttl] if args.key?(:ttl)
@user_id = args[:user_id] if args.key?(:user_id)
end
end
# Proof of an end user's consent.
class ConsentArtifact
include Google::Apis::Core::Hashable
# Screenshots of the consent content.
# Corresponds to the JSON property `consentContentScreenshots`
# @return [Array<Google::Apis::HealthcareV1beta1::Image>]
attr_accessor :consent_content_screenshots
# An string indicating the version of the consent content.
# Corresponds to the JSON property `consentContentVersion`
# @return [String]
attr_accessor :consent_content_version
# User signature.
# Corresponds to the JSON property `guardianSignature`
# @return [Google::Apis::HealthcareV1beta1::Signature]
attr_accessor :guardian_signature
# Metadata associated with the consent artifact. For example, the consent locale
# or user agent version.
# Corresponds to the JSON property `metadata`
# @return [Hash<String,String>]
attr_accessor :metadata
# Resource name of the Consent artifact, of the form `projects/`project_id`/
# locations/`location_id`/datasets/`dataset_id`/consentStores/`consent_store_id`/
# consentArtifacts/`consent_artifact_id``.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Required. User's UUID provided by the client.
# Corresponds to the JSON property `userId`
# @return [String]
attr_accessor :user_id
# User signature.
# Corresponds to the JSON property `userSignature`
# @return [Google::Apis::HealthcareV1beta1::Signature]
attr_accessor :user_signature
# User signature.
# Corresponds to the JSON property `witnessSignature`
# @return [Google::Apis::HealthcareV1beta1::Signature]
attr_accessor :witness_signature
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@consent_content_screenshots = args[:consent_content_screenshots] if args.key?(:consent_content_screenshots)
@consent_content_version = args[:consent_content_version] if args.key?(:consent_content_version)
@guardian_signature = args[:guardian_signature] if args.key?(:guardian_signature)
@metadata = args[:metadata] if args.key?(:metadata)
@name = args[:name] if args.key?(:name)
@user_id = args[:user_id] if args.key?(:user_id)
@user_signature = args[:user_signature] if args.key?(:user_signature)
@witness_signature = args[:witness_signature] if args.key?(:witness_signature)
end
end
# The detailed evaluation of a particular Consent.
class ConsentEvaluation
include Google::Apis::Core::Hashable
# The evaluation result.
# Corresponds to the JSON property `evaluationResult`
# @return [String]
attr_accessor :evaluation_result
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@evaluation_result = args[:evaluation_result] if args.key?(:evaluation_result)
end
end
# List of resource names of Consent resources.
class ConsentList
include Google::Apis::Core::Hashable
# The resource names of the Consents to evaluate against, of the form `projects/`
# project_id`/locations/`location_id`/datasets/`dataset_id`/consentStores/`
# consent_store_id`/consents/`consent_id``.
# Corresponds to the JSON property `consents`
# @return [Array<String>]
attr_accessor :consents
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@consents = args[:consents] if args.key?(:consents)
end
end
# Represents a Consent store.
class ConsentStore
include Google::Apis::Core::Hashable
# Default time to live for consents in this store. Must be at least 24 hours.
# Updating this field will not affect the expiration time of existing consents.
# Corresponds to the JSON property `defaultConsentTtl`
# @return [String]
attr_accessor :default_consent_ttl
# If true, UpdateConsent creates the consent if it does not already exist.
# Corresponds to the JSON property `enableConsentCreateOnUpdate`
# @return [Boolean]
attr_accessor :enable_consent_create_on_update
alias_method :enable_consent_create_on_update?, :enable_consent_create_on_update
# User-supplied key-value pairs used to organize Consent stores. Label keys must
# be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128
# bytes, and must conform to the following PCRE regular expression: \p`Ll`\p`Lo``
# 0,62` Label values must be between 1 and 63 characters long, have a UTF-8
# encoding of maximum 128 bytes, and must conform to the following PCRE regular
# expression: [\p`Ll`\p`Lo`\p`N`_-]`0,63` No more than 64 labels can be
# associated with a given store.
# Corresponds to the JSON property `labels`
# @return [Hash<String,String>]
attr_accessor :labels
# Resource name of the Consent store, of the form `projects/`project_id`/
# locations/`location_id`/datasets/`dataset_id`/consentStores/`consent_store_id``
# .
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@default_consent_ttl = args[:default_consent_ttl] if args.key?(:default_consent_ttl)
@enable_consent_create_on_update = args[:enable_consent_create_on_update] if args.key?(:enable_consent_create_on_update)
@labels = args[:labels] if args.key?(:labels)
@name = args[:name] if args.key?(:name)
end
end
# Creates a new message.
class CreateMessageRequest
include Google::Apis::Core::Hashable
# A complete HL7v2 message. See [Introduction to HL7 Standards] (https://www.hl7.
# org/implement/standards/index.cfm?ref=common) for details on the standard.
# Corresponds to the JSON property `message`
# @return [Google::Apis::HealthcareV1beta1::Message]
attr_accessor :message
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@message = args[:message] if args.key?(:message)
end
end
# Pseudonymization method that generates surrogates via cryptographic hashing.
# Uses SHA-256. Outputs a base64-encoded representation of the hashed output.
# For example, `L7k0BHmF1ha5U3NfGykjro4xWi1MPVQPjhMAZbSV9mM=`.
class CryptoHashConfig
include Google::Apis::Core::Hashable
# An AES 128/192/256 bit key. Causes the hash to be computed based on this key.
# A default key is generated for each Deidentify operation and is used wherever
# crypto_key is not specified.
# Corresponds to the JSON property `cryptoKey`
# NOTE: Values are automatically base64 encoded/decoded in the client library.
# @return [String]
attr_accessor :crypto_key
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@crypto_key = args[:crypto_key] if args.key?(:crypto_key)
end
end
# A message representing a health dataset. A health dataset represents a
# collection of healthcare data pertaining to one or more patients. This may
# include multiple modalities of healthcare data, such as electronic medical
# records or medical imaging data.
class Dataset
include Google::Apis::Core::Hashable
# Resource name of the dataset, of the form `projects/`project_id`/locations/`
# location_id`/datasets/`dataset_id``.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The default timezone used by this dataset. Must be a either a valid IANA time
# zone name such as "America/New_York" or empty, which defaults to UTC. This is
# used for parsing times in resources, such as HL7 messages, where no explicit
# timezone is specified.
# Corresponds to the JSON property `timeZone`
# @return [String]
attr_accessor :time_zone
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@name = args[:name] if args.key?(:name)
@time_zone = args[:time_zone] if args.key?(:time_zone)
end
end
# Shift a date forward or backward in time by a random amount which is
# consistent for a given patient and crypto key combination.
class DateShiftConfig
include Google::Apis::Core::Hashable
# An AES 128/192/256 bit key. Causes the shift to be computed based on this key
# and the patient ID. A default key is generated for each Deidentify operation
# and is used wherever crypto_key is not specified.
# Corresponds to the JSON property `cryptoKey`
# NOTE: Values are automatically base64 encoded/decoded in the client library.
# @return [String]
attr_accessor :crypto_key
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@crypto_key = args[:crypto_key] if args.key?(:crypto_key)
end
end
# Configures de-id options specific to different types of content. Each
# submessage customizes the handling of an https://tools.ietf.org/html/rfc6838
# media type or subtype. Configs are applied in a nested manner at runtime.
class DeidentifyConfig
include Google::Apis::Core::Hashable
# Specifies how to store annotations during de-identification operation.
# Corresponds to the JSON property `annotation`
# @return [Google::Apis::HealthcareV1beta1::AnnotationConfig]
attr_accessor :annotation
# Specifies the parameters needed for de-identification of DICOM stores.
# Corresponds to the JSON property `dicom`
# @return [Google::Apis::HealthcareV1beta1::DicomConfig]
attr_accessor :dicom
# Specifies how to handle de-identification of a FHIR store.
# Corresponds to the JSON property `fhir`
# @return [Google::Apis::HealthcareV1beta1::FhirConfig]
attr_accessor :fhir