# generated by fastapi-codegen:
# filename: openapi.yaml
# timestamp: 2025-06-29T02:25:26+00:00
from __future__ import annotations
from enum import Enum
from typing import Any, Dict, List, Optional
from pydantic import BaseModel, Field
class AlterMetadataResourceLocationRequest(BaseModel):
locationUri: Optional[str] = Field(
None, description='Required. The new location URI for the metadata resource.'
)
resourceName: Optional[str] = Field(
None,
description='Required. The relative metadata resource name in the following format.databases/{database_id} or databases/{database_id}/tables/{table_id} or databases/{database_id}/tables/{table_id}/partitions/{partition_id}',
)
class AlterMetadataResourceLocationResponse(BaseModel):
pass
class LogType(Enum):
LOG_TYPE_UNSPECIFIED = 'LOG_TYPE_UNSPECIFIED'
ADMIN_READ = 'ADMIN_READ'
DATA_WRITE = 'DATA_WRITE'
DATA_READ = 'DATA_READ'
class AuditLogConfig(BaseModel):
exemptedMembers: Optional[List[str]] = Field(
None,
description='Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.',
)
logType: Optional[LogType] = Field(
None, description='The log type that this config enables.'
)
class MetastoreType(Enum):
METASTORE_TYPE_UNSPECIFIED = 'METASTORE_TYPE_UNSPECIFIED'
DATAPLEX = 'DATAPLEX'
BIGQUERY = 'BIGQUERY'
DATAPROC_METASTORE = 'DATAPROC_METASTORE'
class BackendMetastore(BaseModel):
metastoreType: Optional[MetastoreType] = Field(
None, description='The type of the backend metastore.'
)
name: Optional[str] = Field(
None,
description='The relative resource name of the metastore that is being federated. The formats of the relative resource names for the currently supported metastores are listed below: BigQuery projects/{project_id} Dataproc Metastore projects/{project_id}/locations/{location}/services/{service_id}',
)
class State(Enum):
STATE_UNSPECIFIED = 'STATE_UNSPECIFIED'
CREATING = 'CREATING'
DELETING = 'DELETING'
ACTIVE = 'ACTIVE'
FAILED = 'FAILED'
RESTORING = 'RESTORING'
class CancelOperationRequest(BaseModel):
pass
class Consumer(BaseModel):
endpointUri: Optional[str] = Field(
None,
description='Output only. The URI of the endpoint used to access the metastore service.',
)
subnetwork: Optional[str] = Field(
None,
description="Immutable. The subnetwork of the customer project from which an IP address is reserved and used as the Dataproc Metastore service's endpoint. It is accessible to hosts in the subnet and to all hosts in a subnet in the same region and same network. There must be at least one IP address available in the subnet's primary range. The subnet is specified in the following form:projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}",
)
class DataCatalogConfig(BaseModel):
enabled: Optional[bool] = Field(
None,
description='Defines whether the metastore metadata should be synced to Data Catalog. The default value is to disable syncing metastore metadata to Data Catalog.',
)
class DatabaseType(Enum):
DATABASE_TYPE_UNSPECIFIED = 'DATABASE_TYPE_UNSPECIFIED'
MYSQL = 'MYSQL'
class Type(Enum):
TYPE_UNSPECIFIED = 'TYPE_UNSPECIFIED'
MYSQL = 'MYSQL'
AVRO = 'AVRO'
class DatabaseDump(BaseModel):
databaseType: Optional[DatabaseType] = Field(
None, description='The type of the database.'
)
gcsUri: Optional[str] = Field(
None,
description='A Cloud Storage object or folder URI that specifies the source from which to import metadata. It must begin with gs://.',
)
sourceDatabase: Optional[str] = Field(
None, description='The name of the source database.'
)
type: Optional[Type] = Field(
None,
description='Optional. The type of the database dump. If unspecified, defaults to MYSQL.',
)
class Empty(BaseModel):
pass
class EncryptionConfig(BaseModel):
kmsKey: Optional[str] = Field(
None,
description='The fully qualified customer provided Cloud KMS key name to use for customer data encryption, in the following form:projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}.',
)
class DatabaseDumpType(Enum):
TYPE_UNSPECIFIED = 'TYPE_UNSPECIFIED'
MYSQL = 'MYSQL'
AVRO = 'AVRO'
class ExportMetadataRequest(BaseModel):
databaseDumpType: Optional[DatabaseDumpType] = Field(
None,
description='Optional. The type of the database dump. If unspecified, defaults to MYSQL.',
)
destinationGcsFolder: Optional[str] = Field(
None,
description='A Cloud Storage URI of a folder, in the format gs:///. A sub-folder containing exported files will be created below it.',
)
requestId: Optional[str] = Field(
None,
description='Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.',
)
class Expr(BaseModel):
description: Optional[str] = Field(
None,
description='Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.',
)
expression: Optional[str] = Field(
None,
description='Textual representation of an expression in Common Expression Language syntax.',
)
location: Optional[str] = Field(
None,
description='Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.',
)
title: Optional[str] = Field(
None,
description='Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.',
)
class State1(Enum):
STATE_UNSPECIFIED = 'STATE_UNSPECIFIED'
CREATING = 'CREATING'
ACTIVE = 'ACTIVE'
UPDATING = 'UPDATING'
DELETING = 'DELETING'
ERROR = 'ERROR'
class Federation(BaseModel):
backendMetastores: Optional[Dict[str, BackendMetastore]] = Field(
None,
description='A map from BackendMetastore rank to BackendMetastores from which the federation service serves metadata at query time. The map key represents the order in which BackendMetastores should be evaluated to resolve database names at query time and should be greater than or equal to zero. A BackendMetastore with a lower number will be evaluated before a BackendMetastore with a higher number.',
)
createTime: Optional[str] = Field(
None,
description='Output only. The time when the metastore federation was created.',
)
endpointUri: Optional[str] = Field(
None, description='Output only. The federation endpoint.'
)
labels: Optional[Dict[str, str]] = Field(
None, description='User-defined labels for the metastore federation.'
)
name: Optional[str] = Field(
None,
description='Immutable. The relative resource name of the federation, of the form: projects/{project_number}/locations/{location_id}/federations/{federation_id}`.',
)
state: Optional[State1] = Field(
None, description='Output only. The current state of the federation.'
)
stateMessage: Optional[str] = Field(
None,
description='Output only. Additional information about the current state of the metastore federation, if available.',
)
uid: Optional[str] = Field(
None,
description='Output only. The globally unique resource identifier of the metastore federation.',
)
updateTime: Optional[str] = Field(
None,
description='Output only. The time when the metastore federation was last updated.',
)
version: Optional[str] = Field(
None,
description='Immutable. The Apache Hive metastore version of the federation. All backend metastore versions must be compatible with the federation version.',
)
class EndpointProtocol(Enum):
ENDPOINT_PROTOCOL_UNSPECIFIED = 'ENDPOINT_PROTOCOL_UNSPECIFIED'
THRIFT = 'THRIFT'
GRPC = 'GRPC'
class HiveMetastoreVersion(BaseModel):
isDefault: Optional[bool] = Field(
None,
description='Whether version will be chosen by the server if a metastore service is created with a HiveMetastoreConfig that omits the version.',
)
version: Optional[str] = Field(
None, description='The semantic version of the Hive Metastore software.'
)
class Lake(BaseModel):
name: Optional[str] = Field(
None,
description='The Lake resource name. Example: projects/{project_number}/locations/{location_id}/lakes/{lake_id}',
)
class ListFederationsResponse(BaseModel):
federations: Optional[List[Federation]] = Field(
None, description='The services in the specified location.'
)
nextPageToken: Optional[str] = Field(
None,
description='A token that can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.',
)
unreachable: Optional[List[str]] = Field(
None, description='Locations that could not be reached.'
)
class Location(BaseModel):
displayName: Optional[str] = Field(
None,
description='The friendly name for this location, typically a nearby city name. For example, "Tokyo".',
)
labels: Optional[Dict[str, str]] = Field(
None,
description='Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"} ',
)
locationId: Optional[str] = Field(
None, description='The canonical id for this location. For example: "us-east1".'
)
metadata: Optional[Dict[str, Any]] = Field(
None,
description='Service-specific metadata. For example the available capacity at the given location.',
)
name: Optional[str] = Field(
None,
description='Resource name for the location, which may vary between implementations. For example: "projects/example-project/locations/us-east1"',
)
class LocationMetadata(BaseModel):
supportedHiveMetastoreVersions: Optional[List[HiveMetastoreVersion]] = Field(
None,
description='The versions of Hive Metastore that can be used when creating a new metastore service in this location. The server guarantees that exactly one HiveMetastoreVersion in the list will set is_default.',
)
class DayOfWeek(Enum):
DAY_OF_WEEK_UNSPECIFIED = 'DAY_OF_WEEK_UNSPECIFIED'
MONDAY = 'MONDAY'
TUESDAY = 'TUESDAY'
WEDNESDAY = 'WEDNESDAY'
THURSDAY = 'THURSDAY'
FRIDAY = 'FRIDAY'
SATURDAY = 'SATURDAY'
SUNDAY = 'SUNDAY'
class MaintenanceWindow(BaseModel):
dayOfWeek: Optional[DayOfWeek] = Field(
None, description='The day of week, when the window starts.'
)
hourOfDay: Optional[int] = Field(
None, description='The hour of day (0-23) when the window starts.'
)
class State2(Enum):
STATE_UNSPECIFIED = 'STATE_UNSPECIFIED'
RUNNING = 'RUNNING'
SUCCEEDED = 'SUCCEEDED'
FAILED = 'FAILED'
CANCELLED = 'CANCELLED'
class MetadataExport(BaseModel):
databaseDumpType: Optional[DatabaseDumpType] = Field(
None, description='Output only. The type of the database dump.'
)
destinationGcsUri: Optional[str] = Field(
None,
description='Output only. A Cloud Storage URI of a folder that metadata are exported to, in the form of gs:////, where is automatically generated.',
)
endTime: Optional[str] = Field(
None, description='Output only. The time when the export ended.'
)
startTime: Optional[str] = Field(
None, description='Output only. The time when the export started.'
)
state: Optional[State2] = Field(
None, description='Output only. The current state of the export.'
)
class State3(Enum):
STATE_UNSPECIFIED = 'STATE_UNSPECIFIED'
RUNNING = 'RUNNING'
SUCCEEDED = 'SUCCEEDED'
UPDATING = 'UPDATING'
FAILED = 'FAILED'
class MetadataImport(BaseModel):
createTime: Optional[str] = Field(
None, description='Output only. The time when the metadata import was started.'
)
databaseDump: Optional[DatabaseDump] = Field(
None,
description="Immutable. A database dump from a pre-existing metastore's database.",
)
description: Optional[str] = Field(
None, description='The description of the metadata import.'
)
endTime: Optional[str] = Field(
None, description='Output only. The time when the metadata import finished.'
)
name: Optional[str] = Field(
None,
description='Immutable. The relative resource name of the metadata import, of the form:projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}.',
)
state: Optional[State3] = Field(
None, description='Output only. The current state of the metadata import.'
)
updateTime: Optional[str] = Field(
None,
description='Output only. The time when the metadata import was last updated.',
)
class MoveTableToDatabaseRequest(BaseModel):
dbName: Optional[str] = Field(
None, description='Required. The name of the database where the table resides.'
)
destinationDbName: Optional[str] = Field(
None,
description='Required. The name of the database where the table should be moved.',
)
tableName: Optional[str] = Field(
None, description='Required. The name of the table to be moved.'
)
class MoveTableToDatabaseResponse(BaseModel):
pass
class NetworkConfig(BaseModel):
consumers: Optional[List[Consumer]] = Field(
None,
description='Immutable. The consumer-side network configuration for the Dataproc Metastore instance.',
)
customRoutesEnabled: Optional[bool] = Field(
None,
description="Enables custom routes to be imported and exported for the Dataproc Metastore service's peered VPC network.",
)
class OperationMetadata(BaseModel):
apiVersion: Optional[str] = Field(
None, description='Output only. API version used to start the operation.'
)
createTime: Optional[str] = Field(
None, description='Output only. The time the operation was created.'
)
endTime: Optional[str] = Field(
None, description='Output only. The time the operation finished running.'
)
requestedCancellation: Optional[bool] = Field(
None,
description='Output only. Identifies whether the caller has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.',
)
statusMessage: Optional[str] = Field(
None, description='Output only. Human-readable status of the operation, if any.'
)
target: Optional[str] = Field(
None,
description='Output only. Server-defined resource path for the target of the operation.',
)
verb: Optional[str] = Field(
None, description='Output only. Name of the verb executed by the operation.'
)
class QueryMetadataRequest(BaseModel):
query: Optional[str] = Field(
None,
description='Required. A read-only SQL query to execute against the metadata database. The query cannot change or mutate the data.',
)
class QueryMetadataResponse(BaseModel):
resultManifestUri: Optional[str] = Field(
None,
description='The manifest URI is link to a JSON instance in Cloud Storage. This instance manifests immediately along with QueryMetadataResponse. The content of the URI is not retriable until the long-running operation query against the metadata finishes.',
)
class RemoveIamPolicyRequest(BaseModel):
asynchronous: Optional[bool] = Field(
None,
description='Optional. Removes IAM policy attached to database or table asynchronously when it is set. The default is false.',
)
class RemoveIamPolicyResponse(BaseModel):
success: Optional[bool] = Field(
None, description='True if the policy is successfully removed.'
)
class State4(Enum):
STATE_UNSPECIFIED = 'STATE_UNSPECIFIED'
RUNNING = 'RUNNING'
SUCCEEDED = 'SUCCEEDED'
FAILED = 'FAILED'
CANCELLED = 'CANCELLED'
class Type1(Enum):
RESTORE_TYPE_UNSPECIFIED = 'RESTORE_TYPE_UNSPECIFIED'
FULL = 'FULL'
METADATA_ONLY = 'METADATA_ONLY'
class Restore(BaseModel):
backup: Optional[str] = Field(
None,
description='Output only. The relative resource name of the metastore service backup to restore from, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}.',
)
details: Optional[str] = Field(
None,
description='Output only. The restore details containing the revision of the service to be restored to, in format of JSON.',
)
endTime: Optional[str] = Field(
None, description='Output only. The time when the restore ended.'
)
startTime: Optional[str] = Field(
None, description='Output only. The time when the restore started.'
)
state: Optional[State4] = Field(
None, description='Output only. The current state of the restore.'
)
type: Optional[Type1] = Field(None, description='Output only. The type of restore.')
class RestoreType(Enum):
RESTORE_TYPE_UNSPECIFIED = 'RESTORE_TYPE_UNSPECIFIED'
FULL = 'FULL'
METADATA_ONLY = 'METADATA_ONLY'
class RestoreServiceRequest(BaseModel):
backup: Optional[str] = Field(
None,
description='Required. The relative resource name of the metastore service backup to restore from, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}.',
)
requestId: Optional[str] = Field(
None,
description='Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.',
)
restoreType: Optional[RestoreType] = Field(
None,
description='Optional. The type of restore. If unspecified, defaults to METADATA_ONLY.',
)
class InstanceSize(Enum):
INSTANCE_SIZE_UNSPECIFIED = 'INSTANCE_SIZE_UNSPECIFIED'
EXTRA_SMALL = 'EXTRA_SMALL'
SMALL = 'SMALL'
MEDIUM = 'MEDIUM'
LARGE = 'LARGE'
EXTRA_LARGE = 'EXTRA_LARGE'
class ScalingConfig(BaseModel):
instanceSize: Optional[InstanceSize] = Field(
None,
description='An enum of readable instance sizes, with each instance size mapping to a float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))',
)
scalingFactor: Optional[float] = Field(
None,
description='Scaling factor, increments of 0.1 for values less than 1.0, and increments of 1.0 for values greater than 1.0.',
)
class Secret(BaseModel):
cloudSecret: Optional[str] = Field(
None,
description='The relative resource name of a Secret Manager secret version, in the following form:projects/{project_number}/secrets/{secret_id}/versions/{version_id}.',
)
class DatabaseType1(Enum):
DATABASE_TYPE_UNSPECIFIED = 'DATABASE_TYPE_UNSPECIFIED'
MYSQL = 'MYSQL'
SPANNER = 'SPANNER'
class ReleaseChannel(Enum):
RELEASE_CHANNEL_UNSPECIFIED = 'RELEASE_CHANNEL_UNSPECIFIED'
CANARY = 'CANARY'
STABLE = 'STABLE'
class State5(Enum):
STATE_UNSPECIFIED = 'STATE_UNSPECIFIED'
CREATING = 'CREATING'
ACTIVE = 'ACTIVE'
SUSPENDING = 'SUSPENDING'
SUSPENDED = 'SUSPENDED'
UPDATING = 'UPDATING'
DELETING = 'DELETING'
ERROR = 'ERROR'
class Tier(Enum):
TIER_UNSPECIFIED = 'TIER_UNSPECIFIED'
DEVELOPER = 'DEVELOPER'
ENTERPRISE = 'ENTERPRISE'
class Status(BaseModel):
code: Optional[int] = Field(
None,
description='The status code, which should be an enum value of google.rpc.Code.',
)
details: Optional[List[Dict[str, Any]]] = Field(
None,
description='A list of messages that carry the error details. There is a common set of message types for APIs to use.',
)
message: Optional[str] = Field(
None,
description='A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.',
)
class LogFormat(Enum):
LOG_FORMAT_UNSPECIFIED = 'LOG_FORMAT_UNSPECIFIED'
LEGACY = 'LEGACY'
JSON = 'JSON'
class TelemetryConfig(BaseModel):
logFormat: Optional[LogFormat] = Field(
None, description="The output format of the Dataproc Metastore service's logs."
)
class TestIamPermissionsRequest(BaseModel):
permissions: Optional[List[str]] = Field(
None,
description='The set of permissions to check for the resource. Permissions with wildcards (such as * or storage.*) are not allowed. For more information see IAM Overview (https://cloud.google.com/iam/docs/overview#permissions).',
)
class TestIamPermissionsResponse(BaseModel):
permissions: Optional[List[str]] = Field(
None,
description='A subset of TestPermissionsRequest.permissions that the caller is allowed.',
)
class FieldXgafv(Enum):
field_1 = '1'
field_2 = '2'
class Alt(Enum):
json = 'json'
media = 'media'
proto = 'proto'
class AuditConfig(BaseModel):
auditLogConfigs: Optional[List[AuditLogConfig]] = Field(
None, description='The configuration for logging of each type of permission.'
)
service: Optional[str] = Field(
None,
description='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.',
)
class AuxiliaryVersionConfig(BaseModel):
configOverrides: Optional[Dict[str, str]] = Field(
None,
description="A mapping of Hive metastore configuration key-value pairs to apply to the auxiliary Hive metastore (configured in hive-site.xml) in addition to the primary version's overrides. If keys are present in both the auxiliary version's overrides and the primary version's overrides, the value from the auxiliary version's overrides takes precedence.",
)
networkConfig: Optional[NetworkConfig] = Field(
None,
description='Output only. The network configuration contains the endpoint URI(s) of the auxiliary Hive metastore service.',
)
version: Optional[str] = Field(
None,
description="The Hive metastore version of the auxiliary service. It must be less than the primary Hive metastore service's version.",
)
class Binding(BaseModel):
condition: Optional[Expr] = Field(
None,
description='The condition that is associated with this binding.If the condition evaluates to true, then this binding applies to the current request.If the condition evaluates to false, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).',
)
members: Optional[List[str]] = Field(
None,
description='Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. user:{emailid}: An email address that represents a specific Google account. For example, alice@example.com . serviceAccount:{emailid}: An email address that represents a Google service account. For example, my-other-app@appspot.gserviceaccount.com. serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]: An identifier for a Kubernetes service account (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, my-project.svc.id.goog[my-namespace/my-kubernetes-sa]. group:{emailid}: An email address that represents a Google group. For example, admins@example.com. domain:{domain}: The G Suite domain (primary) that represents all the users of that domain. For example, google.com or 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.',
)
role: Optional[str] = Field(
None,
description='Role that is assigned to the list of members, or principals. For example, roles/viewer, roles/editor, or roles/owner.',
)
class DataplexConfig(BaseModel):
lakeResources: Optional[Dict[str, Lake]] = Field(
None,
description='A reference to the Lake resources that this metastore service is attached to. The key is the lake resource name. Example: projects/{project_number}/locations/{location_id}/lakes/{lake_id}.',
)
class KerberosConfig(BaseModel):
keytab: Optional[Secret] = Field(
None,
description='A Kerberos keytab file that can be used to authenticate a service principal with a Kerberos Key Distribution Center (KDC).',
)
krb5ConfigGcsUri: Optional[str] = Field(
None,
description='A Cloud Storage URI that specifies the path to a krb5.conf file. It is of the form gs://{bucket_name}/path/to/krb5.conf, although the file does not need to be named krb5.conf explicitly.',
)
principal: Optional[str] = Field(
None,
description='A Kerberos principal that exists in the both the keytab the KDC to authenticate as. A typical principal is of the form primary/instance@REALM, but there is no exact format.',
)
class ListLocationsResponse(BaseModel):
locations: Optional[List[Location]] = Field(
None,
description='A list of locations that matches the specified filter in the request.',
)
nextPageToken: Optional[str] = Field(
None, description='The standard List next-page token.'
)
class ListMetadataImportsResponse(BaseModel):
metadataImports: Optional[List[MetadataImport]] = Field(
None, description='The imports in the specified service.'
)
nextPageToken: Optional[str] = Field(
None,
description='A token that can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.',
)
unreachable: Optional[List[str]] = Field(
None, description='Locations that could not be reached.'
)
class MetadataIntegration(BaseModel):
dataCatalogConfig: Optional[DataCatalogConfig] = Field(
None, description='The integration config for the Data Catalog service.'
)
dataplexConfig: Optional[DataplexConfig] = Field(
None, description='The integration config for the Dataplex service.'
)
class MetadataManagementActivity(BaseModel):
metadataExports: Optional[List[MetadataExport]] = Field(
None,
description='Output only. The latest metadata exports of the metastore service.',
)
restores: Optional[List[Restore]] = Field(
None, description='Output only. The latest restores of the metastore service.'
)
class Operation(BaseModel):
done: Optional[bool] = Field(
None,
description='If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.',
)
error: Optional[Status] = Field(
None,
description='The error result of the operation in case of failure or cancellation.',
)
metadata: Optional[Dict[str, Any]] = Field(
None,
description='Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.',
)
name: Optional[str] = Field(
None,
description='The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should be a resource name ending with operations/{unique_id}.',
)
response: Optional[Dict[str, Any]] = Field(
None,
description='The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.',
)
class Policy(BaseModel):
auditConfigs: Optional[List[AuditConfig]] = Field(
None, description='Specifies cloud audit logging configuration for this policy.'
)
bindings: Optional[List[Binding]] = Field(
None,
description='Associates a list of members, or principals, with a role. Optionally, may specify a condition that determines how and when the bindings are applied. Each of the bindings must contain at least one principal.The bindings in a Policy can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the bindings grant 50 different roles to user:alice@example.com, and not to any other principal, then you can add another 1,450 principals to the bindings in the Policy.',
)
etag: Optional[str] = Field(
None,
description='etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An etag is returned in the response to getIamPolicy, and systems are expected to put that etag in the request to setIamPolicy to ensure that their change will be applied to the same version of the policy.Important: If you use IAM Conditions, you must include the etag field whenever you call setIamPolicy. If you omit this field, then IAM allows you to overwrite a version 3 policy with a version 1 policy, and all of the conditions in the version 3 policy are lost.',
)
version: Optional[int] = Field(
None,
description='Specifies the format of the policy.Valid values are 0, 1, and 3. Requests that specify an invalid value are rejected.Any operation that affects conditional role bindings must specify version 3. This requirement applies to the following operations: Getting a policy that includes a conditional role binding Adding a conditional role binding to a policy Changing a conditional role binding in a policy Removing any role binding, with or without a condition, from a policy that includes conditionsImportant: If you use IAM Conditions, you must include the etag field whenever you call setIamPolicy. If you omit this field, then IAM allows you to overwrite a version 3 policy with a version 1 policy, and all of the conditions in the version 3 policy are lost.If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).',
)
class SetIamPolicyRequest(BaseModel):
policy: Optional[Policy] = Field(
None,
description='REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them.',
)
updateMask: Optional[str] = Field(
None,
description='OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used:paths: "bindings, etag"',
)
class HiveMetastoreConfig(BaseModel):
auxiliaryVersions: Optional[Dict[str, AuxiliaryVersionConfig]] = Field(
None,
description="A mapping of Hive metastore version to the auxiliary version configuration. When specified, a secondary Hive metastore service is created along with the primary service. All auxiliary versions must be less than the service's primary version. The key is the auxiliary service name and it must match the regular expression a-z?. This means that the first character must be a lowercase letter, and all the following characters must be hyphens, lowercase letters, or digits, except the last character, which cannot be a hyphen.",
)
configOverrides: Optional[Dict[str, str]] = Field(
None,
description="A mapping of Hive metastore configuration key-value pairs to apply to the Hive metastore (configured in hive-site.xml). The mappings override system defaults (some keys cannot be overridden). These overrides are also applied to auxiliary versions and can be further customized in the auxiliary version's AuxiliaryVersionConfig.",
)
endpointProtocol: Optional[EndpointProtocol] = Field(
None,
description='The protocol to use for the metastore service endpoint. If unspecified, defaults to THRIFT.',
)
kerberosConfig: Optional[KerberosConfig] = Field(
None,
description="Information used to configure the Hive metastore service as a service principal in a Kerberos realm. To disable Kerberos, use the UpdateService method and specify this field's path (hive_metastore_config.kerberos_config) in the request's update_mask while omitting this field from the request's service.",
)
version: Optional[str] = Field(
None, description='Immutable. The Hive metastore schema version.'
)
class ListOperationsResponse(BaseModel):
nextPageToken: Optional[str] = Field(
None, description='The standard List next-page token.'
)
operations: Optional[List[Operation]] = Field(
None,
description='A list of operations that matches the specified filter in the request.',
)
class Service(BaseModel):
artifactGcsUri: Optional[str] = Field(
None,
description='Output only. A Cloud Storage URI (starting with gs://) that specifies where artifacts related to the metastore service are stored.',
)
createTime: Optional[str] = Field(
None,
description='Output only. The time when the metastore service was created.',
)
databaseType: Optional[DatabaseType1] = Field(
None,
description='Immutable. The database type that the Metastore service stores its data.',
)
encryptionConfig: Optional[EncryptionConfig] = Field(
None,
description='Immutable. Information used to configure the Dataproc Metastore service to encrypt customer data at rest. Cannot be updated.',
)
endpointUri: Optional[str] = Field(
None,
description='Output only. The URI of the endpoint used to access the metastore service.',
)
hiveMetastoreConfig: Optional[HiveMetastoreConfig] = Field(
None,
description='Configuration information specific to running Hive metastore software as the metastore service.',
)
labels: Optional[Dict[str, str]] = Field(
None, description='User-defined labels for the metastore service.'
)
maintenanceWindow: Optional[MaintenanceWindow] = Field(
None,
description='The one hour maintenance window of the metastore service. This specifies when the service can be restarted for maintenance purposes in UTC time. Maintenance window is not needed for services with the SPANNER database type.',
)
metadataIntegration: Optional[MetadataIntegration] = Field(
None,
description='The setting that defines how metastore metadata should be integrated with external services and systems.',
)
metadataManagementActivity: Optional[MetadataManagementActivity] = Field(
None,
description='Output only. The metadata management activities of the metastore service.',
)
name: Optional[str] = Field(
None,
description='Immutable. The relative resource name of the metastore service, in the following format:projects/{project_number}/locations/{location_id}/services/{service_id}.',
)
network: Optional[str] = Field(
None,
description='Immutable. The relative resource name of the VPC network on which the instance can be accessed. It is specified in the following form:projects/{project_number}/global/networks/{network_id}.',
)
networkConfig: Optional[NetworkConfig] = Field(
None,
description='The configuration specifying the network settings for the Dataproc Metastore service.',
)
port: Optional[int] = Field(
None,
description='The TCP port at which the metastore service is reached. Default: 9083.',
)
releaseChannel: Optional[ReleaseChannel] = Field(
None,
description='Immutable. The release channel of the service. If unspecified, defaults to STABLE.',
)
scalingConfig: Optional[ScalingConfig] = Field(
None, description='Scaling configuration of the metastore service.'
)
state: Optional[State5] = Field(
None, description='Output only. The current state of the metastore service.'
)
stateMessage: Optional[str] = Field(
None,
description='Output only. Additional information about the current state of the metastore service, if available.',
)
telemetryConfig: Optional[TelemetryConfig] = Field(
None,
description='The configuration specifying telemetry settings for the Dataproc Metastore service. If unspecified defaults to JSON.',
)
tier: Optional[Tier] = Field(None, description='The tier of the service.')
uid: Optional[str] = Field(
None,
description='Output only. The globally unique resource identifier of the metastore service.',
)
updateTime: Optional[str] = Field(
None,
description='Output only. The time when the metastore service was last updated.',
)
class Backup(BaseModel):
createTime: Optional[str] = Field(
None, description='Output only. The time when the backup was started.'
)
description: Optional[str] = Field(
None, description='The description of the backup.'
)
endTime: Optional[str] = Field(
None, description='Output only. The time when the backup finished creating.'
)
name: Optional[str] = Field(
None,
description='Immutable. The relative resource name of the backup, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}',
)
restoringServices: Optional[List[str]] = Field(
None, description='Output only. Services that are restoring from the backup.'
)
serviceRevision: Optional[Service] = Field(
None,
description='Output only. The revision of the service at the time of backup.',
)
state: Optional[State] = Field(
None, description='Output only. The current state of the backup.'
)
class ListBackupsResponse(BaseModel):
backups: Optional[List[Backup]] = Field(
None, description='The backups of the specified service.'
)
nextPageToken: Optional[str] = Field(
None,
description='A token that can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.',
)
unreachable: Optional[List[str]] = Field(
None, description='Locations that could not be reached.'
)
class ListServicesResponse(BaseModel):
nextPageToken: Optional[str] = Field(
None,
description='A token that can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.',
)
services: Optional[List[Service]] = Field(
None, description='The services in the specified location.'
)
unreachable: Optional[List[str]] = Field(
None, description='Locations that could not be reached.'
)