software.amazon.awssdk.services.location.model.GetMapGlyphsRequest 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.location.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 GetMapGlyphsRequest extends LocationRequest implements
ToCopyableBuilder {
private static final SdkField FONT_STACK_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("FontStack").getter(getter(GetMapGlyphsRequest::fontStack)).setter(setter(Builder::fontStack))
.traits(LocationTrait.builder().location(MarshallLocation.PATH).locationName("FontStack").build()).build();
private static final SdkField FONT_UNICODE_RANGE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("FontUnicodeRange").getter(getter(GetMapGlyphsRequest::fontUnicodeRange))
.setter(setter(Builder::fontUnicodeRange))
.traits(LocationTrait.builder().location(MarshallLocation.PATH).locationName("FontUnicodeRange").build()).build();
private static final SdkField MAP_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("MapName").getter(getter(GetMapGlyphsRequest::mapName)).setter(setter(Builder::mapName))
.traits(LocationTrait.builder().location(MarshallLocation.PATH).locationName("MapName").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(FONT_STACK_FIELD,
FONT_UNICODE_RANGE_FIELD, MAP_NAME_FIELD));
private final String fontStack;
private final String fontUnicodeRange;
private final String mapName;
private GetMapGlyphsRequest(BuilderImpl builder) {
super(builder);
this.fontStack = builder.fontStack;
this.fontUnicodeRange = builder.fontUnicodeRange;
this.mapName = builder.mapName;
}
/**
*
* A comma-separated list of fonts to load glyphs from in order of preference. For example,
* Noto Sans Regular, Arial Unicode
.
*
*
* Valid fonts stacks for Esri
* styles:
*
*
* -
*
* VectorEsriDarkGrayCanvas – Ubuntu Medium Italic
| Ubuntu Medium
|
* Ubuntu Italic
| Ubuntu Regular
| Ubuntu Bold
*
*
* -
*
* VectorEsriLightGrayCanvas – Ubuntu Italic
| Ubuntu Regular
| Ubuntu Light
* | Ubuntu Bold
*
*
* -
*
* VectorEsriTopographic – Noto Sans Italic
| Noto Sans Regular
|
* Noto Sans Bold
| Noto Serif Regular
| Roboto Condensed Light Italic
*
*
* -
*
* VectorEsriStreets – Arial Regular
| Arial Italic
| Arial Bold
*
*
* -
*
* VectorEsriNavigation – Arial Regular
| Arial Italic
| Arial Bold
*
*
*
*
* Valid font stacks for HERE
* Technologies styles:
*
*
* -
*
* VectorHereBerlin – Fira GO Regular
| Fira GO Bold
*
*
*
*
* @return A comma-separated list of fonts to load glyphs from in order of preference. For example,
* Noto Sans Regular, Arial Unicode
.
*
* Valid fonts stacks for Esri styles:
*
*
* -
*
* VectorEsriDarkGrayCanvas – Ubuntu Medium Italic
| Ubuntu Medium
|
* Ubuntu Italic
| Ubuntu Regular
| Ubuntu Bold
*
*
* -
*
* VectorEsriLightGrayCanvas – Ubuntu Italic
| Ubuntu Regular
|
* Ubuntu Light
| Ubuntu Bold
*
*
* -
*
* VectorEsriTopographic – Noto Sans Italic
| Noto Sans Regular
|
* Noto Sans Bold
| Noto Serif Regular
|
* Roboto Condensed Light Italic
*
*
* -
*
* VectorEsriStreets – Arial Regular
| Arial Italic
| Arial Bold
*
*
* -
*
* VectorEsriNavigation – Arial Regular
| Arial Italic
| Arial Bold
*
*
*
*
* Valid font stacks for HERE
* Technologies styles:
*
*
* -
*
* VectorHereBerlin – Fira GO Regular
| Fira GO Bold
*
*
*/
public final String fontStack() {
return fontStack;
}
/**
*
* A Unicode range of characters to download glyphs for. Each response will contain 256 characters. For example,
* 0–255 includes all characters from range U+0000
to 00FF
. Must be aligned to multiples
* of 256.
*
*
* @return A Unicode range of characters to download glyphs for. Each response will contain 256 characters. For
* example, 0–255 includes all characters from range U+0000
to 00FF
. Must be
* aligned to multiples of 256.
*/
public final String fontUnicodeRange() {
return fontUnicodeRange;
}
/**
*
* The map resource associated with the glyph file.
*
*
* @return The map resource associated with the glyph file.
*/
public final String mapName() {
return mapName;
}
@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 + super.hashCode();
hashCode = 31 * hashCode + Objects.hashCode(fontStack());
hashCode = 31 * hashCode + Objects.hashCode(fontUnicodeRange());
hashCode = 31 * hashCode + Objects.hashCode(mapName());
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 GetMapGlyphsRequest)) {
return false;
}
GetMapGlyphsRequest other = (GetMapGlyphsRequest) obj;
return Objects.equals(fontStack(), other.fontStack()) && Objects.equals(fontUnicodeRange(), other.fontUnicodeRange())
&& Objects.equals(mapName(), other.mapName());
}
/**
* 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("GetMapGlyphsRequest").add("FontStack", fontStack()).add("FontUnicodeRange", fontUnicodeRange())
.add("MapName", mapName()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "FontStack":
return Optional.ofNullable(clazz.cast(fontStack()));
case "FontUnicodeRange":
return Optional.ofNullable(clazz.cast(fontUnicodeRange()));
case "MapName":
return Optional.ofNullable(clazz.cast(mapName()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function