Class WeightedTarget
- java.lang.Object
-
- software.amazon.awssdk.services.appmesh.model.WeightedTarget
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<WeightedTarget.Builder,WeightedTarget>
@Generated("software.amazon.awssdk:codegen") public final class WeightedTarget extends Object implements SdkPojo, Serializable, ToCopyableBuilder<WeightedTarget.Builder,WeightedTarget>
An object that represents a target and its relative weight. Traffic is distributed across targets according to their relative weight. For example, a weighted target with a relative weight of 50 receives five times as much traffic as one with a relative weight of 10. The total weight for all targets combined must be less than or equal to 100.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceWeightedTarget.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WeightedTarget.Builderbuilder()booleanequals(Object obj)booleanequalsBySdkFields(Object obj)<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()Integerport()The targeted port of the weighted object.List<SdkField<?>>sdkFields()static Class<? extends WeightedTarget.Builder>serializableBuilderClass()WeightedTarget.BuildertoBuilder()StringtoString()Returns a string representation of this object.StringvirtualNode()The virtual node to associate with the weighted target.Integerweight()The relative weight of the weighted target.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
port
public final Integer port()
The targeted port of the weighted object.
- Returns:
- The targeted port of the weighted object.
-
virtualNode
public final String virtualNode()
The virtual node to associate with the weighted target.
- Returns:
- The virtual node to associate with the weighted target.
-
weight
public final Integer weight()
The relative weight of the weighted target.
- Returns:
- The relative weight of the weighted target.
-
toBuilder
public WeightedTarget.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<WeightedTarget.Builder,WeightedTarget>
-
builder
public static WeightedTarget.Builder builder()
-
serializableBuilderClass
public static Class<? extends WeightedTarget.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
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.
-
-