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 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Provides the results of a query that retrieved the data for a standard execution metric that applies to a journey activity, and provides information about that query.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct JourneyExecutionActivityMetricsResponse {
/// <p>The type of activity that the metric applies to. Possible values are:</p>
/// <ul>
/// <li><p>CONDITIONAL_SPLIT – For a yes/no split activity, which is an activity that sends participants down one of two paths in a journey.</p></li>
/// <li><p>HOLDOUT – For a holdout activity, which is an activity that stops a journey for a specified percentage of participants.</p></li>
/// <li><p>MESSAGE – For an email activity, which is an activity that sends an email message to participants.</p></li>
/// <li><p>MULTI_CONDITIONAL_SPLIT – For a multivariate split activity, which is an activity that sends participants down one of as many as five paths in a journey.</p></li>
/// <li><p>RANDOM_SPLIT – For a random split activity, which is an activity that sends specified percentages of participants down one of as many as five paths in a journey.</p></li>
/// <li><p>WAIT – For a wait activity, which is an activity that waits for a certain amount of time or until a specific date and time before moving participants to the next activity in a journey.</p></li>
/// </ul>
pub activity_type: ::std::option::Option<::std::string::String>,
/// <p>The unique identifier for the application that the metric applies to.</p>
pub application_id: ::std::option::Option<::std::string::String>,
/// <p>The unique identifier for the activity that the metric applies to.</p>
pub journey_activity_id: ::std::option::Option<::std::string::String>,
/// <p>The unique identifier for the journey that the metric applies to.</p>
pub journey_id: ::std::option::Option<::std::string::String>,
/// <p>The date and time, in ISO 8601 format, when Amazon Pinpoint last evaluated the execution status of the activity and updated the data for the metric.</p>
pub last_evaluated_time: ::std::option::Option<::std::string::String>,
/// <p>A JSON object that contains the results of the query. The results vary depending on the type of activity (ActivityType). For information about the structure and contents of the results, see the <a href="https://docs.aws.amazon.com/pinpoint/latest/developerguide/analytics-standard-metrics.html">Amazon Pinpoint Developer Guide</a>.</p>
pub metrics: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl JourneyExecutionActivityMetricsResponse {
/// <p>The type of activity that the metric applies to. Possible values are:</p>
/// <ul>
/// <li><p>CONDITIONAL_SPLIT – For a yes/no split activity, which is an activity that sends participants down one of two paths in a journey.</p></li>
/// <li><p>HOLDOUT – For a holdout activity, which is an activity that stops a journey for a specified percentage of participants.</p></li>
/// <li><p>MESSAGE – For an email activity, which is an activity that sends an email message to participants.</p></li>
/// <li><p>MULTI_CONDITIONAL_SPLIT – For a multivariate split activity, which is an activity that sends participants down one of as many as five paths in a journey.</p></li>
/// <li><p>RANDOM_SPLIT – For a random split activity, which is an activity that sends specified percentages of participants down one of as many as five paths in a journey.</p></li>
/// <li><p>WAIT – For a wait activity, which is an activity that waits for a certain amount of time or until a specific date and time before moving participants to the next activity in a journey.</p></li>
/// </ul>
pub fn activity_type(&self) -> ::std::option::Option<&str> {
self.activity_type.as_deref()
}
/// <p>The unique identifier for the application that the metric applies to.</p>
pub fn application_id(&self) -> ::std::option::Option<&str> {
self.application_id.as_deref()
}
/// <p>The unique identifier for the activity that the metric applies to.</p>
pub fn journey_activity_id(&self) -> ::std::option::Option<&str> {
self.journey_activity_id.as_deref()
}
/// <p>The unique identifier for the journey that the metric applies to.</p>
pub fn journey_id(&self) -> ::std::option::Option<&str> {
self.journey_id.as_deref()
}
/// <p>The date and time, in ISO 8601 format, when Amazon Pinpoint last evaluated the execution status of the activity and updated the data for the metric.</p>
pub fn last_evaluated_time(&self) -> ::std::option::Option<&str> {
self.last_evaluated_time.as_deref()
}
/// <p>A JSON object that contains the results of the query. The results vary depending on the type of activity (ActivityType). For information about the structure and contents of the results, see the <a href="https://docs.aws.amazon.com/pinpoint/latest/developerguide/analytics-standard-metrics.html">Amazon Pinpoint Developer Guide</a>.</p>
pub fn metrics(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.metrics.as_ref()
}
}
impl JourneyExecutionActivityMetricsResponse {
/// Creates a new builder-style object to manufacture [`JourneyExecutionActivityMetricsResponse`](crate::types::JourneyExecutionActivityMetricsResponse).
pub fn builder() -> crate::types::builders::JourneyExecutionActivityMetricsResponseBuilder {
crate::types::builders::JourneyExecutionActivityMetricsResponseBuilder::default()
}
}
/// A builder for [`JourneyExecutionActivityMetricsResponse`](crate::types::JourneyExecutionActivityMetricsResponse).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct JourneyExecutionActivityMetricsResponseBuilder {
pub(crate) activity_type: ::std::option::Option<::std::string::String>,
pub(crate) application_id: ::std::option::Option<::std::string::String>,
pub(crate) journey_activity_id: ::std::option::Option<::std::string::String>,
pub(crate) journey_id: ::std::option::Option<::std::string::String>,
pub(crate) last_evaluated_time: ::std::option::Option<::std::string::String>,
pub(crate) metrics: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl JourneyExecutionActivityMetricsResponseBuilder {
/// <p>The type of activity that the metric applies to. Possible values are:</p>
/// <ul>
/// <li><p>CONDITIONAL_SPLIT – For a yes/no split activity, which is an activity that sends participants down one of two paths in a journey.</p></li>
/// <li><p>HOLDOUT – For a holdout activity, which is an activity that stops a journey for a specified percentage of participants.</p></li>
/// <li><p>MESSAGE – For an email activity, which is an activity that sends an email message to participants.</p></li>
/// <li><p>MULTI_CONDITIONAL_SPLIT – For a multivariate split activity, which is an activity that sends participants down one of as many as five paths in a journey.</p></li>
/// <li><p>RANDOM_SPLIT – For a random split activity, which is an activity that sends specified percentages of participants down one of as many as five paths in a journey.</p></li>
/// <li><p>WAIT – For a wait activity, which is an activity that waits for a certain amount of time or until a specific date and time before moving participants to the next activity in a journey.</p></li>
/// </ul>
/// This field is required.
pub fn activity_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.activity_type = ::std::option::Option::Some(input.into());
self
}
/// <p>The type of activity that the metric applies to. Possible values are:</p>
/// <ul>
/// <li><p>CONDITIONAL_SPLIT – For a yes/no split activity, which is an activity that sends participants down one of two paths in a journey.</p></li>
/// <li><p>HOLDOUT – For a holdout activity, which is an activity that stops a journey for a specified percentage of participants.</p></li>
/// <li><p>MESSAGE – For an email activity, which is an activity that sends an email message to participants.</p></li>
/// <li><p>MULTI_CONDITIONAL_SPLIT – For a multivariate split activity, which is an activity that sends participants down one of as many as five paths in a journey.</p></li>
/// <li><p>RANDOM_SPLIT – For a random split activity, which is an activity that sends specified percentages of participants down one of as many as five paths in a journey.</p></li>
/// <li><p>WAIT – For a wait activity, which is an activity that waits for a certain amount of time or until a specific date and time before moving participants to the next activity in a journey.</p></li>
/// </ul>
pub fn set_activity_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.activity_type = input;
self
}
/// <p>The type of activity that the metric applies to. Possible values are:</p>
/// <ul>
/// <li><p>CONDITIONAL_SPLIT – For a yes/no split activity, which is an activity that sends participants down one of two paths in a journey.</p></li>
/// <li><p>HOLDOUT – For a holdout activity, which is an activity that stops a journey for a specified percentage of participants.</p></li>
/// <li><p>MESSAGE – For an email activity, which is an activity that sends an email message to participants.</p></li>
/// <li><p>MULTI_CONDITIONAL_SPLIT – For a multivariate split activity, which is an activity that sends participants down one of as many as five paths in a journey.</p></li>
/// <li><p>RANDOM_SPLIT – For a random split activity, which is an activity that sends specified percentages of participants down one of as many as five paths in a journey.</p></li>
/// <li><p>WAIT – For a wait activity, which is an activity that waits for a certain amount of time or until a specific date and time before moving participants to the next activity in a journey.</p></li>
/// </ul>
pub fn get_activity_type(&self) -> &::std::option::Option<::std::string::String> {
&self.activity_type
}
/// <p>The unique identifier for the application that the metric applies to.</p>
/// This field is required.
pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.application_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The unique identifier for the application that the metric applies to.</p>
pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.application_id = input;
self
}
/// <p>The unique identifier for the application that the metric applies to.</p>
pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
&self.application_id
}
/// <p>The unique identifier for the activity that the metric applies to.</p>
/// This field is required.
pub fn journey_activity_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.journey_activity_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The unique identifier for the activity that the metric applies to.</p>
pub fn set_journey_activity_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.journey_activity_id = input;
self
}
/// <p>The unique identifier for the activity that the metric applies to.</p>
pub fn get_journey_activity_id(&self) -> &::std::option::Option<::std::string::String> {
&self.journey_activity_id
}
/// <p>The unique identifier for the journey that the metric applies to.</p>
/// This field is required.
pub fn journey_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.journey_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The unique identifier for the journey that the metric applies to.</p>
pub fn set_journey_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.journey_id = input;
self
}
/// <p>The unique identifier for the journey that the metric applies to.</p>
pub fn get_journey_id(&self) -> &::std::option::Option<::std::string::String> {
&self.journey_id
}
/// <p>The date and time, in ISO 8601 format, when Amazon Pinpoint last evaluated the execution status of the activity and updated the data for the metric.</p>
/// This field is required.
pub fn last_evaluated_time(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.last_evaluated_time = ::std::option::Option::Some(input.into());
self
}
/// <p>The date and time, in ISO 8601 format, when Amazon Pinpoint last evaluated the execution status of the activity and updated the data for the metric.</p>
pub fn set_last_evaluated_time(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.last_evaluated_time = input;
self
}
/// <p>The date and time, in ISO 8601 format, when Amazon Pinpoint last evaluated the execution status of the activity and updated the data for the metric.</p>
pub fn get_last_evaluated_time(&self) -> &::std::option::Option<::std::string::String> {
&self.last_evaluated_time
}
/// Adds a key-value pair to `metrics`.
///
/// To override the contents of this collection use [`set_metrics`](Self::set_metrics).
///
/// <p>A JSON object that contains the results of the query. The results vary depending on the type of activity (ActivityType). For information about the structure and contents of the results, see the <a href="https://docs.aws.amazon.com/pinpoint/latest/developerguide/analytics-standard-metrics.html">Amazon Pinpoint Developer Guide</a>.</p>
pub fn metrics(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut hash_map = self.metrics.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.metrics = ::std::option::Option::Some(hash_map);
self
}
/// <p>A JSON object that contains the results of the query. The results vary depending on the type of activity (ActivityType). For information about the structure and contents of the results, see the <a href="https://docs.aws.amazon.com/pinpoint/latest/developerguide/analytics-standard-metrics.html">Amazon Pinpoint Developer Guide</a>.</p>
pub fn set_metrics(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
self.metrics = input;
self
}
/// <p>A JSON object that contains the results of the query. The results vary depending on the type of activity (ActivityType). For information about the structure and contents of the results, see the <a href="https://docs.aws.amazon.com/pinpoint/latest/developerguide/analytics-standard-metrics.html">Amazon Pinpoint Developer Guide</a>.</p>
pub fn get_metrics(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.metrics
}
/// Consumes the builder and constructs a [`JourneyExecutionActivityMetricsResponse`](crate::types::JourneyExecutionActivityMetricsResponse).
pub fn build(self) -> crate::types::JourneyExecutionActivityMetricsResponse {
crate::types::JourneyExecutionActivityMetricsResponse {
activity_type: self.activity_type,
application_id: self.application_id,
journey_activity_id: self.journey_activity_id,
journey_id: self.journey_id,
last_evaluated_time: self.last_evaluated_time,
metrics: self.metrics,
}
}
}