1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// List of actions to create and list of actions to delete.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct BatchUpdateScheduleInput {
    /// Id of the channel whose schedule is being updated.
    pub channel_id: ::std::option::Option<::std::string::String>,
    /// Schedule actions to create in the schedule.
    pub creates: ::std::option::Option<crate::types::BatchScheduleActionCreateRequest>,
    /// Schedule actions to delete from the schedule.
    pub deletes: ::std::option::Option<crate::types::BatchScheduleActionDeleteRequest>,
}
impl BatchUpdateScheduleInput {
    /// Id of the channel whose schedule is being updated.
    pub fn channel_id(&self) -> ::std::option::Option<&str> {
        self.channel_id.as_deref()
    }
    /// Schedule actions to create in the schedule.
    pub fn creates(&self) -> ::std::option::Option<&crate::types::BatchScheduleActionCreateRequest> {
        self.creates.as_ref()
    }
    /// Schedule actions to delete from the schedule.
    pub fn deletes(&self) -> ::std::option::Option<&crate::types::BatchScheduleActionDeleteRequest> {
        self.deletes.as_ref()
    }
}
impl BatchUpdateScheduleInput {
    /// Creates a new builder-style object to manufacture [`BatchUpdateScheduleInput`](crate::operation::batch_update_schedule::BatchUpdateScheduleInput).
    pub fn builder() -> crate::operation::batch_update_schedule::builders::BatchUpdateScheduleInputBuilder {
        crate::operation::batch_update_schedule::builders::BatchUpdateScheduleInputBuilder::default()
    }
}

/// A builder for [`BatchUpdateScheduleInput`](crate::operation::batch_update_schedule::BatchUpdateScheduleInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct BatchUpdateScheduleInputBuilder {
    pub(crate) channel_id: ::std::option::Option<::std::string::String>,
    pub(crate) creates: ::std::option::Option<crate::types::BatchScheduleActionCreateRequest>,
    pub(crate) deletes: ::std::option::Option<crate::types::BatchScheduleActionDeleteRequest>,
}
impl BatchUpdateScheduleInputBuilder {
    /// Id of the channel whose schedule is being updated.
    /// This field is required.
    pub fn channel_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.channel_id = ::std::option::Option::Some(input.into());
        self
    }
    /// Id of the channel whose schedule is being updated.
    pub fn set_channel_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.channel_id = input;
        self
    }
    /// Id of the channel whose schedule is being updated.
    pub fn get_channel_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.channel_id
    }
    /// Schedule actions to create in the schedule.
    pub fn creates(mut self, input: crate::types::BatchScheduleActionCreateRequest) -> Self {
        self.creates = ::std::option::Option::Some(input);
        self
    }
    /// Schedule actions to create in the schedule.
    pub fn set_creates(mut self, input: ::std::option::Option<crate::types::BatchScheduleActionCreateRequest>) -> Self {
        self.creates = input;
        self
    }
    /// Schedule actions to create in the schedule.
    pub fn get_creates(&self) -> &::std::option::Option<crate::types::BatchScheduleActionCreateRequest> {
        &self.creates
    }
    /// Schedule actions to delete from the schedule.
    pub fn deletes(mut self, input: crate::types::BatchScheduleActionDeleteRequest) -> Self {
        self.deletes = ::std::option::Option::Some(input);
        self
    }
    /// Schedule actions to delete from the schedule.
    pub fn set_deletes(mut self, input: ::std::option::Option<crate::types::BatchScheduleActionDeleteRequest>) -> Self {
        self.deletes = input;
        self
    }
    /// Schedule actions to delete from the schedule.
    pub fn get_deletes(&self) -> &::std::option::Option<crate::types::BatchScheduleActionDeleteRequest> {
        &self.deletes
    }
    /// Consumes the builder and constructs a [`BatchUpdateScheduleInput`](crate::operation::batch_update_schedule::BatchUpdateScheduleInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::batch_update_schedule::BatchUpdateScheduleInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::batch_update_schedule::BatchUpdateScheduleInput {
            channel_id: self.channel_id,
            creates: self.creates,
            deletes: self.deletes,
        })
    }
}