aws-sdk-deadline 1.2.0

AWS SDK for AWSDeadlineCloud
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 GetLicenseEndpointOutput {
    /// <p>The license endpoint ID.</p>
    pub license_endpoint_id: ::std::string::String,
    /// <p>The status of the license endpoint.</p>
    pub status: crate::types::LicenseEndpointStatus,
    /// <p>The status message of the license endpoint.</p>
    pub status_message: ::std::string::String,
    /// <p>The VCP(virtual private cloud) ID associated with the license endpoint.</p>
    pub vpc_id: ::std::option::Option<::std::string::String>,
    /// <p>The DNS name.</p>
    pub dns_name: ::std::option::Option<::std::string::String>,
    /// <p>The subnet IDs.</p>
    pub subnet_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The security group IDs for the license endpoint.</p>
    pub security_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    _request_id: Option<String>,
}
impl GetLicenseEndpointOutput {
    /// <p>The license endpoint ID.</p>
    pub fn license_endpoint_id(&self) -> &str {
        use std::ops::Deref;
        self.license_endpoint_id.deref()
    }
    /// <p>The status of the license endpoint.</p>
    pub fn status(&self) -> &crate::types::LicenseEndpointStatus {
        &self.status
    }
    /// <p>The status message of the license endpoint.</p>
    pub fn status_message(&self) -> &str {
        use std::ops::Deref;
        self.status_message.deref()
    }
    /// <p>The VCP(virtual private cloud) ID associated with the license endpoint.</p>
    pub fn vpc_id(&self) -> ::std::option::Option<&str> {
        self.vpc_id.as_deref()
    }
    /// <p>The DNS name.</p>
    pub fn dns_name(&self) -> ::std::option::Option<&str> {
        self.dns_name.as_deref()
    }
    /// <p>The subnet IDs.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.subnet_ids.is_none()`.
    pub fn subnet_ids(&self) -> &[::std::string::String] {
        self.subnet_ids.as_deref().unwrap_or_default()
    }
    /// <p>The security group IDs for the license endpoint.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.security_group_ids.is_none()`.
    pub fn security_group_ids(&self) -> &[::std::string::String] {
        self.security_group_ids.as_deref().unwrap_or_default()
    }
}
impl ::aws_types::request_id::RequestId for GetLicenseEndpointOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetLicenseEndpointOutput {
    /// Creates a new builder-style object to manufacture [`GetLicenseEndpointOutput`](crate::operation::get_license_endpoint::GetLicenseEndpointOutput).
    pub fn builder() -> crate::operation::get_license_endpoint::builders::GetLicenseEndpointOutputBuilder {
        crate::operation::get_license_endpoint::builders::GetLicenseEndpointOutputBuilder::default()
    }
}

/// A builder for [`GetLicenseEndpointOutput`](crate::operation::get_license_endpoint::GetLicenseEndpointOutput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct GetLicenseEndpointOutputBuilder {
    pub(crate) license_endpoint_id: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::LicenseEndpointStatus>,
    pub(crate) status_message: ::std::option::Option<::std::string::String>,
    pub(crate) vpc_id: ::std::option::Option<::std::string::String>,
    pub(crate) dns_name: ::std::option::Option<::std::string::String>,
    pub(crate) subnet_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) security_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    _request_id: Option<String>,
}
impl GetLicenseEndpointOutputBuilder {
    /// <p>The license endpoint ID.</p>
    /// This field is required.
    pub fn license_endpoint_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.license_endpoint_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The license endpoint ID.</p>
    pub fn set_license_endpoint_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.license_endpoint_id = input;
        self
    }
    /// <p>The license endpoint ID.</p>
    pub fn get_license_endpoint_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.license_endpoint_id
    }
    /// <p>The status of the license endpoint.</p>
    /// This field is required.
    pub fn status(mut self, input: crate::types::LicenseEndpointStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status of the license endpoint.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::LicenseEndpointStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The status of the license endpoint.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::LicenseEndpointStatus> {
        &self.status
    }
    /// <p>The status message of the license endpoint.</p>
    /// This field is required.
    pub fn status_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.status_message = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The status message of the license endpoint.</p>
    pub fn set_status_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.status_message = input;
        self
    }
    /// <p>The status message of the license endpoint.</p>
    pub fn get_status_message(&self) -> &::std::option::Option<::std::string::String> {
        &self.status_message
    }
    /// <p>The VCP(virtual private cloud) ID associated with the license endpoint.</p>
    pub fn vpc_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.vpc_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The VCP(virtual private cloud) ID associated with the license endpoint.</p>
    pub fn set_vpc_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.vpc_id = input;
        self
    }
    /// <p>The VCP(virtual private cloud) ID associated with the license endpoint.</p>
    pub fn get_vpc_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.vpc_id
    }
    /// <p>The DNS name.</p>
    pub fn dns_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.dns_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The DNS name.</p>
    pub fn set_dns_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.dns_name = input;
        self
    }
    /// <p>The DNS name.</p>
    pub fn get_dns_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.dns_name
    }
    /// Appends an item to `subnet_ids`.
    ///
    /// To override the contents of this collection use [`set_subnet_ids`](Self::set_subnet_ids).
    ///
    /// <p>The subnet IDs.</p>
    pub fn subnet_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.subnet_ids.unwrap_or_default();
        v.push(input.into());
        self.subnet_ids = ::std::option::Option::Some(v);
        self
    }
    /// <p>The subnet IDs.</p>
    pub fn set_subnet_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.subnet_ids = input;
        self
    }
    /// <p>The subnet IDs.</p>
    pub fn get_subnet_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.subnet_ids
    }
    /// Appends an item to `security_group_ids`.
    ///
    /// To override the contents of this collection use [`set_security_group_ids`](Self::set_security_group_ids).
    ///
    /// <p>The security group IDs for the license endpoint.</p>
    pub fn security_group_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.security_group_ids.unwrap_or_default();
        v.push(input.into());
        self.security_group_ids = ::std::option::Option::Some(v);
        self
    }
    /// <p>The security group IDs for the license endpoint.</p>
    pub fn set_security_group_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.security_group_ids = input;
        self
    }
    /// <p>The security group IDs for the license endpoint.</p>
    pub fn get_security_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.security_group_ids
    }
    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 [`GetLicenseEndpointOutput`](crate::operation::get_license_endpoint::GetLicenseEndpointOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`license_endpoint_id`](crate::operation::get_license_endpoint::builders::GetLicenseEndpointOutputBuilder::license_endpoint_id)
    /// - [`status`](crate::operation::get_license_endpoint::builders::GetLicenseEndpointOutputBuilder::status)
    /// - [`status_message`](crate::operation::get_license_endpoint::builders::GetLicenseEndpointOutputBuilder::status_message)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_license_endpoint::GetLicenseEndpointOutput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::get_license_endpoint::GetLicenseEndpointOutput {
            license_endpoint_id: self.license_endpoint_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "license_endpoint_id",
                    "license_endpoint_id was not specified but it is required when building GetLicenseEndpointOutput",
                )
            })?,
            status: self.status.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "status",
                    "status was not specified but it is required when building GetLicenseEndpointOutput",
                )
            })?,
            status_message: self.status_message.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "status_message",
                    "status_message was not specified but it is required when building GetLicenseEndpointOutput",
                )
            })?,
            vpc_id: self.vpc_id,
            dns_name: self.dns_name,
            subnet_ids: self.subnet_ids,
            security_group_ids: self.security_group_ids,
            _request_id: self._request_id,
        })
    }
}