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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Specifies the settings for a job that exports endpoint definitions to an Amazon Simple Storage Service (Amazon S3) bucket.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ExportJobRequest {
/// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to access the Amazon S3 location where you want to export endpoint definitions to.</p>
#[doc(hidden)]
pub role_arn: std::option::Option<std::string::String>,
/// <p>The URL of the location in an Amazon Simple Storage Service (Amazon S3) bucket where you want to export endpoint definitions to. This location is typically a folder that contains multiple files. The URL should be in the following format: s3://<replaceable>
/// bucket-name
/// </replaceable>/<replaceable>
/// folder-name
/// </replaceable>/.</p>
#[doc(hidden)]
pub s3_url_prefix: std::option::Option<std::string::String>,
/// <p>The identifier for the segment to export endpoint definitions from. If you don't specify this value, Amazon Pinpoint exports definitions for all the endpoints that are associated with the application.</p>
#[doc(hidden)]
pub segment_id: std::option::Option<std::string::String>,
/// <p>The version of the segment to export endpoint definitions from, if specified.</p>
#[doc(hidden)]
pub segment_version: i32,
}
impl ExportJobRequest {
/// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to access the Amazon S3 location where you want to export endpoint definitions to.</p>
pub fn role_arn(&self) -> std::option::Option<&str> {
self.role_arn.as_deref()
}
/// <p>The URL of the location in an Amazon Simple Storage Service (Amazon S3) bucket where you want to export endpoint definitions to. This location is typically a folder that contains multiple files. The URL should be in the following format: s3://<replaceable>
/// bucket-name
/// </replaceable>/<replaceable>
/// folder-name
/// </replaceable>/.</p>
pub fn s3_url_prefix(&self) -> std::option::Option<&str> {
self.s3_url_prefix.as_deref()
}
/// <p>The identifier for the segment to export endpoint definitions from. If you don't specify this value, Amazon Pinpoint exports definitions for all the endpoints that are associated with the application.</p>
pub fn segment_id(&self) -> std::option::Option<&str> {
self.segment_id.as_deref()
}
/// <p>The version of the segment to export endpoint definitions from, if specified.</p>
pub fn segment_version(&self) -> i32 {
self.segment_version
}
}
impl ExportJobRequest {
/// Creates a new builder-style object to manufacture [`ExportJobRequest`](crate::types::ExportJobRequest).
pub fn builder() -> crate::types::builders::ExportJobRequestBuilder {
crate::types::builders::ExportJobRequestBuilder::default()
}
}
/// A builder for [`ExportJobRequest`](crate::types::ExportJobRequest).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct ExportJobRequestBuilder {
pub(crate) role_arn: std::option::Option<std::string::String>,
pub(crate) s3_url_prefix: std::option::Option<std::string::String>,
pub(crate) segment_id: std::option::Option<std::string::String>,
pub(crate) segment_version: std::option::Option<i32>,
}
impl ExportJobRequestBuilder {
/// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to access the Amazon S3 location where you want to export endpoint definitions to.</p>
pub fn role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.role_arn = Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to access the Amazon S3 location where you want to export endpoint definitions to.</p>
pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.role_arn = input;
self
}
/// <p>The URL of the location in an Amazon Simple Storage Service (Amazon S3) bucket where you want to export endpoint definitions to. This location is typically a folder that contains multiple files. The URL should be in the following format: s3://<replaceable>
/// bucket-name
/// </replaceable>/<replaceable>
/// folder-name
/// </replaceable>/.</p>
pub fn s3_url_prefix(mut self, input: impl Into<std::string::String>) -> Self {
self.s3_url_prefix = Some(input.into());
self
}
/// <p>The URL of the location in an Amazon Simple Storage Service (Amazon S3) bucket where you want to export endpoint definitions to. This location is typically a folder that contains multiple files. The URL should be in the following format: s3://<replaceable>
/// bucket-name
/// </replaceable>/<replaceable>
/// folder-name
/// </replaceable>/.</p>
pub fn set_s3_url_prefix(mut self, input: std::option::Option<std::string::String>) -> Self {
self.s3_url_prefix = input;
self
}
/// <p>The identifier for the segment to export endpoint definitions from. If you don't specify this value, Amazon Pinpoint exports definitions for all the endpoints that are associated with the application.</p>
pub fn segment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.segment_id = Some(input.into());
self
}
/// <p>The identifier for the segment to export endpoint definitions from. If you don't specify this value, Amazon Pinpoint exports definitions for all the endpoints that are associated with the application.</p>
pub fn set_segment_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.segment_id = input;
self
}
/// <p>The version of the segment to export endpoint definitions from, if specified.</p>
pub fn segment_version(mut self, input: i32) -> Self {
self.segment_version = Some(input);
self
}
/// <p>The version of the segment to export endpoint definitions from, if specified.</p>
pub fn set_segment_version(mut self, input: std::option::Option<i32>) -> Self {
self.segment_version = input;
self
}
/// Consumes the builder and constructs a [`ExportJobRequest`](crate::types::ExportJobRequest).
pub fn build(self) -> crate::types::ExportJobRequest {
crate::types::ExportJobRequest {
role_arn: self.role_arn,
s3_url_prefix: self.s3_url_prefix,
segment_id: self.segment_id,
segment_version: self.segment_version.unwrap_or_default(),
}
}
}