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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>A complex type that contains the response information for the request.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ListTrafficPolicyInstancesByPolicyOutput {
/// <p>A list that contains one <code>TrafficPolicyInstance</code> element for each traffic policy instance that matches the elements in the request.</p>
pub traffic_policy_instances: ::std::vec::Vec<crate::types::TrafficPolicyInstance>,
/// <p>If <code>IsTruncated</code> is <code>true</code>, <code>HostedZoneIdMarker</code> is the ID of the hosted zone of the first traffic policy instance in the next group of traffic policy instances.</p>
pub hosted_zone_id_marker: ::std::option::Option<::std::string::String>,
/// <p>If <code>IsTruncated</code> is <code>true</code>, <code>TrafficPolicyInstanceNameMarker</code> is the name of the first traffic policy instance in the next group of <code>MaxItems</code> traffic policy instances.</p>
pub traffic_policy_instance_name_marker: ::std::option::Option<::std::string::String>,
/// <p>If <code>IsTruncated</code> is <code>true</code>, <code>TrafficPolicyInstanceTypeMarker</code> is the DNS type of the resource record sets that are associated with the first traffic policy instance in the next group of <code>MaxItems</code> traffic policy instances.</p>
pub traffic_policy_instance_type_marker: ::std::option::Option<crate::types::RrType>,
/// <p>A flag that indicates whether there are more traffic policy instances to be listed. If the response was truncated, you can get the next group of traffic policy instances by calling <code>ListTrafficPolicyInstancesByPolicy</code> again and specifying the values of the <code>HostedZoneIdMarker</code>, <code>TrafficPolicyInstanceNameMarker</code>, and <code>TrafficPolicyInstanceTypeMarker</code> elements in the corresponding request parameters.</p>
pub is_truncated: bool,
/// <p>The value that you specified for the <code>MaxItems</code> parameter in the call to <code>ListTrafficPolicyInstancesByPolicy</code> that produced the current response.</p>
pub max_items: i32,
_request_id: Option<String>,
}
impl ListTrafficPolicyInstancesByPolicyOutput {
/// <p>A list that contains one <code>TrafficPolicyInstance</code> element for each traffic policy instance that matches the elements in the request.</p>
pub fn traffic_policy_instances(&self) -> &[crate::types::TrafficPolicyInstance] {
use std::ops::Deref;
self.traffic_policy_instances.deref()
}
/// <p>If <code>IsTruncated</code> is <code>true</code>, <code>HostedZoneIdMarker</code> is the ID of the hosted zone of the first traffic policy instance in the next group of traffic policy instances.</p>
pub fn hosted_zone_id_marker(&self) -> ::std::option::Option<&str> {
self.hosted_zone_id_marker.as_deref()
}
/// <p>If <code>IsTruncated</code> is <code>true</code>, <code>TrafficPolicyInstanceNameMarker</code> is the name of the first traffic policy instance in the next group of <code>MaxItems</code> traffic policy instances.</p>
pub fn traffic_policy_instance_name_marker(&self) -> ::std::option::Option<&str> {
self.traffic_policy_instance_name_marker.as_deref()
}
/// <p>If <code>IsTruncated</code> is <code>true</code>, <code>TrafficPolicyInstanceTypeMarker</code> is the DNS type of the resource record sets that are associated with the first traffic policy instance in the next group of <code>MaxItems</code> traffic policy instances.</p>
pub fn traffic_policy_instance_type_marker(&self) -> ::std::option::Option<&crate::types::RrType> {
self.traffic_policy_instance_type_marker.as_ref()
}
/// <p>A flag that indicates whether there are more traffic policy instances to be listed. If the response was truncated, you can get the next group of traffic policy instances by calling <code>ListTrafficPolicyInstancesByPolicy</code> again and specifying the values of the <code>HostedZoneIdMarker</code>, <code>TrafficPolicyInstanceNameMarker</code>, and <code>TrafficPolicyInstanceTypeMarker</code> elements in the corresponding request parameters.</p>
pub fn is_truncated(&self) -> bool {
self.is_truncated
}
/// <p>The value that you specified for the <code>MaxItems</code> parameter in the call to <code>ListTrafficPolicyInstancesByPolicy</code> that produced the current response.</p>
pub fn max_items(&self) -> i32 {
self.max_items
}
}
impl ::aws_types::request_id::RequestId for ListTrafficPolicyInstancesByPolicyOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl ListTrafficPolicyInstancesByPolicyOutput {
/// Creates a new builder-style object to manufacture [`ListTrafficPolicyInstancesByPolicyOutput`](crate::operation::list_traffic_policy_instances_by_policy::ListTrafficPolicyInstancesByPolicyOutput).
pub fn builder() -> crate::operation::list_traffic_policy_instances_by_policy::builders::ListTrafficPolicyInstancesByPolicyOutputBuilder {
crate::operation::list_traffic_policy_instances_by_policy::builders::ListTrafficPolicyInstancesByPolicyOutputBuilder::default()
}
}
/// A builder for [`ListTrafficPolicyInstancesByPolicyOutput`](crate::operation::list_traffic_policy_instances_by_policy::ListTrafficPolicyInstancesByPolicyOutput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ListTrafficPolicyInstancesByPolicyOutputBuilder {
pub(crate) traffic_policy_instances: ::std::option::Option<::std::vec::Vec<crate::types::TrafficPolicyInstance>>,
pub(crate) hosted_zone_id_marker: ::std::option::Option<::std::string::String>,
pub(crate) traffic_policy_instance_name_marker: ::std::option::Option<::std::string::String>,
pub(crate) traffic_policy_instance_type_marker: ::std::option::Option<crate::types::RrType>,
pub(crate) is_truncated: ::std::option::Option<bool>,
pub(crate) max_items: ::std::option::Option<i32>,
_request_id: Option<String>,
}
impl ListTrafficPolicyInstancesByPolicyOutputBuilder {
/// Appends an item to `traffic_policy_instances`.
///
/// To override the contents of this collection use [`set_traffic_policy_instances`](Self::set_traffic_policy_instances).
///
/// <p>A list that contains one <code>TrafficPolicyInstance</code> element for each traffic policy instance that matches the elements in the request.</p>
pub fn traffic_policy_instances(mut self, input: crate::types::TrafficPolicyInstance) -> Self {
let mut v = self.traffic_policy_instances.unwrap_or_default();
v.push(input);
self.traffic_policy_instances = ::std::option::Option::Some(v);
self
}
/// <p>A list that contains one <code>TrafficPolicyInstance</code> element for each traffic policy instance that matches the elements in the request.</p>
pub fn set_traffic_policy_instances(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TrafficPolicyInstance>>) -> Self {
self.traffic_policy_instances = input;
self
}
/// <p>A list that contains one <code>TrafficPolicyInstance</code> element for each traffic policy instance that matches the elements in the request.</p>
pub fn get_traffic_policy_instances(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TrafficPolicyInstance>> {
&self.traffic_policy_instances
}
/// <p>If <code>IsTruncated</code> is <code>true</code>, <code>HostedZoneIdMarker</code> is the ID of the hosted zone of the first traffic policy instance in the next group of traffic policy instances.</p>
pub fn hosted_zone_id_marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.hosted_zone_id_marker = ::std::option::Option::Some(input.into());
self
}
/// <p>If <code>IsTruncated</code> is <code>true</code>, <code>HostedZoneIdMarker</code> is the ID of the hosted zone of the first traffic policy instance in the next group of traffic policy instances.</p>
pub fn set_hosted_zone_id_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.hosted_zone_id_marker = input;
self
}
/// <p>If <code>IsTruncated</code> is <code>true</code>, <code>HostedZoneIdMarker</code> is the ID of the hosted zone of the first traffic policy instance in the next group of traffic policy instances.</p>
pub fn get_hosted_zone_id_marker(&self) -> &::std::option::Option<::std::string::String> {
&self.hosted_zone_id_marker
}
/// <p>If <code>IsTruncated</code> is <code>true</code>, <code>TrafficPolicyInstanceNameMarker</code> is the name of the first traffic policy instance in the next group of <code>MaxItems</code> traffic policy instances.</p>
pub fn traffic_policy_instance_name_marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.traffic_policy_instance_name_marker = ::std::option::Option::Some(input.into());
self
}
/// <p>If <code>IsTruncated</code> is <code>true</code>, <code>TrafficPolicyInstanceNameMarker</code> is the name of the first traffic policy instance in the next group of <code>MaxItems</code> traffic policy instances.</p>
pub fn set_traffic_policy_instance_name_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.traffic_policy_instance_name_marker = input;
self
}
/// <p>If <code>IsTruncated</code> is <code>true</code>, <code>TrafficPolicyInstanceNameMarker</code> is the name of the first traffic policy instance in the next group of <code>MaxItems</code> traffic policy instances.</p>
pub fn get_traffic_policy_instance_name_marker(&self) -> &::std::option::Option<::std::string::String> {
&self.traffic_policy_instance_name_marker
}
/// <p>If <code>IsTruncated</code> is <code>true</code>, <code>TrafficPolicyInstanceTypeMarker</code> is the DNS type of the resource record sets that are associated with the first traffic policy instance in the next group of <code>MaxItems</code> traffic policy instances.</p>
pub fn traffic_policy_instance_type_marker(mut self, input: crate::types::RrType) -> Self {
self.traffic_policy_instance_type_marker = ::std::option::Option::Some(input);
self
}
/// <p>If <code>IsTruncated</code> is <code>true</code>, <code>TrafficPolicyInstanceTypeMarker</code> is the DNS type of the resource record sets that are associated with the first traffic policy instance in the next group of <code>MaxItems</code> traffic policy instances.</p>
pub fn set_traffic_policy_instance_type_marker(mut self, input: ::std::option::Option<crate::types::RrType>) -> Self {
self.traffic_policy_instance_type_marker = input;
self
}
/// <p>If <code>IsTruncated</code> is <code>true</code>, <code>TrafficPolicyInstanceTypeMarker</code> is the DNS type of the resource record sets that are associated with the first traffic policy instance in the next group of <code>MaxItems</code> traffic policy instances.</p>
pub fn get_traffic_policy_instance_type_marker(&self) -> &::std::option::Option<crate::types::RrType> {
&self.traffic_policy_instance_type_marker
}
/// <p>A flag that indicates whether there are more traffic policy instances to be listed. If the response was truncated, you can get the next group of traffic policy instances by calling <code>ListTrafficPolicyInstancesByPolicy</code> again and specifying the values of the <code>HostedZoneIdMarker</code>, <code>TrafficPolicyInstanceNameMarker</code>, and <code>TrafficPolicyInstanceTypeMarker</code> elements in the corresponding request parameters.</p>
/// This field is required.
pub fn is_truncated(mut self, input: bool) -> Self {
self.is_truncated = ::std::option::Option::Some(input);
self
}
/// <p>A flag that indicates whether there are more traffic policy instances to be listed. If the response was truncated, you can get the next group of traffic policy instances by calling <code>ListTrafficPolicyInstancesByPolicy</code> again and specifying the values of the <code>HostedZoneIdMarker</code>, <code>TrafficPolicyInstanceNameMarker</code>, and <code>TrafficPolicyInstanceTypeMarker</code> elements in the corresponding request parameters.</p>
pub fn set_is_truncated(mut self, input: ::std::option::Option<bool>) -> Self {
self.is_truncated = input;
self
}
/// <p>A flag that indicates whether there are more traffic policy instances to be listed. If the response was truncated, you can get the next group of traffic policy instances by calling <code>ListTrafficPolicyInstancesByPolicy</code> again and specifying the values of the <code>HostedZoneIdMarker</code>, <code>TrafficPolicyInstanceNameMarker</code>, and <code>TrafficPolicyInstanceTypeMarker</code> elements in the corresponding request parameters.</p>
pub fn get_is_truncated(&self) -> &::std::option::Option<bool> {
&self.is_truncated
}
/// <p>The value that you specified for the <code>MaxItems</code> parameter in the call to <code>ListTrafficPolicyInstancesByPolicy</code> that produced the current response.</p>
/// This field is required.
pub fn max_items(mut self, input: i32) -> Self {
self.max_items = ::std::option::Option::Some(input);
self
}
/// <p>The value that you specified for the <code>MaxItems</code> parameter in the call to <code>ListTrafficPolicyInstancesByPolicy</code> that produced the current response.</p>
pub fn set_max_items(mut self, input: ::std::option::Option<i32>) -> Self {
self.max_items = input;
self
}
/// <p>The value that you specified for the <code>MaxItems</code> parameter in the call to <code>ListTrafficPolicyInstancesByPolicy</code> that produced the current response.</p>
pub fn get_max_items(&self) -> &::std::option::Option<i32> {
&self.max_items
}
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
}
/// Consumes the builder and constructs a [`ListTrafficPolicyInstancesByPolicyOutput`](crate::operation::list_traffic_policy_instances_by_policy::ListTrafficPolicyInstancesByPolicyOutput).
/// This method will fail if any of the following fields are not set:
/// - [`traffic_policy_instances`](crate::operation::list_traffic_policy_instances_by_policy::builders::ListTrafficPolicyInstancesByPolicyOutputBuilder::traffic_policy_instances)
/// - [`max_items`](crate::operation::list_traffic_policy_instances_by_policy::builders::ListTrafficPolicyInstancesByPolicyOutputBuilder::max_items)
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::list_traffic_policy_instances_by_policy::ListTrafficPolicyInstancesByPolicyOutput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(
crate::operation::list_traffic_policy_instances_by_policy::ListTrafficPolicyInstancesByPolicyOutput {
traffic_policy_instances: self.traffic_policy_instances.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"traffic_policy_instances",
"traffic_policy_instances was not specified but it is required when building ListTrafficPolicyInstancesByPolicyOutput",
)
})?,
hosted_zone_id_marker: self.hosted_zone_id_marker,
traffic_policy_instance_name_marker: self.traffic_policy_instance_name_marker,
traffic_policy_instance_type_marker: self.traffic_policy_instance_type_marker,
is_truncated: self.is_truncated.unwrap_or_default(),
max_items: self.max_items.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"max_items",
"max_items was not specified but it is required when building ListTrafficPolicyInstancesByPolicyOutput",
)
})?,
_request_id: self._request_id,
},
)
}
}