aws_sdk_elasticbeanstalk/types/
_platform_branch_summary.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Summary information about a platform branch.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct PlatformBranchSummary {
7    /// <p>The name of the platform to which this platform branch belongs.</p>
8    pub platform_name: ::std::option::Option<::std::string::String>,
9    /// <p>The name of the platform branch.</p>
10    pub branch_name: ::std::option::Option<::std::string::String>,
11    /// <p>The support life cycle state of the platform branch.</p>
12    /// <p>Possible values: <code>beta</code> | <code>supported</code> | <code>deprecated</code> | <code>retired</code></p>
13    pub lifecycle_state: ::std::option::Option<::std::string::String>,
14    /// <p>An ordinal number that designates the order in which platform branches have been added to a platform. This can be helpful, for example, if your code calls the <code>ListPlatformBranches</code> action and then displays a list of platform branches.</p>
15    /// <p>A larger <code>BranchOrder</code> value designates a newer platform branch within the platform.</p>
16    pub branch_order: i32,
17    /// <p>The environment tiers that platform versions in this branch support.</p>
18    /// <p>Possible values: <code>WebServer/Standard</code> | <code>Worker/SQS/HTTP</code></p>
19    pub supported_tier_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
20}
21impl PlatformBranchSummary {
22    /// <p>The name of the platform to which this platform branch belongs.</p>
23    pub fn platform_name(&self) -> ::std::option::Option<&str> {
24        self.platform_name.as_deref()
25    }
26    /// <p>The name of the platform branch.</p>
27    pub fn branch_name(&self) -> ::std::option::Option<&str> {
28        self.branch_name.as_deref()
29    }
30    /// <p>The support life cycle state of the platform branch.</p>
31    /// <p>Possible values: <code>beta</code> | <code>supported</code> | <code>deprecated</code> | <code>retired</code></p>
32    pub fn lifecycle_state(&self) -> ::std::option::Option<&str> {
33        self.lifecycle_state.as_deref()
34    }
35    /// <p>An ordinal number that designates the order in which platform branches have been added to a platform. This can be helpful, for example, if your code calls the <code>ListPlatformBranches</code> action and then displays a list of platform branches.</p>
36    /// <p>A larger <code>BranchOrder</code> value designates a newer platform branch within the platform.</p>
37    pub fn branch_order(&self) -> i32 {
38        self.branch_order
39    }
40    /// <p>The environment tiers that platform versions in this branch support.</p>
41    /// <p>Possible values: <code>WebServer/Standard</code> | <code>Worker/SQS/HTTP</code></p>
42    ///
43    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.supported_tier_list.is_none()`.
44    pub fn supported_tier_list(&self) -> &[::std::string::String] {
45        self.supported_tier_list.as_deref().unwrap_or_default()
46    }
47}
48impl PlatformBranchSummary {
49    /// Creates a new builder-style object to manufacture [`PlatformBranchSummary`](crate::types::PlatformBranchSummary).
50    pub fn builder() -> crate::types::builders::PlatformBranchSummaryBuilder {
51        crate::types::builders::PlatformBranchSummaryBuilder::default()
52    }
53}
54
55/// A builder for [`PlatformBranchSummary`](crate::types::PlatformBranchSummary).
56#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
57#[non_exhaustive]
58pub struct PlatformBranchSummaryBuilder {
59    pub(crate) platform_name: ::std::option::Option<::std::string::String>,
60    pub(crate) branch_name: ::std::option::Option<::std::string::String>,
61    pub(crate) lifecycle_state: ::std::option::Option<::std::string::String>,
62    pub(crate) branch_order: ::std::option::Option<i32>,
63    pub(crate) supported_tier_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
64}
65impl PlatformBranchSummaryBuilder {
66    /// <p>The name of the platform to which this platform branch belongs.</p>
67    pub fn platform_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68        self.platform_name = ::std::option::Option::Some(input.into());
69        self
70    }
71    /// <p>The name of the platform to which this platform branch belongs.</p>
72    pub fn set_platform_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73        self.platform_name = input;
74        self
75    }
76    /// <p>The name of the platform to which this platform branch belongs.</p>
77    pub fn get_platform_name(&self) -> &::std::option::Option<::std::string::String> {
78        &self.platform_name
79    }
80    /// <p>The name of the platform branch.</p>
81    pub fn branch_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
82        self.branch_name = ::std::option::Option::Some(input.into());
83        self
84    }
85    /// <p>The name of the platform branch.</p>
86    pub fn set_branch_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
87        self.branch_name = input;
88        self
89    }
90    /// <p>The name of the platform branch.</p>
91    pub fn get_branch_name(&self) -> &::std::option::Option<::std::string::String> {
92        &self.branch_name
93    }
94    /// <p>The support life cycle state of the platform branch.</p>
95    /// <p>Possible values: <code>beta</code> | <code>supported</code> | <code>deprecated</code> | <code>retired</code></p>
96    pub fn lifecycle_state(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
97        self.lifecycle_state = ::std::option::Option::Some(input.into());
98        self
99    }
100    /// <p>The support life cycle state of the platform branch.</p>
101    /// <p>Possible values: <code>beta</code> | <code>supported</code> | <code>deprecated</code> | <code>retired</code></p>
102    pub fn set_lifecycle_state(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
103        self.lifecycle_state = input;
104        self
105    }
106    /// <p>The support life cycle state of the platform branch.</p>
107    /// <p>Possible values: <code>beta</code> | <code>supported</code> | <code>deprecated</code> | <code>retired</code></p>
108    pub fn get_lifecycle_state(&self) -> &::std::option::Option<::std::string::String> {
109        &self.lifecycle_state
110    }
111    /// <p>An ordinal number that designates the order in which platform branches have been added to a platform. This can be helpful, for example, if your code calls the <code>ListPlatformBranches</code> action and then displays a list of platform branches.</p>
112    /// <p>A larger <code>BranchOrder</code> value designates a newer platform branch within the platform.</p>
113    pub fn branch_order(mut self, input: i32) -> Self {
114        self.branch_order = ::std::option::Option::Some(input);
115        self
116    }
117    /// <p>An ordinal number that designates the order in which platform branches have been added to a platform. This can be helpful, for example, if your code calls the <code>ListPlatformBranches</code> action and then displays a list of platform branches.</p>
118    /// <p>A larger <code>BranchOrder</code> value designates a newer platform branch within the platform.</p>
119    pub fn set_branch_order(mut self, input: ::std::option::Option<i32>) -> Self {
120        self.branch_order = input;
121        self
122    }
123    /// <p>An ordinal number that designates the order in which platform branches have been added to a platform. This can be helpful, for example, if your code calls the <code>ListPlatformBranches</code> action and then displays a list of platform branches.</p>
124    /// <p>A larger <code>BranchOrder</code> value designates a newer platform branch within the platform.</p>
125    pub fn get_branch_order(&self) -> &::std::option::Option<i32> {
126        &self.branch_order
127    }
128    /// Appends an item to `supported_tier_list`.
129    ///
130    /// To override the contents of this collection use [`set_supported_tier_list`](Self::set_supported_tier_list).
131    ///
132    /// <p>The environment tiers that platform versions in this branch support.</p>
133    /// <p>Possible values: <code>WebServer/Standard</code> | <code>Worker/SQS/HTTP</code></p>
134    pub fn supported_tier_list(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
135        let mut v = self.supported_tier_list.unwrap_or_default();
136        v.push(input.into());
137        self.supported_tier_list = ::std::option::Option::Some(v);
138        self
139    }
140    /// <p>The environment tiers that platform versions in this branch support.</p>
141    /// <p>Possible values: <code>WebServer/Standard</code> | <code>Worker/SQS/HTTP</code></p>
142    pub fn set_supported_tier_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
143        self.supported_tier_list = input;
144        self
145    }
146    /// <p>The environment tiers that platform versions in this branch support.</p>
147    /// <p>Possible values: <code>WebServer/Standard</code> | <code>Worker/SQS/HTTP</code></p>
148    pub fn get_supported_tier_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
149        &self.supported_tier_list
150    }
151    /// Consumes the builder and constructs a [`PlatformBranchSummary`](crate::types::PlatformBranchSummary).
152    pub fn build(self) -> crate::types::PlatformBranchSummary {
153        crate::types::PlatformBranchSummary {
154            platform_name: self.platform_name,
155            branch_name: self.branch_name,
156            lifecycle_state: self.lifecycle_state,
157            branch_order: self.branch_order.unwrap_or_default(),
158            supported_tier_list: self.supported_tier_list,
159        }
160    }
161}