All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.batch.model.EksEmptyDir Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Batch module holds the client classes that are used for communicating with AWS Batch.

There is a newer version: 2.29.15
Show newest version
/*
 * 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.batch.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;

/**
 * 

* Specifies the configuration of a Kubernetes emptyDir volume. An emptyDir volume is first * created when a pod is assigned to a node. It exists as long as that pod is running on that node. The * emptyDir volume is initially empty. All containers in the pod can read and write the files in the * emptyDir volume. However, the emptyDir volume can be mounted at the same or different paths * in each container. When a pod is removed from a node for any reason, the data in the emptyDir is deleted * permanently. For more information, see emptyDir in the Kubernetes * documentation. *

*/ @Generated("software.amazon.awssdk:codegen") public final class EksEmptyDir implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField MEDIUM_FIELD = SdkField. builder(MarshallingType.STRING).memberName("medium") .getter(getter(EksEmptyDir::medium)).setter(setter(Builder::medium)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("medium").build()).build(); private static final SdkField SIZE_LIMIT_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("sizeLimit").getter(getter(EksEmptyDir::sizeLimit)).setter(setter(Builder::sizeLimit)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("sizeLimit").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays .asList(MEDIUM_FIELD, SIZE_LIMIT_FIELD)); private static final long serialVersionUID = 1L; private final String medium; private final String sizeLimit; private EksEmptyDir(BuilderImpl builder) { this.medium = builder.medium; this.sizeLimit = builder.sizeLimit; } /** *

* The medium to store the volume. The default value is an empty string, which uses the storage of the node. *

*
*
""
*
*

* (Default) Use the disk storage of the node. *

*
*
"Memory"
*
*

* Use the tmpfs volume that's backed by the RAM of the node. Contents of the volume are lost when the * node reboots, and any storage on the volume counts against the container's memory limit. *

*
*
* * @return The medium to store the volume. The default value is an empty string, which uses the storage of the * node.

*
*
""
*
*

* (Default) Use the disk storage of the node. *

*
*
"Memory"
*
*

* Use the tmpfs volume that's backed by the RAM of the node. Contents of the volume are lost * when the node reboots, and any storage on the volume counts against the container's memory limit. *

*
*/ public final String medium() { return medium; } /** *

* The maximum size of the volume. By default, there's no maximum size defined. *

* * @return The maximum size of the volume. By default, there's no maximum size defined. */ public final String sizeLimit() { return sizeLimit; } @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(medium()); hashCode = 31 * hashCode + Objects.hashCode(sizeLimit()); 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 EksEmptyDir)) { return false; } EksEmptyDir other = (EksEmptyDir) obj; return Objects.equals(medium(), other.medium()) && Objects.equals(sizeLimit(), other.sizeLimit()); } /** * 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("EksEmptyDir").add("Medium", medium()).add("SizeLimit", sizeLimit()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "medium": return Optional.ofNullable(clazz.cast(medium())); case "sizeLimit": return Optional.ofNullable(clazz.cast(sizeLimit())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((EksEmptyDir) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The medium to store the volume. The default value is an empty string, which uses the storage of the node. *

*
*
""
*
*

* (Default) Use the disk storage of the node. *

*
*
"Memory"
*
*

* Use the tmpfs volume that's backed by the RAM of the node. Contents of the volume are lost when * the node reboots, and any storage on the volume counts against the container's memory limit. *

*
*
* * @param medium * The medium to store the volume. The default value is an empty string, which uses the storage of the * node.

*
*
""
*
*

* (Default) Use the disk storage of the node. *

*
*
"Memory"
*
*

* Use the tmpfs volume that's backed by the RAM of the node. Contents of the volume are * lost when the node reboots, and any storage on the volume counts against the container's memory limit. *

*
* @return Returns a reference to this object so that method calls can be chained together. */ Builder medium(String medium); /** *

* The maximum size of the volume. By default, there's no maximum size defined. *

* * @param sizeLimit * The maximum size of the volume. By default, there's no maximum size defined. * @return Returns a reference to this object so that method calls can be chained together. */ Builder sizeLimit(String sizeLimit); } static final class BuilderImpl implements Builder { private String medium; private String sizeLimit; private BuilderImpl() { } private BuilderImpl(EksEmptyDir model) { medium(model.medium); sizeLimit(model.sizeLimit); } public final String getMedium() { return medium; } public final void setMedium(String medium) { this.medium = medium; } @Override public final Builder medium(String medium) { this.medium = medium; return this; } public final String getSizeLimit() { return sizeLimit; } public final void setSizeLimit(String sizeLimit) { this.sizeLimit = sizeLimit; } @Override public final Builder sizeLimit(String sizeLimit) { this.sizeLimit = sizeLimit; return this; } @Override public EksEmptyDir build() { return new EksEmptyDir(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy