def run_command()

in healthcare/api-client/v1/hl7v2/hl7v2_messages.py [0:0]


def run_command(args):
    """Calls the program using the specified command."""
    if args.project_id is None:
        print(
            "You must specify a project ID or set the "
            '"GOOGLE_CLOUD_PROJECT" environment variable.'
        )
        return

    elif args.command == "create-hl7v2-message":
        create_hl7v2_message(
            args.project_id,
            args.location,
            args.dataset_id,
            args.hl7v2_store_id,
            args.hl7v2_message_file,
        )

    elif args.command == "delete-hl7v2-message":
        delete_hl7v2_message(
            args.project_id,
            args.location,
            args.dataset_id,
            args.hl7v2_store_id,
            args.hl7v2_message_id,
        )

    elif args.command == "get-hl7v2-message":
        get_hl7v2_message(
            args.project_id,
            args.location,
            args.dataset_id,
            args.hl7v2_store_id,
            args.hl7v2_message_id,
        )

    elif args.command == "ingest-hl7v2-message":
        ingest_hl7v2_message(
            args.project_id,
            args.location,
            args.dataset_id,
            args.hl7v2_store_id,
            args.hl7v2_message_file,
        )

    elif args.command == "list-hl7v2-messages":
        list_hl7v2_messages(
            args.project_id, args.location, args.dataset_id, args.hl7v2_store_id
        )

    elif args.command == "patch-hl7v2-message":
        patch_hl7v2_message(
            args.project_id,
            args.location,
            args.dataset_id,
            args.hl7v2_store_id,
            args.hl7v2_message_id,
            args.label_key,
            args.label_value,
        )