software.amazon.awssdk.services.fsx.model.FileSystem Maven / Gradle / Ivy
Show all versions of fsx 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.fsx.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.core.util.SdkAutoConstructList;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
*
* A description of a specific Amazon FSx file system.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class FileSystem implements SdkPojo, Serializable, ToCopyableBuilder {
private static final SdkField OWNER_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("OwnerId").getter(getter(FileSystem::ownerId)).setter(setter(Builder::ownerId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OwnerId").build()).build();
private static final SdkField CREATION_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("CreationTime").getter(getter(FileSystem::creationTime)).setter(setter(Builder::creationTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreationTime").build()).build();
private static final SdkField FILE_SYSTEM_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("FileSystemId").getter(getter(FileSystem::fileSystemId)).setter(setter(Builder::fileSystemId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FileSystemId").build()).build();
private static final SdkField FILE_SYSTEM_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("FileSystemType").getter(getter(FileSystem::fileSystemTypeAsString))
.setter(setter(Builder::fileSystemType))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FileSystemType").build()).build();
private static final SdkField LIFECYCLE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("Lifecycle").getter(getter(FileSystem::lifecycleAsString)).setter(setter(Builder::lifecycle))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Lifecycle").build()).build();
private static final SdkField FAILURE_DETAILS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("FailureDetails")
.getter(getter(FileSystem::failureDetails)).setter(setter(Builder::failureDetails))
.constructor(FileSystemFailureDetails::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FailureDetails").build()).build();
private static final SdkField STORAGE_CAPACITY_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("StorageCapacity").getter(getter(FileSystem::storageCapacity)).setter(setter(Builder::storageCapacity))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StorageCapacity").build()).build();
private static final SdkField STORAGE_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("StorageType").getter(getter(FileSystem::storageTypeAsString)).setter(setter(Builder::storageType))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StorageType").build()).build();
private static final SdkField VPC_ID_FIELD = SdkField. builder(MarshallingType.STRING).memberName("VpcId")
.getter(getter(FileSystem::vpcId)).setter(setter(Builder::vpcId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VpcId").build()).build();
private static final SdkField> SUBNET_IDS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("SubnetIds")
.getter(getter(FileSystem::subnetIds))
.setter(setter(Builder::subnetIds))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SubnetIds").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.STRING)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final SdkField> NETWORK_INTERFACE_IDS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("NetworkInterfaceIds")
.getter(getter(FileSystem::networkInterfaceIds))
.setter(setter(Builder::networkInterfaceIds))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("NetworkInterfaceIds").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.STRING)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final SdkField DNS_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("DNSName").getter(getter(FileSystem::dnsName)).setter(setter(Builder::dnsName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DNSName").build()).build();
private static final SdkField KMS_KEY_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("KmsKeyId").getter(getter(FileSystem::kmsKeyId)).setter(setter(Builder::kmsKeyId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("KmsKeyId").build()).build();
private static final SdkField RESOURCE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ResourceARN").getter(getter(FileSystem::resourceARN)).setter(setter(Builder::resourceARN))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ResourceARN").build()).build();
private static final SdkField> TAGS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("Tags")
.getter(getter(FileSystem::tags))
.setter(setter(Builder::tags))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Tags").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(Tag::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final SdkField WINDOWS_CONFIGURATION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("WindowsConfiguration")
.getter(getter(FileSystem::windowsConfiguration)).setter(setter(Builder::windowsConfiguration))
.constructor(WindowsFileSystemConfiguration::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("WindowsConfiguration").build())
.build();
private static final SdkField LUSTRE_CONFIGURATION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("LustreConfiguration")
.getter(getter(FileSystem::lustreConfiguration)).setter(setter(Builder::lustreConfiguration))
.constructor(LustreFileSystemConfiguration::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LustreConfiguration").build())
.build();
private static final SdkField> ADMINISTRATIVE_ACTIONS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("AdministrativeActions")
.getter(getter(FileSystem::administrativeActions))
.setter(setter(Builder::administrativeActions))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AdministrativeActions").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(AdministrativeAction::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final SdkField ONTAP_CONFIGURATION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("OntapConfiguration")
.getter(getter(FileSystem::ontapConfiguration)).setter(setter(Builder::ontapConfiguration))
.constructor(OntapFileSystemConfiguration::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OntapConfiguration").build())
.build();
private static final SdkField FILE_SYSTEM_TYPE_VERSION_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("FileSystemTypeVersion").getter(getter(FileSystem::fileSystemTypeVersion))
.setter(setter(Builder::fileSystemTypeVersion))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FileSystemTypeVersion").build())
.build();
private static final SdkField OPEN_ZFS_CONFIGURATION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("OpenZFSConfiguration")
.getter(getter(FileSystem::openZFSConfiguration)).setter(setter(Builder::openZFSConfiguration))
.constructor(OpenZFSFileSystemConfiguration::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OpenZFSConfiguration").build())
.build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(OWNER_ID_FIELD,
CREATION_TIME_FIELD, FILE_SYSTEM_ID_FIELD, FILE_SYSTEM_TYPE_FIELD, LIFECYCLE_FIELD, FAILURE_DETAILS_FIELD,
STORAGE_CAPACITY_FIELD, STORAGE_TYPE_FIELD, VPC_ID_FIELD, SUBNET_IDS_FIELD, NETWORK_INTERFACE_IDS_FIELD,
DNS_NAME_FIELD, KMS_KEY_ID_FIELD, RESOURCE_ARN_FIELD, TAGS_FIELD, WINDOWS_CONFIGURATION_FIELD,
LUSTRE_CONFIGURATION_FIELD, ADMINISTRATIVE_ACTIONS_FIELD, ONTAP_CONFIGURATION_FIELD, FILE_SYSTEM_TYPE_VERSION_FIELD,
OPEN_ZFS_CONFIGURATION_FIELD));
private static final long serialVersionUID = 1L;
private final String ownerId;
private final Instant creationTime;
private final String fileSystemId;
private final String fileSystemType;
private final String lifecycle;
private final FileSystemFailureDetails failureDetails;
private final Integer storageCapacity;
private final String storageType;
private final String vpcId;
private final List subnetIds;
private final List networkInterfaceIds;
private final String dnsName;
private final String kmsKeyId;
private final String resourceARN;
private final List tags;
private final WindowsFileSystemConfiguration windowsConfiguration;
private final LustreFileSystemConfiguration lustreConfiguration;
private final List administrativeActions;
private final OntapFileSystemConfiguration ontapConfiguration;
private final String fileSystemTypeVersion;
private final OpenZFSFileSystemConfiguration openZFSConfiguration;
private FileSystem(BuilderImpl builder) {
this.ownerId = builder.ownerId;
this.creationTime = builder.creationTime;
this.fileSystemId = builder.fileSystemId;
this.fileSystemType = builder.fileSystemType;
this.lifecycle = builder.lifecycle;
this.failureDetails = builder.failureDetails;
this.storageCapacity = builder.storageCapacity;
this.storageType = builder.storageType;
this.vpcId = builder.vpcId;
this.subnetIds = builder.subnetIds;
this.networkInterfaceIds = builder.networkInterfaceIds;
this.dnsName = builder.dnsName;
this.kmsKeyId = builder.kmsKeyId;
this.resourceARN = builder.resourceARN;
this.tags = builder.tags;
this.windowsConfiguration = builder.windowsConfiguration;
this.lustreConfiguration = builder.lustreConfiguration;
this.administrativeActions = builder.administrativeActions;
this.ontapConfiguration = builder.ontapConfiguration;
this.fileSystemTypeVersion = builder.fileSystemTypeVersion;
this.openZFSConfiguration = builder.openZFSConfiguration;
}
/**
*
* The Amazon Web Services account that created the file system. If the file system was created by a user in IAM
* Identity Center, the Amazon Web Services account to which the IAM user belongs is the owner.
*
*
* @return The Amazon Web Services account that created the file system. If the file system was created by a user in
* IAM Identity Center, the Amazon Web Services account to which the IAM user belongs is the owner.
*/
public final String ownerId() {
return ownerId;
}
/**
*
* The time that the file system was created, in seconds (since 1970-01-01T00:00:00Z), also known as Unix time.
*
*
* @return The time that the file system was created, in seconds (since 1970-01-01T00:00:00Z), also known as Unix
* time.
*/
public final Instant creationTime() {
return creationTime;
}
/**
*
* The system-generated, unique 17-digit ID of the file system.
*
*
* @return The system-generated, unique 17-digit ID of the file system.
*/
public final String fileSystemId() {
return fileSystemId;
}
/**
*
* The type of Amazon FSx file system, which can be LUSTRE
, WINDOWS
, ONTAP
,
* or OPENZFS
.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #fileSystemType}
* will return {@link FileSystemType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available
* from {@link #fileSystemTypeAsString}.
*
*
* @return The type of Amazon FSx file system, which can be LUSTRE
, WINDOWS
,
* ONTAP
, or OPENZFS
.
* @see FileSystemType
*/
public final FileSystemType fileSystemType() {
return FileSystemType.fromValue(fileSystemType);
}
/**
*
* The type of Amazon FSx file system, which can be LUSTRE
, WINDOWS
, ONTAP
,
* or OPENZFS
.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #fileSystemType}
* will return {@link FileSystemType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available
* from {@link #fileSystemTypeAsString}.
*
*
* @return The type of Amazon FSx file system, which can be LUSTRE
, WINDOWS
,
* ONTAP
, or OPENZFS
.
* @see FileSystemType
*/
public final String fileSystemTypeAsString() {
return fileSystemType;
}
/**
*
* The lifecycle status of the file system. The following are the possible values and what they mean:
*
*
* -
*
* AVAILABLE
- The file system is in a healthy state, and is reachable and available for use.
*
*
* -
*
* CREATING
- Amazon FSx is creating the new file system.
*
*
* -
*
* DELETING
- Amazon FSx is deleting an existing file system.
*
*
* -
*
* FAILED
- An existing file system has experienced an unrecoverable failure. When creating a new file
* system, Amazon FSx was unable to create the file system.
*
*
* -
*
* MISCONFIGURED
- The file system is in a failed but recoverable state.
*
*
* -
*
* MISCONFIGURED_UNAVAILABLE
- (Amazon FSx for Windows File Server only) The file system is currently
* unavailable due to a change in your Active Directory configuration.
*
*
* -
*
* UPDATING
- The file system is undergoing a customer-initiated update.
*
*
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #lifecycle} will
* return {@link FileSystemLifecycle#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available
* from {@link #lifecycleAsString}.
*
*
* @return The lifecycle status of the file system. The following are the possible values and what they mean:
*
* -
*
* AVAILABLE
- The file system is in a healthy state, and is reachable and available for use.
*
*
* -
*
* CREATING
- Amazon FSx is creating the new file system.
*
*
* -
*
* DELETING
- Amazon FSx is deleting an existing file system.
*
*
* -
*
* FAILED
- An existing file system has experienced an unrecoverable failure. When creating a
* new file system, Amazon FSx was unable to create the file system.
*
*
* -
*
* MISCONFIGURED
- The file system is in a failed but recoverable state.
*
*
* -
*
* MISCONFIGURED_UNAVAILABLE
- (Amazon FSx for Windows File Server only) The file system is
* currently unavailable due to a change in your Active Directory configuration.
*
*
* -
*
* UPDATING
- The file system is undergoing a customer-initiated update.
*
*
* @see FileSystemLifecycle
*/
public final FileSystemLifecycle lifecycle() {
return FileSystemLifecycle.fromValue(lifecycle);
}
/**
*
* The lifecycle status of the file system. The following are the possible values and what they mean:
*
*
* -
*
* AVAILABLE
- The file system is in a healthy state, and is reachable and available for use.
*
*
* -
*
* CREATING
- Amazon FSx is creating the new file system.
*
*
* -
*
* DELETING
- Amazon FSx is deleting an existing file system.
*
*
* -
*
* FAILED
- An existing file system has experienced an unrecoverable failure. When creating a new file
* system, Amazon FSx was unable to create the file system.
*
*
* -
*
* MISCONFIGURED
- The file system is in a failed but recoverable state.
*
*
* -
*
* MISCONFIGURED_UNAVAILABLE
- (Amazon FSx for Windows File Server only) The file system is currently
* unavailable due to a change in your Active Directory configuration.
*
*
* -
*
* UPDATING
- The file system is undergoing a customer-initiated update.
*
*
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #lifecycle} will
* return {@link FileSystemLifecycle#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available
* from {@link #lifecycleAsString}.
*
*
* @return The lifecycle status of the file system. The following are the possible values and what they mean:
*
* -
*
* AVAILABLE
- The file system is in a healthy state, and is reachable and available for use.
*
*
* -
*
* CREATING
- Amazon FSx is creating the new file system.
*
*
* -
*
* DELETING
- Amazon FSx is deleting an existing file system.
*
*
* -
*
* FAILED
- An existing file system has experienced an unrecoverable failure. When creating a
* new file system, Amazon FSx was unable to create the file system.
*
*
* -
*
* MISCONFIGURED
- The file system is in a failed but recoverable state.
*
*
* -
*
* MISCONFIGURED_UNAVAILABLE
- (Amazon FSx for Windows File Server only) The file system is
* currently unavailable due to a change in your Active Directory configuration.
*
*
* -
*
* UPDATING
- The file system is undergoing a customer-initiated update.
*
*
* @see FileSystemLifecycle
*/
public final String lifecycleAsString() {
return lifecycle;
}
/**
* Returns the value of the FailureDetails property for this object.
*
* @return The value of the FailureDetails property for this object.
*/
public final FileSystemFailureDetails failureDetails() {
return failureDetails;
}
/**
*
* The storage capacity of the file system in gibibytes (GiB).
*
*
* Amazon FSx responds with an HTTP status code 400 (Bad Request) if the value of StorageCapacity
is
* outside of the minimum or maximum values.
*
*
* @return The storage capacity of the file system in gibibytes (GiB).
*
* Amazon FSx responds with an HTTP status code 400 (Bad Request) if the value of
* StorageCapacity
is outside of the minimum or maximum values.
*/
public final Integer storageCapacity() {
return storageCapacity;
}
/**
*
* The type of storage the file system is using. If set to SSD
, the file system uses solid state drive
* storage. If set to HDD
, the file system uses hard disk drive storage.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #storageType} will
* return {@link StorageType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #storageTypeAsString}.
*
*
* @return The type of storage the file system is using. If set to SSD
, the file system uses solid
* state drive storage. If set to HDD
, the file system uses hard disk drive storage.
* @see StorageType
*/
public final StorageType storageType() {
return StorageType.fromValue(storageType);
}
/**
*
* The type of storage the file system is using. If set to SSD
, the file system uses solid state drive
* storage. If set to HDD
, the file system uses hard disk drive storage.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #storageType} will
* return {@link StorageType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #storageTypeAsString}.
*
*
* @return The type of storage the file system is using. If set to SSD
, the file system uses solid
* state drive storage. If set to HDD
, the file system uses hard disk drive storage.
* @see StorageType
*/
public final String storageTypeAsString() {
return storageType;
}
/**
*
* The ID of the primary virtual private cloud (VPC) for the file system.
*
*
* @return The ID of the primary virtual private cloud (VPC) for the file system.
*/
public final String vpcId() {
return vpcId;
}
/**
* For responses, this returns true if the service returned a value for the SubnetIds property. This DOES NOT check
* that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is
* useful because the SDK will never return a null collection or map, but you may need to differentiate between the
* service returning nothing (or null) and the service returning an empty collection or map. For requests, this
* returns true if a value for the property was specified in the request builder, and false if a value was not
* specified.
*/
public final boolean hasSubnetIds() {
return subnetIds != null && !(subnetIds instanceof SdkAutoConstructList);
}
/**
*
* Specifies the IDs of the subnets that the file system is accessible from. For the Amazon FSx Windows and ONTAP
* MULTI_AZ_1
file system deployment type, there are two subnet IDs, one for the preferred file server
* and one for the standby file server. The preferred file server subnet identified in the
* PreferredSubnetID
property. All other file systems have only one subnet ID.
*
*
* For FSx for Lustre file systems, and Single-AZ Windows file systems, this is the ID of the subnet that contains
* the file system's endpoint. For MULTI_AZ_1
Windows and ONTAP file systems, the file system endpoint
* is available in the PreferredSubnetID
.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasSubnetIds} method.
*
*
* @return Specifies the IDs of the subnets that the file system is accessible from. For the Amazon FSx Windows and
* ONTAP MULTI_AZ_1
file system deployment type, there are two subnet IDs, one for the
* preferred file server and one for the standby file server. The preferred file server subnet identified in
* the PreferredSubnetID
property. All other file systems have only one subnet ID.
*
* For FSx for Lustre file systems, and Single-AZ Windows file systems, this is the ID of the subnet that
* contains the file system's endpoint. For MULTI_AZ_1
Windows and ONTAP file systems, the file
* system endpoint is available in the PreferredSubnetID
.
*/
public final List subnetIds() {
return subnetIds;
}
/**
* For responses, this returns true if the service returned a value for the NetworkInterfaceIds property. This DOES
* NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property).
* This is useful because the SDK will never return a null collection or map, but you may need to differentiate
* between the service returning nothing (or null) and the service returning an empty collection or map. For
* requests, this returns true if a value for the property was specified in the request builder, and false if a
* value was not specified.
*/
public final boolean hasNetworkInterfaceIds() {
return networkInterfaceIds != null && !(networkInterfaceIds instanceof SdkAutoConstructList);
}
/**
*
* The IDs of the elastic network interfaces from which a specific file system is accessible. The elastic network
* interface is automatically created in the same virtual private cloud (VPC) that the Amazon FSx file system was
* created in. For more information, see Elastic Network Interfaces in the
* Amazon EC2 User Guide.
*
*
* For an Amazon FSx for Windows File Server file system, you can have one network interface ID. For an Amazon FSx
* for Lustre file system, you can have more than one.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasNetworkInterfaceIds} method.
*
*
* @return The IDs of the elastic network interfaces from which a specific file system is accessible. The elastic
* network interface is automatically created in the same virtual private cloud (VPC) that the Amazon FSx
* file system was created in. For more information, see Elastic Network Interfaces
* in the Amazon EC2 User Guide.
*
* For an Amazon FSx for Windows File Server file system, you can have one network interface ID. For an
* Amazon FSx for Lustre file system, you can have more than one.
*/
public final List networkInterfaceIds() {
return networkInterfaceIds;
}
/**
*
* The Domain Name System (DNS) name for the file system.
*
*
* @return The Domain Name System (DNS) name for the file system.
*/
public final String dnsName() {
return dnsName;
}
/**
*
* The ID of the Key Management Service (KMS) key used to encrypt Amazon FSx file system data. Used as follows with
* Amazon FSx file system types:
*
*
* -
*
* Amazon FSx for Lustre PERSISTENT_1
and PERSISTENT_2
deployment types only.
*
*
* SCRATCH_1
and SCRATCH_2
types are encrypted using the Amazon FSx service KMS key for
* your account.
*
*
* -
*
* Amazon FSx for NetApp ONTAP
*
*
* -
*
* Amazon FSx for OpenZFS
*
*
* -
*
* Amazon FSx for Windows File Server
*
*
*
*
* @return The ID of the Key Management Service (KMS) key used to encrypt Amazon FSx file system data. Used as
* follows with Amazon FSx file system types:
*
* -
*
* Amazon FSx for Lustre PERSISTENT_1
and PERSISTENT_2
deployment types only.
*
*
* SCRATCH_1
and SCRATCH_2
types are encrypted using the Amazon FSx service KMS
* key for your account.
*
*
* -
*
* Amazon FSx for NetApp ONTAP
*
*
* -
*
* Amazon FSx for OpenZFS
*
*
* -
*
* Amazon FSx for Windows File Server
*
*
*/
public final String kmsKeyId() {
return kmsKeyId;
}
/**
*
* The Amazon Resource Name (ARN) of the file system resource.
*
*
* @return The Amazon Resource Name (ARN) of the file system resource.
*/
public final String resourceARN() {
return resourceARN;
}
/**
* For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that
* the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is useful
* because the SDK will never return a null collection or map, but you may need to differentiate between the service
* returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true
* if a value for the property was specified in the request builder, and false if a value was not specified.
*/
public final boolean hasTags() {
return tags != null && !(tags instanceof SdkAutoConstructList);
}
/**
*
* The tags to associate with the file system. For more information, see Tagging your Amazon FSx
* resources in the Amazon FSx for Lustre User Guide.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasTags} method.
*
*
* @return The tags to associate with the file system. For more information, see Tagging your Amazon FSx
* resources in the Amazon FSx for Lustre User Guide.
*/
public final List tags() {
return tags;
}
/**
*
* The configuration for this Amazon FSx for Windows File Server file system.
*
*
* @return The configuration for this Amazon FSx for Windows File Server file system.
*/
public final WindowsFileSystemConfiguration windowsConfiguration() {
return windowsConfiguration;
}
/**
* Returns the value of the LustreConfiguration property for this object.
*
* @return The value of the LustreConfiguration property for this object.
*/
public final LustreFileSystemConfiguration lustreConfiguration() {
return lustreConfiguration;
}
/**
* For responses, this returns true if the service returned a value for the AdministrativeActions property. This
* DOES NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the
* property). This is useful because the SDK will never return a null collection or map, but you may need to
* differentiate between the service returning nothing (or null) and the service returning an empty collection or
* map. For requests, this returns true if a value for the property was specified in the request builder, and false
* if a value was not specified.
*/
public final boolean hasAdministrativeActions() {
return administrativeActions != null && !(administrativeActions instanceof SdkAutoConstructList);
}
/**
*
* A list of administrative actions for the file system that are in process or waiting to be processed.
* Administrative actions describe changes to the Amazon FSx system that you have initiated using the
* UpdateFileSystem
operation.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasAdministrativeActions} method.
*
*
* @return A list of administrative actions for the file system that are in process or waiting to be processed.
* Administrative actions describe changes to the Amazon FSx system that you have initiated using the
* UpdateFileSystem
operation.
*/
public final List administrativeActions() {
return administrativeActions;
}
/**
*
* The configuration for this Amazon FSx for NetApp ONTAP file system.
*
*
* @return The configuration for this Amazon FSx for NetApp ONTAP file system.
*/
public final OntapFileSystemConfiguration ontapConfiguration() {
return ontapConfiguration;
}
/**
*
* The Lustre version of the Amazon FSx for Lustre file system, which can be 2.10
, 2.12
,
* or 2.15
.
*
*
* @return The Lustre version of the Amazon FSx for Lustre file system, which can be 2.10
,
* 2.12
, or 2.15
.
*/
public final String fileSystemTypeVersion() {
return fileSystemTypeVersion;
}
/**
*
* The configuration for this Amazon FSx for OpenZFS file system.
*
*
* @return The configuration for this Amazon FSx for OpenZFS file system.
*/
public final OpenZFSFileSystemConfiguration openZFSConfiguration() {
return openZFSConfiguration;
}
@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(ownerId());
hashCode = 31 * hashCode + Objects.hashCode(creationTime());
hashCode = 31 * hashCode + Objects.hashCode(fileSystemId());
hashCode = 31 * hashCode + Objects.hashCode(fileSystemTypeAsString());
hashCode = 31 * hashCode + Objects.hashCode(lifecycleAsString());
hashCode = 31 * hashCode + Objects.hashCode(failureDetails());
hashCode = 31 * hashCode + Objects.hashCode(storageCapacity());
hashCode = 31 * hashCode + Objects.hashCode(storageTypeAsString());
hashCode = 31 * hashCode + Objects.hashCode(vpcId());
hashCode = 31 * hashCode + Objects.hashCode(hasSubnetIds() ? subnetIds() : null);
hashCode = 31 * hashCode + Objects.hashCode(hasNetworkInterfaceIds() ? networkInterfaceIds() : null);
hashCode = 31 * hashCode + Objects.hashCode(dnsName());
hashCode = 31 * hashCode + Objects.hashCode(kmsKeyId());
hashCode = 31 * hashCode + Objects.hashCode(resourceARN());
hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null);
hashCode = 31 * hashCode + Objects.hashCode(windowsConfiguration());
hashCode = 31 * hashCode + Objects.hashCode(lustreConfiguration());
hashCode = 31 * hashCode + Objects.hashCode(hasAdministrativeActions() ? administrativeActions() : null);
hashCode = 31 * hashCode + Objects.hashCode(ontapConfiguration());
hashCode = 31 * hashCode + Objects.hashCode(fileSystemTypeVersion());
hashCode = 31 * hashCode + Objects.hashCode(openZFSConfiguration());
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 FileSystem)) {
return false;
}
FileSystem other = (FileSystem) obj;
return Objects.equals(ownerId(), other.ownerId()) && Objects.equals(creationTime(), other.creationTime())
&& Objects.equals(fileSystemId(), other.fileSystemId())
&& Objects.equals(fileSystemTypeAsString(), other.fileSystemTypeAsString())
&& Objects.equals(lifecycleAsString(), other.lifecycleAsString())
&& Objects.equals(failureDetails(), other.failureDetails())
&& Objects.equals(storageCapacity(), other.storageCapacity())
&& Objects.equals(storageTypeAsString(), other.storageTypeAsString()) && Objects.equals(vpcId(), other.vpcId())
&& hasSubnetIds() == other.hasSubnetIds() && Objects.equals(subnetIds(), other.subnetIds())
&& hasNetworkInterfaceIds() == other.hasNetworkInterfaceIds()
&& Objects.equals(networkInterfaceIds(), other.networkInterfaceIds())
&& Objects.equals(dnsName(), other.dnsName()) && Objects.equals(kmsKeyId(), other.kmsKeyId())
&& Objects.equals(resourceARN(), other.resourceARN()) && hasTags() == other.hasTags()
&& Objects.equals(tags(), other.tags()) && Objects.equals(windowsConfiguration(), other.windowsConfiguration())
&& Objects.equals(lustreConfiguration(), other.lustreConfiguration())
&& hasAdministrativeActions() == other.hasAdministrativeActions()
&& Objects.equals(administrativeActions(), other.administrativeActions())
&& Objects.equals(ontapConfiguration(), other.ontapConfiguration())
&& Objects.equals(fileSystemTypeVersion(), other.fileSystemTypeVersion())
&& Objects.equals(openZFSConfiguration(), other.openZFSConfiguration());
}
/**
* 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("FileSystem").add("OwnerId", ownerId()).add("CreationTime", creationTime())
.add("FileSystemId", fileSystemId()).add("FileSystemType", fileSystemTypeAsString())
.add("Lifecycle", lifecycleAsString()).add("FailureDetails", failureDetails())
.add("StorageCapacity", storageCapacity()).add("StorageType", storageTypeAsString()).add("VpcId", vpcId())
.add("SubnetIds", hasSubnetIds() ? subnetIds() : null)
.add("NetworkInterfaceIds", hasNetworkInterfaceIds() ? networkInterfaceIds() : null).add("DNSName", dnsName())
.add("KmsKeyId", kmsKeyId()).add("ResourceARN", resourceARN()).add("Tags", hasTags() ? tags() : null)
.add("WindowsConfiguration", windowsConfiguration()).add("LustreConfiguration", lustreConfiguration())
.add("AdministrativeActions", hasAdministrativeActions() ? administrativeActions() : null)
.add("OntapConfiguration", ontapConfiguration()).add("FileSystemTypeVersion", fileSystemTypeVersion())
.add("OpenZFSConfiguration", openZFSConfiguration()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "OwnerId":
return Optional.ofNullable(clazz.cast(ownerId()));
case "CreationTime":
return Optional.ofNullable(clazz.cast(creationTime()));
case "FileSystemId":
return Optional.ofNullable(clazz.cast(fileSystemId()));
case "FileSystemType":
return Optional.ofNullable(clazz.cast(fileSystemTypeAsString()));
case "Lifecycle":
return Optional.ofNullable(clazz.cast(lifecycleAsString()));
case "FailureDetails":
return Optional.ofNullable(clazz.cast(failureDetails()));
case "StorageCapacity":
return Optional.ofNullable(clazz.cast(storageCapacity()));
case "StorageType":
return Optional.ofNullable(clazz.cast(storageTypeAsString()));
case "VpcId":
return Optional.ofNullable(clazz.cast(vpcId()));
case "SubnetIds":
return Optional.ofNullable(clazz.cast(subnetIds()));
case "NetworkInterfaceIds":
return Optional.ofNullable(clazz.cast(networkInterfaceIds()));
case "DNSName":
return Optional.ofNullable(clazz.cast(dnsName()));
case "KmsKeyId":
return Optional.ofNullable(clazz.cast(kmsKeyId()));
case "ResourceARN":
return Optional.ofNullable(clazz.cast(resourceARN()));
case "Tags":
return Optional.ofNullable(clazz.cast(tags()));
case "WindowsConfiguration":
return Optional.ofNullable(clazz.cast(windowsConfiguration()));
case "LustreConfiguration":
return Optional.ofNullable(clazz.cast(lustreConfiguration()));
case "AdministrativeActions":
return Optional.ofNullable(clazz.cast(administrativeActions()));
case "OntapConfiguration":
return Optional.ofNullable(clazz.cast(ontapConfiguration()));
case "FileSystemTypeVersion":
return Optional.ofNullable(clazz.cast(fileSystemTypeVersion()));
case "OpenZFSConfiguration":
return Optional.ofNullable(clazz.cast(openZFSConfiguration()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function