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 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>An object that represents a virtual router returned by a list operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct VirtualRouterRef {
/// <p>The name of the service mesh that the virtual router resides in.</p>
pub mesh_name: ::std::string::String,
/// <p>The name of the virtual router.</p>
pub virtual_router_name: ::std::string::String,
/// <p>The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's the ID of the account that shared the mesh with your account. For more information about mesh sharing, see <a href="https://docs.aws.amazon.com/app-mesh/latest/userguide/sharing.html">Working with shared meshes</a>.</p>
pub mesh_owner: ::std::string::String,
/// <p>The Amazon Web Services IAM account ID of the resource owner. If the account ID is not your own, then it's the ID of the mesh owner or of another account that the mesh is shared with. For more information about mesh sharing, see <a href="https://docs.aws.amazon.com/app-mesh/latest/userguide/sharing.html">Working with shared meshes</a>.</p>
pub resource_owner: ::std::string::String,
/// <p>The full Amazon Resource Name (ARN) for the virtual router.</p>
pub arn: ::std::string::String,
/// <p>The version of the resource. Resources are created at version 1, and this version is incremented each time that they're updated.</p>
pub version: i64,
/// <p>The Unix epoch timestamp in seconds for when the resource was created.</p>
pub created_at: ::aws_smithy_types::DateTime,
/// <p>The Unix epoch timestamp in seconds for when the resource was last updated.</p>
pub last_updated_at: ::aws_smithy_types::DateTime,
}
impl VirtualRouterRef {
/// <p>The name of the service mesh that the virtual router resides in.</p>
pub fn mesh_name(&self) -> &str {
use std::ops::Deref;
self.mesh_name.deref()
}
/// <p>The name of the virtual router.</p>
pub fn virtual_router_name(&self) -> &str {
use std::ops::Deref;
self.virtual_router_name.deref()
}
/// <p>The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's the ID of the account that shared the mesh with your account. For more information about mesh sharing, see <a href="https://docs.aws.amazon.com/app-mesh/latest/userguide/sharing.html">Working with shared meshes</a>.</p>
pub fn mesh_owner(&self) -> &str {
use std::ops::Deref;
self.mesh_owner.deref()
}
/// <p>The Amazon Web Services IAM account ID of the resource owner. If the account ID is not your own, then it's the ID of the mesh owner or of another account that the mesh is shared with. For more information about mesh sharing, see <a href="https://docs.aws.amazon.com/app-mesh/latest/userguide/sharing.html">Working with shared meshes</a>.</p>
pub fn resource_owner(&self) -> &str {
use std::ops::Deref;
self.resource_owner.deref()
}
/// <p>The full Amazon Resource Name (ARN) for the virtual router.</p>
pub fn arn(&self) -> &str {
use std::ops::Deref;
self.arn.deref()
}
/// <p>The version of the resource. Resources are created at version 1, and this version is incremented each time that they're updated.</p>
pub fn version(&self) -> i64 {
self.version
}
/// <p>The Unix epoch timestamp in seconds for when the resource was created.</p>
pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
&self.created_at
}
/// <p>The Unix epoch timestamp in seconds for when the resource was last updated.</p>
pub fn last_updated_at(&self) -> &::aws_smithy_types::DateTime {
&self.last_updated_at
}
}
impl VirtualRouterRef {
/// Creates a new builder-style object to manufacture [`VirtualRouterRef`](crate::types::VirtualRouterRef).
pub fn builder() -> crate::types::builders::VirtualRouterRefBuilder {
crate::types::builders::VirtualRouterRefBuilder::default()
}
}
/// A builder for [`VirtualRouterRef`](crate::types::VirtualRouterRef).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct VirtualRouterRefBuilder {
pub(crate) mesh_name: ::std::option::Option<::std::string::String>,
pub(crate) virtual_router_name: ::std::option::Option<::std::string::String>,
pub(crate) mesh_owner: ::std::option::Option<::std::string::String>,
pub(crate) resource_owner: ::std::option::Option<::std::string::String>,
pub(crate) arn: ::std::option::Option<::std::string::String>,
pub(crate) version: ::std::option::Option<i64>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) last_updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl VirtualRouterRefBuilder {
/// <p>The name of the service mesh that the virtual router resides in.</p>
/// This field is required.
pub fn mesh_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.mesh_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the service mesh that the virtual router resides in.</p>
pub fn set_mesh_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.mesh_name = input;
self
}
/// <p>The name of the service mesh that the virtual router resides in.</p>
pub fn get_mesh_name(&self) -> &::std::option::Option<::std::string::String> {
&self.mesh_name
}
/// <p>The name of the virtual router.</p>
/// This field is required.
pub fn virtual_router_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.virtual_router_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the virtual router.</p>
pub fn set_virtual_router_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.virtual_router_name = input;
self
}
/// <p>The name of the virtual router.</p>
pub fn get_virtual_router_name(&self) -> &::std::option::Option<::std::string::String> {
&self.virtual_router_name
}
/// <p>The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's the ID of the account that shared the mesh with your account. For more information about mesh sharing, see <a href="https://docs.aws.amazon.com/app-mesh/latest/userguide/sharing.html">Working with shared meshes</a>.</p>
/// This field is required.
pub fn mesh_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.mesh_owner = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's the ID of the account that shared the mesh with your account. For more information about mesh sharing, see <a href="https://docs.aws.amazon.com/app-mesh/latest/userguide/sharing.html">Working with shared meshes</a>.</p>
pub fn set_mesh_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.mesh_owner = input;
self
}
/// <p>The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's the ID of the account that shared the mesh with your account. For more information about mesh sharing, see <a href="https://docs.aws.amazon.com/app-mesh/latest/userguide/sharing.html">Working with shared meshes</a>.</p>
pub fn get_mesh_owner(&self) -> &::std::option::Option<::std::string::String> {
&self.mesh_owner
}
/// <p>The Amazon Web Services IAM account ID of the resource owner. If the account ID is not your own, then it's the ID of the mesh owner or of another account that the mesh is shared with. For more information about mesh sharing, see <a href="https://docs.aws.amazon.com/app-mesh/latest/userguide/sharing.html">Working with shared meshes</a>.</p>
/// This field is required.
pub fn resource_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.resource_owner = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Web Services IAM account ID of the resource owner. If the account ID is not your own, then it's the ID of the mesh owner or of another account that the mesh is shared with. For more information about mesh sharing, see <a href="https://docs.aws.amazon.com/app-mesh/latest/userguide/sharing.html">Working with shared meshes</a>.</p>
pub fn set_resource_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.resource_owner = input;
self
}
/// <p>The Amazon Web Services IAM account ID of the resource owner. If the account ID is not your own, then it's the ID of the mesh owner or of another account that the mesh is shared with. For more information about mesh sharing, see <a href="https://docs.aws.amazon.com/app-mesh/latest/userguide/sharing.html">Working with shared meshes</a>.</p>
pub fn get_resource_owner(&self) -> &::std::option::Option<::std::string::String> {
&self.resource_owner
}
/// <p>The full Amazon Resource Name (ARN) for the virtual router.</p>
/// This field is required.
pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The full Amazon Resource Name (ARN) for the virtual router.</p>
pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.arn = input;
self
}
/// <p>The full Amazon Resource Name (ARN) for the virtual router.</p>
pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.arn
}
/// <p>The version of the resource. Resources are created at version 1, and this version is incremented each time that they're updated.</p>
/// This field is required.
pub fn version(mut self, input: i64) -> Self {
self.version = ::std::option::Option::Some(input);
self
}
/// <p>The version of the resource. Resources are created at version 1, and this version is incremented each time that they're updated.</p>
pub fn set_version(mut self, input: ::std::option::Option<i64>) -> Self {
self.version = input;
self
}
/// <p>The version of the resource. Resources are created at version 1, and this version is incremented each time that they're updated.</p>
pub fn get_version(&self) -> &::std::option::Option<i64> {
&self.version
}
/// <p>The Unix epoch timestamp in seconds for when the resource was created.</p>
/// This field is required.
pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_at = ::std::option::Option::Some(input);
self
}
/// <p>The Unix epoch timestamp in seconds for when the resource was created.</p>
pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created_at = input;
self
}
/// <p>The Unix epoch timestamp in seconds for when the resource was created.</p>
pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_at
}
/// <p>The Unix epoch timestamp in seconds for when the resource was last updated.</p>
/// This field is required.
pub fn last_updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.last_updated_at = ::std::option::Option::Some(input);
self
}
/// <p>The Unix epoch timestamp in seconds for when the resource was last updated.</p>
pub fn set_last_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.last_updated_at = input;
self
}
/// <p>The Unix epoch timestamp in seconds for when the resource was last updated.</p>
pub fn get_last_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.last_updated_at
}
/// Consumes the builder and constructs a [`VirtualRouterRef`](crate::types::VirtualRouterRef).
/// This method will fail if any of the following fields are not set:
/// - [`mesh_name`](crate::types::builders::VirtualRouterRefBuilder::mesh_name)
/// - [`virtual_router_name`](crate::types::builders::VirtualRouterRefBuilder::virtual_router_name)
/// - [`mesh_owner`](crate::types::builders::VirtualRouterRefBuilder::mesh_owner)
/// - [`resource_owner`](crate::types::builders::VirtualRouterRefBuilder::resource_owner)
/// - [`arn`](crate::types::builders::VirtualRouterRefBuilder::arn)
/// - [`version`](crate::types::builders::VirtualRouterRefBuilder::version)
/// - [`created_at`](crate::types::builders::VirtualRouterRefBuilder::created_at)
/// - [`last_updated_at`](crate::types::builders::VirtualRouterRefBuilder::last_updated_at)
pub fn build(self) -> ::std::result::Result<crate::types::VirtualRouterRef, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::VirtualRouterRef {
mesh_name: self.mesh_name.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"mesh_name",
"mesh_name was not specified but it is required when building VirtualRouterRef",
)
})?,
virtual_router_name: self.virtual_router_name.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"virtual_router_name",
"virtual_router_name was not specified but it is required when building VirtualRouterRef",
)
})?,
mesh_owner: self.mesh_owner.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"mesh_owner",
"mesh_owner was not specified but it is required when building VirtualRouterRef",
)
})?,
resource_owner: self.resource_owner.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"resource_owner",
"resource_owner was not specified but it is required when building VirtualRouterRef",
)
})?,
arn: self.arn.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"arn",
"arn was not specified but it is required when building VirtualRouterRef",
)
})?,
version: self.version.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"version",
"version was not specified but it is required when building VirtualRouterRef",
)
})?,
created_at: self.created_at.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"created_at",
"created_at was not specified but it is required when building VirtualRouterRef",
)
})?,
last_updated_at: self.last_updated_at.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"last_updated_at",
"last_updated_at was not specified but it is required when building VirtualRouterRef",
)
})?,
})
}
}