#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ExperimentReport {
pub metric_name: ::std::option::Option<::std::string::String>,
pub treatment_name: ::std::option::Option<::std::string::String>,
pub report_name: ::std::option::Option<crate::types::ExperimentReportName>,
pub content: ::std::option::Option<::std::string::String>,
}
impl ExperimentReport {
pub fn metric_name(&self) -> ::std::option::Option<&str> {
self.metric_name.as_deref()
}
pub fn treatment_name(&self) -> ::std::option::Option<&str> {
self.treatment_name.as_deref()
}
pub fn report_name(&self) -> ::std::option::Option<&crate::types::ExperimentReportName> {
self.report_name.as_ref()
}
pub fn content(&self) -> ::std::option::Option<&str> {
self.content.as_deref()
}
}
impl ExperimentReport {
pub fn builder() -> crate::types::builders::ExperimentReportBuilder {
crate::types::builders::ExperimentReportBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ExperimentReportBuilder {
pub(crate) metric_name: ::std::option::Option<::std::string::String>,
pub(crate) treatment_name: ::std::option::Option<::std::string::String>,
pub(crate) report_name: ::std::option::Option<crate::types::ExperimentReportName>,
pub(crate) content: ::std::option::Option<::std::string::String>,
}
impl ExperimentReportBuilder {
pub fn metric_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.metric_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_metric_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.metric_name = input;
self
}
pub fn get_metric_name(&self) -> &::std::option::Option<::std::string::String> {
&self.metric_name
}
pub fn treatment_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.treatment_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_treatment_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.treatment_name = input;
self
}
pub fn get_treatment_name(&self) -> &::std::option::Option<::std::string::String> {
&self.treatment_name
}
pub fn report_name(mut self, input: crate::types::ExperimentReportName) -> Self {
self.report_name = ::std::option::Option::Some(input);
self
}
pub fn set_report_name(mut self, input: ::std::option::Option<crate::types::ExperimentReportName>) -> Self {
self.report_name = input;
self
}
pub fn get_report_name(&self) -> &::std::option::Option<crate::types::ExperimentReportName> {
&self.report_name
}
pub fn content(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.content = ::std::option::Option::Some(input.into());
self
}
pub fn set_content(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.content = input;
self
}
pub fn get_content(&self) -> &::std::option::Option<::std::string::String> {
&self.content
}
pub fn build(self) -> crate::types::ExperimentReport {
crate::types::ExperimentReport {
metric_name: self.metric_name,
treatment_name: self.treatment_name,
report_name: self.report_name,
content: self.content,
}
}
}