View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.syncope.fit.core.reference;
20  
21  import io.swagger.v3.oas.annotations.media.Schema;
22  import java.util.Objects;
23  import javax.validation.constraints.NotEmpty;
24  import org.apache.syncope.common.lib.command.CommandArgs;
25  
26  public class TestCommandArgs extends CommandArgs {
27  
28      private static final long serialVersionUID = 1408260716514938521L;
29  
30      @NotEmpty
31      @Schema(description = "parent realm", example = "/even/two", defaultValue = "/",
32              requiredMode = Schema.RequiredMode.REQUIRED)
33      private String parentRealm = "/";
34  
35      @NotEmpty
36      @Schema(description = "new realm name", example = "realm123", requiredMode = Schema.RequiredMode.REQUIRED)
37      private String realmName;
38  
39      @NotEmpty
40      @Schema(description = "printer name", example = "printer123", requiredMode = Schema.RequiredMode.REQUIRED)
41      private String printerName;
42  
43      public String getParentRealm() {
44          return parentRealm;
45      }
46  
47      public String getRealmName() {
48          return realmName;
49      }
50  
51      public String getPrinterName() {
52          return printerName;
53      }
54  
55      public void setParentRealm(final String parentRealm) {
56          this.parentRealm = parentRealm;
57      }
58  
59      public void setRealmName(final String realmName) {
60          this.realmName = realmName;
61      }
62  
63      public void setPrinterName(final String printerName) {
64          this.printerName = printerName;
65      }
66  
67      @Override
68      public int hashCode() {
69          int hash = 3;
70          hash = 89 * hash + Objects.hashCode(this.parentRealm);
71          hash = 89 * hash + Objects.hashCode(this.realmName);
72          hash = 89 * hash + Objects.hashCode(this.printerName);
73          return hash;
74      }
75  
76      @Override
77      public boolean equals(final Object obj) {
78          if (this == obj) {
79              return true;
80          }
81          if (obj == null) {
82              return false;
83          }
84          if (getClass() != obj.getClass()) {
85              return false;
86          }
87          final TestCommandArgs other = (TestCommandArgs) obj;
88          if (!Objects.equals(this.parentRealm, other.parentRealm)) {
89              return false;
90          }
91          if (!Objects.equals(this.realmName, other.realmName)) {
92              return false;
93          }
94          return Objects.equals(this.printerName, other.printerName);
95      }
96  
97      @Override
98      public String toString() {
99          return "TestCommandArgs{"
100                 + "parentRealm=" + parentRealm
101                 + ", realmName=" + realmName
102                 + ", printerName=" + printerName
103                 + '}';
104     }
105 }