software.amazon.awssdk.services.networkmanager.model.RouteTableIdentifier Maven / Gradle / Ivy
/*
* 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.io.Serializable;
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.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;
/**
*
* Describes a route table.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class RouteTableIdentifier implements SdkPojo, Serializable,
ToCopyableBuilder {
private static final SdkField TRANSIT_GATEWAY_ROUTE_TABLE_ARN_FIELD = SdkField
. builder(MarshallingType.STRING)
.memberName("TransitGatewayRouteTableArn")
.getter(getter(RouteTableIdentifier::transitGatewayRouteTableArn))
.setter(setter(Builder::transitGatewayRouteTableArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TransitGatewayRouteTableArn")
.build()).build();
private static final SdkField CORE_NETWORK_SEGMENT_EDGE_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("CoreNetworkSegmentEdge")
.getter(getter(RouteTableIdentifier::coreNetworkSegmentEdge)).setter(setter(Builder::coreNetworkSegmentEdge))
.constructor(CoreNetworkSegmentEdgeIdentifier::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CoreNetworkSegmentEdge").build())
.build();
private static final SdkField CORE_NETWORK_NETWORK_FUNCTION_GROUP_FIELD = SdkField
. builder(MarshallingType.SDK_POJO)
.memberName("CoreNetworkNetworkFunctionGroup")
.getter(getter(RouteTableIdentifier::coreNetworkNetworkFunctionGroup))
.setter(setter(Builder::coreNetworkNetworkFunctionGroup))
.constructor(CoreNetworkNetworkFunctionGroupIdentifier::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CoreNetworkNetworkFunctionGroup")
.build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(
TRANSIT_GATEWAY_ROUTE_TABLE_ARN_FIELD, CORE_NETWORK_SEGMENT_EDGE_FIELD, CORE_NETWORK_NETWORK_FUNCTION_GROUP_FIELD));
private static final long serialVersionUID = 1L;
private final String transitGatewayRouteTableArn;
private final CoreNetworkSegmentEdgeIdentifier coreNetworkSegmentEdge;
private final CoreNetworkNetworkFunctionGroupIdentifier coreNetworkNetworkFunctionGroup;
private RouteTableIdentifier(BuilderImpl builder) {
this.transitGatewayRouteTableArn = builder.transitGatewayRouteTableArn;
this.coreNetworkSegmentEdge = builder.coreNetworkSegmentEdge;
this.coreNetworkNetworkFunctionGroup = builder.coreNetworkNetworkFunctionGroup;
}
/**
*
* The ARN of the transit gateway route table for the attachment request. For example,
* "TransitGatewayRouteTableArn": "arn:aws:ec2:us-west-2:123456789012:transit-gateway-route-table/tgw-rtb-9876543210123456"
* .
*
*
* @return The ARN of the transit gateway route table for the attachment request. For example,
* "TransitGatewayRouteTableArn": "arn:aws:ec2:us-west-2:123456789012:transit-gateway-route-table/tgw-rtb-9876543210123456"
* .
*/
public final String transitGatewayRouteTableArn() {
return transitGatewayRouteTableArn;
}
/**
*
* The segment edge in a core network.
*
*
* @return The segment edge in a core network.
*/
public final CoreNetworkSegmentEdgeIdentifier coreNetworkSegmentEdge() {
return coreNetworkSegmentEdge;
}
/**
*
* The route table identifier associated with the network function group.
*
*
* @return The route table identifier associated with the network function group.
*/
public final CoreNetworkNetworkFunctionGroupIdentifier coreNetworkNetworkFunctionGroup() {
return coreNetworkNetworkFunctionGroup;
}
@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 + Objects.hashCode(transitGatewayRouteTableArn());
hashCode = 31 * hashCode + Objects.hashCode(coreNetworkSegmentEdge());
hashCode = 31 * hashCode + Objects.hashCode(coreNetworkNetworkFunctionGroup());
return hashCode;
}
@Override
public final boolean equals(Object obj) {
return equalsBySdkFields(obj);
}
@Override
public final boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof RouteTableIdentifier)) {
return false;
}
RouteTableIdentifier other = (RouteTableIdentifier) obj;
return Objects.equals(transitGatewayRouteTableArn(), other.transitGatewayRouteTableArn())
&& Objects.equals(coreNetworkSegmentEdge(), other.coreNetworkSegmentEdge())
&& Objects.equals(coreNetworkNetworkFunctionGroup(), other.coreNetworkNetworkFunctionGroup());
}
/**
* 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("RouteTableIdentifier").add("TransitGatewayRouteTableArn", transitGatewayRouteTableArn())
.add("CoreNetworkSegmentEdge", coreNetworkSegmentEdge())
.add("CoreNetworkNetworkFunctionGroup", coreNetworkNetworkFunctionGroup()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "TransitGatewayRouteTableArn":
return Optional.ofNullable(clazz.cast(transitGatewayRouteTableArn()));
case "CoreNetworkSegmentEdge":
return Optional.ofNullable(clazz.cast(coreNetworkSegmentEdge()));
case "CoreNetworkNetworkFunctionGroup":
return Optional.ofNullable(clazz.cast(coreNetworkNetworkFunctionGroup()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function
© 2015 - 2025 Weber Informatics LLC | Privacy Policy