# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: onos/config/snapshot/types.proto
# plugin: python-betterproto
from dataclasses import dataclass
from datetime import timedelta

import betterproto
from betterproto.grpc.grpclib_server import ServiceBase


class Phase(betterproto.Enum):
    """Phase is a snapshot phase"""

    # MARK is the first phase in which changes are marked for deletion
    MARK = 0
    # DELETE is the second phase in which changes are deleted from stores
    DELETE = 1


class State(betterproto.Enum):
    """State is the state of a snapshot within a phase"""

    # PENDING indicates the snapshot is pending
    PENDING = 0
    # RUNNING indicates the snapshot is in progress
    RUNNING = 1
    # COMPLETE indicates the snapshot is complete
    COMPLETE = 2


@dataclass(eq=False, repr=False)
class Status(betterproto.Message):
    """Status is the status of a snapshot"""

    # 'phase' is the snapshot phase
    phase: "Phase" = betterproto.enum_field(1)
    # 'state' is the state of a snapshot
    state: "State" = betterproto.enum_field(2)


@dataclass(eq=False, repr=False)
class RetentionOptions(betterproto.Message):
    """RetentionOptions specifies the retention policy for a change log"""

    # 'retain_window' is the duration for which to retain network changes
    retain_window: timedelta = betterproto.message_field(1)
