software.amazon.awssdk.services.networkmanager.model.StartRouteAnalysisRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of networkmanager Show documentation
Show all versions of networkmanager Show documentation
The AWS Java SDK for NetworkManager module holds the client classes that are used for
communicating with NetworkManager.
/*
* 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.networkmanager.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;
/**
*/
@Generated("software.amazon.awssdk:codegen")
public final class StartRouteAnalysisRequest extends NetworkManagerRequest implements
ToCopyableBuilder {
private static final SdkField GLOBAL_NETWORK_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("GlobalNetworkId").getter(getter(StartRouteAnalysisRequest::globalNetworkId))
.setter(setter(Builder::globalNetworkId))
.traits(LocationTrait.builder().location(MarshallLocation.PATH).locationName("globalNetworkId").build()).build();
private static final SdkField SOURCE_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("Source")
.getter(getter(StartRouteAnalysisRequest::source)).setter(setter(Builder::source))
.constructor(RouteAnalysisEndpointOptionsSpecification::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Source").build()).build();
private static final SdkField DESTINATION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("Destination")
.getter(getter(StartRouteAnalysisRequest::destination)).setter(setter(Builder::destination))
.constructor(RouteAnalysisEndpointOptionsSpecification::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Destination").build()).build();
private static final SdkField INCLUDE_RETURN_PATH_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("IncludeReturnPath").getter(getter(StartRouteAnalysisRequest::includeReturnPath))
.setter(setter(Builder::includeReturnPath))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("IncludeReturnPath").build()).build();
private static final SdkField USE_MIDDLEBOXES_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("UseMiddleboxes").getter(getter(StartRouteAnalysisRequest::useMiddleboxes))
.setter(setter(Builder::useMiddleboxes))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("UseMiddleboxes").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(GLOBAL_NETWORK_ID_FIELD,
SOURCE_FIELD, DESTINATION_FIELD, INCLUDE_RETURN_PATH_FIELD, USE_MIDDLEBOXES_FIELD));
private final String globalNetworkId;
private final RouteAnalysisEndpointOptionsSpecification source;
private final RouteAnalysisEndpointOptionsSpecification destination;
private final Boolean includeReturnPath;
private final Boolean useMiddleboxes;
private StartRouteAnalysisRequest(BuilderImpl builder) {
super(builder);
this.globalNetworkId = builder.globalNetworkId;
this.source = builder.source;
this.destination = builder.destination;
this.includeReturnPath = builder.includeReturnPath;
this.useMiddleboxes = builder.useMiddleboxes;
}
/**
*
* The ID of the global network.
*
*
* @return The ID of the global network.
*/
public final String globalNetworkId() {
return globalNetworkId;
}
/**
*
* The source from which traffic originates.
*
*
* @return The source from which traffic originates.
*/
public final RouteAnalysisEndpointOptionsSpecification source() {
return source;
}
/**
*
* The destination.
*
*
* @return The destination.
*/
public final RouteAnalysisEndpointOptionsSpecification destination() {
return destination;
}
/**
*
* Indicates whether to analyze the return path. The default is false
.
*
*
* @return Indicates whether to analyze the return path. The default is false
.
*/
public final Boolean includeReturnPath() {
return includeReturnPath;
}
/**
*
* Indicates whether to include the location of middlebox appliances in the route analysis. The default is
* false
.
*
*
* @return Indicates whether to include the location of middlebox appliances in the route analysis. The default is
* false
.
*/
public final Boolean useMiddleboxes() {
return useMiddleboxes;
}
@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(globalNetworkId());
hashCode = 31 * hashCode + Objects.hashCode(source());
hashCode = 31 * hashCode + Objects.hashCode(destination());
hashCode = 31 * hashCode + Objects.hashCode(includeReturnPath());
hashCode = 31 * hashCode + Objects.hashCode(useMiddleboxes());
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 StartRouteAnalysisRequest)) {
return false;
}
StartRouteAnalysisRequest other = (StartRouteAnalysisRequest) obj;
return Objects.equals(globalNetworkId(), other.globalNetworkId()) && Objects.equals(source(), other.source())
&& Objects.equals(destination(), other.destination())
&& Objects.equals(includeReturnPath(), other.includeReturnPath())
&& Objects.equals(useMiddleboxes(), other.useMiddleboxes());
}
/**
* 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("StartRouteAnalysisRequest").add("GlobalNetworkId", globalNetworkId()).add("Source", source())
.add("Destination", destination()).add("IncludeReturnPath", includeReturnPath())
.add("UseMiddleboxes", useMiddleboxes()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "GlobalNetworkId":
return Optional.ofNullable(clazz.cast(globalNetworkId()));
case "Source":
return Optional.ofNullable(clazz.cast(source()));
case "Destination":
return Optional.ofNullable(clazz.cast(destination()));
case "IncludeReturnPath":
return Optional.ofNullable(clazz.cast(includeReturnPath()));
case "UseMiddleboxes":
return Optional.ofNullable(clazz.cast(useMiddleboxes()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function
© 2015 - 2025 Weber Informatics LLC | Privacy Policy