software.amazon.awssdk.services.ecs.model.FSxWindowsFileServerVolumeConfiguration 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.ecs.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;
/**
*
* This parameter is specified when you are using Amazon FSx for Windows File Server file
* system for task storage.
*
*
* For more information and the input format, see Amazon FSx for Windows File
* Server Volumes in the Amazon Elastic Container Service Developer Guide.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class FSxWindowsFileServerVolumeConfiguration implements SdkPojo, Serializable,
ToCopyableBuilder {
private static final SdkField FILE_SYSTEM_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("fileSystemId").getter(getter(FSxWindowsFileServerVolumeConfiguration::fileSystemId))
.setter(setter(Builder::fileSystemId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("fileSystemId").build()).build();
private static final SdkField ROOT_DIRECTORY_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("rootDirectory").getter(getter(FSxWindowsFileServerVolumeConfiguration::rootDirectory))
.setter(setter(Builder::rootDirectory))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("rootDirectory").build()).build();
private static final SdkField AUTHORIZATION_CONFIG_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("authorizationConfig")
.getter(getter(FSxWindowsFileServerVolumeConfiguration::authorizationConfig))
.setter(setter(Builder::authorizationConfig)).constructor(FSxWindowsFileServerAuthorizationConfig::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("authorizationConfig").build())
.build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(FILE_SYSTEM_ID_FIELD,
ROOT_DIRECTORY_FIELD, AUTHORIZATION_CONFIG_FIELD));
private static final long serialVersionUID = 1L;
private final String fileSystemId;
private final String rootDirectory;
private final FSxWindowsFileServerAuthorizationConfig authorizationConfig;
private FSxWindowsFileServerVolumeConfiguration(BuilderImpl builder) {
this.fileSystemId = builder.fileSystemId;
this.rootDirectory = builder.rootDirectory;
this.authorizationConfig = builder.authorizationConfig;
}
/**
*
* The Amazon FSx for Windows File Server file system ID to use.
*
*
* @return The Amazon FSx for Windows File Server file system ID to use.
*/
public final String fileSystemId() {
return fileSystemId;
}
/**
*
* The directory within the Amazon FSx for Windows File Server file system to mount as the root directory inside the
* host.
*
*
* @return The directory within the Amazon FSx for Windows File Server file system to mount as the root directory
* inside the host.
*/
public final String rootDirectory() {
return rootDirectory;
}
/**
*
* The authorization configuration details for the Amazon FSx for Windows File Server file system.
*
*
* @return The authorization configuration details for the Amazon FSx for Windows File Server file system.
*/
public final FSxWindowsFileServerAuthorizationConfig authorizationConfig() {
return authorizationConfig;
}
@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(fileSystemId());
hashCode = 31 * hashCode + Objects.hashCode(rootDirectory());
hashCode = 31 * hashCode + Objects.hashCode(authorizationConfig());
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 FSxWindowsFileServerVolumeConfiguration)) {
return false;
}
FSxWindowsFileServerVolumeConfiguration other = (FSxWindowsFileServerVolumeConfiguration) obj;
return Objects.equals(fileSystemId(), other.fileSystemId()) && Objects.equals(rootDirectory(), other.rootDirectory())
&& Objects.equals(authorizationConfig(), other.authorizationConfig());
}
/**
* 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("FSxWindowsFileServerVolumeConfiguration").add("FileSystemId", fileSystemId())
.add("RootDirectory", rootDirectory()).add("AuthorizationConfig", authorizationConfig()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "fileSystemId":
return Optional.ofNullable(clazz.cast(fileSystemId()));
case "rootDirectory":
return Optional.ofNullable(clazz.cast(rootDirectory()));
case "authorizationConfig":
return Optional.ofNullable(clazz.cast(authorizationConfig()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function
© 2015 - 2025 Weber Informatics LLC | Privacy Policy