RetrofitBucket.java 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. * Nextcloud Talk application
  3. *
  4. * @author Mario Danic
  5. * Copyright (C) 2017 Mario Danic <mario@lovelyhq.com>
  6. *
  7. * This program is free software: you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation, either version 3 of the License, or
  10. * at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  19. */
  20. package com.nextcloud.talk.models;
  21. import org.parceler.Parcel;
  22. import java.util.Map;
  23. @Parcel
  24. public class RetrofitBucket {
  25. public String url;
  26. public Map<String, String> queryMap;
  27. public String getUrl() {
  28. return this.url;
  29. }
  30. public Map<String, String> getQueryMap() {
  31. return this.queryMap;
  32. }
  33. public void setUrl(String url) {
  34. this.url = url;
  35. }
  36. public void setQueryMap(Map<String, String> queryMap) {
  37. this.queryMap = queryMap;
  38. }
  39. public boolean equals(final Object o) {
  40. if (o == this) {
  41. return true;
  42. }
  43. if (!(o instanceof RetrofitBucket)) {
  44. return false;
  45. }
  46. final RetrofitBucket other = (RetrofitBucket) o;
  47. if (!other.canEqual((Object) this)) {
  48. return false;
  49. }
  50. final Object this$url = this.getUrl();
  51. final Object other$url = other.getUrl();
  52. if (this$url == null ? other$url != null : !this$url.equals(other$url)) {
  53. return false;
  54. }
  55. final Object this$queryMap = this.getQueryMap();
  56. final Object other$queryMap = other.getQueryMap();
  57. return this$queryMap == null ? other$queryMap == null : this$queryMap.equals(other$queryMap);
  58. }
  59. protected boolean canEqual(final Object other) {
  60. return other instanceof RetrofitBucket;
  61. }
  62. public int hashCode() {
  63. final int PRIME = 59;
  64. int result = 1;
  65. final Object $url = this.getUrl();
  66. result = result * PRIME + ($url == null ? 43 : $url.hashCode());
  67. final Object $queryMap = this.getQueryMap();
  68. result = result * PRIME + ($queryMap == null ? 43 : $queryMap.hashCode());
  69. return result;
  70. }
  71. public String toString() {
  72. return "RetrofitBucket(url=" + this.getUrl() + ", queryMap=" + this.getQueryMap() + ")";
  73. }
  74. }