aws-sdk-migrationhubrefactorspaces 1.101.0

AWS SDK for AWS Migration Hub Refactor Spaces
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)]
pub struct CreateRouteOutput {
    /// <p>The unique identifier of the route.</p>
    pub route_id: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the route. The format for this ARN is <code>arn:aws:refactor-spaces:<i>region</i>:<i>account-id</i>:<i>resource-type/resource-id</i> </code>. For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html"> Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i>.</p>
    pub arn: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Web Services account ID of the route owner.</p>
    pub owner_account_id: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Web Services account ID of the route creator.</p>
    pub created_by_account_id: ::std::option::Option<::std::string::String>,
    /// <p>The route type of the route.</p>
    pub route_type: ::std::option::Option<crate::types::RouteType>,
    /// <p>The ID of service in which the route is created. Traffic that matches this route is forwarded to this service.</p>
    pub service_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the application in which the route is created.</p>
    pub application_id: ::std::option::Option<::std::string::String>,
    /// <p>Configuration for the URI path route type.</p>
    pub uri_path_route: ::std::option::Option<crate::types::UriPathRouteInput>,
    /// <p>The current state of the route. Activation state only allows <code>ACTIVE</code> or <code>INACTIVE</code> as user inputs. <code>FAILED</code> is a route state that is system generated.</p>
    pub state: ::std::option::Option<crate::types::RouteState>,
    /// <p>The tags assigned to the created route. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>A timestamp that indicates when the route was last updated.</p>
    pub last_updated_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>A timestamp that indicates when the route is created.</p>
    pub created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl CreateRouteOutput {
    /// <p>The unique identifier of the route.</p>
    pub fn route_id(&self) -> ::std::option::Option<&str> {
        self.route_id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the route. The format for this ARN is <code>arn:aws:refactor-spaces:<i>region</i>:<i>account-id</i>:<i>resource-type/resource-id</i> </code>. For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html"> Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i>.</p>
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The Amazon Web Services account ID of the route owner.</p>
    pub fn owner_account_id(&self) -> ::std::option::Option<&str> {
        self.owner_account_id.as_deref()
    }
    /// <p>The Amazon Web Services account ID of the route creator.</p>
    pub fn created_by_account_id(&self) -> ::std::option::Option<&str> {
        self.created_by_account_id.as_deref()
    }
    /// <p>The route type of the route.</p>
    pub fn route_type(&self) -> ::std::option::Option<&crate::types::RouteType> {
        self.route_type.as_ref()
    }
    /// <p>The ID of service in which the route is created. Traffic that matches this route is forwarded to this service.</p>
    pub fn service_id(&self) -> ::std::option::Option<&str> {
        self.service_id.as_deref()
    }
    /// <p>The ID of the application in which the route is created.</p>
    pub fn application_id(&self) -> ::std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>Configuration for the URI path route type.</p>
    pub fn uri_path_route(&self) -> ::std::option::Option<&crate::types::UriPathRouteInput> {
        self.uri_path_route.as_ref()
    }
    /// <p>The current state of the route. Activation state only allows <code>ACTIVE</code> or <code>INACTIVE</code> as user inputs. <code>FAILED</code> is a route state that is system generated.</p>
    pub fn state(&self) -> ::std::option::Option<&crate::types::RouteState> {
        self.state.as_ref()
    }
    /// <p>The tags assigned to the created route. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
    /// <p>A timestamp that indicates when the route was last updated.</p>
    pub fn last_updated_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_updated_time.as_ref()
    }
    /// <p>A timestamp that indicates when the route is created.</p>
    pub fn created_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_time.as_ref()
    }
}
impl ::std::fmt::Debug for CreateRouteOutput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateRouteOutput");
        formatter.field("route_id", &self.route_id);
        formatter.field("arn", &self.arn);
        formatter.field("owner_account_id", &self.owner_account_id);
        formatter.field("created_by_account_id", &self.created_by_account_id);
        formatter.field("route_type", &self.route_type);
        formatter.field("service_id", &self.service_id);
        formatter.field("application_id", &self.application_id);
        formatter.field("uri_path_route", &self.uri_path_route);
        formatter.field("state", &self.state);
        formatter.field("tags", &"*** Sensitive Data Redacted ***");
        formatter.field("last_updated_time", &self.last_updated_time);
        formatter.field("created_time", &self.created_time);
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}
impl ::aws_types::request_id::RequestId for CreateRouteOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl CreateRouteOutput {
    /// Creates a new builder-style object to manufacture [`CreateRouteOutput`](crate::operation::create_route::CreateRouteOutput).
    pub fn builder() -> crate::operation::create_route::builders::CreateRouteOutputBuilder {
        crate::operation::create_route::builders::CreateRouteOutputBuilder::default()
    }
}

/// A builder for [`CreateRouteOutput`](crate::operation::create_route::CreateRouteOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateRouteOutputBuilder {
    pub(crate) route_id: ::std::option::Option<::std::string::String>,
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) owner_account_id: ::std::option::Option<::std::string::String>,
    pub(crate) created_by_account_id: ::std::option::Option<::std::string::String>,
    pub(crate) route_type: ::std::option::Option<crate::types::RouteType>,
    pub(crate) service_id: ::std::option::Option<::std::string::String>,
    pub(crate) application_id: ::std::option::Option<::std::string::String>,
    pub(crate) uri_path_route: ::std::option::Option<crate::types::UriPathRouteInput>,
    pub(crate) state: ::std::option::Option<crate::types::RouteState>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) last_updated_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl CreateRouteOutputBuilder {
    /// <p>The unique identifier of the route.</p>
    pub fn route_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.route_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the route.</p>
    pub fn set_route_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.route_id = input;
        self
    }
    /// <p>The unique identifier of the route.</p>
    pub fn get_route_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.route_id
    }
    /// <p>The Amazon Resource Name (ARN) of the route. The format for this ARN is <code>arn:aws:refactor-spaces:<i>region</i>:<i>account-id</i>:<i>resource-type/resource-id</i> </code>. For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html"> Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i>.</p>
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the route. The format for this ARN is <code>arn:aws:refactor-spaces:<i>region</i>:<i>account-id</i>:<i>resource-type/resource-id</i> </code>. For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html"> Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i>.</p>
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the route. The format for this ARN is <code>arn:aws:refactor-spaces:<i>region</i>:<i>account-id</i>:<i>resource-type/resource-id</i> </code>. For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html"> Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i>.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// <p>The Amazon Web Services account ID of the route owner.</p>
    pub fn owner_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.owner_account_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Web Services account ID of the route owner.</p>
    pub fn set_owner_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.owner_account_id = input;
        self
    }
    /// <p>The Amazon Web Services account ID of the route owner.</p>
    pub fn get_owner_account_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.owner_account_id
    }
    /// <p>The Amazon Web Services account ID of the route creator.</p>
    pub fn created_by_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.created_by_account_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Web Services account ID of the route creator.</p>
    pub fn set_created_by_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.created_by_account_id = input;
        self
    }
    /// <p>The Amazon Web Services account ID of the route creator.</p>
    pub fn get_created_by_account_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.created_by_account_id
    }
    /// <p>The route type of the route.</p>
    pub fn route_type(mut self, input: crate::types::RouteType) -> Self {
        self.route_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The route type of the route.</p>
    pub fn set_route_type(mut self, input: ::std::option::Option<crate::types::RouteType>) -> Self {
        self.route_type = input;
        self
    }
    /// <p>The route type of the route.</p>
    pub fn get_route_type(&self) -> &::std::option::Option<crate::types::RouteType> {
        &self.route_type
    }
    /// <p>The ID of service in which the route is created. Traffic that matches this route is forwarded to this service.</p>
    pub fn service_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.service_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of service in which the route is created. Traffic that matches this route is forwarded to this service.</p>
    pub fn set_service_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.service_id = input;
        self
    }
    /// <p>The ID of service in which the route is created. Traffic that matches this route is forwarded to this service.</p>
    pub fn get_service_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.service_id
    }
    /// <p>The ID of the application in which the route is created.</p>
    pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.application_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the application in which the route is created.</p>
    pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.application_id = input;
        self
    }
    /// <p>The ID of the application in which the route is created.</p>
    pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.application_id
    }
    /// <p>Configuration for the URI path route type.</p>
    pub fn uri_path_route(mut self, input: crate::types::UriPathRouteInput) -> Self {
        self.uri_path_route = ::std::option::Option::Some(input);
        self
    }
    /// <p>Configuration for the URI path route type.</p>
    pub fn set_uri_path_route(mut self, input: ::std::option::Option<crate::types::UriPathRouteInput>) -> Self {
        self.uri_path_route = input;
        self
    }
    /// <p>Configuration for the URI path route type.</p>
    pub fn get_uri_path_route(&self) -> &::std::option::Option<crate::types::UriPathRouteInput> {
        &self.uri_path_route
    }
    /// <p>The current state of the route. Activation state only allows <code>ACTIVE</code> or <code>INACTIVE</code> as user inputs. <code>FAILED</code> is a route state that is system generated.</p>
    pub fn state(mut self, input: crate::types::RouteState) -> Self {
        self.state = ::std::option::Option::Some(input);
        self
    }
    /// <p>The current state of the route. Activation state only allows <code>ACTIVE</code> or <code>INACTIVE</code> as user inputs. <code>FAILED</code> is a route state that is system generated.</p>
    pub fn set_state(mut self, input: ::std::option::Option<crate::types::RouteState>) -> Self {
        self.state = input;
        self
    }
    /// <p>The current state of the route. Activation state only allows <code>ACTIVE</code> or <code>INACTIVE</code> as user inputs. <code>FAILED</code> is a route state that is system generated.</p>
    pub fn get_state(&self) -> &::std::option::Option<crate::types::RouteState> {
        &self.state
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>The tags assigned to the created route. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.</p>
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>The tags assigned to the created route. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>The tags assigned to the created route. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// <p>A timestamp that indicates when the route was last updated.</p>
    pub fn last_updated_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_updated_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>A timestamp that indicates when the route was last updated.</p>
    pub fn set_last_updated_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_updated_time = input;
        self
    }
    /// <p>A timestamp that indicates when the route was last updated.</p>
    pub fn get_last_updated_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_updated_time
    }
    /// <p>A timestamp that indicates when the route is created.</p>
    pub fn created_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>A timestamp that indicates when the route is created.</p>
    pub fn set_created_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_time = input;
        self
    }
    /// <p>A timestamp that indicates when the route is created.</p>
    pub fn get_created_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_time
    }
    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 [`CreateRouteOutput`](crate::operation::create_route::CreateRouteOutput).
    pub fn build(self) -> crate::operation::create_route::CreateRouteOutput {
        crate::operation::create_route::CreateRouteOutput {
            route_id: self.route_id,
            arn: self.arn,
            owner_account_id: self.owner_account_id,
            created_by_account_id: self.created_by_account_id,
            route_type: self.route_type,
            service_id: self.service_id,
            application_id: self.application_id,
            uri_path_route: self.uri_path_route,
            state: self.state,
            tags: self.tags,
            last_updated_time: self.last_updated_time,
            created_time: self.created_time,
            _request_id: self._request_id,
        }
    }
}
impl ::std::fmt::Debug for CreateRouteOutputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateRouteOutputBuilder");
        formatter.field("route_id", &self.route_id);
        formatter.field("arn", &self.arn);
        formatter.field("owner_account_id", &self.owner_account_id);
        formatter.field("created_by_account_id", &self.created_by_account_id);
        formatter.field("route_type", &self.route_type);
        formatter.field("service_id", &self.service_id);
        formatter.field("application_id", &self.application_id);
        formatter.field("uri_path_route", &self.uri_path_route);
        formatter.field("state", &self.state);
        formatter.field("tags", &"*** Sensitive Data Redacted ***");
        formatter.field("last_updated_time", &self.last_updated_time);
        formatter.field("created_time", &self.created_time);
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}