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.StringToValuethat converts a string to anInstanttype. Respects theTimestampFormatTraitif present.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Instantconvert(String value, SdkField<Instant> field)Converts the value to a string.static StringToInstantcreate(Map<MarshallLocation,TimestampFormatTrait.Format> defaultFormats)
-
-
-
Method Detail
-
convert
public Instant convert(String value, SdkField<Instant> field)
Description copied from interface:StringToValueConverter.StringToValueConverts the value to a string.- Specified by:
convertin interfaceStringToValueConverter.StringToValue<Instant>- Parameters:
value- Value to convert from.field-SdkFieldcontaining metadata about the member being unmarshalled.- Returns:
- Unmarshalled value.
-
create
public static StringToInstant create(Map<MarshallLocation,TimestampFormatTrait.Format> defaultFormats)
- Parameters:
defaultFormats- Default formats for eachMarshallLocationas defined by the protocol.- Returns:
- New
StringToValueConverter.StringToValueforInstanttypes.
-
-