aws-sdk-wickr 1.12.0

AWS SDK for AWS Wickr Admin API
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetNetworkOutput {
    /// <p>The unique identifier of the network.</p>
    pub network_id: ::std::string::String,
    /// <p>The name of the network.</p>
    pub network_name: ::std::string::String,
    /// <p>The access level of the network (STANDARD or PREMIUM), which determines available features and capabilities.</p>
    pub access_level: crate::types::AccessLevel,
    /// <p>The Amazon Web Services account ID that owns the network.</p>
    pub aws_account_id: ::std::string::String,
    /// <p>The Amazon Resource Name (ARN) of the network.</p>
    pub network_arn: ::std::string::String,
    /// <p>The current standing or status of the network.</p>
    pub standing: ::std::option::Option<i32>,
    /// <p>The expiration date and time for the network's free trial period, if applicable.</p>
    pub free_trial_expiration: ::std::option::Option<::std::string::String>,
    /// <p>The SSO redirect URI migration state, managed by the SSO redirect migration wizard. Values: 0 (not started), 1 (in progress), or 2 (completed).</p>
    pub migration_state: ::std::option::Option<i32>,
    /// <p>The ARN of the Amazon Web Services KMS customer managed key used for encrypting sensitive data in the network.</p>
    pub encryption_key_arn: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetNetworkOutput {
    /// <p>The unique identifier of the network.</p>
    pub fn network_id(&self) -> &str {
        use std::ops::Deref;
        self.network_id.deref()
    }
    /// <p>The name of the network.</p>
    pub fn network_name(&self) -> &str {
        use std::ops::Deref;
        self.network_name.deref()
    }
    /// <p>The access level of the network (STANDARD or PREMIUM), which determines available features and capabilities.</p>
    pub fn access_level(&self) -> &crate::types::AccessLevel {
        &self.access_level
    }
    /// <p>The Amazon Web Services account ID that owns the network.</p>
    pub fn aws_account_id(&self) -> &str {
        use std::ops::Deref;
        self.aws_account_id.deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the network.</p>
    pub fn network_arn(&self) -> &str {
        use std::ops::Deref;
        self.network_arn.deref()
    }
    /// <p>The current standing or status of the network.</p>
    pub fn standing(&self) -> ::std::option::Option<i32> {
        self.standing
    }
    /// <p>The expiration date and time for the network's free trial period, if applicable.</p>
    pub fn free_trial_expiration(&self) -> ::std::option::Option<&str> {
        self.free_trial_expiration.as_deref()
    }
    /// <p>The SSO redirect URI migration state, managed by the SSO redirect migration wizard. Values: 0 (not started), 1 (in progress), or 2 (completed).</p>
    pub fn migration_state(&self) -> ::std::option::Option<i32> {
        self.migration_state
    }
    /// <p>The ARN of the Amazon Web Services KMS customer managed key used for encrypting sensitive data in the network.</p>
    pub fn encryption_key_arn(&self) -> ::std::option::Option<&str> {
        self.encryption_key_arn.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for GetNetworkOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetNetworkOutput {
    /// Creates a new builder-style object to manufacture [`GetNetworkOutput`](crate::operation::get_network::GetNetworkOutput).
    pub fn builder() -> crate::operation::get_network::builders::GetNetworkOutputBuilder {
        crate::operation::get_network::builders::GetNetworkOutputBuilder::default()
    }
}

/// A builder for [`GetNetworkOutput`](crate::operation::get_network::GetNetworkOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetNetworkOutputBuilder {
    pub(crate) network_id: ::std::option::Option<::std::string::String>,
    pub(crate) network_name: ::std::option::Option<::std::string::String>,
    pub(crate) access_level: ::std::option::Option<crate::types::AccessLevel>,
    pub(crate) aws_account_id: ::std::option::Option<::std::string::String>,
    pub(crate) network_arn: ::std::option::Option<::std::string::String>,
    pub(crate) standing: ::std::option::Option<i32>,
    pub(crate) free_trial_expiration: ::std::option::Option<::std::string::String>,
    pub(crate) migration_state: ::std::option::Option<i32>,
    pub(crate) encryption_key_arn: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetNetworkOutputBuilder {
    /// <p>The unique identifier of the network.</p>
    /// This field is required.
    pub fn network_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.network_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the network.</p>
    pub fn set_network_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.network_id = input;
        self
    }
    /// <p>The unique identifier of the network.</p>
    pub fn get_network_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.network_id
    }
    /// <p>The name of the network.</p>
    /// This field is required.
    pub fn network_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.network_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the network.</p>
    pub fn set_network_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.network_name = input;
        self
    }
    /// <p>The name of the network.</p>
    pub fn get_network_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.network_name
    }
    /// <p>The access level of the network (STANDARD or PREMIUM), which determines available features and capabilities.</p>
    /// This field is required.
    pub fn access_level(mut self, input: crate::types::AccessLevel) -> Self {
        self.access_level = ::std::option::Option::Some(input);
        self
    }
    /// <p>The access level of the network (STANDARD or PREMIUM), which determines available features and capabilities.</p>
    pub fn set_access_level(mut self, input: ::std::option::Option<crate::types::AccessLevel>) -> Self {
        self.access_level = input;
        self
    }
    /// <p>The access level of the network (STANDARD or PREMIUM), which determines available features and capabilities.</p>
    pub fn get_access_level(&self) -> &::std::option::Option<crate::types::AccessLevel> {
        &self.access_level
    }
    /// <p>The Amazon Web Services account ID that owns the network.</p>
    /// This field is required.
    pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.aws_account_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Web Services account ID that owns the network.</p>
    pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.aws_account_id = input;
        self
    }
    /// <p>The Amazon Web Services account ID that owns the network.</p>
    pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.aws_account_id
    }
    /// <p>The Amazon Resource Name (ARN) of the network.</p>
    /// This field is required.
    pub fn network_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.network_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the network.</p>
    pub fn set_network_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.network_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the network.</p>
    pub fn get_network_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.network_arn
    }
    /// <p>The current standing or status of the network.</p>
    pub fn standing(mut self, input: i32) -> Self {
        self.standing = ::std::option::Option::Some(input);
        self
    }
    /// <p>The current standing or status of the network.</p>
    pub fn set_standing(mut self, input: ::std::option::Option<i32>) -> Self {
        self.standing = input;
        self
    }
    /// <p>The current standing or status of the network.</p>
    pub fn get_standing(&self) -> &::std::option::Option<i32> {
        &self.standing
    }
    /// <p>The expiration date and time for the network's free trial period, if applicable.</p>
    pub fn free_trial_expiration(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.free_trial_expiration = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The expiration date and time for the network's free trial period, if applicable.</p>
    pub fn set_free_trial_expiration(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.free_trial_expiration = input;
        self
    }
    /// <p>The expiration date and time for the network's free trial period, if applicable.</p>
    pub fn get_free_trial_expiration(&self) -> &::std::option::Option<::std::string::String> {
        &self.free_trial_expiration
    }
    /// <p>The SSO redirect URI migration state, managed by the SSO redirect migration wizard. Values: 0 (not started), 1 (in progress), or 2 (completed).</p>
    pub fn migration_state(mut self, input: i32) -> Self {
        self.migration_state = ::std::option::Option::Some(input);
        self
    }
    /// <p>The SSO redirect URI migration state, managed by the SSO redirect migration wizard. Values: 0 (not started), 1 (in progress), or 2 (completed).</p>
    pub fn set_migration_state(mut self, input: ::std::option::Option<i32>) -> Self {
        self.migration_state = input;
        self
    }
    /// <p>The SSO redirect URI migration state, managed by the SSO redirect migration wizard. Values: 0 (not started), 1 (in progress), or 2 (completed).</p>
    pub fn get_migration_state(&self) -> &::std::option::Option<i32> {
        &self.migration_state
    }
    /// <p>The ARN of the Amazon Web Services KMS customer managed key used for encrypting sensitive data in the network.</p>
    pub fn encryption_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.encryption_key_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the Amazon Web Services KMS customer managed key used for encrypting sensitive data in the network.</p>
    pub fn set_encryption_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.encryption_key_arn = input;
        self
    }
    /// <p>The ARN of the Amazon Web Services KMS customer managed key used for encrypting sensitive data in the network.</p>
    pub fn get_encryption_key_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.encryption_key_arn
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`GetNetworkOutput`](crate::operation::get_network::GetNetworkOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`network_id`](crate::operation::get_network::builders::GetNetworkOutputBuilder::network_id)
    /// - [`network_name`](crate::operation::get_network::builders::GetNetworkOutputBuilder::network_name)
    /// - [`access_level`](crate::operation::get_network::builders::GetNetworkOutputBuilder::access_level)
    /// - [`aws_account_id`](crate::operation::get_network::builders::GetNetworkOutputBuilder::aws_account_id)
    /// - [`network_arn`](crate::operation::get_network::builders::GetNetworkOutputBuilder::network_arn)
    pub fn build(self) -> ::std::result::Result<crate::operation::get_network::GetNetworkOutput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_network::GetNetworkOutput {
            network_id: self.network_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "network_id",
                    "network_id was not specified but it is required when building GetNetworkOutput",
                )
            })?,
            network_name: self.network_name.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "network_name",
                    "network_name was not specified but it is required when building GetNetworkOutput",
                )
            })?,
            access_level: self.access_level.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "access_level",
                    "access_level was not specified but it is required when building GetNetworkOutput",
                )
            })?,
            aws_account_id: self.aws_account_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "aws_account_id",
                    "aws_account_id was not specified but it is required when building GetNetworkOutput",
                )
            })?,
            network_arn: self.network_arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "network_arn",
                    "network_arn was not specified but it is required when building GetNetworkOutput",
                )
            })?,
            standing: self.standing,
            free_trial_expiration: self.free_trial_expiration,
            migration_state: self.migration_state,
            encryption_key_arn: self.encryption_key_arn,
            _request_id: self._request_id,
        })
    }
}