software.amazon.awssdk.services.route53.model.ListTrafficPolicyInstancesRequest Maven / Gradle / Ivy
Show all versions of route53 Show documentation
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package software.amazon.awssdk.services.route53.model;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
*
* A request to get information about the traffic policy instances that you created by using the current Amazon Web
* Services account.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class ListTrafficPolicyInstancesRequest extends Route53Request implements
ToCopyableBuilder {
private static final SdkField HOSTED_ZONE_ID_MARKER_FIELD = SdkField
. builder(MarshallingType.STRING)
.memberName("HostedZoneIdMarker")
.getter(getter(ListTrafficPolicyInstancesRequest::hostedZoneIdMarker))
.setter(setter(Builder::hostedZoneIdMarker))
.traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("hostedzoneid")
.unmarshallLocationName("hostedzoneid").build()).build();
private static final SdkField TRAFFIC_POLICY_INSTANCE_NAME_MARKER_FIELD = SdkField
. builder(MarshallingType.STRING)
.memberName("TrafficPolicyInstanceNameMarker")
.getter(getter(ListTrafficPolicyInstancesRequest::trafficPolicyInstanceNameMarker))
.setter(setter(Builder::trafficPolicyInstanceNameMarker))
.traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("trafficpolicyinstancename")
.unmarshallLocationName("trafficpolicyinstancename").build()).build();
private static final SdkField TRAFFIC_POLICY_INSTANCE_TYPE_MARKER_FIELD = SdkField
. builder(MarshallingType.STRING)
.memberName("TrafficPolicyInstanceTypeMarker")
.getter(getter(ListTrafficPolicyInstancesRequest::trafficPolicyInstanceTypeMarkerAsString))
.setter(setter(Builder::trafficPolicyInstanceTypeMarker))
.traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("trafficpolicyinstancetype")
.unmarshallLocationName("trafficpolicyinstancetype").build()).build();
private static final SdkField MAX_ITEMS_FIELD = SdkField
. builder(MarshallingType.STRING)
.memberName("MaxItems")
.getter(getter(ListTrafficPolicyInstancesRequest::maxItems))
.setter(setter(Builder::maxItems))
.traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("maxitems")
.unmarshallLocationName("maxitems").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(HOSTED_ZONE_ID_MARKER_FIELD,
TRAFFIC_POLICY_INSTANCE_NAME_MARKER_FIELD, TRAFFIC_POLICY_INSTANCE_TYPE_MARKER_FIELD, MAX_ITEMS_FIELD));
private final String hostedZoneIdMarker;
private final String trafficPolicyInstanceNameMarker;
private final String trafficPolicyInstanceTypeMarker;
private final String maxItems;
private ListTrafficPolicyInstancesRequest(BuilderImpl builder) {
super(builder);
this.hostedZoneIdMarker = builder.hostedZoneIdMarker;
this.trafficPolicyInstanceNameMarker = builder.trafficPolicyInstanceNameMarker;
this.trafficPolicyInstanceTypeMarker = builder.trafficPolicyInstanceTypeMarker;
this.maxItems = builder.maxItems;
}
/**
*
* If the value of IsTruncated
in the previous response was true
, you have more traffic
* policy instances. To get more traffic policy instances, submit another ListTrafficPolicyInstances
* request. For the value of HostedZoneId
, specify the value of HostedZoneIdMarker
from
* the previous response, which is the hosted zone ID of the first traffic policy instance in the next group of
* traffic policy instances.
*
*
* If the value of IsTruncated
in the previous response was false
, there are no more
* traffic policy instances to get.
*
*
* @return If the value of IsTruncated
in the previous response was true
, you have more
* traffic policy instances. To get more traffic policy instances, submit another
* ListTrafficPolicyInstances
request. For the value of HostedZoneId
, specify the
* value of HostedZoneIdMarker
from the previous response, which is the hosted zone ID of the
* first traffic policy instance in the next group of traffic policy instances.
*
* If the value of IsTruncated
in the previous response was false
, there are no
* more traffic policy instances to get.
*/
public final String hostedZoneIdMarker() {
return hostedZoneIdMarker;
}
/**
*
* If the value of IsTruncated
in the previous response was true
, you have more traffic
* policy instances. To get more traffic policy instances, submit another ListTrafficPolicyInstances
* request. For the value of trafficpolicyinstancename
, specify the value of
* TrafficPolicyInstanceNameMarker
from the previous response, which is the name of the first traffic
* policy instance in the next group of traffic policy instances.
*
*
* If the value of IsTruncated
in the previous response was false
, there are no more
* traffic policy instances to get.
*
*
* @return If the value of IsTruncated
in the previous response was true
, you have more
* traffic policy instances. To get more traffic policy instances, submit another
* ListTrafficPolicyInstances
request. For the value of trafficpolicyinstancename
,
* specify the value of TrafficPolicyInstanceNameMarker
from the previous response, which is
* the name of the first traffic policy instance in the next group of traffic policy instances.
*
* If the value of IsTruncated
in the previous response was false
, there are no
* more traffic policy instances to get.
*/
public final String trafficPolicyInstanceNameMarker() {
return trafficPolicyInstanceNameMarker;
}
/**
*
* If the value of IsTruncated
in the previous response was true
, you have more traffic
* policy instances. To get more traffic policy instances, submit another ListTrafficPolicyInstances
* request. For the value of trafficpolicyinstancetype
, specify the value of
* TrafficPolicyInstanceTypeMarker
from the previous response, which is the type of the first traffic
* policy instance in the next group of traffic policy instances.
*
*
* If the value of IsTruncated
in the previous response was false
, there are no more
* traffic policy instances to get.
*
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #trafficPolicyInstanceTypeMarker} will return {@link RRType#UNKNOWN_TO_SDK_VERSION}. The raw value
* returned by the service is available from {@link #trafficPolicyInstanceTypeMarkerAsString}.
*
*
* @return If the value of IsTruncated
in the previous response was true
, you have more
* traffic policy instances. To get more traffic policy instances, submit another
* ListTrafficPolicyInstances
request. For the value of trafficpolicyinstancetype
,
* specify the value of TrafficPolicyInstanceTypeMarker
from the previous response, which is
* the type of the first traffic policy instance in the next group of traffic policy instances.
*
* If the value of IsTruncated
in the previous response was false
, there are no
* more traffic policy instances to get.
* @see RRType
*/
public final RRType trafficPolicyInstanceTypeMarker() {
return RRType.fromValue(trafficPolicyInstanceTypeMarker);
}
/**
*
* If the value of IsTruncated
in the previous response was true
, you have more traffic
* policy instances. To get more traffic policy instances, submit another ListTrafficPolicyInstances
* request. For the value of trafficpolicyinstancetype
, specify the value of
* TrafficPolicyInstanceTypeMarker
from the previous response, which is the type of the first traffic
* policy instance in the next group of traffic policy instances.
*
*
* If the value of IsTruncated
in the previous response was false
, there are no more
* traffic policy instances to get.
*
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #trafficPolicyInstanceTypeMarker} will return {@link RRType#UNKNOWN_TO_SDK_VERSION}. The raw value
* returned by the service is available from {@link #trafficPolicyInstanceTypeMarkerAsString}.
*
*
* @return If the value of IsTruncated
in the previous response was true
, you have more
* traffic policy instances. To get more traffic policy instances, submit another
* ListTrafficPolicyInstances
request. For the value of trafficpolicyinstancetype
,
* specify the value of TrafficPolicyInstanceTypeMarker
from the previous response, which is
* the type of the first traffic policy instance in the next group of traffic policy instances.
*
* If the value of IsTruncated
in the previous response was false
, there are no
* more traffic policy instances to get.
* @see RRType
*/
public final String trafficPolicyInstanceTypeMarkerAsString() {
return trafficPolicyInstanceTypeMarker;
}
/**
*
* The maximum number of traffic policy instances that you want Amazon Route 53 to return in response to a
* ListTrafficPolicyInstances
request. If you have more than MaxItems
traffic policy
* instances, the value of the IsTruncated
element in the response is true
, and the values
* of HostedZoneIdMarker
, TrafficPolicyInstanceNameMarker
, and
* TrafficPolicyInstanceTypeMarker
represent the first traffic policy instance in the next group of
* MaxItems
traffic policy instances.
*
*
* @return The maximum number of traffic policy instances that you want Amazon Route 53 to return in response to a
* ListTrafficPolicyInstances
request. If you have more than MaxItems
traffic
* policy instances, the value of the IsTruncated
element in the response is true
,
* and the values of HostedZoneIdMarker
, TrafficPolicyInstanceNameMarker
, and
* TrafficPolicyInstanceTypeMarker
represent the first traffic policy instance in the next
* group of MaxItems
traffic policy instances.
*/
public final String maxItems() {
return maxItems;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + super.hashCode();
hashCode = 31 * hashCode + Objects.hashCode(hostedZoneIdMarker());
hashCode = 31 * hashCode + Objects.hashCode(trafficPolicyInstanceNameMarker());
hashCode = 31 * hashCode + Objects.hashCode(trafficPolicyInstanceTypeMarkerAsString());
hashCode = 31 * hashCode + Objects.hashCode(maxItems());
return hashCode;
}
@Override
public final boolean equals(Object obj) {
return super.equals(obj) && equalsBySdkFields(obj);
}
@Override
public final boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof ListTrafficPolicyInstancesRequest)) {
return false;
}
ListTrafficPolicyInstancesRequest other = (ListTrafficPolicyInstancesRequest) obj;
return Objects.equals(hostedZoneIdMarker(), other.hostedZoneIdMarker())
&& Objects.equals(trafficPolicyInstanceNameMarker(), other.trafficPolicyInstanceNameMarker())
&& Objects.equals(trafficPolicyInstanceTypeMarkerAsString(), other.trafficPolicyInstanceTypeMarkerAsString())
&& Objects.equals(maxItems(), other.maxItems());
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*/
@Override
public final String toString() {
return ToString.builder("ListTrafficPolicyInstancesRequest").add("HostedZoneIdMarker", hostedZoneIdMarker())
.add("TrafficPolicyInstanceNameMarker", trafficPolicyInstanceNameMarker())
.add("TrafficPolicyInstanceTypeMarker", trafficPolicyInstanceTypeMarkerAsString()).add("MaxItems", maxItems())
.build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "HostedZoneIdMarker":
return Optional.ofNullable(clazz.cast(hostedZoneIdMarker()));
case "TrafficPolicyInstanceNameMarker":
return Optional.ofNullable(clazz.cast(trafficPolicyInstanceNameMarker()));
case "TrafficPolicyInstanceTypeMarker":
return Optional.ofNullable(clazz.cast(trafficPolicyInstanceTypeMarkerAsString()));
case "MaxItems":
return Optional.ofNullable(clazz.cast(maxItems()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function