
software.amazon.awssdk.services.securityhub.model.AwsEfsAccessPointDetails Maven / Gradle / Ivy
/*
* 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.securityhub.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.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;
/**
*
* Provides information about an Amazon EFS access point.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class AwsEfsAccessPointDetails implements SdkPojo, Serializable,
ToCopyableBuilder {
private static final SdkField ACCESS_POINT_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("AccessPointId").getter(getter(AwsEfsAccessPointDetails::accessPointId))
.setter(setter(Builder::accessPointId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AccessPointId").build()).build();
private static final SdkField ARN_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Arn")
.getter(getter(AwsEfsAccessPointDetails::arn)).setter(setter(Builder::arn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Arn").build()).build();
private static final SdkField CLIENT_TOKEN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ClientToken").getter(getter(AwsEfsAccessPointDetails::clientToken)).setter(setter(Builder::clientToken))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ClientToken").build()).build();
private static final SdkField FILE_SYSTEM_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("FileSystemId").getter(getter(AwsEfsAccessPointDetails::fileSystemId))
.setter(setter(Builder::fileSystemId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FileSystemId").build()).build();
private static final SdkField POSIX_USER_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("PosixUser")
.getter(getter(AwsEfsAccessPointDetails::posixUser)).setter(setter(Builder::posixUser))
.constructor(AwsEfsAccessPointPosixUserDetails::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PosixUser").build()).build();
private static final SdkField ROOT_DIRECTORY_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("RootDirectory")
.getter(getter(AwsEfsAccessPointDetails::rootDirectory)).setter(setter(Builder::rootDirectory))
.constructor(AwsEfsAccessPointRootDirectoryDetails::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RootDirectory").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(ACCESS_POINT_ID_FIELD,
ARN_FIELD, CLIENT_TOKEN_FIELD, FILE_SYSTEM_ID_FIELD, POSIX_USER_FIELD, ROOT_DIRECTORY_FIELD));
private static final long serialVersionUID = 1L;
private final String accessPointId;
private final String arn;
private final String clientToken;
private final String fileSystemId;
private final AwsEfsAccessPointPosixUserDetails posixUser;
private final AwsEfsAccessPointRootDirectoryDetails rootDirectory;
private AwsEfsAccessPointDetails(BuilderImpl builder) {
this.accessPointId = builder.accessPointId;
this.arn = builder.arn;
this.clientToken = builder.clientToken;
this.fileSystemId = builder.fileSystemId;
this.posixUser = builder.posixUser;
this.rootDirectory = builder.rootDirectory;
}
/**
*
* The ID of the Amazon EFS access point.
*
*
* @return The ID of the Amazon EFS access point.
*/
public final String accessPointId() {
return accessPointId;
}
/**
*
* The Amazon Resource Name (ARN) of the Amazon EFS access point.
*
*
* @return The Amazon Resource Name (ARN) of the Amazon EFS access point.
*/
public final String arn() {
return arn;
}
/**
*
* The opaque string specified in the request to ensure idempotent creation.
*
*
* @return The opaque string specified in the request to ensure idempotent creation.
*/
public final String clientToken() {
return clientToken;
}
/**
*
* The ID of the Amazon EFS file system that the access point applies to.
*
*
* @return The ID of the Amazon EFS file system that the access point applies to.
*/
public final String fileSystemId() {
return fileSystemId;
}
/**
*
* The full POSIX identity, including the user ID, group ID, and secondary group IDs on the access point, that is
* used for all file operations by NFS clients using the access point.
*
*
* @return The full POSIX identity, including the user ID, group ID, and secondary group IDs on the access point,
* that is used for all file operations by NFS clients using the access point.
*/
public final AwsEfsAccessPointPosixUserDetails posixUser() {
return posixUser;
}
/**
*
* The directory on the Amazon EFS file system that the access point exposes as the root directory to NFS clients
* using the access point.
*
*
* @return The directory on the Amazon EFS file system that the access point exposes as the root directory to NFS
* clients using the access point.
*/
public final AwsEfsAccessPointRootDirectoryDetails rootDirectory() {
return rootDirectory;
}
@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(accessPointId());
hashCode = 31 * hashCode + Objects.hashCode(arn());
hashCode = 31 * hashCode + Objects.hashCode(clientToken());
hashCode = 31 * hashCode + Objects.hashCode(fileSystemId());
hashCode = 31 * hashCode + Objects.hashCode(posixUser());
hashCode = 31 * hashCode + Objects.hashCode(rootDirectory());
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 AwsEfsAccessPointDetails)) {
return false;
}
AwsEfsAccessPointDetails other = (AwsEfsAccessPointDetails) obj;
return Objects.equals(accessPointId(), other.accessPointId()) && Objects.equals(arn(), other.arn())
&& Objects.equals(clientToken(), other.clientToken()) && Objects.equals(fileSystemId(), other.fileSystemId())
&& Objects.equals(posixUser(), other.posixUser()) && Objects.equals(rootDirectory(), other.rootDirectory());
}
/**
* 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("AwsEfsAccessPointDetails").add("AccessPointId", accessPointId()).add("Arn", arn())
.add("ClientToken", clientToken()).add("FileSystemId", fileSystemId()).add("PosixUser", posixUser())
.add("RootDirectory", rootDirectory()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "AccessPointId":
return Optional.ofNullable(clazz.cast(accessPointId()));
case "Arn":
return Optional.ofNullable(clazz.cast(arn()));
case "ClientToken":
return Optional.ofNullable(clazz.cast(clientToken()));
case "FileSystemId":
return Optional.ofNullable(clazz.cast(fileSystemId()));
case "PosixUser":
return Optional.ofNullable(clazz.cast(posixUser()));
case "RootDirectory":
return Optional.ofNullable(clazz.cast(rootDirectory()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function
© 2015 - 2025 Weber Informatics LLC | Privacy Policy