feat: Automated regeneration of healthcare v1beta1 client (#1399)

This PR was generated using Autosynth. 🌈


<details><summary>Log from Synthtool</summary>

```
2020-11-05 02:38:10,377 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/google-api-ruby-client/synth.py.
On branch autosynth-healthcare-v1beta1
nothing to commit, working tree clean
2020-11-05 02:38:10,408 synthtool [DEBUG] > Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth healthcare v1beta1
DEBUG:synthtool:Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth healthcare v1beta1
bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
The dependency jruby-openssl (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Fetching rake 11.3.0
Installing rake 11.3.0
Fetching concurrent-ruby 1.1.7
Installing concurrent-ruby 1.1.7
Fetching i18n 1.8.5
Installing i18n 1.8.5
Fetching minitest 5.14.2
Installing minitest 5.14.2
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching tzinfo 1.2.7
Installing tzinfo 1.2.7
Fetching activesupport 5.0.7.2
Installing activesupport 5.0.7.2
Fetching public_suffix 4.0.6
Installing public_suffix 4.0.6
Fetching addressable 2.7.0
Installing addressable 2.7.0
Fetching ast 2.4.1
Installing ast 2.4.1
Using bundler 2.1.4
Fetching byebug 11.1.3
Installing byebug 11.1.3 with native extensions
Fetching coderay 1.1.3
Installing coderay 1.1.3
Fetching json 2.3.1
Installing json 2.3.1 with native extensions
Fetching docile 1.3.2
Installing docile 1.3.2
Fetching simplecov-html 0.10.2
Installing simplecov-html 0.10.2
Fetching simplecov 0.16.1
Installing simplecov 0.16.1
Using sync 0.5.0
Fetching tins 1.26.0
Installing tins 1.26.0
Fetching term-ansicolor 1.7.1
Installing term-ansicolor 1.7.1
Fetching thor 0.20.3
Installing thor 0.20.3
Fetching coveralls 0.8.23
Installing coveralls 0.8.23
Fetching crack 0.4.4
Installing crack 0.4.4
Fetching declarative 0.0.20
Installing declarative 0.0.20
Fetching declarative-option 0.1.0
Installing declarative-option 0.1.0
Fetching diff-lcs 1.4.4
Installing diff-lcs 1.4.4
Fetching dotenv 2.7.6
Installing dotenv 2.7.6
Fetching fakefs 0.20.1
Installing fakefs 0.20.1
Fetching multipart-post 2.1.1
Installing multipart-post 2.1.1
Fetching ruby2_keywords 0.0.2
Installing ruby2_keywords 0.0.2
Fetching faraday 1.1.0
Installing faraday 1.1.0
Fetching gems 1.2.0
Installing gems 1.2.0
Fetching github-markup 1.7.0
Installing github-markup 1.7.0
Fetching jwt 2.2.2
Installing jwt 2.2.2
Fetching memoist 0.16.2
Installing memoist 0.16.2
Fetching multi_json 1.15.0
Installing multi_json 1.15.0
Fetching os 0.9.6
Installing os 0.9.6
Fetching signet 0.14.0
Installing signet 0.14.0
Fetching googleauth 0.14.0
Installing googleauth 0.14.0
Fetching httpclient 2.8.3
Installing httpclient 2.8.3
Fetching mini_mime 1.0.2
Installing mini_mime 1.0.2
Fetching uber 0.1.0
Installing uber 0.1.0
Fetching representable 3.0.4
Installing representable 3.0.4
Fetching retriable 3.1.2
Installing retriable 3.1.2
Fetching rexml 3.2.4
Installing rexml 3.2.4
Using google-api-client 0.48.0 from source at `.`
Fetching google-id-token 1.4.2
Installing google-id-token 1.4.2
Fetching hashdiff 1.0.1
Installing hashdiff 1.0.1
Fetching mime-types-data 3.2020.1104
Installing mime-types-data 3.2020.1104
Fetching mime-types 3.3.1
Installing mime-types 3.3.1
Fetching multi_xml 0.6.0
Installing multi_xml 0.6.0
Fetching httparty 0.18.1
Installing httparty 0.18.1
Fetching rspec-support 3.10.0
Installing rspec-support 3.10.0
Fetching rspec-core 3.10.0
Installing rspec-core 3.10.0
Fetching rspec-expectations 3.10.0
Installing rspec-expectations 3.10.0
Fetching rspec-mocks 3.10.0
Installing rspec-mocks 3.10.0
Fetching rspec 3.10.0
Installing rspec 3.10.0
Fetching json_spec 1.1.5
Installing json_spec 1.1.5
Fetching launchy 2.5.0
Installing launchy 2.5.0
Fetching little-plugger 1.1.4
Installing little-plugger 1.1.4
Fetching logging 2.3.0
Installing logging 2.3.0
Fetching method_source 1.0.0
Installing method_source 1.0.0
Fetching opencensus 0.5.0
Installing opencensus 0.5.0
Fetching parallel 1.19.2
Installing parallel 1.19.2
Fetching parser 2.7.2.0
Installing parser 2.7.2.0
Fetching powerpack 0.1.2
Installing powerpack 0.1.2
Fetching pry 0.13.1
Installing pry 0.13.1
Fetching pry-byebug 3.9.0
Installing pry-byebug 3.9.0
Fetching yard 0.9.25
Installing yard 0.9.25
Fetching pry-doc 0.13.5
Installing pry-doc 0.13.5
Fetching rainbow 2.2.2
Installing rainbow 2.2.2 with native extensions
Fetching redcarpet 3.5.0
Installing redcarpet 3.5.0 with native extensions
Fetching redis 3.3.5
Installing redis 3.3.5
Fetching rmail 1.1.4
Installing rmail 1.1.4
Fetching ruby-progressbar 1.10.1
Installing ruby-progressbar 1.10.1
Fetching unicode-display_width 1.7.0
Installing unicode-display_width 1.7.0
Fetching rubocop 0.49.1
Installing rubocop 0.49.1
Fetching webmock 2.3.2
Installing webmock 2.3.2
Bundle complete! 31 Gemfile dependencies, 78 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Post-install message from i18n:

HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
But that may break your application.

If you are upgrading your Rails application from an older version of Rails:

Please check your Rails app for 'config.i18n.fallbacks = true'.
If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
'config.i18n.fallbacks = [I18n.default_locale]'.
If not, fallbacks will be broken in your app by I18n 1.1.x.

If you are starting a NEW Rails application, you can ignore this notice.

For more info see:
https://github.com/svenfuchs/i18n/releases/tag/v1.1.0

Post-install message from httparty:
When you HTTParty, you must party hard!
echo a | bundle exec bin/generate-api gen generated --api=healthcare.v1beta1 --names-out=/workspace/api_names_out.yaml
Loading healthcare, version v1beta1 from https://raw.githubusercontent.com/googleapis/discovery-artifact-manager/master/discoveries/healthcare.v1beta1.json
W, [2020-11-05T10:38:32.254841 #240]  WARN -- : Found reserved keyword 'end'
W, [2020-11-05T10:38:32.254908 #240]  WARN -- : Changed to 'end_'
W, [2020-11-05T10:38:32.265157 #240]  WARN -- : Found reserved property 'object_id'
W, [2020-11-05T10:38:32.265200 #240]  WARN -- : Changed to 'object_id_prop'
    conflict  google/apis/healthcare_v1beta1.rb
<lthcare_v1beta1.rb? (enter "h" for help) [Ynaqdhm] a
       force  google/apis/healthcare_v1beta1.rb
    conflict  google/apis/healthcare_v1beta1/service.rb
       force  google/apis/healthcare_v1beta1/service.rb
    conflict  google/apis/healthcare_v1beta1/classes.rb
       force  google/apis/healthcare_v1beta1/classes.rb
    conflict  google/apis/healthcare_v1beta1/representations.rb
       force  google/apis/healthcare_v1beta1/representations.rb
    conflict  /workspace/api_names_out.yaml
       force  /workspace/api_names_out.yaml
2020-11-05 02:38:36,857 synthtool [DEBUG] > Wrote metadata to generated/google/apis/healthcare_v1beta1/synth.metadata.
DEBUG:synthtool:Wrote metadata to generated/google/apis/healthcare_v1beta1/synth.metadata.

```
</details>

Full log will be available here:
https://source.cloud.google.com/results/invocations/749223e1-0b80-43a0-be68-640be14dbb8a/targets

- [ ] To automatically regenerate this PR, check this box.
This commit is contained in:
Yoshi Automation Bot 2020-11-05 02:52:04 -08:00 committed by GitHub
parent 79474e618b
commit a809d40f1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 471 additions and 4 deletions

View File

@ -109670,6 +109670,15 @@
"/healthcare:v1beta1/ActivateConsentRequest/consentArtifact": consent_artifact
"/healthcare:v1beta1/ActivateConsentRequest/expireTime": expire_time
"/healthcare:v1beta1/ActivateConsentRequest/ttl": ttl
"/healthcare:v1beta1/AnalyzeEntitiesRequest": analyze_entities_request
"/healthcare:v1beta1/AnalyzeEntitiesRequest/documentContent": document_content
"/healthcare:v1beta1/AnalyzeEntitiesResponse": analyze_entities_response
"/healthcare:v1beta1/AnalyzeEntitiesResponse/entities": entities
"/healthcare:v1beta1/AnalyzeEntitiesResponse/entities/entity": entity
"/healthcare:v1beta1/AnalyzeEntitiesResponse/entityMentions": entity_mentions
"/healthcare:v1beta1/AnalyzeEntitiesResponse/entityMentions/entity_mention": entity_mention
"/healthcare:v1beta1/AnalyzeEntitiesResponse/relationships": relationships
"/healthcare:v1beta1/AnalyzeEntitiesResponse/relationships/relationship": relationship
"/healthcare:v1beta1/Annotation": annotation
"/healthcare:v1beta1/Annotation/annotationSource": annotation_source
"/healthcare:v1beta1/Annotation/customData": custom_data
@ -109820,6 +109829,25 @@
"/healthcare:v1beta1/DicomStore/streamConfigs": stream_configs
"/healthcare:v1beta1/DicomStore/streamConfigs/stream_config": stream_config
"/healthcare:v1beta1/Empty": empty
"/healthcare:v1beta1/Entity": entity
"/healthcare:v1beta1/Entity/entityId": entity_id
"/healthcare:v1beta1/Entity/preferredTerm": preferred_term
"/healthcare:v1beta1/Entity/vocabularyCodes": vocabulary_codes
"/healthcare:v1beta1/Entity/vocabularyCodes/vocabulary_code": vocabulary_code
"/healthcare:v1beta1/EntityMention": entity_mention
"/healthcare:v1beta1/EntityMention/certaintyAssessment": certainty_assessment
"/healthcare:v1beta1/EntityMention/confidence": confidence
"/healthcare:v1beta1/EntityMention/linkedEntities": linked_entities
"/healthcare:v1beta1/EntityMention/linkedEntities/linked_entity": linked_entity
"/healthcare:v1beta1/EntityMention/mentionId": mention_id
"/healthcare:v1beta1/EntityMention/subject": subject
"/healthcare:v1beta1/EntityMention/temporalAssessment": temporal_assessment
"/healthcare:v1beta1/EntityMention/text": text
"/healthcare:v1beta1/EntityMention/type": type
"/healthcare:v1beta1/EntityMentionRelationship": entity_mention_relationship
"/healthcare:v1beta1/EntityMentionRelationship/confidence": confidence
"/healthcare:v1beta1/EntityMentionRelationship/objectId": object_id_prop
"/healthcare:v1beta1/EntityMentionRelationship/subjectId": subject_id
"/healthcare:v1beta1/ErrorDetail": error_detail
"/healthcare:v1beta1/ErrorDetail/error": error
"/healthcare:v1beta1/ErrorDetail/resource": resource
@ -109878,6 +109906,9 @@
"/healthcare:v1beta1/Expr/expression": expression
"/healthcare:v1beta1/Expr/location": location
"/healthcare:v1beta1/Expr/title": title
"/healthcare:v1beta1/Feature": feature
"/healthcare:v1beta1/Feature/confidence": confidence
"/healthcare:v1beta1/Feature/value": value
"/healthcare:v1beta1/FhirConfig": fhir_config
"/healthcare:v1beta1/FhirConfig/fieldMetadataList": field_metadata_list
"/healthcare:v1beta1/FhirConfig/fieldMetadataList/field_metadata_list": field_metadata_list
@ -110061,6 +110092,8 @@
"/healthcare:v1beta1/IngestMessageResponse": ingest_message_response
"/healthcare:v1beta1/IngestMessageResponse/hl7Ack": hl7_ack
"/healthcare:v1beta1/IngestMessageResponse/message": message
"/healthcare:v1beta1/LinkedEntity": linked_entity
"/healthcare:v1beta1/LinkedEntity/entityId": entity_id
"/healthcare:v1beta1/ListAnnotationStoresResponse": list_annotation_stores_response
"/healthcare:v1beta1/ListAnnotationStoresResponse/annotationStores": annotation_stores
"/healthcare:v1beta1/ListAnnotationStoresResponse/annotationStores/annotation_store": annotation_store
@ -110271,6 +110304,9 @@
"/healthcare:v1beta1/TextConfig": text_config
"/healthcare:v1beta1/TextConfig/transformations": transformations
"/healthcare:v1beta1/TextConfig/transformations/transformation": transformation
"/healthcare:v1beta1/TextSpan": text_span
"/healthcare:v1beta1/TextSpan/beginOffset": begin_offset
"/healthcare:v1beta1/TextSpan/content": content
"/healthcare:v1beta1/Type": type
"/healthcare:v1beta1/Type/fields": fields
"/healthcare:v1beta1/Type/fields/field": field
@ -110699,6 +110735,8 @@
"/healthcare:v1beta1/healthcare.projects.locations.list/name": name
"/healthcare:v1beta1/healthcare.projects.locations.list/pageSize": page_size
"/healthcare:v1beta1/healthcare.projects.locations.list/pageToken": page_token
"/healthcare:v1beta1/healthcare.projects.locations.services.nlp.analyzeEntities": analyze_nlp_entities
"/healthcare:v1beta1/healthcare.projects.locations.services.nlp.analyzeEntities/nlpService": nlp_service
"/healthcare:v1beta1/key": key
"/healthcare:v1beta1/quotaUser": quota_user
"/homegraph:v1/AgentDeviceId": agent_device_id

View File

@ -25,7 +25,7 @@ module Google
# @see https://cloud.google.com/healthcare
module HealthcareV1beta1
VERSION = 'V1beta1'
REVISION = '20201013'
REVISION = '20201028'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

View File

@ -59,6 +59,59 @@ module Google
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
@ -1241,6 +1294,145 @@ module Google
end
end
# The candidate entities that an entity mention could link to.
class Entity
include Google::Apis::Core::Hashable
# entity_id is a first class field entity_id uniquely identifies this concept
# and its meta-vocabulary. For example, "UMLS/C0000970".
# Corresponds to the JSON property `entityId`
# @return [String]
attr_accessor :entity_id
# preferred_term is the preferred term for this concept. For example, "
# Acetaminophen". For ad hoc entities formed by normalization, this is the most
# popular unnormalized string.
# Corresponds to the JSON property `preferredTerm`
# @return [String]
attr_accessor :preferred_term
# Vocabulary codes are first-class fields and differentiated from the concept
# unique identifier (entity_id). vocabulary_codes contains the representation of
# this concept in particular vocabularies, such as ICD-10, SNOMED-CT and RxNORM.
# These are prefixed by the name of the vocabulary, followed by the unique code
# within that vocabulary. For example, "RXNORM/A10334543".
# Corresponds to the JSON property `vocabularyCodes`
# @return [Array<String>]
attr_accessor :vocabulary_codes
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@entity_id = args[:entity_id] if args.key?(:entity_id)
@preferred_term = args[:preferred_term] if args.key?(:preferred_term)
@vocabulary_codes = args[:vocabulary_codes] if args.key?(:vocabulary_codes)
end
end
# An entity mention in the document.
class EntityMention
include Google::Apis::Core::Hashable
# A feature of an entity mention.
# Corresponds to the JSON property `certaintyAssessment`
# @return [Google::Apis::HealthcareV1beta1::Feature]
attr_accessor :certainty_assessment
# The model's confidence in this entity mention annotation. A number between 0
# and 1.
# Corresponds to the JSON property `confidence`
# @return [Float]
attr_accessor :confidence
# linked_entities are candidate ontological concepts that this entity mention
# may refer to. They are sorted by decreasing confidence.it
# Corresponds to the JSON property `linkedEntities`
# @return [Array<Google::Apis::HealthcareV1beta1::LinkedEntity>]
attr_accessor :linked_entities
# mention_id uniquely identifies each entity mention in a single response.
# Corresponds to the JSON property `mentionId`
# @return [String]
attr_accessor :mention_id
# A feature of an entity mention.
# Corresponds to the JSON property `subject`
# @return [Google::Apis::HealthcareV1beta1::Feature]
attr_accessor :subject
# A feature of an entity mention.
# Corresponds to the JSON property `temporalAssessment`
# @return [Google::Apis::HealthcareV1beta1::Feature]
attr_accessor :temporal_assessment
# A span of text in the provided document.
# Corresponds to the JSON property `text`
# @return [Google::Apis::HealthcareV1beta1::TextSpan]
attr_accessor :text
# The semantic type of the entity: UNKNOWN_ENTITY_TYPE, ALONE,
# ANATOMICAL_STRUCTURE, ASSISTED_LIVING, BF_RESULT, BM_RESULT, BM_UNIT, BM_VALUE,
# BODY_FUNCTION, BODY_MEASUREMENT, COMPLIANT, DOESNOT_FOLLOWUP, FAMILY,
# FOLLOWSUP, LABORATORY_DATA, LAB_RESULT, LAB_UNIT, LAB_VALUE, MEDICAL_DEVICE,
# MEDICINE, MED_DOSE, MED_DURATION, MED_FORM, MED_FREQUENCY, MED_ROUTE,
# MED_STATUS, MED_STRENGTH, MED_TOTALDOSE, MED_UNIT, NON_COMPLIANT,
# OTHER_LIVINGSTATUS, PROBLEM, PROCEDURE, PROCEDURE_RESULT, PROC_METHOD,
# REASON_FOR_NONCOMPLIANCE, SEVERITY, SUBSTANCE_ABUSE, UNCLEAR_FOLLOWUP.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@certainty_assessment = args[:certainty_assessment] if args.key?(:certainty_assessment)
@confidence = args[:confidence] if args.key?(:confidence)
@linked_entities = args[:linked_entities] if args.key?(:linked_entities)
@mention_id = args[:mention_id] if args.key?(:mention_id)
@subject = args[:subject] if args.key?(:subject)
@temporal_assessment = args[:temporal_assessment] if args.key?(:temporal_assessment)
@text = args[:text] if args.key?(:text)
@type = args[:type] if args.key?(:type)
end
end
# Defines directed relationship from one entity mention to another.
class EntityMentionRelationship
include Google::Apis::Core::Hashable
# The model's confidence in this annotation. A number between 0 and 1.
# Corresponds to the JSON property `confidence`
# @return [Float]
attr_accessor :confidence
# object_id is the id of the object entity mention.
# Corresponds to the JSON property `objectId`
# @return [String]
attr_accessor :object_id_prop
# subject_id is the id of the subject entity mention.
# Corresponds to the JSON property `subjectId`
# @return [String]
attr_accessor :subject_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@confidence = args[:confidence] if args.key?(:confidence)
@object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop)
@subject_id = args[:subject_id] if args.key?(:subject_id)
end
end
# Structure to describe the error encountered during batch operation on one
# resource. This is used both for sample errors in operation response, and for
# format of errors in error reports.
@ -1629,6 +1821,32 @@ module Google
end
end
# A feature of an entity mention.
class Feature
include Google::Apis::Core::Hashable
# The model's confidence in this feature annotation. A number between 0 and 1.
# Corresponds to the JSON property `confidence`
# @return [Float]
attr_accessor :confidence
# The value of this feature annotation. Its range depends on the type of the
# feature.
# Corresponds to the JSON property `value`
# @return [String]
attr_accessor :value
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@confidence = args[:confidence] if args.key?(:confidence)
@value = args[:value] if args.key?(:value)
end
end
# Specifies how to handle de-identification of a FHIR store.
class FhirConfig
include Google::Apis::Core::Hashable
@ -3202,6 +3420,29 @@ module Google
end
end
# EntityMentions can be linked to multiple entities using a LinkedEntity message
# lets us add other fields, e.g. confidence.
class LinkedEntity
include Google::Apis::Core::Hashable
# entity_id is a concept unique identifier. These are prefixed by a string that
# identifies the entity coding system, followed by the unique identifier within
# that system. For example, "UMLS/C0000970". This also supports ad hoc entities,
# which are formed by normalizing entity mention content.
# Corresponds to the JSON property `entityId`
# @return [String]
attr_accessor :entity_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@entity_id = args[:entity_id] if args.key?(:entity_id)
end
end
# Lists the Annotation stores in the given dataset.
class ListAnnotationStoresResponse
include Google::Apis::Core::Hashable
@ -4784,6 +5025,31 @@ module Google
end
end
# A span of text in the provided document.
class TextSpan
include Google::Apis::Core::Hashable
# The unicode codepoint index of the beginning of this span.
# Corresponds to the JSON property `beginOffset`
# @return [Fixnum]
attr_accessor :begin_offset
# The original text contained in this span.
# Corresponds to the JSON property `content`
# @return [String]
attr_accessor :content
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@begin_offset = args[:begin_offset] if args.key?(:begin_offset)
@content = args[:content] if args.key?(:content)
end
end
# A type definition for some HL7v2 type (incl. Segments and Datatypes).
class Type
include Google::Apis::Core::Hashable

View File

@ -28,6 +28,18 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class AnalyzeEntitiesRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AnalyzeEntitiesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Annotation
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -244,6 +256,24 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class Entity
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class EntityMention
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class EntityMentionRelationship
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ErrorDetail
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -316,6 +346,12 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class Feature
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class FhirConfig
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -616,6 +652,12 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class LinkedEntity
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListAnnotationStoresResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -910,6 +952,12 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class TextSpan
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Type
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -943,6 +991,25 @@ module Google
end
end
class AnalyzeEntitiesRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :document_content, as: 'documentContent'
end
end
class AnalyzeEntitiesResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :entities, as: 'entities', class: Google::Apis::HealthcareV1beta1::Entity, decorator: Google::Apis::HealthcareV1beta1::Entity::Representation
collection :entity_mentions, as: 'entityMentions', class: Google::Apis::HealthcareV1beta1::EntityMention, decorator: Google::Apis::HealthcareV1beta1::EntityMention::Representation
collection :relationships, as: 'relationships', class: Google::Apis::HealthcareV1beta1::EntityMentionRelationship, decorator: Google::Apis::HealthcareV1beta1::EntityMentionRelationship::Representation
end
end
class Annotation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -1277,6 +1344,43 @@ module Google
end
end
class Entity
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :entity_id, as: 'entityId'
property :preferred_term, as: 'preferredTerm'
collection :vocabulary_codes, as: 'vocabularyCodes'
end
end
class EntityMention
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :certainty_assessment, as: 'certaintyAssessment', class: Google::Apis::HealthcareV1beta1::Feature, decorator: Google::Apis::HealthcareV1beta1::Feature::Representation
property :confidence, as: 'confidence'
collection :linked_entities, as: 'linkedEntities', class: Google::Apis::HealthcareV1beta1::LinkedEntity, decorator: Google::Apis::HealthcareV1beta1::LinkedEntity::Representation
property :mention_id, as: 'mentionId'
property :subject, as: 'subject', class: Google::Apis::HealthcareV1beta1::Feature, decorator: Google::Apis::HealthcareV1beta1::Feature::Representation
property :temporal_assessment, as: 'temporalAssessment', class: Google::Apis::HealthcareV1beta1::Feature, decorator: Google::Apis::HealthcareV1beta1::Feature::Representation
property :text, as: 'text', class: Google::Apis::HealthcareV1beta1::TextSpan, decorator: Google::Apis::HealthcareV1beta1::TextSpan::Representation
property :type, as: 'type'
end
end
class EntityMentionRelationship
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :confidence, as: 'confidence'
property :object_id_prop, as: 'objectId'
property :subject_id, as: 'subjectId'
end
end
class ErrorDetail
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -1390,6 +1494,14 @@ module Google
end
end
class Feature
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :confidence, as: 'confidence'
property :value, as: 'value'
end
end
class FhirConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -1823,6 +1935,13 @@ module Google
end
end
class LinkedEntity
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :entity_id, as: 'entityId'
end
end
class ListAnnotationStoresResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -2269,6 +2388,14 @@ module Google
end
end
class TextSpan
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :begin_offset, as: 'beginOffset'
property :content, as: 'content'
end
end
class Type
# @private
class Representation < Google::Apis::Core::JsonRepresentation

View File

@ -1511,8 +1511,8 @@ module Google
execute_or_queue_command(command, &block)
end
# Deletes the specified Attribute definition. Fails if it is referenced by the
# latest revision of any Consent or User data mapping.
# Deletes the specified Attribute definition. Fails if it is referenced by any
# User data mapping, or the latest revision of any Consent.
# @param [String] name
# Required. The resource name of the Attribute definition to delete.
# @param [String] fields
@ -5861,6 +5861,42 @@ module Google
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Analyze heathcare entity in a document. Its response includes the recognized
# entity mentions and the relationships between them. AnalyzeEntities uses
# context aware models to detect entities.
# @param [String] nlp_service
# The resource name of the service of the form: "projects/`project_id`/locations/
# `location_id`/services/nlp".
# @param [Google::Apis::HealthcareV1beta1::AnalyzeEntitiesRequest] analyze_entities_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::HealthcareV1beta1::AnalyzeEntitiesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::HealthcareV1beta1::AnalyzeEntitiesResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def analyze_nlp_entities(nlp_service, analyze_entities_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+nlpService}:analyzeEntities', options)
command.request_representation = Google::Apis::HealthcareV1beta1::AnalyzeEntitiesRequest::Representation
command.request_object = analyze_entities_request_object
command.response_representation = Google::Apis::HealthcareV1beta1::AnalyzeEntitiesResponse::Representation
command.response_class = Google::Apis::HealthcareV1beta1::AnalyzeEntitiesResponse
command.params['nlpService'] = nlp_service unless nlp_service.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
protected

View File

@ -4,7 +4,7 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/google-api-ruby-client.git",
"sha": "cb0c5bf94e2b1c915107eec83041d4409c900155"
"sha": "7734906e2abc5c94bac484eeb5a89320be9a8e01"
}
}
]