#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct StopNotebookRunOutput {
pub id: ::std::string::String,
pub domain_id: ::std::string::String,
pub owning_project_id: ::std::string::String,
pub status: crate::types::NotebookRunStatus,
_request_id: Option<String>,
}
impl StopNotebookRunOutput {
pub fn id(&self) -> &str {
use std::ops::Deref;
self.id.deref()
}
pub fn domain_id(&self) -> &str {
use std::ops::Deref;
self.domain_id.deref()
}
pub fn owning_project_id(&self) -> &str {
use std::ops::Deref;
self.owning_project_id.deref()
}
pub fn status(&self) -> &crate::types::NotebookRunStatus {
&self.status
}
}
impl ::aws_types::request_id::RequestId for StopNotebookRunOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl StopNotebookRunOutput {
pub fn builder() -> crate::operation::stop_notebook_run::builders::StopNotebookRunOutputBuilder {
crate::operation::stop_notebook_run::builders::StopNotebookRunOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StopNotebookRunOutputBuilder {
pub(crate) id: ::std::option::Option<::std::string::String>,
pub(crate) domain_id: ::std::option::Option<::std::string::String>,
pub(crate) owning_project_id: ::std::option::Option<::std::string::String>,
pub(crate) status: ::std::option::Option<crate::types::NotebookRunStatus>,
_request_id: Option<String>,
}
impl StopNotebookRunOutputBuilder {
pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.id = ::std::option::Option::Some(input.into());
self
}
pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.id = input;
self
}
pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
&self.id
}
pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.domain_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.domain_id = input;
self
}
pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
&self.domain_id
}
pub fn owning_project_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.owning_project_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_owning_project_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.owning_project_id = input;
self
}
pub fn get_owning_project_id(&self) -> &::std::option::Option<::std::string::String> {
&self.owning_project_id
}
pub fn status(mut self, input: crate::types::NotebookRunStatus) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
pub fn set_status(mut self, input: ::std::option::Option<crate::types::NotebookRunStatus>) -> Self {
self.status = input;
self
}
pub fn get_status(&self) -> &::std::option::Option<crate::types::NotebookRunStatus> {
&self.status
}
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::stop_notebook_run::StopNotebookRunOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::stop_notebook_run::StopNotebookRunOutput {
id: self.id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"id",
"id was not specified but it is required when building StopNotebookRunOutput",
)
})?,
domain_id: self.domain_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"domain_id",
"domain_id was not specified but it is required when building StopNotebookRunOutput",
)
})?,
owning_project_id: self.owning_project_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"owning_project_id",
"owning_project_id was not specified but it is required when building StopNotebookRunOutput",
)
})?,
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 StopNotebookRunOutput",
)
})?,
_request_id: self._request_id,
})
}
}