aws-sdk-continuum 1.0.0

AWS SDK for AWS Continuum
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// Contains the current state of the updated S3 integration. The sensitive external ID is omitted.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateIntegrationOutput {
    /// The unique identifier for an Integration resource.
    pub integration_id: ::std::string::String,
    /// The Amazon Resource Name (ARN) of an Integration resource, of the form arn:{partition}:continuum:{region}:{account}:integrations/{integrationId}.
    pub integration_arn: ::std::string::String,
    /// The name for an integration.
    pub name: ::std::string::String,
    /// The immutable provider type for an integration.
    pub integration_type: crate::types::IntegrationType,
    /// Provider-specific details for an integration. Only one member will be present.
    pub provider_details: ::std::option::Option<crate::types::ProviderDetails>,
    /// When the integration was created.
    pub created_at: ::aws_smithy_types::DateTime,
    /// When the integration was last updated.
    pub updated_at: ::aws_smithy_types::DateTime,
    _request_id: Option<String>,
}
impl UpdateIntegrationOutput {
    /// The unique identifier for an Integration resource.
    pub fn integration_id(&self) -> &str {
        use std::ops::Deref;
        self.integration_id.deref()
    }
    /// The Amazon Resource Name (ARN) of an Integration resource, of the form arn:{partition}:continuum:{region}:{account}:integrations/{integrationId}.
    pub fn integration_arn(&self) -> &str {
        use std::ops::Deref;
        self.integration_arn.deref()
    }
    /// The name for an integration.
    pub fn name(&self) -> &str {
        use std::ops::Deref;
        self.name.deref()
    }
    /// The immutable provider type for an integration.
    pub fn integration_type(&self) -> &crate::types::IntegrationType {
        &self.integration_type
    }
    /// Provider-specific details for an integration. Only one member will be present.
    pub fn provider_details(&self) -> ::std::option::Option<&crate::types::ProviderDetails> {
        self.provider_details.as_ref()
    }
    /// When the integration was created.
    pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
        &self.created_at
    }
    /// When the integration was last updated.
    pub fn updated_at(&self) -> &::aws_smithy_types::DateTime {
        &self.updated_at
    }
}
impl ::aws_types::request_id::RequestId for UpdateIntegrationOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl UpdateIntegrationOutput {
    /// Creates a new builder-style object to manufacture [`UpdateIntegrationOutput`](crate::operation::update_integration::UpdateIntegrationOutput).
    pub fn builder() -> crate::operation::update_integration::builders::UpdateIntegrationOutputBuilder {
        crate::operation::update_integration::builders::UpdateIntegrationOutputBuilder::default()
    }
}

/// A builder for [`UpdateIntegrationOutput`](crate::operation::update_integration::UpdateIntegrationOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateIntegrationOutputBuilder {
    pub(crate) integration_id: ::std::option::Option<::std::string::String>,
    pub(crate) integration_arn: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) integration_type: ::std::option::Option<crate::types::IntegrationType>,
    pub(crate) provider_details: ::std::option::Option<crate::types::ProviderDetails>,
    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl UpdateIntegrationOutputBuilder {
    /// The unique identifier for an Integration resource.
    /// This field is required.
    pub fn integration_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.integration_id = ::std::option::Option::Some(input.into());
        self
    }
    /// The unique identifier for an Integration resource.
    pub fn set_integration_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.integration_id = input;
        self
    }
    /// The unique identifier for an Integration resource.
    pub fn get_integration_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.integration_id
    }
    /// The Amazon Resource Name (ARN) of an Integration resource, of the form arn:{partition}:continuum:{region}:{account}:integrations/{integrationId}.
    /// This field is required.
    pub fn integration_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.integration_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// The Amazon Resource Name (ARN) of an Integration resource, of the form arn:{partition}:continuum:{region}:{account}:integrations/{integrationId}.
    pub fn set_integration_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.integration_arn = input;
        self
    }
    /// The Amazon Resource Name (ARN) of an Integration resource, of the form arn:{partition}:continuum:{region}:{account}:integrations/{integrationId}.
    pub fn get_integration_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.integration_arn
    }
    /// The name for an integration.
    /// 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
    }
    /// The name for an integration.
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// The name for an integration.
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// The immutable provider type for an integration.
    /// This field is required.
    pub fn integration_type(mut self, input: crate::types::IntegrationType) -> Self {
        self.integration_type = ::std::option::Option::Some(input);
        self
    }
    /// The immutable provider type for an integration.
    pub fn set_integration_type(mut self, input: ::std::option::Option<crate::types::IntegrationType>) -> Self {
        self.integration_type = input;
        self
    }
    /// The immutable provider type for an integration.
    pub fn get_integration_type(&self) -> &::std::option::Option<crate::types::IntegrationType> {
        &self.integration_type
    }
    /// Provider-specific details for an integration. Only one member will be present.
    /// This field is required.
    pub fn provider_details(mut self, input: crate::types::ProviderDetails) -> Self {
        self.provider_details = ::std::option::Option::Some(input);
        self
    }
    /// Provider-specific details for an integration. Only one member will be present.
    pub fn set_provider_details(mut self, input: ::std::option::Option<crate::types::ProviderDetails>) -> Self {
        self.provider_details = input;
        self
    }
    /// Provider-specific details for an integration. Only one member will be present.
    pub fn get_provider_details(&self) -> &::std::option::Option<crate::types::ProviderDetails> {
        &self.provider_details
    }
    /// When the integration was created.
    /// This field is required.
    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_at = ::std::option::Option::Some(input);
        self
    }
    /// When the integration was created.
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input;
        self
    }
    /// When the integration was created.
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    /// When the integration was last updated.
    /// This field is required.
    pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.updated_at = ::std::option::Option::Some(input);
        self
    }
    /// When the integration was last updated.
    pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.updated_at = input;
        self
    }
    /// When the integration was last updated.
    pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.updated_at
    }
    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 [`UpdateIntegrationOutput`](crate::operation::update_integration::UpdateIntegrationOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`integration_id`](crate::operation::update_integration::builders::UpdateIntegrationOutputBuilder::integration_id)
    /// - [`integration_arn`](crate::operation::update_integration::builders::UpdateIntegrationOutputBuilder::integration_arn)
    /// - [`name`](crate::operation::update_integration::builders::UpdateIntegrationOutputBuilder::name)
    /// - [`integration_type`](crate::operation::update_integration::builders::UpdateIntegrationOutputBuilder::integration_type)
    /// - [`created_at`](crate::operation::update_integration::builders::UpdateIntegrationOutputBuilder::created_at)
    /// - [`updated_at`](crate::operation::update_integration::builders::UpdateIntegrationOutputBuilder::updated_at)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_integration::UpdateIntegrationOutput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_integration::UpdateIntegrationOutput {
            integration_id: self.integration_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "integration_id",
                    "integration_id was not specified but it is required when building UpdateIntegrationOutput",
                )
            })?,
            integration_arn: self.integration_arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "integration_arn",
                    "integration_arn was not specified but it is required when building UpdateIntegrationOutput",
                )
            })?,
            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 UpdateIntegrationOutput",
                )
            })?,
            integration_type: self.integration_type.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "integration_type",
                    "integration_type was not specified but it is required when building UpdateIntegrationOutput",
                )
            })?,
            provider_details: self.provider_details,
            created_at: self.created_at.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "created_at",
                    "created_at was not specified but it is required when building UpdateIntegrationOutput",
                )
            })?,
            updated_at: self.updated_at.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "updated_at",
                    "updated_at was not specified but it is required when building UpdateIntegrationOutput",
                )
            })?,
            _request_id: self._request_id,
        })
    }
}