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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The structure representing the postAgentProfileRequest.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct PostAgentProfileInput {
/// <p>The name of the profiling group with the aggregated profile that receives the submitted profiling data.</p>
pub profiling_group_name: ::std::option::Option<::std::string::String>,
/// <p>The submitted profiling data.</p>
pub agent_profile: ::std::option::Option<::aws_smithy_types::Blob>,
/// <p>Amazon CodeGuru Profiler uses this universally unique identifier (UUID) to prevent the accidental submission of duplicate profiling data if there are failures and retries.</p>
pub profile_token: ::std::option::Option<::std::string::String>,
/// <p>The format of the submitted profiling data. The format maps to the <code>Accept</code> and <code>Content-Type</code> headers of the HTTP request. You can specify one of the following: or the default .</p>
/// <ul>
/// <li>
/// <p><code>application/json</code> — standard JSON format</p></li>
/// <li>
/// <p><code>application/x-amzn-ion</code> — the Amazon Ion data format. For more information, see <a href="http://amzn.github.io/ion-docs/">Amazon Ion</a>.</p></li>
/// </ul>
pub content_type: ::std::option::Option<::std::string::String>,
}
impl PostAgentProfileInput {
/// <p>The name of the profiling group with the aggregated profile that receives the submitted profiling data.</p>
pub fn profiling_group_name(&self) -> ::std::option::Option<&str> {
self.profiling_group_name.as_deref()
}
/// <p>The submitted profiling data.</p>
pub fn agent_profile(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
self.agent_profile.as_ref()
}
/// <p>Amazon CodeGuru Profiler uses this universally unique identifier (UUID) to prevent the accidental submission of duplicate profiling data if there are failures and retries.</p>
pub fn profile_token(&self) -> ::std::option::Option<&str> {
self.profile_token.as_deref()
}
/// <p>The format of the submitted profiling data. The format maps to the <code>Accept</code> and <code>Content-Type</code> headers of the HTTP request. You can specify one of the following: or the default .</p>
/// <ul>
/// <li>
/// <p><code>application/json</code> — standard JSON format</p></li>
/// <li>
/// <p><code>application/x-amzn-ion</code> — the Amazon Ion data format. For more information, see <a href="http://amzn.github.io/ion-docs/">Amazon Ion</a>.</p></li>
/// </ul>
pub fn content_type(&self) -> ::std::option::Option<&str> {
self.content_type.as_deref()
}
}
impl PostAgentProfileInput {
/// Creates a new builder-style object to manufacture [`PostAgentProfileInput`](crate::operation::post_agent_profile::PostAgentProfileInput).
pub fn builder() -> crate::operation::post_agent_profile::builders::PostAgentProfileInputBuilder {
crate::operation::post_agent_profile::builders::PostAgentProfileInputBuilder::default()
}
}
/// A builder for [`PostAgentProfileInput`](crate::operation::post_agent_profile::PostAgentProfileInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PostAgentProfileInputBuilder {
pub(crate) profiling_group_name: ::std::option::Option<::std::string::String>,
pub(crate) agent_profile: ::std::option::Option<::aws_smithy_types::Blob>,
pub(crate) profile_token: ::std::option::Option<::std::string::String>,
pub(crate) content_type: ::std::option::Option<::std::string::String>,
}
impl PostAgentProfileInputBuilder {
/// <p>The name of the profiling group with the aggregated profile that receives the submitted profiling data.</p>
/// This field is required.
pub fn profiling_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.profiling_group_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the profiling group with the aggregated profile that receives the submitted profiling data.</p>
pub fn set_profiling_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.profiling_group_name = input;
self
}
/// <p>The name of the profiling group with the aggregated profile that receives the submitted profiling data.</p>
pub fn get_profiling_group_name(&self) -> &::std::option::Option<::std::string::String> {
&self.profiling_group_name
}
/// <p>The submitted profiling data.</p>
/// This field is required.
pub fn agent_profile(mut self, input: ::aws_smithy_types::Blob) -> Self {
self.agent_profile = ::std::option::Option::Some(input);
self
}
/// <p>The submitted profiling data.</p>
pub fn set_agent_profile(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
self.agent_profile = input;
self
}
/// <p>The submitted profiling data.</p>
pub fn get_agent_profile(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
&self.agent_profile
}
/// <p>Amazon CodeGuru Profiler uses this universally unique identifier (UUID) to prevent the accidental submission of duplicate profiling data if there are failures and retries.</p>
pub fn profile_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.profile_token = ::std::option::Option::Some(input.into());
self
}
/// <p>Amazon CodeGuru Profiler uses this universally unique identifier (UUID) to prevent the accidental submission of duplicate profiling data if there are failures and retries.</p>
pub fn set_profile_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.profile_token = input;
self
}
/// <p>Amazon CodeGuru Profiler uses this universally unique identifier (UUID) to prevent the accidental submission of duplicate profiling data if there are failures and retries.</p>
pub fn get_profile_token(&self) -> &::std::option::Option<::std::string::String> {
&self.profile_token
}
/// <p>The format of the submitted profiling data. The format maps to the <code>Accept</code> and <code>Content-Type</code> headers of the HTTP request. You can specify one of the following: or the default .</p>
/// <ul>
/// <li>
/// <p><code>application/json</code> — standard JSON format</p></li>
/// <li>
/// <p><code>application/x-amzn-ion</code> — the Amazon Ion data format. For more information, see <a href="http://amzn.github.io/ion-docs/">Amazon Ion</a>.</p></li>
/// </ul>
/// This field is required.
pub fn content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.content_type = ::std::option::Option::Some(input.into());
self
}
/// <p>The format of the submitted profiling data. The format maps to the <code>Accept</code> and <code>Content-Type</code> headers of the HTTP request. You can specify one of the following: or the default .</p>
/// <ul>
/// <li>
/// <p><code>application/json</code> — standard JSON format</p></li>
/// <li>
/// <p><code>application/x-amzn-ion</code> — the Amazon Ion data format. For more information, see <a href="http://amzn.github.io/ion-docs/">Amazon Ion</a>.</p></li>
/// </ul>
pub fn set_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.content_type = input;
self
}
/// <p>The format of the submitted profiling data. The format maps to the <code>Accept</code> and <code>Content-Type</code> headers of the HTTP request. You can specify one of the following: or the default .</p>
/// <ul>
/// <li>
/// <p><code>application/json</code> — standard JSON format</p></li>
/// <li>
/// <p><code>application/x-amzn-ion</code> — the Amazon Ion data format. For more information, see <a href="http://amzn.github.io/ion-docs/">Amazon Ion</a>.</p></li>
/// </ul>
pub fn get_content_type(&self) -> &::std::option::Option<::std::string::String> {
&self.content_type
}
/// Consumes the builder and constructs a [`PostAgentProfileInput`](crate::operation::post_agent_profile::PostAgentProfileInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::post_agent_profile::PostAgentProfileInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::post_agent_profile::PostAgentProfileInput {
profiling_group_name: self.profiling_group_name,
agent_profile: self.agent_profile,
profile_token: self.profile_token,
content_type: self.content_type,
})
}
}