#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateMetricInput {
pub app_id: ::std::option::Option<::std::string::String>,
pub metric_id: ::std::option::Option<::std::string::String>,
pub name: ::std::option::Option<::std::string::String>,
pub description: ::std::option::Option<::std::string::String>,
pub event_type: ::std::option::Option<::std::string::String>,
pub unit_name: ::std::option::Option<::std::string::String>,
pub definition: ::std::option::Option<crate::types::MetricDefinition>,
}
impl UpdateMetricInput {
pub fn app_id(&self) -> ::std::option::Option<&str> {
self.app_id.as_deref()
}
pub fn metric_id(&self) -> ::std::option::Option<&str> {
self.metric_id.as_deref()
}
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
pub fn event_type(&self) -> ::std::option::Option<&str> {
self.event_type.as_deref()
}
pub fn unit_name(&self) -> ::std::option::Option<&str> {
self.unit_name.as_deref()
}
pub fn definition(&self) -> ::std::option::Option<&crate::types::MetricDefinition> {
self.definition.as_ref()
}
}
impl UpdateMetricInput {
pub fn builder() -> crate::operation::update_metric::builders::UpdateMetricInputBuilder {
crate::operation::update_metric::builders::UpdateMetricInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateMetricInputBuilder {
pub(crate) app_id: ::std::option::Option<::std::string::String>,
pub(crate) metric_id: ::std::option::Option<::std::string::String>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) event_type: ::std::option::Option<::std::string::String>,
pub(crate) unit_name: ::std::option::Option<::std::string::String>,
pub(crate) definition: ::std::option::Option<crate::types::MetricDefinition>,
}
impl UpdateMetricInputBuilder {
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 metric_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.metric_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_metric_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.metric_id = input;
self
}
pub fn get_metric_id(&self) -> &::std::option::Option<::std::string::String> {
&self.metric_id
}
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
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 event_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.event_type = ::std::option::Option::Some(input.into());
self
}
pub fn set_event_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.event_type = input;
self
}
pub fn get_event_type(&self) -> &::std::option::Option<::std::string::String> {
&self.event_type
}
pub fn unit_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.unit_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_unit_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.unit_name = input;
self
}
pub fn get_unit_name(&self) -> &::std::option::Option<::std::string::String> {
&self.unit_name
}
pub fn definition(mut self, input: crate::types::MetricDefinition) -> Self {
self.definition = ::std::option::Option::Some(input);
self
}
pub fn set_definition(mut self, input: ::std::option::Option<crate::types::MetricDefinition>) -> Self {
self.definition = input;
self
}
pub fn get_definition(&self) -> &::std::option::Option<crate::types::MetricDefinition> {
&self.definition
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::update_metric::UpdateMetricInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::update_metric::UpdateMetricInput {
app_id: self.app_id,
metric_id: self.metric_id,
name: self.name,
description: self.description,
event_type: self.event_type,
unit_name: self.unit_name,
definition: self.definition,
})
}
}