"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
*
Flag definition sync API

This proto defines a simple API to synchronize a feature flag definition.
It supports establishing a stream for getting notifications about changes in a flag definition.
"""

import builtins
import google.protobuf.descriptor
import google.protobuf.message
import google.protobuf.struct_pb2
import typing

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

@typing.final
class SyncFlagsRequest(google.protobuf.message.Message):
    """SyncFlagsRequest is the request initiating the server-streaming rpc.
    Implementations of Flagd providers and Flagd itself send this request, acting as the client.
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    PROVIDER_ID_FIELD_NUMBER: builtins.int
    SELECTOR_FIELD_NUMBER: builtins.int
    provider_id: builtins.str
    """Optional: A unique identifier for flagd(grpc client) initiating the request. The server implementations may
    utilize this identifier to uniquely identify, validate(ex:- enforce authentication/authorization) and filter
    flag configurations that it can expose to this request. This field is intended to be optional. However server
    implementations may enforce it.
       ex:- provider_id: flagd-weatherapp-sidecar
    """
    selector: builtins.str
    """Optional: A selector for the flag configuration request. The server implementation may utilize this to select
    flag configurations from a collection, select the source of the flag or combine this to any desired underlying
    filtering mechanism.
       ex:- selector: 'source=database,app=weatherapp'
    """
    def __init__(
        self,
        *,
        provider_id: builtins.str = ...,
        selector: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["provider_id", b"provider_id", "selector", b"selector"]) -> None: ...

global___SyncFlagsRequest = SyncFlagsRequest

@typing.final
class SyncFlagsResponse(google.protobuf.message.Message):
    """SyncFlagsResponse is the server response containing feature flag configurations and the state"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    FLAG_CONFIGURATION_FIELD_NUMBER: builtins.int
    flag_configuration: builtins.str
    """flagd feature flag configuration. Must be validated to schema - https://raw.githubusercontent.com/open-feature/schemas/main/json/flagd-definitions.json"""
    def __init__(
        self,
        *,
        flag_configuration: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["flag_configuration", b"flag_configuration"]) -> None: ...

global___SyncFlagsResponse = SyncFlagsResponse

@typing.final
class FetchAllFlagsRequest(google.protobuf.message.Message):
    """FetchAllFlagsRequest is the request to fetch all flags. Clients send this request as the client in order to resync their internal state"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    PROVIDER_ID_FIELD_NUMBER: builtins.int
    SELECTOR_FIELD_NUMBER: builtins.int
    provider_id: builtins.str
    """Optional: A unique identifier for clients initiating the request. The server implementations may
    utilize this identifier to uniquely identify, validate(ex:- enforce authentication/authorization) and filter
    flag configurations that it can expose to this request. This field is intended to be optional. However server
    implementations may enforce it.
       ex:- provider_id: flagd-weatherapp-sidecar
    """
    selector: builtins.str
    """Optional: A selector for the flag configuration request. The server implementation may utilize this to select
    flag configurations from a collection, select the source of the flag or combine this to any desired underlying
    filtering mechanism.
       ex:- selector: 'source=database,app=weatherapp'
    """
    def __init__(
        self,
        *,
        provider_id: builtins.str = ...,
        selector: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["provider_id", b"provider_id", "selector", b"selector"]) -> None: ...

global___FetchAllFlagsRequest = FetchAllFlagsRequest

@typing.final
class FetchAllFlagsResponse(google.protobuf.message.Message):
    """FetchAllFlagsResponse is the server response containing feature flag configurations"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    FLAG_CONFIGURATION_FIELD_NUMBER: builtins.int
    flag_configuration: builtins.str
    """flagd feature flag configuration. Must be validated to schema - https://raw.githubusercontent.com/open-feature/schemas/main/json/flagd-definitions.json"""
    def __init__(
        self,
        *,
        flag_configuration: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["flag_configuration", b"flag_configuration"]) -> None: ...

global___FetchAllFlagsResponse = FetchAllFlagsResponse

@typing.final
class GetMetadataRequest(google.protobuf.message.Message):
    """GetMetadataRequest is the request for retrieving metadata from the sync service"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    def __init__(
        self,
    ) -> None: ...

global___GetMetadataRequest = GetMetadataRequest

@typing.final
class GetMetadataResponse(google.protobuf.message.Message):
    """GetMetadataResponse contains metadata from the sync service"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    METADATA_FIELD_NUMBER: builtins.int
    @property
    def metadata(self) -> google.protobuf.struct_pb2.Struct: ...
    def __init__(
        self,
        *,
        metadata: google.protobuf.struct_pb2.Struct | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["metadata", b"metadata"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["metadata", b"metadata"]) -> None: ...

global___GetMetadataResponse = GetMetadataResponse
