Please wait. This can take some minutes ...
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.
software.amazon.awssdk.services.pinpoint.model.EndpointBatchItem Maven / Gradle / Ivy
Go to download
The AWS Java SDK for Amazon Pinpoint module holds the client classes that are used for communicating
with Amazon Pinpoint Service
/*
* Copyright 2014-2019 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.pinpoint.model;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
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.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.traits.MapTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructMap;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
* Endpoint update request
*/
@Generated("software.amazon.awssdk:codegen")
public final class EndpointBatchItem implements SdkPojo, Serializable,
ToCopyableBuilder {
private static final SdkField ADDRESS_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(EndpointBatchItem::address)).setter(setter(Builder::address))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Address").build()).build();
private static final SdkField>> ATTRIBUTES_FIELD = SdkField
.>> builder(MarshallingType.MAP)
.getter(getter(EndpointBatchItem::attributes))
.setter(setter(Builder::attributes))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Attributes").build(),
MapTrait.builder()
.keyLocationName("key")
.valueLocationName("value")
.valueFieldInfo(
SdkField.> builder(MarshallingType.LIST)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("value").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.STRING)
.traits(LocationTrait.builder()
.location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build())
.build()).build()).build()).build();
private static final SdkField CHANNEL_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(EndpointBatchItem::channelTypeAsString)).setter(setter(Builder::channelType))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ChannelType").build()).build();
private static final SdkField DEMOGRAPHIC_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).getter(getter(EndpointBatchItem::demographic))
.setter(setter(Builder::demographic)).constructor(EndpointDemographic::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Demographic").build()).build();
private static final SdkField EFFECTIVE_DATE_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(EndpointBatchItem::effectiveDate)).setter(setter(Builder::effectiveDate))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EffectiveDate").build()).build();
private static final SdkField ENDPOINT_STATUS_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(EndpointBatchItem::endpointStatus)).setter(setter(Builder::endpointStatus))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EndpointStatus").build()).build();
private static final SdkField ID_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(EndpointBatchItem::id)).setter(setter(Builder::id))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Id").build()).build();
private static final SdkField LOCATION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).getter(getter(EndpointBatchItem::location))
.setter(setter(Builder::location)).constructor(EndpointLocation::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Location").build()).build();
private static final SdkField> METRICS_FIELD = SdkField
.> builder(MarshallingType.MAP)
.getter(getter(EndpointBatchItem::metrics))
.setter(setter(Builder::metrics))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Metrics").build(),
MapTrait.builder()
.keyLocationName("key")
.valueLocationName("value")
.valueFieldInfo(
SdkField. builder(MarshallingType.DOUBLE)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("value").build()).build()).build()).build();
private static final SdkField OPT_OUT_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(EndpointBatchItem::optOut)).setter(setter(Builder::optOut))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OptOut").build()).build();
private static final SdkField REQUEST_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(EndpointBatchItem::requestId)).setter(setter(Builder::requestId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RequestId").build()).build();
private static final SdkField USER_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.getter(getter(EndpointBatchItem::user)).setter(setter(Builder::user)).constructor(EndpointUser::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("User").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(ADDRESS_FIELD,
ATTRIBUTES_FIELD, CHANNEL_TYPE_FIELD, DEMOGRAPHIC_FIELD, EFFECTIVE_DATE_FIELD, ENDPOINT_STATUS_FIELD, ID_FIELD,
LOCATION_FIELD, METRICS_FIELD, OPT_OUT_FIELD, REQUEST_ID_FIELD, USER_FIELD));
private static final long serialVersionUID = 1L;
private final String address;
private final Map> attributes;
private final String channelType;
private final EndpointDemographic demographic;
private final String effectiveDate;
private final String endpointStatus;
private final String id;
private final EndpointLocation location;
private final Map metrics;
private final String optOut;
private final String requestId;
private final EndpointUser user;
private EndpointBatchItem(BuilderImpl builder) {
this.address = builder.address;
this.attributes = builder.attributes;
this.channelType = builder.channelType;
this.demographic = builder.demographic;
this.effectiveDate = builder.effectiveDate;
this.endpointStatus = builder.endpointStatus;
this.id = builder.id;
this.location = builder.location;
this.metrics = builder.metrics;
this.optOut = builder.optOut;
this.requestId = builder.requestId;
this.user = builder.user;
}
/**
* The destination for messages that you send to this endpoint. The address varies by channel. For mobile push
* channels, use the token provided by the push notification service, such as the APNs device token or the FCM
* registration token. For the SMS channel, use a phone number in E.164 format, such as +12065550100. For the email
* channel, use an email address.
*
* @return The destination for messages that you send to this endpoint. The address varies by channel. For mobile
* push channels, use the token provided by the push notification service, such as the APNs device token or
* the FCM registration token. For the SMS channel, use a phone number in E.164 format, such as
* +12065550100. For the email channel, use an email address.
*/
public String address() {
return address;
}
/**
* Custom attributes that describe the endpoint by associating a name with an array of values. For example, an
* attribute named "interests" might have the values ["science", "politics", "travel"]. You can use these attributes
* as selection criteria when you create a segment of users to engage with a messaging campaign.
*
* The following characters are not recommended in attribute names: # : ? \ /. The Amazon Pinpoint console does not
* display attributes that include these characters in the name. This limitation does not apply to attribute values.
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* @return Custom attributes that describe the endpoint by associating a name with an array of values. For example,
* an attribute named "interests" might have the values ["science", "politics", "travel"]. You can use these
* attributes as selection criteria when you create a segment of users to engage with a messaging campaign.
*
* The following characters are not recommended in attribute names: # : ? \ /. The Amazon Pinpoint console
* does not display attributes that include these characters in the name. This limitation does not apply to
* attribute values.
*/
public Map> attributes() {
return attributes;
}
/**
* The channel type.
*
* Valid values: GCM | APNS | APNS_SANDBOX | APNS_VOIP | APNS_VOIP_SANDBOX | ADM | SMS | EMAIL | BAIDU
*
* If the service returns an enum value that is not available in the current SDK version, {@link #channelType} will
* return {@link ChannelType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #channelTypeAsString}.
*
*
* @return The channel type.
*
* Valid values: GCM | APNS | APNS_SANDBOX | APNS_VOIP | APNS_VOIP_SANDBOX | ADM | SMS | EMAIL | BAIDU
* @see ChannelType
*/
public ChannelType channelType() {
return ChannelType.fromValue(channelType);
}
/**
* The channel type.
*
* Valid values: GCM | APNS | APNS_SANDBOX | APNS_VOIP | APNS_VOIP_SANDBOX | ADM | SMS | EMAIL | BAIDU
*
* If the service returns an enum value that is not available in the current SDK version, {@link #channelType} will
* return {@link ChannelType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #channelTypeAsString}.
*
*
* @return The channel type.
*
* Valid values: GCM | APNS | APNS_SANDBOX | APNS_VOIP | APNS_VOIP_SANDBOX | ADM | SMS | EMAIL | BAIDU
* @see ChannelType
*/
public String channelTypeAsString() {
return channelType;
}
/**
* The endpoint demographic attributes.
*
* @return The endpoint demographic attributes.
*/
public EndpointDemographic demographic() {
return demographic;
}
/**
* The last time the endpoint was updated. Provided in ISO 8601 format.
*
* @return The last time the endpoint was updated. Provided in ISO 8601 format.
*/
public String effectiveDate() {
return effectiveDate;
}
/**
* Unused.
*
* @return Unused.
*/
public String endpointStatus() {
return endpointStatus;
}
/**
* The unique Id for the Endpoint in the batch.
*
* @return The unique Id for the Endpoint in the batch.
*/
public String id() {
return id;
}
/**
* The endpoint location attributes.
*
* @return The endpoint location attributes.
*/
public EndpointLocation location() {
return location;
}
/**
* Custom metrics that your app reports to Amazon Pinpoint.
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* @return Custom metrics that your app reports to Amazon Pinpoint.
*/
public Map metrics() {
return metrics;
}
/**
* Indicates whether a user has opted out of receiving messages with one of the following values:
*
* ALL - User has opted out of all messages.
*
* NONE - Users has not opted out and receives all messages.
*
* @return Indicates whether a user has opted out of receiving messages with one of the following values:
*
* ALL - User has opted out of all messages.
*
* NONE - Users has not opted out and receives all messages.
*/
public String optOut() {
return optOut;
}
/**
* The unique ID for the most recent request to update the endpoint.
*
* @return The unique ID for the most recent request to update the endpoint.
*/
public String requestId() {
return requestId;
}
/**
* Custom user-specific attributes that your app reports to Amazon Pinpoint.
*
* @return Custom user-specific attributes that your app reports to Amazon Pinpoint.
*/
public EndpointUser user() {
return user;
}
@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(address());
hashCode = 31 * hashCode + Objects.hashCode(attributes());
hashCode = 31 * hashCode + Objects.hashCode(channelTypeAsString());
hashCode = 31 * hashCode + Objects.hashCode(demographic());
hashCode = 31 * hashCode + Objects.hashCode(effectiveDate());
hashCode = 31 * hashCode + Objects.hashCode(endpointStatus());
hashCode = 31 * hashCode + Objects.hashCode(id());
hashCode = 31 * hashCode + Objects.hashCode(location());
hashCode = 31 * hashCode + Objects.hashCode(metrics());
hashCode = 31 * hashCode + Objects.hashCode(optOut());
hashCode = 31 * hashCode + Objects.hashCode(requestId());
hashCode = 31 * hashCode + Objects.hashCode(user());
return hashCode;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof EndpointBatchItem)) {
return false;
}
EndpointBatchItem other = (EndpointBatchItem) obj;
return Objects.equals(address(), other.address()) && Objects.equals(attributes(), other.attributes())
&& Objects.equals(channelTypeAsString(), other.channelTypeAsString())
&& Objects.equals(demographic(), other.demographic()) && Objects.equals(effectiveDate(), other.effectiveDate())
&& Objects.equals(endpointStatus(), other.endpointStatus()) && Objects.equals(id(), other.id())
&& Objects.equals(location(), other.location()) && Objects.equals(metrics(), other.metrics())
&& Objects.equals(optOut(), other.optOut()) && Objects.equals(requestId(), other.requestId())
&& Objects.equals(user(), other.user());
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*/
@Override
public String toString() {
return ToString.builder("EndpointBatchItem").add("Address", address()).add("Attributes", attributes())
.add("ChannelType", channelTypeAsString()).add("Demographic", demographic())
.add("EffectiveDate", effectiveDate()).add("EndpointStatus", endpointStatus()).add("Id", id())
.add("Location", location()).add("Metrics", metrics()).add("OptOut", optOut()).add("RequestId", requestId())
.add("User", user()).build();
}
public Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "Address":
return Optional.ofNullable(clazz.cast(address()));
case "Attributes":
return Optional.ofNullable(clazz.cast(attributes()));
case "ChannelType":
return Optional.ofNullable(clazz.cast(channelTypeAsString()));
case "Demographic":
return Optional.ofNullable(clazz.cast(demographic()));
case "EffectiveDate":
return Optional.ofNullable(clazz.cast(effectiveDate()));
case "EndpointStatus":
return Optional.ofNullable(clazz.cast(endpointStatus()));
case "Id":
return Optional.ofNullable(clazz.cast(id()));
case "Location":
return Optional.ofNullable(clazz.cast(location()));
case "Metrics":
return Optional.ofNullable(clazz.cast(metrics()));
case "OptOut":
return Optional.ofNullable(clazz.cast(optOut()));
case "RequestId":
return Optional.ofNullable(clazz.cast(requestId()));
case "User":
return Optional.ofNullable(clazz.cast(user()));
default:
return Optional.empty();
}
}
@Override
public List> sdkFields() {
return SDK_FIELDS;
}
private static Function getter(Function g) {
return obj -> g.apply((EndpointBatchItem) obj);
}
private static BiConsumer setter(BiConsumer s) {
return (obj, val) -> s.accept((Builder) obj, val);
}
public interface Builder extends SdkPojo, CopyableBuilder {
/**
* The destination for messages that you send to this endpoint. The address varies by channel. For mobile push
* channels, use the token provided by the push notification service, such as the APNs device token or the FCM
* registration token. For the SMS channel, use a phone number in E.164 format, such as +12065550100. For the
* email channel, use an email address.
*
* @param address
* The destination for messages that you send to this endpoint. The address varies by channel. For mobile
* push channels, use the token provided by the push notification service, such as the APNs device token
* or the FCM registration token. For the SMS channel, use a phone number in E.164 format, such as
* +12065550100. For the email channel, use an email address.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder address(String address);
/**
* Custom attributes that describe the endpoint by associating a name with an array of values. For example, an
* attribute named "interests" might have the values ["science", "politics", "travel"]. You can use these
* attributes as selection criteria when you create a segment of users to engage with a messaging campaign.
*
* The following characters are not recommended in attribute names: # : ? \ /. The Amazon Pinpoint console does
* not display attributes that include these characters in the name. This limitation does not apply to attribute
* values.
*
* @param attributes
* Custom attributes that describe the endpoint by associating a name with an array of values. For
* example, an attribute named "interests" might have the values ["science", "politics", "travel"]. You
* can use these attributes as selection criteria when you create a segment of users to engage with a
* messaging campaign.
*
* The following characters are not recommended in attribute names: # : ? \ /. The Amazon Pinpoint
* console does not display attributes that include these characters in the name. This limitation does
* not apply to attribute values.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder attributes(Map> attributes);
/**
* The channel type.
*
* Valid values: GCM | APNS | APNS_SANDBOX | APNS_VOIP | APNS_VOIP_SANDBOX | ADM | SMS | EMAIL | BAIDU
*
* @param channelType
* The channel type.
*
* Valid values: GCM | APNS | APNS_SANDBOX | APNS_VOIP | APNS_VOIP_SANDBOX | ADM | SMS | EMAIL | BAIDU
* @see ChannelType
* @return Returns a reference to this object so that method calls can be chained together.
* @see ChannelType
*/
Builder channelType(String channelType);
/**
* The channel type.
*
* Valid values: GCM | APNS | APNS_SANDBOX | APNS_VOIP | APNS_VOIP_SANDBOX | ADM | SMS | EMAIL | BAIDU
*
* @param channelType
* The channel type.
*
* Valid values: GCM | APNS | APNS_SANDBOX | APNS_VOIP | APNS_VOIP_SANDBOX | ADM | SMS | EMAIL | BAIDU
* @see ChannelType
* @return Returns a reference to this object so that method calls can be chained together.
* @see ChannelType
*/
Builder channelType(ChannelType channelType);
/**
* The endpoint demographic attributes.
*
* @param demographic
* The endpoint demographic attributes.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder demographic(EndpointDemographic demographic);
/**
* The endpoint demographic attributes. This is a convenience that creates an instance of the
* {@link EndpointDemographic.Builder} avoiding the need to create one manually via
* {@link EndpointDemographic#builder()}.
*
* When the {@link Consumer} completes, {@link EndpointDemographic.Builder#build()} is called immediately and
* its result is passed to {@link #demographic(EndpointDemographic)}.
*
* @param demographic
* a consumer that will call methods on {@link EndpointDemographic.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #demographic(EndpointDemographic)
*/
default Builder demographic(Consumer demographic) {
return demographic(EndpointDemographic.builder().applyMutation(demographic).build());
}
/**
* The last time the endpoint was updated. Provided in ISO 8601 format.
*
* @param effectiveDate
* The last time the endpoint was updated. Provided in ISO 8601 format.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder effectiveDate(String effectiveDate);
/**
* Unused.
*
* @param endpointStatus
* Unused.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder endpointStatus(String endpointStatus);
/**
* The unique Id for the Endpoint in the batch.
*
* @param id
* The unique Id for the Endpoint in the batch.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder id(String id);
/**
* The endpoint location attributes.
*
* @param location
* The endpoint location attributes.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder location(EndpointLocation location);
/**
* The endpoint location attributes. This is a convenience that creates an instance of the
* {@link EndpointLocation.Builder} avoiding the need to create one manually via
* {@link EndpointLocation#builder()}.
*
* When the {@link Consumer} completes, {@link EndpointLocation.Builder#build()} is called immediately and its
* result is passed to {@link #location(EndpointLocation)}.
*
* @param location
* a consumer that will call methods on {@link EndpointLocation.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #location(EndpointLocation)
*/
default Builder location(Consumer location) {
return location(EndpointLocation.builder().applyMutation(location).build());
}
/**
* Custom metrics that your app reports to Amazon Pinpoint.
*
* @param metrics
* Custom metrics that your app reports to Amazon Pinpoint.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder metrics(Map metrics);
/**
* Indicates whether a user has opted out of receiving messages with one of the following values:
*
* ALL - User has opted out of all messages.
*
* NONE - Users has not opted out and receives all messages.
*
* @param optOut
* Indicates whether a user has opted out of receiving messages with one of the following values:
*
* ALL - User has opted out of all messages.
*
* NONE - Users has not opted out and receives all messages.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder optOut(String optOut);
/**
* The unique ID for the most recent request to update the endpoint.
*
* @param requestId
* The unique ID for the most recent request to update the endpoint.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder requestId(String requestId);
/**
* Custom user-specific attributes that your app reports to Amazon Pinpoint.
*
* @param user
* Custom user-specific attributes that your app reports to Amazon Pinpoint.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder user(EndpointUser user);
/**
* Custom user-specific attributes that your app reports to Amazon Pinpoint. This is a convenience that creates
* an instance of the {@link EndpointUser.Builder} avoiding the need to create one manually via
* {@link EndpointUser#builder()}.
*
* When the {@link Consumer} completes, {@link EndpointUser.Builder#build()} is called immediately and its
* result is passed to {@link #user(EndpointUser)}.
*
* @param user
* a consumer that will call methods on {@link EndpointUser.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #user(EndpointUser)
*/
default Builder user(Consumer user) {
return user(EndpointUser.builder().applyMutation(user).build());
}
}
static final class BuilderImpl implements Builder {
private String address;
private Map> attributes = DefaultSdkAutoConstructMap.getInstance();
private String channelType;
private EndpointDemographic demographic;
private String effectiveDate;
private String endpointStatus;
private String id;
private EndpointLocation location;
private Map metrics = DefaultSdkAutoConstructMap.getInstance();
private String optOut;
private String requestId;
private EndpointUser user;
private BuilderImpl() {
}
private BuilderImpl(EndpointBatchItem model) {
address(model.address);
attributes(model.attributes);
channelType(model.channelType);
demographic(model.demographic);
effectiveDate(model.effectiveDate);
endpointStatus(model.endpointStatus);
id(model.id);
location(model.location);
metrics(model.metrics);
optOut(model.optOut);
requestId(model.requestId);
user(model.user);
}
public final String getAddress() {
return address;
}
@Override
public final Builder address(String address) {
this.address = address;
return this;
}
public final void setAddress(String address) {
this.address = address;
}
public final Map> getAttributes() {
return attributes;
}
@Override
public final Builder attributes(Map> attributes) {
this.attributes = MapOfListOf__stringCopier.copy(attributes);
return this;
}
public final void setAttributes(Map> attributes) {
this.attributes = MapOfListOf__stringCopier.copy(attributes);
}
public final String getChannelTypeAsString() {
return channelType;
}
@Override
public final Builder channelType(String channelType) {
this.channelType = channelType;
return this;
}
@Override
public final Builder channelType(ChannelType channelType) {
this.channelType(channelType.toString());
return this;
}
public final void setChannelType(String channelType) {
this.channelType = channelType;
}
public final EndpointDemographic.Builder getDemographic() {
return demographic != null ? demographic.toBuilder() : null;
}
@Override
public final Builder demographic(EndpointDemographic demographic) {
this.demographic = demographic;
return this;
}
public final void setDemographic(EndpointDemographic.BuilderImpl demographic) {
this.demographic = demographic != null ? demographic.build() : null;
}
public final String getEffectiveDate() {
return effectiveDate;
}
@Override
public final Builder effectiveDate(String effectiveDate) {
this.effectiveDate = effectiveDate;
return this;
}
public final void setEffectiveDate(String effectiveDate) {
this.effectiveDate = effectiveDate;
}
public final String getEndpointStatus() {
return endpointStatus;
}
@Override
public final Builder endpointStatus(String endpointStatus) {
this.endpointStatus = endpointStatus;
return this;
}
public final void setEndpointStatus(String endpointStatus) {
this.endpointStatus = endpointStatus;
}
public final String getId() {
return id;
}
@Override
public final Builder id(String id) {
this.id = id;
return this;
}
public final void setId(String id) {
this.id = id;
}
public final EndpointLocation.Builder getLocation() {
return location != null ? location.toBuilder() : null;
}
@Override
public final Builder location(EndpointLocation location) {
this.location = location;
return this;
}
public final void setLocation(EndpointLocation.BuilderImpl location) {
this.location = location != null ? location.build() : null;
}
public final Map getMetrics() {
return metrics;
}
@Override
public final Builder metrics(Map metrics) {
this.metrics = MapOf__doubleCopier.copy(metrics);
return this;
}
public final void setMetrics(Map metrics) {
this.metrics = MapOf__doubleCopier.copy(metrics);
}
public final String getOptOut() {
return optOut;
}
@Override
public final Builder optOut(String optOut) {
this.optOut = optOut;
return this;
}
public final void setOptOut(String optOut) {
this.optOut = optOut;
}
public final String getRequestId() {
return requestId;
}
@Override
public final Builder requestId(String requestId) {
this.requestId = requestId;
return this;
}
public final void setRequestId(String requestId) {
this.requestId = requestId;
}
public final EndpointUser.Builder getUser() {
return user != null ? user.toBuilder() : null;
}
@Override
public final Builder user(EndpointUser user) {
this.user = user;
return this;
}
public final void setUser(EndpointUser.BuilderImpl user) {
this.user = user != null ? user.build() : null;
}
@Override
public EndpointBatchItem build() {
return new EndpointBatchItem(this);
}
@Override
public List> sdkFields() {
return SDK_FIELDS;
}
}
}