software.amazon.awssdk.services.medicalimaging.model.ImageSetsMetadataSummary Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of medicalimaging Show documentation
Show all versions of medicalimaging Show documentation
The AWS Java SDK for Medical Imaging module holds the client classes that are used for
communicating with Medical Imaging.
/*
* 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.medicalimaging.model;
import java.io.Serializable;
import java.time.Instant;
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.Consumer;
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;
/**
*
* Summary of the image set metadata.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class ImageSetsMetadataSummary implements SdkPojo, Serializable,
ToCopyableBuilder {
private static final SdkField IMAGE_SET_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("imageSetId").getter(getter(ImageSetsMetadataSummary::imageSetId)).setter(setter(Builder::imageSetId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("imageSetId").build()).build();
private static final SdkField VERSION_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("version").getter(getter(ImageSetsMetadataSummary::version)).setter(setter(Builder::version))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("version").build()).build();
private static final SdkField CREATED_AT_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("createdAt").getter(getter(ImageSetsMetadataSummary::createdAt)).setter(setter(Builder::createdAt))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("createdAt").build()).build();
private static final SdkField UPDATED_AT_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("updatedAt").getter(getter(ImageSetsMetadataSummary::updatedAt)).setter(setter(Builder::updatedAt))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("updatedAt").build()).build();
private static final SdkField DICOM_TAGS_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("DICOMTags").getter(getter(ImageSetsMetadataSummary::dicomTags)).setter(setter(Builder::dicomTags))
.constructor(DICOMTags::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DICOMTags").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(IMAGE_SET_ID_FIELD,
VERSION_FIELD, CREATED_AT_FIELD, UPDATED_AT_FIELD, DICOM_TAGS_FIELD));
private static final long serialVersionUID = 1L;
private final String imageSetId;
private final Integer version;
private final Instant createdAt;
private final Instant updatedAt;
private final DICOMTags dicomTags;
private ImageSetsMetadataSummary(BuilderImpl builder) {
this.imageSetId = builder.imageSetId;
this.version = builder.version;
this.createdAt = builder.createdAt;
this.updatedAt = builder.updatedAt;
this.dicomTags = builder.dicomTags;
}
/**
*
* The image set identifier.
*
*
* @return The image set identifier.
*/
public final String imageSetId() {
return imageSetId;
}
/**
*
* The image set version.
*
*
* @return The image set version.
*/
public final Integer version() {
return version;
}
/**
*
* The time an image set is created. Sample creation date is provided in 1985-04-12T23:20:50.52Z
* format.
*
*
* @return The time an image set is created. Sample creation date is provided in
* 1985-04-12T23:20:50.52Z
format.
*/
public final Instant createdAt() {
return createdAt;
}
/**
*
* The time an image set was last updated.
*
*
* @return The time an image set was last updated.
*/
public final Instant updatedAt() {
return updatedAt;
}
/**
*
* The DICOM tags associated with the image set.
*
*
* @return The DICOM tags associated with the image set.
*/
public final DICOMTags dicomTags() {
return dicomTags;
}
@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(imageSetId());
hashCode = 31 * hashCode + Objects.hashCode(version());
hashCode = 31 * hashCode + Objects.hashCode(createdAt());
hashCode = 31 * hashCode + Objects.hashCode(updatedAt());
hashCode = 31 * hashCode + Objects.hashCode(dicomTags());
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 ImageSetsMetadataSummary)) {
return false;
}
ImageSetsMetadataSummary other = (ImageSetsMetadataSummary) obj;
return Objects.equals(imageSetId(), other.imageSetId()) && Objects.equals(version(), other.version())
&& Objects.equals(createdAt(), other.createdAt()) && Objects.equals(updatedAt(), other.updatedAt())
&& Objects.equals(dicomTags(), other.dicomTags());
}
/**
* 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("ImageSetsMetadataSummary").add("ImageSetId", imageSetId()).add("Version", version())
.add("CreatedAt", createdAt()).add("UpdatedAt", updatedAt()).add("DICOMTags", dicomTags()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "imageSetId":
return Optional.ofNullable(clazz.cast(imageSetId()));
case "version":
return Optional.ofNullable(clazz.cast(version()));
case "createdAt":
return Optional.ofNullable(clazz.cast(createdAt()));
case "updatedAt":
return Optional.ofNullable(clazz.cast(updatedAt()));
case "DICOMTags":
return Optional.ofNullable(clazz.cast(dicomTags()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function
© 2015 - 2025 Weber Informatics LLC | Privacy Policy