aws-sdk-bedrockagent 1.43.0

AWS SDK for Agents for Amazon Bedrock
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 UpdateFlowAliasInput {
    /// <p>The name of the flow alias.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>A description for the flow alias.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>Contains information about the version to which to map the alias.</p>
    pub routing_configuration: ::std::option::Option<::std::vec::Vec<crate::types::FlowAliasRoutingConfigurationListItem>>,
    /// <p>The unique identifier of the flow.</p>
    pub flow_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The unique identifier of the alias.</p>
    pub alias_identifier: ::std::option::Option<::std::string::String>,
}
impl UpdateFlowAliasInput {
    /// <p>The name of the flow alias.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>A description for the flow alias.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>Contains information about the version to which to map the alias.</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 `.routing_configuration.is_none()`.
    pub fn routing_configuration(&self) -> &[crate::types::FlowAliasRoutingConfigurationListItem] {
        self.routing_configuration.as_deref().unwrap_or_default()
    }
    /// <p>The unique identifier of the flow.</p>
    pub fn flow_identifier(&self) -> ::std::option::Option<&str> {
        self.flow_identifier.as_deref()
    }
    /// <p>The unique identifier of the alias.</p>
    pub fn alias_identifier(&self) -> ::std::option::Option<&str> {
        self.alias_identifier.as_deref()
    }
}
impl UpdateFlowAliasInput {
    /// Creates a new builder-style object to manufacture [`UpdateFlowAliasInput`](crate::operation::update_flow_alias::UpdateFlowAliasInput).
    pub fn builder() -> crate::operation::update_flow_alias::builders::UpdateFlowAliasInputBuilder {
        crate::operation::update_flow_alias::builders::UpdateFlowAliasInputBuilder::default()
    }
}

/// A builder for [`UpdateFlowAliasInput`](crate::operation::update_flow_alias::UpdateFlowAliasInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateFlowAliasInputBuilder {
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) routing_configuration: ::std::option::Option<::std::vec::Vec<crate::types::FlowAliasRoutingConfigurationListItem>>,
    pub(crate) flow_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) alias_identifier: ::std::option::Option<::std::string::String>,
}
impl UpdateFlowAliasInputBuilder {
    /// <p>The name of the flow alias.</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 flow alias.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the flow alias.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>A description for the flow alias.</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>A description for the flow alias.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A description for the flow alias.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// Appends an item to `routing_configuration`.
    ///
    /// To override the contents of this collection use [`set_routing_configuration`](Self::set_routing_configuration).
    ///
    /// <p>Contains information about the version to which to map the alias.</p>
    pub fn routing_configuration(mut self, input: crate::types::FlowAliasRoutingConfigurationListItem) -> Self {
        let mut v = self.routing_configuration.unwrap_or_default();
        v.push(input);
        self.routing_configuration = ::std::option::Option::Some(v);
        self
    }
    /// <p>Contains information about the version to which to map the alias.</p>
    pub fn set_routing_configuration(
        mut self,
        input: ::std::option::Option<::std::vec::Vec<crate::types::FlowAliasRoutingConfigurationListItem>>,
    ) -> Self {
        self.routing_configuration = input;
        self
    }
    /// <p>Contains information about the version to which to map the alias.</p>
    pub fn get_routing_configuration(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FlowAliasRoutingConfigurationListItem>> {
        &self.routing_configuration
    }
    /// <p>The unique identifier of the flow.</p>
    /// This field is required.
    pub fn flow_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.flow_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the flow.</p>
    pub fn set_flow_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.flow_identifier = input;
        self
    }
    /// <p>The unique identifier of the flow.</p>
    pub fn get_flow_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.flow_identifier
    }
    /// <p>The unique identifier of the alias.</p>
    /// This field is required.
    pub fn alias_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.alias_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the alias.</p>
    pub fn set_alias_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.alias_identifier = input;
        self
    }
    /// <p>The unique identifier of the alias.</p>
    pub fn get_alias_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.alias_identifier
    }
    /// Consumes the builder and constructs a [`UpdateFlowAliasInput`](crate::operation::update_flow_alias::UpdateFlowAliasInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_flow_alias::UpdateFlowAliasInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_flow_alias::UpdateFlowAliasInput {
            name: self.name,
            description: self.description,
            routing_configuration: self.routing_configuration,
            flow_identifier: self.flow_identifier,
            alias_identifier: self.alias_identifier,
        })
    }
}