# generated by fastapi-codegen:
# filename: openapi.yaml
# timestamp: 2025-06-29T03:07:25+00:00
from __future__ import annotations
from enum import Enum
from typing import Any, Dict, List, Optional
from pydantic import BaseModel, Field
class State(Enum):
STATE_UNSPECIFIED = 'STATE_UNSPECIFIED'
READY = 'READY'
CREATING = 'CREATING'
DELETING = 'DELETING'
ERROR = 'ERROR'
UPDATING = 'UPDATING'
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 OperationMetadata(BaseModel):
createTime: Optional[str] = Field(
None, description='Output only. Time when the operation was created.'
)
endTime: Optional[str] = Field(
None, description='Output only. Time when the operation completed.'
)
method: Optional[str] = Field(
None,
description='Output only. Method that initiated the operation e.g. google.cloud.vpcaccess.v1.Connectors.CreateConnector.',
)
target: Optional[str] = Field(
None,
description='Output only. Name of the resource that this operation is acting on e.g. projects/my-project/locations/us-central1/connectors/v1.',
)
class OperationMetadataV1Alpha1(BaseModel):
endTime: Optional[str] = Field(
None, description='Output only. Time when the operation completed.'
)
insertTime: Optional[str] = Field(
None, description='Output only. Time when the operation was created.'
)
method: Optional[str] = Field(
None,
description='Output only. Method that initiated the operation e.g. google.cloud.vpcaccess.v1alpha1.Connectors.CreateConnector.',
)
target: Optional[str] = Field(
None,
description='Output only. Name of the resource that this operation is acting on e.g. projects/my-project/locations/us-central1/connectors/v1.',
)
class OperationMetadataV1Beta1(BaseModel):
createTime: Optional[str] = Field(
None, description='Output only. Time when the operation was created.'
)
endTime: Optional[str] = Field(
None, description='Output only. Time when the operation completed.'
)
method: Optional[str] = Field(
None,
description='Output only. Method that initiated the operation e.g. google.cloud.vpcaccess.v1beta1.Connectors.CreateConnector.',
)
target: Optional[str] = Field(
None,
description='Output only. Name of the resource that this operation is acting on e.g. projects/my-project/locations/us-central1/connectors/v1.',
)
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 Subnet(BaseModel):
name: Optional[str] = Field(
None,
description='Subnet name (relative, not fully qualified). E.g. if the full subnet selfLink is https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName} the correct input for this field would be {subnetName}',
)
projectId: Optional[str] = Field(
None,
description='Project in which the subnet exists. If not set, this project is assumed to be the project for which the connector create request was issued.',
)
class FieldXgafv(Enum):
field_1 = '1'
field_2 = '2'
class Alt(Enum):
json = 'json'
media = 'media'
proto = 'proto'
class Connector(BaseModel):
connectedProjects: Optional[List[str]] = Field(
None, description='Output only. List of projects using the connector.'
)
ipCidrRange: Optional[str] = Field(
None,
description='The range of internal addresses that follows RFC 4632 notation. Example: `10.132.0.0/28`.',
)
machineType: Optional[str] = Field(
None,
description='Machine type of VM Instance underlying connector. Default is e2-micro',
)
maxInstances: Optional[int] = Field(
None,
description='Maximum value of instances in autoscaling group underlying the connector.',
)
maxThroughput: Optional[int] = Field(
None,
description='Maximum throughput of the connector in Mbps. Default is 300, max is 1000.',
)
minInstances: Optional[int] = Field(
None,
description='Minimum value of instances in autoscaling group underlying the connector.',
)
minThroughput: Optional[int] = Field(
None,
description='Minimum throughput of the connector in Mbps. Default and min is 200.',
)
name: Optional[str] = Field(
None,
description='The resource name in the format `projects/*/locations/*/connectors/*`.',
)
network: Optional[str] = Field(None, description='Name of a VPC network.')
state: Optional[State] = Field(
None, description='Output only. State of the VPC access connector.'
)
subnet: Optional[Subnet] = Field(
None, description='The subnet in which to house the VPC Access Connector.'
)
class ListConnectorsResponse(BaseModel):
connectors: Optional[List[Connector]] = Field(
None, description='List of Serverless VPC Access connectors.'
)
nextPageToken: Optional[str] = Field(None, description='Continuation token.')
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 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 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.',
)