#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateCodeReviewOutput {
pub code_review_id: ::std::string::String,
pub title: ::std::option::Option<::std::string::String>,
pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub assets: ::std::option::Option<crate::types::Assets>,
pub service_role: ::std::option::Option<::std::string::String>,
pub log_config: ::std::option::Option<crate::types::CloudWatchLog>,
pub agent_space_id: ::std::option::Option<::std::string::String>,
pub code_remediation_strategy: ::std::option::Option<crate::types::CodeRemediationStrategy>,
_request_id: Option<String>,
}
impl CreateCodeReviewOutput {
pub fn code_review_id(&self) -> &str {
use std::ops::Deref;
self.code_review_id.deref()
}
pub fn title(&self) -> ::std::option::Option<&str> {
self.title.as_deref()
}
pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.created_at.as_ref()
}
pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.updated_at.as_ref()
}
pub fn assets(&self) -> ::std::option::Option<&crate::types::Assets> {
self.assets.as_ref()
}
pub fn service_role(&self) -> ::std::option::Option<&str> {
self.service_role.as_deref()
}
pub fn log_config(&self) -> ::std::option::Option<&crate::types::CloudWatchLog> {
self.log_config.as_ref()
}
pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
self.agent_space_id.as_deref()
}
pub fn code_remediation_strategy(&self) -> ::std::option::Option<&crate::types::CodeRemediationStrategy> {
self.code_remediation_strategy.as_ref()
}
}
impl ::aws_types::request_id::RequestId for CreateCodeReviewOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateCodeReviewOutput {
pub fn builder() -> crate::operation::create_code_review::builders::CreateCodeReviewOutputBuilder {
crate::operation::create_code_review::builders::CreateCodeReviewOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateCodeReviewOutputBuilder {
pub(crate) code_review_id: ::std::option::Option<::std::string::String>,
pub(crate) title: ::std::option::Option<::std::string::String>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) assets: ::std::option::Option<crate::types::Assets>,
pub(crate) service_role: ::std::option::Option<::std::string::String>,
pub(crate) log_config: ::std::option::Option<crate::types::CloudWatchLog>,
pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
pub(crate) code_remediation_strategy: ::std::option::Option<crate::types::CodeRemediationStrategy>,
_request_id: Option<String>,
}
impl CreateCodeReviewOutputBuilder {
pub fn code_review_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.code_review_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_code_review_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.code_review_id = input;
self
}
pub fn get_code_review_id(&self) -> &::std::option::Option<::std::string::String> {
&self.code_review_id
}
pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.title = ::std::option::Option::Some(input.into());
self
}
pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.title = input;
self
}
pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
&self.title
}
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 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 assets(mut self, input: crate::types::Assets) -> Self {
self.assets = ::std::option::Option::Some(input);
self
}
pub fn set_assets(mut self, input: ::std::option::Option<crate::types::Assets>) -> Self {
self.assets = input;
self
}
pub fn get_assets(&self) -> &::std::option::Option<crate::types::Assets> {
&self.assets
}
pub fn service_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.service_role = ::std::option::Option::Some(input.into());
self
}
pub fn set_service_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.service_role = input;
self
}
pub fn get_service_role(&self) -> &::std::option::Option<::std::string::String> {
&self.service_role
}
pub fn log_config(mut self, input: crate::types::CloudWatchLog) -> Self {
self.log_config = ::std::option::Option::Some(input);
self
}
pub fn set_log_config(mut self, input: ::std::option::Option<crate::types::CloudWatchLog>) -> Self {
self.log_config = input;
self
}
pub fn get_log_config(&self) -> &::std::option::Option<crate::types::CloudWatchLog> {
&self.log_config
}
pub fn agent_space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.agent_space_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_agent_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.agent_space_id = input;
self
}
pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
&self.agent_space_id
}
pub fn code_remediation_strategy(mut self, input: crate::types::CodeRemediationStrategy) -> Self {
self.code_remediation_strategy = ::std::option::Option::Some(input);
self
}
pub fn set_code_remediation_strategy(mut self, input: ::std::option::Option<crate::types::CodeRemediationStrategy>) -> Self {
self.code_remediation_strategy = input;
self
}
pub fn get_code_remediation_strategy(&self) -> &::std::option::Option<crate::types::CodeRemediationStrategy> {
&self.code_remediation_strategy
}
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::create_code_review::CreateCodeReviewOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_code_review::CreateCodeReviewOutput {
code_review_id: self.code_review_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"code_review_id",
"code_review_id was not specified but it is required when building CreateCodeReviewOutput",
)
})?,
title: self.title,
created_at: self.created_at,
updated_at: self.updated_at,
assets: self.assets,
service_role: self.service_role,
log_config: self.log_config,
agent_space_id: self.agent_space_id,
code_remediation_strategy: self.code_remediation_strategy,
_request_id: self._request_id,
})
}
}