aws_sdk_neptune/types/_db_instance_status_info.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Provides a list of status information for a DB instance.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DbInstanceStatusInfo {
7 /// <p>This value is currently "read replication."</p>
8 pub status_type: ::std::option::Option<::std::string::String>,
9 /// <p>Boolean value that is true if the instance is operating normally, or false if the instance is in an error state.</p>
10 pub normal: ::std::option::Option<bool>,
11 /// <p>Status of the DB instance. For a StatusType of read replica, the values can be replicating, error, stopped, or terminated.</p>
12 pub status: ::std::option::Option<::std::string::String>,
13 /// <p>Details of the error if there is an error for the instance. If the instance is not in an error state, this value is blank.</p>
14 pub message: ::std::option::Option<::std::string::String>,
15}
16impl DbInstanceStatusInfo {
17 /// <p>This value is currently "read replication."</p>
18 pub fn status_type(&self) -> ::std::option::Option<&str> {
19 self.status_type.as_deref()
20 }
21 /// <p>Boolean value that is true if the instance is operating normally, or false if the instance is in an error state.</p>
22 pub fn normal(&self) -> ::std::option::Option<bool> {
23 self.normal
24 }
25 /// <p>Status of the DB instance. For a StatusType of read replica, the values can be replicating, error, stopped, or terminated.</p>
26 pub fn status(&self) -> ::std::option::Option<&str> {
27 self.status.as_deref()
28 }
29 /// <p>Details of the error if there is an error for the instance. If the instance is not in an error state, this value is blank.</p>
30 pub fn message(&self) -> ::std::option::Option<&str> {
31 self.message.as_deref()
32 }
33}
34impl DbInstanceStatusInfo {
35 /// Creates a new builder-style object to manufacture [`DbInstanceStatusInfo`](crate::types::DbInstanceStatusInfo).
36 pub fn builder() -> crate::types::builders::DbInstanceStatusInfoBuilder {
37 crate::types::builders::DbInstanceStatusInfoBuilder::default()
38 }
39}
40
41/// A builder for [`DbInstanceStatusInfo`](crate::types::DbInstanceStatusInfo).
42#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
43#[non_exhaustive]
44pub struct DbInstanceStatusInfoBuilder {
45 pub(crate) status_type: ::std::option::Option<::std::string::String>,
46 pub(crate) normal: ::std::option::Option<bool>,
47 pub(crate) status: ::std::option::Option<::std::string::String>,
48 pub(crate) message: ::std::option::Option<::std::string::String>,
49}
50impl DbInstanceStatusInfoBuilder {
51 /// <p>This value is currently "read replication."</p>
52 pub fn status_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 self.status_type = ::std::option::Option::Some(input.into());
54 self
55 }
56 /// <p>This value is currently "read replication."</p>
57 pub fn set_status_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58 self.status_type = input;
59 self
60 }
61 /// <p>This value is currently "read replication."</p>
62 pub fn get_status_type(&self) -> &::std::option::Option<::std::string::String> {
63 &self.status_type
64 }
65 /// <p>Boolean value that is true if the instance is operating normally, or false if the instance is in an error state.</p>
66 pub fn normal(mut self, input: bool) -> Self {
67 self.normal = ::std::option::Option::Some(input);
68 self
69 }
70 /// <p>Boolean value that is true if the instance is operating normally, or false if the instance is in an error state.</p>
71 pub fn set_normal(mut self, input: ::std::option::Option<bool>) -> Self {
72 self.normal = input;
73 self
74 }
75 /// <p>Boolean value that is true if the instance is operating normally, or false if the instance is in an error state.</p>
76 pub fn get_normal(&self) -> &::std::option::Option<bool> {
77 &self.normal
78 }
79 /// <p>Status of the DB instance. For a StatusType of read replica, the values can be replicating, error, stopped, or terminated.</p>
80 pub fn status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81 self.status = ::std::option::Option::Some(input.into());
82 self
83 }
84 /// <p>Status of the DB instance. For a StatusType of read replica, the values can be replicating, error, stopped, or terminated.</p>
85 pub fn set_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86 self.status = input;
87 self
88 }
89 /// <p>Status of the DB instance. For a StatusType of read replica, the values can be replicating, error, stopped, or terminated.</p>
90 pub fn get_status(&self) -> &::std::option::Option<::std::string::String> {
91 &self.status
92 }
93 /// <p>Details of the error if there is an error for the instance. If the instance is not in an error state, this value is blank.</p>
94 pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
95 self.message = ::std::option::Option::Some(input.into());
96 self
97 }
98 /// <p>Details of the error if there is an error for the instance. If the instance is not in an error state, this value is blank.</p>
99 pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100 self.message = input;
101 self
102 }
103 /// <p>Details of the error if there is an error for the instance. If the instance is not in an error state, this value is blank.</p>
104 pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
105 &self.message
106 }
107 /// Consumes the builder and constructs a [`DbInstanceStatusInfo`](crate::types::DbInstanceStatusInfo).
108 pub fn build(self) -> crate::types::DbInstanceStatusInfo {
109 crate::types::DbInstanceStatusInfo {
110 status_type: self.status_type,
111 normal: self.normal,
112 status: self.status,
113 message: self.message,
114 }
115 }
116}