software.amazon.awssdk.services.opsworks.model.RaidArray Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of opsworks Show documentation
Show all versions of opsworks Show documentation
The AWS Java SDK for AWS OpsWorks module holds the client classes that are used for communicating with
AWS OpsWorks Service
/*
* 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.opsworks.model;
import java.io.Serializable;
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;
/**
*
* Describes an instance's RAID array.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class RaidArray implements SdkPojo, Serializable, ToCopyableBuilder {
private static final SdkField RAID_ARRAY_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("RaidArrayId").getter(getter(RaidArray::raidArrayId)).setter(setter(Builder::raidArrayId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RaidArrayId").build()).build();
private static final SdkField INSTANCE_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("InstanceId").getter(getter(RaidArray::instanceId)).setter(setter(Builder::instanceId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("InstanceId").build()).build();
private static final SdkField NAME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Name")
.getter(getter(RaidArray::name)).setter(setter(Builder::name))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Name").build()).build();
private static final SdkField RAID_LEVEL_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("RaidLevel").getter(getter(RaidArray::raidLevel)).setter(setter(Builder::raidLevel))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RaidLevel").build()).build();
private static final SdkField NUMBER_OF_DISKS_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("NumberOfDisks").getter(getter(RaidArray::numberOfDisks)).setter(setter(Builder::numberOfDisks))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("NumberOfDisks").build()).build();
private static final SdkField SIZE_FIELD = SdkField. builder(MarshallingType.INTEGER).memberName("Size")
.getter(getter(RaidArray::size)).setter(setter(Builder::size))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Size").build()).build();
private static final SdkField DEVICE_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Device")
.getter(getter(RaidArray::device)).setter(setter(Builder::device))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Device").build()).build();
private static final SdkField MOUNT_POINT_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("MountPoint").getter(getter(RaidArray::mountPoint)).setter(setter(Builder::mountPoint))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MountPoint").build()).build();
private static final SdkField AVAILABILITY_ZONE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("AvailabilityZone").getter(getter(RaidArray::availabilityZone)).setter(setter(Builder::availabilityZone))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AvailabilityZone").build()).build();
private static final SdkField CREATED_AT_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("CreatedAt").getter(getter(RaidArray::createdAt)).setter(setter(Builder::createdAt))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreatedAt").build()).build();
private static final SdkField STACK_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("StackId").getter(getter(RaidArray::stackId)).setter(setter(Builder::stackId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StackId").build()).build();
private static final SdkField VOLUME_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("VolumeType").getter(getter(RaidArray::volumeType)).setter(setter(Builder::volumeType))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VolumeType").build()).build();
private static final SdkField IOPS_FIELD = SdkField. builder(MarshallingType.INTEGER).memberName("Iops")
.getter(getter(RaidArray::iops)).setter(setter(Builder::iops))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Iops").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(RAID_ARRAY_ID_FIELD,
INSTANCE_ID_FIELD, NAME_FIELD, RAID_LEVEL_FIELD, NUMBER_OF_DISKS_FIELD, SIZE_FIELD, DEVICE_FIELD, MOUNT_POINT_FIELD,
AVAILABILITY_ZONE_FIELD, CREATED_AT_FIELD, STACK_ID_FIELD, VOLUME_TYPE_FIELD, IOPS_FIELD));
private static final long serialVersionUID = 1L;
private final String raidArrayId;
private final String instanceId;
private final String name;
private final Integer raidLevel;
private final Integer numberOfDisks;
private final Integer size;
private final String device;
private final String mountPoint;
private final String availabilityZone;
private final String createdAt;
private final String stackId;
private final String volumeType;
private final Integer iops;
private RaidArray(BuilderImpl builder) {
this.raidArrayId = builder.raidArrayId;
this.instanceId = builder.instanceId;
this.name = builder.name;
this.raidLevel = builder.raidLevel;
this.numberOfDisks = builder.numberOfDisks;
this.size = builder.size;
this.device = builder.device;
this.mountPoint = builder.mountPoint;
this.availabilityZone = builder.availabilityZone;
this.createdAt = builder.createdAt;
this.stackId = builder.stackId;
this.volumeType = builder.volumeType;
this.iops = builder.iops;
}
/**
*
* The array ID.
*
*
* @return The array ID.
*/
public final String raidArrayId() {
return raidArrayId;
}
/**
*
* The instance ID.
*
*
* @return The instance ID.
*/
public final String instanceId() {
return instanceId;
}
/**
*
* The array name.
*
*
* @return The array name.
*/
public final String name() {
return name;
}
/**
*
* The RAID level.
*
*
* @return The RAID level.
*/
public final Integer raidLevel() {
return raidLevel;
}
/**
*
* The number of disks in the array.
*
*
* @return The number of disks in the array.
*/
public final Integer numberOfDisks() {
return numberOfDisks;
}
/**
*
* The array's size.
*
*
* @return The array's size.
*/
public final Integer size() {
return size;
}
/**
*
* The array's Linux device. For example /dev/mdadm0.
*
*
* @return The array's Linux device. For example /dev/mdadm0.
*/
public final String device() {
return device;
}
/**
*
* The array's mount point.
*
*
* @return The array's mount point.
*/
public final String mountPoint() {
return mountPoint;
}
/**
*
* The array's Availability Zone. For more information, see Regions and Endpoints.
*
*
* @return The array's Availability Zone. For more information, see Regions and Endpoints.
*/
public final String availabilityZone() {
return availabilityZone;
}
/**
*
* When the RAID array was created.
*
*
* @return When the RAID array was created.
*/
public final String createdAt() {
return createdAt;
}
/**
*
* The stack ID.
*
*
* @return The stack ID.
*/
public final String stackId() {
return stackId;
}
/**
*
* The volume type, standard or PIOPS.
*
*
* @return The volume type, standard or PIOPS.
*/
public final String volumeType() {
return volumeType;
}
/**
*
* For PIOPS volumes, the IOPS per disk.
*
*
* @return For PIOPS volumes, the IOPS per disk.
*/
public final Integer iops() {
return iops;
}
@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(raidArrayId());
hashCode = 31 * hashCode + Objects.hashCode(instanceId());
hashCode = 31 * hashCode + Objects.hashCode(name());
hashCode = 31 * hashCode + Objects.hashCode(raidLevel());
hashCode = 31 * hashCode + Objects.hashCode(numberOfDisks());
hashCode = 31 * hashCode + Objects.hashCode(size());
hashCode = 31 * hashCode + Objects.hashCode(device());
hashCode = 31 * hashCode + Objects.hashCode(mountPoint());
hashCode = 31 * hashCode + Objects.hashCode(availabilityZone());
hashCode = 31 * hashCode + Objects.hashCode(createdAt());
hashCode = 31 * hashCode + Objects.hashCode(stackId());
hashCode = 31 * hashCode + Objects.hashCode(volumeType());
hashCode = 31 * hashCode + Objects.hashCode(iops());
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 RaidArray)) {
return false;
}
RaidArray other = (RaidArray) obj;
return Objects.equals(raidArrayId(), other.raidArrayId()) && Objects.equals(instanceId(), other.instanceId())
&& Objects.equals(name(), other.name()) && Objects.equals(raidLevel(), other.raidLevel())
&& Objects.equals(numberOfDisks(), other.numberOfDisks()) && Objects.equals(size(), other.size())
&& Objects.equals(device(), other.device()) && Objects.equals(mountPoint(), other.mountPoint())
&& Objects.equals(availabilityZone(), other.availabilityZone()) && Objects.equals(createdAt(), other.createdAt())
&& Objects.equals(stackId(), other.stackId()) && Objects.equals(volumeType(), other.volumeType())
&& Objects.equals(iops(), other.iops());
}
/**
* 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("RaidArray").add("RaidArrayId", raidArrayId()).add("InstanceId", instanceId())
.add("Name", name()).add("RaidLevel", raidLevel()).add("NumberOfDisks", numberOfDisks()).add("Size", size())
.add("Device", device()).add("MountPoint", mountPoint()).add("AvailabilityZone", availabilityZone())
.add("CreatedAt", createdAt()).add("StackId", stackId()).add("VolumeType", volumeType()).add("Iops", iops())
.build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "RaidArrayId":
return Optional.ofNullable(clazz.cast(raidArrayId()));
case "InstanceId":
return Optional.ofNullable(clazz.cast(instanceId()));
case "Name":
return Optional.ofNullable(clazz.cast(name()));
case "RaidLevel":
return Optional.ofNullable(clazz.cast(raidLevel()));
case "NumberOfDisks":
return Optional.ofNullable(clazz.cast(numberOfDisks()));
case "Size":
return Optional.ofNullable(clazz.cast(size()));
case "Device":
return Optional.ofNullable(clazz.cast(device()));
case "MountPoint":
return Optional.ofNullable(clazz.cast(mountPoint()));
case "AvailabilityZone":
return Optional.ofNullable(clazz.cast(availabilityZone()));
case "CreatedAt":
return Optional.ofNullable(clazz.cast(createdAt()));
case "StackId":
return Optional.ofNullable(clazz.cast(stackId()));
case "VolumeType":
return Optional.ofNullable(clazz.cast(volumeType()));
case "Iops":
return Optional.ofNullable(clazz.cast(iops()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function
© 2015 - 2025 Weber Informatics LLC | Privacy Policy