feat: Add new gcloud commands, API clients, and third-party libraries across various services.

This commit is contained in:
2026-01-01 20:26:35 +01:00
parent 5e23cbece0
commit a19e592eb7
25221 changed files with 8324611 additions and 0 deletions

View File

@@ -0,0 +1,98 @@
location:
name: location
collection: healthcare.projects.locations
attributes:
- &location
parameter_name: locationsId
attribute_name: location
help: Google Cloud location.
property: healthcare/location
dataset:
name: dataset
collection: healthcare.projects.locations.datasets
request_id_field: datasetId
attributes:
- *location
- &dataset
parameter_name: datasetsId
attribute_name: dataset
help: Cloud Healthcare dataset.
operation:
name: operation
collection: healthcare.projects.locations.datasets.operations
request_id_field: operationId
attributes:
- *location
- *dataset
- &operation
parameter_name: operationsId
attribute_name: operation
help: Cloud Healthcare Operation
annotation_store:
name: annotationStore
collection: healthcare.projects.locations.datasets.annotationStores
request_id_field: annotationStoreId
attributes:
- *location
- *dataset
- &annotation-store
parameter_name: annotationStoresId
attribute_name: annotation_store
help: Cloud Healthcare annotation store.
consent_store:
name: consentStore
collection: healthcare.projects.locations.datasets.consentStores
request_id_field: consentStoreId
attributes:
- *location
- *dataset
- &consent-store
parameter_name: consentStoresId
attribute_name: consent_store
help: Cloud Healthcare consent store.
dicom_store:
name: dicomStore
collection: healthcare.projects.locations.datasets.dicomStores
request_id_field: dicomStoreId
attributes:
- *location
- *dataset
- &dicom-store
parameter_name: dicomStoresId
attribute_name: dicom_store
help: Cloud Healthcare DICOM store.
fhir_store:
name: fhirStore
collection: healthcare.projects.locations.datasets.fhirStores
request_id_field: fhirStoreId
attributes:
- *location
- *dataset
- &fhir-store
parameter_name: fhirStoresId
attribute_name: fhir_store
help: Cloud Healthcare FHIR store.
hl7v2_store:
name: hl7v2Store
collection: healthcare.projects.locations.datasets.hl7V2Stores
request_id_field: hl7V2StoreId
attributes:
- *location
- *dataset
- &hl7v2-store
parameter_name: hl7V2StoresId
attribute_name: hl7v2_store
help: Cloud Healthcare Hl7v2 Store
nlp:
name: nlp
collection: healthcare.projects.locations.services.nlp
attributes:
- *location

View File

@@ -0,0 +1,82 @@
# -*- coding: utf-8 -*- #
# Copyright 2019 Google LLC. All Rights Reserved.
#
# 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.
"""General utilties for Cloud Healthcare commands."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.api_lib.util import apis
# Returns a function that inserts an empty FHIR config object (of the given API
# version) when the flag is set to true.
def InsertEmptyFhirConfig(api_version):
def VersionedInsertEmptyFhirConfig(flag):
if not flag:
return None
messages = apis.GetMessagesModule('healthcare', api_version)
return messages.FhirConfig()
return VersionedInsertEmptyFhirConfig
# Returns a function that inserts an AnnotationConfig in DeidentifyConfig with
# 'store_quote' field set to True.
def InsertAnnotationConfig(api_version):
def VersionedInsertAnnotationConfig(annotation_store):
if not annotation_store:
return None
messages = apis.GetMessagesModule('healthcare', api_version)
return messages.AnnotationConfig(
annotationStoreName=annotation_store, storeQuote=True)
return VersionedInsertAnnotationConfig
def InsertDicomStreamConfig(api_version):
"""Returns a function that inserts a DicomStreamingConfig of a Dicom Store.
Args:
api_version: the version of the API that is currently being used.
Returns:
A DicomStreamConfig object with provided BigQueryDestinations.
"""
def VersionedInsertDicomStreamConfig(arg):
if not arg:
return None
bq_destinations = arg.split(',')
messages = apis.GetMessagesModule('healthcare', api_version)
stream_configs = []
if api_version == 'v1alpha2':
for dest in bq_destinations:
stream_configs.append(messages.GoogleCloudHealthcareV1alpha2DicomStreamConfig(
bigqueryDestination=
messages.GoogleCloudHealthcareV1alpha2DicomBigQueryDestination(
tableUri=dest)))
elif api_version == 'v1beta1':
for dest in bq_destinations:
stream_configs.append(messages.GoogleCloudHealthcareV1beta1DicomStreamConfig(
bigqueryDestination=
messages.GoogleCloudHealthcareV1beta1DicomBigQueryDestination(
tableUri=dest)))
else:
for dest in bq_destinations:
stream_configs.append(messages.GoogleCloudHealthcareV1DicomStreamConfig(
bigqueryDestination=
messages.GoogleCloudHealthcareV1DicomBigQueryDestination(
tableUri=dest)))
return stream_configs
return VersionedInsertDicomStreamConfig