// This file is @generated by prost-build.
/// Configuration for a Google SPLA product
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Configuration {
    /// Identifier. name of resource
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Required. User given name.
    #[prost(string, tag = "5")]
    pub display_name: ::prost::alloc::string::String,
    /// Required. Name field (with URL) of the Product offered for SPLA.
    #[prost(string, tag = "6")]
    pub product: ::prost::alloc::string::String,
    /// Required. LicenseType to be applied for billing
    #[prost(enumeration = "LicenseType", tag = "7")]
    pub license_type: i32,
    /// Required. Billing information applicable till end of the current month.
    #[prost(message, optional, tag = "8")]
    pub current_billing_info: ::core::option::Option<BillingInfo>,
    /// Required. Billing information applicable for next month.
    #[prost(message, optional, tag = "9")]
    pub next_billing_info: ::core::option::Option<BillingInfo>,
    /// Output only. \[Output only\] Create time stamp
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. \[Output only\] Update time stamp
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Optional. Labels as key value pairs
    #[prost(map = "string, string", tag = "4")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Output only. State of the configuration.
    #[prost(enumeration = "configuration::State", tag = "10")]
    pub state: i32,
}
/// Nested message and enum types in `Configuration`.
pub mod configuration {
    /// State of the configuration.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// The Status of the configuration is unspecified
        Unspecified = 0,
        /// Configuration is in active state.
        Active = 1,
        /// Configuration is in deactivated state.
        Suspended = 2,
        /// Configuration is in deleted state.
        Deleted = 3,
    }
    impl State {
        /// 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 => "STATE_UNSPECIFIED",
                Self::Active => "STATE_ACTIVE",
                Self::Suspended => "STATE_SUSPENDED",
                Self::Deleted => "STATE_DELETED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "STATE_UNSPECIFIED" => Some(Self::Unspecified),
                "STATE_ACTIVE" => Some(Self::Active),
                "STATE_SUSPENDED" => Some(Self::Suspended),
                "STATE_DELETED" => Some(Self::Deleted),
                _ => None,
            }
        }
    }
}
/// Billing Information.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BillingInfo {
    /// Output only. When the billing starts.
    #[prost(message, optional, tag = "2")]
    pub start_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. When the billing ends.
    #[prost(message, optional, tag = "3")]
    pub end_time: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(oneof = "billing_info::CurrentBillingInfo", tags = "1")]
    pub current_billing_info: ::core::option::Option<billing_info::CurrentBillingInfo>,
}
/// Nested message and enum types in `BillingInfo`.
pub mod billing_info {
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum CurrentBillingInfo {
        /// Required. This type of billing uses user count for computing total
        /// charge.
        #[prost(message, tag = "1")]
        UserCountBilling(super::UserCountBillingInfo),
    }
}
/// This approach uses total unique user count for billing.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UserCountBillingInfo {
    /// Required. Number of users to bill for.
    #[prost(int32, tag = "1")]
    pub user_count: i32,
}
/// Message representing usage for license configurations which use user-count
/// billing.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UserCountUsage {
    /// Required. Unique number of licensed users.
    #[prost(int32, tag = "1")]
    pub unique_user_count: i32,
}
/// Products for Google SPLA.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Product {
    /// Identifier. Full name of the product resource.
    /// ex "projects/1/locations/us-central1/products/office-2021"
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Required. Version of the product.
    #[prost(string, tag = "2")]
    pub version: ::prost::alloc::string::String,
    /// Required. Company that released the product.
    #[prost(string, tag = "3")]
    pub product_company: ::prost::alloc::string::String,
    /// Output only. State of the product.
    #[prost(enumeration = "product::State", tag = "4")]
    pub state: i32,
    /// Required. SKU for mapping to the Billing/Subscription resource.
    #[prost(string, tag = "5")]
    pub sku: ::prost::alloc::string::String,
    /// Required. Human-readable, detailed description of the Product
    #[prost(string, tag = "6")]
    pub description: ::prost::alloc::string::String,
    /// Required. Human-readable name of the Product
    #[prost(string, tag = "7")]
    pub display_name: ::prost::alloc::string::String,
}
/// Nested message and enum types in `Product`.
pub mod product {
    /// State of the product.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// The Status of the product is unknown.
        Unspecified = 0,
        /// Product is under provisioning stage.
        Provisioning = 1,
        /// Product is ok to run on instances.
        Running = 2,
        /// The product is about to terminate or has been announced for termination.
        Terminating = 3,
        /// The product has been terminated.
        Terminated = 4,
    }
    impl State {
        /// 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 => "STATE_UNSPECIFIED",
                Self::Provisioning => "STATE_PROVISIONING",
                Self::Running => "STATE_RUNNING",
                Self::Terminating => "STATE_TERMINATING",
                Self::Terminated => "STATE_TERMINATED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "STATE_UNSPECIFIED" => Some(Self::Unspecified),
                "STATE_PROVISIONING" => Some(Self::Provisioning),
                "STATE_RUNNING" => Some(Self::Running),
                "STATE_TERMINATING" => Some(Self::Terminating),
                "STATE_TERMINATED" => Some(Self::Terminated),
                _ => None,
            }
        }
    }
}
/// Message describing Instance object
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Instance {
    /// Identifier. name of resource
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. \[Output only\] Create time stamp
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. \[Output only\] Update time stamp
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Optional. Labels as key value pairs
    #[prost(map = "string, string", tag = "4")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Output only. The state of the VM.
    #[prost(enumeration = "instance::State", tag = "5")]
    pub state: i32,
    /// Output only. The location of the VM.
    #[prost(string, tag = "6")]
    pub region: ::prost::alloc::string::String,
    /// Output only. Map with Product_Name and Activation State of the VM.
    #[prost(map = "string, enumeration(ActivationState)", tag = "7")]
    pub product_activation: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        i32,
    >,
    /// Output only. license version id.
    #[prost(string, tag = "8")]
    pub license_version_id: ::prost::alloc::string::String,
    /// Required. Compute Instance resource name, i.e.
    /// projects/{project}/zones/{zone}/instances/{instance}
    #[prost(string, tag = "9")]
    pub compute_instance: ::prost::alloc::string::String,
}
/// Nested message and enum types in `Instance`.
pub mod instance {
    /// VM status enum.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// The Status of the VM is unspecified.
        Unspecified = 0,
        /// Resources are being allocated for the instance.
        Provisioning = 1,
        /// All required resources have been allocated and
        /// the instance is being started.
        Staging = 2,
        /// The instance is running.
        Running = 3,
        /// The instance is currently stopping (either being deleted or terminated).
        Stopping = 4,
        /// The instance has stopped due to various reasons (user request, VM
        /// preemption, project freezing, etc.).
        Stopped = 5,
        /// The instance has failed in some way.
        Terminated = 6,
        /// The instance is in repair.
        Repairing = 7,
    }
    impl State {
        /// 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 => "STATE_UNSPECIFIED",
                Self::Provisioning => "PROVISIONING",
                Self::Staging => "STAGING",
                Self::Running => "RUNNING",
                Self::Stopping => "STOPPING",
                Self::Stopped => "STOPPED",
                Self::Terminated => "TERMINATED",
                Self::Repairing => "REPAIRING",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "STATE_UNSPECIFIED" => Some(Self::Unspecified),
                "PROVISIONING" => Some(Self::Provisioning),
                "STAGING" => Some(Self::Staging),
                "RUNNING" => Some(Self::Running),
                "STOPPING" => Some(Self::Stopping),
                "STOPPED" => Some(Self::Stopped),
                "TERMINATED" => Some(Self::Terminated),
                "REPAIRING" => Some(Self::Repairing),
                _ => None,
            }
        }
    }
}
/// Message describing total counts of users who accessed a VM.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Usage {
    /// LiMa Instance resource name, i.e.
    /// projects/{project}/locations/{location}/instances/{instance}
    #[prost(string, tag = "1")]
    pub lima_instance: ::prost::alloc::string::String,
    /// Number of unique users accessing the VM.
    #[prost(int32, tag = "2")]
    pub users: i32,
}
/// Different types of licenses that are supported.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum LicenseType {
    /// unspecified.
    Unspecified = 0,
    /// Billing will be based on number of users listed per month.
    PerMonthPerUser = 1,
    /// Bring your own license.
    BringYourOwnLicense = 2,
}
impl LicenseType {
    /// 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 => "LICENSE_TYPE_UNSPECIFIED",
            Self::PerMonthPerUser => "LICENSE_TYPE_PER_MONTH_PER_USER",
            Self::BringYourOwnLicense => "LICENSE_TYPE_BRING_YOUR_OWN_LICENSE",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "LICENSE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "LICENSE_TYPE_PER_MONTH_PER_USER" => Some(Self::PerMonthPerUser),
            "LICENSE_TYPE_BRING_YOUR_OWN_LICENSE" => Some(Self::BringYourOwnLicense),
            _ => None,
        }
    }
}
/// State of the License Key activation on the instance.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ActivationState {
    /// The Status of the activation is unspecified
    Unspecified = 0,
    /// Activation key (MAK) requested for the instance.
    KeyRequested = 1,
    /// License activation process is running on the instance.
    Activating = 2,
    /// License activation is complete on the instance.
    Activated = 3,
    /// License Key is deactivating on the instance.
    Deactivating = 4,
    /// License Key is deactivated on the instance.
    Deactivated = 5,
    /// License Key activation failed on the instance.
    Terminated = 6,
}
impl ActivationState {
    /// 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 => "ACTIVATION_STATE_UNSPECIFIED",
            Self::KeyRequested => "ACTIVATION_STATE_KEY_REQUESTED",
            Self::Activating => "ACTIVATION_STATE_ACTIVATING",
            Self::Activated => "ACTIVATION_STATE_ACTIVATED",
            Self::Deactivating => "ACTIVATION_STATE_DEACTIVATING",
            Self::Deactivated => "ACTIVATION_STATE_DEACTIVATED",
            Self::Terminated => "ACTIVATION_STATE_TERMINATED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "ACTIVATION_STATE_UNSPECIFIED" => Some(Self::Unspecified),
            "ACTIVATION_STATE_KEY_REQUESTED" => Some(Self::KeyRequested),
            "ACTIVATION_STATE_ACTIVATING" => Some(Self::Activating),
            "ACTIVATION_STATE_ACTIVATED" => Some(Self::Activated),
            "ACTIVATION_STATE_DEACTIVATING" => Some(Self::Deactivating),
            "ACTIVATION_STATE_DEACTIVATED" => Some(Self::Deactivated),
            "ACTIVATION_STATE_TERMINATED" => Some(Self::Terminated),
            _ => None,
        }
    }
}
/// Message for requesting list of Configurations
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListConfigurationsRequest {
    /// Required. Parent value for ListConfigurationsRequest
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. Requested page size. Server may return fewer items than
    /// requested. If unspecified, server will pick an appropriate default.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// Optional. A token identifying a page of results the server should return.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// Optional. Filtering results
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Optional. Hint for how to order the results
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
}
/// Message for response to listing Configurations
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListConfigurationsResponse {
    /// The list of Configuration
    #[prost(message, repeated, tag = "1")]
    pub configurations: ::prost::alloc::vec::Vec<Configuration>,
    /// A token identifying a page of results the server should return.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Locations that could not be reached.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Message for getting a Configuration
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetConfigurationRequest {
    /// Required. Name of the resource
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Message for creating a Configuration
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateConfigurationRequest {
    /// Required. Value for parent.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. Id of the requesting object
    #[prost(string, tag = "2")]
    pub configuration_id: ::prost::alloc::string::String,
    /// Required. The resource being created
    #[prost(message, optional, tag = "3")]
    pub configuration: ::core::option::Option<Configuration>,
    /// Optional. An optional request ID to identify requests. Specify a unique
    /// request ID so that if you must retry your request, the server will know to
    /// ignore the request if it has already been completed. The server will
    /// guarantee that for at least 60 minutes since the first request.
    ///
    /// For example, consider a situation where you make an initial request and the
    /// request times out. If you make the request again with the same request
    /// ID, the server can check if original operation with the same request ID
    /// was received, and if so, will ignore the second request. This prevents
    /// clients from accidentally creating duplicate commitments.
    ///
    /// The request ID must be a valid UUID with the exception that zero UUID is
    /// not supported (00000000-0000-0000-0000-000000000000).
    #[prost(string, tag = "4")]
    pub request_id: ::prost::alloc::string::String,
}
/// Message for updating a Configuration
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateConfigurationRequest {
    /// Optional. Field mask is used to specify the fields to be overwritten in the
    /// Configuration resource by the update.
    /// The fields specified in the update_mask are relative to the resource, not
    /// the full request. A field will be overwritten if it is in the mask. If the
    /// user does not provide a mask then all fields will be overwritten.
    #[prost(message, optional, tag = "1")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Required. The resource being updated
    #[prost(message, optional, tag = "2")]
    pub configuration: ::core::option::Option<Configuration>,
    /// Optional. An optional request ID to identify requests. Specify a unique
    /// request ID so that if you must retry your request, the server will know to
    /// ignore the request if it has already been completed. The server will
    /// guarantee that for at least 60 minutes since the first request.
    ///
    /// For example, consider a situation where you make an initial request and the
    /// request times out. If you make the request again with the same request
    /// ID, the server can check if original operation with the same request ID
    /// was received, and if so, will ignore the second request. This prevents
    /// clients from accidentally creating duplicate commitments.
    ///
    /// The request ID must be a valid UUID with the exception that zero UUID is
    /// not supported (00000000-0000-0000-0000-000000000000).
    #[prost(string, tag = "3")]
    pub request_id: ::prost::alloc::string::String,
}
/// Message for deleting a Configuration
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteConfigurationRequest {
    /// Required. Name of the resource
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. An optional request ID to identify requests. Specify a unique
    /// request ID so that if you must retry your request, the server will know to
    /// ignore the request if it has already been completed. The server will
    /// guarantee that for at least 60 minutes after the first request.
    ///
    /// For example, consider a situation where you make an initial request and the
    /// request times out. If you make the request again with the same request
    /// ID, the server can check if original operation with the same request ID
    /// was received, and if so, will ignore the second request. This prevents
    /// clients from accidentally creating duplicate commitments.
    ///
    /// The request ID must be a valid UUID with the exception that zero UUID is
    /// not supported (00000000-0000-0000-0000-000000000000).
    #[prost(string, tag = "2")]
    pub request_id: ::prost::alloc::string::String,
}
/// Message for requesting list of Instances
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListInstancesRequest {
    /// Required. Parent value for ListInstancesRequest
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. Requested page size. Server may return fewer items than
    /// requested. If unspecified, server will pick an appropriate default.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// Optional. A token identifying a page of results the server should return.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// Optional. Filtering results
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Optional. Hint for how to order the results
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
}
/// Message for response to listing Instances
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListInstancesResponse {
    /// The list of Instance
    #[prost(message, repeated, tag = "1")]
    pub instances: ::prost::alloc::vec::Vec<Instance>,
    /// A token identifying a page of results the server should return.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Locations that could not be reached.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Message for getting a Instance
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetInstanceRequest {
    /// Required. Name of the resource
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Message for requesting license usage per configuration.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct QueryConfigurationLicenseUsageRequest {
    /// Required. The resource path of the Configuration.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Required. The start time for retrieving the usage. If not specified, we
    /// will use the first day of the current billing period.
    #[prost(message, optional, tag = "2")]
    pub start_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Required. The end time for retrieving the usage. If not specified, we will
    /// use the last day of the current billing period.
    #[prost(message, optional, tag = "3")]
    pub end_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Message for response to get the license usage per configuration.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct QueryConfigurationLicenseUsageResponse {
    /// Depending on the type of the configuration, one of the following
    /// will be populated.
    #[prost(oneof = "query_configuration_license_usage_response::Details", tags = "1")]
    pub details: ::core::option::Option<
        query_configuration_license_usage_response::Details,
    >,
}
/// Nested message and enum types in `QueryConfigurationLicenseUsageResponse`.
pub mod query_configuration_license_usage_response {
    /// Depending on the type of the configuration, one of the following
    /// will be populated.
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Details {
        /// Usage information for license types which use user-count billing.
        #[prost(message, tag = "1")]
        UserCountUsage(super::UserCountUsage),
    }
}
/// Message for deactivating a Configuration.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeactivateConfigurationRequest {
    /// Required. Name of the resource.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. An optional request ID to identify requests. Specify a unique
    /// request ID so that if you must retry your request, the server will know to
    /// ignore the request if it has already been completed. The server will
    /// guarantee that for at least 60 minutes after the first request.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check if original operation with the same request ID
    /// was received, and if so, will ignore the second request. This prevents
    /// clients from accidentally creating duplicate commitments.
    ///
    /// The request ID must be a valid UUID with the exception that zero UUID is
    /// not supported (00000000-0000-0000-0000-000000000000).
    #[prost(string, tag = "2")]
    pub request_id: ::prost::alloc::string::String,
}
/// Message for resuming a Configuration.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReactivateConfigurationRequest {
    /// Required. Name of the resource.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. An optional request ID to identify requests. Specify a unique
    /// request ID so that if you must retry your request, the server will know to
    /// ignore the request if it has already been completed. The server will
    /// guarantee that for at least 60 minutes after the first request.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check if original operation with the same request ID
    /// was received, and if so, will ignore the second request. This prevents
    /// clients from accidentally creating duplicate commitments.
    ///
    /// The request ID must be a valid UUID with the exception that zero UUID is
    /// not supported (00000000-0000-0000-0000-000000000000).
    #[prost(string, tag = "2")]
    pub request_id: ::prost::alloc::string::String,
}
/// Message for requesting aggregate of Usage per configuration.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AggregateUsageRequest {
    /// Required. Parent value for AggregateUsageRequest
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. Requested page size. Server may return fewer items than
    /// requested. If unspecified, server will pick an appropriate default.
    #[prost(int32, tag = "3")]
    pub page_size: i32,
    /// Optional. A token identifying a page of results the server should return.
    #[prost(string, tag = "4")]
    pub page_token: ::prost::alloc::string::String,
    /// Optional. Filtering results
    #[prost(string, tag = "5")]
    pub filter: ::prost::alloc::string::String,
    /// Optional. Hint for how to order the results
    #[prost(string, tag = "6")]
    pub order_by: ::prost::alloc::string::String,
    /// Required. Licenses are purchased per month - so usage track needs start
    /// time of a month.
    #[prost(message, optional, tag = "7")]
    pub start_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Required. Usage track is always for a month. This parameter is for the end
    /// time of the month.
    #[prost(message, optional, tag = "8")]
    pub end_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Message for response for aggregating usage count
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AggregateUsageResponse {
    /// The aggregated records of usage per configuration
    #[prost(message, repeated, tag = "1")]
    pub usages: ::prost::alloc::vec::Vec<Usage>,
    /// A token identifying a page of results the server should return.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Locations that could not be reached.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Message for requesting list of Products
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListProductsRequest {
    /// Required. Parent value for ListProductsRequest
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. Requested page size. Server may return fewer items than
    /// requested. If unspecified, server will pick an appropriate default.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// Optional. A token identifying a page of results the server should return.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// Optional. Filtering results
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Optional. Hint for how to order the results
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
}
/// Message for response to listing Products
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListProductsResponse {
    /// The list of Product
    #[prost(message, repeated, tag = "1")]
    pub products: ::prost::alloc::vec::Vec<Product>,
    /// A token identifying a page of results the server should return.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Locations that could not be reached.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Message for getting a Product
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetProductRequest {
    /// Required. Name of the resource
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Represents the metadata of the long-running operation.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OperationMetadata {
    /// 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. Server-defined resource path for the target of the operation.
    #[prost(string, tag = "3")]
    pub target: ::prost::alloc::string::String,
    /// Output only. Name of the verb executed by the operation.
    #[prost(string, tag = "4")]
    pub verb: ::prost::alloc::string::String,
    /// Output only. Human-readable status of the operation, if any.
    #[prost(string, tag = "5")]
    pub status_message: ::prost::alloc::string::String,
    /// Output only. Identifies whether the user has requested cancellation
    /// of the operation. Operations that have been cancelled successfully
    /// have
    /// \[google.longrunning.Operation.error\]\[google.longrunning.Operation.error\]
    /// value with a \[google.rpc.Status.code\]\[google.rpc.Status.code\] of 1,
    /// corresponding to `Code.CANCELLED`.
    #[prost(bool, tag = "6")]
    pub requested_cancellation: bool,
    /// Output only. API version used to start the operation.
    #[prost(string, tag = "7")]
    pub api_version: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod license_manager_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// Service describing handlers for resources
    #[derive(Debug, Clone)]
    pub struct LicenseManagerClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl LicenseManagerClient<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> LicenseManagerClient<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,
        ) -> LicenseManagerClient<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,
        {
            LicenseManagerClient::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
        }
        /// Lists Configurations in a given project and location.
        pub async fn list_configurations(
            &mut self,
            request: impl tonic::IntoRequest<super::ListConfigurationsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListConfigurationsResponse>,
            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.cloud.licensemanager.v1.LicenseManager/ListConfigurations",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.licensemanager.v1.LicenseManager",
                        "ListConfigurations",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details of a single Configuration.
        pub async fn get_configuration(
            &mut self,
            request: impl tonic::IntoRequest<super::GetConfigurationRequest>,
        ) -> std::result::Result<tonic::Response<super::Configuration>, 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.cloud.licensemanager.v1.LicenseManager/GetConfiguration",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.licensemanager.v1.LicenseManager",
                        "GetConfiguration",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new Configuration in a given project and location.
        pub async fn create_configuration(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateConfigurationRequest>,
        ) -> 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.cloud.licensemanager.v1.LicenseManager/CreateConfiguration",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.licensemanager.v1.LicenseManager",
                        "CreateConfiguration",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the parameters of a single Configuration.
        pub async fn update_configuration(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateConfigurationRequest>,
        ) -> 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.cloud.licensemanager.v1.LicenseManager/UpdateConfiguration",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.licensemanager.v1.LicenseManager",
                        "UpdateConfiguration",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a single Configuration.
        pub async fn delete_configuration(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteConfigurationRequest>,
        ) -> 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.cloud.licensemanager.v1.LicenseManager/DeleteConfiguration",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.licensemanager.v1.LicenseManager",
                        "DeleteConfiguration",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists Instances in a given project and location.
        pub async fn list_instances(
            &mut self,
            request: impl tonic::IntoRequest<super::ListInstancesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListInstancesResponse>,
            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.cloud.licensemanager.v1.LicenseManager/ListInstances",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.licensemanager.v1.LicenseManager",
                        "ListInstances",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details of a single Instance.
        pub async fn get_instance(
            &mut self,
            request: impl tonic::IntoRequest<super::GetInstanceRequest>,
        ) -> std::result::Result<tonic::Response<super::Instance>, 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.cloud.licensemanager.v1.LicenseManager/GetInstance",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.licensemanager.v1.LicenseManager",
                        "GetInstance",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deactivates the given configuration.
        pub async fn deactivate_configuration(
            &mut self,
            request: impl tonic::IntoRequest<super::DeactivateConfigurationRequest>,
        ) -> 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.cloud.licensemanager.v1.LicenseManager/DeactivateConfiguration",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.licensemanager.v1.LicenseManager",
                        "DeactivateConfiguration",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Reactivates the given configuration.
        pub async fn reactivate_configuration(
            &mut self,
            request: impl tonic::IntoRequest<super::ReactivateConfigurationRequest>,
        ) -> 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.cloud.licensemanager.v1.LicenseManager/ReactivateConfiguration",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.licensemanager.v1.LicenseManager",
                        "ReactivateConfiguration",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// License Usage information for a Configuration.
        pub async fn query_configuration_license_usage(
            &mut self,
            request: impl tonic::IntoRequest<
                super::QueryConfigurationLicenseUsageRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::QueryConfigurationLicenseUsageResponse>,
            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.cloud.licensemanager.v1.LicenseManager/QueryConfigurationLicenseUsage",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.licensemanager.v1.LicenseManager",
                        "QueryConfigurationLicenseUsage",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Aggregates Usage per Instance for a Configuration.
        pub async fn aggregate_usage(
            &mut self,
            request: impl tonic::IntoRequest<super::AggregateUsageRequest>,
        ) -> std::result::Result<
            tonic::Response<super::AggregateUsageResponse>,
            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.cloud.licensemanager.v1.LicenseManager/AggregateUsage",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.licensemanager.v1.LicenseManager",
                        "AggregateUsage",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists Products in a given project and location.
        pub async fn list_products(
            &mut self,
            request: impl tonic::IntoRequest<super::ListProductsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListProductsResponse>,
            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.cloud.licensemanager.v1.LicenseManager/ListProducts",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.licensemanager.v1.LicenseManager",
                        "ListProducts",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details of a single Product.
        pub async fn get_product(
            &mut self,
            request: impl tonic::IntoRequest<super::GetProductRequest>,
        ) -> std::result::Result<tonic::Response<super::Product>, 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.cloud.licensemanager.v1.LicenseManager/GetProduct",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.licensemanager.v1.LicenseManager",
                        "GetProduct",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
