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

software.amazon.awssdk.services.location.model.SearchPlaceIndexForSuggestionsRequest Maven / Gradle / Ivy

Go to download

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

There is a newer version: 2.29.17
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.location.model;

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

/**
 */
@Generated("software.amazon.awssdk:codegen")
public final class SearchPlaceIndexForSuggestionsRequest extends LocationRequest implements
        ToCopyableBuilder {
    private static final SdkField> BIAS_POSITION_FIELD = SdkField
            .> builder(MarshallingType.LIST)
            .memberName("BiasPosition")
            .getter(getter(SearchPlaceIndexForSuggestionsRequest::biasPosition))
            .setter(setter(Builder::biasPosition))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("BiasPosition").build(),
                    ListTrait
                            .builder()
                            .memberLocationName(null)
                            .memberFieldInfo(
                                    SdkField. builder(MarshallingType.DOUBLE)
                                            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                                                    .locationName("member").build()).build()).build()).build();

    private static final SdkField> FILTER_B_BOX_FIELD = SdkField
            .> builder(MarshallingType.LIST)
            .memberName("FilterBBox")
            .getter(getter(SearchPlaceIndexForSuggestionsRequest::filterBBox))
            .setter(setter(Builder::filterBBox))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FilterBBox").build(),
                    ListTrait
                            .builder()
                            .memberLocationName(null)
                            .memberFieldInfo(
                                    SdkField. builder(MarshallingType.DOUBLE)
                                            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                                                    .locationName("member").build()).build()).build()).build();

    private static final SdkField> FILTER_COUNTRIES_FIELD = SdkField
            .> builder(MarshallingType.LIST)
            .memberName("FilterCountries")
            .getter(getter(SearchPlaceIndexForSuggestionsRequest::filterCountries))
            .setter(setter(Builder::filterCountries))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FilterCountries").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 INDEX_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("IndexName").getter(getter(SearchPlaceIndexForSuggestionsRequest::indexName))
            .setter(setter(Builder::indexName))
            .traits(LocationTrait.builder().location(MarshallLocation.PATH).locationName("IndexName").build()).build();

    private static final SdkField LANGUAGE_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("Language").getter(getter(SearchPlaceIndexForSuggestionsRequest::language))
            .setter(setter(Builder::language))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Language").build()).build();

    private static final SdkField MAX_RESULTS_FIELD = SdkField. builder(MarshallingType.INTEGER)
            .memberName("MaxResults").getter(getter(SearchPlaceIndexForSuggestionsRequest::maxResults))
            .setter(setter(Builder::maxResults))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MaxResults").build()).build();

    private static final SdkField TEXT_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Text")
            .getter(getter(SearchPlaceIndexForSuggestionsRequest::text)).setter(setter(Builder::text))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Text").build()).build();

    private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(BIAS_POSITION_FIELD,
            FILTER_B_BOX_FIELD, FILTER_COUNTRIES_FIELD, INDEX_NAME_FIELD, LANGUAGE_FIELD, MAX_RESULTS_FIELD, TEXT_FIELD));

    private final List biasPosition;

    private final List filterBBox;

    private final List filterCountries;

    private final String indexName;

    private final String language;

    private final Integer maxResults;

    private final String text;

    private SearchPlaceIndexForSuggestionsRequest(BuilderImpl builder) {
        super(builder);
        this.biasPosition = builder.biasPosition;
        this.filterBBox = builder.filterBBox;
        this.filterCountries = builder.filterCountries;
        this.indexName = builder.indexName;
        this.language = builder.language;
        this.maxResults = builder.maxResults;
        this.text = builder.text;
    }

    /**
     * For responses, this returns true if the service returned a value for the BiasPosition 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 hasBiasPosition() {
        return biasPosition != null && !(biasPosition instanceof SdkAutoConstructList);
    }

    /**
     * 

* An optional parameter that indicates a preference for place suggestions that are closer to a specified position. *

*

* If provided, this parameter must contain a pair of numbers. The first number represents the X coordinate, or * longitude; the second number represents the Y coordinate, or latitude. *

*

* For example, [-123.1174, 49.2847] represents the position with longitude -123.1174 and * latitude 49.2847. *

* *

* BiasPosition and FilterBBox are mutually exclusive. Specifying both options results in * an error. *

*
*

* 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 #hasBiasPosition} method. *

* * @return An optional parameter that indicates a preference for place suggestions that are closer to a specified * position.

*

* If provided, this parameter must contain a pair of numbers. The first number represents the X coordinate, * or longitude; the second number represents the Y coordinate, or latitude. *

*

* For example, [-123.1174, 49.2847] represents the position with longitude * -123.1174 and latitude 49.2847. *

* *

* BiasPosition and FilterBBox are mutually exclusive. Specifying both options * results in an error. *

*/ public final List biasPosition() { return biasPosition; } /** * For responses, this returns true if the service returned a value for the FilterBBox 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 hasFilterBBox() { return filterBBox != null && !(filterBBox instanceof SdkAutoConstructList); } /** *

* An optional parameter that limits the search results by returning only suggestions within a specified bounding * box. *

*

* If provided, this parameter must contain a total of four consecutive numbers in two pairs. The first pair of * numbers represents the X and Y coordinates (longitude and latitude, respectively) of the southwest corner of the * bounding box; the second pair of numbers represents the X and Y coordinates (longitude and latitude, * respectively) of the northeast corner of the bounding box. *

*

* For example, [-12.7935, -37.4835, -12.0684, -36.9542] represents a bounding box where the southwest * corner has longitude -12.7935 and latitude -37.4835, and the northeast corner has * longitude -12.0684 and latitude -36.9542. *

* *

* FilterBBox and BiasPosition are mutually exclusive. Specifying both options results in * an error. *

*
*

* 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 #hasFilterBBox} method. *

* * @return An optional parameter that limits the search results by returning only suggestions within a specified * bounding box.

*

* If provided, this parameter must contain a total of four consecutive numbers in two pairs. The first pair * of numbers represents the X and Y coordinates (longitude and latitude, respectively) of the southwest * corner of the bounding box; the second pair of numbers represents the X and Y coordinates (longitude and * latitude, respectively) of the northeast corner of the bounding box. *

*

* For example, [-12.7935, -37.4835, -12.0684, -36.9542] represents a bounding box where the * southwest corner has longitude -12.7935 and latitude -37.4835, and the * northeast corner has longitude -12.0684 and latitude -36.9542. *

* *

* FilterBBox and BiasPosition are mutually exclusive. Specifying both options * results in an error. *

*/ public final List filterBBox() { return filterBBox; } /** * For responses, this returns true if the service returned a value for the FilterCountries 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 hasFilterCountries() { return filterCountries != null && !(filterCountries instanceof SdkAutoConstructList); } /** *

* An optional parameter that limits the search results by returning only suggestions within the provided list of * countries. *

*
    *
  • *

    * Use the ISO 3166 3-digit country code. For example, * Australia uses three upper-case characters: AUS. *

    *
  • *
*

* 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 #hasFilterCountries} method. *

* * @return An optional parameter that limits the search results by returning only suggestions within the provided * list of countries.

*
    *
  • *

    * Use the ISO 3166 3-digit country code. For * example, Australia uses three upper-case characters: AUS. *

    *
  • */ public final List filterCountries() { return filterCountries; } /** *

    * The name of the place index resource you want to use for the search. *

    * * @return The name of the place index resource you want to use for the search. */ public final String indexName() { return indexName; } /** *

    * The preferred language used to return results. The value must be a valid BCP 47 language tag, for example, en for English. *

    *

    * This setting affects the languages used in the results. It does not change which results are returned. If the * language is not specified, or not supported for a particular result, the partner automatically chooses a language * for the result. *

    *

    * Used only when the partner selected is Here. *

    * * @return The preferred language used to return results. The value must be a valid BCP 47 language tag, for example, en for * English.

    *

    * This setting affects the languages used in the results. It does not change which results are returned. If * the language is not specified, or not supported for a particular result, the partner automatically * chooses a language for the result. *

    *

    * Used only when the partner selected is Here. */ public final String language() { return language; } /** *

    * An optional parameter. The maximum number of results returned per request. *

    *

    * The default: 5 *

    * * @return An optional parameter. The maximum number of results returned per request.

    *

    * The default: 5 */ public final Integer maxResults() { return maxResults; } /** *

    * The free-form partial text to use to generate place suggestions. For example, eiffel tow. *

    * * @return The free-form partial text to use to generate place suggestions. For example, eiffel tow. */ public final String text() { return text; } @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(hasBiasPosition() ? biasPosition() : null); hashCode = 31 * hashCode + Objects.hashCode(hasFilterBBox() ? filterBBox() : null); hashCode = 31 * hashCode + Objects.hashCode(hasFilterCountries() ? filterCountries() : null); hashCode = 31 * hashCode + Objects.hashCode(indexName()); hashCode = 31 * hashCode + Objects.hashCode(language()); hashCode = 31 * hashCode + Objects.hashCode(maxResults()); hashCode = 31 * hashCode + Objects.hashCode(text()); 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 SearchPlaceIndexForSuggestionsRequest)) { return false; } SearchPlaceIndexForSuggestionsRequest other = (SearchPlaceIndexForSuggestionsRequest) obj; return hasBiasPosition() == other.hasBiasPosition() && Objects.equals(biasPosition(), other.biasPosition()) && hasFilterBBox() == other.hasFilterBBox() && Objects.equals(filterBBox(), other.filterBBox()) && hasFilterCountries() == other.hasFilterCountries() && Objects.equals(filterCountries(), other.filterCountries()) && Objects.equals(indexName(), other.indexName()) && Objects.equals(language(), other.language()) && Objects.equals(maxResults(), other.maxResults()) && Objects.equals(text(), other.text()); } /** * 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("SearchPlaceIndexForSuggestionsRequest") .add("BiasPosition", biasPosition() == null ? null : "*** Sensitive Data Redacted ***") .add("FilterBBox", filterBBox() == null ? null : "*** Sensitive Data Redacted ***") .add("FilterCountries", hasFilterCountries() ? filterCountries() : null).add("IndexName", indexName()) .add("Language", language()).add("MaxResults", maxResults()) .add("Text", text() == null ? null : "*** Sensitive Data Redacted ***").build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "BiasPosition": return Optional.ofNullable(clazz.cast(biasPosition())); case "FilterBBox": return Optional.ofNullable(clazz.cast(filterBBox())); case "FilterCountries": return Optional.ofNullable(clazz.cast(filterCountries())); case "IndexName": return Optional.ofNullable(clazz.cast(indexName())); case "Language": return Optional.ofNullable(clazz.cast(language())); case "MaxResults": return Optional.ofNullable(clazz.cast(maxResults())); case "Text": return Optional.ofNullable(clazz.cast(text())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((SearchPlaceIndexForSuggestionsRequest) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends LocationRequest.Builder, SdkPojo, CopyableBuilder { /** *

    * An optional parameter that indicates a preference for place suggestions that are closer to a specified * position. *

    *

    * If provided, this parameter must contain a pair of numbers. The first number represents the X coordinate, or * longitude; the second number represents the Y coordinate, or latitude. *

    *

    * For example, [-123.1174, 49.2847] represents the position with longitude -123.1174 * and latitude 49.2847. *

    * *

    * BiasPosition and FilterBBox are mutually exclusive. Specifying both options results * in an error. *

    *
    * * @param biasPosition * An optional parameter that indicates a preference for place suggestions that are closer to a specified * position.

    *

    * If provided, this parameter must contain a pair of numbers. The first number represents the X * coordinate, or longitude; the second number represents the Y coordinate, or latitude. *

    *

    * For example, [-123.1174, 49.2847] represents the position with longitude * -123.1174 and latitude 49.2847. *

    * *

    * BiasPosition and FilterBBox are mutually exclusive. Specifying both options * results in an error. *

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

    * An optional parameter that indicates a preference for place suggestions that are closer to a specified * position. *

    *

    * If provided, this parameter must contain a pair of numbers. The first number represents the X coordinate, or * longitude; the second number represents the Y coordinate, or latitude. *

    *

    * For example, [-123.1174, 49.2847] represents the position with longitude -123.1174 * and latitude 49.2847. *

    * *

    * BiasPosition and FilterBBox are mutually exclusive. Specifying both options results * in an error. *

    *
    * * @param biasPosition * An optional parameter that indicates a preference for place suggestions that are closer to a specified * position.

    *

    * If provided, this parameter must contain a pair of numbers. The first number represents the X * coordinate, or longitude; the second number represents the Y coordinate, or latitude. *

    *

    * For example, [-123.1174, 49.2847] represents the position with longitude * -123.1174 and latitude 49.2847. *

    * *

    * BiasPosition and FilterBBox are mutually exclusive. Specifying both options * results in an error. *

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

    * An optional parameter that limits the search results by returning only suggestions within a specified * bounding box. *

    *

    * If provided, this parameter must contain a total of four consecutive numbers in two pairs. The first pair of * numbers represents the X and Y coordinates (longitude and latitude, respectively) of the southwest corner of * the bounding box; the second pair of numbers represents the X and Y coordinates (longitude and latitude, * respectively) of the northeast corner of the bounding box. *

    *

    * For example, [-12.7935, -37.4835, -12.0684, -36.9542] represents a bounding box where the * southwest corner has longitude -12.7935 and latitude -37.4835, and the northeast * corner has longitude -12.0684 and latitude -36.9542. *

    * *

    * FilterBBox and BiasPosition are mutually exclusive. Specifying both options results * in an error. *

    *
    * * @param filterBBox * An optional parameter that limits the search results by returning only suggestions within a specified * bounding box.

    *

    * If provided, this parameter must contain a total of four consecutive numbers in two pairs. The first * pair of numbers represents the X and Y coordinates (longitude and latitude, respectively) of the * southwest corner of the bounding box; the second pair of numbers represents the X and Y coordinates * (longitude and latitude, respectively) of the northeast corner of the bounding box. *

    *

    * For example, [-12.7935, -37.4835, -12.0684, -36.9542] represents a bounding box where the * southwest corner has longitude -12.7935 and latitude -37.4835, and the * northeast corner has longitude -12.0684 and latitude -36.9542. *

    * *

    * FilterBBox and BiasPosition are mutually exclusive. Specifying both options * results in an error. *

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

    * An optional parameter that limits the search results by returning only suggestions within a specified * bounding box. *

    *

    * If provided, this parameter must contain a total of four consecutive numbers in two pairs. The first pair of * numbers represents the X and Y coordinates (longitude and latitude, respectively) of the southwest corner of * the bounding box; the second pair of numbers represents the X and Y coordinates (longitude and latitude, * respectively) of the northeast corner of the bounding box. *

    *

    * For example, [-12.7935, -37.4835, -12.0684, -36.9542] represents a bounding box where the * southwest corner has longitude -12.7935 and latitude -37.4835, and the northeast * corner has longitude -12.0684 and latitude -36.9542. *

    * *

    * FilterBBox and BiasPosition are mutually exclusive. Specifying both options results * in an error. *

    *
    * * @param filterBBox * An optional parameter that limits the search results by returning only suggestions within a specified * bounding box.

    *

    * If provided, this parameter must contain a total of four consecutive numbers in two pairs. The first * pair of numbers represents the X and Y coordinates (longitude and latitude, respectively) of the * southwest corner of the bounding box; the second pair of numbers represents the X and Y coordinates * (longitude and latitude, respectively) of the northeast corner of the bounding box. *

    *

    * For example, [-12.7935, -37.4835, -12.0684, -36.9542] represents a bounding box where the * southwest corner has longitude -12.7935 and latitude -37.4835, and the * northeast corner has longitude -12.0684 and latitude -36.9542. *

    * *

    * FilterBBox and BiasPosition are mutually exclusive. Specifying both options * results in an error. *

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

    * An optional parameter that limits the search results by returning only suggestions within the provided list * of countries. *

    *
      *
    • *

      * Use the ISO 3166 3-digit country code. For * example, Australia uses three upper-case characters: AUS. *

      *
    • *
    * * @param filterCountries * An optional parameter that limits the search results by returning only suggestions within the provided * list of countries.

    *
      *
    • *

      * Use the ISO 3166 3-digit country code. * For example, Australia uses three upper-case characters: AUS. *

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

      * An optional parameter that limits the search results by returning only suggestions within the provided list * of countries. *

      *
        *
      • *

        * Use the ISO 3166 3-digit country code. For * example, Australia uses three upper-case characters: AUS. *

        *
      • *
      * * @param filterCountries * An optional parameter that limits the search results by returning only suggestions within the provided * list of countries.

      *
        *
      • *

        * Use the ISO 3166 3-digit country code. * For example, Australia uses three upper-case characters: AUS. *

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

        * The name of the place index resource you want to use for the search. *

        * * @param indexName * The name of the place index resource you want to use for the search. * @return Returns a reference to this object so that method calls can be chained together. */ Builder indexName(String indexName); /** *

        * The preferred language used to return results. The value must be a valid BCP 47 language tag, for example, en for English. *

        *

        * This setting affects the languages used in the results. It does not change which results are returned. If the * language is not specified, or not supported for a particular result, the partner automatically chooses a * language for the result. *

        *

        * Used only when the partner selected is Here. *

        * * @param language * The preferred language used to return results. The value must be a valid BCP 47 language tag, for example, en for * English.

        *

        * This setting affects the languages used in the results. It does not change which results are returned. * If the language is not specified, or not supported for a particular result, the partner automatically * chooses a language for the result. *

        *

        * Used only when the partner selected is Here. * @return Returns a reference to this object so that method calls can be chained together. */ Builder language(String language); /** *

        * An optional parameter. The maximum number of results returned per request. *

        *

        * The default: 5 *

        * * @param maxResults * An optional parameter. The maximum number of results returned per request.

        *

        * The default: 5 * @return Returns a reference to this object so that method calls can be chained together. */ Builder maxResults(Integer maxResults); /** *

        * The free-form partial text to use to generate place suggestions. For example, eiffel tow. *

        * * @param text * The free-form partial text to use to generate place suggestions. For example, eiffel tow. * @return Returns a reference to this object so that method calls can be chained together. */ Builder text(String text); @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends LocationRequest.BuilderImpl implements Builder { private List biasPosition = DefaultSdkAutoConstructList.getInstance(); private List filterBBox = DefaultSdkAutoConstructList.getInstance(); private List filterCountries = DefaultSdkAutoConstructList.getInstance(); private String indexName; private String language; private Integer maxResults; private String text; private BuilderImpl() { } private BuilderImpl(SearchPlaceIndexForSuggestionsRequest model) { super(model); biasPosition(model.biasPosition); filterBBox(model.filterBBox); filterCountries(model.filterCountries); indexName(model.indexName); language(model.language); maxResults(model.maxResults); text(model.text); } public final Collection getBiasPosition() { if (biasPosition instanceof SdkAutoConstructList) { return null; } return biasPosition; } public final void setBiasPosition(Collection biasPosition) { this.biasPosition = PositionCopier.copy(biasPosition); } @Override @Transient public final Builder biasPosition(Collection biasPosition) { this.biasPosition = PositionCopier.copy(biasPosition); return this; } @Override @Transient @SafeVarargs public final Builder biasPosition(Double... biasPosition) { biasPosition(Arrays.asList(biasPosition)); return this; } public final Collection getFilterBBox() { if (filterBBox instanceof SdkAutoConstructList) { return null; } return filterBBox; } public final void setFilterBBox(Collection filterBBox) { this.filterBBox = BoundingBoxCopier.copy(filterBBox); } @Override @Transient public final Builder filterBBox(Collection filterBBox) { this.filterBBox = BoundingBoxCopier.copy(filterBBox); return this; } @Override @Transient @SafeVarargs public final Builder filterBBox(Double... filterBBox) { filterBBox(Arrays.asList(filterBBox)); return this; } public final Collection getFilterCountries() { if (filterCountries instanceof SdkAutoConstructList) { return null; } return filterCountries; } public final void setFilterCountries(Collection filterCountries) { this.filterCountries = CountryCodeListCopier.copy(filterCountries); } @Override @Transient public final Builder filterCountries(Collection filterCountries) { this.filterCountries = CountryCodeListCopier.copy(filterCountries); return this; } @Override @Transient @SafeVarargs public final Builder filterCountries(String... filterCountries) { filterCountries(Arrays.asList(filterCountries)); return this; } public final String getIndexName() { return indexName; } public final void setIndexName(String indexName) { this.indexName = indexName; } @Override @Transient public final Builder indexName(String indexName) { this.indexName = indexName; return this; } public final String getLanguage() { return language; } public final void setLanguage(String language) { this.language = language; } @Override @Transient public final Builder language(String language) { this.language = language; return this; } public final Integer getMaxResults() { return maxResults; } public final void setMaxResults(Integer maxResults) { this.maxResults = maxResults; } @Override @Transient public final Builder maxResults(Integer maxResults) { this.maxResults = maxResults; return this; } public final String getText() { return text; } public final void setText(String text) { this.text = text; } @Override @Transient public final Builder text(String text) { this.text = text; 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 SearchPlaceIndexForSuggestionsRequest build() { return new SearchPlaceIndexForSuggestionsRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy