1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct ChatInput {
/// <p>The chat message to send to the AWS Assurance agent.</p>
pub message: ::std::option::Option<::std::string::String>,
/// <p>The session to continue. Pass the <code>sessionId</code> returned by a previous <code>Chat</code> call to continue that session. If you omit it, AWS Assurance starts a new session. If the session doesn't exist or has expired, the operation returns <code>ResourceNotFoundException</code>. If the format isn't valid, the operation returns <code>ValidationException</code>.</p>
pub session_id: ::std::option::Option<::std::string::String>,
/// <p>The ARN of this governance environment.</p>
pub environment_arn: ::std::option::Option<::std::string::String>,
/// <p>The sequence number of the last message you received. If the service detects a more recent sequence number, the request fails with <code>ConflictException</code>, indicating a concurrent update.</p>
pub expected_sequence_number: ::std::option::Option<i64>,
}
impl ChatInput {
/// <p>The chat message to send to the AWS Assurance agent.</p>
pub fn message(&self) -> ::std::option::Option<&str> {
self.message.as_deref()
}
/// <p>The session to continue. Pass the <code>sessionId</code> returned by a previous <code>Chat</code> call to continue that session. If you omit it, AWS Assurance starts a new session. If the session doesn't exist or has expired, the operation returns <code>ResourceNotFoundException</code>. If the format isn't valid, the operation returns <code>ValidationException</code>.</p>
pub fn session_id(&self) -> ::std::option::Option<&str> {
self.session_id.as_deref()
}
/// <p>The ARN of this governance environment.</p>
pub fn environment_arn(&self) -> ::std::option::Option<&str> {
self.environment_arn.as_deref()
}
/// <p>The sequence number of the last message you received. If the service detects a more recent sequence number, the request fails with <code>ConflictException</code>, indicating a concurrent update.</p>
pub fn expected_sequence_number(&self) -> ::std::option::Option<i64> {
self.expected_sequence_number
}
}
impl ::std::fmt::Debug for ChatInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("ChatInput");
formatter.field("message", &"*** Sensitive Data Redacted ***");
formatter.field("session_id", &self.session_id);
formatter.field("environment_arn", &self.environment_arn);
formatter.field("expected_sequence_number", &self.expected_sequence_number);
formatter.finish()
}
}
impl ChatInput {
/// Creates a new builder-style object to manufacture [`ChatInput`](crate::operation::chat::ChatInput).
pub fn builder() -> crate::operation::chat::builders::ChatInputBuilder {
crate::operation::chat::builders::ChatInputBuilder::default()
}
}
/// A builder for [`ChatInput`](crate::operation::chat::ChatInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct ChatInputBuilder {
pub(crate) message: ::std::option::Option<::std::string::String>,
pub(crate) session_id: ::std::option::Option<::std::string::String>,
pub(crate) environment_arn: ::std::option::Option<::std::string::String>,
pub(crate) expected_sequence_number: ::std::option::Option<i64>,
}
impl ChatInputBuilder {
/// <p>The chat message to send to the AWS Assurance agent.</p>
/// This field is required.
pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.message = ::std::option::Option::Some(input.into());
self
}
/// <p>The chat message to send to the AWS Assurance agent.</p>
pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.message = input;
self
}
/// <p>The chat message to send to the AWS Assurance agent.</p>
pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
&self.message
}
/// <p>The session to continue. Pass the <code>sessionId</code> returned by a previous <code>Chat</code> call to continue that session. If you omit it, AWS Assurance starts a new session. If the session doesn't exist or has expired, the operation returns <code>ResourceNotFoundException</code>. If the format isn't valid, the operation returns <code>ValidationException</code>.</p>
pub fn session_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.session_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The session to continue. Pass the <code>sessionId</code> returned by a previous <code>Chat</code> call to continue that session. If you omit it, AWS Assurance starts a new session. If the session doesn't exist or has expired, the operation returns <code>ResourceNotFoundException</code>. If the format isn't valid, the operation returns <code>ValidationException</code>.</p>
pub fn set_session_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.session_id = input;
self
}
/// <p>The session to continue. Pass the <code>sessionId</code> returned by a previous <code>Chat</code> call to continue that session. If you omit it, AWS Assurance starts a new session. If the session doesn't exist or has expired, the operation returns <code>ResourceNotFoundException</code>. If the format isn't valid, the operation returns <code>ValidationException</code>.</p>
pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> {
&self.session_id
}
/// <p>The ARN of this governance environment.</p>
/// This field is required.
pub fn environment_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.environment_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The ARN of this governance environment.</p>
pub fn set_environment_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.environment_arn = input;
self
}
/// <p>The ARN of this governance environment.</p>
pub fn get_environment_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.environment_arn
}
/// <p>The sequence number of the last message you received. If the service detects a more recent sequence number, the request fails with <code>ConflictException</code>, indicating a concurrent update.</p>
pub fn expected_sequence_number(mut self, input: i64) -> Self {
self.expected_sequence_number = ::std::option::Option::Some(input);
self
}
/// <p>The sequence number of the last message you received. If the service detects a more recent sequence number, the request fails with <code>ConflictException</code>, indicating a concurrent update.</p>
pub fn set_expected_sequence_number(mut self, input: ::std::option::Option<i64>) -> Self {
self.expected_sequence_number = input;
self
}
/// <p>The sequence number of the last message you received. If the service detects a more recent sequence number, the request fails with <code>ConflictException</code>, indicating a concurrent update.</p>
pub fn get_expected_sequence_number(&self) -> &::std::option::Option<i64> {
&self.expected_sequence_number
}
/// Consumes the builder and constructs a [`ChatInput`](crate::operation::chat::ChatInput).
pub fn build(self) -> ::std::result::Result<crate::operation::chat::ChatInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::chat::ChatInput {
message: self.message,
session_id: self.session_id,
environment_arn: self.environment_arn,
expected_sequence_number: self.expected_sequence_number,
})
}
}
impl ::std::fmt::Debug for ChatInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("ChatInputBuilder");
formatter.field("message", &"*** Sensitive Data Redacted ***");
formatter.field("session_id", &self.session_id);
formatter.field("environment_arn", &self.environment_arn);
formatter.field("expected_sequence_number", &self.expected_sequence_number);
formatter.finish()
}
}