aws_sdk_mediapackage/operation/update_channel/
_update_channel_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// Configuration parameters used to update the Channel.
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdateChannelInput {
7    /// A short text description of the Channel.
8    pub description: ::std::option::Option<::std::string::String>,
9    /// The ID of the Channel to update.
10    pub id: ::std::option::Option<::std::string::String>,
11}
12impl UpdateChannelInput {
13    /// A short text description of the Channel.
14    pub fn description(&self) -> ::std::option::Option<&str> {
15        self.description.as_deref()
16    }
17    /// The ID of the Channel to update.
18    pub fn id(&self) -> ::std::option::Option<&str> {
19        self.id.as_deref()
20    }
21}
22impl UpdateChannelInput {
23    /// Creates a new builder-style object to manufacture [`UpdateChannelInput`](crate::operation::update_channel::UpdateChannelInput).
24    pub fn builder() -> crate::operation::update_channel::builders::UpdateChannelInputBuilder {
25        crate::operation::update_channel::builders::UpdateChannelInputBuilder::default()
26    }
27}
28
29/// A builder for [`UpdateChannelInput`](crate::operation::update_channel::UpdateChannelInput).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct UpdateChannelInputBuilder {
33    pub(crate) description: ::std::option::Option<::std::string::String>,
34    pub(crate) id: ::std::option::Option<::std::string::String>,
35}
36impl UpdateChannelInputBuilder {
37    /// A short text description of the Channel.
38    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.description = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// A short text description of the Channel.
43    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.description = input;
45        self
46    }
47    /// A short text description of the Channel.
48    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
49        &self.description
50    }
51    /// The ID of the Channel to update.
52    /// This field is required.
53    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54        self.id = ::std::option::Option::Some(input.into());
55        self
56    }
57    /// The ID of the Channel to update.
58    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59        self.id = input;
60        self
61    }
62    /// The ID of the Channel to update.
63    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
64        &self.id
65    }
66    /// Consumes the builder and constructs a [`UpdateChannelInput`](crate::operation::update_channel::UpdateChannelInput).
67    pub fn build(
68        self,
69    ) -> ::std::result::Result<crate::operation::update_channel::UpdateChannelInput, ::aws_smithy_types::error::operation::BuildError> {
70        ::std::result::Result::Ok(crate::operation::update_channel::UpdateChannelInput {
71            description: self.description,
72            id: self.id,
73        })
74    }
75}