1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Contains the configuration parameters for a job-completion report.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct JobReport {
/// <p>The Amazon Resource Name (ARN) for the bucket where specified job-completion report will be stored.</p>
pub bucket: ::std::option::Option<::std::string::String>,
/// <p>The format of the specified job-completion report.</p>
pub format: ::std::option::Option<crate::types::JobReportFormat>,
/// <p>Indicates whether the specified job will generate a job-completion report.</p>
pub enabled: bool,
/// <p>An optional prefix to describe where in the specified bucket the job-completion report will be stored. Amazon S3 stores the job-completion report at <code><prefix>
/// /job-
/// <job-id>
/// /report.json
/// </job-id>
/// </prefix></code>.</p>
pub prefix: ::std::option::Option<::std::string::String>,
/// <p>Indicates whether the job-completion report will include details of all tasks or only failed tasks.</p>
pub report_scope: ::std::option::Option<crate::types::JobReportScope>,
}
impl JobReport {
/// <p>The Amazon Resource Name (ARN) for the bucket where specified job-completion report will be stored.</p>
pub fn bucket(&self) -> ::std::option::Option<&str> {
self.bucket.as_deref()
}
/// <p>The format of the specified job-completion report.</p>
pub fn format(&self) -> ::std::option::Option<&crate::types::JobReportFormat> {
self.format.as_ref()
}
/// <p>Indicates whether the specified job will generate a job-completion report.</p>
pub fn enabled(&self) -> bool {
self.enabled
}
/// <p>An optional prefix to describe where in the specified bucket the job-completion report will be stored. Amazon S3 stores the job-completion report at <code><prefix>
/// /job-
/// <job-id>
/// /report.json
/// </job-id>
/// </prefix></code>.</p>
pub fn prefix(&self) -> ::std::option::Option<&str> {
self.prefix.as_deref()
}
/// <p>Indicates whether the job-completion report will include details of all tasks or only failed tasks.</p>
pub fn report_scope(&self) -> ::std::option::Option<&crate::types::JobReportScope> {
self.report_scope.as_ref()
}
}
impl JobReport {
/// Creates a new builder-style object to manufacture [`JobReport`](crate::types::JobReport).
pub fn builder() -> crate::types::builders::JobReportBuilder {
crate::types::builders::JobReportBuilder::default()
}
}
/// A builder for [`JobReport`](crate::types::JobReport).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct JobReportBuilder {
pub(crate) bucket: ::std::option::Option<::std::string::String>,
pub(crate) format: ::std::option::Option<crate::types::JobReportFormat>,
pub(crate) enabled: ::std::option::Option<bool>,
pub(crate) prefix: ::std::option::Option<::std::string::String>,
pub(crate) report_scope: ::std::option::Option<crate::types::JobReportScope>,
}
impl JobReportBuilder {
/// <p>The Amazon Resource Name (ARN) for the bucket where specified job-completion report will be stored.</p>
pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.bucket = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) for the bucket where specified job-completion report will be stored.</p>
pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.bucket = input;
self
}
/// <p>The Amazon Resource Name (ARN) for the bucket where specified job-completion report will be stored.</p>
pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
&self.bucket
}
/// <p>The format of the specified job-completion report.</p>
pub fn format(mut self, input: crate::types::JobReportFormat) -> Self {
self.format = ::std::option::Option::Some(input);
self
}
/// <p>The format of the specified job-completion report.</p>
pub fn set_format(mut self, input: ::std::option::Option<crate::types::JobReportFormat>) -> Self {
self.format = input;
self
}
/// <p>The format of the specified job-completion report.</p>
pub fn get_format(&self) -> &::std::option::Option<crate::types::JobReportFormat> {
&self.format
}
/// <p>Indicates whether the specified job will generate a job-completion report.</p>
/// This field is required.
pub fn enabled(mut self, input: bool) -> Self {
self.enabled = ::std::option::Option::Some(input);
self
}
/// <p>Indicates whether the specified job will generate a job-completion report.</p>
pub fn set_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
self.enabled = input;
self
}
/// <p>Indicates whether the specified job will generate a job-completion report.</p>
pub fn get_enabled(&self) -> &::std::option::Option<bool> {
&self.enabled
}
/// <p>An optional prefix to describe where in the specified bucket the job-completion report will be stored. Amazon S3 stores the job-completion report at <code><prefix>
/// /job-
/// <job-id>
/// /report.json
/// </job-id>
/// </prefix></code>.</p>
pub fn prefix(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.prefix = ::std::option::Option::Some(input.into());
self
}
/// <p>An optional prefix to describe where in the specified bucket the job-completion report will be stored. Amazon S3 stores the job-completion report at <code><prefix>
/// /job-
/// <job-id>
/// /report.json
/// </job-id>
/// </prefix></code>.</p>
pub fn set_prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.prefix = input;
self
}
/// <p>An optional prefix to describe where in the specified bucket the job-completion report will be stored. Amazon S3 stores the job-completion report at <code><prefix>
/// /job-
/// <job-id>
/// /report.json
/// </job-id>
/// </prefix></code>.</p>
pub fn get_prefix(&self) -> &::std::option::Option<::std::string::String> {
&self.prefix
}
/// <p>Indicates whether the job-completion report will include details of all tasks or only failed tasks.</p>
pub fn report_scope(mut self, input: crate::types::JobReportScope) -> Self {
self.report_scope = ::std::option::Option::Some(input);
self
}
/// <p>Indicates whether the job-completion report will include details of all tasks or only failed tasks.</p>
pub fn set_report_scope(mut self, input: ::std::option::Option<crate::types::JobReportScope>) -> Self {
self.report_scope = input;
self
}
/// <p>Indicates whether the job-completion report will include details of all tasks or only failed tasks.</p>
pub fn get_report_scope(&self) -> &::std::option::Option<crate::types::JobReportScope> {
&self.report_scope
}
/// Consumes the builder and constructs a [`JobReport`](crate::types::JobReport).
pub fn build(self) -> crate::types::JobReport {
crate::types::JobReport {
bucket: self.bucket,
format: self.format,
enabled: self.enabled.unwrap_or_default(),
prefix: self.prefix,
report_scope: self.report_scope,
}
}
}