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 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.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.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
* SMS Channel Response.
*/
@Generated("software.amazon.awssdk:codegen")
public final class SMSChannelResponse implements SdkPojo, Serializable,
ToCopyableBuilder {
private static final SdkField APPLICATION_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(SMSChannelResponse::applicationId)).setter(setter(Builder::applicationId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ApplicationId").build()).build();
private static final SdkField CREATION_DATE_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(SMSChannelResponse::creationDate)).setter(setter(Builder::creationDate))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreationDate").build()).build();
private static final SdkField ENABLED_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.getter(getter(SMSChannelResponse::enabled)).setter(setter(Builder::enabled))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Enabled").build()).build();
private static final SdkField HAS_CREDENTIAL_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.getter(getter(SMSChannelResponse::hasCredential)).setter(setter(Builder::hasCredential))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("HasCredential").build()).build();
private static final SdkField ID_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(SMSChannelResponse::id)).setter(setter(Builder::id))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Id").build()).build();
private static final SdkField IS_ARCHIVED_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.getter(getter(SMSChannelResponse::isArchived)).setter(setter(Builder::isArchived))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("IsArchived").build()).build();
private static final SdkField LAST_MODIFIED_BY_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(SMSChannelResponse::lastModifiedBy)).setter(setter(Builder::lastModifiedBy))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LastModifiedBy").build()).build();
private static final SdkField LAST_MODIFIED_DATE_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(SMSChannelResponse::lastModifiedDate)).setter(setter(Builder::lastModifiedDate))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LastModifiedDate").build()).build();
private static final SdkField PLATFORM_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(SMSChannelResponse::platform)).setter(setter(Builder::platform))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Platform").build()).build();
private static final SdkField PROMOTIONAL_MESSAGES_PER_SECOND_FIELD = SdkField
. builder(MarshallingType.INTEGER)
.getter(getter(SMSChannelResponse::promotionalMessagesPerSecond))
.setter(setter(Builder::promotionalMessagesPerSecond))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PromotionalMessagesPerSecond")
.build()).build();
private static final SdkField SENDER_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(SMSChannelResponse::senderId)).setter(setter(Builder::senderId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SenderId").build()).build();
private static final SdkField SHORT_CODE_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(SMSChannelResponse::shortCode)).setter(setter(Builder::shortCode))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ShortCode").build()).build();
private static final SdkField TRANSACTIONAL_MESSAGES_PER_SECOND_FIELD = SdkField
. builder(MarshallingType.INTEGER)
.getter(getter(SMSChannelResponse::transactionalMessagesPerSecond))
.setter(setter(Builder::transactionalMessagesPerSecond))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TransactionalMessagesPerSecond")
.build()).build();
private static final SdkField VERSION_FIELD = SdkField. builder(MarshallingType.INTEGER)
.getter(getter(SMSChannelResponse::version)).setter(setter(Builder::version))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Version").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(APPLICATION_ID_FIELD,
CREATION_DATE_FIELD, ENABLED_FIELD, HAS_CREDENTIAL_FIELD, ID_FIELD, IS_ARCHIVED_FIELD, LAST_MODIFIED_BY_FIELD,
LAST_MODIFIED_DATE_FIELD, PLATFORM_FIELD, PROMOTIONAL_MESSAGES_PER_SECOND_FIELD, SENDER_ID_FIELD, SHORT_CODE_FIELD,
TRANSACTIONAL_MESSAGES_PER_SECOND_FIELD, VERSION_FIELD));
private static final long serialVersionUID = 1L;
private final String applicationId;
private final String creationDate;
private final Boolean enabled;
private final Boolean hasCredential;
private final String id;
private final Boolean isArchived;
private final String lastModifiedBy;
private final String lastModifiedDate;
private final String platform;
private final Integer promotionalMessagesPerSecond;
private final String senderId;
private final String shortCode;
private final Integer transactionalMessagesPerSecond;
private final Integer version;
private SMSChannelResponse(BuilderImpl builder) {
this.applicationId = builder.applicationId;
this.creationDate = builder.creationDate;
this.enabled = builder.enabled;
this.hasCredential = builder.hasCredential;
this.id = builder.id;
this.isArchived = builder.isArchived;
this.lastModifiedBy = builder.lastModifiedBy;
this.lastModifiedDate = builder.lastModifiedDate;
this.platform = builder.platform;
this.promotionalMessagesPerSecond = builder.promotionalMessagesPerSecond;
this.senderId = builder.senderId;
this.shortCode = builder.shortCode;
this.transactionalMessagesPerSecond = builder.transactionalMessagesPerSecond;
this.version = builder.version;
}
/**
* The unique ID of the application to which the SMS channel belongs.
*
* @return The unique ID of the application to which the SMS channel belongs.
*/
public String applicationId() {
return applicationId;
}
/**
* The date that the settings were last updated in ISO 8601 format.
*
* @return The date that the settings were last updated in ISO 8601 format.
*/
public String creationDate() {
return creationDate;
}
/**
* If the channel is enabled for sending messages.
*
* @return If the channel is enabled for sending messages.
*/
public Boolean enabled() {
return enabled;
}
/**
* Not used. Retained for backwards compatibility.
*
* @return Not used. Retained for backwards compatibility.
*/
public Boolean hasCredential() {
return hasCredential;
}
/**
* Channel ID. Not used, only for backwards compatibility.
*
* @return Channel ID. Not used, only for backwards compatibility.
*/
public String id() {
return id;
}
/**
* Is this channel archived
*
* @return Is this channel archived
*/
public Boolean isArchived() {
return isArchived;
}
/**
* Who last updated this entry
*
* @return Who last updated this entry
*/
public String lastModifiedBy() {
return lastModifiedBy;
}
/**
* Last date this was updated
*
* @return Last date this was updated
*/
public String lastModifiedDate() {
return lastModifiedDate;
}
/**
* Platform type. Will be "SMS"
*
* @return Platform type. Will be "SMS"
*/
public String platform() {
return platform;
}
/**
* Promotional messages per second that can be sent
*
* @return Promotional messages per second that can be sent
*/
public Integer promotionalMessagesPerSecond() {
return promotionalMessagesPerSecond;
}
/**
* Sender identifier of your messages.
*
* @return Sender identifier of your messages.
*/
public String senderId() {
return senderId;
}
/**
* The short code registered with the phone provider.
*
* @return The short code registered with the phone provider.
*/
public String shortCode() {
return shortCode;
}
/**
* Transactional messages per second that can be sent
*
* @return Transactional messages per second that can be sent
*/
public Integer transactionalMessagesPerSecond() {
return transactionalMessagesPerSecond;
}
/**
* Version of channel
*
* @return Version of channel
*/
public Integer version() {
return version;
}
@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(applicationId());
hashCode = 31 * hashCode + Objects.hashCode(creationDate());
hashCode = 31 * hashCode + Objects.hashCode(enabled());
hashCode = 31 * hashCode + Objects.hashCode(hasCredential());
hashCode = 31 * hashCode + Objects.hashCode(id());
hashCode = 31 * hashCode + Objects.hashCode(isArchived());
hashCode = 31 * hashCode + Objects.hashCode(lastModifiedBy());
hashCode = 31 * hashCode + Objects.hashCode(lastModifiedDate());
hashCode = 31 * hashCode + Objects.hashCode(platform());
hashCode = 31 * hashCode + Objects.hashCode(promotionalMessagesPerSecond());
hashCode = 31 * hashCode + Objects.hashCode(senderId());
hashCode = 31 * hashCode + Objects.hashCode(shortCode());
hashCode = 31 * hashCode + Objects.hashCode(transactionalMessagesPerSecond());
hashCode = 31 * hashCode + Objects.hashCode(version());
return hashCode;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof SMSChannelResponse)) {
return false;
}
SMSChannelResponse other = (SMSChannelResponse) obj;
return Objects.equals(applicationId(), other.applicationId()) && Objects.equals(creationDate(), other.creationDate())
&& Objects.equals(enabled(), other.enabled()) && Objects.equals(hasCredential(), other.hasCredential())
&& Objects.equals(id(), other.id()) && Objects.equals(isArchived(), other.isArchived())
&& Objects.equals(lastModifiedBy(), other.lastModifiedBy())
&& Objects.equals(lastModifiedDate(), other.lastModifiedDate()) && Objects.equals(platform(), other.platform())
&& Objects.equals(promotionalMessagesPerSecond(), other.promotionalMessagesPerSecond())
&& Objects.equals(senderId(), other.senderId()) && Objects.equals(shortCode(), other.shortCode())
&& Objects.equals(transactionalMessagesPerSecond(), other.transactionalMessagesPerSecond())
&& Objects.equals(version(), other.version());
}
/**
* 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("SMSChannelResponse").add("ApplicationId", applicationId()).add("CreationDate", creationDate())
.add("Enabled", enabled()).add("HasCredential", hasCredential()).add("Id", id()).add("IsArchived", isArchived())
.add("LastModifiedBy", lastModifiedBy()).add("LastModifiedDate", lastModifiedDate()).add("Platform", platform())
.add("PromotionalMessagesPerSecond", promotionalMessagesPerSecond()).add("SenderId", senderId())
.add("ShortCode", shortCode()).add("TransactionalMessagesPerSecond", transactionalMessagesPerSecond())
.add("Version", version()).build();
}
public Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "ApplicationId":
return Optional.ofNullable(clazz.cast(applicationId()));
case "CreationDate":
return Optional.ofNullable(clazz.cast(creationDate()));
case "Enabled":
return Optional.ofNullable(clazz.cast(enabled()));
case "HasCredential":
return Optional.ofNullable(clazz.cast(hasCredential()));
case "Id":
return Optional.ofNullable(clazz.cast(id()));
case "IsArchived":
return Optional.ofNullable(clazz.cast(isArchived()));
case "LastModifiedBy":
return Optional.ofNullable(clazz.cast(lastModifiedBy()));
case "LastModifiedDate":
return Optional.ofNullable(clazz.cast(lastModifiedDate()));
case "Platform":
return Optional.ofNullable(clazz.cast(platform()));
case "PromotionalMessagesPerSecond":
return Optional.ofNullable(clazz.cast(promotionalMessagesPerSecond()));
case "SenderId":
return Optional.ofNullable(clazz.cast(senderId()));
case "ShortCode":
return Optional.ofNullable(clazz.cast(shortCode()));
case "TransactionalMessagesPerSecond":
return Optional.ofNullable(clazz.cast(transactionalMessagesPerSecond()));
case "Version":
return Optional.ofNullable(clazz.cast(version()));
default:
return Optional.empty();
}
}
@Override
public List> sdkFields() {
return SDK_FIELDS;
}
private static Function