software.amazon.awssdk.services.healthlake.model.DeleteFhirDatastoreResponse Maven / Gradle / Ivy
Show all versions of healthlake 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.healthlake.model;
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;
/**
*/
@Generated("software.amazon.awssdk:codegen")
public final class DeleteFhirDatastoreResponse extends HealthLakeResponse implements
ToCopyableBuilder {
private static final SdkField DATASTORE_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("DatastoreId").getter(getter(DeleteFhirDatastoreResponse::datastoreId))
.setter(setter(Builder::datastoreId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DatastoreId").build()).build();
private static final SdkField DATASTORE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("DatastoreArn").getter(getter(DeleteFhirDatastoreResponse::datastoreArn))
.setter(setter(Builder::datastoreArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DatastoreArn").build()).build();
private static final SdkField DATASTORE_STATUS_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("DatastoreStatus").getter(getter(DeleteFhirDatastoreResponse::datastoreStatusAsString))
.setter(setter(Builder::datastoreStatus))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DatastoreStatus").build()).build();
private static final SdkField DATASTORE_ENDPOINT_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("DatastoreEndpoint").getter(getter(DeleteFhirDatastoreResponse::datastoreEndpoint))
.setter(setter(Builder::datastoreEndpoint))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DatastoreEndpoint").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(DATASTORE_ID_FIELD,
DATASTORE_ARN_FIELD, DATASTORE_STATUS_FIELD, DATASTORE_ENDPOINT_FIELD));
private final String datastoreId;
private final String datastoreArn;
private final String datastoreStatus;
private final String datastoreEndpoint;
private DeleteFhirDatastoreResponse(BuilderImpl builder) {
super(builder);
this.datastoreId = builder.datastoreId;
this.datastoreArn = builder.datastoreArn;
this.datastoreStatus = builder.datastoreStatus;
this.datastoreEndpoint = builder.datastoreEndpoint;
}
/**
*
* The AWS-generated ID for the Data Store to be deleted.
*
*
* @return The AWS-generated ID for the Data Store to be deleted.
*/
public final String datastoreId() {
return datastoreId;
}
/**
*
* The Amazon Resource Name (ARN) that gives Amazon HealthLake access permission.
*
*
* @return The Amazon Resource Name (ARN) that gives Amazon HealthLake access permission.
*/
public final String datastoreArn() {
return datastoreArn;
}
/**
*
* The status of the Data Store that the user has requested to be deleted.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #datastoreStatus}
* will return {@link DatastoreStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available
* from {@link #datastoreStatusAsString}.
*
*
* @return The status of the Data Store that the user has requested to be deleted.
* @see DatastoreStatus
*/
public final DatastoreStatus datastoreStatus() {
return DatastoreStatus.fromValue(datastoreStatus);
}
/**
*
* The status of the Data Store that the user has requested to be deleted.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #datastoreStatus}
* will return {@link DatastoreStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available
* from {@link #datastoreStatusAsString}.
*
*
* @return The status of the Data Store that the user has requested to be deleted.
* @see DatastoreStatus
*/
public final String datastoreStatusAsString() {
return datastoreStatus;
}
/**
*
* The AWS endpoint for the Data Store the user has requested to be deleted.
*
*
* @return The AWS endpoint for the Data Store the user has requested to be deleted.
*/
public final String datastoreEndpoint() {
return datastoreEndpoint;
}
@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 + super.hashCode();
hashCode = 31 * hashCode + Objects.hashCode(datastoreId());
hashCode = 31 * hashCode + Objects.hashCode(datastoreArn());
hashCode = 31 * hashCode + Objects.hashCode(datastoreStatusAsString());
hashCode = 31 * hashCode + Objects.hashCode(datastoreEndpoint());
return hashCode;
}
@Override
public final boolean equals(Object obj) {
return super.equals(obj) && equalsBySdkFields(obj);
}
@Override
public final boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof DeleteFhirDatastoreResponse)) {
return false;
}
DeleteFhirDatastoreResponse other = (DeleteFhirDatastoreResponse) obj;
return Objects.equals(datastoreId(), other.datastoreId()) && Objects.equals(datastoreArn(), other.datastoreArn())
&& Objects.equals(datastoreStatusAsString(), other.datastoreStatusAsString())
&& Objects.equals(datastoreEndpoint(), other.datastoreEndpoint());
}
/**
* 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("DeleteFhirDatastoreResponse").add("DatastoreId", datastoreId())
.add("DatastoreArn", datastoreArn()).add("DatastoreStatus", datastoreStatusAsString())
.add("DatastoreEndpoint", datastoreEndpoint()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "DatastoreId":
return Optional.ofNullable(clazz.cast(datastoreId()));
case "DatastoreArn":
return Optional.ofNullable(clazz.cast(datastoreArn()));
case "DatastoreStatus":
return Optional.ofNullable(clazz.cast(datastoreStatusAsString()));
case "DatastoreEndpoint":
return Optional.ofNullable(clazz.cast(datastoreEndpoint()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function