Class StringToInstant
- java.lang.Object
-
- software.amazon.awssdk.protocols.core.StringToInstant
-
- All Implemented Interfaces:
StringToValueConverter.StringToValue<Instant>
public final class StringToInstant extends Object implements StringToValueConverter.StringToValue<Instant>
Implementation ofStringToValueConverter.StringToValue
that converts a string to anInstant
type. Respects theTimestampFormatTrait
if present.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Instant
convert(String value, SdkField<Instant> field)
Converts the value to a string.static StringToInstant
create(Map<MarshallLocation,TimestampFormatTrait.Format> defaultFormats)
-
-
-
Method Detail
-
convert
public Instant convert(String value, SdkField<Instant> field)
Description copied from interface:StringToValueConverter.StringToValue
Converts the value to a string.- Specified by:
convert
in interfaceStringToValueConverter.StringToValue<Instant>
- Parameters:
value
- Value to convert from.field
-SdkField
containing metadata about the member being unmarshalled.- Returns:
- Unmarshalled value.
-
create
public static StringToInstant create(Map<MarshallLocation,TimestampFormatTrait.Format> defaultFormats)
- Parameters:
defaultFormats
- Default formats for eachMarshallLocation
as defined by the protocol.- Returns:
- New
StringToValueConverter.StringToValue
forInstant
types.
-
-