aws_sdk_mediastore/types/
_container.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>This section describes operations that you can perform on an AWS Elemental MediaStore container.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct Container {
7    /// <p>The DNS endpoint of the container. Use the endpoint to identify the specific container when sending requests to the data plane. The service assigns this value when the container is created. Once the value has been assigned, it does not change.</p>
8    pub endpoint: ::std::option::Option<::std::string::String>,
9    /// <p>Unix timestamp.</p>
10    pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
11    /// <p>The Amazon Resource Name (ARN) of the container. The ARN has the following format:</p>
12    /// <p>arn:aws:<region>
13    /// :
14    /// <account that owns this container>
15    /// :container/
16    /// <name of container>
17    /// </name>
18    /// </account>
19    /// </region></p>
20    /// <p>For example: arn:aws:mediastore:us-west-2:111122223333:container/movies</p>
21    pub arn: ::std::option::Option<::std::string::String>,
22    /// <p>The name of the container.</p>
23    pub name: ::std::option::Option<::std::string::String>,
24    /// <p>The status of container creation or deletion. The status is one of the following: <code>CREATING</code>, <code>ACTIVE</code>, or <code>DELETING</code>. While the service is creating the container, the status is <code>CREATING</code>. When the endpoint is available, the status changes to <code>ACTIVE</code>.</p>
25    pub status: ::std::option::Option<crate::types::ContainerStatus>,
26    /// <p>The state of access logging on the container. This value is <code>false</code> by default, indicating that AWS Elemental MediaStore does not send access logs to Amazon CloudWatch Logs. When you enable access logging on the container, MediaStore changes this value to <code>true</code>, indicating that the service delivers access logs for objects stored in that container to CloudWatch Logs.</p>
27    pub access_logging_enabled: ::std::option::Option<bool>,
28}
29impl Container {
30    /// <p>The DNS endpoint of the container. Use the endpoint to identify the specific container when sending requests to the data plane. The service assigns this value when the container is created. Once the value has been assigned, it does not change.</p>
31    pub fn endpoint(&self) -> ::std::option::Option<&str> {
32        self.endpoint.as_deref()
33    }
34    /// <p>Unix timestamp.</p>
35    pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
36        self.creation_time.as_ref()
37    }
38    /// <p>The Amazon Resource Name (ARN) of the container. The ARN has the following format:</p>
39    /// <p>arn:aws:<region>
40    /// :
41    /// <account that owns this container>
42    /// :container/
43    /// <name of container>
44    /// </name>
45    /// </account>
46    /// </region></p>
47    /// <p>For example: arn:aws:mediastore:us-west-2:111122223333:container/movies</p>
48    pub fn arn(&self) -> ::std::option::Option<&str> {
49        self.arn.as_deref()
50    }
51    /// <p>The name of the container.</p>
52    pub fn name(&self) -> ::std::option::Option<&str> {
53        self.name.as_deref()
54    }
55    /// <p>The status of container creation or deletion. The status is one of the following: <code>CREATING</code>, <code>ACTIVE</code>, or <code>DELETING</code>. While the service is creating the container, the status is <code>CREATING</code>. When the endpoint is available, the status changes to <code>ACTIVE</code>.</p>
56    pub fn status(&self) -> ::std::option::Option<&crate::types::ContainerStatus> {
57        self.status.as_ref()
58    }
59    /// <p>The state of access logging on the container. This value is <code>false</code> by default, indicating that AWS Elemental MediaStore does not send access logs to Amazon CloudWatch Logs. When you enable access logging on the container, MediaStore changes this value to <code>true</code>, indicating that the service delivers access logs for objects stored in that container to CloudWatch Logs.</p>
60    pub fn access_logging_enabled(&self) -> ::std::option::Option<bool> {
61        self.access_logging_enabled
62    }
63}
64impl Container {
65    /// Creates a new builder-style object to manufacture [`Container`](crate::types::Container).
66    pub fn builder() -> crate::types::builders::ContainerBuilder {
67        crate::types::builders::ContainerBuilder::default()
68    }
69}
70
71/// A builder for [`Container`](crate::types::Container).
72#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
73#[non_exhaustive]
74pub struct ContainerBuilder {
75    pub(crate) endpoint: ::std::option::Option<::std::string::String>,
76    pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
77    pub(crate) arn: ::std::option::Option<::std::string::String>,
78    pub(crate) name: ::std::option::Option<::std::string::String>,
79    pub(crate) status: ::std::option::Option<crate::types::ContainerStatus>,
80    pub(crate) access_logging_enabled: ::std::option::Option<bool>,
81}
82impl ContainerBuilder {
83    /// <p>The DNS endpoint of the container. Use the endpoint to identify the specific container when sending requests to the data plane. The service assigns this value when the container is created. Once the value has been assigned, it does not change.</p>
84    pub fn endpoint(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
85        self.endpoint = ::std::option::Option::Some(input.into());
86        self
87    }
88    /// <p>The DNS endpoint of the container. Use the endpoint to identify the specific container when sending requests to the data plane. The service assigns this value when the container is created. Once the value has been assigned, it does not change.</p>
89    pub fn set_endpoint(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
90        self.endpoint = input;
91        self
92    }
93    /// <p>The DNS endpoint of the container. Use the endpoint to identify the specific container when sending requests to the data plane. The service assigns this value when the container is created. Once the value has been assigned, it does not change.</p>
94    pub fn get_endpoint(&self) -> &::std::option::Option<::std::string::String> {
95        &self.endpoint
96    }
97    /// <p>Unix timestamp.</p>
98    pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
99        self.creation_time = ::std::option::Option::Some(input);
100        self
101    }
102    /// <p>Unix timestamp.</p>
103    pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
104        self.creation_time = input;
105        self
106    }
107    /// <p>Unix timestamp.</p>
108    pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
109        &self.creation_time
110    }
111    /// <p>The Amazon Resource Name (ARN) of the container. The ARN has the following format:</p>
112    /// <p>arn:aws:<region>
113    /// :
114    /// <account that owns this container>
115    /// :container/
116    /// <name of container>
117    /// </name>
118    /// </account>
119    /// </region></p>
120    /// <p>For example: arn:aws:mediastore:us-west-2:111122223333:container/movies</p>
121    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
122        self.arn = ::std::option::Option::Some(input.into());
123        self
124    }
125    /// <p>The Amazon Resource Name (ARN) of the container. The ARN has the following format:</p>
126    /// <p>arn:aws:<region>
127    /// :
128    /// <account that owns this container>
129    /// :container/
130    /// <name of container>
131    /// </name>
132    /// </account>
133    /// </region></p>
134    /// <p>For example: arn:aws:mediastore:us-west-2:111122223333:container/movies</p>
135    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
136        self.arn = input;
137        self
138    }
139    /// <p>The Amazon Resource Name (ARN) of the container. The ARN has the following format:</p>
140    /// <p>arn:aws:<region>
141    /// :
142    /// <account that owns this container>
143    /// :container/
144    /// <name of container>
145    /// </name>
146    /// </account>
147    /// </region></p>
148    /// <p>For example: arn:aws:mediastore:us-west-2:111122223333:container/movies</p>
149    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
150        &self.arn
151    }
152    /// <p>The name of the container.</p>
153    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
154        self.name = ::std::option::Option::Some(input.into());
155        self
156    }
157    /// <p>The name of the container.</p>
158    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
159        self.name = input;
160        self
161    }
162    /// <p>The name of the container.</p>
163    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
164        &self.name
165    }
166    /// <p>The status of container creation or deletion. The status is one of the following: <code>CREATING</code>, <code>ACTIVE</code>, or <code>DELETING</code>. While the service is creating the container, the status is <code>CREATING</code>. When the endpoint is available, the status changes to <code>ACTIVE</code>.</p>
167    pub fn status(mut self, input: crate::types::ContainerStatus) -> Self {
168        self.status = ::std::option::Option::Some(input);
169        self
170    }
171    /// <p>The status of container creation or deletion. The status is one of the following: <code>CREATING</code>, <code>ACTIVE</code>, or <code>DELETING</code>. While the service is creating the container, the status is <code>CREATING</code>. When the endpoint is available, the status changes to <code>ACTIVE</code>.</p>
172    pub fn set_status(mut self, input: ::std::option::Option<crate::types::ContainerStatus>) -> Self {
173        self.status = input;
174        self
175    }
176    /// <p>The status of container creation or deletion. The status is one of the following: <code>CREATING</code>, <code>ACTIVE</code>, or <code>DELETING</code>. While the service is creating the container, the status is <code>CREATING</code>. When the endpoint is available, the status changes to <code>ACTIVE</code>.</p>
177    pub fn get_status(&self) -> &::std::option::Option<crate::types::ContainerStatus> {
178        &self.status
179    }
180    /// <p>The state of access logging on the container. This value is <code>false</code> by default, indicating that AWS Elemental MediaStore does not send access logs to Amazon CloudWatch Logs. When you enable access logging on the container, MediaStore changes this value to <code>true</code>, indicating that the service delivers access logs for objects stored in that container to CloudWatch Logs.</p>
181    pub fn access_logging_enabled(mut self, input: bool) -> Self {
182        self.access_logging_enabled = ::std::option::Option::Some(input);
183        self
184    }
185    /// <p>The state of access logging on the container. This value is <code>false</code> by default, indicating that AWS Elemental MediaStore does not send access logs to Amazon CloudWatch Logs. When you enable access logging on the container, MediaStore changes this value to <code>true</code>, indicating that the service delivers access logs for objects stored in that container to CloudWatch Logs.</p>
186    pub fn set_access_logging_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
187        self.access_logging_enabled = input;
188        self
189    }
190    /// <p>The state of access logging on the container. This value is <code>false</code> by default, indicating that AWS Elemental MediaStore does not send access logs to Amazon CloudWatch Logs. When you enable access logging on the container, MediaStore changes this value to <code>true</code>, indicating that the service delivers access logs for objects stored in that container to CloudWatch Logs.</p>
191    pub fn get_access_logging_enabled(&self) -> &::std::option::Option<bool> {
192        &self.access_logging_enabled
193    }
194    /// Consumes the builder and constructs a [`Container`](crate::types::Container).
195    pub fn build(self) -> crate::types::Container {
196        crate::types::Container {
197            endpoint: self.endpoint,
198            creation_time: self.creation_time,
199            arn: self.arn,
200            name: self.name,
201            status: self.status,
202            access_logging_enabled: self.access_logging_enabled,
203        }
204    }
205}