// This file is @generated by prost-build.
/// Contains information about a pending rename operation.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PendingRenameInfo {
    /// Output only. The name of the rename operation.
    #[prost(string, tag = "1")]
    pub operation: ::prost::alloc::string::String,
}
/// A folder resource. This resource can only exist in a hierarchical namespace
/// enabled bucket.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Folder {
    /// Identifier. The name of this folder.
    /// Format: `projects/{project}/buckets/{bucket}/folders/{folder}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. The version of the metadata for this folder. Used for
    /// preconditions and for detecting changes in metadata.
    #[prost(int64, tag = "3")]
    pub metageneration: i64,
    /// Output only. The creation time of the folder.
    #[prost(message, optional, tag = "4")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The modification time of the folder.
    #[prost(message, optional, tag = "5")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. Only present if the folder is part of an ongoing RenameFolder
    /// operation. Contains information which can be used to query the operation
    /// status. The presence of this field also indicates all write operations are
    /// blocked for this folder, including folder, managed folder, and object
    /// operations.
    #[prost(message, optional, tag = "7")]
    pub pending_rename_info: ::core::option::Option<PendingRenameInfo>,
}
/// Request message for GetFolder. This operation is only applicable to a
/// hierarchical namespace enabled bucket.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetFolderRequest {
    /// Required. Name of the folder.
    /// Format: `projects/{project}/buckets/{bucket}/folders/{folder}`
    #[prost(string, tag = "6")]
    pub name: ::prost::alloc::string::String,
    /// Makes the operation only succeed conditional on whether the folder's
    /// current metageneration matches the given value.
    #[prost(int64, optional, tag = "3")]
    pub if_metageneration_match: ::core::option::Option<i64>,
    /// Makes the operation only succeed conditional on whether the folder's
    /// current metageneration does not match the given value.
    #[prost(int64, optional, tag = "4")]
    pub if_metageneration_not_match: ::core::option::Option<i64>,
    /// Optional. A unique identifier for this request. UUID is the recommended
    /// format, but other formats are still accepted.
    #[prost(string, tag = "5")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request message for CreateFolder. This operation is only applicable to a
/// hierarchical namespace enabled bucket.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreateFolderRequest {
    /// Required. Name of the bucket in which the folder will reside. The bucket
    /// must be a hierarchical namespace enabled bucket.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. Properties of the new folder being created.
    /// The bucket and name of the folder are specified in the parent and folder_id
    /// fields, respectively. Populating those fields in `folder` will result in an
    /// error.
    #[prost(message, optional, tag = "2")]
    pub folder: ::core::option::Option<Folder>,
    /// Required. The full name of a folder, including all its parent folders.
    /// Folders use single '/' characters as a delimiter.
    /// The folder_id must end with a slash.
    /// For example, the folder_id of "books/biographies/" would create a new
    /// "biographies/" folder under the "books/" folder.
    #[prost(string, tag = "3")]
    pub folder_id: ::prost::alloc::string::String,
    /// Optional. If true, parent folder doesn't have to be present and all missing
    /// ancestor folders will be created atomically.
    #[prost(bool, tag = "4")]
    pub recursive: bool,
    /// Optional. A unique identifier for this request. UUID is the recommended
    /// format, but other formats are still accepted.
    #[prost(string, tag = "5")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request message for DeleteFolder. This operation is only applicable to a
/// hierarchical namespace enabled bucket.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteFolderRequest {
    /// Required. Name of the folder.
    /// Format: `projects/{project}/buckets/{bucket}/folders/{folder}`
    #[prost(string, tag = "6")]
    pub name: ::prost::alloc::string::String,
    /// Makes the operation only succeed conditional on whether the folder's
    /// current metageneration matches the given value.
    #[prost(int64, optional, tag = "3")]
    pub if_metageneration_match: ::core::option::Option<i64>,
    /// Makes the operation only succeed conditional on whether the folder's
    /// current metageneration does not match the given value.
    #[prost(int64, optional, tag = "4")]
    pub if_metageneration_not_match: ::core::option::Option<i64>,
    /// Optional. A unique identifier for this request. UUID is the recommended
    /// format, but other formats are still accepted.
    #[prost(string, tag = "5")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request message for ListFolders. This operation is only applicable to a
/// hierarchical namespace enabled bucket.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListFoldersRequest {
    /// Required. Name of the bucket in which to look for folders. The bucket must
    /// be a hierarchical namespace enabled bucket.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. Maximum number of folders to return in a single response. The
    /// service will use this parameter or 1,000 items, whichever is smaller.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// Optional. A previously-returned page token representing part of the larger
    /// set of results to view.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// Optional. Filter results to folders whose names begin with this prefix.
    /// If set, the value must either be an empty string or end with a '/'.
    #[prost(string, tag = "4")]
    pub prefix: ::prost::alloc::string::String,
    /// Optional. If set, returns results in a directory-like mode. The results
    /// will only include folders that either exactly match the above prefix, or
    /// are one level below the prefix. The only supported value is '/'.
    #[prost(string, tag = "8")]
    pub delimiter: ::prost::alloc::string::String,
    /// Optional. Filter results to folders whose names are lexicographically equal
    /// to or after lexicographic_start. If lexicographic_end is also set, the
    /// folders listed have names between lexicographic_start (inclusive) and
    /// lexicographic_end (exclusive).
    #[prost(string, tag = "6")]
    pub lexicographic_start: ::prost::alloc::string::String,
    /// Optional. Filter results to folders whose names are lexicographically
    /// before lexicographic_end. If lexicographic_start is also set, the folders
    /// listed have names between lexicographic_start (inclusive) and
    /// lexicographic_end (exclusive).
    #[prost(string, tag = "7")]
    pub lexicographic_end: ::prost::alloc::string::String,
    /// Optional. A unique identifier for this request. UUID is the recommended
    /// format, but other formats are still accepted.
    #[prost(string, tag = "9")]
    pub request_id: ::prost::alloc::string::String,
}
/// Response message for ListFolders.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListFoldersResponse {
    /// The list of child folders
    #[prost(message, repeated, tag = "1")]
    pub folders: ::prost::alloc::vec::Vec<Folder>,
    /// The continuation token, used to page through large result sets. Provide
    /// this value in a subsequent request to return the next page of results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// Request message for RenameFolder. This operation is only applicable to a
/// hierarchical namespace enabled bucket.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RenameFolderRequest {
    /// Required. Name of the source folder being renamed.
    /// Format: `projects/{project}/buckets/{bucket}/folders/{folder}`
    #[prost(string, tag = "7")]
    pub name: ::prost::alloc::string::String,
    /// Required. The destination folder ID, e.g. `foo/bar/`.
    #[prost(string, tag = "8")]
    pub destination_folder_id: ::prost::alloc::string::String,
    /// Makes the operation only succeed conditional on whether the source
    /// folder's current metageneration matches the given value.
    #[prost(int64, optional, tag = "4")]
    pub if_metageneration_match: ::core::option::Option<i64>,
    /// Makes the operation only succeed conditional on whether the source
    /// folder's current metageneration does not match the given value.
    #[prost(int64, optional, tag = "5")]
    pub if_metageneration_not_match: ::core::option::Option<i64>,
    /// Optional. A unique identifier for this request. UUID is the recommended
    /// format, but other formats are still accepted. This request is only
    /// idempotent if a `request_id` is provided.
    #[prost(string, tag = "6")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request message for DeleteFolderRecursive.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteFolderRecursiveRequest {
    /// Required. Name of the folder being deleted, however all of its contents
    /// will be deleted too. Format:
    /// `projects/{project}/buckets/{bucket}/folders/{folder}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. Makes the operation only succeed conditional on whether the root
    /// folder's current metageneration matches the given value.
    #[prost(int64, optional, tag = "2")]
    pub if_metageneration_match: ::core::option::Option<i64>,
    /// Optional. Makes the operation only succeed conditional on whether the root
    /// folder's current metageneration does not match the given value.
    #[prost(int64, optional, tag = "3")]
    pub if_metageneration_not_match: ::core::option::Option<i64>,
    /// Optional. A unique identifier for this request. UUID is the recommended
    /// format, but other formats are still accepted.
    #[prost(string, tag = "4")]
    pub request_id: ::prost::alloc::string::String,
}
/// The message contains metadata that is common to all Storage Control
/// long-running operations, present in its `google.longrunning.Operation`
/// messages, and accessible via `metadata.common_metadata`.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CommonLongRunningOperationMetadata {
    /// Output only. The time the operation was created.
    #[prost(message, optional, tag = "1")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time the operation finished running.
    #[prost(message, optional, tag = "2")]
    pub end_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time the operation was last modified.
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The type of operation invoked.
    #[prost(string, tag = "4")]
    pub r#type: ::prost::alloc::string::String,
    /// Output only. Identifies whether the user has requested cancellation.
    #[prost(bool, tag = "5")]
    pub requested_cancellation: bool,
    /// Output only. The estimated progress of the operation in percentage \[0,
    /// 100\]. The value -1 means the progress is unknown.
    #[prost(int32, tag = "6")]
    pub progress_percent: i32,
}
/// Message returned in the metadata field of the Operation resource for
/// RenameFolder operations.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RenameFolderMetadata {
    /// Generic metadata for the long running operation.
    #[prost(message, optional, tag = "1")]
    pub common_metadata: ::core::option::Option<CommonLongRunningOperationMetadata>,
    /// The path of the source folder.
    #[prost(string, tag = "2")]
    pub source_folder_id: ::prost::alloc::string::String,
    /// The path of the destination folder.
    #[prost(string, tag = "3")]
    pub destination_folder_id: ::prost::alloc::string::String,
}
/// Message returned in the metadata field of the Operation resource for
/// DeleteFolderRecursive operations.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteFolderRecursiveMetadata {
    /// Generic metadata for the long running operation.
    #[prost(message, optional, tag = "1")]
    pub common_metadata: ::core::option::Option<CommonLongRunningOperationMetadata>,
    /// The path of the folder recursively deleted.
    #[prost(string, tag = "2")]
    pub folder_id: ::prost::alloc::string::String,
}
/// The storage layout configuration of a bucket.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StorageLayout {
    /// Output only. The name of the StorageLayout resource.
    /// Format: `projects/{project}/buckets/{bucket}/storageLayout`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. The location of the bucket.
    #[prost(string, tag = "2")]
    pub location: ::prost::alloc::string::String,
    /// Output only. The location type of the bucket (region, dual-region,
    /// multi-region, etc).
    #[prost(string, tag = "3")]
    pub location_type: ::prost::alloc::string::String,
    /// Output only. The data placement configuration for custom dual region. If
    /// there is no configuration, this is not a custom dual region bucket.
    #[prost(message, optional, tag = "4")]
    pub custom_placement_config: ::core::option::Option<
        storage_layout::CustomPlacementConfig,
    >,
    /// Output only. The bucket's hierarchical namespace configuration. If there is
    /// no configuration, the hierarchical namespace is disabled.
    #[prost(message, optional, tag = "5")]
    pub hierarchical_namespace: ::core::option::Option<
        storage_layout::HierarchicalNamespace,
    >,
}
/// Nested message and enum types in `StorageLayout`.
pub mod storage_layout {
    /// Configuration for Custom Dual Regions.  It should specify precisely two
    /// eligible regions within the same Multiregion. More information on regions
    /// may be found [here](<https://cloud.google.com/storage/docs/locations>).
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct CustomPlacementConfig {
        /// List of locations to use for data placement.
        #[prost(string, repeated, tag = "1")]
        pub data_locations: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    }
    /// Configuration for a bucket's hierarchical namespace feature.
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct HierarchicalNamespace {
        /// Enables the hierarchical namespace feature.
        #[prost(bool, tag = "1")]
        pub enabled: bool,
    }
}
/// Request message for GetStorageLayout.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetStorageLayoutRequest {
    /// Required. The name of the StorageLayout resource.
    /// Format: `projects/{project}/buckets/{bucket}/storageLayout`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// An optional prefix used for permission check. It is useful when the caller
    /// only has limited permissions under a specific prefix.
    #[prost(string, tag = "2")]
    pub prefix: ::prost::alloc::string::String,
    /// Optional. A unique identifier for this request. UUID is the recommended
    /// format, but other formats are still accepted.
    #[prost(string, tag = "3")]
    pub request_id: ::prost::alloc::string::String,
}
/// A managed folder.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ManagedFolder {
    /// Identifier. The name of this managed folder.
    /// Format:
    /// `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. The metadata version of this managed folder. It increases
    /// whenever the metadata is updated. Used for preconditions and for detecting
    /// changes in metadata. Managed folders don't have a generation number.
    #[prost(int64, tag = "3")]
    pub metageneration: i64,
    /// Output only. The creation time of the managed folder.
    #[prost(message, optional, tag = "4")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The modification time of the managed folder.
    #[prost(message, optional, tag = "5")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Request message for GetManagedFolder.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetManagedFolderRequest {
    /// Required. Name of the managed folder.
    /// Format:
    /// `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}`
    #[prost(string, tag = "6")]
    pub name: ::prost::alloc::string::String,
    /// The operation succeeds conditional on the managed folder's current
    /// metageneration matching the value here specified.
    #[prost(int64, optional, tag = "3")]
    pub if_metageneration_match: ::core::option::Option<i64>,
    /// The operation succeeds conditional on the managed folder's current
    /// metageneration NOT matching the value here specified.
    #[prost(int64, optional, tag = "4")]
    pub if_metageneration_not_match: ::core::option::Option<i64>,
    /// Optional. A unique identifier for this request. UUID is the recommended
    /// format, but other formats are still accepted.
    #[prost(string, tag = "5")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request message for CreateManagedFolder.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreateManagedFolderRequest {
    /// Required. Name of the bucket this managed folder belongs to.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. Properties of the managed folder being created.
    /// The bucket and managed folder names are specified in the `parent` and
    /// `managed_folder_id` fields. Populating these fields in `managed_folder`
    /// will result in an error.
    #[prost(message, optional, tag = "2")]
    pub managed_folder: ::core::option::Option<ManagedFolder>,
    /// Required. The name of the managed folder. It uses a single `/` as delimiter
    /// and leading and trailing `/` are allowed.
    #[prost(string, tag = "3")]
    pub managed_folder_id: ::prost::alloc::string::String,
    /// Optional. A unique identifier for this request. UUID is the recommended
    /// format, but other formats are still accepted.
    #[prost(string, tag = "4")]
    pub request_id: ::prost::alloc::string::String,
}
/// DeleteManagedFolder RPC request message.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteManagedFolderRequest {
    /// Required. Name of the managed folder.
    /// Format:
    /// `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}`
    #[prost(string, tag = "7")]
    pub name: ::prost::alloc::string::String,
    /// The operation succeeds conditional on the managed folder's current
    /// metageneration matching the value here specified.
    #[prost(int64, optional, tag = "3")]
    pub if_metageneration_match: ::core::option::Option<i64>,
    /// The operation succeeds conditional on the managed folder's current
    /// metageneration NOT matching the value here specified.
    #[prost(int64, optional, tag = "4")]
    pub if_metageneration_not_match: ::core::option::Option<i64>,
    /// Allows deletion of a managed folder even if it is not empty.
    /// A managed folder is empty if it manages no child managed folders or
    /// objects. Caller must have permission for
    /// storage.managedFolders.setIamPolicy.
    #[prost(bool, tag = "5")]
    pub allow_non_empty: bool,
    /// Optional. A unique identifier for this request. UUID is the recommended
    /// format, but other formats are still accepted.
    #[prost(string, tag = "6")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request message for ListManagedFolders.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListManagedFoldersRequest {
    /// Required. Name of the bucket this managed folder belongs to.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. Maximum number of managed folders to return in a single response.
    /// The service will use this parameter or 1,000 items, whichever is smaller.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// Optional. A previously-returned page token representing part of the larger
    /// set of results to view.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// Optional. Filter results to match managed folders with name starting with
    /// this prefix.
    #[prost(string, tag = "4")]
    pub prefix: ::prost::alloc::string::String,
    /// Optional. A unique identifier for this request. UUID is the recommended
    /// format, but other formats are still accepted.
    #[prost(string, tag = "5")]
    pub request_id: ::prost::alloc::string::String,
}
/// Response message for ListManagedFolders.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListManagedFoldersResponse {
    /// The list of matching managed folders
    #[prost(message, repeated, tag = "1")]
    pub managed_folders: ::prost::alloc::vec::Vec<ManagedFolder>,
    /// The continuation token, used to page through large result sets. Provide
    /// this value in a subsequent request to return the next page of results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// Message returned in the metadata field of the Operation resource for
/// CreateAnywhereCache operations.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreateAnywhereCacheMetadata {
    /// Generic metadata for the long running operation.
    #[prost(message, optional, tag = "1")]
    pub common_metadata: ::core::option::Option<CommonLongRunningOperationMetadata>,
    /// Anywhere Cache ID.
    #[prost(string, optional, tag = "2")]
    pub anywhere_cache_id: ::core::option::Option<::prost::alloc::string::String>,
    /// The zone in which the cache instance is running. For example,
    /// us-central1-a.
    #[prost(string, optional, tag = "6")]
    pub zone: ::core::option::Option<::prost::alloc::string::String>,
    /// Anywhere Cache entry's TTL. A cache-level config that is applied to all new
    /// cache entries on admission. Default ttl value (24hrs) is applied if not
    /// specified in the create request.
    #[prost(message, optional, tag = "3")]
    pub ttl: ::core::option::Option<::prost_types::Duration>,
    /// Anywhere Cache entry Admission Policy in kebab-case (e.g.,
    /// "admit-on-first-miss"). Default admission policy (admit-on-first-miss) is
    /// applied if not specified in the create request.
    #[prost(string, optional, tag = "5")]
    pub admission_policy: ::core::option::Option<::prost::alloc::string::String>,
}
/// Message returned in the metadata field of the Operation resource for
/// UpdateAnywhereCache operation.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UpdateAnywhereCacheMetadata {
    /// Generic metadata for the long running operation.
    #[prost(message, optional, tag = "1")]
    pub common_metadata: ::core::option::Option<CommonLongRunningOperationMetadata>,
    /// Anywhere Cache ID.
    #[prost(string, optional, tag = "2")]
    pub anywhere_cache_id: ::core::option::Option<::prost::alloc::string::String>,
    /// The zone in which the cache instance is running. For example,
    /// us-central1-a.
    #[prost(string, optional, tag = "5")]
    pub zone: ::core::option::Option<::prost::alloc::string::String>,
    /// Anywhere Cache entry's TTL between 1h and 7days. A cache-level config that
    /// is applied to all new cache entries on admission. If `ttl` is pending
    /// update, this field equals to the new value specified in the Update request.
    #[prost(message, optional, tag = "3")]
    pub ttl: ::core::option::Option<::prost_types::Duration>,
    /// L4 Cache entry Admission Policy in kebab-case (e.g.,
    /// "admit-on-first-miss"). If `admission_policy` is pending
    /// update, this field equals to the new value specified in the Update request.
    #[prost(string, optional, tag = "4")]
    pub admission_policy: ::core::option::Option<::prost::alloc::string::String>,
}
/// An Anywhere Cache Instance.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AnywhereCache {
    /// Immutable. The resource name of this AnywhereCache.
    /// Format:
    /// `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Immutable. The zone in which the cache instance is running. For example,
    /// us-central1-a.
    #[prost(string, tag = "10")]
    pub zone: ::prost::alloc::string::String,
    /// Cache entry TTL (ranges between 1h to 7d). This is a cache-level config
    /// that defines how long a cache entry can live. Default ttl value (24hrs)
    /// is applied if not specified in the create request. TTL must be in whole
    /// seconds.
    #[prost(message, optional, tag = "3")]
    pub ttl: ::core::option::Option<::prost_types::Duration>,
    /// Cache admission policy. Valid policies includes:
    /// `admit-on-first-miss` and `admit-on-second-miss`. Defaults to
    /// `admit-on-first-miss`. Default value is applied if not specified in the
    /// create request.
    #[prost(string, tag = "9")]
    pub admission_policy: ::prost::alloc::string::String,
    /// Output only. Cache state including RUNNING, CREATING, DISABLED and PAUSED.
    #[prost(string, tag = "5")]
    pub state: ::prost::alloc::string::String,
    /// Output only. Time when Anywhere cache instance is allocated.
    #[prost(message, optional, tag = "6")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. Time when Anywhere cache instance is last updated, including
    /// creation.
    #[prost(message, optional, tag = "7")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. True if there is an active update operation against this cache
    /// instance. Subsequential update requests will be rejected if this field is
    /// true. Output only.
    #[prost(bool, tag = "8")]
    pub pending_update: bool,
}
/// Request message for CreateAnywhereCache.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreateAnywhereCacheRequest {
    /// Required. The bucket to which this cache belongs.
    /// Format: `projects/{project}/buckets/{bucket}`
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. Properties of the Anywhere Cache instance being created.
    /// The parent bucket name is specified in the `parent` field. Server uses the
    /// default value of `ttl` or `admission_policy` if not specified in
    /// request.
    #[prost(message, optional, tag = "3")]
    pub anywhere_cache: ::core::option::Option<AnywhereCache>,
    /// Optional. A unique identifier for this request. UUID is the recommended
    /// format, but other formats are still accepted. This request is only
    /// idempotent if a `request_id` is provided.
    #[prost(string, tag = "4")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request message for UpdateAnywhereCache.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UpdateAnywhereCacheRequest {
    /// Required. The Anywhere Cache instance to be updated.
    #[prost(message, optional, tag = "1")]
    pub anywhere_cache: ::core::option::Option<AnywhereCache>,
    /// Required. List of fields to be updated. Mutable fields of AnywhereCache
    /// include `ttl` and `admission_policy`.
    ///
    /// To specify ALL fields, specify a single field with the value `*`. Note: We
    /// recommend against doing this. If a new field is introduced at a later time,
    /// an older client updating with the `*` may accidentally reset the new
    /// field's value.
    ///
    /// Not specifying any fields is an error.
    #[prost(message, optional, tag = "2")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Optional. A unique identifier for this request. UUID is the recommended
    /// format, but other formats are still accepted. This request is only
    /// idempotent if a `request_id` is provided.
    #[prost(string, tag = "3")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request message for DisableAnywhereCache.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DisableAnywhereCacheRequest {
    /// Required. The name field in the request should be:
    /// `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. A unique identifier for this request. UUID is the recommended
    /// format, but other formats are still accepted. This request is only
    /// idempotent if a `request_id` is provided.
    #[prost(string, tag = "2")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request message for PauseAnywhereCache.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PauseAnywhereCacheRequest {
    /// Required. The name field in the request should be:
    /// `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. A unique identifier for this request. UUID is the recommended
    /// format, but other formats are still accepted. This request is only
    /// idempotent if a `request_id` is provided.
    #[prost(string, tag = "2")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request message for ResumeAnywhereCache.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ResumeAnywhereCacheRequest {
    /// Required. The name field in the request should be:
    /// `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. A unique identifier for this request. UUID is the recommended
    /// format, but other formats are still accepted. This request is only
    /// idempotent if a `request_id` is provided.
    #[prost(string, tag = "2")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request message for GetAnywhereCache.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetAnywhereCacheRequest {
    /// Required. The name field in the request should be:
    /// `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. A unique identifier for this request. UUID is the recommended
    /// format, but other formats are still accepted.
    #[prost(string, tag = "2")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request message for ListAnywhereCaches.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListAnywhereCachesRequest {
    /// Required. The bucket to which this cache belongs.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Maximum number of caches to return in a single response.
    /// The service will use this parameter or 1,000 items, whichever is smaller.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// A previously-returned page token representing part of the larger set of
    /// results to view.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// Optional. A unique identifier for this request. UUID is the recommended
    /// format, but other formats are still accepted.
    #[prost(string, tag = "4")]
    pub request_id: ::prost::alloc::string::String,
}
/// Response message for ListAnywhereCaches.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAnywhereCachesResponse {
    /// The list of items.
    #[prost(message, repeated, tag = "1")]
    pub anywhere_caches: ::prost::alloc::vec::Vec<AnywhereCache>,
    /// A token, which can be sent as `page_token` to retrieve the next page.
    /// If this field is omitted, there are no subsequent pages.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// The `IntelligenceConfig` resource associated with your organization, folder,
/// or project.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct IntelligenceConfig {
    /// Identifier. The name of the `IntelligenceConfig` resource associated with
    /// your organization, folder, or project.
    ///
    /// The name format varies based on the GCP resource hierarchy as follows:
    ///
    /// * For project:
    ///   `projects/{project_number}/locations/global/intelligenceConfig`
    /// * For organization:
    ///   `organizations/{org_id}/locations/global/intelligenceConfig`
    /// * For folder: `folders/{folder_id}/locations/global/intelligenceConfig`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. The edition configuration of the `IntelligenceConfig` resource.
    #[prost(enumeration = "intelligence_config::EditionConfig", tag = "2")]
    pub edition_config: i32,
    /// Output only. The time at which the `IntelligenceConfig` resource is last
    /// updated.
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Optional. Filter over location and bucket.
    #[prost(message, optional, tag = "4")]
    pub filter: ::core::option::Option<intelligence_config::Filter>,
    /// Output only. The `IntelligenceConfig` resource that is applicable for the
    /// resource.
    #[prost(message, optional, tag = "5")]
    pub effective_intelligence_config: ::core::option::Option<
        intelligence_config::EffectiveIntelligenceConfig,
    >,
    /// The trial configuration of the `IntelligenceConfig` resource.
    #[prost(message, optional, tag = "7")]
    pub trial_config: ::core::option::Option<intelligence_config::TrialConfig>,
}
/// Nested message and enum types in `IntelligenceConfig`.
pub mod intelligence_config {
    /// Filter over location and bucket using include or exclude semantics.
    /// Resources that match the include or exclude filter are exclusively included
    /// or excluded from the Storage Intelligence plan.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct Filter {
        /// Bucket locations to include or exclude.
        #[prost(oneof = "filter::CloudStorageLocationsOneOf", tags = "1, 2")]
        pub cloud_storage_locations: ::core::option::Option<
            filter::CloudStorageLocationsOneOf,
        >,
        /// Buckets to include or exclude.
        #[prost(oneof = "filter::CloudStorageBucketsOneOf", tags = "3, 4")]
        pub cloud_storage_buckets: ::core::option::Option<
            filter::CloudStorageBucketsOneOf,
        >,
    }
    /// Nested message and enum types in `Filter`.
    pub mod filter {
        /// Collection of bucket locations.
        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
        pub struct CloudStorageLocations {
            /// Optional. Bucket locations. Location can be any of the Cloud Storage
            /// regions specified in lower case format. For example, `us-east1`,
            /// `us-west1`.
            #[prost(string, repeated, tag = "1")]
            pub locations: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
        }
        /// Collection of buckets.
        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
        pub struct CloudStorageBuckets {
            /// Optional. A regex pattern for matching bucket names. Regex should
            /// follow the syntax specified in
            /// [google/re2](<https://github.com/google/re2>). For example,
            /// `^sample_.*` matches all buckets of the form
            /// `gs://sample_bucket-1`, `gs://sample_bucket-2`,
            /// `gs://sample_bucket-n` but not `gs://test_sample_bucket`.
            /// If you want to match a single bucket, say `gs://sample_bucket`,
            /// use `sample_bucket`.
            #[prost(string, repeated, tag = "1")]
            pub bucket_id_regexes: ::prost::alloc::vec::Vec<
                ::prost::alloc::string::String,
            >,
        }
        /// Bucket locations to include or exclude.
        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
        pub enum CloudStorageLocationsOneOf {
            /// Bucket locations to include.
            #[prost(message, tag = "1")]
            IncludedCloudStorageLocations(CloudStorageLocations),
            /// Bucket locations to exclude.
            #[prost(message, tag = "2")]
            ExcludedCloudStorageLocations(CloudStorageLocations),
        }
        /// Buckets to include or exclude.
        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
        pub enum CloudStorageBucketsOneOf {
            /// Buckets to include.
            #[prost(message, tag = "3")]
            IncludedCloudStorageBuckets(CloudStorageBuckets),
            /// Buckets to exclude.
            #[prost(message, tag = "4")]
            ExcludedCloudStorageBuckets(CloudStorageBuckets),
        }
    }
    /// The effective `IntelligenceConfig` for the resource.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct EffectiveIntelligenceConfig {
        /// Output only. The `IntelligenceConfig` edition that is applicable for the
        /// resource.
        #[prost(
            enumeration = "effective_intelligence_config::EffectiveEdition",
            tag = "1"
        )]
        pub effective_edition: i32,
        /// Output only. The `IntelligenceConfig` resource that is applied for the
        /// target resource. Format:
        /// `{organizations|folders|projects}/{id}/locations/{location}/intelligenceConfig`
        #[prost(string, tag = "2")]
        pub intelligence_config: ::prost::alloc::string::String,
    }
    /// Nested message and enum types in `EffectiveIntelligenceConfig`.
    pub mod effective_intelligence_config {
        /// The effective edition of the `IntelligenceConfig` resource.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum EffectiveEdition {
            /// This is an unknown edition of the resource.
            Unspecified = 0,
            /// No edition.
            None = 1,
            /// The `IntelligenceConfig` resource is of STANDARD edition.
            Standard = 2,
        }
        impl EffectiveEdition {
            /// String value of the enum field names used in the ProtoBuf definition.
            ///
            /// The values are not transformed in any way and thus are considered stable
            /// (if the ProtoBuf definition does not change) and safe for programmatic use.
            pub fn as_str_name(&self) -> &'static str {
                match self {
                    Self::Unspecified => "EFFECTIVE_EDITION_UNSPECIFIED",
                    Self::None => "NONE",
                    Self::Standard => "STANDARD",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "EFFECTIVE_EDITION_UNSPECIFIED" => Some(Self::Unspecified),
                    "NONE" => Some(Self::None),
                    "STANDARD" => Some(Self::Standard),
                    _ => None,
                }
            }
        }
    }
    /// The trial configuration of the `IntelligenceConfig` resource.
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct TrialConfig {
        /// Output only. The time at which the trial expires.
        #[prost(message, optional, tag = "3")]
        pub expire_time: ::core::option::Option<::prost_types::Timestamp>,
    }
    /// The edition configuration of the `IntelligenceConfig` resource. This
    /// signifies the edition used for configuring the `IntelligenceConfig`
    /// resource and can only take the following values:
    /// `EDITION_CONFIG_UNSPECIFIED`, `INHERIT`, `DISABLED`, `STANDARD` and
    /// `TRIAL`.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum EditionConfig {
        /// This is an unknown edition of the resource.
        Unspecified = 0,
        /// The inherited edition from the parent and filters. This is the default
        /// edition when there is no `IntelligenceConfig` setup for a GCP resource.
        Inherit = 1,
        /// The edition configuration is disabled for the `IntelligenceConfig`
        /// resource and its children. Filters are not applicable.
        Disabled = 2,
        /// The `IntelligenceConfig` resource is of STANDARD edition.
        Standard = 3,
        /// The `IntelligenceConfig` resource is available in `TRIAL` edition. During
        /// the trial period, Cloud Storage does not charge for Storage Intelligence
        /// usage. You can specify the buckets to include in the trial period by
        /// using filters. At the end of the trial period, the `IntelligenceConfig`
        /// resource is upgraded to `STANDARD` edition.
        Trial = 5,
    }
    impl EditionConfig {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "EDITION_CONFIG_UNSPECIFIED",
                Self::Inherit => "INHERIT",
                Self::Disabled => "DISABLED",
                Self::Standard => "STANDARD",
                Self::Trial => "TRIAL",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "EDITION_CONFIG_UNSPECIFIED" => Some(Self::Unspecified),
                "INHERIT" => Some(Self::Inherit),
                "DISABLED" => Some(Self::Disabled),
                "STANDARD" => Some(Self::Standard),
                "TRIAL" => Some(Self::Trial),
                _ => None,
            }
        }
    }
}
/// Request message to update the `IntelligenceConfig` resource associated with
/// your organization.
///
/// **IAM Permissions**:
///
/// Requires `storage.intelligenceConfigs.update`
/// [IAM](<https://cloud.google.com/iam/docs/overview#permissions>) permission on
/// the organization.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UpdateOrganizationIntelligenceConfigRequest {
    /// Required. The `IntelligenceConfig` resource to be updated.
    #[prost(message, optional, tag = "1")]
    pub intelligence_config: ::core::option::Option<IntelligenceConfig>,
    /// Required. The `update_mask` that specifies the fields within the
    /// `IntelligenceConfig` resource that should be modified by this update. Only
    /// the listed fields are updated.
    #[prost(message, optional, tag = "2")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Optional. The ID that uniquely identifies the request, preventing duplicate
    /// processing.
    #[prost(string, tag = "3")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request message to update the `IntelligenceConfig` resource associated with
/// your folder.
///
/// **IAM Permissions**:
///
/// Requires `storage.intelligenceConfigs.update`
/// [IAM](<https://cloud.google.com/iam/docs/overview#permissions>) permission on
/// the folder.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UpdateFolderIntelligenceConfigRequest {
    /// Required. The `IntelligenceConfig` resource to be updated.
    #[prost(message, optional, tag = "1")]
    pub intelligence_config: ::core::option::Option<IntelligenceConfig>,
    /// Required. The `update_mask` that specifies the fields within the
    /// `IntelligenceConfig` resource that should be modified by this update. Only
    /// the listed fields are updated.
    #[prost(message, optional, tag = "2")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Optional. The ID that uniquely identifies the request, preventing duplicate
    /// processing.
    #[prost(string, tag = "3")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request message to update the `IntelligenceConfig` resource associated with
/// your project.
///
/// **IAM Permissions**:
///
/// Requires `storage.intelligenceConfigs.update`
/// [IAM](<https://cloud.google.com/iam/docs/overview#permissions>) permission on
/// the folder.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UpdateProjectIntelligenceConfigRequest {
    /// Required. The `IntelligenceConfig` resource to be updated.
    #[prost(message, optional, tag = "1")]
    pub intelligence_config: ::core::option::Option<IntelligenceConfig>,
    /// Required. The `update_mask` that specifies the fields within the
    /// `IntelligenceConfig` resource that should be modified by this update. Only
    /// the listed fields are updated.
    #[prost(message, optional, tag = "2")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Optional. The ID that uniquely identifies the request, preventing duplicate
    /// processing.
    #[prost(string, tag = "3")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request message to get the `IntelligenceConfig` resource associated with your
/// organization.
///
/// **IAM Permissions**
///
/// Requires `storage.intelligenceConfigs.get`
/// [IAM](<https://cloud.google.com/iam/docs/overview#permissions>) permission on
/// the organization.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetOrganizationIntelligenceConfigRequest {
    /// Required. The name of the `IntelligenceConfig` resource associated with
    /// your organization.
    ///
    /// Format: `organizations/{org_id}/locations/global/intelligenceConfig`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request message to get the `IntelligenceConfig` resource associated with your
/// folder.
///
/// **IAM Permissions**
///
/// Requires `storage.intelligenceConfigs.get`
/// [IAM](<https://cloud.google.com/iam/docs/overview#permissions>) permission on
/// the folder.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetFolderIntelligenceConfigRequest {
    /// Required. The name of the `IntelligenceConfig` resource associated with
    /// your folder.
    ///
    /// Format: `folders/{id}/locations/global/intelligenceConfig`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request message to get the `IntelligenceConfig` resource associated with your
/// project.
///
/// **IAM Permissions**:
///
/// Requires `storage.intelligenceConfigs.get`
/// [IAM](<https://cloud.google.com/iam/docs/overview#permissions>) permission
/// on the project.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetProjectIntelligenceConfigRequest {
    /// Required. The name of the `IntelligenceConfig` resource associated with
    /// your project.
    ///
    /// Format: `projects/{id}/locations/global/intelligenceConfig`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod storage_control_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// StorageControl service includes selected control plane operations.
    #[derive(Debug, Clone)]
    pub struct StorageControlClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl StorageControlClient<tonic::transport::Channel> {
        /// Attempt to create a new client by connecting to a given endpoint.
        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
        where
            D: TryInto<tonic::transport::Endpoint>,
            D::Error: Into<StdError>,
        {
            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
            Ok(Self::new(conn))
        }
    }
    impl<T> StorageControlClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::Body>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> StorageControlClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::Body>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::Body>,
            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
        {
            StorageControlClient::new(InterceptedService::new(inner, interceptor))
        }
        /// Compress requests with the given encoding.
        ///
        /// This requires the server to support it otherwise it might respond with an
        /// error.
        #[must_use]
        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.send_compressed(encoding);
            self
        }
        /// Enable decompressing responses.
        #[must_use]
        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.accept_compressed(encoding);
            self
        }
        /// Limits the maximum size of a decoded message.
        ///
        /// Default: `4MB`
        #[must_use]
        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_decoding_message_size(limit);
            self
        }
        /// Limits the maximum size of an encoded message.
        ///
        /// Default: `usize::MAX`
        #[must_use]
        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_encoding_message_size(limit);
            self
        }
        /// Creates a new folder. This operation is only applicable to a hierarchical
        /// namespace enabled bucket.
        pub async fn create_folder(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateFolderRequest>,
        ) -> std::result::Result<tonic::Response<super::Folder>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.control.v2.StorageControl/CreateFolder",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.storage.control.v2.StorageControl",
                        "CreateFolder",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Permanently deletes an empty folder. This operation is only applicable to a
        /// hierarchical namespace enabled bucket.
        pub async fn delete_folder(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteFolderRequest>,
        ) -> std::result::Result<tonic::Response<()>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.control.v2.StorageControl/DeleteFolder",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.storage.control.v2.StorageControl",
                        "DeleteFolder",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Returns metadata for the specified folder. This operation is only
        /// applicable to a hierarchical namespace enabled bucket.
        pub async fn get_folder(
            &mut self,
            request: impl tonic::IntoRequest<super::GetFolderRequest>,
        ) -> std::result::Result<tonic::Response<super::Folder>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.control.v2.StorageControl/GetFolder",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.storage.control.v2.StorageControl",
                        "GetFolder",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Retrieves a list of folders. This operation is only applicable to a
        /// hierarchical namespace enabled bucket.
        pub async fn list_folders(
            &mut self,
            request: impl tonic::IntoRequest<super::ListFoldersRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListFoldersResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.control.v2.StorageControl/ListFolders",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.storage.control.v2.StorageControl",
                        "ListFolders",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Renames a source folder to a destination folder. This operation is only
        /// applicable to a hierarchical namespace enabled bucket. During a rename, the
        /// source and destination folders are locked until the long running operation
        /// completes.
        pub async fn rename_folder(
            &mut self,
            request: impl tonic::IntoRequest<super::RenameFolderRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.control.v2.StorageControl/RenameFolder",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.storage.control.v2.StorageControl",
                        "RenameFolder",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a folder recursively. This operation is only applicable to a
        /// hierarchical namespace enabled bucket.
        pub async fn delete_folder_recursive(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteFolderRecursiveRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.control.v2.StorageControl/DeleteFolderRecursive",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.storage.control.v2.StorageControl",
                        "DeleteFolderRecursive",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Returns the storage layout configuration for a given bucket.
        pub async fn get_storage_layout(
            &mut self,
            request: impl tonic::IntoRequest<super::GetStorageLayoutRequest>,
        ) -> std::result::Result<tonic::Response<super::StorageLayout>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.control.v2.StorageControl/GetStorageLayout",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.storage.control.v2.StorageControl",
                        "GetStorageLayout",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new managed folder.
        pub async fn create_managed_folder(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateManagedFolderRequest>,
        ) -> std::result::Result<tonic::Response<super::ManagedFolder>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.control.v2.StorageControl/CreateManagedFolder",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.storage.control.v2.StorageControl",
                        "CreateManagedFolder",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Permanently deletes an empty managed folder.
        pub async fn delete_managed_folder(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteManagedFolderRequest>,
        ) -> std::result::Result<tonic::Response<()>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.control.v2.StorageControl/DeleteManagedFolder",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.storage.control.v2.StorageControl",
                        "DeleteManagedFolder",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Returns metadata for the specified managed folder.
        pub async fn get_managed_folder(
            &mut self,
            request: impl tonic::IntoRequest<super::GetManagedFolderRequest>,
        ) -> std::result::Result<tonic::Response<super::ManagedFolder>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.control.v2.StorageControl/GetManagedFolder",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.storage.control.v2.StorageControl",
                        "GetManagedFolder",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Retrieves a list of managed folders for a given bucket.
        pub async fn list_managed_folders(
            &mut self,
            request: impl tonic::IntoRequest<super::ListManagedFoldersRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListManagedFoldersResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.control.v2.StorageControl/ListManagedFolders",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.storage.control.v2.StorageControl",
                        "ListManagedFolders",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates an Anywhere Cache instance.
        pub async fn create_anywhere_cache(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateAnywhereCacheRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.control.v2.StorageControl/CreateAnywhereCache",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.storage.control.v2.StorageControl",
                        "CreateAnywhereCache",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates an Anywhere Cache instance. Mutable fields include `ttl` and
        /// `admission_policy`.
        pub async fn update_anywhere_cache(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateAnywhereCacheRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.control.v2.StorageControl/UpdateAnywhereCache",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.storage.control.v2.StorageControl",
                        "UpdateAnywhereCache",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Disables an Anywhere Cache instance. A disabled instance is read-only. The
        /// disablement could be revoked by calling ResumeAnywhereCache. The cache
        /// instance will be deleted automatically if it remains in the disabled state
        /// for at least one hour.
        pub async fn disable_anywhere_cache(
            &mut self,
            request: impl tonic::IntoRequest<super::DisableAnywhereCacheRequest>,
        ) -> std::result::Result<tonic::Response<super::AnywhereCache>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.control.v2.StorageControl/DisableAnywhereCache",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.storage.control.v2.StorageControl",
                        "DisableAnywhereCache",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Pauses an Anywhere Cache instance.
        pub async fn pause_anywhere_cache(
            &mut self,
            request: impl tonic::IntoRequest<super::PauseAnywhereCacheRequest>,
        ) -> std::result::Result<tonic::Response<super::AnywhereCache>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.control.v2.StorageControl/PauseAnywhereCache",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.storage.control.v2.StorageControl",
                        "PauseAnywhereCache",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Resumes a disabled or paused Anywhere Cache instance.
        pub async fn resume_anywhere_cache(
            &mut self,
            request: impl tonic::IntoRequest<super::ResumeAnywhereCacheRequest>,
        ) -> std::result::Result<tonic::Response<super::AnywhereCache>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.control.v2.StorageControl/ResumeAnywhereCache",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.storage.control.v2.StorageControl",
                        "ResumeAnywhereCache",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets an Anywhere Cache instance.
        pub async fn get_anywhere_cache(
            &mut self,
            request: impl tonic::IntoRequest<super::GetAnywhereCacheRequest>,
        ) -> std::result::Result<tonic::Response<super::AnywhereCache>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.control.v2.StorageControl/GetAnywhereCache",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.storage.control.v2.StorageControl",
                        "GetAnywhereCache",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists Anywhere Cache instances for a given bucket.
        pub async fn list_anywhere_caches(
            &mut self,
            request: impl tonic::IntoRequest<super::ListAnywhereCachesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListAnywhereCachesResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.control.v2.StorageControl/ListAnywhereCaches",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.storage.control.v2.StorageControl",
                        "ListAnywhereCaches",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Returns the Project scoped singleton IntelligenceConfig resource.
        pub async fn get_project_intelligence_config(
            &mut self,
            request: impl tonic::IntoRequest<super::GetProjectIntelligenceConfigRequest>,
        ) -> std::result::Result<
            tonic::Response<super::IntelligenceConfig>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.control.v2.StorageControl/GetProjectIntelligenceConfig",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.storage.control.v2.StorageControl",
                        "GetProjectIntelligenceConfig",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the Project scoped singleton IntelligenceConfig resource.
        pub async fn update_project_intelligence_config(
            &mut self,
            request: impl tonic::IntoRequest<
                super::UpdateProjectIntelligenceConfigRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::IntelligenceConfig>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.control.v2.StorageControl/UpdateProjectIntelligenceConfig",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.storage.control.v2.StorageControl",
                        "UpdateProjectIntelligenceConfig",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Returns the Folder scoped singleton IntelligenceConfig resource.
        pub async fn get_folder_intelligence_config(
            &mut self,
            request: impl tonic::IntoRequest<super::GetFolderIntelligenceConfigRequest>,
        ) -> std::result::Result<
            tonic::Response<super::IntelligenceConfig>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.control.v2.StorageControl/GetFolderIntelligenceConfig",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.storage.control.v2.StorageControl",
                        "GetFolderIntelligenceConfig",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the Folder scoped singleton IntelligenceConfig resource.
        pub async fn update_folder_intelligence_config(
            &mut self,
            request: impl tonic::IntoRequest<
                super::UpdateFolderIntelligenceConfigRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::IntelligenceConfig>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.control.v2.StorageControl/UpdateFolderIntelligenceConfig",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.storage.control.v2.StorageControl",
                        "UpdateFolderIntelligenceConfig",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Returns the Organization scoped singleton IntelligenceConfig resource.
        pub async fn get_organization_intelligence_config(
            &mut self,
            request: impl tonic::IntoRequest<
                super::GetOrganizationIntelligenceConfigRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::IntelligenceConfig>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.control.v2.StorageControl/GetOrganizationIntelligenceConfig",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.storage.control.v2.StorageControl",
                        "GetOrganizationIntelligenceConfig",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the Organization scoped singleton IntelligenceConfig resource.
        pub async fn update_organization_intelligence_config(
            &mut self,
            request: impl tonic::IntoRequest<
                super::UpdateOrganizationIntelligenceConfigRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::IntelligenceConfig>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.control.v2.StorageControl/UpdateOrganizationIntelligenceConfig",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.storage.control.v2.StorageControl",
                        "UpdateOrganizationIntelligenceConfig",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets the IAM policy for a specified bucket.
        /// The `resource` field in the request should be
        /// `projects/_/buckets/{bucket}` for a bucket, or
        /// `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
        /// for a managed folder.
        pub async fn get_iam_policy(
            &mut self,
            request: impl tonic::IntoRequest<
                super::super::super::super::iam::v1::GetIamPolicyRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::iam::v1::Policy>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.control.v2.StorageControl/GetIamPolicy",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.storage.control.v2.StorageControl",
                        "GetIamPolicy",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates an IAM policy for the specified bucket.
        /// The `resource` field in the request should be
        /// `projects/_/buckets/{bucket}` for a bucket, or
        /// `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
        /// for a managed folder.
        pub async fn set_iam_policy(
            &mut self,
            request: impl tonic::IntoRequest<
                super::super::super::super::iam::v1::SetIamPolicyRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::iam::v1::Policy>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.control.v2.StorageControl/SetIamPolicy",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.storage.control.v2.StorageControl",
                        "SetIamPolicy",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Tests a set of permissions on the given bucket, object, or managed folder
        /// to see which, if any, are held by the caller.
        /// The `resource` field in the request should be
        /// `projects/_/buckets/{bucket}` for a bucket,
        /// `projects/_/buckets/{bucket}/objects/{object}` for an object, or
        /// `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
        /// for a managed folder.
        pub async fn test_iam_permissions(
            &mut self,
            request: impl tonic::IntoRequest<
                super::super::super::super::iam::v1::TestIamPermissionsRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<
                super::super::super::super::iam::v1::TestIamPermissionsResponse,
            >,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.control.v2.StorageControl/TestIamPermissions",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.storage.control.v2.StorageControl",
                        "TestIamPermissions",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
