All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.pinpoint.model.PublicEndpoint 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

There is a newer version: 2.28.4
Show newest version
/*
 * Copyright 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.core.util.SdkAutoConstructMap;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Specifies the properties and attributes of an endpoint that's associated with an event. *

*/ @Generated("software.amazon.awssdk:codegen") public final class PublicEndpoint implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField ADDRESS_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Address") .getter(getter(PublicEndpoint::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) .memberName("Attributes") .getter(getter(PublicEndpoint::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) .memberName("ChannelType").getter(getter(PublicEndpoint::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).memberName("Demographic") .getter(getter(PublicEndpoint::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) .memberName("EffectiveDate").getter(getter(PublicEndpoint::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) .memberName("EndpointStatus").getter(getter(PublicEndpoint::endpointStatus)).setter(setter(Builder::endpointStatus)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EndpointStatus").build()).build(); private static final SdkField LOCATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("Location").getter(getter(PublicEndpoint::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) .memberName("Metrics") .getter(getter(PublicEndpoint::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).memberName("OptOut") .getter(getter(PublicEndpoint::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) .memberName("RequestId").getter(getter(PublicEndpoint::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) .memberName("User").getter(getter(PublicEndpoint::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, 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 EndpointLocation location; private final Map metrics; private final String optOut; private final String requestId; private final EndpointUser user; private PublicEndpoint(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.location = builder.location; this.metrics = builder.metrics; this.optOut = builder.optOut; this.requestId = builder.requestId; this.user = builder.user; } /** *

* The unique identifier for the recipient, such as a device token, email address, or mobile phone number. *

* * @return The unique identifier for the recipient, such as a device token, email address, or mobile phone number. */ public final String address() { return address; } /** * Returns true if the Attributes property was specified by the sender (it may be empty), or false if the sender did * not specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS service. */ public final boolean hasAttributes() { return attributes != null && !(attributes instanceof SdkAutoConstructMap); } /** *

* One or more custom attributes that describe the endpoint by associating a name with an array of values. You can * use these attributes as filter criteria when you create segments. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* You can use {@link #hasAttributes()} to see if a value was sent in this field. *

* * @return One or more custom attributes that describe the endpoint by associating a name with an array of values. * You can use these attributes as filter criteria when you create segments. */ public final Map> attributes() { return attributes; } /** *

* The channel that's used when sending messages or push notifications to the endpoint. *

*

* 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 that's used when sending messages or push notifications to the endpoint. * @see ChannelType */ public final ChannelType channelType() { return ChannelType.fromValue(channelType); } /** *

* The channel that's used when sending messages or push notifications to the endpoint. *

*

* 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 that's used when sending messages or push notifications to the endpoint. * @see ChannelType */ public final String channelTypeAsString() { return channelType; } /** *

* The demographic information for the endpoint, such as the time zone and platform. *

* * @return The demographic information for the endpoint, such as the time zone and platform. */ public final EndpointDemographic demographic() { return demographic; } /** *

* The date and time, in ISO 8601 format, when the endpoint was last updated. *

* * @return The date and time, in ISO 8601 format, when the endpoint was last updated. */ public final String effectiveDate() { return effectiveDate; } /** *

* Specifies whether to send messages or push notifications to the endpoint. Valid values are: ACTIVE, messages are * sent to the endpoint; and, INACTIVE, messages aren’t sent to the endpoint. *

*

* Amazon Pinpoint automatically sets this value to ACTIVE when you create an endpoint or update an existing * endpoint. Amazon Pinpoint automatically sets this value to INACTIVE if you update another endpoint that has the * same address specified by the Address property. *

* * @return Specifies whether to send messages or push notifications to the endpoint. Valid values are: ACTIVE, * messages are sent to the endpoint; and, INACTIVE, messages aren’t sent to the endpoint.

*

* Amazon Pinpoint automatically sets this value to ACTIVE when you create an endpoint or update an existing * endpoint. Amazon Pinpoint automatically sets this value to INACTIVE if you update another endpoint that * has the same address specified by the Address property. */ public final String endpointStatus() { return endpointStatus; } /** *

* The geographic information for the endpoint. *

* * @return The geographic information for the endpoint. */ public final EndpointLocation location() { return location; } /** * Returns true if the Metrics property was specified by the sender (it may be empty), or false if the sender did * not specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS service. */ public final boolean hasMetrics() { return metrics != null && !(metrics instanceof SdkAutoConstructMap); } /** *

* One or more custom metrics that your app reports to Amazon Pinpoint for the endpoint. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* You can use {@link #hasMetrics()} to see if a value was sent in this field. *

* * @return One or more custom metrics that your app reports to Amazon Pinpoint for the endpoint. */ public final Map metrics() { return metrics; } /** *

* Specifies whether the user who's associated with the endpoint has opted out of receiving messages and push * notifications from you. Possible values are: ALL, the user has opted out and doesn't want to receive any messages * or push notifications; and, NONE, the user hasn't opted out and wants to receive all messages and push * notifications. *

* * @return Specifies whether the user who's associated with the endpoint has opted out of receiving messages and * push notifications from you. Possible values are: ALL, the user has opted out and doesn't want to receive * any messages or push notifications; and, NONE, the user hasn't opted out and wants to receive all * messages and push notifications. */ public final String optOut() { return optOut; } /** *

* A unique identifier that's generated each time the endpoint is updated. *

* * @return A unique identifier that's generated each time the endpoint is updated. */ public final String requestId() { return requestId; } /** *

* One or more custom user attributes that your app reports to Amazon Pinpoint for the user who's associated with * the endpoint. *

* * @return One or more custom user attributes that your app reports to Amazon Pinpoint for the user who's associated * with the endpoint. */ public final EndpointUser user() { return user; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(address()); hashCode = 31 * hashCode + Objects.hashCode(hasAttributes() ? attributes() : null); 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(location()); hashCode = 31 * hashCode + Objects.hashCode(hasMetrics() ? metrics() : null); hashCode = 31 * hashCode + Objects.hashCode(optOut()); hashCode = 31 * hashCode + Objects.hashCode(requestId()); hashCode = 31 * hashCode + Objects.hashCode(user()); return hashCode; } @Override public final boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof PublicEndpoint)) { return false; } PublicEndpoint other = (PublicEndpoint) obj; return Objects.equals(address(), other.address()) && hasAttributes() == other.hasAttributes() && 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(location(), other.location()) && hasMetrics() == other.hasMetrics() && 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 final String toString() { return ToString.builder("PublicEndpoint").add("Address", address()) .add("Attributes", hasAttributes() ? attributes() : null).add("ChannelType", channelTypeAsString()) .add("Demographic", demographic()).add("EffectiveDate", effectiveDate()).add("EndpointStatus", endpointStatus()) .add("Location", location()).add("Metrics", hasMetrics() ? metrics() : null).add("OptOut", optOut()) .add("RequestId", requestId()).add("User", user()).build(); } public final 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 "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 final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((PublicEndpoint) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The unique identifier for the recipient, such as a device token, email address, or mobile phone number. *

* * @param address * The unique identifier for the recipient, such as a device token, email address, or mobile phone * number. * @return Returns a reference to this object so that method calls can be chained together. */ Builder address(String address); /** *

* One or more custom attributes that describe the endpoint by associating a name with an array of values. You * can use these attributes as filter criteria when you create segments. *

* * @param attributes * One or more custom attributes that describe the endpoint by associating a name with an array of * values. You can use these attributes as filter criteria when you create segments. * @return Returns a reference to this object so that method calls can be chained together. */ Builder attributes(Map> attributes); /** *

* The channel that's used when sending messages or push notifications to the endpoint. *

* * @param channelType * The channel that's used when sending messages or push notifications to the endpoint. * @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 that's used when sending messages or push notifications to the endpoint. *

* * @param channelType * The channel that's used when sending messages or push notifications to the endpoint. * @see ChannelType * @return Returns a reference to this object so that method calls can be chained together. * @see ChannelType */ Builder channelType(ChannelType channelType); /** *

* The demographic information for the endpoint, such as the time zone and platform. *

* * @param demographic * The demographic information for the endpoint, such as the time zone and platform. * @return Returns a reference to this object so that method calls can be chained together. */ Builder demographic(EndpointDemographic demographic); /** *

* The demographic information for the endpoint, such as the time zone and platform. *

* 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 date and time, in ISO 8601 format, when the endpoint was last updated. *

* * @param effectiveDate * The date and time, in ISO 8601 format, when the endpoint was last updated. * @return Returns a reference to this object so that method calls can be chained together. */ Builder effectiveDate(String effectiveDate); /** *

* Specifies whether to send messages or push notifications to the endpoint. Valid values are: ACTIVE, messages * are sent to the endpoint; and, INACTIVE, messages aren’t sent to the endpoint. *

*

* Amazon Pinpoint automatically sets this value to ACTIVE when you create an endpoint or update an existing * endpoint. Amazon Pinpoint automatically sets this value to INACTIVE if you update another endpoint that has * the same address specified by the Address property. *

* * @param endpointStatus * Specifies whether to send messages or push notifications to the endpoint. Valid values are: ACTIVE, * messages are sent to the endpoint; and, INACTIVE, messages aren’t sent to the endpoint.

*

* Amazon Pinpoint automatically sets this value to ACTIVE when you create an endpoint or update an * existing endpoint. Amazon Pinpoint automatically sets this value to INACTIVE if you update another * endpoint that has the same address specified by the Address property. * @return Returns a reference to this object so that method calls can be chained together. */ Builder endpointStatus(String endpointStatus); /** *

* The geographic information for the endpoint. *

* * @param location * The geographic information for the endpoint. * @return Returns a reference to this object so that method calls can be chained together. */ Builder location(EndpointLocation location); /** *

* The geographic information for the endpoint. *

* 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()); } /** *

* One or more custom metrics that your app reports to Amazon Pinpoint for the endpoint. *

* * @param metrics * One or more custom metrics that your app reports to Amazon Pinpoint for the endpoint. * @return Returns a reference to this object so that method calls can be chained together. */ Builder metrics(Map metrics); /** *

* Specifies whether the user who's associated with the endpoint has opted out of receiving messages and push * notifications from you. Possible values are: ALL, the user has opted out and doesn't want to receive any * messages or push notifications; and, NONE, the user hasn't opted out and wants to receive all messages and * push notifications. *

* * @param optOut * Specifies whether the user who's associated with the endpoint has opted out of receiving messages and * push notifications from you. Possible values are: ALL, the user has opted out and doesn't want to * receive any messages or push notifications; and, NONE, the user hasn't opted out and wants to receive * all messages and push notifications. * @return Returns a reference to this object so that method calls can be chained together. */ Builder optOut(String optOut); /** *

* A unique identifier that's generated each time the endpoint is updated. *

* * @param requestId * A unique identifier that's generated each time the endpoint is updated. * @return Returns a reference to this object so that method calls can be chained together. */ Builder requestId(String requestId); /** *

* One or more custom user attributes that your app reports to Amazon Pinpoint for the user who's associated * with the endpoint. *

* * @param user * One or more custom user attributes that your app reports to Amazon Pinpoint for the user who's * associated with the endpoint. * @return Returns a reference to this object so that method calls can be chained together. */ Builder user(EndpointUser user); /** *

* One or more custom user attributes that your app reports to Amazon Pinpoint for the user who's associated * with the endpoint. *

* 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 EndpointLocation location; private Map metrics = DefaultSdkAutoConstructMap.getInstance(); private String optOut; private String requestId; private EndpointUser user; private BuilderImpl() { } private BuilderImpl(PublicEndpoint model) { address(model.address); attributes(model.attributes); channelType(model.channelType); demographic(model.demographic); effectiveDate(model.effectiveDate); endpointStatus(model.endpointStatus); 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() { if (attributes instanceof SdkAutoConstructMap) { return null; } 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 getChannelType() { return channelType; } @Override public final Builder channelType(String channelType) { this.channelType = channelType; return this; } @Override public final Builder channelType(ChannelType channelType) { this.channelType(channelType == null ? null : 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 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() { if (metrics instanceof SdkAutoConstructMap) { return null; } 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 PublicEndpoint build() { return new PublicEndpoint(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy