aws_sdk_mediapackagev2/operation/delete_channel/
_delete_channel_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DeleteChannelInput {
6    /// <p>The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.</p>
7    pub channel_group_name: ::std::option::Option<::std::string::String>,
8    /// <p>The name that describes the channel. The name is the primary identifier for the channel, and must be unique for your account in the AWS Region and channel group.</p>
9    pub channel_name: ::std::option::Option<::std::string::String>,
10}
11impl DeleteChannelInput {
12    /// <p>The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.</p>
13    pub fn channel_group_name(&self) -> ::std::option::Option<&str> {
14        self.channel_group_name.as_deref()
15    }
16    /// <p>The name that describes the channel. The name is the primary identifier for the channel, and must be unique for your account in the AWS Region and channel group.</p>
17    pub fn channel_name(&self) -> ::std::option::Option<&str> {
18        self.channel_name.as_deref()
19    }
20}
21impl DeleteChannelInput {
22    /// Creates a new builder-style object to manufacture [`DeleteChannelInput`](crate::operation::delete_channel::DeleteChannelInput).
23    pub fn builder() -> crate::operation::delete_channel::builders::DeleteChannelInputBuilder {
24        crate::operation::delete_channel::builders::DeleteChannelInputBuilder::default()
25    }
26}
27
28/// A builder for [`DeleteChannelInput`](crate::operation::delete_channel::DeleteChannelInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct DeleteChannelInputBuilder {
32    pub(crate) channel_group_name: ::std::option::Option<::std::string::String>,
33    pub(crate) channel_name: ::std::option::Option<::std::string::String>,
34}
35impl DeleteChannelInputBuilder {
36    /// <p>The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.</p>
37    /// This field is required.
38    pub fn channel_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.channel_group_name = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <p>The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.</p>
43    pub fn set_channel_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.channel_group_name = input;
45        self
46    }
47    /// <p>The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.</p>
48    pub fn get_channel_group_name(&self) -> &::std::option::Option<::std::string::String> {
49        &self.channel_group_name
50    }
51    /// <p>The name that describes the channel. The name is the primary identifier for the channel, and must be unique for your account in the AWS Region and channel group.</p>
52    /// This field is required.
53    pub fn channel_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54        self.channel_name = ::std::option::Option::Some(input.into());
55        self
56    }
57    /// <p>The name that describes the channel. The name is the primary identifier for the channel, and must be unique for your account in the AWS Region and channel group.</p>
58    pub fn set_channel_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59        self.channel_name = input;
60        self
61    }
62    /// <p>The name that describes the channel. The name is the primary identifier for the channel, and must be unique for your account in the AWS Region and channel group.</p>
63    pub fn get_channel_name(&self) -> &::std::option::Option<::std::string::String> {
64        &self.channel_name
65    }
66    /// Consumes the builder and constructs a [`DeleteChannelInput`](crate::operation::delete_channel::DeleteChannelInput).
67    pub fn build(
68        self,
69    ) -> ::std::result::Result<crate::operation::delete_channel::DeleteChannelInput, ::aws_smithy_types::error::operation::BuildError> {
70        ::std::result::Result::Ok(crate::operation::delete_channel::DeleteChannelInput {
71            channel_group_name: self.channel_group_name,
72            channel_name: self.channel_name,
73        })
74    }
75}