aws-sdk-greengrass 1.98.0

AWS SDK for AWS Greengrass
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 UpdateFunctionDefinitionInput {
    /// The ID of the Lambda function definition.
    pub function_definition_id: ::std::option::Option<::std::string::String>,
    /// The name of the definition.
    pub name: ::std::option::Option<::std::string::String>,
}
impl UpdateFunctionDefinitionInput {
    /// The ID of the Lambda function definition.
    pub fn function_definition_id(&self) -> ::std::option::Option<&str> {
        self.function_definition_id.as_deref()
    }
    /// The name of the definition.
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
}
impl UpdateFunctionDefinitionInput {
    /// Creates a new builder-style object to manufacture [`UpdateFunctionDefinitionInput`](crate::operation::update_function_definition::UpdateFunctionDefinitionInput).
    pub fn builder() -> crate::operation::update_function_definition::builders::UpdateFunctionDefinitionInputBuilder {
        crate::operation::update_function_definition::builders::UpdateFunctionDefinitionInputBuilder::default()
    }
}

/// A builder for [`UpdateFunctionDefinitionInput`](crate::operation::update_function_definition::UpdateFunctionDefinitionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateFunctionDefinitionInputBuilder {
    pub(crate) function_definition_id: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
}
impl UpdateFunctionDefinitionInputBuilder {
    /// The ID of the Lambda function definition.
    /// This field is required.
    pub fn function_definition_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.function_definition_id = ::std::option::Option::Some(input.into());
        self
    }
    /// The ID of the Lambda function definition.
    pub fn set_function_definition_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.function_definition_id = input;
        self
    }
    /// The ID of the Lambda function definition.
    pub fn get_function_definition_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.function_definition_id
    }
    /// The name of the definition.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// The name of the definition.
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// The name of the definition.
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// Consumes the builder and constructs a [`UpdateFunctionDefinitionInput`](crate::operation::update_function_definition::UpdateFunctionDefinitionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::update_function_definition::UpdateFunctionDefinitionInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::update_function_definition::UpdateFunctionDefinitionInput {
            function_definition_id: self.function_definition_id,
            name: self.name,
        })
    }
}