// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateSchedulingPolicyOutput {
///
The name of the scheduling policy.
pub name: ::std::option::Option<::std::string::String>,
/// The Amazon Resource Name (ARN) of the scheduling policy. The format is aws:Partition:batch:Region:Account:scheduling-policy/Name
. For example, aws:aws:batch:us-west-2:123456789012:scheduling-policy/MySchedulingPolicy
.
pub arn: ::std::option::Option<::std::string::String>,
_request_id: Option,
}
impl CreateSchedulingPolicyOutput {
/// The name of the scheduling policy.
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
/// The Amazon Resource Name (ARN) of the scheduling policy. The format is aws:Partition:batch:Region:Account:scheduling-policy/Name
. For example, aws:aws:batch:us-west-2:123456789012:scheduling-policy/MySchedulingPolicy
.
pub fn arn(&self) -> ::std::option::Option<&str> {
self.arn.as_deref()
}
}
impl ::aws_types::request_id::RequestId for CreateSchedulingPolicyOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateSchedulingPolicyOutput {
/// Creates a new builder-style object to manufacture [`CreateSchedulingPolicyOutput`](crate::operation::create_scheduling_policy::CreateSchedulingPolicyOutput).
pub fn builder() -> crate::operation::create_scheduling_policy::builders::CreateSchedulingPolicyOutputBuilder {
crate::operation::create_scheduling_policy::builders::CreateSchedulingPolicyOutputBuilder::default()
}
}
/// A builder for [`CreateSchedulingPolicyOutput`](crate::operation::create_scheduling_policy::CreateSchedulingPolicyOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateSchedulingPolicyOutputBuilder {
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) arn: ::std::option::Option<::std::string::String>,
_request_id: Option,
}
impl CreateSchedulingPolicyOutputBuilder {
/// The name of the scheduling policy.
/// This field is required.
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
/// The name of the scheduling policy.
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
/// The name of the scheduling policy.
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
/// The Amazon Resource Name (ARN) of the scheduling policy. The format is aws:Partition:batch:Region:Account:scheduling-policy/Name
. For example, aws:aws:batch:us-west-2:123456789012:scheduling-policy/MySchedulingPolicy
.
/// This field is required.
pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.arn = ::std::option::Option::Some(input.into());
self
}
/// The Amazon Resource Name (ARN) of the scheduling policy. The format is aws:Partition:batch:Region:Account:scheduling-policy/Name
. For example, aws:aws:batch:us-west-2:123456789012:scheduling-policy/MySchedulingPolicy
.
pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.arn = input;
self
}
/// The Amazon Resource Name (ARN) of the scheduling policy. The format is aws:Partition:batch:Region:Account:scheduling-policy/Name
. For example, aws:aws:batch:us-west-2:123456789012:scheduling-policy/MySchedulingPolicy
.
pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.arn
}
pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option) -> &mut Self {
self._request_id = request_id;
self
}
/// Consumes the builder and constructs a [`CreateSchedulingPolicyOutput`](crate::operation::create_scheduling_policy::CreateSchedulingPolicyOutput).
pub fn build(self) -> crate::operation::create_scheduling_policy::CreateSchedulingPolicyOutput {
crate::operation::create_scheduling_policy::CreateSchedulingPolicyOutput {
name: self.name,
arn: self.arn,
_request_id: self._request_id,
}
}
}