com.azure.resourcemanager.security.models.AttestationEvidence Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-security Show documentation
Show all versions of azure-resourcemanager-security Show documentation
This package contains Microsoft Azure SDK for Security Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. API spec for Microsoft.Security (Azure Security Center) resource provider. Package tag package-composite-v3.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.security.models;
import com.azure.core.annotation.Fluent;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;
/**
* Describe the properties of a assignment attestation.
*/
@Fluent
public final class AttestationEvidence implements JsonSerializable {
/*
* The description of the evidence
*/
private String description;
/*
* The source url of the evidence
*/
private String sourceUrl;
/**
* Creates an instance of AttestationEvidence class.
*/
public AttestationEvidence() {
}
/**
* Get the description property: The description of the evidence.
*
* @return the description value.
*/
public String description() {
return this.description;
}
/**
* Set the description property: The description of the evidence.
*
* @param description the description value to set.
* @return the AttestationEvidence object itself.
*/
public AttestationEvidence withDescription(String description) {
this.description = description;
return this;
}
/**
* Get the sourceUrl property: The source url of the evidence.
*
* @return the sourceUrl value.
*/
public String sourceUrl() {
return this.sourceUrl;
}
/**
* Set the sourceUrl property: The source url of the evidence.
*
* @param sourceUrl the sourceUrl value to set.
* @return the AttestationEvidence object itself.
*/
public AttestationEvidence withSourceUrl(String sourceUrl) {
this.sourceUrl = sourceUrl;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("description", this.description);
jsonWriter.writeStringField("sourceUrl", this.sourceUrl);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of AttestationEvidence from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of AttestationEvidence if the JsonReader was pointing to an instance of it, or null if it was
* pointing to JSON null.
* @throws IOException If an error occurs while reading the AttestationEvidence.
*/
public static AttestationEvidence fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
AttestationEvidence deserializedAttestationEvidence = new AttestationEvidence();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("description".equals(fieldName)) {
deserializedAttestationEvidence.description = reader.getString();
} else if ("sourceUrl".equals(fieldName)) {
deserializedAttestationEvidence.sourceUrl = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedAttestationEvidence;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy