aws-sdk-datazone 1.137.0

AWS SDK for Amazon DataZone
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 GetEnvironmentActionOutput {
    /// <p>The ID of the Amazon DataZone domain in which the environment action lives.</p>
    pub domain_id: ::std::string::String,
    /// <p>The environment ID of the environment action.</p>
    pub environment_id: ::std::string::String,
    /// <p>The ID of the environment action.</p>
    pub id: ::std::string::String,
    /// <p>The name of the environment action.</p>
    pub name: ::std::string::String,
    /// <p>The parameters of the environment action.</p>
    pub parameters: ::std::option::Option<crate::types::ActionParameters>,
    /// <p>The description of the environment action.</p>
    pub description: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetEnvironmentActionOutput {
    /// <p>The ID of the Amazon DataZone domain in which the environment action lives.</p>
    pub fn domain_id(&self) -> &str {
        use std::ops::Deref;
        self.domain_id.deref()
    }
    /// <p>The environment ID of the environment action.</p>
    pub fn environment_id(&self) -> &str {
        use std::ops::Deref;
        self.environment_id.deref()
    }
    /// <p>The ID of the environment action.</p>
    pub fn id(&self) -> &str {
        use std::ops::Deref;
        self.id.deref()
    }
    /// <p>The name of the environment action.</p>
    pub fn name(&self) -> &str {
        use std::ops::Deref;
        self.name.deref()
    }
    /// <p>The parameters of the environment action.</p>
    pub fn parameters(&self) -> ::std::option::Option<&crate::types::ActionParameters> {
        self.parameters.as_ref()
    }
    /// <p>The description of the environment action.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for GetEnvironmentActionOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetEnvironmentActionOutput {
    /// Creates a new builder-style object to manufacture [`GetEnvironmentActionOutput`](crate::operation::get_environment_action::GetEnvironmentActionOutput).
    pub fn builder() -> crate::operation::get_environment_action::builders::GetEnvironmentActionOutputBuilder {
        crate::operation::get_environment_action::builders::GetEnvironmentActionOutputBuilder::default()
    }
}

/// A builder for [`GetEnvironmentActionOutput`](crate::operation::get_environment_action::GetEnvironmentActionOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetEnvironmentActionOutputBuilder {
    pub(crate) domain_id: ::std::option::Option<::std::string::String>,
    pub(crate) environment_id: ::std::option::Option<::std::string::String>,
    pub(crate) id: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) parameters: ::std::option::Option<crate::types::ActionParameters>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetEnvironmentActionOutputBuilder {
    /// <p>The ID of the Amazon DataZone domain in which the environment action lives.</p>
    /// This field is required.
    pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.domain_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the Amazon DataZone domain in which the environment action lives.</p>
    pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain_id = input;
        self
    }
    /// <p>The ID of the Amazon DataZone domain in which the environment action lives.</p>
    pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_id
    }
    /// <p>The environment ID of the environment action.</p>
    /// This field is required.
    pub fn environment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.environment_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The environment ID of the environment action.</p>
    pub fn set_environment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.environment_id = input;
        self
    }
    /// <p>The environment ID of the environment action.</p>
    pub fn get_environment_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.environment_id
    }
    /// <p>The ID of the environment action.</p>
    /// This field is required.
    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the environment action.</p>
    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.id = input;
        self
    }
    /// <p>The ID of the environment action.</p>
    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.id
    }
    /// <p>The name of the environment action.</p>
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the environment action.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the environment action.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The parameters of the environment action.</p>
    /// This field is required.
    pub fn parameters(mut self, input: crate::types::ActionParameters) -> Self {
        self.parameters = ::std::option::Option::Some(input);
        self
    }
    /// <p>The parameters of the environment action.</p>
    pub fn set_parameters(mut self, input: ::std::option::Option<crate::types::ActionParameters>) -> Self {
        self.parameters = input;
        self
    }
    /// <p>The parameters of the environment action.</p>
    pub fn get_parameters(&self) -> &::std::option::Option<crate::types::ActionParameters> {
        &self.parameters
    }
    /// <p>The description of the environment action.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The description of the environment action.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description of the environment action.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    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 [`GetEnvironmentActionOutput`](crate::operation::get_environment_action::GetEnvironmentActionOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`domain_id`](crate::operation::get_environment_action::builders::GetEnvironmentActionOutputBuilder::domain_id)
    /// - [`environment_id`](crate::operation::get_environment_action::builders::GetEnvironmentActionOutputBuilder::environment_id)
    /// - [`id`](crate::operation::get_environment_action::builders::GetEnvironmentActionOutputBuilder::id)
    /// - [`name`](crate::operation::get_environment_action::builders::GetEnvironmentActionOutputBuilder::name)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_environment_action::GetEnvironmentActionOutput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::get_environment_action::GetEnvironmentActionOutput {
            domain_id: self.domain_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "domain_id",
                    "domain_id was not specified but it is required when building GetEnvironmentActionOutput",
                )
            })?,
            environment_id: self.environment_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "environment_id",
                    "environment_id was not specified but it is required when building GetEnvironmentActionOutput",
                )
            })?,
            id: self.id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "id",
                    "id was not specified but it is required when building GetEnvironmentActionOutput",
                )
            })?,
            name: self.name.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "name",
                    "name was not specified but it is required when building GetEnvironmentActionOutput",
                )
            })?,
            parameters: self.parameters,
            description: self.description,
            _request_id: self._request_id,
        })
    }
}