aws-sdk-support 1.98.0

AWS SDK for AWS Support
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 DescribeServicesInput {
    /// <p>A JSON-formatted list of service codes available for Amazon Web Services services.</p>
    pub service_code_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The language in which Amazon Web Services Support handles the case. Amazon Web Services Support currently supports Chinese (“zh”), English ("en"), Japanese ("ja") and Korean (“ko”). You must specify the ISO 639-1 code for the <code>language</code> parameter if you want support in that language.</p>
    pub language: ::std::option::Option<::std::string::String>,
}
impl DescribeServicesInput {
    /// <p>A JSON-formatted list of service codes available for Amazon Web Services services.</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 `.service_code_list.is_none()`.
    pub fn service_code_list(&self) -> &[::std::string::String] {
        self.service_code_list.as_deref().unwrap_or_default()
    }
    /// <p>The language in which Amazon Web Services Support handles the case. Amazon Web Services Support currently supports Chinese (“zh”), English ("en"), Japanese ("ja") and Korean (“ko”). You must specify the ISO 639-1 code for the <code>language</code> parameter if you want support in that language.</p>
    pub fn language(&self) -> ::std::option::Option<&str> {
        self.language.as_deref()
    }
}
impl DescribeServicesInput {
    /// Creates a new builder-style object to manufacture [`DescribeServicesInput`](crate::operation::describe_services::DescribeServicesInput).
    pub fn builder() -> crate::operation::describe_services::builders::DescribeServicesInputBuilder {
        crate::operation::describe_services::builders::DescribeServicesInputBuilder::default()
    }
}

/// A builder for [`DescribeServicesInput`](crate::operation::describe_services::DescribeServicesInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeServicesInputBuilder {
    pub(crate) service_code_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) language: ::std::option::Option<::std::string::String>,
}
impl DescribeServicesInputBuilder {
    /// Appends an item to `service_code_list`.
    ///
    /// To override the contents of this collection use [`set_service_code_list`](Self::set_service_code_list).
    ///
    /// <p>A JSON-formatted list of service codes available for Amazon Web Services services.</p>
    pub fn service_code_list(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.service_code_list.unwrap_or_default();
        v.push(input.into());
        self.service_code_list = ::std::option::Option::Some(v);
        self
    }
    /// <p>A JSON-formatted list of service codes available for Amazon Web Services services.</p>
    pub fn set_service_code_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.service_code_list = input;
        self
    }
    /// <p>A JSON-formatted list of service codes available for Amazon Web Services services.</p>
    pub fn get_service_code_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.service_code_list
    }
    /// <p>The language in which Amazon Web Services Support handles the case. Amazon Web Services Support currently supports Chinese (“zh”), English ("en"), Japanese ("ja") and Korean (“ko”). You must specify the ISO 639-1 code for the <code>language</code> parameter if you want support in that language.</p>
    pub fn language(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.language = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The language in which Amazon Web Services Support handles the case. Amazon Web Services Support currently supports Chinese (“zh”), English ("en"), Japanese ("ja") and Korean (“ko”). You must specify the ISO 639-1 code for the <code>language</code> parameter if you want support in that language.</p>
    pub fn set_language(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.language = input;
        self
    }
    /// <p>The language in which Amazon Web Services Support handles the case. Amazon Web Services Support currently supports Chinese (“zh”), English ("en"), Japanese ("ja") and Korean (“ko”). You must specify the ISO 639-1 code for the <code>language</code> parameter if you want support in that language.</p>
    pub fn get_language(&self) -> &::std::option::Option<::std::string::String> {
        &self.language
    }
    /// Consumes the builder and constructs a [`DescribeServicesInput`](crate::operation::describe_services::DescribeServicesInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::describe_services::DescribeServicesInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::describe_services::DescribeServicesInput {
            service_code_list: self.service_code_list,
            language: self.language,
        })
    }
}