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,28 @@
# -*- coding: utf-8 -*- #
# Copyright 2017 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.
"""The HL7v2 stores command group for the Cloud Healthcare API CLI."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.calliope import base
@base.ReleaseTracks(base.ReleaseTrack.ALPHA, base.ReleaseTrack.BETA,
base.ReleaseTrack.GA)
class HL7v2Stores(base.Group):
"""Manage Cloud Healthcare API HL7v2 stores."""

View File

@@ -0,0 +1,31 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: Add an IAM policy binding to a Cloud Healthcare API HL7v2 store.
description: |
Add an IAM policy binding to a Cloud Healthcare API HL7v2 store.
examples: |
To add an IAM policy binding for the role of 'roles/editor' for the user 'test-user@gmail.com'
on the HL7v2 store 'test-hl7v2-store', run:
$ {command} test-hl7v2-store --dataset=test-dataset --member='user:test-user@gmail.com' --role='roles/editor'
See https://cloud.google.com/iam/docs/managing-policies for details of
policy role and member types.
request:
collection: healthcare.projects.locations.datasets.hl7V2Stores
ALPHA:
api_version: v1alpha2
BETA:
api_version: v1beta1
GA:
api_version: v1
arguments:
resource:
help_text: Cloud Healthcare API HL7v2 store to add an IAM policy binding to.
spec: !REF googlecloudsdk.command_lib.healthcare.resources:hl7v2_store
iam:
enable_condition: true

View File

@@ -0,0 +1,137 @@
- release_tracks: [ALPHA, BETA]
help_text:
brief: Create a Cloud Healthcare API HL7v2 store.
description: |
Create a Cloud Healthcare API HL7v2 store.
examples: |
To create a HL7v2 store called 'test-hl7v2-store', run:
$ {command} test-hl7v2-store --dataset=test-dataset
To create a HL7v2 store with the Cloud Pub/Sub topic 'test-pubsub-topic', run:
$ {command} test-hl7v2-store --dataset=test-dataset --pubsub-topic=projects/my-project/topics/test-pubsub-topic
request:
collection: healthcare.projects.locations.datasets.hl7V2Stores
ALPHA:
api_version: v1alpha2
BETA:
api_version: v1beta1
arguments:
resource:
help_text: Cloud Healthcare API HL7v2 store to create.
spec: !REF googlecloudsdk.command_lib.healthcare.resources:hl7v2_store
params:
- api_field: hl7V2Store.notificationConfig.pubsubTopic
arg_name: pubsub-topic
help_text: |
A Google Cloud Pub/Sub topic name for notifications.
Note: A topic must be created before publishing or subscribing to it. For instructions
on creating topics, refer to: https://cloud.google.com/pubsub/docs/admin#create_a_topic
- api_field: hl7V2Store.parserConfig.version
arg_name: parser-version
help_text: |
Immutable. Determines the version of both the default parser to be used when [schema](https://cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.hl7V2Stores#ParserConfig.FIELDS.schema) is
not given, as well as the schematized parser used when [schema](https://cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.hl7V2Stores#ParserConfig.FIELDS.schema) is specified. This field
is immutable after HL7v2 store creation.
choices:
- arg_value: v1
enum_value: V1
help_text:
The parsedData includes every given non-empty message field except the Field Separator
(MSH-1) field. As a result, the parsed MSH segment starts with the MSH-2 field and
the field numbers are off-by-one with respect to the HL7 standard.
- arg_value: v2
enum_value: V2
help_text: |
The parsedData includes every given non-empty message field.
- arg_value: v3
enum_value: V3
help_text: |
This version is the same as V2, with the following change.
The parsedData contains unescaped escaped field separators, component separators,
sub-component separators, repetition separators, escape characters, and truncation
characters.
If [schema](https://cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.hl7V2Stores#ParserConfig.FIELDS.schema) is specified, the schematized parser uses improved parsing heuristics
compared to previous versions.
- release_tracks: [GA]
help_text:
brief: Create a Cloud Healthcare API HL7v2 store.
description: |
Create a Cloud Healthcare API HL7v2 store.
examples: |
To create a HL7v2 store called ``test-hl7v2-store'', run:
$ {command} test-hl7v2-store --dataset=test-dataset
To create a HL7v2 store with two Cloud Pub/Sub topics ``test-pubsub-topic1'' and ``test-pubsub-topic2'' with corresponding filters, run:
$ {command} test-hl7v2-store --dataset=test-dataset --notification-config=pubsub-topic=projects/my-project/topics/test-pubsub-topic1,filter="labels.priority=high" --notification-config=pubsub-topic=projects/my-project/topics/test-pubsub-topic2,filter=PatientId("123456", "MRN")
request:
collection: healthcare.projects.locations.datasets.hl7V2Stores
GA:
api_version: v1
arguments:
resource:
help_text: Cloud Healthcare API HL7v2 store to create.
spec: !REF googlecloudsdk.command_lib.healthcare.resources:hl7v2_store
params:
- api_field: hl7V2Store.notificationConfigs
arg_name: notification-config
help_text: |
A list of notification configs. Each configuration uses a filter to determine whether to
publish a message (both Ingest & Create) on the corresponding notification destination.
Only the message name is sent as part of the notification. Supplied by the client.
See https://cloud.google.com/appengine/docs/standard/python/search/query_strings for the
syntax of the filter.
Note: A topic must be created before publishing or subscribing to it. For instructions
on creating topics, refer to: https://cloud.google.com/pubsub/docs/admin#create_a_topic
type:
arg_dict:
flatten: false
spec:
- api_field: pubsubTopic
arg_name: pubsub-topic
- api_field: filter
arg_name: filter
required: false
- api_field: hl7V2Store.parserConfig.version
arg_name: parser-version
help_text: |
Immutable. Determines the version of both the default parser to be used when [schema](https://cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.hl7V2Stores#ParserConfig.FIELDS.schema) is
not given, as well as the schematized parser used when [schema](https://cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.hl7V2Stores#ParserConfig.FIELDS.schema) is specified. This field
is immutable after HL7v2 store creation.
choices:
- arg_value: v1
enum_value: V1
help_text:
The parsedData includes every given non-empty message field except the Field Separator
(MSH-1) field. As a result, the parsed MSH segment starts with the MSH-2 field and
the field numbers are off-by-one with respect to the HL7 standard.
- arg_value: v2
enum_value: V2
help_text: |
The parsedData includes every given non-empty message field.
- arg_value: v3
enum_value: V3
help_text: |
This version is the same as V2, with the following change.
The parsedData contains unescaped escaped field separators, component separators,
sub-component separators, repetition separators, escape characters, and truncation
characters.
If [schema](https://cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.hl7V2Stores#ParserConfig.FIELDS.schema) is specified, the schematized parser uses improved parsing heuristics
compared to previous versions.

View File

@@ -0,0 +1,23 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: Delete a Cloud Healthcare API HL7v2 store.
description: Delete a Cloud Healthcare API HL7v2 store.
examples: |
To delete the HL7v2 store 'test-hl7v2-store', run:
$ {command} test-hl7v2-store --dataset=test-dataset
request:
collection: healthcare.projects.locations.datasets.hl7V2Stores
ALPHA:
api_version: v1alpha2
BETA:
api_version: v1beta1
GA:
api_version: v1
arguments:
resource:
help_text: Cloud Healthcare API HL7v2 store to delete.
spec: !REF googlecloudsdk.command_lib.healthcare.resources:hl7v2_store

View File

@@ -0,0 +1,23 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: Describe a Cloud Healthcare API HL7v2 store.
description: Describe a Cloud Healthcare API HL7v2 store.
examples: |
To describe the HL7v2 store 'test-hl7v2-store', run:
$ {command} test-hl7v2-store --dataset=test-dataset
request:
collection: healthcare.projects.locations.datasets.hl7V2Stores
ALPHA:
api_version: v1alpha2
BETA:
api_version: v1beta1
GA:
api_version: v1
arguments:
resource:
help_text: Cloud Healthcare API HL7v2 store to describe.
spec: !REF googlecloudsdk.command_lib.healthcare.resources:hl7v2_store

View File

@@ -0,0 +1,27 @@
# -*- 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.
"""The HL7v2 stores command export group for the Cloud Healthcare API CLI."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.calliope import base
@base.ReleaseTracks(base.ReleaseTrack.ALPHA, base.ReleaseTrack.BETA,
base.ReleaseTrack.GA)
class HL7v2StoreExports(base.Group):
"""Manage Cloud Healthcare API HL7v2 store exports."""

View File

@@ -0,0 +1,82 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: Export Cloud Healthcare API HL7v2 messages to Google Cloud Storage.
description: Export Cloud Healthcare API HL7v2 messages to Google Cloud Storage.
examples: |
To export the hl7v2-store 'test-hl7v2-store' to the existing bucket 'testGcsBucket' in the folder 'someFolder', run:
$ {command} test-hl7v2-store --gcs-uri=gs://testGcsBucket/someFolder --dataset=test-dataset
To perform the same export, but exporting messages with the message view of 'RAW_ONLY', run:
$ {command} test-hl7v2-store --gcs-uri=gs://testGcsBucket/someFolder --dataset=test-dataset --message-view=RAW_ONLY
request:
collection: healthcare.projects.locations.datasets.hl7V2Stores
method: export
ALPHA:
api_version: v1alpha2
BETA:
api_version: v1beta1
GA:
api_version: v1
arguments:
resource:
help_text: Cloud Healthcare API HL7v2 store to export messages from.
spec: !REF googlecloudsdk.command_lib.healthcare.resources:hl7v2_store
params:
- arg_name: gcs-uri
api_field: exportMessagesRequest.gcsDestination.uriPrefix
required: true
help_text: |
The Cloud Storage destination location. Specify a path to a Cloud
Storage bucket or folder rather than a concrete object. The exported
messages are ordered by the message send_time (MSH.7) in ascending
order. The server will create one or more objects. Each object contains
newline delimited JSON, and each line is an HL7v2 message.
- arg_name: start-time
api_field: exportMessagesRequest.startTime
help_text: |
The start of the range in message send_time (MSH.7) to process. If not
specified, the UNIX epoch (1970-01-01T00:00:00Z) is used.
- arg_name: end-time
api_field: exportMessagesRequest.endTime
help_text: |
The end of the range in message send_time (MSH.7) to process. If not
specified, the time when the export is scheduled is used.
- arg_name: message-view
api_field: exportMessagesRequest.gcsDestination.messageView
choices:
- arg_value: raw-only
enum_value: RAW_ONLY
help_text: |
Exported resources include all the message fields except parsedData
and schematizedData fields.
- arg_value: parsed-only
enum_value: PARSED_ONLY
help_text: |
Exported resources include all the message fields except data and
schematizedData fields.
- arg_value: full
enum_value: FULL
help_text: |
Exported resources include all the message fields.
- arg_value: schematized-only
enum_value: SCHEMATIZED_ONLY
help_text: |
Exported resources include all the message fields except data and
parsedData fields.
- arg_value: basic
enum_value: BASIC
help_text: |
Exported resources include only the name field.
help_text: |
Specifies the parts of the Message resource to include in the export.
The default is FULL.
async:
collection: healthcare.projects.locations.datasets.operations

View File

@@ -0,0 +1,24 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: Retrieve the IAM policy for a Cloud Healthcare API HL7v2 store.
description: Retrieve the IAM policy for a Cloud Healthcare API HL7v2 store.
examples: |
To print the IAM policy for the HL7v2 store 'test-hl7v2-store', run:
$ {command} test-hl7v2-store --dataset=test-dataset
request:
collection: healthcare.projects.locations.datasets.hl7V2Stores
ALPHA:
api_version: v1alpha2
BETA:
api_version: v1beta1
GA:
api_version: v1
arguments:
resource:
help_text: Cloud Healthcare API HL7v2 store whose IAM policy to fetch.
spec: !REF googlecloudsdk.command_lib.healthcare.resources:hl7v2_store

View File

@@ -0,0 +1,27 @@
# -*- 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.
"""The HL7v2 stores command import group for the Cloud Healthcare API CLI."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.calliope import base
@base.ReleaseTracks(base.ReleaseTrack.ALPHA, base.ReleaseTrack.BETA,
base.ReleaseTrack.GA)
class HL7v2StoreImports(base.Group):
"""Manage Cloud Healthcare API HL7v2 store imports."""

View File

@@ -0,0 +1,36 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: Import HL7v2 messages from Google Cloud Storage into a Cloud Healthcare API HL7v2 store.
description: Import HL7v2 messages from Google Cloud Storage into a Cloud Healthcare API HL7v2 store.
examples: |
To import the HL7v2 messages from the existing bucket 'testGcsBucket' in the folder 'someFolder' into the HL7v2 store 'test-hl7v2-store', run:
$ {command} test-hl7v2-store --gcs-uri=gs://testGcsBucket/someFolder --dataset=test-dataset
request:
collection: healthcare.projects.locations.datasets.hl7V2Stores
method: import
ALPHA:
api_version: v1alpha2
BETA:
api_version: v1beta1
GA:
api_version: v1
arguments:
resource:
help_text: Cloud Healthcare API HL7v2 store into which the data is imported.
spec: !REF googlecloudsdk.command_lib.healthcare.resources:hl7v2_store
params:
- arg_name: gcs-uri
api_field: importMessagesRequest.gcsSource.uri
required: true
help_text: |
Cloud Storage source data locations. Each Cloud Storage object should
be a text file that contains newline-delimited JSON objects. Each JSON
object has a data field that contains a base64-encoded HL7v2 message.
async:
collection: healthcare.projects.locations.datasets.operations

View File

@@ -0,0 +1,36 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: List Cloud Healthcare API HL7v2 stores.
description: List Cloud Healthcare API HL7v2 stores.
examples: |
To list the HL7v2 stores in 'test-dataset', run:
$ {command} --dataset=test-dataset
request:
collection: healthcare.projects.locations.datasets.hl7V2Stores
ALPHA:
api_version: v1alpha2
BETA:
api_version: v1beta1
GA:
api_version: v1
response:
id_field: name
arguments:
resource:
help_text: |
Parent Cloud Healthcare API dataset to list all contained Cloud Healthcare API HL7v2 stores for.
spec: !REF googlecloudsdk.command_lib.healthcare.resources:dataset
output:
format: |
table(
name.scope("hl7V2Stores"):label=ID,
name.scope("locations").segment(0):label=LOCATION,
notificationConfig.pubsubTopic:label=TOPIC,
parserConfig.version:label=PARSER_VER
)

View File

@@ -0,0 +1,24 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: Gets the metrics for a Cloud Healthcare API HL7v2 store.
description: Gets the metrics for a Cloud Healthcare API HL7v2 store.
examples: |
To get metrics for the HL7v2 store 'test-hl7v2-store', run:
$ {command} test-hl7v2-store --dataset=test-dataset
request:
collection: healthcare.projects.locations.datasets.hl7V2Stores
method: getHL7v2StoreMetrics
ALPHA:
api_version: v1alpha2
BETA:
api_version: v1beta1
GA:
api_version: v1
arguments:
resource:
help_text: Cloud Healthcare API HL7v2 store to get metrics for.
spec: !REF googlecloudsdk.command_lib.healthcare.resources:hl7v2_store

View File

@@ -0,0 +1,31 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: Remove an IAM policy binding from a Cloud Healthcare API HL7v2 store.
description: |
Remove an IAM policy binding from a Cloud Healthcare API HL7v2 store.
examples: |
To remove an IAM policy binding for the role of 'roles/editor' for the user
'test-user@gmail.com' on the HL7v2 store 'test-hl7v2-store', run:
$ {command} test-hl7v2-store --dataset=test-dataset --member='user:test-user@gmail.com' --role='roles/editor'
See https://cloud.google.com/iam/docs/managing-policies for details of
policy role and member types.
request:
collection: healthcare.projects.locations.datasets.hl7V2Stores
ALPHA:
api_version: v1alpha2
BETA:
api_version: v1beta1
GA:
api_version: v1
arguments:
resource:
help_text: Cloud Healthcare API HL7v2 store to remove an IAM policy binding from.
spec: !REF googlecloudsdk.command_lib.healthcare.resources:hl7v2_store
iam:
enable_condition: true

View File

@@ -0,0 +1,28 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: Set the IAM policy for a Cloud Healthcare API HL7v2 store.
description: Set the IAM policy for a Cloud Healthcare API HL7v2 store.
examples: |
The following command will read am IAM policy defined in a JSON file
'policy.json' and set it for the HL7v2 store 'test-hl7v2-store':
$ {command} test-hl7v2-store policy.json --dataset=test-dataset
See https://cloud.google.com/iam/docs/managing-policies for details of the
policy file format and contents.
request:
collection: healthcare.projects.locations.datasets.hl7V2Stores
ALPHA:
api_version: v1alpha2
BETA:
api_version: v1beta1
GA:
api_version: v1
arguments:
resource:
help_text: Cloud Healthcare API HL7v2 store whose IAM policy to set.
spec: !REF googlecloudsdk.command_lib.healthcare.resources:hl7v2_store

View File

@@ -0,0 +1,74 @@
- release_tracks: [ALPHA, BETA]
help_text:
brief: Update a Cloud Healthcare API HL7v2 store.
description: Update a Cloud Healthcare API HL7v2 store.
examples: |
To update the Cloud Pub/Sub topic on a HL7v2 store 'test-hl7v2-store', run:
$ {command} test-hl7v2-store --pubsub-topic=projects/my-project/topics/test-pubsub-topic --dataset=test-dataset
request:
collection: healthcare.projects.locations.datasets.hl7V2Stores
ALPHA:
api_version: v1alpha2
BETA:
api_version: v1beta1
arguments:
resource:
help_text: Cloud Healthcare API HL7v2 store to update.
spec: !REF googlecloudsdk.command_lib.healthcare.resources:hl7v2_store
params:
- api_field: hl7V2Store.notificationConfig.pubsubTopic
arg_name: pubsub-topic
help_text: |
Google Cloud Pub/Sub topic name to send updates to.
Note: A topic must be created before publishing or subscribing to it. For instructions
on creating topics, refer to: https://cloud.google.com/pubsub/docs/admin#create_a_topic
- release_tracks: [GA]
help_text:
brief: Update a Cloud Healthcare API HL7v2 store.
description: |
Update a Cloud Healthcare API HL7v2 store.
examples: |
To update the Cloud Pub/Sub topics on a HL7v2 store ``test-hl7v2-store'', run:
$ {command} test-hl7v2-store --notification-config=pubsub-topic=projects/my-project/topics/test-pubsub-topic1,filter="labels.priority=high" --notification-config=pubsub-topic=projects/my-project/topics/test-pubsub-topic2
request:
collection: healthcare.projects.locations.datasets.hl7V2Stores
GA:
api_version: v1
arguments:
resource:
help_text: Cloud Healthcare API HL7v2 store to update.
spec: !REF googlecloudsdk.command_lib.healthcare.resources:hl7v2_store
params:
- api_field: hl7V2Store.notificationConfigs
arg_name: notification-config
help_text: |
A list of notification configs. Each configuration uses a filter to determine whether to
publish a message (both Ingest & Create) on the corresponding notification destination.
Only the message name is sent as part of the notification. Supplied by the client.
See https://cloud.google.com/appengine/docs/standard/python/search/query_strings for the
syntax of the filter.
Note: A topic must be created before publishing or subscribing to it. For instructions
on creating topics, refer to: https://cloud.google.com/pubsub/docs/admin#create_a_topic
type:
arg_dict:
flatten: false
spec:
- api_field: pubsubTopic
arg_name: pubsub-topic
- api_field: filter
arg_name: filter
required: false