|
| 1 | +/* |
| 2 | + * Copyright © 2020-2025 ForgeRock AS ([email protected]) |
| 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 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
| 16 | +package uk.org.openbanking.datamodel.v4.vrp; |
| 17 | + |
| 18 | +import java.util.Objects; |
| 19 | + |
| 20 | +import com.fasterxml.jackson.annotation.JsonProperty; |
| 21 | +import com.fasterxml.jackson.annotation.JsonTypeName; |
| 22 | + |
| 23 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 24 | +import jakarta.annotation.Generated; |
| 25 | +import jakarta.validation.Valid; |
| 26 | +import jakarta.validation.constraints.NotNull; |
| 27 | + |
| 28 | +/** |
| 29 | + * DomesticVrpConsentsPatchRequestInner |
| 30 | + */ |
| 31 | + |
| 32 | +@JsonTypeName("domesticVrpConsentsPatch_request_inner") |
| 33 | +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") |
| 34 | +public class DomesticVrpConsentsPatchRequestInner { |
| 35 | + |
| 36 | + private DomesticVrpConsentsPatchRequestInnerOp op; |
| 37 | + |
| 38 | + private String path; |
| 39 | + |
| 40 | + private String from; |
| 41 | + |
| 42 | + private Object value = null; |
| 43 | + |
| 44 | + public DomesticVrpConsentsPatchRequestInner() { |
| 45 | + super(); |
| 46 | + } |
| 47 | + |
| 48 | + /** |
| 49 | + * Constructor with only required parameters |
| 50 | + */ |
| 51 | + public DomesticVrpConsentsPatchRequestInner(DomesticVrpConsentsPatchRequestInnerOp op, String path) { |
| 52 | + this.op = op; |
| 53 | + this.path = path; |
| 54 | + } |
| 55 | + |
| 56 | + public DomesticVrpConsentsPatchRequestInner op(DomesticVrpConsentsPatchRequestInnerOp op) { |
| 57 | + this.op = op; |
| 58 | + return this; |
| 59 | + } |
| 60 | + |
| 61 | + /** |
| 62 | + * Get op |
| 63 | + * |
| 64 | + * @return op |
| 65 | + */ |
| 66 | + @NotNull |
| 67 | + @Valid |
| 68 | + @Schema(name = "op", requiredMode = Schema.RequiredMode.REQUIRED) |
| 69 | + @JsonProperty("op") |
| 70 | + public DomesticVrpConsentsPatchRequestInnerOp getOp() { |
| 71 | + return op; |
| 72 | + } |
| 73 | + |
| 74 | + public void setOp(DomesticVrpConsentsPatchRequestInnerOp op) { |
| 75 | + this.op = op; |
| 76 | + } |
| 77 | + |
| 78 | + public DomesticVrpConsentsPatchRequestInner path(String path) { |
| 79 | + this.path = path; |
| 80 | + return this; |
| 81 | + } |
| 82 | + |
| 83 | + /** |
| 84 | + * The path to the element to operate on as per [RFC 6901](https://datatracker.ietf.org/doc/html/rfc6901) |
| 85 | + * |
| 86 | + * @return path |
| 87 | + */ |
| 88 | + @NotNull |
| 89 | + @Schema(name = "path", description = "The path to the element to operate on as per [RFC 6901](https://datatracker.ietf.org/doc/html/rfc6901)", requiredMode = Schema.RequiredMode.REQUIRED) |
| 90 | + @JsonProperty("path") |
| 91 | + public String getPath() { |
| 92 | + return path; |
| 93 | + } |
| 94 | + |
| 95 | + public void setPath(String path) { |
| 96 | + this.path = path; |
| 97 | + } |
| 98 | + |
| 99 | + public DomesticVrpConsentsPatchRequestInner from(String from) { |
| 100 | + this.from = from; |
| 101 | + return this; |
| 102 | + } |
| 103 | + |
| 104 | + /** |
| 105 | + * The path to move or copy from as per [RFC 6901](https://datatracker.ietf.org/doc/html/rfc6901) |
| 106 | + * |
| 107 | + * @return from |
| 108 | + */ |
| 109 | + |
| 110 | + @Schema(name = "from", description = "The path to move or copy from as per [RFC 6901](https://datatracker.ietf.org/doc/html/rfc6901)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| 111 | + @JsonProperty("from") |
| 112 | + public String getFrom() { |
| 113 | + return from; |
| 114 | + } |
| 115 | + |
| 116 | + public void setFrom(String from) { |
| 117 | + this.from = from; |
| 118 | + } |
| 119 | + |
| 120 | + public DomesticVrpConsentsPatchRequestInner value(Object value) { |
| 121 | + this.value = value; |
| 122 | + return this; |
| 123 | + } |
| 124 | + |
| 125 | + /** |
| 126 | + * The value to add, replace, or test against. This may be a single string or an array of strings |
| 127 | + * |
| 128 | + * @return value |
| 129 | + */ |
| 130 | + |
| 131 | + @Schema(name = "value", description = "The value to add, replace, or test against. This may be a single string or an array of strings", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| 132 | + @JsonProperty("value") |
| 133 | + public Object getValue() { |
| 134 | + return value; |
| 135 | + } |
| 136 | + |
| 137 | + public void setValue(Object value) { |
| 138 | + this.value = value; |
| 139 | + } |
| 140 | + |
| 141 | + @Override |
| 142 | + public boolean equals(Object o) { |
| 143 | + if (this == o) { |
| 144 | + return true; |
| 145 | + } |
| 146 | + if (o == null || getClass() != o.getClass()) { |
| 147 | + return false; |
| 148 | + } |
| 149 | + DomesticVrpConsentsPatchRequestInner domesticVrpConsentsPatchRequestInner = (DomesticVrpConsentsPatchRequestInner) o; |
| 150 | + return Objects.equals(this.op, domesticVrpConsentsPatchRequestInner.op) && |
| 151 | + Objects.equals(this.path, domesticVrpConsentsPatchRequestInner.path) && |
| 152 | + Objects.equals(this.from, domesticVrpConsentsPatchRequestInner.from) && |
| 153 | + Objects.equals(this.value, domesticVrpConsentsPatchRequestInner.value); |
| 154 | + } |
| 155 | + |
| 156 | + @Override |
| 157 | + public int hashCode() { |
| 158 | + return Objects.hash(op, path, from, value); |
| 159 | + } |
| 160 | + |
| 161 | + @Override |
| 162 | + public String toString() { |
| 163 | + StringBuilder sb = new StringBuilder(); |
| 164 | + sb.append("class DomesticVrpConsentsPatchRequestInner {\n"); |
| 165 | + sb.append(" op: ").append(toIndentedString(op)).append("\n"); |
| 166 | + sb.append(" path: ").append(toIndentedString(path)).append("\n"); |
| 167 | + sb.append(" from: ").append(toIndentedString(from)).append("\n"); |
| 168 | + sb.append(" value: ").append(toIndentedString(value)).append("\n"); |
| 169 | + sb.append("}"); |
| 170 | + return sb.toString(); |
| 171 | + } |
| 172 | + |
| 173 | + /** |
| 174 | + * Convert the given object to string with each line indented by 4 spaces |
| 175 | + * (except the first line). |
| 176 | + */ |
| 177 | + private String toIndentedString(Object o) { |
| 178 | + if (o == null) { |
| 179 | + return "null"; |
| 180 | + } |
| 181 | + return o.toString().replace("\n", "\n "); |
| 182 | + } |
| 183 | +} |
| 184 | + |
0 commit comments