Package software.amazon.awssdk.core
Class SdkField.Builder<TypeT>
- java.lang.Object
-
- software.amazon.awssdk.core.SdkField.Builder<TypeT>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SdkField<TypeT>
build()
SdkField.Builder<TypeT>
constructor(Supplier<SdkPojo> constructor)
Sets aSupplier
which will create a new MUTABLE instance of the POJO.SdkField.Builder<TypeT>
getter(Function<Object,TypeT> getter)
Sets theFunction
that will accept an object and return the current value of 'this' field on that object.SdkField.Builder<TypeT>
memberName(String memberName)
SdkField.Builder<TypeT>
setter(BiConsumer<Object,TypeT> setter)
Sets theBiConsumer
which will accept an object and a value and set that value on the appropriate member of the object.SdkField.Builder<TypeT>
traits(Trait... traits)
Attaches one or more traits to theSdkField
.
-
-
-
Method Detail
-
memberName
public SdkField.Builder<TypeT> memberName(String memberName)
-
constructor
public SdkField.Builder<TypeT> constructor(Supplier<SdkPojo> constructor)
Sets aSupplier
which will create a new MUTABLE instance of the POJO. I.E. this will create the Builder for a given POJO and not the immutable POJO itself.- Parameters:
constructor
- Supplier method to create the mutable POJO.- Returns:
- This object for method chaining.
-
setter
public SdkField.Builder<TypeT> setter(BiConsumer<Object,TypeT> setter)
Sets theBiConsumer
which will accept an object and a value and set that value on the appropriate member of the object. This requires a MUTABLE pojo so thus this setter will be on the Builder for the given POJO.- Parameters:
setter
- Setter method.- Returns:
- This object for method chaining.
-
getter
public SdkField.Builder<TypeT> getter(Function<Object,TypeT> getter)
Sets theFunction
that will accept an object and return the current value of 'this' field on that object. This will typically be a getter on the immutable representation of the POJO and is used mostly during marshalling.- Parameters:
getter
- Getter method.- Returns:
- This object for method chaining.
-
traits
public SdkField.Builder<TypeT> traits(Trait... traits)
Attaches one or more traits to theSdkField
. Traits can have additional metadata and behavior that influence how a field is marshalled/unmarshalled.- Parameters:
traits
- Traits to attach.- Returns:
- This object for method chaining.
-
-