models.py•8.02 kB
# generated by fastapi-codegen:
# filename: openapi.yaml
# timestamp: 2025-06-29T03:09:05+00:00
from __future__ import annotations
from enum import Enum
from typing import Any, Dict, List, Optional
from pydantic import BaseModel, Field
class Empty(BaseModel):
pass
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):
apiVersion: Optional[str] = Field(
None, description='API version used to start the operation.'
)
createTime: Optional[str] = Field(
None, description='The time the operation was created.'
)
endTime: Optional[str] = Field(
None, description='The time the operation finished running.'
)
target: Optional[str] = Field(
None,
description='Server-defined resource path for the target of the operation.',
)
verb: Optional[str] = Field(
None, description='Name of the verb executed by the operation.'
)
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 State(Enum):
STATE_UNSPECIFIED = 'STATE_UNSPECIFIED'
ACTIVE = 'ACTIVE'
class Workflow(BaseModel):
createTime: Optional[str] = Field(
None, description='Output only. The timestamp of when the workflow was created.'
)
description: Optional[str] = Field(
None,
description='Description of the workflow provided by the user. Must be at most 1000 unicode characters long.',
)
labels: Optional[Dict[str, str]] = Field(
None,
description='Labels associated with this workflow. Labels can contain at most 64 entries. Keys and values can be no longer than 63 characters and can only contain lowercase letters, numeric characters, underscores and dashes. Label keys must start with a letter. International characters are allowed.',
)
name: Optional[str] = Field(
None,
description='The resource name of the workflow. Format: projects/{project}/locations/{location}/workflows/{workflow}',
)
revisionCreateTime: Optional[str] = Field(
None,
description='Output only. The timestamp that the latest revision of the workflow was created.',
)
revisionId: Optional[str] = Field(
None,
description='Output only. The revision of the workflow. A new revision of a workflow is created as a result of updating the following properties of a workflow: - Service account - Workflow code to be executed The format is "000001-a4d", where the first 6 characters define the zero-padded revision ordinal number. They are followed by a hyphen and 3 hexadecimal random characters.',
)
serviceAccount: Optional[str] = Field(
None,
description="The service account associated with the latest workflow version. This service account represents the identity of the workflow and determines what permissions the workflow has. Format: projects/{project}/serviceAccounts/{account} or {account} Using `-` as a wildcard for the `{project}` or not providing one at all will infer the project from the account. The `{account}` value can be the `email` address or the `unique_id` of the service account. If not provided, workflow will use the project's default service account. Modifying this field for an existing workflow results in a new workflow revision.",
)
sourceContents: Optional[str] = Field(
None, description='Workflow code to be executed. The size limit is 128KB.'
)
state: Optional[State] = Field(
None, description='Output only. State of the workflow deployment.'
)
updateTime: Optional[str] = Field(
None, description='Output only. The last update timestamp of the workflow.'
)
class FieldXgafv(Enum):
field_1 = '1'
field_2 = '2'
class Alt(Enum):
json = 'json'
media = 'media'
proto = 'proto'
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 ListWorkflowsResponse(BaseModel):
nextPageToken: Optional[str] = Field(
None,
description='A token, which 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='Unreachable resources.')
workflows: Optional[List[Workflow]] = Field(
None, description='The workflows which match the request.'
)
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.',
)