aws_sdk_redshift/types/
_supported_operation.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Describes the operations that are allowed on a maintenance track.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct SupportedOperation {
7    /// <p>A list of the supported operations.</p>
8    pub operation_name: ::std::option::Option<::std::string::String>,
9}
10impl SupportedOperation {
11    /// <p>A list of the supported operations.</p>
12    pub fn operation_name(&self) -> ::std::option::Option<&str> {
13        self.operation_name.as_deref()
14    }
15}
16impl SupportedOperation {
17    /// Creates a new builder-style object to manufacture [`SupportedOperation`](crate::types::SupportedOperation).
18    pub fn builder() -> crate::types::builders::SupportedOperationBuilder {
19        crate::types::builders::SupportedOperationBuilder::default()
20    }
21}
22
23/// A builder for [`SupportedOperation`](crate::types::SupportedOperation).
24#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
25#[non_exhaustive]
26pub struct SupportedOperationBuilder {
27    pub(crate) operation_name: ::std::option::Option<::std::string::String>,
28}
29impl SupportedOperationBuilder {
30    /// <p>A list of the supported operations.</p>
31    pub fn operation_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
32        self.operation_name = ::std::option::Option::Some(input.into());
33        self
34    }
35    /// <p>A list of the supported operations.</p>
36    pub fn set_operation_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
37        self.operation_name = input;
38        self
39    }
40    /// <p>A list of the supported operations.</p>
41    pub fn get_operation_name(&self) -> &::std::option::Option<::std::string::String> {
42        &self.operation_name
43    }
44    /// Consumes the builder and constructs a [`SupportedOperation`](crate::types::SupportedOperation).
45    pub fn build(self) -> crate::types::SupportedOperation {
46        crate::types::SupportedOperation {
47            operation_name: self.operation_name,
48        }
49    }
50}