"""
Python SDK for OpenFGA

API version: 1.x
Website: https://openfga.dev
Documentation: https://openfga.dev/docs
Support: https://openfga.dev/community
License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE)

NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.
"""

from enum import Enum


class ClientWriteRequestOnDuplicateWrites(str, Enum):
    ERROR = "error"
    IGNORE = "ignore"


class ClientWriteRequestOnMissingDeletes(str, Enum):
    ERROR = "error"
    IGNORE = "ignore"


class ConflictOptions:
    """
    OpenFGA client write conflict options
    """

    def __init__(
        self,
        on_duplicate_writes: ClientWriteRequestOnDuplicateWrites | None = None,
        on_missing_deletes: ClientWriteRequestOnMissingDeletes | None = None,
    ) -> None:
        self._on_duplicate_writes = on_duplicate_writes
        self._on_missing_deletes = on_missing_deletes

    @property
    def on_duplicate_writes(self) -> ClientWriteRequestOnDuplicateWrites | None:
        """
        Return on_duplicate_writes
        """
        return self._on_duplicate_writes

    @on_duplicate_writes.setter
    def on_duplicate_writes(
        self,
        value: ClientWriteRequestOnDuplicateWrites | None,
    ) -> None:
        """
        Set on_duplicate_writes
        """
        self._on_duplicate_writes = value

    @property
    def on_missing_deletes(self) -> ClientWriteRequestOnMissingDeletes | None:
        """
        Return on_missing_deletes
        """
        return self._on_missing_deletes

    @on_missing_deletes.setter
    def on_missing_deletes(
        self,
        value: ClientWriteRequestOnMissingDeletes | None,
    ) -> None:
        """
        Set on_missing_deletes
        """
        self._on_missing_deletes = value
