aws_sdk_elastictranscoder/operation/read_pipeline/
_read_pipeline_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The <code>ReadPipelineResponse</code> structure.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ReadPipelineOutput {
7    /// <p>A section of the response body that provides information about the pipeline.</p>
8    pub pipeline: ::std::option::Option<crate::types::Pipeline>,
9    /// <p>Elastic Transcoder returns a warning if the resources used by your pipeline are not in the same region as the pipeline.</p>
10    /// <p>Using resources in the same region, such as your Amazon S3 buckets, Amazon SNS notification topics, and AWS KMS key, reduces processing time and prevents cross-regional charges.</p>
11    pub warnings: ::std::option::Option<::std::vec::Vec<crate::types::Warning>>,
12    _request_id: Option<String>,
13}
14impl ReadPipelineOutput {
15    /// <p>A section of the response body that provides information about the pipeline.</p>
16    pub fn pipeline(&self) -> ::std::option::Option<&crate::types::Pipeline> {
17        self.pipeline.as_ref()
18    }
19    /// <p>Elastic Transcoder returns a warning if the resources used by your pipeline are not in the same region as the pipeline.</p>
20    /// <p>Using resources in the same region, such as your Amazon S3 buckets, Amazon SNS notification topics, and AWS KMS key, reduces processing time and prevents cross-regional charges.</p>
21    ///
22    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.warnings.is_none()`.
23    pub fn warnings(&self) -> &[crate::types::Warning] {
24        self.warnings.as_deref().unwrap_or_default()
25    }
26}
27impl ::aws_types::request_id::RequestId for ReadPipelineOutput {
28    fn request_id(&self) -> Option<&str> {
29        self._request_id.as_deref()
30    }
31}
32impl ReadPipelineOutput {
33    /// Creates a new builder-style object to manufacture [`ReadPipelineOutput`](crate::operation::read_pipeline::ReadPipelineOutput).
34    pub fn builder() -> crate::operation::read_pipeline::builders::ReadPipelineOutputBuilder {
35        crate::operation::read_pipeline::builders::ReadPipelineOutputBuilder::default()
36    }
37}
38
39/// A builder for [`ReadPipelineOutput`](crate::operation::read_pipeline::ReadPipelineOutput).
40#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
41#[non_exhaustive]
42pub struct ReadPipelineOutputBuilder {
43    pub(crate) pipeline: ::std::option::Option<crate::types::Pipeline>,
44    pub(crate) warnings: ::std::option::Option<::std::vec::Vec<crate::types::Warning>>,
45    _request_id: Option<String>,
46}
47impl ReadPipelineOutputBuilder {
48    /// <p>A section of the response body that provides information about the pipeline.</p>
49    pub fn pipeline(mut self, input: crate::types::Pipeline) -> Self {
50        self.pipeline = ::std::option::Option::Some(input);
51        self
52    }
53    /// <p>A section of the response body that provides information about the pipeline.</p>
54    pub fn set_pipeline(mut self, input: ::std::option::Option<crate::types::Pipeline>) -> Self {
55        self.pipeline = input;
56        self
57    }
58    /// <p>A section of the response body that provides information about the pipeline.</p>
59    pub fn get_pipeline(&self) -> &::std::option::Option<crate::types::Pipeline> {
60        &self.pipeline
61    }
62    /// Appends an item to `warnings`.
63    ///
64    /// To override the contents of this collection use [`set_warnings`](Self::set_warnings).
65    ///
66    /// <p>Elastic Transcoder returns a warning if the resources used by your pipeline are not in the same region as the pipeline.</p>
67    /// <p>Using resources in the same region, such as your Amazon S3 buckets, Amazon SNS notification topics, and AWS KMS key, reduces processing time and prevents cross-regional charges.</p>
68    pub fn warnings(mut self, input: crate::types::Warning) -> Self {
69        let mut v = self.warnings.unwrap_or_default();
70        v.push(input);
71        self.warnings = ::std::option::Option::Some(v);
72        self
73    }
74    /// <p>Elastic Transcoder returns a warning if the resources used by your pipeline are not in the same region as the pipeline.</p>
75    /// <p>Using resources in the same region, such as your Amazon S3 buckets, Amazon SNS notification topics, and AWS KMS key, reduces processing time and prevents cross-regional charges.</p>
76    pub fn set_warnings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Warning>>) -> Self {
77        self.warnings = input;
78        self
79    }
80    /// <p>Elastic Transcoder returns a warning if the resources used by your pipeline are not in the same region as the pipeline.</p>
81    /// <p>Using resources in the same region, such as your Amazon S3 buckets, Amazon SNS notification topics, and AWS KMS key, reduces processing time and prevents cross-regional charges.</p>
82    pub fn get_warnings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Warning>> {
83        &self.warnings
84    }
85    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
86        self._request_id = Some(request_id.into());
87        self
88    }
89
90    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
91        self._request_id = request_id;
92        self
93    }
94    /// Consumes the builder and constructs a [`ReadPipelineOutput`](crate::operation::read_pipeline::ReadPipelineOutput).
95    pub fn build(self) -> crate::operation::read_pipeline::ReadPipelineOutput {
96        crate::operation::read_pipeline::ReadPipelineOutput {
97            pipeline: self.pipeline,
98            warnings: self.warnings,
99            _request_id: self._request_id,
100        }
101    }
102}