aws_sdk_elastictranscoder/operation/create_preset/
_create_preset_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The <code>CreatePresetResponse</code> structure.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreatePresetOutput {
7    /// <p>A section of the response body that provides information about the preset that is created.</p>
8    pub preset: ::std::option::Option<crate::types::Preset>,
9    /// <p>If the preset settings don't comply with the standards for the video codec but Elastic Transcoder created the preset, this message explains the reason the preset settings don't meet the standard. Elastic Transcoder created the preset because the settings might produce acceptable output.</p>
10    pub warning: ::std::option::Option<::std::string::String>,
11    _request_id: Option<String>,
12}
13impl CreatePresetOutput {
14    /// <p>A section of the response body that provides information about the preset that is created.</p>
15    pub fn preset(&self) -> ::std::option::Option<&crate::types::Preset> {
16        self.preset.as_ref()
17    }
18    /// <p>If the preset settings don't comply with the standards for the video codec but Elastic Transcoder created the preset, this message explains the reason the preset settings don't meet the standard. Elastic Transcoder created the preset because the settings might produce acceptable output.</p>
19    pub fn warning(&self) -> ::std::option::Option<&str> {
20        self.warning.as_deref()
21    }
22}
23impl ::aws_types::request_id::RequestId for CreatePresetOutput {
24    fn request_id(&self) -> Option<&str> {
25        self._request_id.as_deref()
26    }
27}
28impl CreatePresetOutput {
29    /// Creates a new builder-style object to manufacture [`CreatePresetOutput`](crate::operation::create_preset::CreatePresetOutput).
30    pub fn builder() -> crate::operation::create_preset::builders::CreatePresetOutputBuilder {
31        crate::operation::create_preset::builders::CreatePresetOutputBuilder::default()
32    }
33}
34
35/// A builder for [`CreatePresetOutput`](crate::operation::create_preset::CreatePresetOutput).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct CreatePresetOutputBuilder {
39    pub(crate) preset: ::std::option::Option<crate::types::Preset>,
40    pub(crate) warning: ::std::option::Option<::std::string::String>,
41    _request_id: Option<String>,
42}
43impl CreatePresetOutputBuilder {
44    /// <p>A section of the response body that provides information about the preset that is created.</p>
45    pub fn preset(mut self, input: crate::types::Preset) -> Self {
46        self.preset = ::std::option::Option::Some(input);
47        self
48    }
49    /// <p>A section of the response body that provides information about the preset that is created.</p>
50    pub fn set_preset(mut self, input: ::std::option::Option<crate::types::Preset>) -> Self {
51        self.preset = input;
52        self
53    }
54    /// <p>A section of the response body that provides information about the preset that is created.</p>
55    pub fn get_preset(&self) -> &::std::option::Option<crate::types::Preset> {
56        &self.preset
57    }
58    /// <p>If the preset settings don't comply with the standards for the video codec but Elastic Transcoder created the preset, this message explains the reason the preset settings don't meet the standard. Elastic Transcoder created the preset because the settings might produce acceptable output.</p>
59    pub fn warning(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.warning = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>If the preset settings don't comply with the standards for the video codec but Elastic Transcoder created the preset, this message explains the reason the preset settings don't meet the standard. Elastic Transcoder created the preset because the settings might produce acceptable output.</p>
64    pub fn set_warning(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.warning = input;
66        self
67    }
68    /// <p>If the preset settings don't comply with the standards for the video codec but Elastic Transcoder created the preset, this message explains the reason the preset settings don't meet the standard. Elastic Transcoder created the preset because the settings might produce acceptable output.</p>
69    pub fn get_warning(&self) -> &::std::option::Option<::std::string::String> {
70        &self.warning
71    }
72    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
73        self._request_id = Some(request_id.into());
74        self
75    }
76
77    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
78        self._request_id = request_id;
79        self
80    }
81    /// Consumes the builder and constructs a [`CreatePresetOutput`](crate::operation::create_preset::CreatePresetOutput).
82    pub fn build(self) -> crate::operation::create_preset::CreatePresetOutput {
83        crate::operation::create_preset::CreatePresetOutput {
84            preset: self.preset,
85            warning: self.warning,
86            _request_id: self._request_id,
87        }
88    }
89}