// This file is @generated by prost-build.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthorizedGroups {
    #[prost(string, repeated, tag = "1")]
    pub group_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Marking {
    #[prost(string, tag = "1")]
    pub rid: ::prost::alloc::string::String,
    /// Human-readable identifier for this marking.
    /// Must be unique within the organization.
    /// Must be lower case alphanumeric characters, optionally separated by hyphens.
    #[prost(string, tag = "2")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub description: ::prost::alloc::string::String,
    /// Group RIDs that are authorized to access data sources with this marking.
    #[prost(message, optional, tag = "4")]
    pub authorized_groups: ::core::option::Option<AuthorizedGroups>,
    /// Symbol and color to identify markings
    #[prost(message, optional, tag = "5")]
    pub symbol: ::core::option::Option<super::super::super::scout::elements::v1::Symbol>,
    #[prost(message, optional, tag = "6")]
    pub color: ::core::option::Option<super::super::super::scout::elements::v1::Color>,
    #[prost(message, optional, tag = "7")]
    pub created_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(message, optional, tag = "8")]
    pub updated_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(bool, tag = "9")]
    pub is_archived: bool,
}
/// A leaner representation of a Marking that doesn't include the authorized groups.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MarkingMetadata {
    #[prost(string, tag = "1")]
    pub rid: ::prost::alloc::string::String,
    /// Human-readable identifier for this marking.
    /// Must be unique within the organization.
    /// Must be lower case alphanumeric characters, optionally separated by hyphens.
    #[prost(string, tag = "2")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub description: ::prost::alloc::string::String,
    /// Symbol and color to identify markings
    #[prost(message, optional, tag = "4")]
    pub symbol: ::core::option::Option<super::super::super::scout::elements::v1::Symbol>,
    #[prost(message, optional, tag = "5")]
    pub color: ::core::option::Option<super::super::super::scout::elements::v1::Color>,
    #[prost(message, optional, tag = "6")]
    pub created_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(message, optional, tag = "7")]
    pub updated_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(bool, tag = "8")]
    pub is_archived: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateMarkingRequest {
    /// Human-readable identifier for this marking.
    /// Must be unique within the organization.
    /// Must be lower case alphanumeric characters, optionally separated by hyphens.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub description: ::prost::alloc::string::String,
    /// Group RIDs that are authorized to access data sources with this marking.
    #[prost(message, optional, tag = "3")]
    pub authorized_groups: ::core::option::Option<AuthorizedGroups>,
    #[prost(message, optional, tag = "4")]
    pub symbol: ::core::option::Option<super::super::super::scout::elements::v1::Symbol>,
    #[prost(message, optional, tag = "5")]
    pub color: ::core::option::Option<super::super::super::scout::elements::v1::Color>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateMarkingResponse {
    #[prost(message, optional, tag = "1")]
    pub marking: ::core::option::Option<Marking>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMarkingRequest {
    #[prost(string, tag = "1")]
    pub rid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMarkingResponse {
    #[prost(message, optional, tag = "1")]
    pub marking: ::core::option::Option<Marking>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMarkingByIdRequest {
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMarkingByIdResponse {
    #[prost(message, optional, tag = "1")]
    pub marking: ::core::option::Option<Marking>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetMarkingsRequest {
    #[prost(string, repeated, tag = "1")]
    pub marking_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetMarkingsResponse {
    #[prost(message, repeated, tag = "1")]
    pub markings: ::prost::alloc::vec::Vec<Marking>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetMarkingMetadataRequest {
    #[prost(string, repeated, tag = "1")]
    pub marking_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetMarkingMetadataResponse {
    #[prost(message, repeated, tag = "1")]
    pub marking_metadatas: ::prost::alloc::vec::Vec<MarkingMetadata>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAuthorizedGroupsByMarkingRequest {
    #[prost(string, repeated, tag = "1")]
    pub marking_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAuthorizedGroupsByMarkingResponse {
    #[prost(map = "string, message", tag = "1")]
    pub authorized_groups_by_marking: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        AuthorizedGroups,
    >,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchMarkingsQuery {
    #[prost(oneof = "search_markings_query::Query", tags = "1, 2, 3")]
    pub query: ::core::option::Option<search_markings_query::Query>,
}
/// Nested message and enum types in `SearchMarkingsQuery`.
pub mod search_markings_query {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Query {
        /// Search for markings with an ID that contains the given query as a substring.
        #[prost(string, tag = "1")]
        IdExactSubstringSearch(::prost::alloc::string::String),
        #[prost(message, tag = "2")]
        And(super::SearchMarkingsQueryList),
        #[prost(message, tag = "3")]
        Or(super::SearchMarkingsQueryList),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchMarkingsQueryList {
    #[prost(message, repeated, tag = "1")]
    pub queries: ::prost::alloc::vec::Vec<SearchMarkingsQuery>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchMarkingsRequest {
    #[prost(message, optional, tag = "1")]
    pub query: ::core::option::Option<SearchMarkingsQuery>,
    /// Page sizes greater than 1_000 will be rejected. Default pageSize is 100.
    #[prost(int32, optional, tag = "2")]
    pub page_size: ::core::option::Option<i32>,
    #[prost(string, optional, tag = "3")]
    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchMarkingsResponse {
    #[prost(message, repeated, tag = "1")]
    pub marking_metadatas: ::prost::alloc::vec::Vec<MarkingMetadata>,
    #[prost(string, optional, tag = "2")]
    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateMarkingRequest {
    #[prost(string, tag = "1")]
    pub rid: ::prost::alloc::string::String,
    /// Human-readable identifier for this marking.
    /// Must be unique within the organization.
    /// Must be lower case alphanumeric characters, optionally separated by hyphens.
    #[prost(string, optional, tag = "2")]
    pub id: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "3")]
    pub description: ::core::option::Option<::prost::alloc::string::String>,
    /// Group RIDs that are authorized to access data sources with this marking.
    #[prost(message, optional, tag = "4")]
    pub authorized_groups: ::core::option::Option<AuthorizedGroups>,
    #[prost(message, optional, tag = "5")]
    pub symbol: ::core::option::Option<
        update_marking_request::UpdateMarkingSymbolWrapper,
    >,
    #[prost(message, optional, tag = "6")]
    pub color: ::core::option::Option<update_marking_request::UpdateMarkingColorWrapper>,
}
/// Nested message and enum types in `UpdateMarkingRequest`.
pub mod update_marking_request {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct UpdateMarkingSymbolWrapper {
        #[prost(message, optional, tag = "1")]
        pub value: ::core::option::Option<
            super::super::super::super::scout::elements::v1::Symbol,
        >,
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct UpdateMarkingColorWrapper {
        #[prost(message, optional, tag = "1")]
        pub value: ::core::option::Option<
            super::super::super::super::scout::elements::v1::Color,
        >,
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateMarkingResponse {
    #[prost(message, optional, tag = "1")]
    pub marking: ::core::option::Option<Marking>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ArchiveMarkingsRequest {
    #[prost(string, repeated, tag = "1")]
    pub marking_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// intentionally empty
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ArchiveMarkingsResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnarchiveMarkingsRequest {
    #[prost(string, repeated, tag = "1")]
    pub marking_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// intentionally empty
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct UnarchiveMarkingsResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateMarkingsOnResourceRequest {
    #[prost(string, tag = "1")]
    pub resource: ::prost::alloc::string::String,
    #[prost(string, repeated, tag = "2")]
    pub markings_to_apply: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, repeated, tag = "3")]
    pub markings_to_remove: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// intentionally empty
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct UpdateMarkingsOnResourceResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetResourcesForMarkingRequest {
    #[prost(string, tag = "1")]
    pub marking_rid: ::prost::alloc::string::String,
    /// Page sizes greater than 1_000 will be rejected. Default pageSize is 100.
    #[prost(int32, optional, tag = "2")]
    pub page_size: ::core::option::Option<i32>,
    #[prost(string, optional, tag = "3")]
    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetResourcesForMarkingResponse {
    #[prost(message, repeated, tag = "1")]
    pub resources: ::prost::alloc::vec::Vec<
        get_resources_for_marking_response::MarkedResource,
    >,
    #[prost(string, optional, tag = "2")]
    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
}
/// Nested message and enum types in `GetResourcesForMarkingResponse`.
pub mod get_resources_for_marking_response {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct MarkedResource {
        /// nb: skipping field 1 in order to keep the door open to unify this message with "AppliedMarking" below
        #[prost(string, tag = "2")]
        pub resource: ::prost::alloc::string::String,
        #[prost(message, optional, tag = "3")]
        pub applied_at: ::core::option::Option<
            super::super::super::super::super::google::protobuf::Timestamp,
        >,
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMarkingsForResourcesRequest {
    /// The resources to get the markings for.
    #[prost(string, repeated, tag = "1")]
    pub resources: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMarkingsForResourcesResponse {
    /// A map from resource ID to the markings applied to them.
    #[prost(map = "string, message", tag = "1")]
    pub resource_to_markings: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        get_markings_for_resources_response::ResourceMarkingsList,
    >,
}
/// Nested message and enum types in `GetMarkingsForResourcesResponse`.
pub mod get_markings_for_resources_response {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct ResourceMarkingsList {
        #[prost(message, repeated, tag = "1")]
        pub applied_markings: ::prost::alloc::vec::Vec<
            resource_markings_list::AppliedMarking,
        >,
    }
    /// Nested message and enum types in `ResourceMarkingsList`.
    pub mod resource_markings_list {
        #[derive(Clone, PartialEq, ::prost::Message)]
        pub struct AppliedMarking {
            #[prost(string, tag = "1")]
            pub marking_rid: ::prost::alloc::string::String,
            /// nb: skipping field 2 in order to keep the door open to unify this message with "MarkedResource" above
            #[prost(message, optional, tag = "3")]
            pub applied_at: ::core::option::Option<
                super::super::super::super::super::super::google::protobuf::Timestamp,
            >,
        }
    }
}
/// Generated client implementations.
pub mod marking_service_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// This service manages Markings, which are a mechanism to restrict access to data sources.
    #[derive(Debug, Clone)]
    pub struct MarkingServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl MarkingServiceClient<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> MarkingServiceClient<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,
        ) -> MarkingServiceClient<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,
        {
            MarkingServiceClient::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 marking.
        /// Throws HTTP 409 / gRPC 6 if a marking with the same ID already exists.
        /// Throws HTTP 403 / gRPC 7 if the user does not have permission to create a marking.
        /// Throws HTTP 403 / gRPC 7 if the user does not have permission to read some of the specified groups.
        pub async fn create_marking(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateMarkingRequest>,
        ) -> std::result::Result<
            tonic::Response<super::CreateMarkingResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.authorization.markings.v1.MarkingService/CreateMarking",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.authorization.markings.v1.MarkingService",
                        "CreateMarking",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets a marking by its RID.
        /// Throws HTTP 403 / gRPC 7 if the user does not have permission to read the marking.
        /// Throws HTTP 403 / gRPC 5 if the marking is not found.
        pub async fn get_marking(
            &mut self,
            request: impl tonic::IntoRequest<super::GetMarkingRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetMarkingResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.authorization.markings.v1.MarkingService/GetMarking",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.authorization.markings.v1.MarkingService",
                        "GetMarking",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets a marking by its ID, a human-readable identifier unique within the org.
        /// Throws HTTP 403 / gRPC 7 if the user does not have permission to read the marking.
        /// Throws HTTP 403 / gRPC 5 if the marking is not found.
        pub async fn get_marking_by_id(
            &mut self,
            request: impl tonic::IntoRequest<super::GetMarkingByIdRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetMarkingByIdResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.authorization.markings.v1.MarkingService/GetMarkingById",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.authorization.markings.v1.MarkingService",
                        "GetMarkingById",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets multiple markings by RID.
        /// If a marking is not found or the user doesn't have permission to read it,
        /// it will not be included in the response.
        pub async fn batch_get_markings(
            &mut self,
            request: impl tonic::IntoRequest<super::BatchGetMarkingsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::BatchGetMarkingsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.authorization.markings.v1.MarkingService/BatchGetMarkings",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.authorization.markings.v1.MarkingService",
                        "BatchGetMarkings",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets metadata for multiple markings by RID. Metadata does not include the authorized groups.
        /// If a marking is not found or the user doesn't have permission to read it,
        /// it will not be included in the response.
        pub async fn batch_get_marking_metadata(
            &mut self,
            request: impl tonic::IntoRequest<super::BatchGetMarkingMetadataRequest>,
        ) -> std::result::Result<
            tonic::Response<super::BatchGetMarkingMetadataResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.authorization.markings.v1.MarkingService/BatchGetMarkingMetadata",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.authorization.markings.v1.MarkingService",
                        "BatchGetMarkingMetadata",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets the authorized Groups for each of a set of Markings.
        /// Markings that are not found or for which the user does not have permission to read
        /// will be filtered from the response.
        /// Groups for which the user does not have permission to read will be filtered from the response.
        pub async fn get_authorized_groups_by_marking(
            &mut self,
            request: impl tonic::IntoRequest<super::GetAuthorizedGroupsByMarkingRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetAuthorizedGroupsByMarkingResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.authorization.markings.v1.MarkingService/GetAuthorizedGroupsByMarking",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.authorization.markings.v1.MarkingService",
                        "GetAuthorizedGroupsByMarking",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Search Markings, returning paged results.
        /// Throws HTTP 400 / gRPC 3 if the query is incorrectly formed.
        pub async fn search_markings(
            &mut self,
            request: impl tonic::IntoRequest<super::SearchMarkingsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::SearchMarkingsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.authorization.markings.v1.MarkingService/SearchMarkings",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.authorization.markings.v1.MarkingService",
                        "SearchMarkings",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates a marking.
        /// Throws HTTP 403 / gRPC 7 if the user does not have permission to update the marking.
        /// Throws HTTP 403 / gRPC 7 if the user does not have permission to read any of the specified groups.
        /// Throws HTTP 403 / gRPC 5 if the marking is not found.
        /// Throws HTTP 409 / gRPC 6 if trying to update the ID of a marking to an ID that already exists.
        /// Throws HTTP 400 / gRPC 3 if trying to update an archived marking.
        pub async fn update_marking(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateMarkingRequest>,
        ) -> std::result::Result<
            tonic::Response<super::UpdateMarkingResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.authorization.markings.v1.MarkingService/UpdateMarking",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.authorization.markings.v1.MarkingService",
                        "UpdateMarking",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Archives markings. Archiving a marking is an idempotent operation that prevents further changes
        /// or applications of the marking.
        /// Archived markings will not appear in search but can be retrieved by `get` endpoints.
        /// Throws HTTP 403 / gRPC 7 if the user does not have permission to archive one or more of the markings
        /// or if any of the markings are not found.
        /// Throws HTTP 400 / gRPC 3 if the archived marking is currently applied to one or more resources.
        /// TODO(MGMT-489): this will throw 403 if any of the Markings don't exist, but we should throw 404 instead.
        pub async fn archive_markings(
            &mut self,
            request: impl tonic::IntoRequest<super::ArchiveMarkingsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ArchiveMarkingsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.authorization.markings.v1.MarkingService/ArchiveMarkings",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.authorization.markings.v1.MarkingService",
                        "ArchiveMarkings",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Unarchives markings. Restores ability to apply and modify marking.
        /// Throws HTTP 403 / gRPC 7 if the user does not have permission to unarchive one or more of the markings
        /// or if any of the markings are not found.
        /// TODO(MGMT-489): this will throw 403 if any of the Markings don't exist, but we should throw 404 instead.
        pub async fn unarchive_markings(
            &mut self,
            request: impl tonic::IntoRequest<super::UnarchiveMarkingsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::UnarchiveMarkingsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.authorization.markings.v1.MarkingService/UnarchiveMarkings",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.authorization.markings.v1.MarkingService",
                        "UnarchiveMarkings",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Update the markings that are applied on a resource. Supports applying and removing markings at once.
        /// This endpoint can be used to atomically replace the markings on a resource, or bulk apply/remove markings.
        /// This operation is idempotent and will not throw an error if the marking is already applied/removed on the resource.
        /// If a resource marking pair is present in both `markings_to_apply` and `markings_to_remove`, this will throw.
        /// Throws HTTP 403 / gRPC 7 if the user does not have permission to change the markings on the resource.
        /// Throws HTTP 400 / gRPC 3 if trying to apply an archived marking.
        pub async fn update_markings_on_resource(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateMarkingsOnResourceRequest>,
        ) -> std::result::Result<
            tonic::Response<super::UpdateMarkingsOnResourceResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.authorization.markings.v1.MarkingService/UpdateMarkingsOnResource",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.authorization.markings.v1.MarkingService",
                        "UpdateMarkingsOnResource",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets the resources that a Marking is applied to. This endpoint is paginated.
        /// Any unauthorized resources will be filtered from the response.
        /// Throws HTTP 403 / gRPC 7 if the user does not have permission to read the marking.
        pub async fn get_resources_for_marking(
            &mut self,
            request: impl tonic::IntoRequest<super::GetResourcesForMarkingRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetResourcesForMarkingResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.authorization.markings.v1.MarkingService/GetResourcesForMarking",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.authorization.markings.v1.MarkingService",
                        "GetResourcesForMarking",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets the requested resources and the markings applied to them. Since the number of markings applied
        /// to a resource is typically small, this endpoint will return all markings for each resource.
        /// Any unauthorized resources or markings will be filtered from the response.
        pub async fn get_markings_for_resources(
            &mut self,
            request: impl tonic::IntoRequest<super::GetMarkingsForResourcesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetMarkingsForResourcesResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.authorization.markings.v1.MarkingService/GetMarkingsForResources",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.authorization.markings.v1.MarkingService",
                        "GetMarkingsForResources",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
