"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
Copyright 2021 The Pigweed Authors

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

    https://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 builtins
import collections.abc
import google.protobuf.descriptor
import google.protobuf.internal.containers
import google.protobuf.internal.enum_type_wrapper
import google.protobuf.message
import sys
import typing

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

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

@typing_extensions.final
class ListRequest(google.protobuf.message.Message):
    """A ListRequest has the following properties:

     - A request with an empty `path` string is valid and will list the contents
       at the "root" directory.
     - Only exact path matches will be resolved (i.e. no prefix matching).
     - Paths should be treated as case-sensitive.
     - The provided path must be absolute. If no matching path is found, a
       NOT_FOUND error is raised.
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    PATH_FIELD_NUMBER: builtins.int
    path: builtins.str
    def __init__(
        self,
        *,
        path: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal["path", b"path"]) -> None: ...

global___ListRequest = ListRequest

@typing_extensions.final
class DeleteRequest(google.protobuf.message.Message):
    """A DeleteRequest has the following properties:

     - Only exact path matches will be resolved (i.e. no prefix matching).
     - Paths should be treated as case-sensitive.
     - Deletion of directories is implementation-defined, and may be
       disallowed and return an UNIMPLEMENTED error.
     - The provided path must be absolute. If no matching path is found, a
       NOT_FOUND error is raised.
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    PATH_FIELD_NUMBER: builtins.int
    path: builtins.str
    def __init__(
        self,
        *,
        path: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal["path", b"path"]) -> None: ...

global___DeleteRequest = DeleteRequest

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

    class _Permissions:
        ValueType = typing.NewType("ValueType", builtins.int)
        V: typing_extensions.TypeAlias = ValueType

    class _PermissionsEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Path._Permissions.ValueType], builtins.type):
        DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
        NONE: Path._Permissions.ValueType  # 0
        READ: Path._Permissions.ValueType  # 1
        WRITE: Path._Permissions.ValueType  # 2
        READ_AND_WRITE: Path._Permissions.ValueType  # 3

    class Permissions(_Permissions, metaclass=_PermissionsEnumTypeWrapper):
        """This enum is a bitmask of permissions:
        Bit 0: readable.
        Bit 1: writable.
        """

    NONE: Path.Permissions.ValueType  # 0
    READ: Path.Permissions.ValueType  # 1
    WRITE: Path.Permissions.ValueType  # 2
    READ_AND_WRITE: Path.Permissions.ValueType  # 3

    PATH_FIELD_NUMBER: builtins.int
    PERMISSIONS_FIELD_NUMBER: builtins.int
    SIZE_BYTES_FIELD_NUMBER: builtins.int
    FILE_ID_FIELD_NUMBER: builtins.int
    path: builtins.str
    """A path to a file/directory. This path is relative to the requested path
    to reduce transmission of redundant information.
    """
    permissions: global___Path.Permissions.ValueType
    """Permitted operations on this path."""
    size_bytes: builtins.int
    """The size of the file at this path."""
    file_id: builtins.int
    """A globally-unique transfer ID for this file path (e.g. for use with
    pw_transfer's RPC service). It is implementation defined whether a file's
    file ID is stable or ephemeral.
    """
    def __init__(
        self,
        *,
        path: builtins.str = ...,
        permissions: global___Path.Permissions.ValueType | None = ...,
        size_bytes: builtins.int | None = ...,
        file_id: builtins.int | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["_file_id", b"_file_id", "_permissions", b"_permissions", "_size_bytes", b"_size_bytes", "file_id", b"file_id", "permissions", b"permissions", "size_bytes", b"size_bytes"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["_file_id", b"_file_id", "_permissions", b"_permissions", "_size_bytes", b"_size_bytes", "file_id", b"file_id", "path", b"path", "permissions", b"permissions", "size_bytes", b"size_bytes"]) -> None: ...
    @typing.overload
    def WhichOneof(self, oneof_group: typing_extensions.Literal["_file_id", b"_file_id"]) -> typing_extensions.Literal["file_id"] | None: ...
    @typing.overload
    def WhichOneof(self, oneof_group: typing_extensions.Literal["_permissions", b"_permissions"]) -> typing_extensions.Literal["permissions"] | None: ...
    @typing.overload
    def WhichOneof(self, oneof_group: typing_extensions.Literal["_size_bytes", b"_size_bytes"]) -> typing_extensions.Literal["size_bytes"] | None: ...

global___Path = Path

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

    PATHS_FIELD_NUMBER: builtins.int
    @property
    def paths(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Path]:
        """Each returned Path's path name is always relative to the requested path to
        reduce transmission of redundant information.
        """
    def __init__(
        self,
        *,
        paths: collections.abc.Iterable[global___Path] | None = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal["paths", b"paths"]) -> None: ...

global___ListResponse = ListResponse
