|
| 1 | +// Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | +// Licensed under the MIT License. |
| 3 | +// Code generated by Microsoft (R) AutoRest Code Generator. |
| 4 | + |
| 5 | +package com.azure.resourcemanager.servicelinker.fluent.models; |
| 6 | + |
| 7 | +import com.azure.core.annotation.Fluent; |
| 8 | +import com.azure.resourcemanager.servicelinker.models.AuthType; |
| 9 | +import com.azure.resourcemanager.servicelinker.models.ValidationResultItem; |
| 10 | +import com.fasterxml.jackson.annotation.JsonProperty; |
| 11 | +import java.time.OffsetDateTime; |
| 12 | +import java.util.List; |
| 13 | + |
| 14 | +/** The validation operation result for a linker. */ |
| 15 | +@Fluent |
| 16 | +public final class ValidateOperationResultInner { |
| 17 | + /* |
| 18 | + * The validation result detail. |
| 19 | + */ |
| 20 | + @JsonProperty(value = "properties") |
| 21 | + private ValidateResult innerProperties; |
| 22 | + |
| 23 | + /* |
| 24 | + * Validated linker id. |
| 25 | + */ |
| 26 | + @JsonProperty(value = "resourceId") |
| 27 | + private String resourceId; |
| 28 | + |
| 29 | + /* |
| 30 | + * Validation operation status. |
| 31 | + */ |
| 32 | + @JsonProperty(value = "status") |
| 33 | + private String status; |
| 34 | + |
| 35 | + /** |
| 36 | + * Get the innerProperties property: The validation result detail. |
| 37 | + * |
| 38 | + * @return the innerProperties value. |
| 39 | + */ |
| 40 | + private ValidateResult innerProperties() { |
| 41 | + return this.innerProperties; |
| 42 | + } |
| 43 | + |
| 44 | + /** |
| 45 | + * Get the resourceId property: Validated linker id. |
| 46 | + * |
| 47 | + * @return the resourceId value. |
| 48 | + */ |
| 49 | + public String resourceId() { |
| 50 | + return this.resourceId; |
| 51 | + } |
| 52 | + |
| 53 | + /** |
| 54 | + * Set the resourceId property: Validated linker id. |
| 55 | + * |
| 56 | + * @param resourceId the resourceId value to set. |
| 57 | + * @return the ValidateOperationResultInner object itself. |
| 58 | + */ |
| 59 | + public ValidateOperationResultInner withResourceId(String resourceId) { |
| 60 | + this.resourceId = resourceId; |
| 61 | + return this; |
| 62 | + } |
| 63 | + |
| 64 | + /** |
| 65 | + * Get the status property: Validation operation status. |
| 66 | + * |
| 67 | + * @return the status value. |
| 68 | + */ |
| 69 | + public String status() { |
| 70 | + return this.status; |
| 71 | + } |
| 72 | + |
| 73 | + /** |
| 74 | + * Set the status property: Validation operation status. |
| 75 | + * |
| 76 | + * @param status the status value to set. |
| 77 | + * @return the ValidateOperationResultInner object itself. |
| 78 | + */ |
| 79 | + public ValidateOperationResultInner withStatus(String status) { |
| 80 | + this.status = status; |
| 81 | + return this; |
| 82 | + } |
| 83 | + |
| 84 | + /** |
| 85 | + * Get the linkerName property: The linker name. |
| 86 | + * |
| 87 | + * @return the linkerName value. |
| 88 | + */ |
| 89 | + public String linkerName() { |
| 90 | + return this.innerProperties() == null ? null : this.innerProperties().linkerName(); |
| 91 | + } |
| 92 | + |
| 93 | + /** |
| 94 | + * Set the linkerName property: The linker name. |
| 95 | + * |
| 96 | + * @param linkerName the linkerName value to set. |
| 97 | + * @return the ValidateOperationResultInner object itself. |
| 98 | + */ |
| 99 | + public ValidateOperationResultInner withLinkerName(String linkerName) { |
| 100 | + if (this.innerProperties() == null) { |
| 101 | + this.innerProperties = new ValidateResult(); |
| 102 | + } |
| 103 | + this.innerProperties().withLinkerName(linkerName); |
| 104 | + return this; |
| 105 | + } |
| 106 | + |
| 107 | + /** |
| 108 | + * Get the isConnectionAvailable property: A boolean value indicating whether the connection is available or not. |
| 109 | + * |
| 110 | + * @return the isConnectionAvailable value. |
| 111 | + */ |
| 112 | + public Boolean isConnectionAvailable() { |
| 113 | + return this.innerProperties() == null ? null : this.innerProperties().isConnectionAvailable(); |
| 114 | + } |
| 115 | + |
| 116 | + /** |
| 117 | + * Set the isConnectionAvailable property: A boolean value indicating whether the connection is available or not. |
| 118 | + * |
| 119 | + * @param isConnectionAvailable the isConnectionAvailable value to set. |
| 120 | + * @return the ValidateOperationResultInner object itself. |
| 121 | + */ |
| 122 | + public ValidateOperationResultInner withIsConnectionAvailable(Boolean isConnectionAvailable) { |
| 123 | + if (this.innerProperties() == null) { |
| 124 | + this.innerProperties = new ValidateResult(); |
| 125 | + } |
| 126 | + this.innerProperties().withIsConnectionAvailable(isConnectionAvailable); |
| 127 | + return this; |
| 128 | + } |
| 129 | + |
| 130 | + /** |
| 131 | + * Get the reportStartTimeUtc property: The start time of the validation report. |
| 132 | + * |
| 133 | + * @return the reportStartTimeUtc value. |
| 134 | + */ |
| 135 | + public OffsetDateTime reportStartTimeUtc() { |
| 136 | + return this.innerProperties() == null ? null : this.innerProperties().reportStartTimeUtc(); |
| 137 | + } |
| 138 | + |
| 139 | + /** |
| 140 | + * Set the reportStartTimeUtc property: The start time of the validation report. |
| 141 | + * |
| 142 | + * @param reportStartTimeUtc the reportStartTimeUtc value to set. |
| 143 | + * @return the ValidateOperationResultInner object itself. |
| 144 | + */ |
| 145 | + public ValidateOperationResultInner withReportStartTimeUtc(OffsetDateTime reportStartTimeUtc) { |
| 146 | + if (this.innerProperties() == null) { |
| 147 | + this.innerProperties = new ValidateResult(); |
| 148 | + } |
| 149 | + this.innerProperties().withReportStartTimeUtc(reportStartTimeUtc); |
| 150 | + return this; |
| 151 | + } |
| 152 | + |
| 153 | + /** |
| 154 | + * Get the reportEndTimeUtc property: The end time of the validation report. |
| 155 | + * |
| 156 | + * @return the reportEndTimeUtc value. |
| 157 | + */ |
| 158 | + public OffsetDateTime reportEndTimeUtc() { |
| 159 | + return this.innerProperties() == null ? null : this.innerProperties().reportEndTimeUtc(); |
| 160 | + } |
| 161 | + |
| 162 | + /** |
| 163 | + * Set the reportEndTimeUtc property: The end time of the validation report. |
| 164 | + * |
| 165 | + * @param reportEndTimeUtc the reportEndTimeUtc value to set. |
| 166 | + * @return the ValidateOperationResultInner object itself. |
| 167 | + */ |
| 168 | + public ValidateOperationResultInner withReportEndTimeUtc(OffsetDateTime reportEndTimeUtc) { |
| 169 | + if (this.innerProperties() == null) { |
| 170 | + this.innerProperties = new ValidateResult(); |
| 171 | + } |
| 172 | + this.innerProperties().withReportEndTimeUtc(reportEndTimeUtc); |
| 173 | + return this; |
| 174 | + } |
| 175 | + |
| 176 | + /** |
| 177 | + * Get the sourceId property: The resource id of the linker source application. |
| 178 | + * |
| 179 | + * @return the sourceId value. |
| 180 | + */ |
| 181 | + public String sourceId() { |
| 182 | + return this.innerProperties() == null ? null : this.innerProperties().sourceId(); |
| 183 | + } |
| 184 | + |
| 185 | + /** |
| 186 | + * Set the sourceId property: The resource id of the linker source application. |
| 187 | + * |
| 188 | + * @param sourceId the sourceId value to set. |
| 189 | + * @return the ValidateOperationResultInner object itself. |
| 190 | + */ |
| 191 | + public ValidateOperationResultInner withSourceId(String sourceId) { |
| 192 | + if (this.innerProperties() == null) { |
| 193 | + this.innerProperties = new ValidateResult(); |
| 194 | + } |
| 195 | + this.innerProperties().withSourceId(sourceId); |
| 196 | + return this; |
| 197 | + } |
| 198 | + |
| 199 | + /** |
| 200 | + * Get the targetId property: The resource Id of target service. |
| 201 | + * |
| 202 | + * @return the targetId value. |
| 203 | + */ |
| 204 | + public String targetId() { |
| 205 | + return this.innerProperties() == null ? null : this.innerProperties().targetId(); |
| 206 | + } |
| 207 | + |
| 208 | + /** |
| 209 | + * Set the targetId property: The resource Id of target service. |
| 210 | + * |
| 211 | + * @param targetId the targetId value to set. |
| 212 | + * @return the ValidateOperationResultInner object itself. |
| 213 | + */ |
| 214 | + public ValidateOperationResultInner withTargetId(String targetId) { |
| 215 | + if (this.innerProperties() == null) { |
| 216 | + this.innerProperties = new ValidateResult(); |
| 217 | + } |
| 218 | + this.innerProperties().withTargetId(targetId); |
| 219 | + return this; |
| 220 | + } |
| 221 | + |
| 222 | + /** |
| 223 | + * Get the authType property: The authentication type. |
| 224 | + * |
| 225 | + * @return the authType value. |
| 226 | + */ |
| 227 | + public AuthType authType() { |
| 228 | + return this.innerProperties() == null ? null : this.innerProperties().authType(); |
| 229 | + } |
| 230 | + |
| 231 | + /** |
| 232 | + * Set the authType property: The authentication type. |
| 233 | + * |
| 234 | + * @param authType the authType value to set. |
| 235 | + * @return the ValidateOperationResultInner object itself. |
| 236 | + */ |
| 237 | + public ValidateOperationResultInner withAuthType(AuthType authType) { |
| 238 | + if (this.innerProperties() == null) { |
| 239 | + this.innerProperties = new ValidateResult(); |
| 240 | + } |
| 241 | + this.innerProperties().withAuthType(authType); |
| 242 | + return this; |
| 243 | + } |
| 244 | + |
| 245 | + /** |
| 246 | + * Get the validationDetail property: The detail of validation result. |
| 247 | + * |
| 248 | + * @return the validationDetail value. |
| 249 | + */ |
| 250 | + public List<ValidationResultItem> validationDetail() { |
| 251 | + return this.innerProperties() == null ? null : this.innerProperties().validationDetail(); |
| 252 | + } |
| 253 | + |
| 254 | + /** |
| 255 | + * Set the validationDetail property: The detail of validation result. |
| 256 | + * |
| 257 | + * @param validationDetail the validationDetail value to set. |
| 258 | + * @return the ValidateOperationResultInner object itself. |
| 259 | + */ |
| 260 | + public ValidateOperationResultInner withValidationDetail(List<ValidationResultItem> validationDetail) { |
| 261 | + if (this.innerProperties() == null) { |
| 262 | + this.innerProperties = new ValidateResult(); |
| 263 | + } |
| 264 | + this.innerProperties().withValidationDetail(validationDetail); |
| 265 | + return this; |
| 266 | + } |
| 267 | + |
| 268 | + /** |
| 269 | + * Validates the instance. |
| 270 | + * |
| 271 | + * @throws IllegalArgumentException thrown if the instance is not valid. |
| 272 | + */ |
| 273 | + public void validate() { |
| 274 | + if (innerProperties() != null) { |
| 275 | + innerProperties().validate(); |
| 276 | + } |
| 277 | + } |
| 278 | +} |
0 commit comments