|
| 1 | +/* |
| 2 | + * Copyright 2010-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"). |
| 5 | + * You may not use this file except in compliance with the License. |
| 6 | + * A copy of the License is located at |
| 7 | + * |
| 8 | + * http://aws.amazon.com/apache2.0 |
| 9 | + * |
| 10 | + * or in the "license" file accompanying this file. This file is distributed |
| 11 | + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either |
| 12 | + * express or implied. See the License for the specific language governing |
| 13 | + * permissions and limitations under the License. |
| 14 | + */ |
| 15 | + |
| 16 | +package com.amazonaws.services.rekognition.model; |
| 17 | + |
| 18 | +import java.io.Serializable; |
| 19 | + |
| 20 | +/** |
| 21 | + * <p> |
| 22 | + * Provides face metadata for the faces that are associated to a specific |
| 23 | + * UserID. |
| 24 | + * </p> |
| 25 | + */ |
| 26 | +public class AssociatedFace implements Serializable { |
| 27 | + /** |
| 28 | + * <p> |
| 29 | + * Unique identifier assigned to the face. |
| 30 | + * </p> |
| 31 | + * <p> |
| 32 | + * <b>Constraints:</b><br/> |
| 33 | + * <b>Pattern: |
| 34 | + * </b>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}<br/> |
| 35 | + */ |
| 36 | + private String faceId; |
| 37 | + |
| 38 | + /** |
| 39 | + * <p> |
| 40 | + * Unique identifier assigned to the face. |
| 41 | + * </p> |
| 42 | + * <p> |
| 43 | + * <b>Constraints:</b><br/> |
| 44 | + * <b>Pattern: |
| 45 | + * </b>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}<br/> |
| 46 | + * |
| 47 | + * @return <p> |
| 48 | + * Unique identifier assigned to the face. |
| 49 | + * </p> |
| 50 | + */ |
| 51 | + public String getFaceId() { |
| 52 | + return faceId; |
| 53 | + } |
| 54 | + |
| 55 | + /** |
| 56 | + * <p> |
| 57 | + * Unique identifier assigned to the face. |
| 58 | + * </p> |
| 59 | + * <p> |
| 60 | + * <b>Constraints:</b><br/> |
| 61 | + * <b>Pattern: |
| 62 | + * </b>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}<br/> |
| 63 | + * |
| 64 | + * @param faceId <p> |
| 65 | + * Unique identifier assigned to the face. |
| 66 | + * </p> |
| 67 | + */ |
| 68 | + public void setFaceId(String faceId) { |
| 69 | + this.faceId = faceId; |
| 70 | + } |
| 71 | + |
| 72 | + /** |
| 73 | + * <p> |
| 74 | + * Unique identifier assigned to the face. |
| 75 | + * </p> |
| 76 | + * <p> |
| 77 | + * Returns a reference to this object so that method calls can be chained |
| 78 | + * together. |
| 79 | + * <p> |
| 80 | + * <b>Constraints:</b><br/> |
| 81 | + * <b>Pattern: |
| 82 | + * </b>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}<br/> |
| 83 | + * |
| 84 | + * @param faceId <p> |
| 85 | + * Unique identifier assigned to the face. |
| 86 | + * </p> |
| 87 | + * @return A reference to this updated object so that method calls can be |
| 88 | + * chained together. |
| 89 | + */ |
| 90 | + public AssociatedFace withFaceId(String faceId) { |
| 91 | + this.faceId = faceId; |
| 92 | + return this; |
| 93 | + } |
| 94 | + |
| 95 | + /** |
| 96 | + * Returns a string representation of this object; useful for testing and |
| 97 | + * debugging. |
| 98 | + * |
| 99 | + * @return A string representation of this object. |
| 100 | + * @see java.lang.Object#toString() |
| 101 | + */ |
| 102 | + @Override |
| 103 | + public String toString() { |
| 104 | + StringBuilder sb = new StringBuilder(); |
| 105 | + sb.append("{"); |
| 106 | + if (getFaceId() != null) |
| 107 | + sb.append("FaceId: " + getFaceId()); |
| 108 | + sb.append("}"); |
| 109 | + return sb.toString(); |
| 110 | + } |
| 111 | + |
| 112 | + @Override |
| 113 | + public int hashCode() { |
| 114 | + final int prime = 31; |
| 115 | + int hashCode = 1; |
| 116 | + |
| 117 | + hashCode = prime * hashCode + ((getFaceId() == null) ? 0 : getFaceId().hashCode()); |
| 118 | + return hashCode; |
| 119 | + } |
| 120 | + |
| 121 | + @Override |
| 122 | + public boolean equals(Object obj) { |
| 123 | + if (this == obj) |
| 124 | + return true; |
| 125 | + if (obj == null) |
| 126 | + return false; |
| 127 | + |
| 128 | + if (obj instanceof AssociatedFace == false) |
| 129 | + return false; |
| 130 | + AssociatedFace other = (AssociatedFace) obj; |
| 131 | + |
| 132 | + if (other.getFaceId() == null ^ this.getFaceId() == null) |
| 133 | + return false; |
| 134 | + if (other.getFaceId() != null && other.getFaceId().equals(this.getFaceId()) == false) |
| 135 | + return false; |
| 136 | + return true; |
| 137 | + } |
| 138 | +} |
0 commit comments