/* * Copyright 2010-2023 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 com.amazonaws.services.geo.model; import java.io.Serializable; import com.amazonaws.AmazonWebServiceRequest; /** *

* Retrieves glyphs used to display labels on a map. *

*/ public class GetMapGlyphsRequest extends AmazonWebServiceRequest implements Serializable { /** *

* 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: *

* *

* Valid font stacks for HERE Technologies styles: *

* *

* Valid font stacks for GrabMaps styles: *

* *

* Valid font stacks for Open Data styles: *

* * *

* The fonts used by the Open Data map styles are combined fonts that use * Amazon Ember for most glyphs but Noto Sans for * glyphs unsupported by Amazon Ember. *

*
*/ private String 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. *

*

* Constraints:
* Pattern: ^[0-9]+-[0-9]+\.pbf$
*/ private String fontUnicodeRange; /** *

* The optional API key to authorize the request. *

*

* Constraints:
* Length: 0 - 1000
*/ private String key; /** *

* The map resource associated with the glyph file. *

*

* Constraints:
* Length: 1 - 100
* Pattern: ^[-._\w]+$
*/ private String 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: *

* *

* Valid font stacks for HERE Technologies styles: *

* *

* Valid font stacks for GrabMaps styles: *

* *

* Valid font stacks for Open Data styles: *

* * *

* The fonts used by the Open Data map styles are combined fonts that use * Amazon Ember for most glyphs but Noto Sans for * glyphs unsupported by Amazon Ember. *

*
* * @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: *

* *

* Valid font stacks for HERE Technologies styles: *

* *

* Valid font stacks for GrabMaps styles: *

* *

* Valid font stacks for Open Data styles: *

* * *

* The fonts used by the Open Data map styles are combined fonts * that use Amazon Ember for most glyphs but * Noto Sans for glyphs unsupported by * Amazon Ember. *

*
*/ public String getFontStack() { return fontStack; } /** *

* 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: *

* *

* Valid font stacks for HERE Technologies styles: *

* *

* Valid font stacks for GrabMaps styles: *

* *

* Valid font stacks for Open Data styles: *

* * *

* The fonts used by the Open Data map styles are combined fonts that use * Amazon Ember for most glyphs but Noto Sans for * glyphs unsupported by Amazon Ember. *

*
* * @param fontStack

* 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: *

* *

* Valid font stacks for HERE Technologies styles: *

* *

* Valid font stacks for GrabMaps styles: *

* *

* Valid font stacks for Open Data styles: *

* * *

* The fonts used by the Open Data map styles are combined fonts * that use Amazon Ember for most glyphs but * Noto Sans for glyphs unsupported by * Amazon Ember. *

*
*/ public void setFontStack(String fontStack) { this.fontStack = fontStack; } /** *

* 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: *

* *

* Valid font stacks for HERE Technologies styles: *

* *

* Valid font stacks for GrabMaps styles: *

* *

* Valid font stacks for Open Data styles: *

* * *

* The fonts used by the Open Data map styles are combined fonts that use * Amazon Ember for most glyphs but Noto Sans for * glyphs unsupported by Amazon Ember. *

*
*

* Returns a reference to this object so that method calls can be chained * together. * * @param fontStack

* 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: *

* *

* Valid font stacks for HERE Technologies styles: *

* *

* Valid font stacks for GrabMaps styles: *

* *

* Valid font stacks for Open Data styles: *

* * *

* The fonts used by the Open Data map styles are combined fonts * that use Amazon Ember for most glyphs but * Noto Sans for glyphs unsupported by * Amazon Ember. *

*
* @return A reference to this updated object so that method calls can be * chained together. */ public GetMapGlyphsRequest withFontStack(String fontStack) { this.fontStack = fontStack; return this; } /** *

* 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. *

*

* Constraints:
* Pattern: ^[0-9]+-[0-9]+\.pbf$
* * @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 String getFontUnicodeRange() { return fontUnicodeRange; } /** *

* 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. *

*

* Constraints:
* Pattern: ^[0-9]+-[0-9]+\.pbf$
* * @param fontUnicodeRange

* 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 void setFontUnicodeRange(String fontUnicodeRange) { this.fontUnicodeRange = fontUnicodeRange; } /** *

* 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. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Pattern: ^[0-9]+-[0-9]+\.pbf$
* * @param fontUnicodeRange

* 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 reference to this updated object so that method calls can be * chained together. */ public GetMapGlyphsRequest withFontUnicodeRange(String fontUnicodeRange) { this.fontUnicodeRange = fontUnicodeRange; return this; } /** *

* The optional API key to authorize the request. *

*

* Constraints:
* Length: 0 - 1000
* * @return

* The optional API key to authorize the request. *

*/ public String getKey() { return key; } /** *

* The optional API key to authorize the request. *

*

* Constraints:
* Length: 0 - 1000
* * @param key

* The optional API key to authorize the request. *

*/ public void setKey(String key) { this.key = key; } /** *

* The optional API key to authorize the request. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 0 - 1000
* * @param key

* The optional API key to authorize the request. *

* @return A reference to this updated object so that method calls can be * chained together. */ public GetMapGlyphsRequest withKey(String key) { this.key = key; return this; } /** *

* The map resource associated with the glyph file. *

*

* Constraints:
* Length: 1 - 100
* Pattern: ^[-._\w]+$
* * @return

* The map resource associated with the glyph file. *

*/ public String getMapName() { return mapName; } /** *

* The map resource associated with the glyph file. *

*

* Constraints:
* Length: 1 - 100
* Pattern: ^[-._\w]+$
* * @param mapName

* The map resource associated with the glyph file. *

*/ public void setMapName(String mapName) { this.mapName = mapName; } /** *

* The map resource associated with the glyph file. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 1 - 100
* Pattern: ^[-._\w]+$
* * @param mapName

* The map resource associated with the glyph file. *

* @return A reference to this updated object so that method calls can be * chained together. */ public GetMapGlyphsRequest withMapName(String mapName) { this.mapName = mapName; return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getFontStack() != null) sb.append("FontStack: " + getFontStack() + ","); if (getFontUnicodeRange() != null) sb.append("FontUnicodeRange: " + getFontUnicodeRange() + ","); if (getKey() != null) sb.append("Key: " + getKey() + ","); if (getMapName() != null) sb.append("MapName: " + getMapName()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFontStack() == null) ? 0 : getFontStack().hashCode()); hashCode = prime * hashCode + ((getFontUnicodeRange() == null) ? 0 : getFontUnicodeRange().hashCode()); hashCode = prime * hashCode + ((getKey() == null) ? 0 : getKey().hashCode()); hashCode = prime * hashCode + ((getMapName() == null) ? 0 : getMapName().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetMapGlyphsRequest == false) return false; GetMapGlyphsRequest other = (GetMapGlyphsRequest) obj; if (other.getFontStack() == null ^ this.getFontStack() == null) return false; if (other.getFontStack() != null && other.getFontStack().equals(this.getFontStack()) == false) return false; if (other.getFontUnicodeRange() == null ^ this.getFontUnicodeRange() == null) return false; if (other.getFontUnicodeRange() != null && other.getFontUnicodeRange().equals(this.getFontUnicodeRange()) == false) return false; if (other.getKey() == null ^ this.getKey() == null) return false; if (other.getKey() != null && other.getKey().equals(this.getKey()) == false) return false; if (other.getMapName() == null ^ this.getMapName() == null) return false; if (other.getMapName() != null && other.getMapName().equals(this.getMapName()) == false) return false; return true; } }