#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateLibraryItemOutput {
pub library_item_id: ::std::string::String,
pub app_id: ::std::string::String,
pub app_version: i32,
pub categories: ::std::vec::Vec<crate::types::Category>,
pub status: ::std::string::String,
pub created_at: ::aws_smithy_types::DateTime,
pub created_by: ::std::string::String,
pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub updated_by: ::std::option::Option<::std::string::String>,
pub rating_count: i32,
pub is_rated_by_user: ::std::option::Option<bool>,
pub user_count: ::std::option::Option<i32>,
pub is_verified: ::std::option::Option<bool>,
_request_id: Option<String>,
}
impl UpdateLibraryItemOutput {
pub fn library_item_id(&self) -> &str {
use std::ops::Deref;
self.library_item_id.deref()
}
pub fn app_id(&self) -> &str {
use std::ops::Deref;
self.app_id.deref()
}
pub fn app_version(&self) -> i32 {
self.app_version
}
pub fn categories(&self) -> &[crate::types::Category] {
use std::ops::Deref;
self.categories.deref()
}
pub fn status(&self) -> &str {
use std::ops::Deref;
self.status.deref()
}
pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
&self.created_at
}
pub fn created_by(&self) -> &str {
use std::ops::Deref;
self.created_by.deref()
}
pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.updated_at.as_ref()
}
pub fn updated_by(&self) -> ::std::option::Option<&str> {
self.updated_by.as_deref()
}
pub fn rating_count(&self) -> i32 {
self.rating_count
}
pub fn is_rated_by_user(&self) -> ::std::option::Option<bool> {
self.is_rated_by_user
}
pub fn user_count(&self) -> ::std::option::Option<i32> {
self.user_count
}
pub fn is_verified(&self) -> ::std::option::Option<bool> {
self.is_verified
}
}
impl ::aws_types::request_id::RequestId for UpdateLibraryItemOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl UpdateLibraryItemOutput {
pub fn builder() -> crate::operation::update_library_item::builders::UpdateLibraryItemOutputBuilder {
crate::operation::update_library_item::builders::UpdateLibraryItemOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateLibraryItemOutputBuilder {
pub(crate) library_item_id: ::std::option::Option<::std::string::String>,
pub(crate) app_id: ::std::option::Option<::std::string::String>,
pub(crate) app_version: ::std::option::Option<i32>,
pub(crate) categories: ::std::option::Option<::std::vec::Vec<crate::types::Category>>,
pub(crate) status: ::std::option::Option<::std::string::String>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) created_by: ::std::option::Option<::std::string::String>,
pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) updated_by: ::std::option::Option<::std::string::String>,
pub(crate) rating_count: ::std::option::Option<i32>,
pub(crate) is_rated_by_user: ::std::option::Option<bool>,
pub(crate) user_count: ::std::option::Option<i32>,
pub(crate) is_verified: ::std::option::Option<bool>,
_request_id: Option<String>,
}
impl UpdateLibraryItemOutputBuilder {
pub fn library_item_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.library_item_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_library_item_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.library_item_id = input;
self
}
pub fn get_library_item_id(&self) -> &::std::option::Option<::std::string::String> {
&self.library_item_id
}
pub fn app_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.app_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_app_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.app_id = input;
self
}
pub fn get_app_id(&self) -> &::std::option::Option<::std::string::String> {
&self.app_id
}
pub fn app_version(mut self, input: i32) -> Self {
self.app_version = ::std::option::Option::Some(input);
self
}
pub fn set_app_version(mut self, input: ::std::option::Option<i32>) -> Self {
self.app_version = input;
self
}
pub fn get_app_version(&self) -> &::std::option::Option<i32> {
&self.app_version
}
pub fn categories(mut self, input: crate::types::Category) -> Self {
let mut v = self.categories.unwrap_or_default();
v.push(input);
self.categories = ::std::option::Option::Some(v);
self
}
pub fn set_categories(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Category>>) -> Self {
self.categories = input;
self
}
pub fn get_categories(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Category>> {
&self.categories
}
pub fn status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.status = ::std::option::Option::Some(input.into());
self
}
pub fn set_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.status = input;
self
}
pub fn get_status(&self) -> &::std::option::Option<::std::string::String> {
&self.status
}
pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_at = ::std::option::Option::Some(input);
self
}
pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created_at = input;
self
}
pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_at
}
pub fn created_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.created_by = ::std::option::Option::Some(input.into());
self
}
pub fn set_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.created_by = input;
self
}
pub fn get_created_by(&self) -> &::std::option::Option<::std::string::String> {
&self.created_by
}
pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.updated_at = ::std::option::Option::Some(input);
self
}
pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.updated_at = input;
self
}
pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.updated_at
}
pub fn updated_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.updated_by = ::std::option::Option::Some(input.into());
self
}
pub fn set_updated_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.updated_by = input;
self
}
pub fn get_updated_by(&self) -> &::std::option::Option<::std::string::String> {
&self.updated_by
}
pub fn rating_count(mut self, input: i32) -> Self {
self.rating_count = ::std::option::Option::Some(input);
self
}
pub fn set_rating_count(mut self, input: ::std::option::Option<i32>) -> Self {
self.rating_count = input;
self
}
pub fn get_rating_count(&self) -> &::std::option::Option<i32> {
&self.rating_count
}
pub fn is_rated_by_user(mut self, input: bool) -> Self {
self.is_rated_by_user = ::std::option::Option::Some(input);
self
}
pub fn set_is_rated_by_user(mut self, input: ::std::option::Option<bool>) -> Self {
self.is_rated_by_user = input;
self
}
pub fn get_is_rated_by_user(&self) -> &::std::option::Option<bool> {
&self.is_rated_by_user
}
pub fn user_count(mut self, input: i32) -> Self {
self.user_count = ::std::option::Option::Some(input);
self
}
pub fn set_user_count(mut self, input: ::std::option::Option<i32>) -> Self {
self.user_count = input;
self
}
pub fn get_user_count(&self) -> &::std::option::Option<i32> {
&self.user_count
}
pub fn is_verified(mut self, input: bool) -> Self {
self.is_verified = ::std::option::Option::Some(input);
self
}
pub fn set_is_verified(mut self, input: ::std::option::Option<bool>) -> Self {
self.is_verified = input;
self
}
pub fn get_is_verified(&self) -> &::std::option::Option<bool> {
&self.is_verified
}
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,
) -> ::std::result::Result<crate::operation::update_library_item::UpdateLibraryItemOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::update_library_item::UpdateLibraryItemOutput {
library_item_id: self.library_item_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"library_item_id",
"library_item_id was not specified but it is required when building UpdateLibraryItemOutput",
)
})?,
app_id: self.app_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"app_id",
"app_id was not specified but it is required when building UpdateLibraryItemOutput",
)
})?,
app_version: self.app_version.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"app_version",
"app_version was not specified but it is required when building UpdateLibraryItemOutput",
)
})?,
categories: self.categories.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"categories",
"categories was not specified but it is required when building UpdateLibraryItemOutput",
)
})?,
status: self.status.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"status",
"status was not specified but it is required when building UpdateLibraryItemOutput",
)
})?,
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 UpdateLibraryItemOutput",
)
})?,
created_by: self.created_by.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"created_by",
"created_by was not specified but it is required when building UpdateLibraryItemOutput",
)
})?,
updated_at: self.updated_at,
updated_by: self.updated_by,
rating_count: self.rating_count.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"rating_count",
"rating_count was not specified but it is required when building UpdateLibraryItemOutput",
)
})?,
is_rated_by_user: self.is_rated_by_user,
user_count: self.user_count,
is_verified: self.is_verified,
_request_id: self._request_id,
})
}
}