/* * 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 the sprite sheet corresponding to a map resource. The sprite sheet * is a PNG image paired with a JSON document describing the offsets of * individual icons that will be displayed on a rendered map. *

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

* The name of the sprite file. Use the following file names for the sprite * sheet: *

* *

* For the JSON document containing image offsets. Use the following file * names: *

* *

* Constraints:
* Pattern: ^sprites(@2x)?\.(png|json)$
*/ private String fileName; /** *

* The optional API key to authorize the request. *

*

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

* The map resource associated with the sprite file. *

*

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

* The name of the sprite file. Use the following file names for the sprite * sheet: *

* *

* For the JSON document containing image offsets. Use the following file * names: *

* *

* Constraints:
* Pattern: ^sprites(@2x)?\.(png|json)$
* * @return

* The name of the sprite file. Use the following file names for the * sprite sheet: *

* *

* For the JSON document containing image offsets. Use the following * file names: *

* */ public String getFileName() { return fileName; } /** *

* The name of the sprite file. Use the following file names for the sprite * sheet: *

* *

* For the JSON document containing image offsets. Use the following file * names: *

* *

* Constraints:
* Pattern: ^sprites(@2x)?\.(png|json)$
* * @param fileName

* The name of the sprite file. Use the following file names for * the sprite sheet: *

* *

* For the JSON document containing image offsets. Use the * following file names: *

* */ public void setFileName(String fileName) { this.fileName = fileName; } /** *

* The name of the sprite file. Use the following file names for the sprite * sheet: *

* *

* For the JSON document containing image offsets. Use the following file * names: *

* *

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

* Constraints:
* Pattern: ^sprites(@2x)?\.(png|json)$
* * @param fileName

* The name of the sprite file. Use the following file names for * the sprite sheet: *

* *

* For the JSON document containing image offsets. Use the * following file names: *

* * @return A reference to this updated object so that method calls can be * chained together. */ public GetMapSpritesRequest withFileName(String fileName) { this.fileName = fileName; 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 GetMapSpritesRequest withKey(String key) { this.key = key; return this; } /** *

* The map resource associated with the sprite file. *

*

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

* The map resource associated with the sprite file. *

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

* The map resource associated with the sprite file. *

*

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

* The map resource associated with the sprite file. *

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

* The map resource associated with the sprite 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 sprite file. *

* @return A reference to this updated object so that method calls can be * chained together. */ public GetMapSpritesRequest 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 (getFileName() != null) sb.append("FileName: " + getFileName() + ","); 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 + ((getFileName() == null) ? 0 : getFileName().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 GetMapSpritesRequest == false) return false; GetMapSpritesRequest other = (GetMapSpritesRequest) obj; if (other.getFileName() == null ^ this.getFileName() == null) return false; if (other.getFileName() != null && other.getFileName().equals(this.getFileName()) == 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; } }