Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright 2013-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package software.amazon.awssdk.services.protocolrestjson.model;
import java.time.Instant;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.traits.TimestampFormatTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
*/
@Generated("software.amazon.awssdk:codegen")
public final class MembersInHeadersResponse extends ProtocolRestJsonResponse implements
ToCopyableBuilder {
private static final SdkField STRING_MEMBER_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(MembersInHeadersResponse::stringMember)).setter(setter(Builder::stringMember))
.traits(LocationTrait.builder().location(MarshallLocation.HEADER).locationName("x-amz-string").build()).build();
private static final SdkField BOOLEAN_MEMBER_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.getter(getter(MembersInHeadersResponse::booleanMember)).setter(setter(Builder::booleanMember))
.traits(LocationTrait.builder().location(MarshallLocation.HEADER).locationName("x-amz-boolean").build()).build();
private static final SdkField INTEGER_MEMBER_FIELD = SdkField. builder(MarshallingType.INTEGER)
.getter(getter(MembersInHeadersResponse::integerMember)).setter(setter(Builder::integerMember))
.traits(LocationTrait.builder().location(MarshallLocation.HEADER).locationName("x-amz-integer").build()).build();
private static final SdkField LONG_MEMBER_FIELD = SdkField. builder(MarshallingType.LONG)
.getter(getter(MembersInHeadersResponse::longMember)).setter(setter(Builder::longMember))
.traits(LocationTrait.builder().location(MarshallLocation.HEADER).locationName("x-amz-long").build()).build();
private static final SdkField FLOAT_MEMBER_FIELD = SdkField. builder(MarshallingType.FLOAT)
.getter(getter(MembersInHeadersResponse::floatMember)).setter(setter(Builder::floatMember))
.traits(LocationTrait.builder().location(MarshallLocation.HEADER).locationName("x-amz-float").build()).build();
private static final SdkField DOUBLE_MEMBER_FIELD = SdkField. builder(MarshallingType.DOUBLE)
.getter(getter(MembersInHeadersResponse::doubleMember)).setter(setter(Builder::doubleMember))
.traits(LocationTrait.builder().location(MarshallLocation.HEADER).locationName("x-amz-double").build()).build();
private static final SdkField TIMESTAMP_MEMBER_FIELD = SdkField. builder(MarshallingType.INSTANT)
.getter(getter(MembersInHeadersResponse::timestampMember)).setter(setter(Builder::timestampMember))
.traits(LocationTrait.builder().location(MarshallLocation.HEADER).locationName("x-amz-timestamp").build()).build();
private static final SdkField ISO_TIMESTAMP_MEMBER_FIELD = SdkField
. builder(MarshallingType.INSTANT)
.getter(getter(MembersInHeadersResponse::isoTimestampMember))
.setter(setter(Builder::isoTimestampMember))
.traits(LocationTrait.builder().location(MarshallLocation.HEADER).locationName("x-amz-iso-timestamp").build(),
TimestampFormatTrait.create(TimestampFormatTrait.Format.ISO_8601)).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(STRING_MEMBER_FIELD,
BOOLEAN_MEMBER_FIELD, INTEGER_MEMBER_FIELD, LONG_MEMBER_FIELD, FLOAT_MEMBER_FIELD, DOUBLE_MEMBER_FIELD,
TIMESTAMP_MEMBER_FIELD, ISO_TIMESTAMP_MEMBER_FIELD));
private final String stringMember;
private final Boolean booleanMember;
private final Integer integerMember;
private final Long longMember;
private final Float floatMember;
private final Double doubleMember;
private final Instant timestampMember;
private final Instant isoTimestampMember;
private MembersInHeadersResponse(BuilderImpl builder) {
super(builder);
this.stringMember = builder.stringMember;
this.booleanMember = builder.booleanMember;
this.integerMember = builder.integerMember;
this.longMember = builder.longMember;
this.floatMember = builder.floatMember;
this.doubleMember = builder.doubleMember;
this.timestampMember = builder.timestampMember;
this.isoTimestampMember = builder.isoTimestampMember;
}
/**
* Returns the value of the StringMember property for this object.
*
* @return The value of the StringMember property for this object.
*/
public String stringMember() {
return stringMember;
}
/**
* Returns the value of the BooleanMember property for this object.
*
* @return The value of the BooleanMember property for this object.
*/
public Boolean booleanMember() {
return booleanMember;
}
/**
* Returns the value of the IntegerMember property for this object.
*
* @return The value of the IntegerMember property for this object.
*/
public Integer integerMember() {
return integerMember;
}
/**
* Returns the value of the LongMember property for this object.
*
* @return The value of the LongMember property for this object.
*/
public Long longMember() {
return longMember;
}
/**
* Returns the value of the FloatMember property for this object.
*
* @return The value of the FloatMember property for this object.
*/
public Float floatMember() {
return floatMember;
}
/**
* Returns the value of the DoubleMember property for this object.
*
* @return The value of the DoubleMember property for this object.
*/
public Double doubleMember() {
return doubleMember;
}
/**
* Returns the value of the TimestampMember property for this object.
*
* @return The value of the TimestampMember property for this object.
*/
public Instant timestampMember() {
return timestampMember;
}
/**
* Returns the value of the IsoTimestampMember property for this object.
*
* @return The value of the IsoTimestampMember property for this object.
*/
public Instant isoTimestampMember() {
return isoTimestampMember;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + Objects.hashCode(stringMember());
hashCode = 31 * hashCode + Objects.hashCode(booleanMember());
hashCode = 31 * hashCode + Objects.hashCode(integerMember());
hashCode = 31 * hashCode + Objects.hashCode(longMember());
hashCode = 31 * hashCode + Objects.hashCode(floatMember());
hashCode = 31 * hashCode + Objects.hashCode(doubleMember());
hashCode = 31 * hashCode + Objects.hashCode(timestampMember());
hashCode = 31 * hashCode + Objects.hashCode(isoTimestampMember());
return hashCode;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof MembersInHeadersResponse)) {
return false;
}
MembersInHeadersResponse other = (MembersInHeadersResponse) obj;
return Objects.equals(stringMember(), other.stringMember()) && Objects.equals(booleanMember(), other.booleanMember())
&& Objects.equals(integerMember(), other.integerMember()) && Objects.equals(longMember(), other.longMember())
&& Objects.equals(floatMember(), other.floatMember()) && Objects.equals(doubleMember(), other.doubleMember())
&& Objects.equals(timestampMember(), other.timestampMember())
&& Objects.equals(isoTimestampMember(), other.isoTimestampMember());
}
@Override
public String toString() {
return ToString.builder("MembersInHeadersResponse").add("StringMember", stringMember())
.add("BooleanMember", booleanMember()).add("IntegerMember", integerMember()).add("LongMember", longMember())
.add("FloatMember", floatMember()).add("DoubleMember", doubleMember()).add("TimestampMember", timestampMember())
.add("IsoTimestampMember", isoTimestampMember()).build();
}
public Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "StringMember":
return Optional.ofNullable(clazz.cast(stringMember()));
case "BooleanMember":
return Optional.ofNullable(clazz.cast(booleanMember()));
case "IntegerMember":
return Optional.ofNullable(clazz.cast(integerMember()));
case "LongMember":
return Optional.ofNullable(clazz.cast(longMember()));
case "FloatMember":
return Optional.ofNullable(clazz.cast(floatMember()));
case "DoubleMember":
return Optional.ofNullable(clazz.cast(doubleMember()));
case "TimestampMember":
return Optional.ofNullable(clazz.cast(timestampMember()));
case "IsoTimestampMember":
return Optional.ofNullable(clazz.cast(isoTimestampMember()));
default:
return Optional.empty();
}
}
@Override
public List> sdkFields() {
return SDK_FIELDS;
}
private static Function