"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
"""

import builtins
import google.protobuf.any_pb2
import google.protobuf.descriptor
import google.protobuf.message
import google.protobuf.timestamp_pb2
import google.rpc.status_pb2
import typing

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

@typing.final
class Operation(google.protobuf.message.Message):
    """An Operation resource. For more information, see [Operation](/docs/api-design-guide/concepts/operation)."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    ID_FIELD_NUMBER: builtins.int
    DESCRIPTION_FIELD_NUMBER: builtins.int
    CREATED_AT_FIELD_NUMBER: builtins.int
    CREATED_BY_FIELD_NUMBER: builtins.int
    MODIFIED_AT_FIELD_NUMBER: builtins.int
    DONE_FIELD_NUMBER: builtins.int
    METADATA_FIELD_NUMBER: builtins.int
    ERROR_FIELD_NUMBER: builtins.int
    RESPONSE_FIELD_NUMBER: builtins.int
    id: builtins.str
    """ID of the operation."""
    description: builtins.str
    """Description of the operation. 0-256 characters long.
    ex: Create VM, Stop VM, Delete Disk, Snapshot Disk, etc
    """
    created_by: builtins.str
    """ID of the user or service account who initiated the operation."""
    done: builtins.bool
    """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.
    """
    @property
    def created_at(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """Creation timestamp."""

    @property
    def modified_at(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """The time when the Operation resource was last modified."""

    @property
    def metadata(self) -> google.protobuf.any_pb2.Any:
        """Service-specific metadata associated with the operation.
        It typically contains the ID of the target resource that the operation is performed on.
        Any method that returns a long-running operation should document the metadata type, if any.
        """

    @property
    def error(self) -> google.rpc.status_pb2.Status:
        """The error result of the operation in case of failure or cancellation."""

    @property
    def response(self) -> google.protobuf.any_pb2.Any:
        """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 the standard Create/Update,
        the response should be the target resource of the operation.
        Any method that returns a long-running operation should document the response type, if any.
        """

    def __init__(
        self,
        *,
        id: builtins.str = ...,
        description: builtins.str = ...,
        created_at: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        created_by: builtins.str = ...,
        modified_at: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        done: builtins.bool = ...,
        metadata: google.protobuf.any_pb2.Any | None = ...,
        error: google.rpc.status_pb2.Status | None = ...,
        response: google.protobuf.any_pb2.Any | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["created_at", b"created_at", "error", b"error", "metadata", b"metadata", "modified_at", b"modified_at", "response", b"response", "result", b"result"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["created_at", b"created_at", "created_by", b"created_by", "description", b"description", "done", b"done", "error", b"error", "id", b"id", "metadata", b"metadata", "modified_at", b"modified_at", "response", b"response", "result", b"result"]) -> None: ...
    def WhichOneof(self, oneof_group: typing.Literal["result", b"result"]) -> typing.Literal["error", "response"] | None: ...

global___Operation = Operation
