aws-sdk-groundstation 1.6.0

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

/// <p></p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ListContactsInput {
    /// <p>Maximum number of contacts returned.</p>
    pub max_results: ::std::option::Option<i32>,
    /// <p>Next token returned in the request of a previous <code>ListContacts</code> call. Used to get the next page of results.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
    /// <p>Status of a contact reservation.</p>
    pub status_list: ::std::option::Option<::std::vec::Vec<crate::types::ContactStatus>>,
    /// <p>Start time of a contact in UTC.</p>
    pub start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>End time of a contact in UTC.</p>
    pub end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>Name of a ground station.</p>
    pub ground_station: ::std::option::Option<::std::string::String>,
    /// <p>ARN of a satellite.</p>
    pub satellite_arn: ::std::option::Option<::std::string::String>,
    /// <p>ARN of a mission profile.</p>
    pub mission_profile_arn: ::std::option::Option<::std::string::String>,
}
impl ListContactsInput {
    /// <p>Maximum number of contacts returned.</p>
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
    /// <p>Next token returned in the request of a previous <code>ListContacts</code> call. Used to get the next page of results.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// <p>Status of a contact reservation.</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 `.status_list.is_none()`.
    pub fn status_list(&self) -> &[crate::types::ContactStatus] {
        self.status_list.as_deref().unwrap_or_default()
    }
    /// <p>Start time of a contact in UTC.</p>
    pub fn start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.start_time.as_ref()
    }
    /// <p>End time of a contact in UTC.</p>
    pub fn end_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.end_time.as_ref()
    }
    /// <p>Name of a ground station.</p>
    pub fn ground_station(&self) -> ::std::option::Option<&str> {
        self.ground_station.as_deref()
    }
    /// <p>ARN of a satellite.</p>
    pub fn satellite_arn(&self) -> ::std::option::Option<&str> {
        self.satellite_arn.as_deref()
    }
    /// <p>ARN of a mission profile.</p>
    pub fn mission_profile_arn(&self) -> ::std::option::Option<&str> {
        self.mission_profile_arn.as_deref()
    }
}
impl ListContactsInput {
    /// Creates a new builder-style object to manufacture [`ListContactsInput`](crate::operation::list_contacts::ListContactsInput).
    pub fn builder() -> crate::operation::list_contacts::builders::ListContactsInputBuilder {
        crate::operation::list_contacts::builders::ListContactsInputBuilder::default()
    }
}

/// A builder for [`ListContactsInput`](crate::operation::list_contacts::ListContactsInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ListContactsInputBuilder {
    pub(crate) max_results: ::std::option::Option<i32>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    pub(crate) status_list: ::std::option::Option<::std::vec::Vec<crate::types::ContactStatus>>,
    pub(crate) start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) ground_station: ::std::option::Option<::std::string::String>,
    pub(crate) satellite_arn: ::std::option::Option<::std::string::String>,
    pub(crate) mission_profile_arn: ::std::option::Option<::std::string::String>,
}
impl ListContactsInputBuilder {
    /// <p>Maximum number of contacts returned.</p>
    pub fn max_results(mut self, input: i32) -> Self {
        self.max_results = ::std::option::Option::Some(input);
        self
    }
    /// <p>Maximum number of contacts returned.</p>
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_results = input;
        self
    }
    /// <p>Maximum number of contacts returned.</p>
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// <p>Next token returned in the request of a previous <code>ListContacts</code> call. Used to get the next page of results.</p>
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.next_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Next token returned in the request of a previous <code>ListContacts</code> call. Used to get the next page of results.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>Next token returned in the request of a previous <code>ListContacts</code> call. Used to get the next page of results.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// Appends an item to `status_list`.
    ///
    /// To override the contents of this collection use [`set_status_list`](Self::set_status_list).
    ///
    /// <p>Status of a contact reservation.</p>
    pub fn status_list(mut self, input: crate::types::ContactStatus) -> Self {
        let mut v = self.status_list.unwrap_or_default();
        v.push(input);
        self.status_list = ::std::option::Option::Some(v);
        self
    }
    /// <p>Status of a contact reservation.</p>
    pub fn set_status_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ContactStatus>>) -> Self {
        self.status_list = input;
        self
    }
    /// <p>Status of a contact reservation.</p>
    pub fn get_status_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ContactStatus>> {
        &self.status_list
    }
    /// <p>Start time of a contact in UTC.</p>
    /// This field is required.
    pub fn start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.start_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>Start time of a contact in UTC.</p>
    pub fn set_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.start_time = input;
        self
    }
    /// <p>Start time of a contact in UTC.</p>
    pub fn get_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.start_time
    }
    /// <p>End time of a contact in UTC.</p>
    /// This field is required.
    pub fn end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.end_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>End time of a contact in UTC.</p>
    pub fn set_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.end_time = input;
        self
    }
    /// <p>End time of a contact in UTC.</p>
    pub fn get_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.end_time
    }
    /// <p>Name of a ground station.</p>
    pub fn ground_station(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.ground_station = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Name of a ground station.</p>
    pub fn set_ground_station(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.ground_station = input;
        self
    }
    /// <p>Name of a ground station.</p>
    pub fn get_ground_station(&self) -> &::std::option::Option<::std::string::String> {
        &self.ground_station
    }
    /// <p>ARN of a satellite.</p>
    pub fn satellite_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.satellite_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>ARN of a satellite.</p>
    pub fn set_satellite_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.satellite_arn = input;
        self
    }
    /// <p>ARN of a satellite.</p>
    pub fn get_satellite_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.satellite_arn
    }
    /// <p>ARN of a mission profile.</p>
    pub fn mission_profile_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.mission_profile_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>ARN of a mission profile.</p>
    pub fn set_mission_profile_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.mission_profile_arn = input;
        self
    }
    /// <p>ARN of a mission profile.</p>
    pub fn get_mission_profile_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.mission_profile_arn
    }
    /// Consumes the builder and constructs a [`ListContactsInput`](crate::operation::list_contacts::ListContactsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::list_contacts::ListContactsInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::list_contacts::ListContactsInput {
            max_results: self.max_results,
            next_token: self.next_token,
            status_list: self.status_list,
            start_time: self.start_time,
            end_time: self.end_time,
            ground_station: self.ground_station,
            satellite_arn: self.satellite_arn,
            mission_profile_arn: self.mission_profile_arn,
        })
    }
}