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

software.amazon.awssdk.services.ssmsap.model.Resilience Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Ssm Sap module holds the client classes that are used for communicating with Ssm Sap.

There is a newer version: 2.29.39
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.ssmsap.model;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
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.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;

/**
 * 

* Details of the SAP HANA system replication for the instance. *

*/ @Generated("software.amazon.awssdk:codegen") public final class Resilience implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField HSR_TIER_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("HsrTier").getter(getter(Resilience::hsrTier)).setter(setter(Builder::hsrTier)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("HsrTier").build()).build(); private static final SdkField HSR_REPLICATION_MODE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("HsrReplicationMode").getter(getter(Resilience::hsrReplicationModeAsString)) .setter(setter(Builder::hsrReplicationMode)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("HsrReplicationMode").build()) .build(); private static final SdkField HSR_OPERATION_MODE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("HsrOperationMode").getter(getter(Resilience::hsrOperationModeAsString)) .setter(setter(Builder::hsrOperationMode)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("HsrOperationMode").build()).build(); private static final SdkField CLUSTER_STATUS_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ClusterStatus").getter(getter(Resilience::clusterStatusAsString)).setter(setter(Builder::clusterStatus)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ClusterStatus").build()).build(); private static final SdkField ENQUEUE_REPLICATION_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .memberName("EnqueueReplication").getter(getter(Resilience::enqueueReplication)) .setter(setter(Builder::enqueueReplication)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EnqueueReplication").build()) .build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(HSR_TIER_FIELD, HSR_REPLICATION_MODE_FIELD, HSR_OPERATION_MODE_FIELD, CLUSTER_STATUS_FIELD, ENQUEUE_REPLICATION_FIELD)); private static final Map> SDK_NAME_TO_FIELD = Collections .unmodifiableMap(new HashMap>() { { put("HsrTier", HSR_TIER_FIELD); put("HsrReplicationMode", HSR_REPLICATION_MODE_FIELD); put("HsrOperationMode", HSR_OPERATION_MODE_FIELD); put("ClusterStatus", CLUSTER_STATUS_FIELD); put("EnqueueReplication", ENQUEUE_REPLICATION_FIELD); } }); private static final long serialVersionUID = 1L; private final String hsrTier; private final String hsrReplicationMode; private final String hsrOperationMode; private final String clusterStatus; private final Boolean enqueueReplication; private Resilience(BuilderImpl builder) { this.hsrTier = builder.hsrTier; this.hsrReplicationMode = builder.hsrReplicationMode; this.hsrOperationMode = builder.hsrOperationMode; this.clusterStatus = builder.clusterStatus; this.enqueueReplication = builder.enqueueReplication; } /** *

* The tier of the component. *

* * @return The tier of the component. */ public final String hsrTier() { return hsrTier; } /** *

* The replication mode of the component. *

*

* If the service returns an enum value that is not available in the current SDK version, * {@link #hsrReplicationMode} will return {@link ReplicationMode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by * the service is available from {@link #hsrReplicationModeAsString}. *

* * @return The replication mode of the component. * @see ReplicationMode */ public final ReplicationMode hsrReplicationMode() { return ReplicationMode.fromValue(hsrReplicationMode); } /** *

* The replication mode of the component. *

*

* If the service returns an enum value that is not available in the current SDK version, * {@link #hsrReplicationMode} will return {@link ReplicationMode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by * the service is available from {@link #hsrReplicationModeAsString}. *

* * @return The replication mode of the component. * @see ReplicationMode */ public final String hsrReplicationModeAsString() { return hsrReplicationMode; } /** *

* The operation mode of the component. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #hsrOperationMode} * will return {@link OperationMode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #hsrOperationModeAsString}. *

* * @return The operation mode of the component. * @see OperationMode */ public final OperationMode hsrOperationMode() { return OperationMode.fromValue(hsrOperationMode); } /** *

* The operation mode of the component. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #hsrOperationMode} * will return {@link OperationMode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #hsrOperationModeAsString}. *

* * @return The operation mode of the component. * @see OperationMode */ public final String hsrOperationModeAsString() { return hsrOperationMode; } /** *

* The cluster status of the component. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #clusterStatus} * will return {@link ClusterStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #clusterStatusAsString}. *

* * @return The cluster status of the component. * @see ClusterStatus */ public final ClusterStatus clusterStatus() { return ClusterStatus.fromValue(clusterStatus); } /** *

* The cluster status of the component. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #clusterStatus} * will return {@link ClusterStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #clusterStatusAsString}. *

* * @return The cluster status of the component. * @see ClusterStatus */ public final String clusterStatusAsString() { return clusterStatus; } /** *

* Indicates if or not enqueue replication is enabled for the ASCS component. *

* * @return Indicates if or not enqueue replication is enabled for the ASCS component. */ public final Boolean enqueueReplication() { return enqueueReplication; } @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(hsrTier()); hashCode = 31 * hashCode + Objects.hashCode(hsrReplicationModeAsString()); hashCode = 31 * hashCode + Objects.hashCode(hsrOperationModeAsString()); hashCode = 31 * hashCode + Objects.hashCode(clusterStatusAsString()); hashCode = 31 * hashCode + Objects.hashCode(enqueueReplication()); 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 Resilience)) { return false; } Resilience other = (Resilience) obj; return Objects.equals(hsrTier(), other.hsrTier()) && Objects.equals(hsrReplicationModeAsString(), other.hsrReplicationModeAsString()) && Objects.equals(hsrOperationModeAsString(), other.hsrOperationModeAsString()) && Objects.equals(clusterStatusAsString(), other.clusterStatusAsString()) && Objects.equals(enqueueReplication(), other.enqueueReplication()); } /** * 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("Resilience").add("HsrTier", hsrTier()).add("HsrReplicationMode", hsrReplicationModeAsString()) .add("HsrOperationMode", hsrOperationModeAsString()).add("ClusterStatus", clusterStatusAsString()) .add("EnqueueReplication", enqueueReplication()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "HsrTier": return Optional.ofNullable(clazz.cast(hsrTier())); case "HsrReplicationMode": return Optional.ofNullable(clazz.cast(hsrReplicationModeAsString())); case "HsrOperationMode": return Optional.ofNullable(clazz.cast(hsrOperationModeAsString())); case "ClusterStatus": return Optional.ofNullable(clazz.cast(clusterStatusAsString())); case "EnqueueReplication": return Optional.ofNullable(clazz.cast(enqueueReplication())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } @Override public final Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } private static Function getter(Function g) { return obj -> g.apply((Resilience) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The tier of the component. *

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

* The replication mode of the component. *

* * @param hsrReplicationMode * The replication mode of the component. * @see ReplicationMode * @return Returns a reference to this object so that method calls can be chained together. * @see ReplicationMode */ Builder hsrReplicationMode(String hsrReplicationMode); /** *

* The replication mode of the component. *

* * @param hsrReplicationMode * The replication mode of the component. * @see ReplicationMode * @return Returns a reference to this object so that method calls can be chained together. * @see ReplicationMode */ Builder hsrReplicationMode(ReplicationMode hsrReplicationMode); /** *

* The operation mode of the component. *

* * @param hsrOperationMode * The operation mode of the component. * @see OperationMode * @return Returns a reference to this object so that method calls can be chained together. * @see OperationMode */ Builder hsrOperationMode(String hsrOperationMode); /** *

* The operation mode of the component. *

* * @param hsrOperationMode * The operation mode of the component. * @see OperationMode * @return Returns a reference to this object so that method calls can be chained together. * @see OperationMode */ Builder hsrOperationMode(OperationMode hsrOperationMode); /** *

* The cluster status of the component. *

* * @param clusterStatus * The cluster status of the component. * @see ClusterStatus * @return Returns a reference to this object so that method calls can be chained together. * @see ClusterStatus */ Builder clusterStatus(String clusterStatus); /** *

* The cluster status of the component. *

* * @param clusterStatus * The cluster status of the component. * @see ClusterStatus * @return Returns a reference to this object so that method calls can be chained together. * @see ClusterStatus */ Builder clusterStatus(ClusterStatus clusterStatus); /** *

* Indicates if or not enqueue replication is enabled for the ASCS component. *

* * @param enqueueReplication * Indicates if or not enqueue replication is enabled for the ASCS component. * @return Returns a reference to this object so that method calls can be chained together. */ Builder enqueueReplication(Boolean enqueueReplication); } static final class BuilderImpl implements Builder { private String hsrTier; private String hsrReplicationMode; private String hsrOperationMode; private String clusterStatus; private Boolean enqueueReplication; private BuilderImpl() { } private BuilderImpl(Resilience model) { hsrTier(model.hsrTier); hsrReplicationMode(model.hsrReplicationMode); hsrOperationMode(model.hsrOperationMode); clusterStatus(model.clusterStatus); enqueueReplication(model.enqueueReplication); } public final String getHsrTier() { return hsrTier; } public final void setHsrTier(String hsrTier) { this.hsrTier = hsrTier; } @Override public final Builder hsrTier(String hsrTier) { this.hsrTier = hsrTier; return this; } public final String getHsrReplicationMode() { return hsrReplicationMode; } public final void setHsrReplicationMode(String hsrReplicationMode) { this.hsrReplicationMode = hsrReplicationMode; } @Override public final Builder hsrReplicationMode(String hsrReplicationMode) { this.hsrReplicationMode = hsrReplicationMode; return this; } @Override public final Builder hsrReplicationMode(ReplicationMode hsrReplicationMode) { this.hsrReplicationMode(hsrReplicationMode == null ? null : hsrReplicationMode.toString()); return this; } public final String getHsrOperationMode() { return hsrOperationMode; } public final void setHsrOperationMode(String hsrOperationMode) { this.hsrOperationMode = hsrOperationMode; } @Override public final Builder hsrOperationMode(String hsrOperationMode) { this.hsrOperationMode = hsrOperationMode; return this; } @Override public final Builder hsrOperationMode(OperationMode hsrOperationMode) { this.hsrOperationMode(hsrOperationMode == null ? null : hsrOperationMode.toString()); return this; } public final String getClusterStatus() { return clusterStatus; } public final void setClusterStatus(String clusterStatus) { this.clusterStatus = clusterStatus; } @Override public final Builder clusterStatus(String clusterStatus) { this.clusterStatus = clusterStatus; return this; } @Override public final Builder clusterStatus(ClusterStatus clusterStatus) { this.clusterStatus(clusterStatus == null ? null : clusterStatus.toString()); return this; } public final Boolean getEnqueueReplication() { return enqueueReplication; } public final void setEnqueueReplication(Boolean enqueueReplication) { this.enqueueReplication = enqueueReplication; } @Override public final Builder enqueueReplication(Boolean enqueueReplication) { this.enqueueReplication = enqueueReplication; return this; } @Override public Resilience build() { return new Resilience(this); } @Override public List> sdkFields() { return SDK_FIELDS; } @Override public Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy