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

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
import buildgrid.common.protos.build.bazel.remote.execution.v2.remote_execution_pb2
import builtins
import collections.abc
import google.protobuf.descriptor
import google.protobuf.internal.containers
import google.protobuf.message
import sys

if sys.version_info >= (3, 8):
    import typing as typing_extensions
else:
    import typing_extensions

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

@typing_extensions.final
class GetReferenceRequest(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    INSTANCE_NAME_FIELD_NUMBER: builtins.int
    KEY_FIELD_NUMBER: builtins.int
    instance_name: builtins.str
    """The instance of the execution system to operate against. A server may
    support multiple instances of the execution system (with their own workers,
    storage, caches, etc.). The server MAY require use of this field to select
    between them in an implementation-defined fashion, otherwise it can be
    omitted.
    """
    key: builtins.str
    """The name of the reference."""
    def __init__(
        self,
        *,
        instance_name: builtins.str = ...,
        key: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal["instance_name", b"instance_name", "key", b"key"]) -> None: ...

global___GetReferenceRequest = GetReferenceRequest

@typing_extensions.final
class GetReferenceResponse(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    DIGEST_FIELD_NUMBER: builtins.int
    @property
    def digest(self) -> buildgrid.common.protos.build.bazel.remote.execution.v2.remote_execution_pb2.Digest:
        """The digest of the CAS [Directory][build.bazel.remote.execution.v2.Directory]."""
    def __init__(
        self,
        *,
        digest: buildgrid.common.protos.build.bazel.remote.execution.v2.remote_execution_pb2.Digest | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["digest", b"digest"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["digest", b"digest"]) -> None: ...

global___GetReferenceResponse = GetReferenceResponse

@typing_extensions.final
class UpdateReferenceRequest(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    INSTANCE_NAME_FIELD_NUMBER: builtins.int
    KEYS_FIELD_NUMBER: builtins.int
    DIGEST_FIELD_NUMBER: builtins.int
    instance_name: builtins.str
    """The instance of the execution system to operate against. A server may
    support multiple instances of the execution system (with their own workers,
    storage, caches, etc.). The server MAY require use of this field to select
    between them in an implementation-defined fashion, otherwise it can be
    omitted.
    """
    @property
    def keys(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
        """The name of the reference."""
    @property
    def digest(self) -> buildgrid.common.protos.build.bazel.remote.execution.v2.remote_execution_pb2.Digest:
        """The digest of the CAS [Directory][build.bazel.remote.execution.v2.Directory]
        to store in the cache.
        """
    def __init__(
        self,
        *,
        instance_name: builtins.str = ...,
        keys: collections.abc.Iterable[builtins.str] | None = ...,
        digest: buildgrid.common.protos.build.bazel.remote.execution.v2.remote_execution_pb2.Digest | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["digest", b"digest"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["digest", b"digest", "instance_name", b"instance_name", "keys", b"keys"]) -> None: ...

global___UpdateReferenceRequest = UpdateReferenceRequest

@typing_extensions.final
class UpdateReferenceResponse(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

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

global___UpdateReferenceResponse = UpdateReferenceResponse

@typing_extensions.final
class StatusRequest(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    INSTANCE_NAME_FIELD_NUMBER: builtins.int
    instance_name: builtins.str
    """The instance of the execution system to operate against. A server may
    support multiple instances of the execution system (with their own workers,
    storage, caches, etc.). The server MAY require use of this field to select
    between them in an implementation-defined fashion, otherwise it can be
    omitted.
    """
    def __init__(
        self,
        *,
        instance_name: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal["instance_name", b"instance_name"]) -> None: ...

global___StatusRequest = StatusRequest

@typing_extensions.final
class StatusResponse(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    ALLOW_UPDATES_FIELD_NUMBER: builtins.int
    allow_updates: builtins.bool
    """Whether reference updates are allowed for the connected client."""
    def __init__(
        self,
        *,
        allow_updates: builtins.bool = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal["allow_updates", b"allow_updates"]) -> None: ...

global___StatusResponse = StatusResponse
