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 of
StringToValueConverter.StringToValue
that converts a string to an Instant
type.
Respects the TimestampFormatTrait
if present.-
Method Summary
Modifier and TypeMethodDescriptionConverts the value to a string.static StringToInstant
create
(Map<MarshallLocation, TimestampFormatTrait.Format> defaultFormats)
-
Method Details
-
convert
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.
-