aws_sdk_codeguruprofiler/operation/get_profile/
_get_profile_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The structure representing the getProfileRequest.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct GetProfileInput {
7    /// <p>The name of the profiling group to get.</p>
8    pub profiling_group_name: ::std::option::Option<::std::string::String>,
9    /// <p>The start time of the profile to get. Specify using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.</p>
10    /// <p>If you specify <code>startTime</code>, then you must also specify <code>period</code> or <code>endTime</code>, but not both.</p>
11    pub start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
12    /// <p>Used with <code>startTime</code> or <code>endTime</code> to specify the time range for the returned aggregated profile. Specify using the ISO 8601 format. For example, <code>P1DT1H1M1S</code>.</p>
13    /// <p>To get the latest aggregated profile, specify only <code>period</code>.</p>
14    pub period: ::std::option::Option<::std::string::String>,
15    /// <p>The end time of the requested profile. Specify using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.</p>
16    /// <p>If you specify <code>endTime</code>, then you must also specify <code>period</code> or <code>startTime</code>, but not both.</p>
17    pub end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
18    /// <p>The maximum depth of the stacks in the code that is represented in the aggregated profile. For example, if CodeGuru Profiler finds a method <code>A</code>, which calls method <code>B</code>, which calls method <code>C</code>, which calls method <code>D</code>, then the depth is 4. If the <code>maxDepth</code> is set to 2, then the aggregated profile contains representations of methods <code>A</code> and <code>B</code>.</p>
19    pub max_depth: ::std::option::Option<i32>,
20    /// <p>The format of the returned 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>
21    /// <ul>
22    /// <li>
23    /// <p><code>application/json</code> — standard JSON format</p></li>
24    /// <li>
25    /// <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>
26    /// </ul>
27    pub accept: ::std::option::Option<::std::string::String>,
28}
29impl GetProfileInput {
30    /// <p>The name of the profiling group to get.</p>
31    pub fn profiling_group_name(&self) -> ::std::option::Option<&str> {
32        self.profiling_group_name.as_deref()
33    }
34    /// <p>The start time of the profile to get. Specify using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.</p>
35    /// <p>If you specify <code>startTime</code>, then you must also specify <code>period</code> or <code>endTime</code>, but not both.</p>
36    pub fn start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
37        self.start_time.as_ref()
38    }
39    /// <p>Used with <code>startTime</code> or <code>endTime</code> to specify the time range for the returned aggregated profile. Specify using the ISO 8601 format. For example, <code>P1DT1H1M1S</code>.</p>
40    /// <p>To get the latest aggregated profile, specify only <code>period</code>.</p>
41    pub fn period(&self) -> ::std::option::Option<&str> {
42        self.period.as_deref()
43    }
44    /// <p>The end time of the requested profile. Specify using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.</p>
45    /// <p>If you specify <code>endTime</code>, then you must also specify <code>period</code> or <code>startTime</code>, but not both.</p>
46    pub fn end_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
47        self.end_time.as_ref()
48    }
49    /// <p>The maximum depth of the stacks in the code that is represented in the aggregated profile. For example, if CodeGuru Profiler finds a method <code>A</code>, which calls method <code>B</code>, which calls method <code>C</code>, which calls method <code>D</code>, then the depth is 4. If the <code>maxDepth</code> is set to 2, then the aggregated profile contains representations of methods <code>A</code> and <code>B</code>.</p>
50    pub fn max_depth(&self) -> ::std::option::Option<i32> {
51        self.max_depth
52    }
53    /// <p>The format of the returned 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>
54    /// <ul>
55    /// <li>
56    /// <p><code>application/json</code> — standard JSON format</p></li>
57    /// <li>
58    /// <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>
59    /// </ul>
60    pub fn accept(&self) -> ::std::option::Option<&str> {
61        self.accept.as_deref()
62    }
63}
64impl GetProfileInput {
65    /// Creates a new builder-style object to manufacture [`GetProfileInput`](crate::operation::get_profile::GetProfileInput).
66    pub fn builder() -> crate::operation::get_profile::builders::GetProfileInputBuilder {
67        crate::operation::get_profile::builders::GetProfileInputBuilder::default()
68    }
69}
70
71/// A builder for [`GetProfileInput`](crate::operation::get_profile::GetProfileInput).
72#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
73#[non_exhaustive]
74pub struct GetProfileInputBuilder {
75    pub(crate) profiling_group_name: ::std::option::Option<::std::string::String>,
76    pub(crate) start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
77    pub(crate) period: ::std::option::Option<::std::string::String>,
78    pub(crate) end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
79    pub(crate) max_depth: ::std::option::Option<i32>,
80    pub(crate) accept: ::std::option::Option<::std::string::String>,
81}
82impl GetProfileInputBuilder {
83    /// <p>The name of the profiling group to get.</p>
84    /// This field is required.
85    pub fn profiling_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
86        self.profiling_group_name = ::std::option::Option::Some(input.into());
87        self
88    }
89    /// <p>The name of the profiling group to get.</p>
90    pub fn set_profiling_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
91        self.profiling_group_name = input;
92        self
93    }
94    /// <p>The name of the profiling group to get.</p>
95    pub fn get_profiling_group_name(&self) -> &::std::option::Option<::std::string::String> {
96        &self.profiling_group_name
97    }
98    /// <p>The start time of the profile to get. Specify using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.</p>
99    /// <p>If you specify <code>startTime</code>, then you must also specify <code>period</code> or <code>endTime</code>, but not both.</p>
100    pub fn start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
101        self.start_time = ::std::option::Option::Some(input);
102        self
103    }
104    /// <p>The start time of the profile to get. Specify using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.</p>
105    /// <p>If you specify <code>startTime</code>, then you must also specify <code>period</code> or <code>endTime</code>, but not both.</p>
106    pub fn set_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
107        self.start_time = input;
108        self
109    }
110    /// <p>The start time of the profile to get. Specify using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.</p>
111    /// <p>If you specify <code>startTime</code>, then you must also specify <code>period</code> or <code>endTime</code>, but not both.</p>
112    pub fn get_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
113        &self.start_time
114    }
115    /// <p>Used with <code>startTime</code> or <code>endTime</code> to specify the time range for the returned aggregated profile. Specify using the ISO 8601 format. For example, <code>P1DT1H1M1S</code>.</p>
116    /// <p>To get the latest aggregated profile, specify only <code>period</code>.</p>
117    pub fn period(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
118        self.period = ::std::option::Option::Some(input.into());
119        self
120    }
121    /// <p>Used with <code>startTime</code> or <code>endTime</code> to specify the time range for the returned aggregated profile. Specify using the ISO 8601 format. For example, <code>P1DT1H1M1S</code>.</p>
122    /// <p>To get the latest aggregated profile, specify only <code>period</code>.</p>
123    pub fn set_period(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
124        self.period = input;
125        self
126    }
127    /// <p>Used with <code>startTime</code> or <code>endTime</code> to specify the time range for the returned aggregated profile. Specify using the ISO 8601 format. For example, <code>P1DT1H1M1S</code>.</p>
128    /// <p>To get the latest aggregated profile, specify only <code>period</code>.</p>
129    pub fn get_period(&self) -> &::std::option::Option<::std::string::String> {
130        &self.period
131    }
132    /// <p>The end time of the requested profile. Specify using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.</p>
133    /// <p>If you specify <code>endTime</code>, then you must also specify <code>period</code> or <code>startTime</code>, but not both.</p>
134    pub fn end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
135        self.end_time = ::std::option::Option::Some(input);
136        self
137    }
138    /// <p>The end time of the requested profile. Specify using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.</p>
139    /// <p>If you specify <code>endTime</code>, then you must also specify <code>period</code> or <code>startTime</code>, but not both.</p>
140    pub fn set_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
141        self.end_time = input;
142        self
143    }
144    /// <p>The end time of the requested profile. Specify using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.</p>
145    /// <p>If you specify <code>endTime</code>, then you must also specify <code>period</code> or <code>startTime</code>, but not both.</p>
146    pub fn get_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
147        &self.end_time
148    }
149    /// <p>The maximum depth of the stacks in the code that is represented in the aggregated profile. For example, if CodeGuru Profiler finds a method <code>A</code>, which calls method <code>B</code>, which calls method <code>C</code>, which calls method <code>D</code>, then the depth is 4. If the <code>maxDepth</code> is set to 2, then the aggregated profile contains representations of methods <code>A</code> and <code>B</code>.</p>
150    pub fn max_depth(mut self, input: i32) -> Self {
151        self.max_depth = ::std::option::Option::Some(input);
152        self
153    }
154    /// <p>The maximum depth of the stacks in the code that is represented in the aggregated profile. For example, if CodeGuru Profiler finds a method <code>A</code>, which calls method <code>B</code>, which calls method <code>C</code>, which calls method <code>D</code>, then the depth is 4. If the <code>maxDepth</code> is set to 2, then the aggregated profile contains representations of methods <code>A</code> and <code>B</code>.</p>
155    pub fn set_max_depth(mut self, input: ::std::option::Option<i32>) -> Self {
156        self.max_depth = input;
157        self
158    }
159    /// <p>The maximum depth of the stacks in the code that is represented in the aggregated profile. For example, if CodeGuru Profiler finds a method <code>A</code>, which calls method <code>B</code>, which calls method <code>C</code>, which calls method <code>D</code>, then the depth is 4. If the <code>maxDepth</code> is set to 2, then the aggregated profile contains representations of methods <code>A</code> and <code>B</code>.</p>
160    pub fn get_max_depth(&self) -> &::std::option::Option<i32> {
161        &self.max_depth
162    }
163    /// <p>The format of the returned 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>
164    /// <ul>
165    /// <li>
166    /// <p><code>application/json</code> — standard JSON format</p></li>
167    /// <li>
168    /// <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>
169    /// </ul>
170    pub fn accept(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
171        self.accept = ::std::option::Option::Some(input.into());
172        self
173    }
174    /// <p>The format of the returned 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>
175    /// <ul>
176    /// <li>
177    /// <p><code>application/json</code> — standard JSON format</p></li>
178    /// <li>
179    /// <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>
180    /// </ul>
181    pub fn set_accept(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
182        self.accept = input;
183        self
184    }
185    /// <p>The format of the returned 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>
186    /// <ul>
187    /// <li>
188    /// <p><code>application/json</code> — standard JSON format</p></li>
189    /// <li>
190    /// <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>
191    /// </ul>
192    pub fn get_accept(&self) -> &::std::option::Option<::std::string::String> {
193        &self.accept
194    }
195    /// Consumes the builder and constructs a [`GetProfileInput`](crate::operation::get_profile::GetProfileInput).
196    pub fn build(self) -> ::std::result::Result<crate::operation::get_profile::GetProfileInput, ::aws_smithy_types::error::operation::BuildError> {
197        ::std::result::Result::Ok(crate::operation::get_profile::GetProfileInput {
198            profiling_group_name: self.profiling_group_name,
199            start_time: self.start_time,
200            period: self.period,
201            end_time: self.end_time,
202            max_depth: self.max_depth,
203            accept: self.accept,
204        })
205    }
206}