aws-sdk-amplify 1.107.0

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

/// <p>The request structure for the generate access logs request.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GenerateAccessLogsInput {
    /// <p>The time at which the logs should start. The time range specified is inclusive of the start time.</p>
    pub start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The time at which the logs should end. The time range specified is inclusive of the end time.</p>
    pub end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The name of the domain.</p>
    pub domain_name: ::std::option::Option<::std::string::String>,
    /// <p>The unique ID for an Amplify app.</p>
    pub app_id: ::std::option::Option<::std::string::String>,
}
impl GenerateAccessLogsInput {
    /// <p>The time at which the logs should start. The time range specified is inclusive of the start time.</p>
    pub fn start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.start_time.as_ref()
    }
    /// <p>The time at which the logs should end. The time range specified is inclusive of the end time.</p>
    pub fn end_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.end_time.as_ref()
    }
    /// <p>The name of the domain.</p>
    pub fn domain_name(&self) -> ::std::option::Option<&str> {
        self.domain_name.as_deref()
    }
    /// <p>The unique ID for an Amplify app.</p>
    pub fn app_id(&self) -> ::std::option::Option<&str> {
        self.app_id.as_deref()
    }
}
impl GenerateAccessLogsInput {
    /// Creates a new builder-style object to manufacture [`GenerateAccessLogsInput`](crate::operation::generate_access_logs::GenerateAccessLogsInput).
    pub fn builder() -> crate::operation::generate_access_logs::builders::GenerateAccessLogsInputBuilder {
        crate::operation::generate_access_logs::builders::GenerateAccessLogsInputBuilder::default()
    }
}

/// A builder for [`GenerateAccessLogsInput`](crate::operation::generate_access_logs::GenerateAccessLogsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GenerateAccessLogsInputBuilder {
    pub(crate) start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) domain_name: ::std::option::Option<::std::string::String>,
    pub(crate) app_id: ::std::option::Option<::std::string::String>,
}
impl GenerateAccessLogsInputBuilder {
    /// <p>The time at which the logs should start. The time range specified is inclusive of the start time.</p>
    pub fn start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.start_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time at which the logs should start. The time range specified is inclusive of the start time.</p>
    pub fn set_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.start_time = input;
        self
    }
    /// <p>The time at which the logs should start. The time range specified is inclusive of the start time.</p>
    pub fn get_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.start_time
    }
    /// <p>The time at which the logs should end. The time range specified is inclusive of the end time.</p>
    pub fn end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.end_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time at which the logs should end. The time range specified is inclusive of the end time.</p>
    pub fn set_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.end_time = input;
        self
    }
    /// <p>The time at which the logs should end. The time range specified is inclusive of the end time.</p>
    pub fn get_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.end_time
    }
    /// <p>The name of the domain.</p>
    /// This field is required.
    pub fn domain_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.domain_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the domain.</p>
    pub fn set_domain_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain_name = input;
        self
    }
    /// <p>The name of the domain.</p>
    pub fn get_domain_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_name
    }
    /// <p>The unique ID for an Amplify app.</p>
    /// This field is required.
    pub fn app_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.app_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique ID for an Amplify app.</p>
    pub fn set_app_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.app_id = input;
        self
    }
    /// <p>The unique ID for an Amplify app.</p>
    pub fn get_app_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.app_id
    }
    /// Consumes the builder and constructs a [`GenerateAccessLogsInput`](crate::operation::generate_access_logs::GenerateAccessLogsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::generate_access_logs::GenerateAccessLogsInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::generate_access_logs::GenerateAccessLogsInput {
            start_time: self.start_time,
            end_time: self.end_time,
            domain_name: self.domain_name,
            app_id: self.app_id,
        })
    }
}