#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ParameterDeclaration {
pub parameter_key: ::std::option::Option<::std::string::String>,
pub default_value: ::std::option::Option<::std::string::String>,
pub parameter_type: ::std::option::Option<::std::string::String>,
pub no_echo: ::std::option::Option<bool>,
pub description: ::std::option::Option<::std::string::String>,
pub parameter_constraints: ::std::option::Option<crate::types::ParameterConstraints>,
}
impl ParameterDeclaration {
pub fn parameter_key(&self) -> ::std::option::Option<&str> {
self.parameter_key.as_deref()
}
pub fn default_value(&self) -> ::std::option::Option<&str> {
self.default_value.as_deref()
}
pub fn parameter_type(&self) -> ::std::option::Option<&str> {
self.parameter_type.as_deref()
}
pub fn no_echo(&self) -> ::std::option::Option<bool> {
self.no_echo
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
pub fn parameter_constraints(&self) -> ::std::option::Option<&crate::types::ParameterConstraints> {
self.parameter_constraints.as_ref()
}
}
impl ParameterDeclaration {
pub fn builder() -> crate::types::builders::ParameterDeclarationBuilder {
crate::types::builders::ParameterDeclarationBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ParameterDeclarationBuilder {
pub(crate) parameter_key: ::std::option::Option<::std::string::String>,
pub(crate) default_value: ::std::option::Option<::std::string::String>,
pub(crate) parameter_type: ::std::option::Option<::std::string::String>,
pub(crate) no_echo: ::std::option::Option<bool>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) parameter_constraints: ::std::option::Option<crate::types::ParameterConstraints>,
}
impl ParameterDeclarationBuilder {
pub fn parameter_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.parameter_key = ::std::option::Option::Some(input.into());
self
}
pub fn set_parameter_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.parameter_key = input;
self
}
pub fn get_parameter_key(&self) -> &::std::option::Option<::std::string::String> {
&self.parameter_key
}
pub fn default_value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.default_value = ::std::option::Option::Some(input.into());
self
}
pub fn set_default_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.default_value = input;
self
}
pub fn get_default_value(&self) -> &::std::option::Option<::std::string::String> {
&self.default_value
}
pub fn parameter_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.parameter_type = ::std::option::Option::Some(input.into());
self
}
pub fn set_parameter_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.parameter_type = input;
self
}
pub fn get_parameter_type(&self) -> &::std::option::Option<::std::string::String> {
&self.parameter_type
}
pub fn no_echo(mut self, input: bool) -> Self {
self.no_echo = ::std::option::Option::Some(input);
self
}
pub fn set_no_echo(mut self, input: ::std::option::Option<bool>) -> Self {
self.no_echo = input;
self
}
pub fn get_no_echo(&self) -> &::std::option::Option<bool> {
&self.no_echo
}
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 parameter_constraints(mut self, input: crate::types::ParameterConstraints) -> Self {
self.parameter_constraints = ::std::option::Option::Some(input);
self
}
pub fn set_parameter_constraints(mut self, input: ::std::option::Option<crate::types::ParameterConstraints>) -> Self {
self.parameter_constraints = input;
self
}
pub fn get_parameter_constraints(&self) -> &::std::option::Option<crate::types::ParameterConstraints> {
&self.parameter_constraints
}
pub fn build(self) -> crate::types::ParameterDeclaration {
crate::types::ParameterDeclaration {
parameter_key: self.parameter_key,
default_value: self.default_value,
parameter_type: self.parameter_type,
no_echo: self.no_echo,
description: self.description,
parameter_constraints: self.parameter_constraints,
}
}
}