aws_sdk_novaact/operation/create_session/
_create_session_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 CreateSessionInput {
6    /// <p>The name of the workflow definition containing the workflow run.</p>
7    pub workflow_definition_name: ::std::option::Option<::std::string::String>,
8    /// <p>The unique identifier of the workflow run to create the session in.</p>
9    pub workflow_run_id: ::std::option::Option<::std::string::String>,
10    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
11    pub client_token: ::std::option::Option<::std::string::String>,
12}
13impl CreateSessionInput {
14    /// <p>The name of the workflow definition containing the workflow run.</p>
15    pub fn workflow_definition_name(&self) -> ::std::option::Option<&str> {
16        self.workflow_definition_name.as_deref()
17    }
18    /// <p>The unique identifier of the workflow run to create the session in.</p>
19    pub fn workflow_run_id(&self) -> ::std::option::Option<&str> {
20        self.workflow_run_id.as_deref()
21    }
22    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
23    pub fn client_token(&self) -> ::std::option::Option<&str> {
24        self.client_token.as_deref()
25    }
26}
27impl CreateSessionInput {
28    /// Creates a new builder-style object to manufacture [`CreateSessionInput`](crate::operation::create_session::CreateSessionInput).
29    pub fn builder() -> crate::operation::create_session::builders::CreateSessionInputBuilder {
30        crate::operation::create_session::builders::CreateSessionInputBuilder::default()
31    }
32}
33
34/// A builder for [`CreateSessionInput`](crate::operation::create_session::CreateSessionInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct CreateSessionInputBuilder {
38    pub(crate) workflow_definition_name: ::std::option::Option<::std::string::String>,
39    pub(crate) workflow_run_id: ::std::option::Option<::std::string::String>,
40    pub(crate) client_token: ::std::option::Option<::std::string::String>,
41}
42impl CreateSessionInputBuilder {
43    /// <p>The name of the workflow definition containing the workflow run.</p>
44    /// This field is required.
45    pub fn workflow_definition_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.workflow_definition_name = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>The name of the workflow definition containing the workflow run.</p>
50    pub fn set_workflow_definition_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.workflow_definition_name = input;
52        self
53    }
54    /// <p>The name of the workflow definition containing the workflow run.</p>
55    pub fn get_workflow_definition_name(&self) -> &::std::option::Option<::std::string::String> {
56        &self.workflow_definition_name
57    }
58    /// <p>The unique identifier of the workflow run to create the session in.</p>
59    /// This field is required.
60    pub fn workflow_run_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61        self.workflow_run_id = ::std::option::Option::Some(input.into());
62        self
63    }
64    /// <p>The unique identifier of the workflow run to create the session in.</p>
65    pub fn set_workflow_run_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.workflow_run_id = input;
67        self
68    }
69    /// <p>The unique identifier of the workflow run to create the session in.</p>
70    pub fn get_workflow_run_id(&self) -> &::std::option::Option<::std::string::String> {
71        &self.workflow_run_id
72    }
73    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
74    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75        self.client_token = ::std::option::Option::Some(input.into());
76        self
77    }
78    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
79    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80        self.client_token = input;
81        self
82    }
83    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
84    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
85        &self.client_token
86    }
87    /// Consumes the builder and constructs a [`CreateSessionInput`](crate::operation::create_session::CreateSessionInput).
88    pub fn build(
89        self,
90    ) -> ::std::result::Result<crate::operation::create_session::CreateSessionInput, ::aws_smithy_types::error::operation::BuildError> {
91        ::std::result::Result::Ok(crate::operation::create_session::CreateSessionInput {
92            workflow_definition_name: self.workflow_definition_name,
93            workflow_run_id: self.workflow_run_id,
94            client_token: self.client_token,
95        })
96    }
97}