#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct StartSnapshotOutput {
pub description: ::std::option::Option<::std::string::String>,
pub snapshot_id: ::std::option::Option<::std::string::String>,
pub owner_id: ::std::option::Option<::std::string::String>,
pub status: ::std::option::Option<crate::types::Status>,
pub start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub volume_size: ::std::option::Option<i64>,
pub block_size: ::std::option::Option<i32>,
pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
pub parent_snapshot_id: ::std::option::Option<::std::string::String>,
pub kms_key_arn: ::std::option::Option<::std::string::String>,
pub sse_type: ::std::option::Option<crate::types::SseType>,
_request_id: Option<String>,
}
impl StartSnapshotOutput {
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
pub fn snapshot_id(&self) -> ::std::option::Option<&str> {
self.snapshot_id.as_deref()
}
pub fn owner_id(&self) -> ::std::option::Option<&str> {
self.owner_id.as_deref()
}
pub fn status(&self) -> ::std::option::Option<&crate::types::Status> {
self.status.as_ref()
}
pub fn start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.start_time.as_ref()
}
pub fn volume_size(&self) -> ::std::option::Option<i64> {
self.volume_size
}
pub fn block_size(&self) -> ::std::option::Option<i32> {
self.block_size
}
pub fn tags(&self) -> &[crate::types::Tag] {
self.tags.as_deref().unwrap_or_default()
}
pub fn parent_snapshot_id(&self) -> ::std::option::Option<&str> {
self.parent_snapshot_id.as_deref()
}
pub fn kms_key_arn(&self) -> ::std::option::Option<&str> {
self.kms_key_arn.as_deref()
}
pub fn sse_type(&self) -> ::std::option::Option<&crate::types::SseType> {
self.sse_type.as_ref()
}
}
impl ::std::fmt::Debug for StartSnapshotOutput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("StartSnapshotOutput");
formatter.field("description", &self.description);
formatter.field("snapshot_id", &self.snapshot_id);
formatter.field("owner_id", &self.owner_id);
formatter.field("status", &self.status);
formatter.field("start_time", &self.start_time);
formatter.field("volume_size", &self.volume_size);
formatter.field("block_size", &self.block_size);
formatter.field("tags", &self.tags);
formatter.field("parent_snapshot_id", &self.parent_snapshot_id);
formatter.field("kms_key_arn", &"*** Sensitive Data Redacted ***");
formatter.field("sse_type", &self.sse_type);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}
static STARTSNAPSHOTOUTPUT_MEMBER_DESCRIPTION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.ebs.synthetic#StartSnapshotOutput$Description",
"com.amazonaws.ebs.synthetic",
"StartSnapshotOutput",
),
::aws_smithy_schema::ShapeType::String,
"Description",
0,
);
static STARTSNAPSHOTOUTPUT_MEMBER_SNAPSHOT_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.ebs.synthetic#StartSnapshotOutput$SnapshotId",
"com.amazonaws.ebs.synthetic",
"StartSnapshotOutput",
),
::aws_smithy_schema::ShapeType::String,
"SnapshotId",
1,
);
static STARTSNAPSHOTOUTPUT_MEMBER_OWNER_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.ebs.synthetic#StartSnapshotOutput$OwnerId",
"com.amazonaws.ebs.synthetic",
"StartSnapshotOutput",
),
::aws_smithy_schema::ShapeType::String,
"OwnerId",
2,
);
static STARTSNAPSHOTOUTPUT_MEMBER_STATUS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.ebs.synthetic#StartSnapshotOutput$Status",
"com.amazonaws.ebs.synthetic",
"StartSnapshotOutput",
),
::aws_smithy_schema::ShapeType::String,
"Status",
3,
);
static STARTSNAPSHOTOUTPUT_MEMBER_START_TIME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.ebs.synthetic#StartSnapshotOutput$StartTime",
"com.amazonaws.ebs.synthetic",
"StartSnapshotOutput",
),
::aws_smithy_schema::ShapeType::Timestamp,
"StartTime",
4,
);
static STARTSNAPSHOTOUTPUT_MEMBER_VOLUME_SIZE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.ebs.synthetic#StartSnapshotOutput$VolumeSize",
"com.amazonaws.ebs.synthetic",
"StartSnapshotOutput",
),
::aws_smithy_schema::ShapeType::Long,
"VolumeSize",
5,
);
static STARTSNAPSHOTOUTPUT_MEMBER_BLOCK_SIZE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.ebs.synthetic#StartSnapshotOutput$BlockSize",
"com.amazonaws.ebs.synthetic",
"StartSnapshotOutput",
),
::aws_smithy_schema::ShapeType::Integer,
"BlockSize",
6,
);
static STARTSNAPSHOTOUTPUT_MEMBER_TAGS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ebs#Tags$member", "com.amazonaws.ebs", "Tags"),
::aws_smithy_schema::ShapeType::Structure,
"member",
0,
);
static STARTSNAPSHOTOUTPUT_MEMBER_TAGS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.ebs.synthetic#StartSnapshotOutput$Tags",
"com.amazonaws.ebs.synthetic",
"StartSnapshotOutput",
),
::aws_smithy_schema::ShapeType::List,
"Tags",
7,
)
.with_list_member(&STARTSNAPSHOTOUTPUT_MEMBER_TAGS_MEMBER);
static STARTSNAPSHOTOUTPUT_MEMBER_PARENT_SNAPSHOT_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.ebs.synthetic#StartSnapshotOutput$ParentSnapshotId",
"com.amazonaws.ebs.synthetic",
"StartSnapshotOutput",
),
::aws_smithy_schema::ShapeType::String,
"ParentSnapshotId",
8,
);
static STARTSNAPSHOTOUTPUT_MEMBER_KMS_KEY_ARN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.ebs.synthetic#StartSnapshotOutput$KmsKeyArn",
"com.amazonaws.ebs.synthetic",
"StartSnapshotOutput",
),
::aws_smithy_schema::ShapeType::String,
"KmsKeyArn",
9,
);
static STARTSNAPSHOTOUTPUT_MEMBER_SSE_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.ebs.synthetic#StartSnapshotOutput$SseType",
"com.amazonaws.ebs.synthetic",
"StartSnapshotOutput",
),
::aws_smithy_schema::ShapeType::String,
"SseType",
10,
);
static STARTSNAPSHOTOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.ebs.synthetic#StartSnapshotOutput",
"com.amazonaws.ebs.synthetic",
"StartSnapshotOutput",
),
::aws_smithy_schema::ShapeType::Structure,
&[
&STARTSNAPSHOTOUTPUT_MEMBER_DESCRIPTION,
&STARTSNAPSHOTOUTPUT_MEMBER_SNAPSHOT_ID,
&STARTSNAPSHOTOUTPUT_MEMBER_OWNER_ID,
&STARTSNAPSHOTOUTPUT_MEMBER_STATUS,
&STARTSNAPSHOTOUTPUT_MEMBER_START_TIME,
&STARTSNAPSHOTOUTPUT_MEMBER_VOLUME_SIZE,
&STARTSNAPSHOTOUTPUT_MEMBER_BLOCK_SIZE,
&STARTSNAPSHOTOUTPUT_MEMBER_TAGS,
&STARTSNAPSHOTOUTPUT_MEMBER_PARENT_SNAPSHOT_ID,
&STARTSNAPSHOTOUTPUT_MEMBER_KMS_KEY_ARN,
&STARTSNAPSHOTOUTPUT_MEMBER_SSE_TYPE,
],
)
.with_original_name("StartSnapshotResponse");
impl StartSnapshotOutput {
pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &STARTSNAPSHOTOUTPUT_SCHEMA;
}
impl ::aws_smithy_schema::serde::SerializableStruct for StartSnapshotOutput {
fn schema(&self) -> &::aws_smithy_schema::Schema<'_> {
Self::SCHEMA
}
#[allow(unused_variables, clippy::diverging_sub_expression)]
fn serialize_members(
&self,
ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
if let Some(ref val) = self.description {
ser.write_string(&STARTSNAPSHOTOUTPUT_MEMBER_DESCRIPTION, val)?;
}
if let Some(ref val) = self.snapshot_id {
ser.write_string(&STARTSNAPSHOTOUTPUT_MEMBER_SNAPSHOT_ID, val)?;
}
if let Some(ref val) = self.owner_id {
ser.write_string(&STARTSNAPSHOTOUTPUT_MEMBER_OWNER_ID, val)?;
}
if let Some(ref val) = self.status {
ser.write_string(&STARTSNAPSHOTOUTPUT_MEMBER_STATUS, val.as_str())?;
}
if let Some(ref val) = self.start_time {
ser.write_timestamp(&STARTSNAPSHOTOUTPUT_MEMBER_START_TIME, val)?;
}
if let Some(ref val) = self.volume_size {
ser.write_long(&STARTSNAPSHOTOUTPUT_MEMBER_VOLUME_SIZE, *val)?;
}
if let Some(ref val) = self.block_size {
ser.write_integer(&STARTSNAPSHOTOUTPUT_MEMBER_BLOCK_SIZE, *val)?;
}
if let Some(ref val) = self.tags {
ser.write_list(
&STARTSNAPSHOTOUTPUT_MEMBER_TAGS,
&|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
for item in val {
ser.write_struct(crate::types::Tag::SCHEMA, item)?;
}
Ok(())
},
)?;
}
if let Some(ref val) = self.parent_snapshot_id {
ser.write_string(&STARTSNAPSHOTOUTPUT_MEMBER_PARENT_SNAPSHOT_ID, val)?;
}
if let Some(ref val) = self.kms_key_arn {
ser.write_string(&STARTSNAPSHOTOUTPUT_MEMBER_KMS_KEY_ARN, val)?;
}
if let Some(ref val) = self.sse_type {
ser.write_string(&STARTSNAPSHOTOUTPUT_MEMBER_SSE_TYPE, val.as_str())?;
}
Ok(())
}
}
impl crate::operation::start_snapshot::builders::StartSnapshotOutputBuilder {
#[allow(
unused_variables,
unreachable_code,
clippy::single_match,
clippy::match_single_binding,
clippy::diverging_sub_expression
)]
pub(crate) fn deserialize_members(
&mut self,
deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
deserializer.read_struct(&STARTSNAPSHOTOUTPUT_SCHEMA, &mut |member, deser| {
match member.member_index() {
Some(0) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.description = Some(deser.read_string(member)?);
}
}
Some(1) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.snapshot_id = Some(deser.read_string(member)?);
}
}
Some(2) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.owner_id = Some(deser.read_string(member)?);
}
}
Some(3) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.status = Some(crate::types::Status::from(deser.read_string(member)?.as_str()));
}
}
Some(4) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.start_time = Some(deser.read_timestamp(member)?);
}
}
Some(5) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.volume_size = Some(deser.read_long(member)?);
}
}
Some(6) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.block_size = Some(deser.read_integer(member)?);
}
}
Some(7) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.tags = Some({
let mut container = Vec::new();
deser.read_list(member, &mut |deser| {
container.push(crate::types::Tag::deserialize(deser)?);
Ok(())
})?;
container
});
}
}
Some(8) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.parent_snapshot_id = Some(deser.read_string(member)?);
}
}
Some(9) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.kms_key_arn = Some(deser.read_string(member)?);
}
}
Some(10) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.sse_type = Some(crate::types::SseType::from(deser.read_string(member)?.as_str()));
}
}
_ => {}
}
Ok(())
})
}
}
impl StartSnapshotOutput {
pub fn deserialize(
deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
let mut builder = Self::builder();
builder.deserialize_members(deserializer)?;
Ok(builder.build())
}
}
impl ::aws_types::request_id::RequestId for StartSnapshotOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl StartSnapshotOutput {
pub fn builder() -> crate::operation::start_snapshot::builders::StartSnapshotOutputBuilder {
crate::operation::start_snapshot::builders::StartSnapshotOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct StartSnapshotOutputBuilder {
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) snapshot_id: ::std::option::Option<::std::string::String>,
pub(crate) owner_id: ::std::option::Option<::std::string::String>,
pub(crate) status: ::std::option::Option<crate::types::Status>,
pub(crate) start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) volume_size: ::std::option::Option<i64>,
pub(crate) block_size: ::std::option::Option<i32>,
pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
pub(crate) parent_snapshot_id: ::std::option::Option<::std::string::String>,
pub(crate) kms_key_arn: ::std::option::Option<::std::string::String>,
pub(crate) sse_type: ::std::option::Option<crate::types::SseType>,
_request_id: Option<String>,
}
impl StartSnapshotOutputBuilder {
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
pub fn snapshot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.snapshot_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_snapshot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.snapshot_id = input;
self
}
pub fn get_snapshot_id(&self) -> &::std::option::Option<::std::string::String> {
&self.snapshot_id
}
pub fn owner_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.owner_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_owner_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.owner_id = input;
self
}
pub fn get_owner_id(&self) -> &::std::option::Option<::std::string::String> {
&self.owner_id
}
pub fn status(mut self, input: crate::types::Status) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
pub fn set_status(mut self, input: ::std::option::Option<crate::types::Status>) -> Self {
self.status = input;
self
}
pub fn get_status(&self) -> &::std::option::Option<crate::types::Status> {
&self.status
}
pub fn start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.start_time = ::std::option::Option::Some(input);
self
}
pub fn set_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.start_time = input;
self
}
pub fn get_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.start_time
}
pub fn volume_size(mut self, input: i64) -> Self {
self.volume_size = ::std::option::Option::Some(input);
self
}
pub fn set_volume_size(mut self, input: ::std::option::Option<i64>) -> Self {
self.volume_size = input;
self
}
pub fn get_volume_size(&self) -> &::std::option::Option<i64> {
&self.volume_size
}
pub fn block_size(mut self, input: i32) -> Self {
self.block_size = ::std::option::Option::Some(input);
self
}
pub fn set_block_size(mut self, input: ::std::option::Option<i32>) -> Self {
self.block_size = input;
self
}
pub fn get_block_size(&self) -> &::std::option::Option<i32> {
&self.block_size
}
pub fn tags(mut self, input: crate::types::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = ::std::option::Option::Some(v);
self
}
pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
self.tags = input;
self
}
pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
&self.tags
}
pub fn parent_snapshot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.parent_snapshot_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_parent_snapshot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.parent_snapshot_id = input;
self
}
pub fn get_parent_snapshot_id(&self) -> &::std::option::Option<::std::string::String> {
&self.parent_snapshot_id
}
pub fn kms_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.kms_key_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_kms_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.kms_key_arn = input;
self
}
pub fn get_kms_key_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.kms_key_arn
}
pub fn sse_type(mut self, input: crate::types::SseType) -> Self {
self.sse_type = ::std::option::Option::Some(input);
self
}
pub fn set_sse_type(mut self, input: ::std::option::Option<crate::types::SseType>) -> Self {
self.sse_type = input;
self
}
pub fn get_sse_type(&self) -> &::std::option::Option<crate::types::SseType> {
&self.sse_type
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
pub fn build(self) -> crate::operation::start_snapshot::StartSnapshotOutput {
crate::operation::start_snapshot::StartSnapshotOutput {
description: self.description,
snapshot_id: self.snapshot_id,
owner_id: self.owner_id,
status: self.status,
start_time: self.start_time,
volume_size: self.volume_size,
block_size: self.block_size,
tags: self.tags,
parent_snapshot_id: self.parent_snapshot_id,
kms_key_arn: self.kms_key_arn,
sse_type: self.sse_type,
_request_id: self._request_id,
}
}
}
impl ::std::fmt::Debug for StartSnapshotOutputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("StartSnapshotOutputBuilder");
formatter.field("description", &self.description);
formatter.field("snapshot_id", &self.snapshot_id);
formatter.field("owner_id", &self.owner_id);
formatter.field("status", &self.status);
formatter.field("start_time", &self.start_time);
formatter.field("volume_size", &self.volume_size);
formatter.field("block_size", &self.block_size);
formatter.field("tags", &self.tags);
formatter.field("parent_snapshot_id", &self.parent_snapshot_id);
formatter.field("kms_key_arn", &"*** Sensitive Data Redacted ***");
formatter.field("sse_type", &self.sse_type);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}