/* * 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 a vector data tile from the map resource. Map tiles are used by * clients to render a map. they're addressed using a grid arrangement with an X * coordinate, Y coordinate, and Z (zoom) level. *

*

* The origin (0, 0) is the top left of the map. Increasing the zoom level by 1 * doubles both the X and Y dimensions, so a tile containing data for the entire * world at (0/0/0) will be split into 4 tiles at zoom 1 (1/0/0, 1/0/1, 1/1/0, * 1/1/1). *

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

* The optional API key to authorize the request. *

*

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

* The map resource to retrieve the map tiles from. *

*

* Constraints:
* Length: 1 - 100
* Pattern: ^[-._\w]+$
*/ private String mapName; /** *

* The X axis value for the map tile. *

*

* Constraints:
* Pattern: \d+
*/ private String x; /** *

* The Y axis value for the map tile. *

*

* Constraints:
* Pattern: \d+
*/ private String y; /** *

* The zoom value for the map tile. *

*

* Constraints:
* Pattern: \d+
*/ private String z; /** *

* 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 GetMapTileRequest withKey(String key) { this.key = key; return this; } /** *

* The map resource to retrieve the map tiles from. *

*

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

* The map resource to retrieve the map tiles from. *

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

* The map resource to retrieve the map tiles from. *

*

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

* The map resource to retrieve the map tiles from. *

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

* The map resource to retrieve the map tiles from. *

*

* 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 to retrieve the map tiles from. *

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

* The X axis value for the map tile. *

*

* Constraints:
* Pattern: \d+
* * @return

* The X axis value for the map tile. *

*/ public String getX() { return x; } /** *

* The X axis value for the map tile. *

*

* Constraints:
* Pattern: \d+
* * @param x

* The X axis value for the map tile. *

*/ public void setX(String x) { this.x = x; } /** *

* The X axis value for the map tile. *

*

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

* Constraints:
* Pattern: \d+
* * @param x

* The X axis value for the map tile. *

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

* The Y axis value for the map tile. *

*

* Constraints:
* Pattern: \d+
* * @return

* The Y axis value for the map tile. *

*/ public String getY() { return y; } /** *

* The Y axis value for the map tile. *

*

* Constraints:
* Pattern: \d+
* * @param y

* The Y axis value for the map tile. *

*/ public void setY(String y) { this.y = y; } /** *

* The Y axis value for the map tile. *

*

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

* Constraints:
* Pattern: \d+
* * @param y

* The Y axis value for the map tile. *

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

* The zoom value for the map tile. *

*

* Constraints:
* Pattern: \d+
* * @return

* The zoom value for the map tile. *

*/ public String getZ() { return z; } /** *

* The zoom value for the map tile. *

*

* Constraints:
* Pattern: \d+
* * @param z

* The zoom value for the map tile. *

*/ public void setZ(String z) { this.z = z; } /** *

* The zoom value for the map tile. *

*

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

* Constraints:
* Pattern: \d+
* * @param z

* The zoom value for the map tile. *

* @return A reference to this updated object so that method calls can be * chained together. */ public GetMapTileRequest withZ(String z) { this.z = z; 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 (getKey() != null) sb.append("Key: " + getKey() + ","); if (getMapName() != null) sb.append("MapName: " + getMapName() + ","); if (getX() != null) sb.append("X: " + getX() + ","); if (getY() != null) sb.append("Y: " + getY() + ","); if (getZ() != null) sb.append("Z: " + getZ()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getKey() == null) ? 0 : getKey().hashCode()); hashCode = prime * hashCode + ((getMapName() == null) ? 0 : getMapName().hashCode()); hashCode = prime * hashCode + ((getX() == null) ? 0 : getX().hashCode()); hashCode = prime * hashCode + ((getY() == null) ? 0 : getY().hashCode()); hashCode = prime * hashCode + ((getZ() == null) ? 0 : getZ().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetMapTileRequest == false) return false; GetMapTileRequest other = (GetMapTileRequest) obj; 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; if (other.getX() == null ^ this.getX() == null) return false; if (other.getX() != null && other.getX().equals(this.getX()) == false) return false; if (other.getY() == null ^ this.getY() == null) return false; if (other.getY() != null && other.getY().equals(this.getY()) == false) return false; if (other.getZ() == null ^ this.getZ() == null) return false; if (other.getZ() != null && other.getZ().equals(this.getZ()) == false) return false; return true; } }