aws_sdk_kinesisanalyticsv2/operation/start_application/
_start_application_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct StartApplicationInput {
6    /// <p>The name of the application.</p>
7    pub application_name: ::std::option::Option<::std::string::String>,
8    /// <p>Identifies the run configuration (start parameters) of a Managed Service for Apache Flink application.</p>
9    pub run_configuration: ::std::option::Option<crate::types::RunConfiguration>,
10}
11impl StartApplicationInput {
12    /// <p>The name of the application.</p>
13    pub fn application_name(&self) -> ::std::option::Option<&str> {
14        self.application_name.as_deref()
15    }
16    /// <p>Identifies the run configuration (start parameters) of a Managed Service for Apache Flink application.</p>
17    pub fn run_configuration(&self) -> ::std::option::Option<&crate::types::RunConfiguration> {
18        self.run_configuration.as_ref()
19    }
20}
21impl StartApplicationInput {
22    /// Creates a new builder-style object to manufacture [`StartApplicationInput`](crate::operation::start_application::StartApplicationInput).
23    pub fn builder() -> crate::operation::start_application::builders::StartApplicationInputBuilder {
24        crate::operation::start_application::builders::StartApplicationInputBuilder::default()
25    }
26}
27
28/// A builder for [`StartApplicationInput`](crate::operation::start_application::StartApplicationInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct StartApplicationInputBuilder {
32    pub(crate) application_name: ::std::option::Option<::std::string::String>,
33    pub(crate) run_configuration: ::std::option::Option<crate::types::RunConfiguration>,
34}
35impl StartApplicationInputBuilder {
36    /// <p>The name of the application.</p>
37    /// This field is required.
38    pub fn application_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.application_name = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <p>The name of the application.</p>
43    pub fn set_application_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.application_name = input;
45        self
46    }
47    /// <p>The name of the application.</p>
48    pub fn get_application_name(&self) -> &::std::option::Option<::std::string::String> {
49        &self.application_name
50    }
51    /// <p>Identifies the run configuration (start parameters) of a Managed Service for Apache Flink application.</p>
52    pub fn run_configuration(mut self, input: crate::types::RunConfiguration) -> Self {
53        self.run_configuration = ::std::option::Option::Some(input);
54        self
55    }
56    /// <p>Identifies the run configuration (start parameters) of a Managed Service for Apache Flink application.</p>
57    pub fn set_run_configuration(mut self, input: ::std::option::Option<crate::types::RunConfiguration>) -> Self {
58        self.run_configuration = input;
59        self
60    }
61    /// <p>Identifies the run configuration (start parameters) of a Managed Service for Apache Flink application.</p>
62    pub fn get_run_configuration(&self) -> &::std::option::Option<crate::types::RunConfiguration> {
63        &self.run_configuration
64    }
65    /// Consumes the builder and constructs a [`StartApplicationInput`](crate::operation::start_application::StartApplicationInput).
66    pub fn build(
67        self,
68    ) -> ::std::result::Result<crate::operation::start_application::StartApplicationInput, ::aws_smithy_types::error::operation::BuildError> {
69        ::std::result::Result::Ok(crate::operation::start_application::StartApplicationInput {
70            application_name: self.application_name,
71            run_configuration: self.run_configuration,
72        })
73    }
74}