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

software.amazon.awssdk.services.elasticache.model.UpdateAction Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon ElastiCache module holds the client classes that are used for communicating with Amazon ElastiCache Service

There is a newer version: 2.29.39
Show newest version
/*
 * 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.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.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) .getter(getter(UpdateAction::replicationGroupId)).setter(setter(Builder::replicationGroupId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ReplicationGroupId").build()) .build(); private static final SdkField SERVICE_UPDATE_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .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).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) .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) .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) .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) .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).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) .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) .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) .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) .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) .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 ESTIMATED_UPDATE_TIME_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(UpdateAction::estimatedUpdateTime)).setter(setter(Builder::estimatedUpdateTime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EstimatedUpdateTime").build()) .build(); private static final List> SDK_FIELDS = Collections .unmodifiableList(Arrays.asList(REPLICATION_GROUP_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, ESTIMATED_UPDATE_TIME_FIELD)); private static final long serialVersionUID = 1L; private final String replicationGroupId; 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 String estimatedUpdateTime; private UpdateAction(BuilderImpl builder) { this.replicationGroupId = builder.replicationGroupId; 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.estimatedUpdateTime = builder.estimatedUpdateTime; } /** *

* The ID of the replication group *

* * @return The ID of the replication group */ public String replicationGroupId() { return replicationGroupId; } /** *

* The unique ID of the service update *

* * @return The unique ID of the service update */ public String serviceUpdateName() { return serviceUpdateName; } /** *

* The date the update is first available *

* * @return The date the update is first available */ public 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 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 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 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 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 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 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 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 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 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 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 String nodesUpdated() { return nodesUpdated; } /** *

* The date when the UpdateActionStatus was last modified *

* * @return The date when the UpdateActionStatus was last modified */ public 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 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 String slaMetAsString() { return slaMet; } /** *

* The status of the service update on the node group *

*

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

* * @return The status of the service update on the node group */ public List nodeGroupUpdateStatus() { return nodeGroupUpdateStatus; } /** *

* The estimated length of time for the update to complete *

* * @return The estimated length of time for the update to complete */ public String estimatedUpdateTime() { return estimatedUpdateTime; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(replicationGroupId()); 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(nodeGroupUpdateStatus()); hashCode = 31 * hashCode + Objects.hashCode(estimatedUpdateTime()); return hashCode; } @Override public boolean equals(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(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()) && Objects.equals(nodeGroupUpdateStatus(), other.nodeGroupUpdateStatus()) && Objects.equals(estimatedUpdateTime(), other.estimatedUpdateTime()); } /** * 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("UpdateAction").add("ReplicationGroupId", replicationGroupId()) .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", nodeGroupUpdateStatus()).add("EstimatedUpdateTime", estimatedUpdateTime()).build(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "ReplicationGroupId": return Optional.ofNullable(clazz.cast(replicationGroupId())); 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 "EstimatedUpdateTime": return Optional.ofNullable(clazz.cast(estimatedUpdateTime())); default: return Optional.empty(); } } @Override public List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((UpdateAction) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The ID of the replication group *

* * @param replicationGroupId * The ID of the replication group * @return Returns a reference to this object so that method calls can be chained together. */ Builder replicationGroupId(String replicationGroupId); /** *

* The unique ID of the service update *

* * @param serviceUpdateName * The unique ID of the service update * @return Returns a reference to this object so that method calls can be chained together. */ Builder serviceUpdateName(String serviceUpdateName); /** *

* The date the update is first available *

* * @param serviceUpdateReleaseDate * The date the update is first available * @return Returns a reference to this object so that method calls can be chained together. */ Builder serviceUpdateReleaseDate(Instant serviceUpdateReleaseDate); /** *

* The severity of the service update *

* * @param serviceUpdateSeverity * The severity of the service update * @see ServiceUpdateSeverity * @return Returns a reference to this object so that method calls can be chained together. * @see ServiceUpdateSeverity */ Builder serviceUpdateSeverity(String serviceUpdateSeverity); /** *

* The severity of the service update *

* * @param serviceUpdateSeverity * The severity of the service update * @see ServiceUpdateSeverity * @return Returns a reference to this object so that method calls can be chained together. * @see ServiceUpdateSeverity */ Builder serviceUpdateSeverity(ServiceUpdateSeverity serviceUpdateSeverity); /** *

* The status of the service update *

* * @param serviceUpdateStatus * The status of the service update * @see ServiceUpdateStatus * @return Returns a reference to this object so that method calls can be chained together. * @see ServiceUpdateStatus */ Builder serviceUpdateStatus(String serviceUpdateStatus); /** *

* The status of the service update *

* * @param serviceUpdateStatus * The status of the service update * @see ServiceUpdateStatus * @return Returns a reference to this object so that method calls can be chained together. * @see ServiceUpdateStatus */ Builder serviceUpdateStatus(ServiceUpdateStatus serviceUpdateStatus); /** *

* The recommended date to apply the service update to ensure compliance. For information on compliance, see Self-Service Security Updates for Compliance. *

* * @param serviceUpdateRecommendedApplyByDate * The recommended date to apply the service update to ensure compliance. For information on compliance, * see Self-Service Security Updates for Compliance. * @return Returns a reference to this object so that method calls can be chained together. */ Builder serviceUpdateRecommendedApplyByDate(Instant serviceUpdateRecommendedApplyByDate); /** *

* Reflects the nature of the service update *

* * @param serviceUpdateType * Reflects the nature of the service update * @see ServiceUpdateType * @return Returns a reference to this object so that method calls can be chained together. * @see ServiceUpdateType */ Builder serviceUpdateType(String serviceUpdateType); /** *

* Reflects the nature of the service update *

* * @param serviceUpdateType * Reflects the nature of the service update * @see ServiceUpdateType * @return Returns a reference to this object so that method calls can be chained together. * @see ServiceUpdateType */ Builder serviceUpdateType(ServiceUpdateType serviceUpdateType); /** *

* The date that the service update is available to a replication group *

* * @param updateActionAvailableDate * The date that the service update is available to a replication group * @return Returns a reference to this object so that method calls can be chained together. */ Builder updateActionAvailableDate(Instant updateActionAvailableDate); /** *

* The status of the update action *

* * @param updateActionStatus * The status of the update action * @see UpdateActionStatus * @return Returns a reference to this object so that method calls can be chained together. * @see UpdateActionStatus */ Builder updateActionStatus(String updateActionStatus); /** *

* The status of the update action *

* * @param updateActionStatus * The status of the update action * @see UpdateActionStatus * @return Returns a reference to this object so that method calls can be chained together. * @see UpdateActionStatus */ Builder updateActionStatus(UpdateActionStatus updateActionStatus); /** *

* The progress of the service update on the replication group *

* * @param nodesUpdated * The progress of the service update on the replication group * @return Returns a reference to this object so that method calls can be chained together. */ Builder nodesUpdated(String nodesUpdated); /** *

* The date when the UpdateActionStatus was last modified *

* * @param updateActionStatusModifiedDate * The date when the UpdateActionStatus was last modified * @return Returns a reference to this object so that method calls can be chained together. */ Builder updateActionStatusModifiedDate(Instant 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. *

* * @param 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. * @see SlaMet * @return Returns a reference to this object so that method calls can be chained together. * @see SlaMet */ Builder slaMet(String 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. *

* * @param 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. * @see SlaMet * @return Returns a reference to this object so that method calls can be chained together. * @see SlaMet */ Builder slaMet(SlaMet slaMet); /** *

* The status of the service update on the node group *

* * @param nodeGroupUpdateStatus * The status of the service update on the node group * @return Returns a reference to this object so that method calls can be chained together. */ Builder nodeGroupUpdateStatus(Collection nodeGroupUpdateStatus); /** *

* The status of the service update on the node group *

* * @param nodeGroupUpdateStatus * The status of the service update on the node group * @return Returns a reference to this object so that method calls can be chained together. */ Builder nodeGroupUpdateStatus(NodeGroupUpdateStatus... nodeGroupUpdateStatus); /** *

* The status of the service update on the node group *

* This is a convenience that creates an instance of the {@link List.Builder} avoiding * the need to create one manually via {@link List#builder()}. * * When the {@link Consumer} completes, {@link List.Builder#build()} is called * immediately and its result is passed to {@link #nodeGroupUpdateStatus(List)}. * * @param nodeGroupUpdateStatus * a consumer that will call methods on {@link List.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #nodeGroupUpdateStatus(List) */ Builder nodeGroupUpdateStatus(Consumer... nodeGroupUpdateStatus); /** *

* The estimated length of time for the update to complete *

* * @param estimatedUpdateTime * The estimated length of time for the update to complete * @return Returns a reference to this object so that method calls can be chained together. */ Builder estimatedUpdateTime(String estimatedUpdateTime); } static final class BuilderImpl implements Builder { private String replicationGroupId; private String serviceUpdateName; private Instant serviceUpdateReleaseDate; private String serviceUpdateSeverity; private String serviceUpdateStatus; private Instant serviceUpdateRecommendedApplyByDate; private String serviceUpdateType; private Instant updateActionAvailableDate; private String updateActionStatus; private String nodesUpdated; private Instant updateActionStatusModifiedDate; private String slaMet; private List nodeGroupUpdateStatus = DefaultSdkAutoConstructList.getInstance(); private String estimatedUpdateTime; private BuilderImpl() { } private BuilderImpl(UpdateAction model) { replicationGroupId(model.replicationGroupId); serviceUpdateName(model.serviceUpdateName); serviceUpdateReleaseDate(model.serviceUpdateReleaseDate); serviceUpdateSeverity(model.serviceUpdateSeverity); serviceUpdateStatus(model.serviceUpdateStatus); serviceUpdateRecommendedApplyByDate(model.serviceUpdateRecommendedApplyByDate); serviceUpdateType(model.serviceUpdateType); updateActionAvailableDate(model.updateActionAvailableDate); updateActionStatus(model.updateActionStatus); nodesUpdated(model.nodesUpdated); updateActionStatusModifiedDate(model.updateActionStatusModifiedDate); slaMet(model.slaMet); nodeGroupUpdateStatus(model.nodeGroupUpdateStatus); estimatedUpdateTime(model.estimatedUpdateTime); } public final String getReplicationGroupId() { return replicationGroupId; } @Override public final Builder replicationGroupId(String replicationGroupId) { this.replicationGroupId = replicationGroupId; return this; } public final void setReplicationGroupId(String replicationGroupId) { this.replicationGroupId = replicationGroupId; } public final String getServiceUpdateName() { return serviceUpdateName; } @Override public final Builder serviceUpdateName(String serviceUpdateName) { this.serviceUpdateName = serviceUpdateName; return this; } public final void setServiceUpdateName(String serviceUpdateName) { this.serviceUpdateName = serviceUpdateName; } public final Instant getServiceUpdateReleaseDate() { return serviceUpdateReleaseDate; } @Override public final Builder serviceUpdateReleaseDate(Instant serviceUpdateReleaseDate) { this.serviceUpdateReleaseDate = serviceUpdateReleaseDate; return this; } public final void setServiceUpdateReleaseDate(Instant serviceUpdateReleaseDate) { this.serviceUpdateReleaseDate = serviceUpdateReleaseDate; } public final String getServiceUpdateSeverityAsString() { return serviceUpdateSeverity; } @Override public final Builder serviceUpdateSeverity(String serviceUpdateSeverity) { this.serviceUpdateSeverity = serviceUpdateSeverity; return this; } @Override public final Builder serviceUpdateSeverity(ServiceUpdateSeverity serviceUpdateSeverity) { this.serviceUpdateSeverity(serviceUpdateSeverity.toString()); return this; } public final void setServiceUpdateSeverity(String serviceUpdateSeverity) { this.serviceUpdateSeverity = serviceUpdateSeverity; } public final String getServiceUpdateStatusAsString() { return serviceUpdateStatus; } @Override public final Builder serviceUpdateStatus(String serviceUpdateStatus) { this.serviceUpdateStatus = serviceUpdateStatus; return this; } @Override public final Builder serviceUpdateStatus(ServiceUpdateStatus serviceUpdateStatus) { this.serviceUpdateStatus(serviceUpdateStatus.toString()); return this; } public final void setServiceUpdateStatus(String serviceUpdateStatus) { this.serviceUpdateStatus = serviceUpdateStatus; } public final Instant getServiceUpdateRecommendedApplyByDate() { return serviceUpdateRecommendedApplyByDate; } @Override public final Builder serviceUpdateRecommendedApplyByDate(Instant serviceUpdateRecommendedApplyByDate) { this.serviceUpdateRecommendedApplyByDate = serviceUpdateRecommendedApplyByDate; return this; } public final void setServiceUpdateRecommendedApplyByDate(Instant serviceUpdateRecommendedApplyByDate) { this.serviceUpdateRecommendedApplyByDate = serviceUpdateRecommendedApplyByDate; } public final String getServiceUpdateTypeAsString() { return serviceUpdateType; } @Override public final Builder serviceUpdateType(String serviceUpdateType) { this.serviceUpdateType = serviceUpdateType; return this; } @Override public final Builder serviceUpdateType(ServiceUpdateType serviceUpdateType) { this.serviceUpdateType(serviceUpdateType.toString()); return this; } public final void setServiceUpdateType(String serviceUpdateType) { this.serviceUpdateType = serviceUpdateType; } public final Instant getUpdateActionAvailableDate() { return updateActionAvailableDate; } @Override public final Builder updateActionAvailableDate(Instant updateActionAvailableDate) { this.updateActionAvailableDate = updateActionAvailableDate; return this; } public final void setUpdateActionAvailableDate(Instant updateActionAvailableDate) { this.updateActionAvailableDate = updateActionAvailableDate; } public final String getUpdateActionStatusAsString() { return updateActionStatus; } @Override public final Builder updateActionStatus(String updateActionStatus) { this.updateActionStatus = updateActionStatus; return this; } @Override public final Builder updateActionStatus(UpdateActionStatus updateActionStatus) { this.updateActionStatus(updateActionStatus.toString()); return this; } public final void setUpdateActionStatus(String updateActionStatus) { this.updateActionStatus = updateActionStatus; } public final String getNodesUpdated() { return nodesUpdated; } @Override public final Builder nodesUpdated(String nodesUpdated) { this.nodesUpdated = nodesUpdated; return this; } public final void setNodesUpdated(String nodesUpdated) { this.nodesUpdated = nodesUpdated; } public final Instant getUpdateActionStatusModifiedDate() { return updateActionStatusModifiedDate; } @Override public final Builder updateActionStatusModifiedDate(Instant updateActionStatusModifiedDate) { this.updateActionStatusModifiedDate = updateActionStatusModifiedDate; return this; } public final void setUpdateActionStatusModifiedDate(Instant updateActionStatusModifiedDate) { this.updateActionStatusModifiedDate = updateActionStatusModifiedDate; } public final String getSlaMetAsString() { return slaMet; } @Override public final Builder slaMet(String slaMet) { this.slaMet = slaMet; return this; } @Override public final Builder slaMet(SlaMet slaMet) { this.slaMet(slaMet.toString()); return this; } public final void setSlaMet(String slaMet) { this.slaMet = slaMet; } public final Collection getNodeGroupUpdateStatus() { return nodeGroupUpdateStatus != null ? nodeGroupUpdateStatus.stream().map(NodeGroupUpdateStatus::toBuilder) .collect(Collectors.toList()) : null; } @Override public final Builder nodeGroupUpdateStatus(Collection nodeGroupUpdateStatus) { this.nodeGroupUpdateStatus = NodeGroupUpdateStatusListCopier.copy(nodeGroupUpdateStatus); return this; } @Override @SafeVarargs public final Builder nodeGroupUpdateStatus(NodeGroupUpdateStatus... nodeGroupUpdateStatus) { nodeGroupUpdateStatus(Arrays.asList(nodeGroupUpdateStatus)); return this; } @Override @SafeVarargs public final Builder nodeGroupUpdateStatus(Consumer... nodeGroupUpdateStatus) { nodeGroupUpdateStatus(Stream.of(nodeGroupUpdateStatus) .map(c -> NodeGroupUpdateStatus.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final void setNodeGroupUpdateStatus(Collection nodeGroupUpdateStatus) { this.nodeGroupUpdateStatus = NodeGroupUpdateStatusListCopier.copyFromBuilder(nodeGroupUpdateStatus); } public final String getEstimatedUpdateTime() { return estimatedUpdateTime; } @Override public final Builder estimatedUpdateTime(String estimatedUpdateTime) { this.estimatedUpdateTime = estimatedUpdateTime; return this; } public final void setEstimatedUpdateTime(String estimatedUpdateTime) { this.estimatedUpdateTime = estimatedUpdateTime; } @Override public UpdateAction build() { return new UpdateAction(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy