PageRenderTime 27ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/aws-android-sdk-cognitoidentityprovider/src/main/java/com/amazonaws/services/cognitoidentityprovider/model/ConfirmForgotPasswordRequest.java

https://gitlab.com/github-cloud-corp/aws-sdk-android
Java | 478 lines | 122 code | 29 blank | 327 comment | 56 complexity | 26052a798d6573185034f47faac804ec MD5 | raw file
  1. /*
  2. * Copyright 2010-2016 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. package com.amazonaws.services.cognitoidentityprovider.model;
  16. import java.io.Serializable;
  17. import com.amazonaws.AmazonWebServiceRequest;
  18. /**
  19. * <p>
  20. * Allows a user to enter a code provided when they reset their password to
  21. * update their password.
  22. * </p>
  23. */
  24. public class ConfirmForgotPasswordRequest extends AmazonWebServiceRequest implements Serializable {
  25. /**
  26. * <p>
  27. * The ID of the client associated with the user pool.
  28. * </p>
  29. * <p>
  30. * <b>Constraints:</b><br/>
  31. * <b>Length: </b>1 - 128<br/>
  32. * <b>Pattern: </b>[\w+]+<br/>
  33. */
  34. private String clientId;
  35. /**
  36. * <p>
  37. * A keyed-hash message authentication code (HMAC) calculated using the
  38. * secret key of a user pool client and username plus the client ID in the
  39. * message.
  40. * </p>
  41. * <p>
  42. * <b>Constraints:</b><br/>
  43. * <b>Length: </b>1 - 128<br/>
  44. * <b>Pattern: </b>[\w+=/]+<br/>
  45. */
  46. private String secretHash;
  47. /**
  48. * <p>
  49. * The user name of the user for whom you want to enter a code to retrieve a
  50. * forgotten password.
  51. * </p>
  52. * <p>
  53. * <b>Constraints:</b><br/>
  54. * <b>Length: </b>1 - 128<br/>
  55. * <b>Pattern: </b>[\p{L}\p{M}\p{S}\p{N}\p{P}]+<br/>
  56. */
  57. private String username;
  58. /**
  59. * <p>
  60. * The confirmation code sent by a user's request to retrieve a forgotten
  61. * password.
  62. * </p>
  63. * <p>
  64. * <b>Constraints:</b><br/>
  65. * <b>Length: </b>1 - 2048<br/>
  66. * <b>Pattern: </b>[\S]+<br/>
  67. */
  68. private String confirmationCode;
  69. /**
  70. * <p>
  71. * The password sent by sent by a user's request to retrieve a forgotten
  72. * password.
  73. * </p>
  74. * <p>
  75. * <b>Constraints:</b><br/>
  76. * <b>Length: </b>6 - 256<br/>
  77. * <b>Pattern: </b>[\S]+<br/>
  78. */
  79. private String password;
  80. /**
  81. * <p>
  82. * The ID of the client associated with the user pool.
  83. * </p>
  84. * <p>
  85. * <b>Constraints:</b><br/>
  86. * <b>Length: </b>1 - 128<br/>
  87. * <b>Pattern: </b>[\w+]+<br/>
  88. *
  89. * @return <p>
  90. * The ID of the client associated with the user pool.
  91. * </p>
  92. */
  93. public String getClientId() {
  94. return clientId;
  95. }
  96. /**
  97. * <p>
  98. * The ID of the client associated with the user pool.
  99. * </p>
  100. * <p>
  101. * <b>Constraints:</b><br/>
  102. * <b>Length: </b>1 - 128<br/>
  103. * <b>Pattern: </b>[\w+]+<br/>
  104. *
  105. * @param clientId <p>
  106. * The ID of the client associated with the user pool.
  107. * </p>
  108. */
  109. public void setClientId(String clientId) {
  110. this.clientId = clientId;
  111. }
  112. /**
  113. * <p>
  114. * The ID of the client associated with the user pool.
  115. * </p>
  116. * <p>
  117. * Returns a reference to this object so that method calls can be chained
  118. * together.
  119. * <p>
  120. * <b>Constraints:</b><br/>
  121. * <b>Length: </b>1 - 128<br/>
  122. * <b>Pattern: </b>[\w+]+<br/>
  123. *
  124. * @param clientId <p>
  125. * The ID of the client associated with the user pool.
  126. * </p>
  127. * @return A reference to this updated object so that method calls can be
  128. * chained together.
  129. */
  130. public ConfirmForgotPasswordRequest withClientId(String clientId) {
  131. this.clientId = clientId;
  132. return this;
  133. }
  134. /**
  135. * <p>
  136. * A keyed-hash message authentication code (HMAC) calculated using the
  137. * secret key of a user pool client and username plus the client ID in the
  138. * message.
  139. * </p>
  140. * <p>
  141. * <b>Constraints:</b><br/>
  142. * <b>Length: </b>1 - 128<br/>
  143. * <b>Pattern: </b>[\w+=/]+<br/>
  144. *
  145. * @return <p>
  146. * A keyed-hash message authentication code (HMAC) calculated using
  147. * the secret key of a user pool client and username plus the client
  148. * ID in the message.
  149. * </p>
  150. */
  151. public String getSecretHash() {
  152. return secretHash;
  153. }
  154. /**
  155. * <p>
  156. * A keyed-hash message authentication code (HMAC) calculated using the
  157. * secret key of a user pool client and username plus the client ID in the
  158. * message.
  159. * </p>
  160. * <p>
  161. * <b>Constraints:</b><br/>
  162. * <b>Length: </b>1 - 128<br/>
  163. * <b>Pattern: </b>[\w+=/]+<br/>
  164. *
  165. * @param secretHash <p>
  166. * A keyed-hash message authentication code (HMAC) calculated
  167. * using the secret key of a user pool client and username plus
  168. * the client ID in the message.
  169. * </p>
  170. */
  171. public void setSecretHash(String secretHash) {
  172. this.secretHash = secretHash;
  173. }
  174. /**
  175. * <p>
  176. * A keyed-hash message authentication code (HMAC) calculated using the
  177. * secret key of a user pool client and username plus the client ID in the
  178. * message.
  179. * </p>
  180. * <p>
  181. * Returns a reference to this object so that method calls can be chained
  182. * together.
  183. * <p>
  184. * <b>Constraints:</b><br/>
  185. * <b>Length: </b>1 - 128<br/>
  186. * <b>Pattern: </b>[\w+=/]+<br/>
  187. *
  188. * @param secretHash <p>
  189. * A keyed-hash message authentication code (HMAC) calculated
  190. * using the secret key of a user pool client and username plus
  191. * the client ID in the message.
  192. * </p>
  193. * @return A reference to this updated object so that method calls can be
  194. * chained together.
  195. */
  196. public ConfirmForgotPasswordRequest withSecretHash(String secretHash) {
  197. this.secretHash = secretHash;
  198. return this;
  199. }
  200. /**
  201. * <p>
  202. * The user name of the user for whom you want to enter a code to retrieve a
  203. * forgotten password.
  204. * </p>
  205. * <p>
  206. * <b>Constraints:</b><br/>
  207. * <b>Length: </b>1 - 128<br/>
  208. * <b>Pattern: </b>[\p{L}\p{M}\p{S}\p{N}\p{P}]+<br/>
  209. *
  210. * @return <p>
  211. * The user name of the user for whom you want to enter a code to
  212. * retrieve a forgotten password.
  213. * </p>
  214. */
  215. public String getUsername() {
  216. return username;
  217. }
  218. /**
  219. * <p>
  220. * The user name of the user for whom you want to enter a code to retrieve a
  221. * forgotten password.
  222. * </p>
  223. * <p>
  224. * <b>Constraints:</b><br/>
  225. * <b>Length: </b>1 - 128<br/>
  226. * <b>Pattern: </b>[\p{L}\p{M}\p{S}\p{N}\p{P}]+<br/>
  227. *
  228. * @param username <p>
  229. * The user name of the user for whom you want to enter a code to
  230. * retrieve a forgotten password.
  231. * </p>
  232. */
  233. public void setUsername(String username) {
  234. this.username = username;
  235. }
  236. /**
  237. * <p>
  238. * The user name of the user for whom you want to enter a code to retrieve a
  239. * forgotten password.
  240. * </p>
  241. * <p>
  242. * Returns a reference to this object so that method calls can be chained
  243. * together.
  244. * <p>
  245. * <b>Constraints:</b><br/>
  246. * <b>Length: </b>1 - 128<br/>
  247. * <b>Pattern: </b>[\p{L}\p{M}\p{S}\p{N}\p{P}]+<br/>
  248. *
  249. * @param username <p>
  250. * The user name of the user for whom you want to enter a code to
  251. * retrieve a forgotten password.
  252. * </p>
  253. * @return A reference to this updated object so that method calls can be
  254. * chained together.
  255. */
  256. public ConfirmForgotPasswordRequest withUsername(String username) {
  257. this.username = username;
  258. return this;
  259. }
  260. /**
  261. * <p>
  262. * The confirmation code sent by a user's request to retrieve a forgotten
  263. * password.
  264. * </p>
  265. * <p>
  266. * <b>Constraints:</b><br/>
  267. * <b>Length: </b>1 - 2048<br/>
  268. * <b>Pattern: </b>[\S]+<br/>
  269. *
  270. * @return <p>
  271. * The confirmation code sent by a user's request to retrieve a
  272. * forgotten password.
  273. * </p>
  274. */
  275. public String getConfirmationCode() {
  276. return confirmationCode;
  277. }
  278. /**
  279. * <p>
  280. * The confirmation code sent by a user's request to retrieve a forgotten
  281. * password.
  282. * </p>
  283. * <p>
  284. * <b>Constraints:</b><br/>
  285. * <b>Length: </b>1 - 2048<br/>
  286. * <b>Pattern: </b>[\S]+<br/>
  287. *
  288. * @param confirmationCode <p>
  289. * The confirmation code sent by a user's request to retrieve a
  290. * forgotten password.
  291. * </p>
  292. */
  293. public void setConfirmationCode(String confirmationCode) {
  294. this.confirmationCode = confirmationCode;
  295. }
  296. /**
  297. * <p>
  298. * The confirmation code sent by a user's request to retrieve a forgotten
  299. * password.
  300. * </p>
  301. * <p>
  302. * Returns a reference to this object so that method calls can be chained
  303. * together.
  304. * <p>
  305. * <b>Constraints:</b><br/>
  306. * <b>Length: </b>1 - 2048<br/>
  307. * <b>Pattern: </b>[\S]+<br/>
  308. *
  309. * @param confirmationCode <p>
  310. * The confirmation code sent by a user's request to retrieve a
  311. * forgotten password.
  312. * </p>
  313. * @return A reference to this updated object so that method calls can be
  314. * chained together.
  315. */
  316. public ConfirmForgotPasswordRequest withConfirmationCode(String confirmationCode) {
  317. this.confirmationCode = confirmationCode;
  318. return this;
  319. }
  320. /**
  321. * <p>
  322. * The password sent by sent by a user's request to retrieve a forgotten
  323. * password.
  324. * </p>
  325. * <p>
  326. * <b>Constraints:</b><br/>
  327. * <b>Length: </b>6 - 256<br/>
  328. * <b>Pattern: </b>[\S]+<br/>
  329. *
  330. * @return <p>
  331. * The password sent by sent by a user's request to retrieve a
  332. * forgotten password.
  333. * </p>
  334. */
  335. public String getPassword() {
  336. return password;
  337. }
  338. /**
  339. * <p>
  340. * The password sent by sent by a user's request to retrieve a forgotten
  341. * password.
  342. * </p>
  343. * <p>
  344. * <b>Constraints:</b><br/>
  345. * <b>Length: </b>6 - 256<br/>
  346. * <b>Pattern: </b>[\S]+<br/>
  347. *
  348. * @param password <p>
  349. * The password sent by sent by a user's request to retrieve a
  350. * forgotten password.
  351. * </p>
  352. */
  353. public void setPassword(String password) {
  354. this.password = password;
  355. }
  356. /**
  357. * <p>
  358. * The password sent by sent by a user's request to retrieve a forgotten
  359. * password.
  360. * </p>
  361. * <p>
  362. * Returns a reference to this object so that method calls can be chained
  363. * together.
  364. * <p>
  365. * <b>Constraints:</b><br/>
  366. * <b>Length: </b>6 - 256<br/>
  367. * <b>Pattern: </b>[\S]+<br/>
  368. *
  369. * @param password <p>
  370. * The password sent by sent by a user's request to retrieve a
  371. * forgotten password.
  372. * </p>
  373. * @return A reference to this updated object so that method calls can be
  374. * chained together.
  375. */
  376. public ConfirmForgotPasswordRequest withPassword(String password) {
  377. this.password = password;
  378. return this;
  379. }
  380. /**
  381. * Returns a string representation of this object; useful for testing and
  382. * debugging.
  383. *
  384. * @return A string representation of this object.
  385. * @see java.lang.Object#toString()
  386. */
  387. @Override
  388. public String toString() {
  389. StringBuilder sb = new StringBuilder();
  390. sb.append("{");
  391. if (getClientId() != null)
  392. sb.append("ClientId: " + getClientId() + ",");
  393. if (getSecretHash() != null)
  394. sb.append("SecretHash: " + getSecretHash() + ",");
  395. if (getUsername() != null)
  396. sb.append("Username: " + getUsername() + ",");
  397. if (getConfirmationCode() != null)
  398. sb.append("ConfirmationCode: " + getConfirmationCode() + ",");
  399. if (getPassword() != null)
  400. sb.append("Password: " + getPassword());
  401. sb.append("}");
  402. return sb.toString();
  403. }
  404. @Override
  405. public int hashCode() {
  406. final int prime = 31;
  407. int hashCode = 1;
  408. hashCode = prime * hashCode + ((getClientId() == null) ? 0 : getClientId().hashCode());
  409. hashCode = prime * hashCode + ((getSecretHash() == null) ? 0 : getSecretHash().hashCode());
  410. hashCode = prime * hashCode + ((getUsername() == null) ? 0 : getUsername().hashCode());
  411. hashCode = prime * hashCode
  412. + ((getConfirmationCode() == null) ? 0 : getConfirmationCode().hashCode());
  413. hashCode = prime * hashCode + ((getPassword() == null) ? 0 : getPassword().hashCode());
  414. return hashCode;
  415. }
  416. @Override
  417. public boolean equals(Object obj) {
  418. if (this == obj)
  419. return true;
  420. if (obj == null)
  421. return false;
  422. if (obj instanceof ConfirmForgotPasswordRequest == false)
  423. return false;
  424. ConfirmForgotPasswordRequest other = (ConfirmForgotPasswordRequest) obj;
  425. if (other.getClientId() == null ^ this.getClientId() == null)
  426. return false;
  427. if (other.getClientId() != null && other.getClientId().equals(this.getClientId()) == false)
  428. return false;
  429. if (other.getSecretHash() == null ^ this.getSecretHash() == null)
  430. return false;
  431. if (other.getSecretHash() != null
  432. && other.getSecretHash().equals(this.getSecretHash()) == false)
  433. return false;
  434. if (other.getUsername() == null ^ this.getUsername() == null)
  435. return false;
  436. if (other.getUsername() != null && other.getUsername().equals(this.getUsername()) == false)
  437. return false;
  438. if (other.getConfirmationCode() == null ^ this.getConfirmationCode() == null)
  439. return false;
  440. if (other.getConfirmationCode() != null
  441. && other.getConfirmationCode().equals(this.getConfirmationCode()) == false)
  442. return false;
  443. if (other.getPassword() == null ^ this.getPassword() == null)
  444. return false;
  445. if (other.getPassword() != null && other.getPassword().equals(this.getPassword()) == false)
  446. return false;
  447. return true;
  448. }
  449. }