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

software.amazon.awssdk.services.efs.model.DescribeFileSystemsRequest 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.efs.model;

import java.beans.Transient;
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.awscore.AwsRequestOverrideConfiguration;
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;

/**
 * 

*/ @Generated("software.amazon.awssdk:codegen") public final class DescribeFileSystemsRequest extends EfsRequest implements ToCopyableBuilder { private static final SdkField MAX_ITEMS_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("MaxItems").getter(getter(DescribeFileSystemsRequest::maxItems)).setter(setter(Builder::maxItems)) .traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("MaxItems").build()).build(); private static final SdkField MARKER_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Marker") .getter(getter(DescribeFileSystemsRequest::marker)).setter(setter(Builder::marker)) .traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("Marker").build()).build(); private static final SdkField CREATION_TOKEN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("CreationToken").getter(getter(DescribeFileSystemsRequest::creationToken)) .setter(setter(Builder::creationToken)) .traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("CreationToken").build()).build(); private static final SdkField FILE_SYSTEM_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("FileSystemId").getter(getter(DescribeFileSystemsRequest::fileSystemId)) .setter(setter(Builder::fileSystemId)) .traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("FileSystemId").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(MAX_ITEMS_FIELD, MARKER_FIELD, CREATION_TOKEN_FIELD, FILE_SYSTEM_ID_FIELD)); private final Integer maxItems; private final String marker; private final String creationToken; private final String fileSystemId; private DescribeFileSystemsRequest(BuilderImpl builder) { super(builder); this.maxItems = builder.maxItems; this.marker = builder.marker; this.creationToken = builder.creationToken; this.fileSystemId = builder.fileSystemId; } /** *

* (Optional) Specifies the maximum number of file systems to return in the response (integer). This number is * automatically set to 100. The response is paginated at 100 per page if you have more than 100 file systems. *

* * @return (Optional) Specifies the maximum number of file systems to return in the response (integer). This number * is automatically set to 100. The response is paginated at 100 per page if you have more than 100 file * systems. */ public final Integer maxItems() { return maxItems; } /** *

* (Optional) Opaque pagination token returned from a previous DescribeFileSystems operation (String). * If present, specifies to continue the list from where the returning call had left off. *

* * @return (Optional) Opaque pagination token returned from a previous DescribeFileSystems operation * (String). If present, specifies to continue the list from where the returning call had left off. */ public final String marker() { return marker; } /** *

* (Optional) Restricts the list to the file system with this creation token (String). You specify a creation token * when you create an Amazon EFS file system. *

* * @return (Optional) Restricts the list to the file system with this creation token (String). You specify a * creation token when you create an Amazon EFS file system. */ public final String creationToken() { return creationToken; } /** *

* (Optional) ID of the file system whose description you want to retrieve (String). *

* * @return (Optional) ID of the file system whose description you want to retrieve (String). */ public final String fileSystemId() { return fileSystemId; } @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 + super.hashCode(); hashCode = 31 * hashCode + Objects.hashCode(maxItems()); hashCode = 31 * hashCode + Objects.hashCode(marker()); hashCode = 31 * hashCode + Objects.hashCode(creationToken()); hashCode = 31 * hashCode + Objects.hashCode(fileSystemId()); return hashCode; } @Override public final boolean equals(Object obj) { return super.equals(obj) && equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof DescribeFileSystemsRequest)) { return false; } DescribeFileSystemsRequest other = (DescribeFileSystemsRequest) obj; return Objects.equals(maxItems(), other.maxItems()) && Objects.equals(marker(), other.marker()) && Objects.equals(creationToken(), other.creationToken()) && Objects.equals(fileSystemId(), other.fileSystemId()); } /** * 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("DescribeFileSystemsRequest").add("MaxItems", maxItems()).add("Marker", marker()) .add("CreationToken", creationToken()).add("FileSystemId", fileSystemId()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "MaxItems": return Optional.ofNullable(clazz.cast(maxItems())); case "Marker": return Optional.ofNullable(clazz.cast(marker())); case "CreationToken": return Optional.ofNullable(clazz.cast(creationToken())); case "FileSystemId": return Optional.ofNullable(clazz.cast(fileSystemId())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((DescribeFileSystemsRequest) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends EfsRequest.Builder, SdkPojo, CopyableBuilder { /** *

* (Optional) Specifies the maximum number of file systems to return in the response (integer). This number is * automatically set to 100. The response is paginated at 100 per page if you have more than 100 file systems. *

* * @param maxItems * (Optional) Specifies the maximum number of file systems to return in the response (integer). This * number is automatically set to 100. The response is paginated at 100 per page if you have more than * 100 file systems. * @return Returns a reference to this object so that method calls can be chained together. */ Builder maxItems(Integer maxItems); /** *

* (Optional) Opaque pagination token returned from a previous DescribeFileSystems operation * (String). If present, specifies to continue the list from where the returning call had left off. *

* * @param marker * (Optional) Opaque pagination token returned from a previous DescribeFileSystems operation * (String). If present, specifies to continue the list from where the returning call had left off. * @return Returns a reference to this object so that method calls can be chained together. */ Builder marker(String marker); /** *

* (Optional) Restricts the list to the file system with this creation token (String). You specify a creation * token when you create an Amazon EFS file system. *

* * @param creationToken * (Optional) Restricts the list to the file system with this creation token (String). You specify a * creation token when you create an Amazon EFS file system. * @return Returns a reference to this object so that method calls can be chained together. */ Builder creationToken(String creationToken); /** *

* (Optional) ID of the file system whose description you want to retrieve (String). *

* * @param fileSystemId * (Optional) ID of the file system whose description you want to retrieve (String). * @return Returns a reference to this object so that method calls can be chained together. */ Builder fileSystemId(String fileSystemId); @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends EfsRequest.BuilderImpl implements Builder { private Integer maxItems; private String marker; private String creationToken; private String fileSystemId; private BuilderImpl() { } private BuilderImpl(DescribeFileSystemsRequest model) { super(model); maxItems(model.maxItems); marker(model.marker); creationToken(model.creationToken); fileSystemId(model.fileSystemId); } public final Integer getMaxItems() { return maxItems; } public final void setMaxItems(Integer maxItems) { this.maxItems = maxItems; } @Override @Transient public final Builder maxItems(Integer maxItems) { this.maxItems = maxItems; return this; } public final String getMarker() { return marker; } public final void setMarker(String marker) { this.marker = marker; } @Override @Transient public final Builder marker(String marker) { this.marker = marker; return this; } public final String getCreationToken() { return creationToken; } public final void setCreationToken(String creationToken) { this.creationToken = creationToken; } @Override @Transient public final Builder creationToken(String creationToken) { this.creationToken = creationToken; return this; } public final String getFileSystemId() { return fileSystemId; } public final void setFileSystemId(String fileSystemId) { this.fileSystemId = fileSystemId; } @Override @Transient public final Builder fileSystemId(String fileSystemId) { this.fileSystemId = fileSystemId; return this; } @Override public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) { super.overrideConfiguration(overrideConfiguration); return this; } @Override public Builder overrideConfiguration(Consumer builderConsumer) { super.overrideConfiguration(builderConsumer); return this; } @Override public DescribeFileSystemsRequest build() { return new DescribeFileSystemsRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy