software.amazon.awssdk.services.elasticache.model.UpdateAction Maven / Gradle / Ivy
Show all versions of elasticache Show documentation
/*
* 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.elasticache.model;
import java.io.Serializable;
import java.time.Instant;
import java.util.Arrays;
import java.util.Collection;
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.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
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.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
*
* The status of the service update for a specific replication group
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class UpdateAction implements SdkPojo, Serializable, ToCopyableBuilder {
private static final SdkField REPLICATION_GROUP_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ReplicationGroupId").getter(getter(UpdateAction::replicationGroupId))
.setter(setter(Builder::replicationGroupId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ReplicationGroupId").build())
.build();
private static final SdkField CACHE_CLUSTER_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("CacheClusterId").getter(getter(UpdateAction::cacheClusterId)).setter(setter(Builder::cacheClusterId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CacheClusterId").build()).build();
private static final SdkField SERVICE_UPDATE_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ServiceUpdateName").getter(getter(UpdateAction::serviceUpdateName))
.setter(setter(Builder::serviceUpdateName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ServiceUpdateName").build()).build();
private static final SdkField SERVICE_UPDATE_RELEASE_DATE_FIELD = SdkField
. builder(MarshallingType.INSTANT).memberName("ServiceUpdateReleaseDate")
.getter(getter(UpdateAction::serviceUpdateReleaseDate)).setter(setter(Builder::serviceUpdateReleaseDate))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ServiceUpdateReleaseDate").build())
.build();
private static final SdkField SERVICE_UPDATE_SEVERITY_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ServiceUpdateSeverity").getter(getter(UpdateAction::serviceUpdateSeverityAsString))
.setter(setter(Builder::serviceUpdateSeverity))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ServiceUpdateSeverity").build())
.build();
private static final SdkField SERVICE_UPDATE_STATUS_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ServiceUpdateStatus").getter(getter(UpdateAction::serviceUpdateStatusAsString))
.setter(setter(Builder::serviceUpdateStatus))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ServiceUpdateStatus").build())
.build();
private static final SdkField SERVICE_UPDATE_RECOMMENDED_APPLY_BY_DATE_FIELD = SdkField
. builder(MarshallingType.INSTANT)
.memberName("ServiceUpdateRecommendedApplyByDate")
.getter(getter(UpdateAction::serviceUpdateRecommendedApplyByDate))
.setter(setter(Builder::serviceUpdateRecommendedApplyByDate))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("ServiceUpdateRecommendedApplyByDate").build()).build();
private static final SdkField SERVICE_UPDATE_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ServiceUpdateType").getter(getter(UpdateAction::serviceUpdateTypeAsString))
.setter(setter(Builder::serviceUpdateType))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ServiceUpdateType").build()).build();
private static final SdkField UPDATE_ACTION_AVAILABLE_DATE_FIELD = SdkField
. builder(MarshallingType.INSTANT).memberName("UpdateActionAvailableDate")
.getter(getter(UpdateAction::updateActionAvailableDate)).setter(setter(Builder::updateActionAvailableDate))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("UpdateActionAvailableDate").build())
.build();
private static final SdkField UPDATE_ACTION_STATUS_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("UpdateActionStatus").getter(getter(UpdateAction::updateActionStatusAsString))
.setter(setter(Builder::updateActionStatus))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("UpdateActionStatus").build())
.build();
private static final SdkField NODES_UPDATED_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("NodesUpdated").getter(getter(UpdateAction::nodesUpdated)).setter(setter(Builder::nodesUpdated))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("NodesUpdated").build()).build();
private static final SdkField UPDATE_ACTION_STATUS_MODIFIED_DATE_FIELD = SdkField
. builder(MarshallingType.INSTANT)
.memberName("UpdateActionStatusModifiedDate")
.getter(getter(UpdateAction::updateActionStatusModifiedDate))
.setter(setter(Builder::updateActionStatusModifiedDate))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("UpdateActionStatusModifiedDate")
.build()).build();
private static final SdkField SLA_MET_FIELD = SdkField. builder(MarshallingType.STRING).memberName("SlaMet")
.getter(getter(UpdateAction::slaMetAsString)).setter(setter(Builder::slaMet))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SlaMet").build()).build();
private static final SdkField> NODE_GROUP_UPDATE_STATUS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("NodeGroupUpdateStatus")
.getter(getter(UpdateAction::nodeGroupUpdateStatus))
.setter(setter(Builder::nodeGroupUpdateStatus))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("NodeGroupUpdateStatus").build(),
ListTrait
.builder()
.memberLocationName("NodeGroupUpdateStatus")
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(NodeGroupUpdateStatus::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("NodeGroupUpdateStatus").build()).build()).build()).build();
private static final SdkField> CACHE_NODE_UPDATE_STATUS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("CacheNodeUpdateStatus")
.getter(getter(UpdateAction::cacheNodeUpdateStatus))
.setter(setter(Builder::cacheNodeUpdateStatus))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CacheNodeUpdateStatus").build(),
ListTrait
.builder()
.memberLocationName("CacheNodeUpdateStatus")
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(CacheNodeUpdateStatus::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("CacheNodeUpdateStatus").build()).build()).build()).build();
private static final SdkField ESTIMATED_UPDATE_TIME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("EstimatedUpdateTime").getter(getter(UpdateAction::estimatedUpdateTime))
.setter(setter(Builder::estimatedUpdateTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EstimatedUpdateTime").build())
.build();
private static final SdkField ENGINE_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Engine")
.getter(getter(UpdateAction::engine)).setter(setter(Builder::engine))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Engine").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(REPLICATION_GROUP_ID_FIELD,
CACHE_CLUSTER_ID_FIELD, SERVICE_UPDATE_NAME_FIELD, SERVICE_UPDATE_RELEASE_DATE_FIELD, SERVICE_UPDATE_SEVERITY_FIELD,
SERVICE_UPDATE_STATUS_FIELD, SERVICE_UPDATE_RECOMMENDED_APPLY_BY_DATE_FIELD, SERVICE_UPDATE_TYPE_FIELD,
UPDATE_ACTION_AVAILABLE_DATE_FIELD, UPDATE_ACTION_STATUS_FIELD, NODES_UPDATED_FIELD,
UPDATE_ACTION_STATUS_MODIFIED_DATE_FIELD, SLA_MET_FIELD, NODE_GROUP_UPDATE_STATUS_FIELD,
CACHE_NODE_UPDATE_STATUS_FIELD, ESTIMATED_UPDATE_TIME_FIELD, ENGINE_FIELD));
private static final long serialVersionUID = 1L;
private final String replicationGroupId;
private final String cacheClusterId;
private final String serviceUpdateName;
private final Instant serviceUpdateReleaseDate;
private final String serviceUpdateSeverity;
private final String serviceUpdateStatus;
private final Instant serviceUpdateRecommendedApplyByDate;
private final String serviceUpdateType;
private final Instant updateActionAvailableDate;
private final String updateActionStatus;
private final String nodesUpdated;
private final Instant updateActionStatusModifiedDate;
private final String slaMet;
private final List nodeGroupUpdateStatus;
private final List cacheNodeUpdateStatus;
private final String estimatedUpdateTime;
private final String engine;
private UpdateAction(BuilderImpl builder) {
this.replicationGroupId = builder.replicationGroupId;
this.cacheClusterId = builder.cacheClusterId;
this.serviceUpdateName = builder.serviceUpdateName;
this.serviceUpdateReleaseDate = builder.serviceUpdateReleaseDate;
this.serviceUpdateSeverity = builder.serviceUpdateSeverity;
this.serviceUpdateStatus = builder.serviceUpdateStatus;
this.serviceUpdateRecommendedApplyByDate = builder.serviceUpdateRecommendedApplyByDate;
this.serviceUpdateType = builder.serviceUpdateType;
this.updateActionAvailableDate = builder.updateActionAvailableDate;
this.updateActionStatus = builder.updateActionStatus;
this.nodesUpdated = builder.nodesUpdated;
this.updateActionStatusModifiedDate = builder.updateActionStatusModifiedDate;
this.slaMet = builder.slaMet;
this.nodeGroupUpdateStatus = builder.nodeGroupUpdateStatus;
this.cacheNodeUpdateStatus = builder.cacheNodeUpdateStatus;
this.estimatedUpdateTime = builder.estimatedUpdateTime;
this.engine = builder.engine;
}
/**
*
* The ID of the replication group
*
*
* @return The ID of the replication group
*/
public final String replicationGroupId() {
return replicationGroupId;
}
/**
*
* The ID of the cache cluster
*
*
* @return The ID of the cache cluster
*/
public final String cacheClusterId() {
return cacheClusterId;
}
/**
*
* The unique ID of the service update
*
*
* @return The unique ID of the service update
*/
public final String serviceUpdateName() {
return serviceUpdateName;
}
/**
*
* The date the update is first available
*
*
* @return The date the update is first available
*/
public final Instant serviceUpdateReleaseDate() {
return serviceUpdateReleaseDate;
}
/**
*
* The severity of the service update
*
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #serviceUpdateSeverity} will return {@link ServiceUpdateSeverity#UNKNOWN_TO_SDK_VERSION}. The raw value
* returned by the service is available from {@link #serviceUpdateSeverityAsString}.
*
*
* @return The severity of the service update
* @see ServiceUpdateSeverity
*/
public final ServiceUpdateSeverity serviceUpdateSeverity() {
return ServiceUpdateSeverity.fromValue(serviceUpdateSeverity);
}
/**
*
* The severity of the service update
*
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #serviceUpdateSeverity} will return {@link ServiceUpdateSeverity#UNKNOWN_TO_SDK_VERSION}. The raw value
* returned by the service is available from {@link #serviceUpdateSeverityAsString}.
*
*
* @return The severity of the service update
* @see ServiceUpdateSeverity
*/
public final String serviceUpdateSeverityAsString() {
return serviceUpdateSeverity;
}
/**
*
* The status of the service update
*
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #serviceUpdateStatus} will return {@link ServiceUpdateStatus#UNKNOWN_TO_SDK_VERSION}. The raw value
* returned by the service is available from {@link #serviceUpdateStatusAsString}.
*
*
* @return The status of the service update
* @see ServiceUpdateStatus
*/
public final ServiceUpdateStatus serviceUpdateStatus() {
return ServiceUpdateStatus.fromValue(serviceUpdateStatus);
}
/**
*
* The status of the service update
*
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #serviceUpdateStatus} will return {@link ServiceUpdateStatus#UNKNOWN_TO_SDK_VERSION}. The raw value
* returned by the service is available from {@link #serviceUpdateStatusAsString}.
*
*
* @return The status of the service update
* @see ServiceUpdateStatus
*/
public final String serviceUpdateStatusAsString() {
return serviceUpdateStatus;
}
/**
*
* The recommended date to apply the service update to ensure compliance. For information on compliance, see Self-Service Security Updates for Compliance.
*
*
* @return The recommended date to apply the service update to ensure compliance. For information on compliance, see
* Self-Service Security Updates for Compliance.
*/
public final Instant serviceUpdateRecommendedApplyByDate() {
return serviceUpdateRecommendedApplyByDate;
}
/**
*
* Reflects the nature of the service update
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #serviceUpdateType}
* will return {@link ServiceUpdateType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available
* from {@link #serviceUpdateTypeAsString}.
*
*
* @return Reflects the nature of the service update
* @see ServiceUpdateType
*/
public final ServiceUpdateType serviceUpdateType() {
return ServiceUpdateType.fromValue(serviceUpdateType);
}
/**
*
* Reflects the nature of the service update
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #serviceUpdateType}
* will return {@link ServiceUpdateType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available
* from {@link #serviceUpdateTypeAsString}.
*
*
* @return Reflects the nature of the service update
* @see ServiceUpdateType
*/
public final String serviceUpdateTypeAsString() {
return serviceUpdateType;
}
/**
*
* The date that the service update is available to a replication group
*
*
* @return The date that the service update is available to a replication group
*/
public final Instant updateActionAvailableDate() {
return updateActionAvailableDate;
}
/**
*
* The status of the update action
*
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #updateActionStatus} will return {@link UpdateActionStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned
* by the service is available from {@link #updateActionStatusAsString}.
*
*
* @return The status of the update action
* @see UpdateActionStatus
*/
public final UpdateActionStatus updateActionStatus() {
return UpdateActionStatus.fromValue(updateActionStatus);
}
/**
*
* The status of the update action
*
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #updateActionStatus} will return {@link UpdateActionStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned
* by the service is available from {@link #updateActionStatusAsString}.
*
*
* @return The status of the update action
* @see UpdateActionStatus
*/
public final String updateActionStatusAsString() {
return updateActionStatus;
}
/**
*
* The progress of the service update on the replication group
*
*
* @return The progress of the service update on the replication group
*/
public final String nodesUpdated() {
return nodesUpdated;
}
/**
*
* The date when the UpdateActionStatus was last modified
*
*
* @return The date when the UpdateActionStatus was last modified
*/
public final Instant updateActionStatusModifiedDate() {
return updateActionStatusModifiedDate;
}
/**
*
* If yes, all nodes in the replication group have been updated by the recommended apply-by date. If no, at least
* one node in the replication group have not been updated by the recommended apply-by date. If N/A, the replication
* group was created after the recommended apply-by date.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #slaMet} will
* return {@link SlaMet#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #slaMetAsString}.
*
*
* @return If yes, all nodes in the replication group have been updated by the recommended apply-by date. If no, at
* least one node in the replication group have not been updated by the recommended apply-by date. If N/A,
* the replication group was created after the recommended apply-by date.
* @see SlaMet
*/
public final SlaMet slaMet() {
return SlaMet.fromValue(slaMet);
}
/**
*
* If yes, all nodes in the replication group have been updated by the recommended apply-by date. If no, at least
* one node in the replication group have not been updated by the recommended apply-by date. If N/A, the replication
* group was created after the recommended apply-by date.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #slaMet} will
* return {@link SlaMet#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #slaMetAsString}.
*
*
* @return If yes, all nodes in the replication group have been updated by the recommended apply-by date. If no, at
* least one node in the replication group have not been updated by the recommended apply-by date. If N/A,
* the replication group was created after the recommended apply-by date.
* @see SlaMet
*/
public final String slaMetAsString() {
return slaMet;
}
/**
* For responses, this returns true if the service returned a value for the NodeGroupUpdateStatus property. This
* DOES NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the
* property). This is useful because the SDK will never return a null collection or map, but you may need to
* differentiate between the service returning nothing (or null) and the service returning an empty collection or
* map. For requests, this returns true if a value for the property was specified in the request builder, and false
* if a value was not specified.
*/
public final boolean hasNodeGroupUpdateStatus() {
return nodeGroupUpdateStatus != null && !(nodeGroupUpdateStatus instanceof SdkAutoConstructList);
}
/**
*
* The status of the service update on the node group
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasNodeGroupUpdateStatus} method.
*
*
* @return The status of the service update on the node group
*/
public final List nodeGroupUpdateStatus() {
return nodeGroupUpdateStatus;
}
/**
* For responses, this returns true if the service returned a value for the CacheNodeUpdateStatus property. This
* DOES NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the
* property). This is useful because the SDK will never return a null collection or map, but you may need to
* differentiate between the service returning nothing (or null) and the service returning an empty collection or
* map. For requests, this returns true if a value for the property was specified in the request builder, and false
* if a value was not specified.
*/
public final boolean hasCacheNodeUpdateStatus() {
return cacheNodeUpdateStatus != null && !(cacheNodeUpdateStatus instanceof SdkAutoConstructList);
}
/**
*
* The status of the service update on the cache node
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasCacheNodeUpdateStatus} method.
*
*
* @return The status of the service update on the cache node
*/
public final List cacheNodeUpdateStatus() {
return cacheNodeUpdateStatus;
}
/**
*
* The estimated length of time for the update to complete
*
*
* @return The estimated length of time for the update to complete
*/
public final String estimatedUpdateTime() {
return estimatedUpdateTime;
}
/**
*
* The Elasticache engine to which the update applies. Either Redis or Memcached
*
*
* @return The Elasticache engine to which the update applies. Either Redis or Memcached
*/
public final String engine() {
return engine;
}
@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 final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + Objects.hashCode(replicationGroupId());
hashCode = 31 * hashCode + Objects.hashCode(cacheClusterId());
hashCode = 31 * hashCode + Objects.hashCode(serviceUpdateName());
hashCode = 31 * hashCode + Objects.hashCode(serviceUpdateReleaseDate());
hashCode = 31 * hashCode + Objects.hashCode(serviceUpdateSeverityAsString());
hashCode = 31 * hashCode + Objects.hashCode(serviceUpdateStatusAsString());
hashCode = 31 * hashCode + Objects.hashCode(serviceUpdateRecommendedApplyByDate());
hashCode = 31 * hashCode + Objects.hashCode(serviceUpdateTypeAsString());
hashCode = 31 * hashCode + Objects.hashCode(updateActionAvailableDate());
hashCode = 31 * hashCode + Objects.hashCode(updateActionStatusAsString());
hashCode = 31 * hashCode + Objects.hashCode(nodesUpdated());
hashCode = 31 * hashCode + Objects.hashCode(updateActionStatusModifiedDate());
hashCode = 31 * hashCode + Objects.hashCode(slaMetAsString());
hashCode = 31 * hashCode + Objects.hashCode(hasNodeGroupUpdateStatus() ? nodeGroupUpdateStatus() : null);
hashCode = 31 * hashCode + Objects.hashCode(hasCacheNodeUpdateStatus() ? cacheNodeUpdateStatus() : null);
hashCode = 31 * hashCode + Objects.hashCode(estimatedUpdateTime());
hashCode = 31 * hashCode + Objects.hashCode(engine());
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 UpdateAction)) {
return false;
}
UpdateAction other = (UpdateAction) obj;
return Objects.equals(replicationGroupId(), other.replicationGroupId())
&& Objects.equals(cacheClusterId(), other.cacheClusterId())
&& Objects.equals(serviceUpdateName(), other.serviceUpdateName())
&& Objects.equals(serviceUpdateReleaseDate(), other.serviceUpdateReleaseDate())
&& Objects.equals(serviceUpdateSeverityAsString(), other.serviceUpdateSeverityAsString())
&& Objects.equals(serviceUpdateStatusAsString(), other.serviceUpdateStatusAsString())
&& Objects.equals(serviceUpdateRecommendedApplyByDate(), other.serviceUpdateRecommendedApplyByDate())
&& Objects.equals(serviceUpdateTypeAsString(), other.serviceUpdateTypeAsString())
&& Objects.equals(updateActionAvailableDate(), other.updateActionAvailableDate())
&& Objects.equals(updateActionStatusAsString(), other.updateActionStatusAsString())
&& Objects.equals(nodesUpdated(), other.nodesUpdated())
&& Objects.equals(updateActionStatusModifiedDate(), other.updateActionStatusModifiedDate())
&& Objects.equals(slaMetAsString(), other.slaMetAsString())
&& hasNodeGroupUpdateStatus() == other.hasNodeGroupUpdateStatus()
&& Objects.equals(nodeGroupUpdateStatus(), other.nodeGroupUpdateStatus())
&& hasCacheNodeUpdateStatus() == other.hasCacheNodeUpdateStatus()
&& Objects.equals(cacheNodeUpdateStatus(), other.cacheNodeUpdateStatus())
&& Objects.equals(estimatedUpdateTime(), other.estimatedUpdateTime()) && Objects.equals(engine(), other.engine());
}
/**
* 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("UpdateAction").add("ReplicationGroupId", replicationGroupId())
.add("CacheClusterId", cacheClusterId()).add("ServiceUpdateName", serviceUpdateName())
.add("ServiceUpdateReleaseDate", serviceUpdateReleaseDate())
.add("ServiceUpdateSeverity", serviceUpdateSeverityAsString())
.add("ServiceUpdateStatus", serviceUpdateStatusAsString())
.add("ServiceUpdateRecommendedApplyByDate", serviceUpdateRecommendedApplyByDate())
.add("ServiceUpdateType", serviceUpdateTypeAsString())
.add("UpdateActionAvailableDate", updateActionAvailableDate())
.add("UpdateActionStatus", updateActionStatusAsString()).add("NodesUpdated", nodesUpdated())
.add("UpdateActionStatusModifiedDate", updateActionStatusModifiedDate()).add("SlaMet", slaMetAsString())
.add("NodeGroupUpdateStatus", hasNodeGroupUpdateStatus() ? nodeGroupUpdateStatus() : null)
.add("CacheNodeUpdateStatus", hasCacheNodeUpdateStatus() ? cacheNodeUpdateStatus() : null)
.add("EstimatedUpdateTime", estimatedUpdateTime()).add("Engine", engine()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "ReplicationGroupId":
return Optional.ofNullable(clazz.cast(replicationGroupId()));
case "CacheClusterId":
return Optional.ofNullable(clazz.cast(cacheClusterId()));
case "ServiceUpdateName":
return Optional.ofNullable(clazz.cast(serviceUpdateName()));
case "ServiceUpdateReleaseDate":
return Optional.ofNullable(clazz.cast(serviceUpdateReleaseDate()));
case "ServiceUpdateSeverity":
return Optional.ofNullable(clazz.cast(serviceUpdateSeverityAsString()));
case "ServiceUpdateStatus":
return Optional.ofNullable(clazz.cast(serviceUpdateStatusAsString()));
case "ServiceUpdateRecommendedApplyByDate":
return Optional.ofNullable(clazz.cast(serviceUpdateRecommendedApplyByDate()));
case "ServiceUpdateType":
return Optional.ofNullable(clazz.cast(serviceUpdateTypeAsString()));
case "UpdateActionAvailableDate":
return Optional.ofNullable(clazz.cast(updateActionAvailableDate()));
case "UpdateActionStatus":
return Optional.ofNullable(clazz.cast(updateActionStatusAsString()));
case "NodesUpdated":
return Optional.ofNullable(clazz.cast(nodesUpdated()));
case "UpdateActionStatusModifiedDate":
return Optional.ofNullable(clazz.cast(updateActionStatusModifiedDate()));
case "SlaMet":
return Optional.ofNullable(clazz.cast(slaMetAsString()));
case "NodeGroupUpdateStatus":
return Optional.ofNullable(clazz.cast(nodeGroupUpdateStatus()));
case "CacheNodeUpdateStatus":
return Optional.ofNullable(clazz.cast(cacheNodeUpdateStatus()));
case "EstimatedUpdateTime":
return Optional.ofNullable(clazz.cast(estimatedUpdateTime()));
case "Engine":
return Optional.ofNullable(clazz.cast(engine()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function